@nordhealth/components 1.0.0-beta.11 → 1.0.0-beta.14
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 +847 -829
- package/lib/Avatar.js +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/Input.js +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Radio.js.map +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/{TextField-b4155167.js → TextField-00822066.js} +2 -2
- package/lib/TextField-00822066.js.map +1 -0
- package/lib/Textarea.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/stack/Stack.d.ts +4 -0
- package/package.json +5 -5
- package/lib/TextField-b4155167.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -422,312 +422,440 @@
|
|
|
422
422
|
},
|
|
423
423
|
{
|
|
424
424
|
"kind": "javascript-module",
|
|
425
|
-
"path": "src/
|
|
425
|
+
"path": "src/banner/Banner.ts",
|
|
426
426
|
"declarations": [
|
|
427
427
|
{
|
|
428
428
|
"kind": "class",
|
|
429
|
-
"description": "
|
|
430
|
-
"name": "
|
|
429
|
+
"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.",
|
|
430
|
+
"name": "Banner",
|
|
431
|
+
"slots": [
|
|
432
|
+
{
|
|
433
|
+
"description": "default slot",
|
|
434
|
+
"name": ""
|
|
435
|
+
}
|
|
436
|
+
],
|
|
431
437
|
"members": [
|
|
432
438
|
{
|
|
433
439
|
"kind": "field",
|
|
434
|
-
"name": "
|
|
440
|
+
"name": "variant",
|
|
435
441
|
"type": {
|
|
436
|
-
"text": "
|
|
442
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
437
443
|
},
|
|
438
|
-
"
|
|
439
|
-
"
|
|
440
|
-
|
|
444
|
+
"default": "\"info\"",
|
|
445
|
+
"description": "The style variant of the banner.",
|
|
446
|
+
"attribute": "variant",
|
|
447
|
+
"reflects": true
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"attributes": [
|
|
441
451
|
{
|
|
442
|
-
"
|
|
443
|
-
"name": "monthSelectNode",
|
|
452
|
+
"name": "variant",
|
|
444
453
|
"type": {
|
|
445
|
-
"text": "
|
|
454
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
446
455
|
},
|
|
447
|
-
"
|
|
448
|
-
|
|
456
|
+
"default": "\"info\"",
|
|
457
|
+
"description": "The style variant of the banner.",
|
|
458
|
+
"fieldName": "variant"
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"superclass": {
|
|
462
|
+
"name": "LitElement",
|
|
463
|
+
"package": "lit"
|
|
464
|
+
},
|
|
465
|
+
"status": "new",
|
|
466
|
+
"category": "feedback",
|
|
467
|
+
"tagName": "nord-banner",
|
|
468
|
+
"customElement": true
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"exports": [
|
|
472
|
+
{
|
|
473
|
+
"kind": "js",
|
|
474
|
+
"name": "default",
|
|
475
|
+
"declaration": {
|
|
476
|
+
"name": "Banner",
|
|
477
|
+
"module": "src/banner/Banner.ts"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"kind": "custom-element-definition",
|
|
482
|
+
"name": "nord-banner",
|
|
483
|
+
"declaration": {
|
|
484
|
+
"name": "Banner",
|
|
485
|
+
"module": "src/banner/Banner.ts"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"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"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"kind": "javascript-module",
|
|
493
|
+
"path": "src/button/Button.ts",
|
|
494
|
+
"declarations": [
|
|
495
|
+
{
|
|
496
|
+
"kind": "class",
|
|
497
|
+
"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.",
|
|
498
|
+
"name": "Button",
|
|
499
|
+
"slots": [
|
|
449
500
|
{
|
|
450
|
-
"
|
|
451
|
-
"name": "
|
|
452
|
-
"type": {
|
|
453
|
-
"text": "HTMLButtonElement"
|
|
454
|
-
},
|
|
455
|
-
"privacy": "private"
|
|
501
|
+
"description": "The button content",
|
|
502
|
+
"name": ""
|
|
456
503
|
},
|
|
457
504
|
{
|
|
458
|
-
"
|
|
459
|
-
"name": "
|
|
460
|
-
"privacy": "private",
|
|
461
|
-
"default": "new DirectionController(this)"
|
|
505
|
+
"description": "Used to place content before button text. Typically used for icons.",
|
|
506
|
+
"name": "before"
|
|
462
507
|
},
|
|
463
508
|
{
|
|
464
|
-
"
|
|
465
|
-
"name": "
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
509
|
+
"description": "Used to place content after button text. Typically used for icons.",
|
|
510
|
+
"name": "after"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"members": [
|
|
469
514
|
{
|
|
470
515
|
"kind": "field",
|
|
471
|
-
"name": "
|
|
516
|
+
"name": "buttonRef",
|
|
472
517
|
"privacy": "private"
|
|
473
518
|
},
|
|
474
519
|
{
|
|
475
520
|
"kind": "field",
|
|
476
|
-
"name": "
|
|
477
|
-
"type": {
|
|
478
|
-
"text": "Intl.DateTimeFormat"
|
|
479
|
-
},
|
|
521
|
+
"name": "lightDom",
|
|
480
522
|
"privacy": "private",
|
|
481
|
-
"
|
|
523
|
+
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
482
524
|
},
|
|
483
525
|
{
|
|
484
526
|
"kind": "field",
|
|
485
|
-
"name": "
|
|
527
|
+
"name": "variant",
|
|
486
528
|
"type": {
|
|
487
|
-
"text": "
|
|
529
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
488
530
|
},
|
|
489
|
-
"default": "
|
|
531
|
+
"default": "\"default\"",
|
|
532
|
+
"description": "The style variant of the button.",
|
|
533
|
+
"attribute": "variant",
|
|
534
|
+
"reflects": true
|
|
490
535
|
},
|
|
491
536
|
{
|
|
492
537
|
"kind": "field",
|
|
493
|
-
"name": "
|
|
538
|
+
"name": "type",
|
|
494
539
|
"type": {
|
|
495
|
-
"text": "
|
|
540
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
496
541
|
},
|
|
497
|
-
"default": "\"\"",
|
|
498
|
-
"description": "The
|
|
499
|
-
"attribute": "
|
|
542
|
+
"default": "\"submit\"",
|
|
543
|
+
"description": "The type of the button.",
|
|
544
|
+
"attribute": "type",
|
|
545
|
+
"reflects": true
|
|
500
546
|
},
|
|
501
547
|
{
|
|
502
548
|
"kind": "field",
|
|
503
|
-
"name": "
|
|
549
|
+
"name": "size",
|
|
504
550
|
"type": {
|
|
505
|
-
"text": "
|
|
551
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
506
552
|
},
|
|
507
|
-
"
|
|
508
|
-
"
|
|
553
|
+
"default": "\"m\"",
|
|
554
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
555
|
+
"attribute": "size",
|
|
556
|
+
"reflects": true
|
|
509
557
|
},
|
|
510
558
|
{
|
|
511
559
|
"kind": "field",
|
|
512
|
-
"name": "
|
|
560
|
+
"name": "href",
|
|
513
561
|
"type": {
|
|
514
|
-
"text": "string"
|
|
562
|
+
"text": "string | undefined"
|
|
515
563
|
},
|
|
516
|
-
"
|
|
517
|
-
"
|
|
518
|
-
"
|
|
564
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
565
|
+
"attribute": "href",
|
|
566
|
+
"reflects": true
|
|
519
567
|
},
|
|
520
568
|
{
|
|
521
569
|
"kind": "field",
|
|
522
|
-
"name": "
|
|
570
|
+
"name": "download",
|
|
523
571
|
"type": {
|
|
524
|
-
"text": "
|
|
572
|
+
"text": "boolean"
|
|
525
573
|
},
|
|
526
|
-
"default": "
|
|
527
|
-
"description": "
|
|
528
|
-
"attribute": "
|
|
574
|
+
"default": "false",
|
|
575
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
576
|
+
"attribute": "download"
|
|
529
577
|
},
|
|
530
578
|
{
|
|
531
579
|
"kind": "field",
|
|
532
|
-
"name": "
|
|
580
|
+
"name": "target",
|
|
533
581
|
"type": {
|
|
534
|
-
"text": "
|
|
582
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
535
583
|
},
|
|
536
|
-
"default": "
|
|
537
|
-
"description": "
|
|
584
|
+
"default": "\"_self\"",
|
|
585
|
+
"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.",
|
|
586
|
+
"attribute": "target",
|
|
587
|
+
"reflects": true
|
|
538
588
|
},
|
|
539
589
|
{
|
|
540
590
|
"kind": "field",
|
|
541
|
-
"name": "
|
|
591
|
+
"name": "expand",
|
|
542
592
|
"type": {
|
|
543
593
|
"text": "boolean"
|
|
544
594
|
},
|
|
545
|
-
"
|
|
546
|
-
"
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
"kind": "field",
|
|
550
|
-
"name": "focusedDay",
|
|
551
|
-
"privacy": "private",
|
|
552
|
-
"default": "new Date()"
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
"kind": "method",
|
|
556
|
-
"name": "focus",
|
|
557
|
-
"parameters": [
|
|
558
|
-
{
|
|
559
|
-
"name": "options",
|
|
560
|
-
"optional": true,
|
|
561
|
-
"type": {
|
|
562
|
-
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
]
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"kind": "method",
|
|
569
|
-
"name": "createDateFormatter",
|
|
570
|
-
"privacy": "private"
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
"kind": "field",
|
|
574
|
-
"name": "handleDaySelect",
|
|
575
|
-
"privacy": "private"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"kind": "method",
|
|
579
|
-
"name": "addDays",
|
|
580
|
-
"privacy": "private",
|
|
581
|
-
"parameters": [
|
|
582
|
-
{
|
|
583
|
-
"name": "days",
|
|
584
|
-
"type": {
|
|
585
|
-
"text": "number"
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
]
|
|
595
|
+
"default": "false",
|
|
596
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
597
|
+
"attribute": "expand",
|
|
598
|
+
"reflects": true
|
|
589
599
|
},
|
|
590
600
|
{
|
|
591
601
|
"kind": "method",
|
|
592
|
-
"name": "
|
|
602
|
+
"name": "renderLink",
|
|
593
603
|
"privacy": "private",
|
|
594
604
|
"parameters": [
|
|
595
605
|
{
|
|
596
|
-
"name": "
|
|
606
|
+
"name": "innards",
|
|
597
607
|
"type": {
|
|
598
|
-
"text": "
|
|
608
|
+
"text": "TemplateResult"
|
|
599
609
|
}
|
|
600
610
|
}
|
|
601
|
-
]
|
|
611
|
+
],
|
|
612
|
+
"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."
|
|
602
613
|
},
|
|
603
614
|
{
|
|
604
615
|
"kind": "method",
|
|
605
|
-
"name": "
|
|
616
|
+
"name": "renderButton",
|
|
606
617
|
"privacy": "private",
|
|
607
618
|
"parameters": [
|
|
608
619
|
{
|
|
609
|
-
"name": "
|
|
620
|
+
"name": "innards",
|
|
610
621
|
"type": {
|
|
611
|
-
"text": "
|
|
622
|
+
"text": "TemplateResult"
|
|
612
623
|
}
|
|
613
624
|
}
|
|
614
625
|
]
|
|
615
626
|
},
|
|
616
627
|
{
|
|
617
628
|
"kind": "method",
|
|
618
|
-
"name": "
|
|
629
|
+
"name": "renderLightDom",
|
|
619
630
|
"privacy": "private"
|
|
620
631
|
},
|
|
621
632
|
{
|
|
622
|
-
"kind": "
|
|
623
|
-
"name": "
|
|
633
|
+
"kind": "field",
|
|
634
|
+
"name": "handleOuterClick",
|
|
624
635
|
"privacy": "private"
|
|
625
636
|
},
|
|
626
637
|
{
|
|
627
638
|
"kind": "method",
|
|
628
|
-
"name": "
|
|
639
|
+
"name": "handleClick",
|
|
629
640
|
"privacy": "private",
|
|
630
641
|
"parameters": [
|
|
631
642
|
{
|
|
632
|
-
"name": "
|
|
643
|
+
"name": "e",
|
|
633
644
|
"type": {
|
|
634
|
-
"text": "
|
|
645
|
+
"text": "Event"
|
|
635
646
|
}
|
|
636
647
|
}
|
|
637
648
|
]
|
|
638
649
|
},
|
|
639
650
|
{
|
|
640
|
-
"kind": "
|
|
641
|
-
"name": "
|
|
642
|
-
"
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
+
"kind": "field",
|
|
652
|
+
"name": "disabled",
|
|
653
|
+
"type": {
|
|
654
|
+
"text": "boolean"
|
|
655
|
+
},
|
|
656
|
+
"default": "false",
|
|
657
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
658
|
+
"attribute": "disabled",
|
|
659
|
+
"reflects": true,
|
|
660
|
+
"inheritedFrom": {
|
|
661
|
+
"name": "InputMixin",
|
|
662
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
663
|
+
}
|
|
651
664
|
},
|
|
652
665
|
{
|
|
653
|
-
"kind": "
|
|
654
|
-
"name": "
|
|
655
|
-
"
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
666
|
+
"kind": "field",
|
|
667
|
+
"name": "name",
|
|
668
|
+
"type": {
|
|
669
|
+
"text": "string | undefined"
|
|
670
|
+
},
|
|
671
|
+
"description": "The name of the form component.",
|
|
672
|
+
"attribute": "name",
|
|
673
|
+
"inheritedFrom": {
|
|
674
|
+
"name": "InputMixin",
|
|
675
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
676
|
+
}
|
|
664
677
|
},
|
|
665
678
|
{
|
|
666
679
|
"kind": "field",
|
|
667
|
-
"name": "
|
|
668
|
-
"
|
|
680
|
+
"name": "value",
|
|
681
|
+
"type": {
|
|
682
|
+
"text": "string"
|
|
683
|
+
},
|
|
684
|
+
"default": "\"\"",
|
|
685
|
+
"description": "The value of the form component.",
|
|
686
|
+
"attribute": "value",
|
|
687
|
+
"inheritedFrom": {
|
|
688
|
+
"name": "InputMixin",
|
|
689
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
690
|
+
}
|
|
669
691
|
},
|
|
670
692
|
{
|
|
671
693
|
"kind": "field",
|
|
672
|
-
"name": "
|
|
673
|
-
"privacy": "
|
|
694
|
+
"name": "form",
|
|
695
|
+
"privacy": "protected",
|
|
696
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
697
|
+
"inheritedFrom": {
|
|
698
|
+
"name": "InputMixin",
|
|
699
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
700
|
+
}
|
|
674
701
|
},
|
|
675
702
|
{
|
|
676
703
|
"kind": "field",
|
|
677
|
-
"name": "
|
|
678
|
-
"privacy": "
|
|
704
|
+
"name": "focusableRef",
|
|
705
|
+
"privacy": "protected",
|
|
706
|
+
"inheritedFrom": {
|
|
707
|
+
"name": "FocusableMixin",
|
|
708
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
709
|
+
}
|
|
679
710
|
},
|
|
680
711
|
{
|
|
681
|
-
"kind": "
|
|
682
|
-
"name": "
|
|
683
|
-
"
|
|
712
|
+
"kind": "method",
|
|
713
|
+
"name": "focus",
|
|
714
|
+
"parameters": [
|
|
715
|
+
{
|
|
716
|
+
"name": "options",
|
|
717
|
+
"optional": true,
|
|
718
|
+
"type": {
|
|
719
|
+
"text": "FocusOptions"
|
|
720
|
+
},
|
|
721
|
+
"description": "An object which controls aspects of the focusing process."
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
"description": "Programmatically move focus to the component.",
|
|
725
|
+
"inheritedFrom": {
|
|
726
|
+
"name": "FocusableMixin",
|
|
727
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
728
|
+
}
|
|
684
729
|
},
|
|
685
730
|
{
|
|
686
|
-
"kind": "
|
|
687
|
-
"name": "
|
|
688
|
-
"
|
|
731
|
+
"kind": "method",
|
|
732
|
+
"name": "blur",
|
|
733
|
+
"description": "Programmatically remove focus from the component.",
|
|
734
|
+
"inheritedFrom": {
|
|
735
|
+
"name": "FocusableMixin",
|
|
736
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
737
|
+
}
|
|
689
738
|
},
|
|
690
739
|
{
|
|
691
|
-
"kind": "
|
|
692
|
-
"name": "
|
|
693
|
-
"
|
|
740
|
+
"kind": "method",
|
|
741
|
+
"name": "click",
|
|
742
|
+
"description": "Programmatically simulates a click on the component.",
|
|
743
|
+
"inheritedFrom": {
|
|
744
|
+
"name": "FocusableMixin",
|
|
745
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
746
|
+
}
|
|
694
747
|
}
|
|
695
748
|
],
|
|
696
749
|
"attributes": [
|
|
697
750
|
{
|
|
698
|
-
"name": "
|
|
751
|
+
"name": "variant",
|
|
699
752
|
"type": {
|
|
700
|
-
"text": "
|
|
753
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
701
754
|
},
|
|
702
|
-
"default": "\"\"",
|
|
703
|
-
"description": "The
|
|
704
|
-
"fieldName": "
|
|
755
|
+
"default": "\"default\"",
|
|
756
|
+
"description": "The style variant of the button.",
|
|
757
|
+
"fieldName": "variant"
|
|
705
758
|
},
|
|
706
759
|
{
|
|
707
|
-
"name": "
|
|
760
|
+
"name": "type",
|
|
708
761
|
"type": {
|
|
709
|
-
"text": "
|
|
762
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
710
763
|
},
|
|
711
|
-
"
|
|
712
|
-
"
|
|
764
|
+
"default": "\"submit\"",
|
|
765
|
+
"description": "The type of the button.",
|
|
766
|
+
"fieldName": "type"
|
|
713
767
|
},
|
|
714
768
|
{
|
|
715
|
-
"name": "
|
|
769
|
+
"name": "size",
|
|
716
770
|
"type": {
|
|
717
|
-
"text": "
|
|
771
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
718
772
|
},
|
|
719
|
-
"default": "\"\"",
|
|
720
|
-
"description": "
|
|
721
|
-
"fieldName": "
|
|
773
|
+
"default": "\"m\"",
|
|
774
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
775
|
+
"fieldName": "size"
|
|
722
776
|
},
|
|
723
777
|
{
|
|
724
|
-
"name": "
|
|
778
|
+
"name": "href",
|
|
779
|
+
"type": {
|
|
780
|
+
"text": "string | undefined"
|
|
781
|
+
},
|
|
782
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
783
|
+
"fieldName": "href"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"name": "download",
|
|
787
|
+
"type": {
|
|
788
|
+
"text": "boolean"
|
|
789
|
+
},
|
|
790
|
+
"default": "false",
|
|
791
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
792
|
+
"fieldName": "download"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "target",
|
|
796
|
+
"type": {
|
|
797
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
798
|
+
},
|
|
799
|
+
"default": "\"_self\"",
|
|
800
|
+
"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.",
|
|
801
|
+
"fieldName": "target"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"name": "expand",
|
|
805
|
+
"type": {
|
|
806
|
+
"text": "boolean"
|
|
807
|
+
},
|
|
808
|
+
"default": "false",
|
|
809
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
810
|
+
"fieldName": "expand"
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"name": "disabled",
|
|
814
|
+
"type": {
|
|
815
|
+
"text": "boolean"
|
|
816
|
+
},
|
|
817
|
+
"default": "false",
|
|
818
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
819
|
+
"fieldName": "disabled",
|
|
820
|
+
"inheritedFrom": {
|
|
821
|
+
"name": "InputMixin",
|
|
822
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"name": "name",
|
|
827
|
+
"type": {
|
|
828
|
+
"text": "string | undefined"
|
|
829
|
+
},
|
|
830
|
+
"description": "The name of the form component.",
|
|
831
|
+
"fieldName": "name",
|
|
832
|
+
"inheritedFrom": {
|
|
833
|
+
"name": "InputMixin",
|
|
834
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"name": "value",
|
|
725
839
|
"type": {
|
|
726
840
|
"text": "string"
|
|
727
841
|
},
|
|
728
842
|
"default": "\"\"",
|
|
729
|
-
"description": "
|
|
730
|
-
"fieldName": "
|
|
843
|
+
"description": "The value of the form component.",
|
|
844
|
+
"fieldName": "value",
|
|
845
|
+
"inheritedFrom": {
|
|
846
|
+
"name": "InputMixin",
|
|
847
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
],
|
|
851
|
+
"mixins": [
|
|
852
|
+
{
|
|
853
|
+
"name": "InputMixin",
|
|
854
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"name": "FocusableMixin",
|
|
858
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
731
859
|
}
|
|
732
860
|
],
|
|
733
861
|
"superclass": {
|
|
@@ -735,8 +863,8 @@
|
|
|
735
863
|
"package": "lit"
|
|
736
864
|
},
|
|
737
865
|
"status": "ready",
|
|
738
|
-
"category": "
|
|
739
|
-
"tagName": "nord-
|
|
866
|
+
"category": "action",
|
|
867
|
+
"tagName": "nord-button",
|
|
740
868
|
"customElement": true
|
|
741
869
|
}
|
|
742
870
|
],
|
|
@@ -745,607 +873,479 @@
|
|
|
745
873
|
"kind": "js",
|
|
746
874
|
"name": "default",
|
|
747
875
|
"declaration": {
|
|
748
|
-
"name": "
|
|
749
|
-
"module": "src/
|
|
876
|
+
"name": "Button",
|
|
877
|
+
"module": "src/button/Button.ts"
|
|
750
878
|
}
|
|
751
879
|
},
|
|
752
880
|
{
|
|
753
881
|
"kind": "custom-element-definition",
|
|
754
|
-
"name": "nord-
|
|
882
|
+
"name": "nord-button",
|
|
755
883
|
"declaration": {
|
|
756
|
-
"name": "
|
|
757
|
-
"module": "src/
|
|
884
|
+
"name": "Button",
|
|
885
|
+
"module": "src/button/Button.ts"
|
|
758
886
|
}
|
|
759
887
|
}
|
|
760
888
|
],
|
|
761
|
-
"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
|
|
889
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
|
|
762
890
|
},
|
|
763
891
|
{
|
|
764
892
|
"kind": "javascript-module",
|
|
765
|
-
"path": "src/calendar/
|
|
893
|
+
"path": "src/calendar/Calendar.ts",
|
|
766
894
|
"declarations": [
|
|
767
895
|
{
|
|
768
896
|
"kind": "class",
|
|
769
|
-
"description": "",
|
|
770
|
-
"name": "
|
|
897
|
+
"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.",
|
|
898
|
+
"name": "Calendar",
|
|
771
899
|
"members": [
|
|
772
900
|
{
|
|
773
901
|
"kind": "field",
|
|
774
|
-
"name": "
|
|
902
|
+
"name": "dialogLabelId",
|
|
775
903
|
"type": {
|
|
776
904
|
"text": "string"
|
|
777
905
|
},
|
|
778
|
-
"
|
|
779
|
-
"default": "\"
|
|
906
|
+
"privacy": "private",
|
|
907
|
+
"default": "\"dialog-header\""
|
|
780
908
|
},
|
|
781
909
|
{
|
|
782
910
|
"kind": "field",
|
|
783
|
-
"name": "
|
|
911
|
+
"name": "monthSelectNode",
|
|
784
912
|
"type": {
|
|
785
|
-
"text": "
|
|
913
|
+
"text": "HTMLElement"
|
|
786
914
|
},
|
|
787
|
-
"
|
|
788
|
-
}
|
|
789
|
-
],
|
|
790
|
-
"superclass": {
|
|
791
|
-
"name": "NordEvent",
|
|
792
|
-
"module": "/src/common/events.js"
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
],
|
|
796
|
-
"exports": [
|
|
797
|
-
{
|
|
798
|
-
"kind": "js",
|
|
799
|
-
"name": "DateSelectEvent",
|
|
800
|
-
"declaration": {
|
|
801
|
-
"name": "DateSelectEvent",
|
|
802
|
-
"module": "src/calendar/DateSelectEvent.ts"
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
],
|
|
806
|
-
"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"
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
"kind": "javascript-module",
|
|
810
|
-
"path": "src/calendar/calendar-localization.ts",
|
|
811
|
-
"declarations": [
|
|
812
|
-
{
|
|
813
|
-
"kind": "variable",
|
|
814
|
-
"name": "localization",
|
|
815
|
-
"type": {
|
|
816
|
-
"text": "CalendarLocalizedText"
|
|
817
|
-
},
|
|
818
|
-
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
|
|
819
|
-
}
|
|
820
|
-
],
|
|
821
|
-
"exports": [
|
|
822
|
-
{
|
|
823
|
-
"kind": "js",
|
|
824
|
-
"name": "default",
|
|
825
|
-
"declaration": {
|
|
826
|
-
"name": "localization",
|
|
827
|
-
"module": "src/calendar/calendar-localization.ts"
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
],
|
|
831
|
-
"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"
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
"kind": "javascript-module",
|
|
835
|
-
"path": "src/calendar/month-view.ts",
|
|
836
|
-
"declarations": [
|
|
837
|
-
{
|
|
838
|
-
"kind": "function",
|
|
839
|
-
"name": "dayView",
|
|
840
|
-
"parameters": [
|
|
841
|
-
{
|
|
842
|
-
"name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
|
|
843
|
-
"type": {
|
|
844
|
-
"text": "DatePickerDayProps"
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
]
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
"kind": "function",
|
|
851
|
-
"name": "monthView",
|
|
852
|
-
"parameters": [
|
|
853
|
-
{
|
|
854
|
-
"name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
|
|
855
|
-
"type": {
|
|
856
|
-
"text": "MonthViewArgs"
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
]
|
|
860
|
-
}
|
|
861
|
-
],
|
|
862
|
-
"exports": [
|
|
863
|
-
{
|
|
864
|
-
"kind": "js",
|
|
865
|
-
"name": "dayView",
|
|
866
|
-
"declaration": {
|
|
867
|
-
"name": "dayView",
|
|
868
|
-
"module": "src/calendar/month-view.ts"
|
|
869
|
-
}
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
"kind": "js",
|
|
873
|
-
"name": "monthView",
|
|
874
|
-
"declaration": {
|
|
875
|
-
"name": "monthView",
|
|
876
|
-
"module": "src/calendar/month-view.ts"
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
],
|
|
880
|
-
"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"
|
|
881
|
-
},
|
|
882
|
-
{
|
|
883
|
-
"kind": "javascript-module",
|
|
884
|
-
"path": "src/banner/Banner.ts",
|
|
885
|
-
"declarations": [
|
|
886
|
-
{
|
|
887
|
-
"kind": "class",
|
|
888
|
-
"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.",
|
|
889
|
-
"name": "Banner",
|
|
890
|
-
"slots": [
|
|
891
|
-
{
|
|
892
|
-
"description": "default slot",
|
|
893
|
-
"name": ""
|
|
894
|
-
}
|
|
895
|
-
],
|
|
896
|
-
"members": [
|
|
915
|
+
"privacy": "private"
|
|
916
|
+
},
|
|
897
917
|
{
|
|
898
918
|
"kind": "field",
|
|
899
|
-
"name": "
|
|
900
|
-
"type": {
|
|
901
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
902
|
-
},
|
|
903
|
-
"default": "\"info\"",
|
|
904
|
-
"description": "The style variant of the banner.",
|
|
905
|
-
"attribute": "variant",
|
|
906
|
-
"reflects": true
|
|
907
|
-
}
|
|
908
|
-
],
|
|
909
|
-
"attributes": [
|
|
910
|
-
{
|
|
911
|
-
"name": "variant",
|
|
919
|
+
"name": "focusedDayNode",
|
|
912
920
|
"type": {
|
|
913
|
-
"text": "
|
|
921
|
+
"text": "HTMLButtonElement"
|
|
914
922
|
},
|
|
915
|
-
"
|
|
916
|
-
"description": "The style variant of the banner.",
|
|
917
|
-
"fieldName": "variant"
|
|
918
|
-
}
|
|
919
|
-
],
|
|
920
|
-
"superclass": {
|
|
921
|
-
"name": "LitElement",
|
|
922
|
-
"package": "lit"
|
|
923
|
-
},
|
|
924
|
-
"status": "new",
|
|
925
|
-
"category": "feedback",
|
|
926
|
-
"tagName": "nord-banner",
|
|
927
|
-
"customElement": true
|
|
928
|
-
}
|
|
929
|
-
],
|
|
930
|
-
"exports": [
|
|
931
|
-
{
|
|
932
|
-
"kind": "js",
|
|
933
|
-
"name": "default",
|
|
934
|
-
"declaration": {
|
|
935
|
-
"name": "Banner",
|
|
936
|
-
"module": "src/banner/Banner.ts"
|
|
937
|
-
}
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
"kind": "custom-element-definition",
|
|
941
|
-
"name": "nord-banner",
|
|
942
|
-
"declaration": {
|
|
943
|
-
"name": "Banner",
|
|
944
|
-
"module": "src/banner/Banner.ts"
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
],
|
|
948
|
-
"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"
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
"kind": "javascript-module",
|
|
952
|
-
"path": "src/button/Button.ts",
|
|
953
|
-
"declarations": [
|
|
954
|
-
{
|
|
955
|
-
"kind": "class",
|
|
956
|
-
"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.",
|
|
957
|
-
"name": "Button",
|
|
958
|
-
"slots": [
|
|
959
|
-
{
|
|
960
|
-
"description": "The button content",
|
|
961
|
-
"name": ""
|
|
923
|
+
"privacy": "private"
|
|
962
924
|
},
|
|
963
925
|
{
|
|
964
|
-
"
|
|
965
|
-
"name": "
|
|
926
|
+
"kind": "field",
|
|
927
|
+
"name": "direction",
|
|
928
|
+
"privacy": "private",
|
|
929
|
+
"default": "new DirectionController(this)"
|
|
966
930
|
},
|
|
967
931
|
{
|
|
968
|
-
"
|
|
969
|
-
"name": "
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
932
|
+
"kind": "field",
|
|
933
|
+
"name": "swipe",
|
|
934
|
+
"privacy": "private",
|
|
935
|
+
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
936
|
+
},
|
|
973
937
|
{
|
|
974
938
|
"kind": "field",
|
|
975
|
-
"name": "
|
|
939
|
+
"name": "shortcuts",
|
|
976
940
|
"privacy": "private"
|
|
977
941
|
},
|
|
978
942
|
{
|
|
979
943
|
"kind": "field",
|
|
980
|
-
"name": "
|
|
944
|
+
"name": "dateFormatShort",
|
|
945
|
+
"type": {
|
|
946
|
+
"text": "Intl.DateTimeFormat"
|
|
947
|
+
},
|
|
981
948
|
"privacy": "private",
|
|
982
|
-
"
|
|
949
|
+
"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"
|
|
983
950
|
},
|
|
984
951
|
{
|
|
985
952
|
"kind": "field",
|
|
986
|
-
"name": "
|
|
953
|
+
"name": "localization",
|
|
987
954
|
"type": {
|
|
988
|
-
"text": "
|
|
955
|
+
"text": "CalendarLocalizedText"
|
|
989
956
|
},
|
|
990
|
-
"default": "
|
|
991
|
-
"description": "The style variant of the button.",
|
|
992
|
-
"attribute": "variant",
|
|
993
|
-
"reflects": true
|
|
957
|
+
"default": "localization"
|
|
994
958
|
},
|
|
995
959
|
{
|
|
996
960
|
"kind": "field",
|
|
997
|
-
"name": "
|
|
961
|
+
"name": "value",
|
|
998
962
|
"type": {
|
|
999
|
-
"text": "
|
|
963
|
+
"text": "string"
|
|
1000
964
|
},
|
|
1001
|
-
"default": "\"
|
|
1002
|
-
"description": "The
|
|
1003
|
-
"attribute": "
|
|
1004
|
-
"reflects": true
|
|
965
|
+
"default": "\"\"",
|
|
966
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
967
|
+
"attribute": "value"
|
|
1005
968
|
},
|
|
1006
969
|
{
|
|
1007
970
|
"kind": "field",
|
|
1008
|
-
"name": "
|
|
971
|
+
"name": "firstDayOfWeek",
|
|
1009
972
|
"type": {
|
|
1010
|
-
"text": "
|
|
973
|
+
"text": "DaysOfWeek"
|
|
1011
974
|
},
|
|
1012
|
-
"
|
|
1013
|
-
"
|
|
1014
|
-
"attribute": "size",
|
|
1015
|
-
"reflects": true
|
|
975
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
976
|
+
"attribute": "firstDayOfWeek"
|
|
1016
977
|
},
|
|
1017
978
|
{
|
|
1018
979
|
"kind": "field",
|
|
1019
|
-
"name": "
|
|
980
|
+
"name": "min",
|
|
1020
981
|
"type": {
|
|
1021
|
-
"text": "string
|
|
982
|
+
"text": "string"
|
|
1022
983
|
},
|
|
1023
|
-
"
|
|
1024
|
-
"
|
|
1025
|
-
"
|
|
984
|
+
"default": "\"\"",
|
|
985
|
+
"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.",
|
|
986
|
+
"attribute": "min"
|
|
1026
987
|
},
|
|
1027
988
|
{
|
|
1028
989
|
"kind": "field",
|
|
1029
|
-
"name": "
|
|
990
|
+
"name": "max",
|
|
1030
991
|
"type": {
|
|
1031
|
-
"text": "
|
|
992
|
+
"text": "string"
|
|
1032
993
|
},
|
|
1033
|
-
"default": "
|
|
1034
|
-
"description": "
|
|
1035
|
-
"attribute": "
|
|
994
|
+
"default": "\"\"",
|
|
995
|
+
"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.",
|
|
996
|
+
"attribute": "max"
|
|
1036
997
|
},
|
|
1037
998
|
{
|
|
1038
999
|
"kind": "field",
|
|
1039
|
-
"name": "
|
|
1000
|
+
"name": "isDateDisabled",
|
|
1040
1001
|
"type": {
|
|
1041
|
-
"text": "
|
|
1002
|
+
"text": "DateDisabledPredicate"
|
|
1042
1003
|
},
|
|
1043
|
-
"default": "
|
|
1044
|
-
"description": "
|
|
1045
|
-
"attribute": "target",
|
|
1046
|
-
"reflects": true
|
|
1004
|
+
"default": "isDateDisabled",
|
|
1005
|
+
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
1047
1006
|
},
|
|
1048
1007
|
{
|
|
1049
1008
|
"kind": "field",
|
|
1050
|
-
"name": "
|
|
1009
|
+
"name": "activeFocus",
|
|
1051
1010
|
"type": {
|
|
1052
1011
|
"text": "boolean"
|
|
1053
1012
|
},
|
|
1054
|
-
"
|
|
1055
|
-
"
|
|
1056
|
-
"attribute": "expand",
|
|
1057
|
-
"reflects": true
|
|
1013
|
+
"privacy": "private",
|
|
1014
|
+
"default": "false"
|
|
1058
1015
|
},
|
|
1059
1016
|
{
|
|
1060
|
-
"kind": "
|
|
1061
|
-
"name": "
|
|
1017
|
+
"kind": "field",
|
|
1018
|
+
"name": "focusedDay",
|
|
1062
1019
|
"privacy": "private",
|
|
1063
|
-
"
|
|
1064
|
-
{
|
|
1065
|
-
"name": "innards",
|
|
1066
|
-
"type": {
|
|
1067
|
-
"text": "TemplateResult"
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
],
|
|
1071
|
-
"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."
|
|
1020
|
+
"default": "new Date()"
|
|
1072
1021
|
},
|
|
1073
1022
|
{
|
|
1074
1023
|
"kind": "method",
|
|
1075
|
-
"name": "
|
|
1076
|
-
"privacy": "private",
|
|
1024
|
+
"name": "focus",
|
|
1077
1025
|
"parameters": [
|
|
1078
1026
|
{
|
|
1079
|
-
"name": "
|
|
1027
|
+
"name": "options",
|
|
1028
|
+
"optional": true,
|
|
1080
1029
|
"type": {
|
|
1081
|
-
"text": "
|
|
1030
|
+
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
1082
1031
|
}
|
|
1083
1032
|
}
|
|
1084
1033
|
]
|
|
1085
1034
|
},
|
|
1086
1035
|
{
|
|
1087
1036
|
"kind": "method",
|
|
1088
|
-
"name": "
|
|
1037
|
+
"name": "createDateFormatter",
|
|
1089
1038
|
"privacy": "private"
|
|
1090
1039
|
},
|
|
1091
1040
|
{
|
|
1092
1041
|
"kind": "field",
|
|
1093
|
-
"name": "
|
|
1042
|
+
"name": "handleDaySelect",
|
|
1094
1043
|
"privacy": "private"
|
|
1095
1044
|
},
|
|
1096
1045
|
{
|
|
1097
1046
|
"kind": "method",
|
|
1098
|
-
"name": "
|
|
1047
|
+
"name": "addDays",
|
|
1099
1048
|
"privacy": "private",
|
|
1100
1049
|
"parameters": [
|
|
1101
1050
|
{
|
|
1102
|
-
"name": "
|
|
1051
|
+
"name": "days",
|
|
1103
1052
|
"type": {
|
|
1104
|
-
"text": "
|
|
1053
|
+
"text": "number"
|
|
1105
1054
|
}
|
|
1106
1055
|
}
|
|
1107
1056
|
]
|
|
1108
1057
|
},
|
|
1109
1058
|
{
|
|
1110
|
-
"kind": "
|
|
1111
|
-
"name": "
|
|
1112
|
-
"
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1122
|
-
}
|
|
1059
|
+
"kind": "method",
|
|
1060
|
+
"name": "addMonths",
|
|
1061
|
+
"privacy": "private",
|
|
1062
|
+
"parameters": [
|
|
1063
|
+
{
|
|
1064
|
+
"name": "months",
|
|
1065
|
+
"type": {
|
|
1066
|
+
"text": "number"
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
]
|
|
1123
1070
|
},
|
|
1124
1071
|
{
|
|
1125
|
-
"kind": "
|
|
1126
|
-
"name": "
|
|
1127
|
-
"
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1072
|
+
"kind": "method",
|
|
1073
|
+
"name": "addYears",
|
|
1074
|
+
"privacy": "private",
|
|
1075
|
+
"parameters": [
|
|
1076
|
+
{
|
|
1077
|
+
"name": "years",
|
|
1078
|
+
"type": {
|
|
1079
|
+
"text": "number"
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
]
|
|
1136
1083
|
},
|
|
1137
1084
|
{
|
|
1138
|
-
"kind": "
|
|
1139
|
-
"name": "
|
|
1140
|
-
"
|
|
1141
|
-
"text": "string"
|
|
1142
|
-
},
|
|
1143
|
-
"default": "\"\"",
|
|
1144
|
-
"description": "The value of the form component.",
|
|
1145
|
-
"attribute": "value",
|
|
1146
|
-
"inheritedFrom": {
|
|
1147
|
-
"name": "InputMixin",
|
|
1148
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1149
|
-
}
|
|
1085
|
+
"kind": "method",
|
|
1086
|
+
"name": "startOfWeek",
|
|
1087
|
+
"privacy": "private"
|
|
1150
1088
|
},
|
|
1151
1089
|
{
|
|
1152
|
-
"kind": "
|
|
1153
|
-
"name": "
|
|
1154
|
-
"privacy": "
|
|
1155
|
-
"description": "Gets the form, if any, associated with the form element.",
|
|
1156
|
-
"inheritedFrom": {
|
|
1157
|
-
"name": "InputMixin",
|
|
1158
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1159
|
-
}
|
|
1090
|
+
"kind": "method",
|
|
1091
|
+
"name": "endOfWeek",
|
|
1092
|
+
"privacy": "private"
|
|
1160
1093
|
},
|
|
1161
1094
|
{
|
|
1162
|
-
"kind": "
|
|
1163
|
-
"name": "
|
|
1164
|
-
"privacy": "
|
|
1165
|
-
"
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1095
|
+
"kind": "method",
|
|
1096
|
+
"name": "setMonth",
|
|
1097
|
+
"privacy": "private",
|
|
1098
|
+
"parameters": [
|
|
1099
|
+
{
|
|
1100
|
+
"name": "month",
|
|
1101
|
+
"type": {
|
|
1102
|
+
"text": "number"
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
]
|
|
1169
1106
|
},
|
|
1170
1107
|
{
|
|
1171
1108
|
"kind": "method",
|
|
1172
|
-
"name": "
|
|
1109
|
+
"name": "setYear",
|
|
1110
|
+
"privacy": "private",
|
|
1173
1111
|
"parameters": [
|
|
1174
1112
|
{
|
|
1175
|
-
"name": "
|
|
1176
|
-
"optional": true,
|
|
1113
|
+
"name": "year",
|
|
1177
1114
|
"type": {
|
|
1178
|
-
"text": "
|
|
1179
|
-
}
|
|
1180
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1115
|
+
"text": "number"
|
|
1116
|
+
}
|
|
1181
1117
|
}
|
|
1182
|
-
]
|
|
1183
|
-
"description": "Programmatically move focus to the component.",
|
|
1184
|
-
"inheritedFrom": {
|
|
1185
|
-
"name": "FocusableMixin",
|
|
1186
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1187
|
-
}
|
|
1118
|
+
]
|
|
1188
1119
|
},
|
|
1189
1120
|
{
|
|
1190
1121
|
"kind": "method",
|
|
1191
|
-
"name": "
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1122
|
+
"name": "setFocusedDay",
|
|
1123
|
+
"privacy": "private",
|
|
1124
|
+
"parameters": [
|
|
1125
|
+
{
|
|
1126
|
+
"name": "day",
|
|
1127
|
+
"type": {
|
|
1128
|
+
"text": "Date"
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
]
|
|
1197
1132
|
},
|
|
1198
1133
|
{
|
|
1199
|
-
"kind": "
|
|
1200
|
-
"name": "
|
|
1201
|
-
"
|
|
1202
|
-
|
|
1203
|
-
"name": "FocusableMixin",
|
|
1204
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
],
|
|
1208
|
-
"attributes": [
|
|
1134
|
+
"kind": "field",
|
|
1135
|
+
"name": "handleMonthSelect",
|
|
1136
|
+
"privacy": "private"
|
|
1137
|
+
},
|
|
1209
1138
|
{
|
|
1210
|
-
"
|
|
1211
|
-
"
|
|
1212
|
-
|
|
1213
|
-
},
|
|
1214
|
-
"default": "\"default\"",
|
|
1215
|
-
"description": "The style variant of the button.",
|
|
1216
|
-
"fieldName": "variant"
|
|
1139
|
+
"kind": "field",
|
|
1140
|
+
"name": "handleYearSelect",
|
|
1141
|
+
"privacy": "private"
|
|
1217
1142
|
},
|
|
1218
1143
|
{
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1221
|
-
|
|
1222
|
-
},
|
|
1223
|
-
"default": "\"submit\"",
|
|
1224
|
-
"description": "The type of the button.",
|
|
1225
|
-
"fieldName": "type"
|
|
1144
|
+
"kind": "field",
|
|
1145
|
+
"name": "handleNextMonthClick",
|
|
1146
|
+
"privacy": "private"
|
|
1226
1147
|
},
|
|
1227
1148
|
{
|
|
1228
|
-
"
|
|
1229
|
-
"
|
|
1230
|
-
|
|
1231
|
-
},
|
|
1232
|
-
"default": "\"m\"",
|
|
1233
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1234
|
-
"fieldName": "size"
|
|
1149
|
+
"kind": "field",
|
|
1150
|
+
"name": "handlePreviousMonthClick",
|
|
1151
|
+
"privacy": "private"
|
|
1235
1152
|
},
|
|
1236
1153
|
{
|
|
1237
|
-
"
|
|
1238
|
-
"
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1242
|
-
"fieldName": "href"
|
|
1154
|
+
"kind": "field",
|
|
1155
|
+
"name": "enableActiveFocus",
|
|
1156
|
+
"privacy": "private"
|
|
1243
1157
|
},
|
|
1244
1158
|
{
|
|
1245
|
-
"
|
|
1159
|
+
"kind": "field",
|
|
1160
|
+
"name": "disableActiveFocus",
|
|
1161
|
+
"privacy": "private"
|
|
1162
|
+
}
|
|
1163
|
+
],
|
|
1164
|
+
"attributes": [
|
|
1165
|
+
{
|
|
1166
|
+
"name": "value",
|
|
1246
1167
|
"type": {
|
|
1247
|
-
"text": "
|
|
1168
|
+
"text": "string"
|
|
1248
1169
|
},
|
|
1249
|
-
"default": "
|
|
1250
|
-
"description": "
|
|
1251
|
-
"fieldName": "
|
|
1170
|
+
"default": "\"\"",
|
|
1171
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1172
|
+
"fieldName": "value"
|
|
1252
1173
|
},
|
|
1253
1174
|
{
|
|
1254
|
-
"name": "
|
|
1175
|
+
"name": "firstDayOfWeek",
|
|
1255
1176
|
"type": {
|
|
1256
|
-
"text": "
|
|
1177
|
+
"text": "DaysOfWeek"
|
|
1257
1178
|
},
|
|
1258
|
-
"
|
|
1259
|
-
"
|
|
1260
|
-
"fieldName": "target"
|
|
1179
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1180
|
+
"fieldName": "firstDayOfWeek"
|
|
1261
1181
|
},
|
|
1262
1182
|
{
|
|
1263
|
-
"name": "
|
|
1183
|
+
"name": "min",
|
|
1264
1184
|
"type": {
|
|
1265
|
-
"text": "
|
|
1185
|
+
"text": "string"
|
|
1266
1186
|
},
|
|
1267
|
-
"default": "
|
|
1268
|
-
"description": "
|
|
1269
|
-
"fieldName": "
|
|
1187
|
+
"default": "\"\"",
|
|
1188
|
+
"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.",
|
|
1189
|
+
"fieldName": "min"
|
|
1270
1190
|
},
|
|
1271
1191
|
{
|
|
1272
|
-
"name": "
|
|
1192
|
+
"name": "max",
|
|
1273
1193
|
"type": {
|
|
1274
|
-
"text": "
|
|
1194
|
+
"text": "string"
|
|
1275
1195
|
},
|
|
1276
|
-
"default": "
|
|
1277
|
-
"description": "
|
|
1278
|
-
"fieldName": "
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1196
|
+
"default": "\"\"",
|
|
1197
|
+
"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.",
|
|
1198
|
+
"fieldName": "max"
|
|
1199
|
+
}
|
|
1200
|
+
],
|
|
1201
|
+
"superclass": {
|
|
1202
|
+
"name": "LitElement",
|
|
1203
|
+
"package": "lit"
|
|
1204
|
+
},
|
|
1205
|
+
"status": "ready",
|
|
1206
|
+
"category": "list",
|
|
1207
|
+
"tagName": "nord-calendar",
|
|
1208
|
+
"customElement": true
|
|
1209
|
+
}
|
|
1210
|
+
],
|
|
1211
|
+
"exports": [
|
|
1212
|
+
{
|
|
1213
|
+
"kind": "js",
|
|
1214
|
+
"name": "default",
|
|
1215
|
+
"declaration": {
|
|
1216
|
+
"name": "Calendar",
|
|
1217
|
+
"module": "src/calendar/Calendar.ts"
|
|
1218
|
+
}
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"kind": "custom-element-definition",
|
|
1222
|
+
"name": "nord-calendar",
|
|
1223
|
+
"declaration": {
|
|
1224
|
+
"name": "Calendar",
|
|
1225
|
+
"module": "src/calendar/Calendar.ts"
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
],
|
|
1229
|
+
"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"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"kind": "javascript-module",
|
|
1233
|
+
"path": "src/calendar/DateSelectEvent.ts",
|
|
1234
|
+
"declarations": [
|
|
1235
|
+
{
|
|
1236
|
+
"kind": "class",
|
|
1237
|
+
"description": "",
|
|
1238
|
+
"name": "DateSelectEvent",
|
|
1239
|
+
"members": [
|
|
1284
1240
|
{
|
|
1285
|
-
"
|
|
1241
|
+
"kind": "field",
|
|
1242
|
+
"name": "eventName",
|
|
1286
1243
|
"type": {
|
|
1287
|
-
"text": "string
|
|
1244
|
+
"text": "string"
|
|
1288
1245
|
},
|
|
1289
|
-
"
|
|
1290
|
-
"
|
|
1291
|
-
"inheritedFrom": {
|
|
1292
|
-
"name": "InputMixin",
|
|
1293
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1294
|
-
}
|
|
1246
|
+
"static": true,
|
|
1247
|
+
"default": "\"nord-select\""
|
|
1295
1248
|
},
|
|
1296
1249
|
{
|
|
1297
|
-
"
|
|
1250
|
+
"kind": "field",
|
|
1251
|
+
"name": "date",
|
|
1298
1252
|
"type": {
|
|
1299
|
-
"text": "
|
|
1253
|
+
"text": "Date"
|
|
1300
1254
|
},
|
|
1301
|
-
"default": "
|
|
1302
|
-
"description": "The value of the form component.",
|
|
1303
|
-
"fieldName": "value",
|
|
1304
|
-
"inheritedFrom": {
|
|
1305
|
-
"name": "InputMixin",
|
|
1306
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1307
|
-
}
|
|
1255
|
+
"default": "date"
|
|
1308
1256
|
}
|
|
1309
1257
|
],
|
|
1310
|
-
"
|
|
1258
|
+
"superclass": {
|
|
1259
|
+
"name": "NordEvent",
|
|
1260
|
+
"module": "/src/common/events.js"
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
],
|
|
1264
|
+
"exports": [
|
|
1265
|
+
{
|
|
1266
|
+
"kind": "js",
|
|
1267
|
+
"name": "DateSelectEvent",
|
|
1268
|
+
"declaration": {
|
|
1269
|
+
"name": "DateSelectEvent",
|
|
1270
|
+
"module": "src/calendar/DateSelectEvent.ts"
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
],
|
|
1274
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"kind": "javascript-module",
|
|
1278
|
+
"path": "src/calendar/calendar-localization.ts",
|
|
1279
|
+
"declarations": [
|
|
1280
|
+
{
|
|
1281
|
+
"kind": "variable",
|
|
1282
|
+
"name": "localization",
|
|
1283
|
+
"type": {
|
|
1284
|
+
"text": "CalendarLocalizedText"
|
|
1285
|
+
},
|
|
1286
|
+
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
|
|
1287
|
+
}
|
|
1288
|
+
],
|
|
1289
|
+
"exports": [
|
|
1290
|
+
{
|
|
1291
|
+
"kind": "js",
|
|
1292
|
+
"name": "default",
|
|
1293
|
+
"declaration": {
|
|
1294
|
+
"name": "localization",
|
|
1295
|
+
"module": "src/calendar/calendar-localization.ts"
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
],
|
|
1299
|
+
"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"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"kind": "javascript-module",
|
|
1303
|
+
"path": "src/calendar/month-view.ts",
|
|
1304
|
+
"declarations": [
|
|
1305
|
+
{
|
|
1306
|
+
"kind": "function",
|
|
1307
|
+
"name": "dayView",
|
|
1308
|
+
"parameters": [
|
|
1311
1309
|
{
|
|
1312
|
-
"name": "
|
|
1313
|
-
"
|
|
1314
|
-
|
|
1310
|
+
"name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
|
|
1311
|
+
"type": {
|
|
1312
|
+
"text": "DatePickerDayProps"
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
]
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"kind": "function",
|
|
1319
|
+
"name": "monthView",
|
|
1320
|
+
"parameters": [
|
|
1315
1321
|
{
|
|
1316
|
-
"name": "
|
|
1317
|
-
"
|
|
1322
|
+
"name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
|
|
1323
|
+
"type": {
|
|
1324
|
+
"text": "MonthViewArgs"
|
|
1325
|
+
}
|
|
1318
1326
|
}
|
|
1319
|
-
]
|
|
1320
|
-
"superclass": {
|
|
1321
|
-
"name": "LitElement",
|
|
1322
|
-
"package": "lit"
|
|
1323
|
-
},
|
|
1324
|
-
"status": "ready",
|
|
1325
|
-
"category": "action",
|
|
1326
|
-
"tagName": "nord-button",
|
|
1327
|
-
"customElement": true
|
|
1327
|
+
]
|
|
1328
1328
|
}
|
|
1329
1329
|
],
|
|
1330
1330
|
"exports": [
|
|
1331
1331
|
{
|
|
1332
1332
|
"kind": "js",
|
|
1333
|
-
"name": "
|
|
1333
|
+
"name": "dayView",
|
|
1334
1334
|
"declaration": {
|
|
1335
|
-
"name": "
|
|
1336
|
-
"module": "src/
|
|
1335
|
+
"name": "dayView",
|
|
1336
|
+
"module": "src/calendar/month-view.ts"
|
|
1337
1337
|
}
|
|
1338
1338
|
},
|
|
1339
1339
|
{
|
|
1340
|
-
"kind": "
|
|
1341
|
-
"name": "
|
|
1340
|
+
"kind": "js",
|
|
1341
|
+
"name": "monthView",
|
|
1342
1342
|
"declaration": {
|
|
1343
|
-
"name": "
|
|
1344
|
-
"module": "src/
|
|
1343
|
+
"name": "monthView",
|
|
1344
|
+
"module": "src/calendar/month-view.ts"
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
1347
|
],
|
|
1348
|
-
"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
|
|
1348
|
+
"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"
|
|
1349
1349
|
},
|
|
1350
1350
|
{
|
|
1351
1351
|
"kind": "javascript-module",
|
|
@@ -7550,6 +7550,16 @@
|
|
|
7550
7550
|
"description": "How to align the child items inside the stack.",
|
|
7551
7551
|
"attribute": "align-items",
|
|
7552
7552
|
"reflects": true
|
|
7553
|
+
},
|
|
7554
|
+
{
|
|
7555
|
+
"kind": "field",
|
|
7556
|
+
"name": "justifyContent",
|
|
7557
|
+
"type": {
|
|
7558
|
+
"text": "\"center\" | \"start\" | \"end\" | undefined"
|
|
7559
|
+
},
|
|
7560
|
+
"description": "How to justify the child items inside the stack.",
|
|
7561
|
+
"attribute": "justify-content",
|
|
7562
|
+
"reflects": true
|
|
7553
7563
|
}
|
|
7554
7564
|
],
|
|
7555
7565
|
"attributes": [
|
|
@@ -7578,6 +7588,14 @@
|
|
|
7578
7588
|
},
|
|
7579
7589
|
"description": "How to align the child items inside the stack.",
|
|
7580
7590
|
"fieldName": "alignItems"
|
|
7591
|
+
},
|
|
7592
|
+
{
|
|
7593
|
+
"name": "justify-content",
|
|
7594
|
+
"type": {
|
|
7595
|
+
"text": "\"center\" | \"start\" | \"end\" | undefined"
|
|
7596
|
+
},
|
|
7597
|
+
"description": "How to justify the child items inside the stack.",
|
|
7598
|
+
"fieldName": "justifyContent"
|
|
7581
7599
|
}
|
|
7582
7600
|
],
|
|
7583
7601
|
"superclass": {
|
|
@@ -8481,80 +8499,256 @@
|
|
|
8481
8499
|
"fieldName": "delay"
|
|
8482
8500
|
}
|
|
8483
8501
|
],
|
|
8484
|
-
"superclass": {
|
|
8485
|
-
"name": "LitElement",
|
|
8486
|
-
"package": "lit"
|
|
8487
|
-
},
|
|
8488
|
-
"status": "ready",
|
|
8489
|
-
"category": "overlay",
|
|
8490
|
-
"tagName": "nord-tooltip",
|
|
8491
|
-
"customElement": true
|
|
8502
|
+
"superclass": {
|
|
8503
|
+
"name": "LitElement",
|
|
8504
|
+
"package": "lit"
|
|
8505
|
+
},
|
|
8506
|
+
"status": "ready",
|
|
8507
|
+
"category": "overlay",
|
|
8508
|
+
"tagName": "nord-tooltip",
|
|
8509
|
+
"customElement": true
|
|
8510
|
+
}
|
|
8511
|
+
],
|
|
8512
|
+
"exports": [
|
|
8513
|
+
{
|
|
8514
|
+
"kind": "js",
|
|
8515
|
+
"name": "default",
|
|
8516
|
+
"declaration": {
|
|
8517
|
+
"name": "Tooltip",
|
|
8518
|
+
"module": "src/tooltip/Tooltip.ts"
|
|
8519
|
+
}
|
|
8520
|
+
},
|
|
8521
|
+
{
|
|
8522
|
+
"kind": "custom-element-definition",
|
|
8523
|
+
"name": "nord-tooltip",
|
|
8524
|
+
"declaration": {
|
|
8525
|
+
"name": "Tooltip",
|
|
8526
|
+
"module": "src/tooltip/Tooltip.ts"
|
|
8527
|
+
}
|
|
8528
|
+
}
|
|
8529
|
+
],
|
|
8530
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessability.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n-------\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n-------\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n"
|
|
8531
|
+
},
|
|
8532
|
+
{
|
|
8533
|
+
"kind": "javascript-module",
|
|
8534
|
+
"path": "src/visually-hidden/VisuallyHidden.ts",
|
|
8535
|
+
"declarations": [
|
|
8536
|
+
{
|
|
8537
|
+
"kind": "class",
|
|
8538
|
+
"description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
|
|
8539
|
+
"name": "VisuallyHidden",
|
|
8540
|
+
"slots": [
|
|
8541
|
+
{
|
|
8542
|
+
"description": "The visually hidden content.",
|
|
8543
|
+
"name": ""
|
|
8544
|
+
}
|
|
8545
|
+
],
|
|
8546
|
+
"members": [],
|
|
8547
|
+
"superclass": {
|
|
8548
|
+
"name": "LitElement",
|
|
8549
|
+
"package": "lit"
|
|
8550
|
+
},
|
|
8551
|
+
"status": "ready",
|
|
8552
|
+
"category": "text",
|
|
8553
|
+
"tagName": "nord-visually-hidden",
|
|
8554
|
+
"customElement": true
|
|
8555
|
+
}
|
|
8556
|
+
],
|
|
8557
|
+
"exports": [
|
|
8558
|
+
{
|
|
8559
|
+
"kind": "js",
|
|
8560
|
+
"name": "default",
|
|
8561
|
+
"declaration": {
|
|
8562
|
+
"name": "VisuallyHidden",
|
|
8563
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
8564
|
+
}
|
|
8565
|
+
},
|
|
8566
|
+
{
|
|
8567
|
+
"kind": "custom-element-definition",
|
|
8568
|
+
"name": "nord-visually-hidden",
|
|
8569
|
+
"declaration": {
|
|
8570
|
+
"name": "VisuallyHidden",
|
|
8571
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
],
|
|
8575
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
8576
|
+
},
|
|
8577
|
+
{
|
|
8578
|
+
"kind": "javascript-module",
|
|
8579
|
+
"path": "src/common/directives/cond.ts",
|
|
8580
|
+
"declarations": [
|
|
8581
|
+
{
|
|
8582
|
+
"kind": "variable",
|
|
8583
|
+
"name": "cond"
|
|
8584
|
+
}
|
|
8585
|
+
],
|
|
8586
|
+
"exports": [
|
|
8587
|
+
{
|
|
8588
|
+
"kind": "js",
|
|
8589
|
+
"name": "cond",
|
|
8590
|
+
"declaration": {
|
|
8591
|
+
"name": "cond",
|
|
8592
|
+
"module": "src/common/directives/cond.ts"
|
|
8593
|
+
}
|
|
8594
|
+
}
|
|
8595
|
+
]
|
|
8596
|
+
},
|
|
8597
|
+
{
|
|
8598
|
+
"kind": "javascript-module",
|
|
8599
|
+
"path": "src/common/directives/wrapIf.ts",
|
|
8600
|
+
"declarations": [
|
|
8601
|
+
{
|
|
8602
|
+
"kind": "function",
|
|
8603
|
+
"name": "wrapIf",
|
|
8604
|
+
"return": {
|
|
8605
|
+
"type": {
|
|
8606
|
+
"text": "TInner"
|
|
8607
|
+
}
|
|
8608
|
+
},
|
|
8609
|
+
"parameters": [
|
|
8610
|
+
{
|
|
8611
|
+
"name": "condition",
|
|
8612
|
+
"type": {
|
|
8613
|
+
"text": "false"
|
|
8614
|
+
}
|
|
8615
|
+
},
|
|
8616
|
+
{
|
|
8617
|
+
"name": "inner",
|
|
8618
|
+
"type": {
|
|
8619
|
+
"text": "() => TInner"
|
|
8620
|
+
}
|
|
8621
|
+
},
|
|
8622
|
+
{
|
|
8623
|
+
"name": "wrapper",
|
|
8624
|
+
"type": {
|
|
8625
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8626
|
+
}
|
|
8627
|
+
}
|
|
8628
|
+
]
|
|
8629
|
+
},
|
|
8630
|
+
{
|
|
8631
|
+
"kind": "function",
|
|
8632
|
+
"name": "wrapIf",
|
|
8633
|
+
"return": {
|
|
8634
|
+
"type": {
|
|
8635
|
+
"text": "TWrapper"
|
|
8636
|
+
}
|
|
8637
|
+
},
|
|
8638
|
+
"parameters": [
|
|
8639
|
+
{
|
|
8640
|
+
"name": "condition",
|
|
8641
|
+
"type": {
|
|
8642
|
+
"text": "true"
|
|
8643
|
+
}
|
|
8644
|
+
},
|
|
8645
|
+
{
|
|
8646
|
+
"name": "inner",
|
|
8647
|
+
"type": {
|
|
8648
|
+
"text": "() => TInner"
|
|
8649
|
+
}
|
|
8650
|
+
},
|
|
8651
|
+
{
|
|
8652
|
+
"name": "wrapper",
|
|
8653
|
+
"type": {
|
|
8654
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8655
|
+
}
|
|
8656
|
+
}
|
|
8657
|
+
]
|
|
8658
|
+
},
|
|
8659
|
+
{
|
|
8660
|
+
"kind": "function",
|
|
8661
|
+
"name": "wrapIf",
|
|
8662
|
+
"return": {
|
|
8663
|
+
"type": {
|
|
8664
|
+
"text": "TInner | TWrapper"
|
|
8665
|
+
}
|
|
8666
|
+
},
|
|
8667
|
+
"parameters": [
|
|
8668
|
+
{
|
|
8669
|
+
"name": "condition",
|
|
8670
|
+
"type": {
|
|
8671
|
+
"text": "unknown"
|
|
8672
|
+
}
|
|
8673
|
+
},
|
|
8674
|
+
{
|
|
8675
|
+
"name": "inner",
|
|
8676
|
+
"type": {
|
|
8677
|
+
"text": "() => TInner"
|
|
8678
|
+
}
|
|
8679
|
+
},
|
|
8680
|
+
{
|
|
8681
|
+
"name": "wrapper",
|
|
8682
|
+
"type": {
|
|
8683
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
]
|
|
8687
|
+
},
|
|
8688
|
+
{
|
|
8689
|
+
"kind": "function",
|
|
8690
|
+
"name": "wrapIf",
|
|
8691
|
+
"parameters": [
|
|
8692
|
+
{
|
|
8693
|
+
"name": "condition",
|
|
8694
|
+
"type": {
|
|
8695
|
+
"text": "any"
|
|
8696
|
+
}
|
|
8697
|
+
},
|
|
8698
|
+
{
|
|
8699
|
+
"name": "inner",
|
|
8700
|
+
"type": {
|
|
8701
|
+
"text": "() => TInner"
|
|
8702
|
+
}
|
|
8703
|
+
},
|
|
8704
|
+
{
|
|
8705
|
+
"name": "wrapper",
|
|
8706
|
+
"type": {
|
|
8707
|
+
"text": "(innards: TInner) => TWrapper"
|
|
8708
|
+
}
|
|
8709
|
+
}
|
|
8710
|
+
],
|
|
8711
|
+
"return": {
|
|
8712
|
+
"type": {
|
|
8713
|
+
"text": ""
|
|
8714
|
+
}
|
|
8715
|
+
}
|
|
8492
8716
|
}
|
|
8493
8717
|
],
|
|
8494
8718
|
"exports": [
|
|
8495
8719
|
{
|
|
8496
8720
|
"kind": "js",
|
|
8497
|
-
"name": "
|
|
8721
|
+
"name": "wrapIf",
|
|
8498
8722
|
"declaration": {
|
|
8499
|
-
"name": "
|
|
8500
|
-
"module": "src/
|
|
8723
|
+
"name": "wrapIf",
|
|
8724
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8501
8725
|
}
|
|
8502
8726
|
},
|
|
8503
8727
|
{
|
|
8504
|
-
"kind": "
|
|
8505
|
-
"name": "
|
|
8728
|
+
"kind": "js",
|
|
8729
|
+
"name": "wrapIf",
|
|
8506
8730
|
"declaration": {
|
|
8507
|
-
"name": "
|
|
8508
|
-
"module": "src/
|
|
8731
|
+
"name": "wrapIf",
|
|
8732
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8509
8733
|
}
|
|
8510
|
-
}
|
|
8511
|
-
],
|
|
8512
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessability.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n-------\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n-------\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n"
|
|
8513
|
-
},
|
|
8514
|
-
{
|
|
8515
|
-
"kind": "javascript-module",
|
|
8516
|
-
"path": "src/visually-hidden/VisuallyHidden.ts",
|
|
8517
|
-
"declarations": [
|
|
8518
|
-
{
|
|
8519
|
-
"kind": "class",
|
|
8520
|
-
"description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
|
|
8521
|
-
"name": "VisuallyHidden",
|
|
8522
|
-
"slots": [
|
|
8523
|
-
{
|
|
8524
|
-
"description": "The visually hidden content.",
|
|
8525
|
-
"name": ""
|
|
8526
|
-
}
|
|
8527
|
-
],
|
|
8528
|
-
"members": [],
|
|
8529
|
-
"superclass": {
|
|
8530
|
-
"name": "LitElement",
|
|
8531
|
-
"package": "lit"
|
|
8532
|
-
},
|
|
8533
|
-
"status": "ready",
|
|
8534
|
-
"category": "text",
|
|
8535
|
-
"tagName": "nord-visually-hidden",
|
|
8536
|
-
"customElement": true
|
|
8537
|
-
}
|
|
8538
|
-
],
|
|
8539
|
-
"exports": [
|
|
8734
|
+
},
|
|
8540
8735
|
{
|
|
8541
8736
|
"kind": "js",
|
|
8542
|
-
"name": "
|
|
8737
|
+
"name": "wrapIf",
|
|
8543
8738
|
"declaration": {
|
|
8544
|
-
"name": "
|
|
8545
|
-
"module": "src/
|
|
8739
|
+
"name": "wrapIf",
|
|
8740
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8546
8741
|
}
|
|
8547
8742
|
},
|
|
8548
8743
|
{
|
|
8549
|
-
"kind": "
|
|
8550
|
-
"name": "
|
|
8744
|
+
"kind": "js",
|
|
8745
|
+
"name": "wrapIf",
|
|
8551
8746
|
"declaration": {
|
|
8552
|
-
"name": "
|
|
8553
|
-
"module": "src/
|
|
8747
|
+
"name": "wrapIf",
|
|
8748
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8554
8749
|
}
|
|
8555
8750
|
}
|
|
8556
|
-
]
|
|
8557
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
8751
|
+
]
|
|
8558
8752
|
},
|
|
8559
8753
|
{
|
|
8560
8754
|
"kind": "javascript-module",
|
|
@@ -9270,182 +9464,6 @@
|
|
|
9270
9464
|
}
|
|
9271
9465
|
]
|
|
9272
9466
|
},
|
|
9273
|
-
{
|
|
9274
|
-
"kind": "javascript-module",
|
|
9275
|
-
"path": "src/common/directives/cond.ts",
|
|
9276
|
-
"declarations": [
|
|
9277
|
-
{
|
|
9278
|
-
"kind": "variable",
|
|
9279
|
-
"name": "cond"
|
|
9280
|
-
}
|
|
9281
|
-
],
|
|
9282
|
-
"exports": [
|
|
9283
|
-
{
|
|
9284
|
-
"kind": "js",
|
|
9285
|
-
"name": "cond",
|
|
9286
|
-
"declaration": {
|
|
9287
|
-
"name": "cond",
|
|
9288
|
-
"module": "src/common/directives/cond.ts"
|
|
9289
|
-
}
|
|
9290
|
-
}
|
|
9291
|
-
]
|
|
9292
|
-
},
|
|
9293
|
-
{
|
|
9294
|
-
"kind": "javascript-module",
|
|
9295
|
-
"path": "src/common/directives/wrapIf.ts",
|
|
9296
|
-
"declarations": [
|
|
9297
|
-
{
|
|
9298
|
-
"kind": "function",
|
|
9299
|
-
"name": "wrapIf",
|
|
9300
|
-
"return": {
|
|
9301
|
-
"type": {
|
|
9302
|
-
"text": "TInner"
|
|
9303
|
-
}
|
|
9304
|
-
},
|
|
9305
|
-
"parameters": [
|
|
9306
|
-
{
|
|
9307
|
-
"name": "condition",
|
|
9308
|
-
"type": {
|
|
9309
|
-
"text": "false"
|
|
9310
|
-
}
|
|
9311
|
-
},
|
|
9312
|
-
{
|
|
9313
|
-
"name": "inner",
|
|
9314
|
-
"type": {
|
|
9315
|
-
"text": "() => TInner"
|
|
9316
|
-
}
|
|
9317
|
-
},
|
|
9318
|
-
{
|
|
9319
|
-
"name": "wrapper",
|
|
9320
|
-
"type": {
|
|
9321
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9322
|
-
}
|
|
9323
|
-
}
|
|
9324
|
-
]
|
|
9325
|
-
},
|
|
9326
|
-
{
|
|
9327
|
-
"kind": "function",
|
|
9328
|
-
"name": "wrapIf",
|
|
9329
|
-
"return": {
|
|
9330
|
-
"type": {
|
|
9331
|
-
"text": "TWrapper"
|
|
9332
|
-
}
|
|
9333
|
-
},
|
|
9334
|
-
"parameters": [
|
|
9335
|
-
{
|
|
9336
|
-
"name": "condition",
|
|
9337
|
-
"type": {
|
|
9338
|
-
"text": "true"
|
|
9339
|
-
}
|
|
9340
|
-
},
|
|
9341
|
-
{
|
|
9342
|
-
"name": "inner",
|
|
9343
|
-
"type": {
|
|
9344
|
-
"text": "() => TInner"
|
|
9345
|
-
}
|
|
9346
|
-
},
|
|
9347
|
-
{
|
|
9348
|
-
"name": "wrapper",
|
|
9349
|
-
"type": {
|
|
9350
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9351
|
-
}
|
|
9352
|
-
}
|
|
9353
|
-
]
|
|
9354
|
-
},
|
|
9355
|
-
{
|
|
9356
|
-
"kind": "function",
|
|
9357
|
-
"name": "wrapIf",
|
|
9358
|
-
"return": {
|
|
9359
|
-
"type": {
|
|
9360
|
-
"text": "TInner | TWrapper"
|
|
9361
|
-
}
|
|
9362
|
-
},
|
|
9363
|
-
"parameters": [
|
|
9364
|
-
{
|
|
9365
|
-
"name": "condition",
|
|
9366
|
-
"type": {
|
|
9367
|
-
"text": "unknown"
|
|
9368
|
-
}
|
|
9369
|
-
},
|
|
9370
|
-
{
|
|
9371
|
-
"name": "inner",
|
|
9372
|
-
"type": {
|
|
9373
|
-
"text": "() => TInner"
|
|
9374
|
-
}
|
|
9375
|
-
},
|
|
9376
|
-
{
|
|
9377
|
-
"name": "wrapper",
|
|
9378
|
-
"type": {
|
|
9379
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9380
|
-
}
|
|
9381
|
-
}
|
|
9382
|
-
]
|
|
9383
|
-
},
|
|
9384
|
-
{
|
|
9385
|
-
"kind": "function",
|
|
9386
|
-
"name": "wrapIf",
|
|
9387
|
-
"parameters": [
|
|
9388
|
-
{
|
|
9389
|
-
"name": "condition",
|
|
9390
|
-
"type": {
|
|
9391
|
-
"text": "any"
|
|
9392
|
-
}
|
|
9393
|
-
},
|
|
9394
|
-
{
|
|
9395
|
-
"name": "inner",
|
|
9396
|
-
"type": {
|
|
9397
|
-
"text": "() => TInner"
|
|
9398
|
-
}
|
|
9399
|
-
},
|
|
9400
|
-
{
|
|
9401
|
-
"name": "wrapper",
|
|
9402
|
-
"type": {
|
|
9403
|
-
"text": "(innards: TInner) => TWrapper"
|
|
9404
|
-
}
|
|
9405
|
-
}
|
|
9406
|
-
],
|
|
9407
|
-
"return": {
|
|
9408
|
-
"type": {
|
|
9409
|
-
"text": ""
|
|
9410
|
-
}
|
|
9411
|
-
}
|
|
9412
|
-
}
|
|
9413
|
-
],
|
|
9414
|
-
"exports": [
|
|
9415
|
-
{
|
|
9416
|
-
"kind": "js",
|
|
9417
|
-
"name": "wrapIf",
|
|
9418
|
-
"declaration": {
|
|
9419
|
-
"name": "wrapIf",
|
|
9420
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9421
|
-
}
|
|
9422
|
-
},
|
|
9423
|
-
{
|
|
9424
|
-
"kind": "js",
|
|
9425
|
-
"name": "wrapIf",
|
|
9426
|
-
"declaration": {
|
|
9427
|
-
"name": "wrapIf",
|
|
9428
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9429
|
-
}
|
|
9430
|
-
},
|
|
9431
|
-
{
|
|
9432
|
-
"kind": "js",
|
|
9433
|
-
"name": "wrapIf",
|
|
9434
|
-
"declaration": {
|
|
9435
|
-
"name": "wrapIf",
|
|
9436
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9437
|
-
}
|
|
9438
|
-
},
|
|
9439
|
-
{
|
|
9440
|
-
"kind": "js",
|
|
9441
|
-
"name": "wrapIf",
|
|
9442
|
-
"declaration": {
|
|
9443
|
-
"name": "wrapIf",
|
|
9444
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9445
|
-
}
|
|
9446
|
-
}
|
|
9447
|
-
]
|
|
9448
|
-
},
|
|
9449
9467
|
{
|
|
9450
9468
|
"kind": "javascript-module",
|
|
9451
9469
|
"path": "src/common/mixins/DraftComponentMixin.ts",
|