@nordhealth/components 1.0.0-rc.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1135 -846
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/Calendar-d1632bb6.js +2 -0
- package/lib/Calendar-d1632bb6.js.map +1 -0
- package/lib/Calendar.js +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/{DirectionController-82794ee9.js → DirectionController-b267af23.js} +2 -2
- package/lib/DirectionController-b267af23.js.map +1 -0
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownGroup.js.map +1 -1
- package/lib/DropdownItem.js +1 -1
- package/lib/DropdownItem.js.map +1 -1
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/Icon.js +1 -1
- package/lib/Icon.js.map +1 -1
- package/lib/Input.js +1 -1
- package/lib/LocalizeController.js +2 -0
- package/lib/LocalizeController.js.map +1 -0
- package/lib/NavItem.js +1 -1
- package/lib/Popout.js +1 -1
- package/lib/Popout.js.map +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Spinner.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/{TextField-ece1c786.js → TextField-9bee8388.js} +2 -2
- package/lib/TextField-9bee8388.js.map +1 -0
- package/lib/Textarea.js +1 -1
- package/lib/bundle.js +7 -7
- package/lib/bundle.js.map +1 -1
- package/lib/{collection-f3631dc8.js → collection-800f5002.js} +2 -2
- package/lib/{collection-f3631dc8.js.map → collection-800f5002.js.map} +1 -1
- package/lib/date-adapter.js +1 -1
- package/lib/dates-9272b910.js +2 -0
- package/lib/dates-9272b910.js.map +1 -0
- package/lib/en-us.js +2 -0
- package/lib/en-us.js.map +1 -0
- package/lib/fi-fi.js +2 -0
- package/lib/fi-fi.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/localization.js +2 -0
- package/lib/localization.js.map +1 -0
- package/lib/localization2.js +2 -0
- package/lib/localization2.js.map +1 -0
- package/lib/localization3.js +2 -0
- package/lib/localization3.js.map +1 -0
- package/lib/month-view.js +1 -1
- package/lib/month-view.js.map +1 -1
- package/lib/src/calendar/Calendar.d.ts +6 -3
- package/lib/src/calendar/localization.d.ts +7 -0
- package/lib/src/calendar/month-view.d.ts +3 -3
- package/lib/src/command-menu/CommandMenu.d.ts +1 -0
- package/lib/src/command-menu/localization.d.ts +11 -0
- package/lib/src/common/collection.d.ts +1 -1
- package/lib/src/common/dates.d.ts +2 -0
- package/lib/src/date-picker/DatePicker.d.ts +3 -9
- package/lib/src/date-picker/localization.d.ts +7 -0
- package/lib/src/dropdown/Dropdown.d.ts +7 -4
- package/lib/src/dropdown-group/DropdownGroup.d.ts +2 -4
- package/lib/src/dropdown-item/DropdownItem.d.ts +1 -1
- package/lib/src/header/Header.d.ts +4 -6
- package/lib/src/icon/Icon.d.ts +1 -1
- package/lib/src/index.d.ts +2 -0
- package/lib/src/localization/LocalizeController.d.ts +28 -0
- package/lib/src/localization/LocalizeController.test.d.ts +1 -0
- package/lib/src/localization/en-us.d.ts +28 -0
- package/lib/src/localization/fi-fi.d.ts +3 -0
- package/lib/src/localization/translation.d.ts +31 -0
- package/lib/src/localization/translation.test.d.ts +1 -0
- package/lib/src/navigation/Navigation.test.d.ts +1 -0
- package/lib/src/popout/Popout.d.ts +2 -4
- package/lib/src/stack/Stack.d.ts +1 -1
- package/lib/translation.js +2 -0
- package/lib/translation.js.map +1 -0
- package/package.json +5 -5
- package/lib/Calendar-5fe3a48c.js +0 -2
- package/lib/Calendar-5fe3a48c.js.map +0 -1
- package/lib/DirectionController-82794ee9.js.map +0 -1
- package/lib/TextField-ece1c786.js.map +0 -1
- package/lib/calendar-localization.js +0 -2
- package/lib/calendar-localization.js.map +0 -1
- package/lib/date-localization.js +0 -2
- package/lib/date-localization.js.map +0 -1
- package/lib/dates-ccf5a897.js +0 -2
- package/lib/dates-ccf5a897.js.map +0 -1
- package/lib/src/calendar/calendar-localization.d.ts +0 -15
- package/lib/src/date-picker/date-localization.d.ts +0 -8
package/custom-elements.json
CHANGED
|
@@ -262,6 +262,30 @@
|
|
|
262
262
|
"name": "default",
|
|
263
263
|
"module": "\"./dropdown-group/DropdownGroup.js\""
|
|
264
264
|
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"kind": "js",
|
|
268
|
+
"name": "registerTranslation",
|
|
269
|
+
"declaration": {
|
|
270
|
+
"name": "registerTranslation",
|
|
271
|
+
"module": "\"./localization/translation.js\""
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "js",
|
|
276
|
+
"name": "isTranslationRegistered",
|
|
277
|
+
"declaration": {
|
|
278
|
+
"name": "isTranslationRegistered",
|
|
279
|
+
"module": "\"./localization/translation.js\""
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"kind": "js",
|
|
284
|
+
"name": "Translation",
|
|
285
|
+
"declaration": {
|
|
286
|
+
"name": "Translation",
|
|
287
|
+
"module": "\"./localization/translation.js\""
|
|
288
|
+
}
|
|
265
289
|
}
|
|
266
290
|
]
|
|
267
291
|
},
|
|
@@ -463,409 +487,353 @@
|
|
|
463
487
|
},
|
|
464
488
|
{
|
|
465
489
|
"kind": "javascript-module",
|
|
466
|
-
"path": "src/
|
|
490
|
+
"path": "src/button/Button.ts",
|
|
467
491
|
"declarations": [
|
|
468
492
|
{
|
|
469
493
|
"kind": "class",
|
|
470
|
-
"description": "
|
|
471
|
-
"name": "
|
|
494
|
+
"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.",
|
|
495
|
+
"name": "Button",
|
|
472
496
|
"slots": [
|
|
473
497
|
{
|
|
474
|
-
"description": "
|
|
498
|
+
"description": "The button content",
|
|
475
499
|
"name": ""
|
|
476
|
-
}
|
|
477
|
-
],
|
|
478
|
-
"members": [
|
|
500
|
+
},
|
|
479
501
|
{
|
|
480
|
-
"
|
|
481
|
-
"name": "
|
|
482
|
-
|
|
483
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
484
|
-
},
|
|
485
|
-
"default": "\"info\"",
|
|
486
|
-
"description": "The style variant of the banner.",
|
|
487
|
-
"attribute": "variant",
|
|
488
|
-
"reflects": true
|
|
489
|
-
}
|
|
490
|
-
],
|
|
491
|
-
"attributes": [
|
|
502
|
+
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
503
|
+
"name": "start"
|
|
504
|
+
},
|
|
492
505
|
{
|
|
493
|
-
"
|
|
494
|
-
"
|
|
495
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
496
|
-
},
|
|
497
|
-
"default": "\"info\"",
|
|
498
|
-
"description": "The style variant of the banner.",
|
|
499
|
-
"fieldName": "variant"
|
|
506
|
+
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
507
|
+
"name": "end"
|
|
500
508
|
}
|
|
501
509
|
],
|
|
502
|
-
"superclass": {
|
|
503
|
-
"name": "LitElement",
|
|
504
|
-
"package": "lit"
|
|
505
|
-
},
|
|
506
|
-
"status": "new",
|
|
507
|
-
"category": "feedback",
|
|
508
|
-
"tagName": "nord-banner",
|
|
509
|
-
"customElement": true
|
|
510
|
-
}
|
|
511
|
-
],
|
|
512
|
-
"exports": [
|
|
513
|
-
{
|
|
514
|
-
"kind": "js",
|
|
515
|
-
"name": "default",
|
|
516
|
-
"declaration": {
|
|
517
|
-
"name": "Banner",
|
|
518
|
-
"module": "src/banner/Banner.ts"
|
|
519
|
-
}
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
"kind": "custom-element-definition",
|
|
523
|
-
"name": "nord-banner",
|
|
524
|
-
"declaration": {
|
|
525
|
-
"name": "Banner",
|
|
526
|
-
"module": "src/banner/Banner.ts"
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
],
|
|
530
|
-
"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"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"kind": "javascript-module",
|
|
534
|
-
"path": "src/calendar/Calendar.ts",
|
|
535
|
-
"declarations": [
|
|
536
|
-
{
|
|
537
|
-
"kind": "class",
|
|
538
|
-
"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.",
|
|
539
|
-
"name": "Calendar",
|
|
540
510
|
"members": [
|
|
541
511
|
{
|
|
542
512
|
"kind": "field",
|
|
543
|
-
"name": "
|
|
544
|
-
"type": {
|
|
545
|
-
"text": "string"
|
|
546
|
-
},
|
|
547
|
-
"privacy": "private",
|
|
548
|
-
"default": "\"dialog-header\""
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
"kind": "field",
|
|
552
|
-
"name": "monthSelectNode",
|
|
553
|
-
"type": {
|
|
554
|
-
"text": "HTMLElement"
|
|
555
|
-
},
|
|
556
|
-
"privacy": "private"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"kind": "field",
|
|
560
|
-
"name": "focusedDayNode",
|
|
561
|
-
"type": {
|
|
562
|
-
"text": "HTMLButtonElement"
|
|
563
|
-
},
|
|
513
|
+
"name": "buttonRef",
|
|
564
514
|
"privacy": "private"
|
|
565
515
|
},
|
|
566
516
|
{
|
|
567
517
|
"kind": "field",
|
|
568
|
-
"name": "
|
|
518
|
+
"name": "events",
|
|
569
519
|
"privacy": "private",
|
|
570
|
-
"default": "new
|
|
520
|
+
"default": "new EventController(this)"
|
|
571
521
|
},
|
|
572
522
|
{
|
|
573
523
|
"kind": "field",
|
|
574
|
-
"name": "
|
|
524
|
+
"name": "lightDom",
|
|
575
525
|
"privacy": "private",
|
|
576
|
-
"default": "new
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"kind": "field",
|
|
580
|
-
"name": "shortcuts",
|
|
581
|
-
"privacy": "private"
|
|
526
|
+
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
582
527
|
},
|
|
583
528
|
{
|
|
584
529
|
"kind": "field",
|
|
585
|
-
"name": "
|
|
530
|
+
"name": "variant",
|
|
586
531
|
"type": {
|
|
587
|
-
"text": "
|
|
532
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
588
533
|
},
|
|
589
|
-
"
|
|
590
|
-
"description": "
|
|
534
|
+
"default": "\"default\"",
|
|
535
|
+
"description": "The style variant of the button.",
|
|
536
|
+
"attribute": "variant",
|
|
537
|
+
"reflects": true
|
|
591
538
|
},
|
|
592
539
|
{
|
|
593
540
|
"kind": "field",
|
|
594
|
-
"name": "
|
|
541
|
+
"name": "type",
|
|
595
542
|
"type": {
|
|
596
|
-
"text": "
|
|
543
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
597
544
|
},
|
|
598
|
-
"default": "
|
|
545
|
+
"default": "\"submit\"",
|
|
546
|
+
"description": "The type of the button.",
|
|
547
|
+
"attribute": "type",
|
|
548
|
+
"reflects": true
|
|
599
549
|
},
|
|
600
550
|
{
|
|
601
551
|
"kind": "field",
|
|
602
|
-
"name": "
|
|
552
|
+
"name": "size",
|
|
603
553
|
"type": {
|
|
604
|
-
"text": "
|
|
554
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
605
555
|
},
|
|
606
|
-
"default": "\"\"",
|
|
607
|
-
"description": "The
|
|
608
|
-
"attribute": "
|
|
556
|
+
"default": "\"m\"",
|
|
557
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
558
|
+
"attribute": "size",
|
|
559
|
+
"reflects": true
|
|
609
560
|
},
|
|
610
561
|
{
|
|
611
562
|
"kind": "field",
|
|
612
|
-
"name": "
|
|
563
|
+
"name": "accessibleExpanded",
|
|
613
564
|
"type": {
|
|
614
|
-
"text": "
|
|
565
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
615
566
|
},
|
|
616
|
-
"
|
|
617
|
-
"attribute": "
|
|
567
|
+
"privacy": "private",
|
|
568
|
+
"attribute": "aria-expanded"
|
|
618
569
|
},
|
|
619
570
|
{
|
|
620
571
|
"kind": "field",
|
|
621
|
-
"name": "
|
|
572
|
+
"name": "accessibleHasPopup",
|
|
622
573
|
"type": {
|
|
623
|
-
"text": "
|
|
574
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
624
575
|
},
|
|
625
|
-
"
|
|
626
|
-
"
|
|
627
|
-
"attribute": "min"
|
|
576
|
+
"privacy": "private",
|
|
577
|
+
"attribute": "aria-haspopup"
|
|
628
578
|
},
|
|
629
579
|
{
|
|
630
580
|
"kind": "field",
|
|
631
|
-
"name": "
|
|
581
|
+
"name": "href",
|
|
632
582
|
"type": {
|
|
633
|
-
"text": "string"
|
|
583
|
+
"text": "string | undefined"
|
|
634
584
|
},
|
|
635
|
-
"
|
|
636
|
-
"
|
|
637
|
-
"
|
|
585
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
586
|
+
"attribute": "href",
|
|
587
|
+
"reflects": true
|
|
638
588
|
},
|
|
639
589
|
{
|
|
640
590
|
"kind": "field",
|
|
641
|
-
"name": "
|
|
591
|
+
"name": "download",
|
|
642
592
|
"type": {
|
|
643
593
|
"text": "boolean"
|
|
644
594
|
},
|
|
645
595
|
"default": "false",
|
|
646
|
-
"description": "
|
|
647
|
-
"attribute": "
|
|
648
|
-
"reflects": true
|
|
596
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
597
|
+
"attribute": "download"
|
|
649
598
|
},
|
|
650
599
|
{
|
|
651
600
|
"kind": "field",
|
|
652
|
-
"name": "
|
|
601
|
+
"name": "target",
|
|
653
602
|
"type": {
|
|
654
|
-
"text": "
|
|
603
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
655
604
|
},
|
|
656
|
-
"default": "
|
|
657
|
-
"description": "
|
|
605
|
+
"default": "\"_self\"",
|
|
606
|
+
"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.",
|
|
607
|
+
"attribute": "target",
|
|
608
|
+
"reflects": true
|
|
658
609
|
},
|
|
659
610
|
{
|
|
660
611
|
"kind": "field",
|
|
661
|
-
"name": "
|
|
612
|
+
"name": "expand",
|
|
662
613
|
"type": {
|
|
663
614
|
"text": "boolean"
|
|
664
615
|
},
|
|
665
|
-
"
|
|
666
|
-
"
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
"kind": "field",
|
|
670
|
-
"name": "focusedDay",
|
|
671
|
-
"privacy": "private",
|
|
672
|
-
"default": "new Date()"
|
|
616
|
+
"default": "false",
|
|
617
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
618
|
+
"attribute": "expand",
|
|
619
|
+
"reflects": true
|
|
673
620
|
},
|
|
674
621
|
{
|
|
675
622
|
"kind": "method",
|
|
676
|
-
"name": "
|
|
623
|
+
"name": "renderLink",
|
|
624
|
+
"privacy": "private",
|
|
677
625
|
"parameters": [
|
|
678
626
|
{
|
|
679
|
-
"name": "
|
|
680
|
-
"optional": true,
|
|
627
|
+
"name": "innards",
|
|
681
628
|
"type": {
|
|
682
|
-
"text": "
|
|
683
|
-
}
|
|
684
|
-
"description": "An object which controls aspects of the focusing process."
|
|
629
|
+
"text": "TemplateResult"
|
|
630
|
+
}
|
|
685
631
|
}
|
|
686
632
|
],
|
|
687
|
-
"description": "
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
"kind": "method",
|
|
691
|
-
"name": "createDateFormatter",
|
|
692
|
-
"privacy": "private"
|
|
693
|
-
},
|
|
694
|
-
{
|
|
695
|
-
"kind": "field",
|
|
696
|
-
"name": "handleDaySelect",
|
|
697
|
-
"privacy": "private"
|
|
633
|
+
"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."
|
|
698
634
|
},
|
|
699
635
|
{
|
|
700
636
|
"kind": "method",
|
|
701
|
-
"name": "
|
|
637
|
+
"name": "renderButton",
|
|
702
638
|
"privacy": "private",
|
|
703
639
|
"parameters": [
|
|
704
640
|
{
|
|
705
|
-
"name": "
|
|
641
|
+
"name": "innards",
|
|
706
642
|
"type": {
|
|
707
|
-
"text": "
|
|
643
|
+
"text": "TemplateResult"
|
|
708
644
|
}
|
|
709
645
|
}
|
|
710
646
|
]
|
|
711
647
|
},
|
|
712
648
|
{
|
|
713
649
|
"kind": "method",
|
|
714
|
-
"name": "
|
|
650
|
+
"name": "renderLightDom",
|
|
651
|
+
"privacy": "private"
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"kind": "field",
|
|
655
|
+
"name": "handleOuterClick",
|
|
656
|
+
"privacy": "private"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "method",
|
|
660
|
+
"name": "handleClick",
|
|
715
661
|
"privacy": "private",
|
|
716
662
|
"parameters": [
|
|
717
663
|
{
|
|
718
|
-
"name": "
|
|
664
|
+
"name": "e",
|
|
719
665
|
"type": {
|
|
720
|
-
"text": "
|
|
666
|
+
"text": "Event"
|
|
721
667
|
}
|
|
722
668
|
}
|
|
723
669
|
]
|
|
724
670
|
},
|
|
725
671
|
{
|
|
726
|
-
"kind": "
|
|
727
|
-
"name": "
|
|
728
|
-
"
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
672
|
+
"kind": "field",
|
|
673
|
+
"name": "disabled",
|
|
674
|
+
"type": {
|
|
675
|
+
"text": "boolean"
|
|
676
|
+
},
|
|
677
|
+
"default": "false",
|
|
678
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
679
|
+
"attribute": "disabled",
|
|
680
|
+
"reflects": true,
|
|
681
|
+
"inheritedFrom": {
|
|
682
|
+
"name": "InputMixin",
|
|
683
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
684
|
+
}
|
|
737
685
|
},
|
|
738
686
|
{
|
|
739
|
-
"kind": "
|
|
740
|
-
"name": "
|
|
741
|
-
"
|
|
687
|
+
"kind": "field",
|
|
688
|
+
"name": "name",
|
|
689
|
+
"type": {
|
|
690
|
+
"text": "string | undefined"
|
|
691
|
+
},
|
|
692
|
+
"description": "The name of the form component.",
|
|
693
|
+
"attribute": "name",
|
|
694
|
+
"inheritedFrom": {
|
|
695
|
+
"name": "InputMixin",
|
|
696
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
697
|
+
}
|
|
742
698
|
},
|
|
743
699
|
{
|
|
744
|
-
"kind": "
|
|
745
|
-
"name": "
|
|
746
|
-
"
|
|
700
|
+
"kind": "field",
|
|
701
|
+
"name": "value",
|
|
702
|
+
"type": {
|
|
703
|
+
"text": "string"
|
|
704
|
+
},
|
|
705
|
+
"default": "\"\"",
|
|
706
|
+
"description": "The value of the form component.",
|
|
707
|
+
"attribute": "value",
|
|
708
|
+
"inheritedFrom": {
|
|
709
|
+
"name": "InputMixin",
|
|
710
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
711
|
+
}
|
|
747
712
|
},
|
|
748
713
|
{
|
|
749
|
-
"kind": "
|
|
750
|
-
"name": "
|
|
751
|
-
"privacy": "
|
|
752
|
-
"
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
]
|
|
714
|
+
"kind": "field",
|
|
715
|
+
"name": "form",
|
|
716
|
+
"privacy": "protected",
|
|
717
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
718
|
+
"inheritedFrom": {
|
|
719
|
+
"name": "InputMixin",
|
|
720
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
721
|
+
}
|
|
760
722
|
},
|
|
761
723
|
{
|
|
762
|
-
"kind": "
|
|
763
|
-
"name": "
|
|
764
|
-
"privacy": "
|
|
765
|
-
"
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
"text": "number"
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
]
|
|
724
|
+
"kind": "field",
|
|
725
|
+
"name": "focusableRef",
|
|
726
|
+
"privacy": "protected",
|
|
727
|
+
"inheritedFrom": {
|
|
728
|
+
"name": "FocusableMixin",
|
|
729
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
730
|
+
}
|
|
773
731
|
},
|
|
774
732
|
{
|
|
775
733
|
"kind": "method",
|
|
776
|
-
"name": "
|
|
777
|
-
"privacy": "private",
|
|
734
|
+
"name": "focus",
|
|
778
735
|
"parameters": [
|
|
779
736
|
{
|
|
780
|
-
"name": "
|
|
737
|
+
"name": "options",
|
|
738
|
+
"optional": true,
|
|
781
739
|
"type": {
|
|
782
|
-
"text": "
|
|
783
|
-
}
|
|
740
|
+
"text": "FocusOptions"
|
|
741
|
+
},
|
|
742
|
+
"description": "An object which controls aspects of the focusing process."
|
|
784
743
|
}
|
|
785
|
-
]
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
744
|
+
],
|
|
745
|
+
"description": "Programmatically move focus to the component.",
|
|
746
|
+
"inheritedFrom": {
|
|
747
|
+
"name": "FocusableMixin",
|
|
748
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
749
|
+
}
|
|
791
750
|
},
|
|
792
751
|
{
|
|
793
|
-
"kind": "
|
|
794
|
-
"name": "
|
|
795
|
-
"
|
|
752
|
+
"kind": "method",
|
|
753
|
+
"name": "blur",
|
|
754
|
+
"description": "Programmatically remove focus from the component.",
|
|
755
|
+
"inheritedFrom": {
|
|
756
|
+
"name": "FocusableMixin",
|
|
757
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
758
|
+
}
|
|
796
759
|
},
|
|
797
760
|
{
|
|
798
|
-
"kind": "
|
|
799
|
-
"name": "
|
|
800
|
-
"
|
|
801
|
-
|
|
761
|
+
"kind": "method",
|
|
762
|
+
"name": "click",
|
|
763
|
+
"description": "Programmatically simulates a click on the component.",
|
|
764
|
+
"inheritedFrom": {
|
|
765
|
+
"name": "FocusableMixin",
|
|
766
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
],
|
|
770
|
+
"attributes": [
|
|
802
771
|
{
|
|
803
|
-
"
|
|
804
|
-
"
|
|
805
|
-
|
|
772
|
+
"name": "variant",
|
|
773
|
+
"type": {
|
|
774
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
775
|
+
},
|
|
776
|
+
"default": "\"default\"",
|
|
777
|
+
"description": "The style variant of the button.",
|
|
778
|
+
"fieldName": "variant"
|
|
806
779
|
},
|
|
807
780
|
{
|
|
808
|
-
"
|
|
809
|
-
"
|
|
810
|
-
|
|
781
|
+
"name": "type",
|
|
782
|
+
"type": {
|
|
783
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
784
|
+
},
|
|
785
|
+
"default": "\"submit\"",
|
|
786
|
+
"description": "The type of the button.",
|
|
787
|
+
"fieldName": "type"
|
|
811
788
|
},
|
|
812
789
|
{
|
|
813
|
-
"
|
|
814
|
-
"name": "disableActiveFocus",
|
|
815
|
-
"privacy": "private"
|
|
816
|
-
}
|
|
817
|
-
],
|
|
818
|
-
"events": [
|
|
819
|
-
{
|
|
820
|
-
"name": "nord-focus-date",
|
|
790
|
+
"name": "size",
|
|
821
791
|
"type": {
|
|
822
|
-
"text": "
|
|
792
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
823
793
|
},
|
|
824
|
-
"
|
|
794
|
+
"default": "\"m\"",
|
|
795
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
796
|
+
"fieldName": "size"
|
|
825
797
|
},
|
|
826
798
|
{
|
|
799
|
+
"name": "aria-expanded",
|
|
827
800
|
"type": {
|
|
828
|
-
"text": "
|
|
801
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
829
802
|
},
|
|
830
|
-
"
|
|
831
|
-
|
|
832
|
-
}
|
|
833
|
-
],
|
|
834
|
-
"attributes": [
|
|
803
|
+
"fieldName": "accessibleExpanded"
|
|
804
|
+
},
|
|
835
805
|
{
|
|
836
|
-
"name": "
|
|
806
|
+
"name": "aria-haspopup",
|
|
837
807
|
"type": {
|
|
838
|
-
"text": "
|
|
808
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
839
809
|
},
|
|
840
|
-
"
|
|
841
|
-
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
842
|
-
"fieldName": "value"
|
|
810
|
+
"fieldName": "accessibleHasPopup"
|
|
843
811
|
},
|
|
844
812
|
{
|
|
845
|
-
"name": "
|
|
813
|
+
"name": "href",
|
|
846
814
|
"type": {
|
|
847
|
-
"text": "
|
|
815
|
+
"text": "string | undefined"
|
|
848
816
|
},
|
|
849
|
-
"description": "
|
|
850
|
-
"fieldName": "
|
|
817
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
818
|
+
"fieldName": "href"
|
|
851
819
|
},
|
|
852
820
|
{
|
|
853
|
-
"name": "
|
|
821
|
+
"name": "download",
|
|
854
822
|
"type": {
|
|
855
|
-
"text": "
|
|
823
|
+
"text": "boolean"
|
|
856
824
|
},
|
|
857
|
-
"default": "
|
|
858
|
-
"description": "
|
|
859
|
-
"fieldName": "
|
|
825
|
+
"default": "false",
|
|
826
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
827
|
+
"fieldName": "download"
|
|
860
828
|
},
|
|
861
829
|
{
|
|
862
|
-
"name": "
|
|
830
|
+
"name": "target",
|
|
863
831
|
"type": {
|
|
864
|
-
"text": "
|
|
832
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
865
833
|
},
|
|
866
|
-
"default": "\"\"",
|
|
867
|
-
"description": "
|
|
868
|
-
"fieldName": "
|
|
834
|
+
"default": "\"_self\"",
|
|
835
|
+
"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.",
|
|
836
|
+
"fieldName": "target"
|
|
869
837
|
},
|
|
870
838
|
{
|
|
871
839
|
"name": "expand",
|
|
@@ -873,17 +841,65 @@
|
|
|
873
841
|
"text": "boolean"
|
|
874
842
|
},
|
|
875
843
|
"default": "false",
|
|
876
|
-
"description": "Controls whether the
|
|
844
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
877
845
|
"fieldName": "expand"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"name": "disabled",
|
|
849
|
+
"type": {
|
|
850
|
+
"text": "boolean"
|
|
851
|
+
},
|
|
852
|
+
"default": "false",
|
|
853
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
854
|
+
"fieldName": "disabled",
|
|
855
|
+
"inheritedFrom": {
|
|
856
|
+
"name": "InputMixin",
|
|
857
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "name",
|
|
862
|
+
"type": {
|
|
863
|
+
"text": "string | undefined"
|
|
864
|
+
},
|
|
865
|
+
"description": "The name of the form component.",
|
|
866
|
+
"fieldName": "name",
|
|
867
|
+
"inheritedFrom": {
|
|
868
|
+
"name": "InputMixin",
|
|
869
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"name": "value",
|
|
874
|
+
"type": {
|
|
875
|
+
"text": "string"
|
|
876
|
+
},
|
|
877
|
+
"default": "\"\"",
|
|
878
|
+
"description": "The value of the form component.",
|
|
879
|
+
"fieldName": "value",
|
|
880
|
+
"inheritedFrom": {
|
|
881
|
+
"name": "InputMixin",
|
|
882
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
883
|
+
}
|
|
878
884
|
}
|
|
879
885
|
],
|
|
880
|
-
"
|
|
886
|
+
"mixins": [
|
|
887
|
+
{
|
|
888
|
+
"name": "InputMixin",
|
|
889
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "FocusableMixin",
|
|
893
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
894
|
+
}
|
|
895
|
+
],
|
|
896
|
+
"superclass": {
|
|
881
897
|
"name": "LitElement",
|
|
882
898
|
"package": "lit"
|
|
883
899
|
},
|
|
884
900
|
"status": "ready",
|
|
885
|
-
"category": "
|
|
886
|
-
"tagName": "nord-
|
|
901
|
+
"category": "action",
|
|
902
|
+
"tagName": "nord-button",
|
|
887
903
|
"customElement": true
|
|
888
904
|
}
|
|
889
905
|
],
|
|
@@ -892,625 +908,663 @@
|
|
|
892
908
|
"kind": "js",
|
|
893
909
|
"name": "default",
|
|
894
910
|
"declaration": {
|
|
895
|
-
"name": "
|
|
896
|
-
"module": "src/
|
|
911
|
+
"name": "Button",
|
|
912
|
+
"module": "src/button/Button.ts"
|
|
897
913
|
}
|
|
898
914
|
},
|
|
899
915
|
{
|
|
900
916
|
"kind": "custom-element-definition",
|
|
901
|
-
"name": "nord-
|
|
917
|
+
"name": "nord-button",
|
|
902
918
|
"declaration": {
|
|
903
|
-
"name": "
|
|
904
|
-
"module": "src/
|
|
919
|
+
"name": "Button",
|
|
920
|
+
"module": "src/button/Button.ts"
|
|
905
921
|
}
|
|
906
922
|
}
|
|
907
923
|
],
|
|
908
|
-
"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
|
|
924
|
+
"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"
|
|
909
925
|
},
|
|
910
926
|
{
|
|
911
927
|
"kind": "javascript-module",
|
|
912
|
-
"path": "src/calendar/
|
|
928
|
+
"path": "src/calendar/Calendar.ts",
|
|
913
929
|
"declarations": [
|
|
914
930
|
{
|
|
915
931
|
"kind": "class",
|
|
916
|
-
"description": "",
|
|
917
|
-
"name": "
|
|
932
|
+
"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.",
|
|
933
|
+
"name": "Calendar",
|
|
918
934
|
"members": [
|
|
919
935
|
{
|
|
920
936
|
"kind": "field",
|
|
921
|
-
"name": "
|
|
937
|
+
"name": "dialogLabelId",
|
|
922
938
|
"type": {
|
|
923
|
-
"text": "
|
|
939
|
+
"text": "string"
|
|
924
940
|
},
|
|
925
|
-
"
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
"superclass": {
|
|
929
|
-
"name": "NordEvent",
|
|
930
|
-
"module": "/src/common/events.js"
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
],
|
|
934
|
-
"exports": [
|
|
935
|
-
{
|
|
936
|
-
"kind": "js",
|
|
937
|
-
"name": "DateSelectEvent",
|
|
938
|
-
"declaration": {
|
|
939
|
-
"name": "DateSelectEvent",
|
|
940
|
-
"module": "src/calendar/DateSelectEvent.ts"
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
],
|
|
944
|
-
"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"
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
"kind": "javascript-module",
|
|
948
|
-
"path": "src/calendar/calendar-localization.ts",
|
|
949
|
-
"declarations": [
|
|
950
|
-
{
|
|
951
|
-
"kind": "variable",
|
|
952
|
-
"name": "localization",
|
|
953
|
-
"type": {
|
|
954
|
-
"text": "CalendarLocalizedText"
|
|
955
|
-
},
|
|
956
|
-
"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}"
|
|
957
|
-
}
|
|
958
|
-
],
|
|
959
|
-
"exports": [
|
|
960
|
-
{
|
|
961
|
-
"kind": "js",
|
|
962
|
-
"name": "default",
|
|
963
|
-
"declaration": {
|
|
964
|
-
"name": "localization",
|
|
965
|
-
"module": "src/calendar/calendar-localization.ts"
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
],
|
|
969
|
-
"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"
|
|
970
|
-
},
|
|
971
|
-
{
|
|
972
|
-
"kind": "javascript-module",
|
|
973
|
-
"path": "src/calendar/month-view.ts",
|
|
974
|
-
"declarations": [
|
|
975
|
-
{
|
|
976
|
-
"kind": "function",
|
|
977
|
-
"name": "dayView",
|
|
978
|
-
"parameters": [
|
|
941
|
+
"privacy": "private",
|
|
942
|
+
"default": "\"dialog-header\""
|
|
943
|
+
},
|
|
979
944
|
{
|
|
980
|
-
"
|
|
945
|
+
"kind": "field",
|
|
946
|
+
"name": "monthSelectNode",
|
|
981
947
|
"type": {
|
|
982
|
-
"text": "
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
"kind": "function",
|
|
989
|
-
"name": "monthView",
|
|
990
|
-
"parameters": [
|
|
948
|
+
"text": "HTMLElement"
|
|
949
|
+
},
|
|
950
|
+
"privacy": "private"
|
|
951
|
+
},
|
|
991
952
|
{
|
|
992
|
-
"
|
|
953
|
+
"kind": "field",
|
|
954
|
+
"name": "focusedDayNode",
|
|
993
955
|
"type": {
|
|
994
|
-
"text": "
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
]
|
|
998
|
-
}
|
|
999
|
-
],
|
|
1000
|
-
"exports": [
|
|
1001
|
-
{
|
|
1002
|
-
"kind": "js",
|
|
1003
|
-
"name": "dayView",
|
|
1004
|
-
"declaration": {
|
|
1005
|
-
"name": "dayView",
|
|
1006
|
-
"module": "src/calendar/month-view.ts"
|
|
1007
|
-
}
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
"kind": "js",
|
|
1011
|
-
"name": "monthView",
|
|
1012
|
-
"declaration": {
|
|
1013
|
-
"name": "monthView",
|
|
1014
|
-
"module": "src/calendar/month-view.ts"
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
],
|
|
1018
|
-
"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"
|
|
1019
|
-
},
|
|
1020
|
-
{
|
|
1021
|
-
"kind": "javascript-module",
|
|
1022
|
-
"path": "src/card/Card.ts",
|
|
1023
|
-
"declarations": [
|
|
1024
|
-
{
|
|
1025
|
-
"kind": "class",
|
|
1026
|
-
"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.",
|
|
1027
|
-
"name": "Card",
|
|
1028
|
-
"slots": [
|
|
1029
|
-
{
|
|
1030
|
-
"description": "The card content.",
|
|
1031
|
-
"name": ""
|
|
956
|
+
"text": "HTMLButtonElement"
|
|
957
|
+
},
|
|
958
|
+
"privacy": "private"
|
|
1032
959
|
},
|
|
1033
960
|
{
|
|
1034
|
-
"
|
|
1035
|
-
"name": "
|
|
961
|
+
"kind": "field",
|
|
962
|
+
"name": "direction",
|
|
963
|
+
"privacy": "private",
|
|
964
|
+
"default": "new DirectionController(this)"
|
|
1036
965
|
},
|
|
1037
|
-
{
|
|
1038
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1039
|
-
"name": "footer"
|
|
1040
|
-
}
|
|
1041
|
-
],
|
|
1042
|
-
"members": [
|
|
1043
966
|
{
|
|
1044
967
|
"kind": "field",
|
|
1045
|
-
"name": "
|
|
968
|
+
"name": "swipe",
|
|
1046
969
|
"privacy": "private",
|
|
1047
|
-
"default": "new
|
|
970
|
+
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
1048
971
|
},
|
|
1049
972
|
{
|
|
1050
973
|
"kind": "field",
|
|
1051
|
-
"name": "
|
|
974
|
+
"name": "shortcuts",
|
|
975
|
+
"privacy": "private"
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"kind": "field",
|
|
979
|
+
"name": "localize",
|
|
1052
980
|
"privacy": "private",
|
|
1053
|
-
"default": "new
|
|
981
|
+
"default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
|
|
1054
982
|
},
|
|
1055
983
|
{
|
|
1056
984
|
"kind": "field",
|
|
1057
|
-
"name": "
|
|
985
|
+
"name": "dateFormatShort",
|
|
1058
986
|
"type": {
|
|
1059
|
-
"text": "
|
|
987
|
+
"text": "Intl.DateTimeFormat"
|
|
1060
988
|
},
|
|
1061
|
-
"
|
|
1062
|
-
"description": "
|
|
1063
|
-
|
|
1064
|
-
"reflects": true
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
"attributes": [
|
|
989
|
+
"privacy": "private",
|
|
990
|
+
"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"
|
|
991
|
+
},
|
|
1068
992
|
{
|
|
1069
|
-
"
|
|
993
|
+
"kind": "field",
|
|
994
|
+
"name": "monthNames",
|
|
1070
995
|
"type": {
|
|
1071
|
-
"text": "
|
|
996
|
+
"text": "string[]"
|
|
1072
997
|
},
|
|
1073
|
-
"
|
|
1074
|
-
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1075
|
-
"fieldName": "padding"
|
|
1076
|
-
}
|
|
1077
|
-
],
|
|
1078
|
-
"superclass": {
|
|
1079
|
-
"name": "LitElement",
|
|
1080
|
-
"package": "lit"
|
|
1081
|
-
},
|
|
1082
|
-
"status": "ready",
|
|
1083
|
-
"category": "structure",
|
|
1084
|
-
"tagName": "nord-card",
|
|
1085
|
-
"customElement": true
|
|
1086
|
-
}
|
|
1087
|
-
],
|
|
1088
|
-
"exports": [
|
|
1089
|
-
{
|
|
1090
|
-
"kind": "js",
|
|
1091
|
-
"name": "default",
|
|
1092
|
-
"declaration": {
|
|
1093
|
-
"name": "Card",
|
|
1094
|
-
"module": "src/card/Card.ts"
|
|
1095
|
-
}
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
"kind": "custom-element-definition",
|
|
1099
|
-
"name": "nord-card",
|
|
1100
|
-
"declaration": {
|
|
1101
|
-
"name": "Card",
|
|
1102
|
-
"module": "src/card/Card.ts"
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
],
|
|
1106
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
1107
|
-
},
|
|
1108
|
-
{
|
|
1109
|
-
"kind": "javascript-module",
|
|
1110
|
-
"path": "src/button/Button.ts",
|
|
1111
|
-
"declarations": [
|
|
1112
|
-
{
|
|
1113
|
-
"kind": "class",
|
|
1114
|
-
"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.",
|
|
1115
|
-
"name": "Button",
|
|
1116
|
-
"slots": [
|
|
1117
|
-
{
|
|
1118
|
-
"description": "The button content",
|
|
1119
|
-
"name": ""
|
|
998
|
+
"privacy": "private"
|
|
1120
999
|
},
|
|
1121
1000
|
{
|
|
1122
|
-
"
|
|
1123
|
-
"name": "
|
|
1001
|
+
"kind": "field",
|
|
1002
|
+
"name": "monthNamesShort",
|
|
1003
|
+
"type": {
|
|
1004
|
+
"text": "string[]"
|
|
1005
|
+
},
|
|
1006
|
+
"privacy": "private"
|
|
1124
1007
|
},
|
|
1125
|
-
{
|
|
1126
|
-
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
1127
|
-
"name": "end"
|
|
1128
|
-
}
|
|
1129
|
-
],
|
|
1130
|
-
"members": [
|
|
1131
1008
|
{
|
|
1132
1009
|
"kind": "field",
|
|
1133
|
-
"name": "
|
|
1010
|
+
"name": "dayNames",
|
|
1011
|
+
"type": {
|
|
1012
|
+
"text": "string[]"
|
|
1013
|
+
},
|
|
1134
1014
|
"privacy": "private"
|
|
1135
1015
|
},
|
|
1136
1016
|
{
|
|
1137
1017
|
"kind": "field",
|
|
1138
|
-
"name": "
|
|
1139
|
-
"
|
|
1140
|
-
|
|
1018
|
+
"name": "dayNamesShort",
|
|
1019
|
+
"type": {
|
|
1020
|
+
"text": "string[]"
|
|
1021
|
+
},
|
|
1022
|
+
"privacy": "private"
|
|
1141
1023
|
},
|
|
1142
1024
|
{
|
|
1143
1025
|
"kind": "field",
|
|
1144
|
-
"name": "
|
|
1145
|
-
"privacy": "private",
|
|
1146
|
-
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
"kind": "field",
|
|
1150
|
-
"name": "variant",
|
|
1026
|
+
"name": "value",
|
|
1151
1027
|
"type": {
|
|
1152
|
-
"text": "
|
|
1028
|
+
"text": "string"
|
|
1153
1029
|
},
|
|
1154
|
-
"default": "\"
|
|
1155
|
-
"description": "The
|
|
1156
|
-
"attribute": "
|
|
1157
|
-
"reflects": true
|
|
1030
|
+
"default": "\"\"",
|
|
1031
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1032
|
+
"attribute": "value"
|
|
1158
1033
|
},
|
|
1159
1034
|
{
|
|
1160
1035
|
"kind": "field",
|
|
1161
|
-
"name": "
|
|
1036
|
+
"name": "firstDayOfWeek",
|
|
1162
1037
|
"type": {
|
|
1163
|
-
"text": "
|
|
1038
|
+
"text": "DaysOfWeek"
|
|
1164
1039
|
},
|
|
1165
|
-
"
|
|
1166
|
-
"
|
|
1167
|
-
"attribute": "type",
|
|
1168
|
-
"reflects": true
|
|
1040
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1041
|
+
"attribute": "firstDayOfWeek"
|
|
1169
1042
|
},
|
|
1170
1043
|
{
|
|
1171
1044
|
"kind": "field",
|
|
1172
|
-
"name": "
|
|
1045
|
+
"name": "min",
|
|
1173
1046
|
"type": {
|
|
1174
|
-
"text": "
|
|
1047
|
+
"text": "string"
|
|
1175
1048
|
},
|
|
1176
|
-
"default": "\"
|
|
1177
|
-
"description": "
|
|
1178
|
-
"attribute": "
|
|
1179
|
-
"reflects": true
|
|
1049
|
+
"default": "\"\"",
|
|
1050
|
+
"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.",
|
|
1051
|
+
"attribute": "min"
|
|
1180
1052
|
},
|
|
1181
1053
|
{
|
|
1182
1054
|
"kind": "field",
|
|
1183
|
-
"name": "
|
|
1055
|
+
"name": "max",
|
|
1184
1056
|
"type": {
|
|
1185
|
-
"text": "
|
|
1057
|
+
"text": "string"
|
|
1186
1058
|
},
|
|
1187
|
-
"
|
|
1188
|
-
"
|
|
1059
|
+
"default": "\"\"",
|
|
1060
|
+
"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.",
|
|
1061
|
+
"attribute": "max"
|
|
1189
1062
|
},
|
|
1190
1063
|
{
|
|
1191
1064
|
"kind": "field",
|
|
1192
|
-
"name": "
|
|
1065
|
+
"name": "expand",
|
|
1193
1066
|
"type": {
|
|
1194
|
-
"text": "
|
|
1067
|
+
"text": "boolean"
|
|
1195
1068
|
},
|
|
1196
|
-
"
|
|
1197
|
-
"
|
|
1069
|
+
"default": "false",
|
|
1070
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1071
|
+
"attribute": "expand",
|
|
1072
|
+
"reflects": true
|
|
1198
1073
|
},
|
|
1199
1074
|
{
|
|
1200
1075
|
"kind": "field",
|
|
1201
|
-
"name": "
|
|
1076
|
+
"name": "isDateDisabled",
|
|
1202
1077
|
"type": {
|
|
1203
|
-
"text": "
|
|
1078
|
+
"text": "DateDisabledPredicate"
|
|
1204
1079
|
},
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
1207
|
-
"reflects": true
|
|
1080
|
+
"default": "isDateDisabled",
|
|
1081
|
+
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
1208
1082
|
},
|
|
1209
1083
|
{
|
|
1210
1084
|
"kind": "field",
|
|
1211
|
-
"name": "
|
|
1085
|
+
"name": "activeFocus",
|
|
1212
1086
|
"type": {
|
|
1213
1087
|
"text": "boolean"
|
|
1214
1088
|
},
|
|
1215
|
-
"
|
|
1216
|
-
"
|
|
1217
|
-
"attribute": "download"
|
|
1089
|
+
"privacy": "private",
|
|
1090
|
+
"default": "false"
|
|
1218
1091
|
},
|
|
1219
1092
|
{
|
|
1220
1093
|
"kind": "field",
|
|
1221
|
-
"name": "
|
|
1222
|
-
"
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1228
|
-
"
|
|
1094
|
+
"name": "focusedDay",
|
|
1095
|
+
"privacy": "private",
|
|
1096
|
+
"default": "new Date()"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"kind": "method",
|
|
1100
|
+
"name": "focus",
|
|
1101
|
+
"parameters": [
|
|
1102
|
+
{
|
|
1103
|
+
"name": "options",
|
|
1104
|
+
"optional": true,
|
|
1105
|
+
"type": {
|
|
1106
|
+
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
1107
|
+
},
|
|
1108
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1109
|
+
}
|
|
1110
|
+
],
|
|
1111
|
+
"description": "Programmatically move focus to the calendar."
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"kind": "method",
|
|
1115
|
+
"name": "handleLangChange",
|
|
1116
|
+
"privacy": "private"
|
|
1229
1117
|
},
|
|
1230
1118
|
{
|
|
1231
1119
|
"kind": "field",
|
|
1232
|
-
"name": "
|
|
1233
|
-
"
|
|
1234
|
-
"text": "boolean"
|
|
1235
|
-
},
|
|
1236
|
-
"default": "false",
|
|
1237
|
-
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1238
|
-
"attribute": "expand",
|
|
1239
|
-
"reflects": true
|
|
1120
|
+
"name": "handleDaySelect",
|
|
1121
|
+
"privacy": "private"
|
|
1240
1122
|
},
|
|
1241
1123
|
{
|
|
1242
1124
|
"kind": "method",
|
|
1243
|
-
"name": "
|
|
1125
|
+
"name": "addDays",
|
|
1244
1126
|
"privacy": "private",
|
|
1245
1127
|
"parameters": [
|
|
1246
1128
|
{
|
|
1247
|
-
"name": "
|
|
1129
|
+
"name": "days",
|
|
1248
1130
|
"type": {
|
|
1249
|
-
"text": "
|
|
1131
|
+
"text": "number"
|
|
1250
1132
|
}
|
|
1251
1133
|
}
|
|
1252
|
-
]
|
|
1253
|
-
"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."
|
|
1134
|
+
]
|
|
1254
1135
|
},
|
|
1255
1136
|
{
|
|
1256
1137
|
"kind": "method",
|
|
1257
|
-
"name": "
|
|
1138
|
+
"name": "addMonths",
|
|
1258
1139
|
"privacy": "private",
|
|
1259
1140
|
"parameters": [
|
|
1260
1141
|
{
|
|
1261
|
-
"name": "
|
|
1142
|
+
"name": "months",
|
|
1262
1143
|
"type": {
|
|
1263
|
-
"text": "
|
|
1144
|
+
"text": "number"
|
|
1264
1145
|
}
|
|
1265
1146
|
}
|
|
1266
1147
|
]
|
|
1267
1148
|
},
|
|
1268
1149
|
{
|
|
1269
1150
|
"kind": "method",
|
|
1270
|
-
"name": "
|
|
1151
|
+
"name": "addYears",
|
|
1152
|
+
"privacy": "private",
|
|
1153
|
+
"parameters": [
|
|
1154
|
+
{
|
|
1155
|
+
"name": "years",
|
|
1156
|
+
"type": {
|
|
1157
|
+
"text": "number"
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"kind": "method",
|
|
1164
|
+
"name": "startOfWeek",
|
|
1271
1165
|
"privacy": "private"
|
|
1272
1166
|
},
|
|
1273
1167
|
{
|
|
1274
|
-
"kind": "
|
|
1275
|
-
"name": "
|
|
1168
|
+
"kind": "method",
|
|
1169
|
+
"name": "endOfWeek",
|
|
1276
1170
|
"privacy": "private"
|
|
1277
1171
|
},
|
|
1278
1172
|
{
|
|
1279
1173
|
"kind": "method",
|
|
1280
|
-
"name": "
|
|
1174
|
+
"name": "setMonth",
|
|
1281
1175
|
"privacy": "private",
|
|
1282
1176
|
"parameters": [
|
|
1283
1177
|
{
|
|
1284
|
-
"name": "
|
|
1178
|
+
"name": "month",
|
|
1285
1179
|
"type": {
|
|
1286
|
-
"text": "
|
|
1180
|
+
"text": "number"
|
|
1287
1181
|
}
|
|
1288
1182
|
}
|
|
1289
1183
|
]
|
|
1290
1184
|
},
|
|
1291
1185
|
{
|
|
1292
|
-
"kind": "
|
|
1293
|
-
"name": "
|
|
1294
|
-
"
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1186
|
+
"kind": "method",
|
|
1187
|
+
"name": "setYear",
|
|
1188
|
+
"privacy": "private",
|
|
1189
|
+
"parameters": [
|
|
1190
|
+
{
|
|
1191
|
+
"name": "year",
|
|
1192
|
+
"type": {
|
|
1193
|
+
"text": "number"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
]
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"kind": "method",
|
|
1200
|
+
"name": "setFocusedDay",
|
|
1201
|
+
"privacy": "private",
|
|
1202
|
+
"parameters": [
|
|
1203
|
+
{
|
|
1204
|
+
"name": "day",
|
|
1205
|
+
"type": {
|
|
1206
|
+
"text": "Date"
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
]
|
|
1305
1210
|
},
|
|
1306
1211
|
{
|
|
1307
1212
|
"kind": "field",
|
|
1308
|
-
"name": "
|
|
1309
|
-
"
|
|
1310
|
-
"text": "string | undefined"
|
|
1311
|
-
},
|
|
1312
|
-
"description": "The name of the form component.",
|
|
1313
|
-
"attribute": "name",
|
|
1314
|
-
"inheritedFrom": {
|
|
1315
|
-
"name": "InputMixin",
|
|
1316
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1317
|
-
}
|
|
1213
|
+
"name": "handleMonthSelect",
|
|
1214
|
+
"privacy": "private"
|
|
1318
1215
|
},
|
|
1319
1216
|
{
|
|
1320
1217
|
"kind": "field",
|
|
1321
|
-
"name": "
|
|
1322
|
-
"
|
|
1323
|
-
"text": "string"
|
|
1324
|
-
},
|
|
1325
|
-
"default": "\"\"",
|
|
1326
|
-
"description": "The value of the form component.",
|
|
1327
|
-
"attribute": "value",
|
|
1328
|
-
"inheritedFrom": {
|
|
1329
|
-
"name": "InputMixin",
|
|
1330
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1331
|
-
}
|
|
1218
|
+
"name": "handleYearSelect",
|
|
1219
|
+
"privacy": "private"
|
|
1332
1220
|
},
|
|
1333
1221
|
{
|
|
1334
1222
|
"kind": "field",
|
|
1335
|
-
"name": "
|
|
1336
|
-
"privacy": "
|
|
1337
|
-
"description": "Gets the form, if any, associated with the form element.",
|
|
1338
|
-
"inheritedFrom": {
|
|
1339
|
-
"name": "InputMixin",
|
|
1340
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1341
|
-
}
|
|
1223
|
+
"name": "handleNextMonthClick",
|
|
1224
|
+
"privacy": "private"
|
|
1342
1225
|
},
|
|
1343
1226
|
{
|
|
1344
1227
|
"kind": "field",
|
|
1345
|
-
"name": "
|
|
1346
|
-
"privacy": "
|
|
1347
|
-
"inheritedFrom": {
|
|
1348
|
-
"name": "FocusableMixin",
|
|
1349
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1350
|
-
}
|
|
1228
|
+
"name": "handlePreviousMonthClick",
|
|
1229
|
+
"privacy": "private"
|
|
1351
1230
|
},
|
|
1352
1231
|
{
|
|
1353
|
-
"kind": "
|
|
1354
|
-
"name": "
|
|
1355
|
-
"
|
|
1356
|
-
{
|
|
1357
|
-
"name": "options",
|
|
1358
|
-
"optional": true,
|
|
1359
|
-
"type": {
|
|
1360
|
-
"text": "FocusOptions"
|
|
1361
|
-
},
|
|
1362
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1363
|
-
}
|
|
1364
|
-
],
|
|
1365
|
-
"description": "Programmatically move focus to the component.",
|
|
1366
|
-
"inheritedFrom": {
|
|
1367
|
-
"name": "FocusableMixin",
|
|
1368
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1369
|
-
}
|
|
1232
|
+
"kind": "field",
|
|
1233
|
+
"name": "enableActiveFocus",
|
|
1234
|
+
"privacy": "private"
|
|
1370
1235
|
},
|
|
1371
1236
|
{
|
|
1372
|
-
"kind": "
|
|
1373
|
-
"name": "
|
|
1374
|
-
"
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1237
|
+
"kind": "field",
|
|
1238
|
+
"name": "disableActiveFocus",
|
|
1239
|
+
"privacy": "private"
|
|
1240
|
+
}
|
|
1241
|
+
],
|
|
1242
|
+
"events": [
|
|
1243
|
+
{
|
|
1244
|
+
"name": "nord-focus-date",
|
|
1245
|
+
"type": {
|
|
1246
|
+
"text": "DateSelectEvent"
|
|
1247
|
+
},
|
|
1248
|
+
"description": "Dispatched when the calendar's focused date changes."
|
|
1379
1249
|
},
|
|
1380
1250
|
{
|
|
1381
|
-
"
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
"
|
|
1385
|
-
|
|
1386
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1387
|
-
}
|
|
1251
|
+
"type": {
|
|
1252
|
+
"text": "DateSelectEvent"
|
|
1253
|
+
},
|
|
1254
|
+
"description": "Dispatched when a date is selected and the value changes.",
|
|
1255
|
+
"name": "change"
|
|
1388
1256
|
}
|
|
1389
1257
|
],
|
|
1390
1258
|
"attributes": [
|
|
1391
1259
|
{
|
|
1392
|
-
"name": "
|
|
1260
|
+
"name": "value",
|
|
1393
1261
|
"type": {
|
|
1394
|
-
"text": "
|
|
1262
|
+
"text": "string"
|
|
1395
1263
|
},
|
|
1396
|
-
"default": "\"
|
|
1397
|
-
"description": "The
|
|
1398
|
-
"fieldName": "
|
|
1264
|
+
"default": "\"\"",
|
|
1265
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1266
|
+
"fieldName": "value"
|
|
1399
1267
|
},
|
|
1400
1268
|
{
|
|
1401
|
-
"name": "
|
|
1269
|
+
"name": "firstDayOfWeek",
|
|
1402
1270
|
"type": {
|
|
1403
|
-
"text": "
|
|
1271
|
+
"text": "DaysOfWeek"
|
|
1404
1272
|
},
|
|
1405
|
-
"
|
|
1406
|
-
"
|
|
1407
|
-
"fieldName": "type"
|
|
1273
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1274
|
+
"fieldName": "firstDayOfWeek"
|
|
1408
1275
|
},
|
|
1409
1276
|
{
|
|
1410
|
-
"name": "
|
|
1277
|
+
"name": "min",
|
|
1411
1278
|
"type": {
|
|
1412
|
-
"text": "
|
|
1279
|
+
"text": "string"
|
|
1413
1280
|
},
|
|
1414
|
-
"default": "\"
|
|
1415
|
-
"description": "
|
|
1416
|
-
"fieldName": "
|
|
1281
|
+
"default": "\"\"",
|
|
1282
|
+
"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.",
|
|
1283
|
+
"fieldName": "min"
|
|
1417
1284
|
},
|
|
1418
1285
|
{
|
|
1419
|
-
"name": "
|
|
1286
|
+
"name": "max",
|
|
1420
1287
|
"type": {
|
|
1421
|
-
"text": "
|
|
1288
|
+
"text": "string"
|
|
1422
1289
|
},
|
|
1423
|
-
"
|
|
1290
|
+
"default": "\"\"",
|
|
1291
|
+
"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.",
|
|
1292
|
+
"fieldName": "max"
|
|
1424
1293
|
},
|
|
1425
1294
|
{
|
|
1426
|
-
"name": "
|
|
1295
|
+
"name": "expand",
|
|
1427
1296
|
"type": {
|
|
1428
|
-
"text": "
|
|
1297
|
+
"text": "boolean"
|
|
1429
1298
|
},
|
|
1430
|
-
"
|
|
1431
|
-
|
|
1299
|
+
"default": "false",
|
|
1300
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1301
|
+
"fieldName": "expand"
|
|
1302
|
+
}
|
|
1303
|
+
],
|
|
1304
|
+
"superclass": {
|
|
1305
|
+
"name": "LitElement",
|
|
1306
|
+
"package": "lit"
|
|
1307
|
+
},
|
|
1308
|
+
"status": "ready",
|
|
1309
|
+
"category": "list",
|
|
1310
|
+
"tagName": "nord-calendar",
|
|
1311
|
+
"customElement": true
|
|
1312
|
+
}
|
|
1313
|
+
],
|
|
1314
|
+
"exports": [
|
|
1315
|
+
{
|
|
1316
|
+
"kind": "js",
|
|
1317
|
+
"name": "default",
|
|
1318
|
+
"declaration": {
|
|
1319
|
+
"name": "Calendar",
|
|
1320
|
+
"module": "src/calendar/Calendar.ts"
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"kind": "custom-element-definition",
|
|
1325
|
+
"name": "nord-calendar",
|
|
1326
|
+
"declaration": {
|
|
1327
|
+
"name": "Calendar",
|
|
1328
|
+
"module": "src/calendar/Calendar.ts"
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
],
|
|
1332
|
+
"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"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"kind": "javascript-module",
|
|
1336
|
+
"path": "src/calendar/DateSelectEvent.ts",
|
|
1337
|
+
"declarations": [
|
|
1338
|
+
{
|
|
1339
|
+
"kind": "class",
|
|
1340
|
+
"description": "",
|
|
1341
|
+
"name": "DateSelectEvent",
|
|
1342
|
+
"members": [
|
|
1432
1343
|
{
|
|
1433
|
-
"
|
|
1344
|
+
"kind": "field",
|
|
1345
|
+
"name": "date",
|
|
1434
1346
|
"type": {
|
|
1435
|
-
"text": "
|
|
1347
|
+
"text": "Date"
|
|
1436
1348
|
},
|
|
1437
|
-
"
|
|
1438
|
-
|
|
1439
|
-
|
|
1349
|
+
"default": "date"
|
|
1350
|
+
}
|
|
1351
|
+
],
|
|
1352
|
+
"superclass": {
|
|
1353
|
+
"name": "NordEvent",
|
|
1354
|
+
"module": "/src/common/events.js"
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
],
|
|
1358
|
+
"exports": [
|
|
1359
|
+
{
|
|
1360
|
+
"kind": "js",
|
|
1361
|
+
"name": "DateSelectEvent",
|
|
1362
|
+
"declaration": {
|
|
1363
|
+
"name": "DateSelectEvent",
|
|
1364
|
+
"module": "src/calendar/DateSelectEvent.ts"
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
],
|
|
1368
|
+
"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"
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"kind": "javascript-module",
|
|
1372
|
+
"path": "src/calendar/localization.ts",
|
|
1373
|
+
"declarations": [
|
|
1374
|
+
{
|
|
1375
|
+
"kind": "variable",
|
|
1376
|
+
"name": "calendarLocalization",
|
|
1377
|
+
"type": {
|
|
1378
|
+
"text": "object"
|
|
1379
|
+
},
|
|
1380
|
+
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
"exports": [
|
|
1384
|
+
{
|
|
1385
|
+
"kind": "js",
|
|
1386
|
+
"name": "default",
|
|
1387
|
+
"declaration": {
|
|
1388
|
+
"name": "calendarLocalization",
|
|
1389
|
+
"module": "src/calendar/localization.ts"
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
],
|
|
1393
|
+
"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"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"kind": "javascript-module",
|
|
1397
|
+
"path": "src/calendar/month-view.ts",
|
|
1398
|
+
"declarations": [
|
|
1399
|
+
{
|
|
1400
|
+
"kind": "function",
|
|
1401
|
+
"name": "dayView",
|
|
1402
|
+
"parameters": [
|
|
1403
|
+
{
|
|
1404
|
+
"name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
|
|
1405
|
+
"type": {
|
|
1406
|
+
"text": "DatePickerDayProps"
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
]
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"kind": "function",
|
|
1413
|
+
"name": "monthView",
|
|
1414
|
+
"parameters": [
|
|
1415
|
+
{
|
|
1416
|
+
"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}",
|
|
1417
|
+
"type": {
|
|
1418
|
+
"text": "MonthViewArgs"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
]
|
|
1422
|
+
}
|
|
1423
|
+
],
|
|
1424
|
+
"exports": [
|
|
1425
|
+
{
|
|
1426
|
+
"kind": "js",
|
|
1427
|
+
"name": "dayView",
|
|
1428
|
+
"declaration": {
|
|
1429
|
+
"name": "dayView",
|
|
1430
|
+
"module": "src/calendar/month-view.ts"
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"kind": "js",
|
|
1435
|
+
"name": "monthView",
|
|
1436
|
+
"declaration": {
|
|
1437
|
+
"name": "monthView",
|
|
1438
|
+
"module": "src/calendar/month-view.ts"
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
],
|
|
1442
|
+
"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"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"kind": "javascript-module",
|
|
1446
|
+
"path": "src/banner/Banner.ts",
|
|
1447
|
+
"declarations": [
|
|
1448
|
+
{
|
|
1449
|
+
"kind": "class",
|
|
1450
|
+
"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.",
|
|
1451
|
+
"name": "Banner",
|
|
1452
|
+
"slots": [
|
|
1453
|
+
{
|
|
1454
|
+
"description": "default slot",
|
|
1455
|
+
"name": ""
|
|
1456
|
+
}
|
|
1457
|
+
],
|
|
1458
|
+
"members": [
|
|
1459
|
+
{
|
|
1460
|
+
"kind": "field",
|
|
1461
|
+
"name": "variant",
|
|
1462
|
+
"type": {
|
|
1463
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1464
|
+
},
|
|
1465
|
+
"default": "\"info\"",
|
|
1466
|
+
"description": "The style variant of the banner.",
|
|
1467
|
+
"attribute": "variant",
|
|
1468
|
+
"reflects": true
|
|
1469
|
+
}
|
|
1470
|
+
],
|
|
1471
|
+
"attributes": [
|
|
1472
|
+
{
|
|
1473
|
+
"name": "variant",
|
|
1474
|
+
"type": {
|
|
1475
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1476
|
+
},
|
|
1477
|
+
"default": "\"info\"",
|
|
1478
|
+
"description": "The style variant of the banner.",
|
|
1479
|
+
"fieldName": "variant"
|
|
1480
|
+
}
|
|
1481
|
+
],
|
|
1482
|
+
"superclass": {
|
|
1483
|
+
"name": "LitElement",
|
|
1484
|
+
"package": "lit"
|
|
1485
|
+
},
|
|
1486
|
+
"status": "new",
|
|
1487
|
+
"category": "feedback",
|
|
1488
|
+
"tagName": "nord-banner",
|
|
1489
|
+
"customElement": true
|
|
1490
|
+
}
|
|
1491
|
+
],
|
|
1492
|
+
"exports": [
|
|
1493
|
+
{
|
|
1494
|
+
"kind": "js",
|
|
1495
|
+
"name": "default",
|
|
1496
|
+
"declaration": {
|
|
1497
|
+
"name": "Banner",
|
|
1498
|
+
"module": "src/banner/Banner.ts"
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"kind": "custom-element-definition",
|
|
1503
|
+
"name": "nord-banner",
|
|
1504
|
+
"declaration": {
|
|
1505
|
+
"name": "Banner",
|
|
1506
|
+
"module": "src/banner/Banner.ts"
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
"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"
|
|
1511
|
+
},
|
|
1512
|
+
{
|
|
1513
|
+
"kind": "javascript-module",
|
|
1514
|
+
"path": "src/card/Card.ts",
|
|
1515
|
+
"declarations": [
|
|
1516
|
+
{
|
|
1517
|
+
"kind": "class",
|
|
1518
|
+
"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.",
|
|
1519
|
+
"name": "Card",
|
|
1520
|
+
"slots": [
|
|
1440
1521
|
{
|
|
1441
|
-
"
|
|
1442
|
-
"
|
|
1443
|
-
"text": "boolean"
|
|
1444
|
-
},
|
|
1445
|
-
"default": "false",
|
|
1446
|
-
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1447
|
-
"fieldName": "download"
|
|
1522
|
+
"description": "The card content.",
|
|
1523
|
+
"name": ""
|
|
1448
1524
|
},
|
|
1449
1525
|
{
|
|
1450
|
-
"
|
|
1451
|
-
"
|
|
1452
|
-
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1453
|
-
},
|
|
1454
|
-
"default": "\"_self\"",
|
|
1455
|
-
"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.",
|
|
1456
|
-
"fieldName": "target"
|
|
1526
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1527
|
+
"name": "header"
|
|
1457
1528
|
},
|
|
1458
1529
|
{
|
|
1459
|
-
"
|
|
1460
|
-
"
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1465
|
-
"fieldName": "expand"
|
|
1466
|
-
},
|
|
1530
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1531
|
+
"name": "footer"
|
|
1532
|
+
}
|
|
1533
|
+
],
|
|
1534
|
+
"members": [
|
|
1467
1535
|
{
|
|
1468
|
-
"
|
|
1469
|
-
"
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
"default": "false",
|
|
1473
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1474
|
-
"fieldName": "disabled",
|
|
1475
|
-
"inheritedFrom": {
|
|
1476
|
-
"name": "InputMixin",
|
|
1477
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1478
|
-
}
|
|
1536
|
+
"kind": "field",
|
|
1537
|
+
"name": "headerSlot",
|
|
1538
|
+
"privacy": "private",
|
|
1539
|
+
"default": "new SlotController(this, \"header\")"
|
|
1479
1540
|
},
|
|
1480
1541
|
{
|
|
1481
|
-
"
|
|
1482
|
-
"
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
"description": "The name of the form component.",
|
|
1486
|
-
"fieldName": "name",
|
|
1487
|
-
"inheritedFrom": {
|
|
1488
|
-
"name": "InputMixin",
|
|
1489
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1490
|
-
}
|
|
1542
|
+
"kind": "field",
|
|
1543
|
+
"name": "footerSlot",
|
|
1544
|
+
"privacy": "private",
|
|
1545
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1491
1546
|
},
|
|
1492
1547
|
{
|
|
1493
|
-
"
|
|
1548
|
+
"kind": "field",
|
|
1549
|
+
"name": "padding",
|
|
1494
1550
|
"type": {
|
|
1495
|
-
"text": "
|
|
1551
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1496
1552
|
},
|
|
1497
|
-
"default": "\"\"",
|
|
1498
|
-
"description": "
|
|
1499
|
-
"
|
|
1500
|
-
"
|
|
1501
|
-
"name": "InputMixin",
|
|
1502
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1503
|
-
}
|
|
1553
|
+
"default": "\"m\"",
|
|
1554
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1555
|
+
"attribute": "padding",
|
|
1556
|
+
"reflects": true
|
|
1504
1557
|
}
|
|
1505
1558
|
],
|
|
1506
|
-
"
|
|
1507
|
-
{
|
|
1508
|
-
"name": "InputMixin",
|
|
1509
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
1510
|
-
},
|
|
1559
|
+
"attributes": [
|
|
1511
1560
|
{
|
|
1512
|
-
"name": "
|
|
1513
|
-
"
|
|
1561
|
+
"name": "padding",
|
|
1562
|
+
"type": {
|
|
1563
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1564
|
+
},
|
|
1565
|
+
"default": "\"m\"",
|
|
1566
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1567
|
+
"fieldName": "padding"
|
|
1514
1568
|
}
|
|
1515
1569
|
],
|
|
1516
1570
|
"superclass": {
|
|
@@ -1518,8 +1572,8 @@
|
|
|
1518
1572
|
"package": "lit"
|
|
1519
1573
|
},
|
|
1520
1574
|
"status": "ready",
|
|
1521
|
-
"category": "
|
|
1522
|
-
"tagName": "nord-
|
|
1575
|
+
"category": "structure",
|
|
1576
|
+
"tagName": "nord-card",
|
|
1523
1577
|
"customElement": true
|
|
1524
1578
|
}
|
|
1525
1579
|
],
|
|
@@ -1528,20 +1582,20 @@
|
|
|
1528
1582
|
"kind": "js",
|
|
1529
1583
|
"name": "default",
|
|
1530
1584
|
"declaration": {
|
|
1531
|
-
"name": "
|
|
1532
|
-
"module": "src/
|
|
1585
|
+
"name": "Card",
|
|
1586
|
+
"module": "src/card/Card.ts"
|
|
1533
1587
|
}
|
|
1534
1588
|
},
|
|
1535
1589
|
{
|
|
1536
1590
|
"kind": "custom-element-definition",
|
|
1537
|
-
"name": "nord-
|
|
1591
|
+
"name": "nord-card",
|
|
1538
1592
|
"declaration": {
|
|
1539
|
-
"name": "
|
|
1540
|
-
"module": "src/
|
|
1593
|
+
"name": "Card",
|
|
1594
|
+
"module": "src/card/Card.ts"
|
|
1541
1595
|
}
|
|
1542
1596
|
}
|
|
1543
1597
|
],
|
|
1544
|
-
"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
|
|
1598
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
1545
1599
|
},
|
|
1546
1600
|
{
|
|
1547
1601
|
"kind": "javascript-module",
|
|
@@ -2190,6 +2244,12 @@
|
|
|
2190
2244
|
},
|
|
2191
2245
|
"privacy": "private"
|
|
2192
2246
|
},
|
|
2247
|
+
{
|
|
2248
|
+
"kind": "field",
|
|
2249
|
+
"name": "localize",
|
|
2250
|
+
"privacy": "private",
|
|
2251
|
+
"default": "new LocalizeController<\"nord-command-menu\">(this)"
|
|
2252
|
+
},
|
|
2193
2253
|
{
|
|
2194
2254
|
"kind": "field",
|
|
2195
2255
|
"name": "dismissController",
|
|
@@ -2717,6 +2777,31 @@
|
|
|
2717
2777
|
],
|
|
2718
2778
|
"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 provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
|
|
2719
2779
|
},
|
|
2780
|
+
{
|
|
2781
|
+
"kind": "javascript-module",
|
|
2782
|
+
"path": "src/command-menu/localization.ts",
|
|
2783
|
+
"declarations": [
|
|
2784
|
+
{
|
|
2785
|
+
"kind": "variable",
|
|
2786
|
+
"name": "commandMenuLocalization",
|
|
2787
|
+
"type": {
|
|
2788
|
+
"text": "object"
|
|
2789
|
+
},
|
|
2790
|
+
"default": "{\n instructions: \"Press 'Enter' to confirm your input or 'Escape' to cancel\",\n inputLabel: \"Type the name of a command to run.\",\n footerArrowKeys: \"Navigate\",\n footerEnterKey: \"Select\",\n footerEscapeKey: \"Esc to dismiss\",\n footerBackspaceKey: \"Move to parent\",\n noResults: (searchTerm: string) => `No results for “${searchTerm}”`,\n tip: \"Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.\",\n}"
|
|
2791
|
+
}
|
|
2792
|
+
],
|
|
2793
|
+
"exports": [
|
|
2794
|
+
{
|
|
2795
|
+
"kind": "js",
|
|
2796
|
+
"name": "default",
|
|
2797
|
+
"declaration": {
|
|
2798
|
+
"name": "commandMenuLocalization",
|
|
2799
|
+
"module": "src/command-menu/localization.ts"
|
|
2800
|
+
}
|
|
2801
|
+
}
|
|
2802
|
+
],
|
|
2803
|
+
"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 provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
|
|
2804
|
+
},
|
|
2720
2805
|
{
|
|
2721
2806
|
"kind": "javascript-module",
|
|
2722
2807
|
"path": "src/common/attribute.ts",
|
|
@@ -2869,7 +2954,7 @@
|
|
|
2869
2954
|
{
|
|
2870
2955
|
"name": "mapFn",
|
|
2871
2956
|
"type": {
|
|
2872
|
-
"text": "(item: T) => U"
|
|
2957
|
+
"text": "(item: T, i: number) => U"
|
|
2873
2958
|
}
|
|
2874
2959
|
}
|
|
2875
2960
|
],
|
|
@@ -2972,6 +3057,42 @@
|
|
|
2972
3057
|
],
|
|
2973
3058
|
"description": "print date in format YYYY-MM-DD"
|
|
2974
3059
|
},
|
|
3060
|
+
{
|
|
3061
|
+
"kind": "function",
|
|
3062
|
+
"name": "getDayNames",
|
|
3063
|
+
"parameters": [
|
|
3064
|
+
{
|
|
3065
|
+
"name": "locale",
|
|
3066
|
+
"type": {
|
|
3067
|
+
"text": "string"
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3070
|
+
{
|
|
3071
|
+
"name": "weekday",
|
|
3072
|
+
"type": {
|
|
3073
|
+
"text": "Exclude<Intl.DateTimeFormatOptions[\"weekday\"], undefined>"
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
]
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
"kind": "function",
|
|
3080
|
+
"name": "getMonthNames",
|
|
3081
|
+
"parameters": [
|
|
3082
|
+
{
|
|
3083
|
+
"name": "locale",
|
|
3084
|
+
"type": {
|
|
3085
|
+
"text": "string"
|
|
3086
|
+
}
|
|
3087
|
+
},
|
|
3088
|
+
{
|
|
3089
|
+
"name": "month",
|
|
3090
|
+
"type": {
|
|
3091
|
+
"text": "Exclude<Intl.DateTimeFormatOptions[\"month\"], undefined>"
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
]
|
|
3095
|
+
},
|
|
2975
3096
|
{
|
|
2976
3097
|
"kind": "function",
|
|
2977
3098
|
"name": "isEqualMonth",
|
|
@@ -3336,6 +3457,22 @@
|
|
|
3336
3457
|
"module": "src/common/dates.ts"
|
|
3337
3458
|
}
|
|
3338
3459
|
},
|
|
3460
|
+
{
|
|
3461
|
+
"kind": "js",
|
|
3462
|
+
"name": "getDayNames",
|
|
3463
|
+
"declaration": {
|
|
3464
|
+
"name": "getDayNames",
|
|
3465
|
+
"module": "src/common/dates.ts"
|
|
3466
|
+
}
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
"kind": "js",
|
|
3470
|
+
"name": "getMonthNames",
|
|
3471
|
+
"declaration": {
|
|
3472
|
+
"name": "getMonthNames",
|
|
3473
|
+
"module": "src/common/dates.ts"
|
|
3474
|
+
}
|
|
3475
|
+
},
|
|
3339
3476
|
{
|
|
3340
3477
|
"kind": "js",
|
|
3341
3478
|
"name": "isEqualMonth",
|
|
@@ -3873,6 +4010,12 @@
|
|
|
3873
4010
|
"privacy": "private",
|
|
3874
4011
|
"default": "new SwipeController(this, {\n target: () => this.dialog,\n matchesGesture: isDownwardsSwipe,\n onSwipeEnd: () => this.hide(false),\n })"
|
|
3875
4012
|
},
|
|
4013
|
+
{
|
|
4014
|
+
"kind": "field",
|
|
4015
|
+
"name": "localize",
|
|
4016
|
+
"privacy": "private",
|
|
4017
|
+
"default": "new LocalizeController<\"nord-date-picker\">(this, {\n onLangChange: () => this.createDateFormatters(),\n })"
|
|
4018
|
+
},
|
|
3876
4019
|
{
|
|
3877
4020
|
"kind": "field",
|
|
3878
4021
|
"name": "dateFormatLong",
|
|
@@ -3960,15 +4103,6 @@
|
|
|
3960
4103
|
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
3961
4104
|
"attribute": "first-day-of-week"
|
|
3962
4105
|
},
|
|
3963
|
-
{
|
|
3964
|
-
"kind": "field",
|
|
3965
|
-
"name": "localization",
|
|
3966
|
-
"type": {
|
|
3967
|
-
"text": "DatePickerLocalizedText"
|
|
3968
|
-
},
|
|
3969
|
-
"default": "localization",
|
|
3970
|
-
"description": "Button labels, day names, month names, etc, used for localization.\nDefault is English."
|
|
3971
|
-
},
|
|
3972
4106
|
{
|
|
3973
4107
|
"kind": "field",
|
|
3974
4108
|
"name": "dateAdapter",
|
|
@@ -4690,15 +4824,15 @@
|
|
|
4690
4824
|
},
|
|
4691
4825
|
{
|
|
4692
4826
|
"kind": "javascript-module",
|
|
4693
|
-
"path": "src/date-picker/
|
|
4827
|
+
"path": "src/date-picker/localization.ts",
|
|
4694
4828
|
"declarations": [
|
|
4695
4829
|
{
|
|
4696
4830
|
"kind": "variable",
|
|
4697
|
-
"name": "
|
|
4831
|
+
"name": "datePickerLocalization",
|
|
4698
4832
|
"type": {
|
|
4699
|
-
"text": "
|
|
4833
|
+
"text": "object"
|
|
4700
4834
|
},
|
|
4701
|
-
"default": "{\n
|
|
4835
|
+
"default": "{\n modalHeading: \"Choose a date\",\n closeLabel: \"Close window\",\n buttonLabel: \"Choose date\",\n selectedDateMessage: \"Selected date is\",\n}"
|
|
4702
4836
|
}
|
|
4703
4837
|
],
|
|
4704
4838
|
"exports": [
|
|
@@ -4706,8 +4840,8 @@
|
|
|
4706
4840
|
"kind": "js",
|
|
4707
4841
|
"name": "default",
|
|
4708
4842
|
"declaration": {
|
|
4709
|
-
"name": "
|
|
4710
|
-
"module": "src/date-picker/
|
|
4843
|
+
"name": "datePickerLocalization",
|
|
4844
|
+
"module": "src/date-picker/localization.ts"
|
|
4711
4845
|
}
|
|
4712
4846
|
}
|
|
4713
4847
|
],
|
|
@@ -4732,15 +4866,6 @@
|
|
|
4732
4866
|
}
|
|
4733
4867
|
],
|
|
4734
4868
|
"members": [
|
|
4735
|
-
{
|
|
4736
|
-
"kind": "field",
|
|
4737
|
-
"name": "shadowRootOptions",
|
|
4738
|
-
"type": {
|
|
4739
|
-
"text": "object"
|
|
4740
|
-
},
|
|
4741
|
-
"static": true,
|
|
4742
|
-
"default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }"
|
|
4743
|
-
},
|
|
4744
4869
|
{
|
|
4745
4870
|
"kind": "field",
|
|
4746
4871
|
"name": "popout",
|
|
@@ -4797,20 +4922,6 @@
|
|
|
4797
4922
|
"kind": "method",
|
|
4798
4923
|
"name": "handleOpen",
|
|
4799
4924
|
"privacy": "private"
|
|
4800
|
-
},
|
|
4801
|
-
{
|
|
4802
|
-
"kind": "field",
|
|
4803
|
-
"name": "_warningLogged",
|
|
4804
|
-
"type": {
|
|
4805
|
-
"text": "boolean"
|
|
4806
|
-
},
|
|
4807
|
-
"privacy": "private",
|
|
4808
|
-
"static": true,
|
|
4809
|
-
"default": "false",
|
|
4810
|
-
"inheritedFrom": {
|
|
4811
|
-
"name": "DraftComponentMixin",
|
|
4812
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
4813
|
-
}
|
|
4814
4925
|
}
|
|
4815
4926
|
],
|
|
4816
4927
|
"attributes": [
|
|
@@ -4840,17 +4951,11 @@
|
|
|
4840
4951
|
"fieldName": "expand"
|
|
4841
4952
|
}
|
|
4842
4953
|
],
|
|
4843
|
-
"mixins": [
|
|
4844
|
-
{
|
|
4845
|
-
"name": "DraftComponentMixin",
|
|
4846
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
4847
|
-
}
|
|
4848
|
-
],
|
|
4849
4954
|
"superclass": {
|
|
4850
4955
|
"name": "LitElement",
|
|
4851
4956
|
"package": "lit"
|
|
4852
4957
|
},
|
|
4853
|
-
"status": "
|
|
4958
|
+
"status": "new",
|
|
4854
4959
|
"category": "action",
|
|
4855
4960
|
"tagName": "nord-dropdown",
|
|
4856
4961
|
"customElement": true
|
|
@@ -4899,20 +5004,6 @@
|
|
|
4899
5004
|
},
|
|
4900
5005
|
"description": "Heading and accessible label for the dropdown group.",
|
|
4901
5006
|
"attribute": "heading"
|
|
4902
|
-
},
|
|
4903
|
-
{
|
|
4904
|
-
"kind": "field",
|
|
4905
|
-
"name": "_warningLogged",
|
|
4906
|
-
"type": {
|
|
4907
|
-
"text": "boolean"
|
|
4908
|
-
},
|
|
4909
|
-
"privacy": "private",
|
|
4910
|
-
"static": true,
|
|
4911
|
-
"default": "false",
|
|
4912
|
-
"inheritedFrom": {
|
|
4913
|
-
"name": "DraftComponentMixin",
|
|
4914
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
4915
|
-
}
|
|
4916
5007
|
}
|
|
4917
5008
|
],
|
|
4918
5009
|
"attributes": [
|
|
@@ -4925,17 +5016,11 @@
|
|
|
4925
5016
|
"fieldName": "heading"
|
|
4926
5017
|
}
|
|
4927
5018
|
],
|
|
4928
|
-
"mixins": [
|
|
4929
|
-
{
|
|
4930
|
-
"name": "DraftComponentMixin",
|
|
4931
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
4932
|
-
}
|
|
4933
|
-
],
|
|
4934
5019
|
"superclass": {
|
|
4935
5020
|
"name": "LitElement",
|
|
4936
5021
|
"package": "lit"
|
|
4937
5022
|
},
|
|
4938
|
-
"status": "
|
|
5023
|
+
"status": "new",
|
|
4939
5024
|
"category": "action",
|
|
4940
5025
|
"tagName": "nord-dropdown-group",
|
|
4941
5026
|
"customElement": true
|
|
@@ -5028,30 +5113,16 @@
|
|
|
5028
5113
|
"description": "Programmatically remove focus from the component.",
|
|
5029
5114
|
"inheritedFrom": {
|
|
5030
5115
|
"name": "FocusableMixin",
|
|
5031
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
5032
|
-
}
|
|
5033
|
-
},
|
|
5034
|
-
{
|
|
5035
|
-
"kind": "method",
|
|
5036
|
-
"name": "click",
|
|
5037
|
-
"description": "Programmatically simulates a click on the component.",
|
|
5038
|
-
"inheritedFrom": {
|
|
5039
|
-
"name": "FocusableMixin",
|
|
5040
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
5041
|
-
}
|
|
5042
|
-
},
|
|
5043
|
-
{
|
|
5044
|
-
"kind": "field",
|
|
5045
|
-
"name": "_warningLogged",
|
|
5046
|
-
"type": {
|
|
5047
|
-
"text": "boolean"
|
|
5048
|
-
},
|
|
5049
|
-
"privacy": "private",
|
|
5050
|
-
"static": true,
|
|
5051
|
-
"default": "false",
|
|
5116
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
5117
|
+
}
|
|
5118
|
+
},
|
|
5119
|
+
{
|
|
5120
|
+
"kind": "method",
|
|
5121
|
+
"name": "click",
|
|
5122
|
+
"description": "Programmatically simulates a click on the component.",
|
|
5052
5123
|
"inheritedFrom": {
|
|
5053
|
-
"name": "
|
|
5054
|
-
"module": "src/common/mixins/
|
|
5124
|
+
"name": "FocusableMixin",
|
|
5125
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
5055
5126
|
}
|
|
5056
5127
|
}
|
|
5057
5128
|
],
|
|
@@ -5069,17 +5140,13 @@
|
|
|
5069
5140
|
{
|
|
5070
5141
|
"name": "FocusableMixin",
|
|
5071
5142
|
"module": "/src/common/mixins/FocusableMixin.js"
|
|
5072
|
-
},
|
|
5073
|
-
{
|
|
5074
|
-
"name": "DraftComponentMixin",
|
|
5075
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5076
5143
|
}
|
|
5077
5144
|
],
|
|
5078
5145
|
"superclass": {
|
|
5079
5146
|
"name": "LitElement",
|
|
5080
5147
|
"package": "lit"
|
|
5081
5148
|
},
|
|
5082
|
-
"status": "
|
|
5149
|
+
"status": "new",
|
|
5083
5150
|
"category": "action",
|
|
5084
5151
|
"tagName": "nord-dropdown-item",
|
|
5085
5152
|
"customElement": true
|
|
@@ -5296,42 +5363,22 @@
|
|
|
5296
5363
|
},
|
|
5297
5364
|
{
|
|
5298
5365
|
"description": "Optional slot for buttons, toggles, etc.",
|
|
5299
|
-
"name": "
|
|
5366
|
+
"name": "end"
|
|
5300
5367
|
}
|
|
5301
5368
|
],
|
|
5302
5369
|
"members": [
|
|
5303
5370
|
{
|
|
5304
5371
|
"kind": "field",
|
|
5305
|
-
"name": "
|
|
5306
|
-
"privacy": "private",
|
|
5307
|
-
"default": "new SlotController(this, \"action\")"
|
|
5308
|
-
},
|
|
5309
|
-
{
|
|
5310
|
-
"kind": "field",
|
|
5311
|
-
"name": "_warningLogged",
|
|
5312
|
-
"type": {
|
|
5313
|
-
"text": "boolean"
|
|
5314
|
-
},
|
|
5372
|
+
"name": "endSlot",
|
|
5315
5373
|
"privacy": "private",
|
|
5316
|
-
"
|
|
5317
|
-
"default": "false",
|
|
5318
|
-
"inheritedFrom": {
|
|
5319
|
-
"name": "DraftComponentMixin",
|
|
5320
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
5321
|
-
}
|
|
5322
|
-
}
|
|
5323
|
-
],
|
|
5324
|
-
"mixins": [
|
|
5325
|
-
{
|
|
5326
|
-
"name": "DraftComponentMixin",
|
|
5327
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5374
|
+
"default": "new SlotController(this, \"end\")"
|
|
5328
5375
|
}
|
|
5329
5376
|
],
|
|
5330
5377
|
"superclass": {
|
|
5331
5378
|
"name": "LitElement",
|
|
5332
5379
|
"package": "lit"
|
|
5333
5380
|
},
|
|
5334
|
-
"status": "
|
|
5381
|
+
"status": "new",
|
|
5335
5382
|
"category": "structure",
|
|
5336
5383
|
"tagName": "nord-header",
|
|
5337
5384
|
"customElement": true
|
|
@@ -5480,7 +5527,7 @@
|
|
|
5480
5527
|
"text": "string"
|
|
5481
5528
|
},
|
|
5482
5529
|
"default": "\"\"",
|
|
5483
|
-
"description": "The name of the icon to display, as defined by nordicons.",
|
|
5530
|
+
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
5484
5531
|
"attribute": "name",
|
|
5485
5532
|
"reflects": true
|
|
5486
5533
|
},
|
|
@@ -5542,7 +5589,7 @@
|
|
|
5542
5589
|
"text": "string"
|
|
5543
5590
|
},
|
|
5544
5591
|
"default": "\"\"",
|
|
5545
|
-
"description": "The name of the icon to display, as defined by nordicons.",
|
|
5592
|
+
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
5546
5593
|
"fieldName": "name"
|
|
5547
5594
|
},
|
|
5548
5595
|
{
|
|
@@ -5599,7 +5646,7 @@
|
|
|
5599
5646
|
}
|
|
5600
5647
|
}
|
|
5601
5648
|
],
|
|
5602
|
-
"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 provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
|
|
5649
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
|
|
5603
5650
|
},
|
|
5604
5651
|
{
|
|
5605
5652
|
"kind": "javascript-module",
|
|
@@ -6307,6 +6354,266 @@
|
|
|
6307
6354
|
],
|
|
6308
6355
|
"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- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n"
|
|
6309
6356
|
},
|
|
6357
|
+
{
|
|
6358
|
+
"kind": "javascript-module",
|
|
6359
|
+
"path": "src/localization/LocalizeController.ts",
|
|
6360
|
+
"declarations": [
|
|
6361
|
+
{
|
|
6362
|
+
"kind": "class",
|
|
6363
|
+
"description": "",
|
|
6364
|
+
"name": "LocalizeController",
|
|
6365
|
+
"members": [
|
|
6366
|
+
{
|
|
6367
|
+
"kind": "field",
|
|
6368
|
+
"name": "unsubscribe",
|
|
6369
|
+
"type": {
|
|
6370
|
+
"text": "ReturnType<typeof subscribe> | undefined"
|
|
6371
|
+
},
|
|
6372
|
+
"privacy": "private"
|
|
6373
|
+
},
|
|
6374
|
+
{
|
|
6375
|
+
"kind": "field",
|
|
6376
|
+
"name": "resolvedTranslation",
|
|
6377
|
+
"type": {
|
|
6378
|
+
"text": "Translation"
|
|
6379
|
+
},
|
|
6380
|
+
"privacy": "private"
|
|
6381
|
+
},
|
|
6382
|
+
{
|
|
6383
|
+
"kind": "field",
|
|
6384
|
+
"name": "lang",
|
|
6385
|
+
"description": "The lang of the document or element, with element taking precedence"
|
|
6386
|
+
},
|
|
6387
|
+
{
|
|
6388
|
+
"kind": "field",
|
|
6389
|
+
"name": "resolvedLang",
|
|
6390
|
+
"description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation"
|
|
6391
|
+
},
|
|
6392
|
+
{
|
|
6393
|
+
"kind": "method",
|
|
6394
|
+
"name": "hostConnected"
|
|
6395
|
+
},
|
|
6396
|
+
{
|
|
6397
|
+
"kind": "method",
|
|
6398
|
+
"name": "hostDisconnected"
|
|
6399
|
+
},
|
|
6400
|
+
{
|
|
6401
|
+
"kind": "method",
|
|
6402
|
+
"name": "term",
|
|
6403
|
+
"return": {
|
|
6404
|
+
"type": {
|
|
6405
|
+
"text": "Result<Translation[TComponentName], Key>"
|
|
6406
|
+
}
|
|
6407
|
+
},
|
|
6408
|
+
"parameters": [
|
|
6409
|
+
{
|
|
6410
|
+
"name": "key",
|
|
6411
|
+
"type": {
|
|
6412
|
+
"text": "Key"
|
|
6413
|
+
}
|
|
6414
|
+
},
|
|
6415
|
+
{
|
|
6416
|
+
"name": "args",
|
|
6417
|
+
"type": {
|
|
6418
|
+
"text": "FuncParams<Translation[TComponentName], Key>"
|
|
6419
|
+
}
|
|
6420
|
+
}
|
|
6421
|
+
]
|
|
6422
|
+
},
|
|
6423
|
+
{
|
|
6424
|
+
"kind": "field",
|
|
6425
|
+
"name": "handleLangChange",
|
|
6426
|
+
"privacy": "private"
|
|
6427
|
+
},
|
|
6428
|
+
{
|
|
6429
|
+
"kind": "field",
|
|
6430
|
+
"name": "host",
|
|
6431
|
+
"default": "host"
|
|
6432
|
+
},
|
|
6433
|
+
{
|
|
6434
|
+
"kind": "field",
|
|
6435
|
+
"name": "options",
|
|
6436
|
+
"default": "options"
|
|
6437
|
+
}
|
|
6438
|
+
]
|
|
6439
|
+
}
|
|
6440
|
+
],
|
|
6441
|
+
"exports": [
|
|
6442
|
+
{
|
|
6443
|
+
"kind": "js",
|
|
6444
|
+
"name": "LocalizeController",
|
|
6445
|
+
"declaration": {
|
|
6446
|
+
"name": "LocalizeController",
|
|
6447
|
+
"module": "src/localization/LocalizeController.ts"
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
]
|
|
6451
|
+
},
|
|
6452
|
+
{
|
|
6453
|
+
"kind": "javascript-module",
|
|
6454
|
+
"path": "src/localization/en-us.ts",
|
|
6455
|
+
"declarations": [
|
|
6456
|
+
{
|
|
6457
|
+
"kind": "variable",
|
|
6458
|
+
"name": "en",
|
|
6459
|
+
"type": {
|
|
6460
|
+
"text": "object"
|
|
6461
|
+
},
|
|
6462
|
+
"default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n}"
|
|
6463
|
+
}
|
|
6464
|
+
],
|
|
6465
|
+
"exports": [
|
|
6466
|
+
{
|
|
6467
|
+
"kind": "js",
|
|
6468
|
+
"name": "default",
|
|
6469
|
+
"declaration": {
|
|
6470
|
+
"name": "en",
|
|
6471
|
+
"module": "src/localization/en-us.ts"
|
|
6472
|
+
}
|
|
6473
|
+
}
|
|
6474
|
+
]
|
|
6475
|
+
},
|
|
6476
|
+
{
|
|
6477
|
+
"kind": "javascript-module",
|
|
6478
|
+
"path": "src/localization/fi-fi.ts",
|
|
6479
|
+
"declarations": [
|
|
6480
|
+
{
|
|
6481
|
+
"kind": "variable",
|
|
6482
|
+
"name": "fi",
|
|
6483
|
+
"type": {
|
|
6484
|
+
"text": "Translation"
|
|
6485
|
+
},
|
|
6486
|
+
"default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n}"
|
|
6487
|
+
}
|
|
6488
|
+
],
|
|
6489
|
+
"exports": [
|
|
6490
|
+
{
|
|
6491
|
+
"kind": "js",
|
|
6492
|
+
"name": "default",
|
|
6493
|
+
"declaration": {
|
|
6494
|
+
"name": "fi",
|
|
6495
|
+
"module": "src/localization/fi-fi.ts"
|
|
6496
|
+
}
|
|
6497
|
+
}
|
|
6498
|
+
]
|
|
6499
|
+
},
|
|
6500
|
+
{
|
|
6501
|
+
"kind": "javascript-module",
|
|
6502
|
+
"path": "src/localization/translation.ts",
|
|
6503
|
+
"declarations": [
|
|
6504
|
+
{
|
|
6505
|
+
"kind": "function",
|
|
6506
|
+
"name": "clearTranslations",
|
|
6507
|
+
"description": "Removes all registered translations"
|
|
6508
|
+
},
|
|
6509
|
+
{
|
|
6510
|
+
"kind": "function",
|
|
6511
|
+
"name": "registerTranslation",
|
|
6512
|
+
"parameters": [
|
|
6513
|
+
{
|
|
6514
|
+
"name": "translation",
|
|
6515
|
+
"type": {
|
|
6516
|
+
"text": "Translation[]"
|
|
6517
|
+
}
|
|
6518
|
+
}
|
|
6519
|
+
],
|
|
6520
|
+
"description": "Registers one or more translations"
|
|
6521
|
+
},
|
|
6522
|
+
{
|
|
6523
|
+
"kind": "function",
|
|
6524
|
+
"name": "subscribe",
|
|
6525
|
+
"return": {
|
|
6526
|
+
"type": {
|
|
6527
|
+
"text": ""
|
|
6528
|
+
}
|
|
6529
|
+
},
|
|
6530
|
+
"parameters": [
|
|
6531
|
+
{
|
|
6532
|
+
"name": "onChange",
|
|
6533
|
+
"type": {
|
|
6534
|
+
"text": "() => void"
|
|
6535
|
+
},
|
|
6536
|
+
"description": "callback for when either `lang` attr changes, or a new language is registered."
|
|
6537
|
+
}
|
|
6538
|
+
],
|
|
6539
|
+
"description": "subscribe to language changes"
|
|
6540
|
+
},
|
|
6541
|
+
{
|
|
6542
|
+
"kind": "function",
|
|
6543
|
+
"name": "isTranslationRegistered",
|
|
6544
|
+
"parameters": [
|
|
6545
|
+
{
|
|
6546
|
+
"name": "lang",
|
|
6547
|
+
"type": {
|
|
6548
|
+
"text": "string"
|
|
6549
|
+
},
|
|
6550
|
+
"description": "the lang code e.g. \"en\" or \"en-GB\""
|
|
6551
|
+
}
|
|
6552
|
+
],
|
|
6553
|
+
"description": "Check whether there is a translation registered for the given lang"
|
|
6554
|
+
},
|
|
6555
|
+
{
|
|
6556
|
+
"kind": "function",
|
|
6557
|
+
"name": "resolveTranslation",
|
|
6558
|
+
"return": {
|
|
6559
|
+
"type": {
|
|
6560
|
+
"text": "Translation"
|
|
6561
|
+
}
|
|
6562
|
+
},
|
|
6563
|
+
"parameters": [
|
|
6564
|
+
{
|
|
6565
|
+
"name": "langCode",
|
|
6566
|
+
"type": {
|
|
6567
|
+
"text": "string"
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
],
|
|
6571
|
+
"description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
|
|
6572
|
+
}
|
|
6573
|
+
],
|
|
6574
|
+
"exports": [
|
|
6575
|
+
{
|
|
6576
|
+
"kind": "js",
|
|
6577
|
+
"name": "clearTranslations",
|
|
6578
|
+
"declaration": {
|
|
6579
|
+
"name": "clearTranslations",
|
|
6580
|
+
"module": "src/localization/translation.ts"
|
|
6581
|
+
}
|
|
6582
|
+
},
|
|
6583
|
+
{
|
|
6584
|
+
"kind": "js",
|
|
6585
|
+
"name": "registerTranslation",
|
|
6586
|
+
"declaration": {
|
|
6587
|
+
"name": "registerTranslation",
|
|
6588
|
+
"module": "src/localization/translation.ts"
|
|
6589
|
+
}
|
|
6590
|
+
},
|
|
6591
|
+
{
|
|
6592
|
+
"kind": "js",
|
|
6593
|
+
"name": "subscribe",
|
|
6594
|
+
"declaration": {
|
|
6595
|
+
"name": "subscribe",
|
|
6596
|
+
"module": "src/localization/translation.ts"
|
|
6597
|
+
}
|
|
6598
|
+
},
|
|
6599
|
+
{
|
|
6600
|
+
"kind": "js",
|
|
6601
|
+
"name": "isTranslationRegistered",
|
|
6602
|
+
"declaration": {
|
|
6603
|
+
"name": "isTranslationRegistered",
|
|
6604
|
+
"module": "src/localization/translation.ts"
|
|
6605
|
+
}
|
|
6606
|
+
},
|
|
6607
|
+
{
|
|
6608
|
+
"kind": "js",
|
|
6609
|
+
"name": "resolveTranslation",
|
|
6610
|
+
"declaration": {
|
|
6611
|
+
"name": "resolveTranslation",
|
|
6612
|
+
"module": "src/localization/translation.ts"
|
|
6613
|
+
}
|
|
6614
|
+
}
|
|
6615
|
+
]
|
|
6616
|
+
},
|
|
6310
6617
|
{
|
|
6311
6618
|
"kind": "javascript-module",
|
|
6312
6619
|
"path": "src/nav-group/NavGroup.ts",
|
|
@@ -6873,20 +7180,6 @@
|
|
|
6873
7180
|
"kind": "method",
|
|
6874
7181
|
"name": "getToggle",
|
|
6875
7182
|
"privacy": "private"
|
|
6876
|
-
},
|
|
6877
|
-
{
|
|
6878
|
-
"kind": "field",
|
|
6879
|
-
"name": "_warningLogged",
|
|
6880
|
-
"type": {
|
|
6881
|
-
"text": "boolean"
|
|
6882
|
-
},
|
|
6883
|
-
"privacy": "private",
|
|
6884
|
-
"static": true,
|
|
6885
|
-
"default": "false",
|
|
6886
|
-
"inheritedFrom": {
|
|
6887
|
-
"name": "DraftComponentMixin",
|
|
6888
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
6889
|
-
}
|
|
6890
7183
|
}
|
|
6891
7184
|
],
|
|
6892
7185
|
"events": [
|
|
@@ -6934,17 +7227,11 @@
|
|
|
6934
7227
|
"fieldName": "id"
|
|
6935
7228
|
}
|
|
6936
7229
|
],
|
|
6937
|
-
"mixins": [
|
|
6938
|
-
{
|
|
6939
|
-
"name": "DraftComponentMixin",
|
|
6940
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
6941
|
-
}
|
|
6942
|
-
],
|
|
6943
7230
|
"superclass": {
|
|
6944
7231
|
"name": "LitElement",
|
|
6945
7232
|
"package": "lit"
|
|
6946
7233
|
},
|
|
6947
|
-
"status": "
|
|
7234
|
+
"status": "new",
|
|
6948
7235
|
"category": "overlay",
|
|
6949
7236
|
"tagName": "nord-popout",
|
|
6950
7237
|
"customElement": true
|
|
@@ -8536,6 +8823,7 @@
|
|
|
8536
8823
|
"type": {
|
|
8537
8824
|
"text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
|
|
8538
8825
|
},
|
|
8826
|
+
"default": "\"stretch\"",
|
|
8539
8827
|
"description": "How to align the child items inside the stack.",
|
|
8540
8828
|
"attribute": "align-items",
|
|
8541
8829
|
"reflects": true
|
|
@@ -8566,7 +8854,7 @@
|
|
|
8566
8854
|
"kind": "field",
|
|
8567
8855
|
"name": "justifyContent",
|
|
8568
8856
|
"type": {
|
|
8569
|
-
"text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
|
|
8857
|
+
"text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
|
|
8570
8858
|
},
|
|
8571
8859
|
"description": "How to justify the child items inside the stack.",
|
|
8572
8860
|
"attribute": "justify-content",
|
|
@@ -8597,6 +8885,7 @@
|
|
|
8597
8885
|
"type": {
|
|
8598
8886
|
"text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
|
|
8599
8887
|
},
|
|
8888
|
+
"default": "\"stretch\"",
|
|
8600
8889
|
"description": "How to align the child items inside the stack.",
|
|
8601
8890
|
"fieldName": "alignItems"
|
|
8602
8891
|
},
|
|
@@ -8621,7 +8910,7 @@
|
|
|
8621
8910
|
{
|
|
8622
8911
|
"name": "justify-content",
|
|
8623
8912
|
"type": {
|
|
8624
|
-
"text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
|
|
8913
|
+
"text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
|
|
8625
8914
|
},
|
|
8626
8915
|
"description": "How to justify the child items inside the stack.",
|
|
8627
8916
|
"fieldName": "justifyContent"
|