@nordhealth/components 1.0.0-beta.4 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/custom-elements.json +981 -758
  2. package/lib/Avatar.js +2 -0
  3. package/lib/Avatar.js.map +1 -0
  4. package/lib/Badge.js +1 -1
  5. package/lib/Banner.js +1 -1
  6. package/lib/Banner.js.map +1 -1
  7. package/lib/Button.js +1 -1
  8. package/lib/{Calendar-55a0b169.js → Calendar-90013fdb.js} +2 -2
  9. package/lib/{Calendar-55a0b169.js.map → Calendar-90013fdb.js.map} +1 -1
  10. package/lib/Calendar.js +1 -1
  11. package/lib/Card.js +1 -1
  12. package/lib/Card.js.map +1 -1
  13. package/lib/Checkbox.js +1 -1
  14. package/lib/Checkbox.js.map +1 -1
  15. package/lib/CommandMenu.js +1 -1
  16. package/lib/CommandMenuAction.js +1 -1
  17. package/lib/Component-6762b5eb.js +2 -0
  18. package/lib/Component-6762b5eb.js.map +1 -0
  19. package/lib/DatePicker.js +1 -1
  20. package/lib/EmptyState.js +1 -1
  21. package/lib/EmptyState.js.map +1 -1
  22. package/lib/Fieldset.js +1 -1
  23. package/lib/Fieldset.js.map +1 -1
  24. package/lib/FormAssociatedMixin-49b778dd.js +2 -0
  25. package/lib/{FormAssociatedMixin-e146e0ab.js.map → FormAssociatedMixin-49b778dd.js.map} +1 -1
  26. package/lib/Header.js +1 -1
  27. package/lib/Header.js.map +1 -1
  28. package/lib/Icon.js +1 -1
  29. package/lib/Input.js +1 -1
  30. package/lib/Input.js.map +1 -1
  31. package/lib/Layout.js +1 -1
  32. package/lib/Layout.js.map +1 -1
  33. package/lib/NavGroup.js +1 -1
  34. package/lib/Radio.js +1 -1
  35. package/lib/Select.js +1 -1
  36. package/lib/Spinner.js +1 -1
  37. package/lib/Stack.js +1 -1
  38. package/lib/Textarea.js +1 -1
  39. package/lib/Tooltip.js +1 -1
  40. package/lib/bundle.js +10 -10
  41. package/lib/bundle.js.map +1 -1
  42. package/lib/index.js +1 -1
  43. package/lib/src/avatar/Avatar.d.ts +37 -0
  44. package/lib/src/avatar/Avatar.test.d.ts +1 -0
  45. package/lib/src/common/fsm.d.ts +5 -0
  46. package/lib/src/empty-state/EmptyState.d.ts +2 -2
  47. package/lib/src/index.d.ts +1 -0
  48. package/lib/src/layout/Layout.d.ts +1 -2
  49. package/package.json +6 -6
  50. package/lib/Component-a19be7c9.js +0 -2
  51. package/lib/Component-a19be7c9.js.map +0 -1
  52. package/lib/FormAssociatedMixin-e146e0ab.js +0 -2
@@ -214,9 +214,164 @@
214
214
  "name": "default",
215
215
  "module": "\"./banner/Banner.js\""
216
216
  }
217
+ },
218
+ {
219
+ "kind": "js",
220
+ "name": "Avatar",
221
+ "declaration": {
222
+ "name": "default",
223
+ "module": "\"./avatar/Avatar.js\""
224
+ }
217
225
  }
218
226
  ]
219
227
  },
228
+ {
229
+ "kind": "javascript-module",
230
+ "path": "src/avatar/Avatar.ts",
231
+ "declarations": [
232
+ {
233
+ "kind": "class",
234
+ "description": "Avatar is used for showing a thumbnail representation of a user or entity.\nDefault avatar illustration is displayed when no src is specified.",
235
+ "name": "Avatar",
236
+ "members": [
237
+ {
238
+ "kind": "field",
239
+ "name": "state",
240
+ "type": {
241
+ "text": "States"
242
+ },
243
+ "privacy": "private",
244
+ "default": "\"initial\""
245
+ },
246
+ {
247
+ "kind": "field",
248
+ "name": "size",
249
+ "type": {
250
+ "text": "\"m\" | \"l\" | \"xl\""
251
+ },
252
+ "default": "\"m\"",
253
+ "description": "The size of the avatar.",
254
+ "attribute": "size",
255
+ "reflects": true
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "src",
260
+ "type": {
261
+ "text": "string | undefined"
262
+ },
263
+ "description": "The URL of the avatar image uploaded by the user.",
264
+ "attribute": "src",
265
+ "reflects": true
266
+ },
267
+ {
268
+ "kind": "field",
269
+ "name": "name",
270
+ "type": {
271
+ "text": "string"
272
+ },
273
+ "default": "\"\"",
274
+ "description": "The name of the person.",
275
+ "attribute": "name"
276
+ },
277
+ {
278
+ "kind": "method",
279
+ "name": "renderImage",
280
+ "privacy": "protected"
281
+ },
282
+ {
283
+ "kind": "method",
284
+ "name": "renderFallback"
285
+ },
286
+ {
287
+ "kind": "method",
288
+ "name": "handleLoad",
289
+ "privacy": "private"
290
+ },
291
+ {
292
+ "kind": "method",
293
+ "name": "handleError",
294
+ "privacy": "private"
295
+ },
296
+ {
297
+ "kind": "field",
298
+ "name": "_warningLogged",
299
+ "type": {
300
+ "text": "boolean"
301
+ },
302
+ "privacy": "private",
303
+ "static": true,
304
+ "default": "false",
305
+ "inheritedFrom": {
306
+ "name": "DraftComponentMixin",
307
+ "module": "src/common/mixins/DraftComponentMixin.ts"
308
+ }
309
+ }
310
+ ],
311
+ "attributes": [
312
+ {
313
+ "name": "size",
314
+ "type": {
315
+ "text": "\"m\" | \"l\" | \"xl\""
316
+ },
317
+ "default": "\"m\"",
318
+ "description": "The size of the avatar.",
319
+ "fieldName": "size"
320
+ },
321
+ {
322
+ "name": "src",
323
+ "type": {
324
+ "text": "string | undefined"
325
+ },
326
+ "description": "The URL of the avatar image uploaded by the user.",
327
+ "fieldName": "src"
328
+ },
329
+ {
330
+ "name": "name",
331
+ "type": {
332
+ "text": "string"
333
+ },
334
+ "default": "\"\"",
335
+ "description": "The name of the person.",
336
+ "fieldName": "name"
337
+ }
338
+ ],
339
+ "mixins": [
340
+ {
341
+ "name": "DraftComponentMixin",
342
+ "module": "/src/common/mixins/DraftComponentMixin.js"
343
+ }
344
+ ],
345
+ "superclass": {
346
+ "name": "LitElement",
347
+ "package": "lit"
348
+ },
349
+ "status": "draft",
350
+ "category": "image",
351
+ "tagName": "nord-avatar",
352
+ "customElement": true
353
+ }
354
+ ],
355
+ "exports": [
356
+ {
357
+ "kind": "js",
358
+ "name": "default",
359
+ "declaration": {
360
+ "name": "Avatar",
361
+ "module": "src/avatar/Avatar.ts"
362
+ }
363
+ },
364
+ {
365
+ "kind": "custom-element-definition",
366
+ "name": "nord-avatar",
367
+ "declaration": {
368
+ "name": "Avatar",
369
+ "module": "src/avatar/Avatar.ts"
370
+ }
371
+ }
372
+ ],
373
+ "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- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n\n</div>\n"
374
+ },
220
375
  {
221
376
  "kind": "javascript-module",
222
377
  "path": "src/badge/Badge.ts",
@@ -391,251 +546,279 @@
391
546
  }
392
547
  }
393
548
  ],
394
- "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"
549
+ "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"
395
550
  },
396
551
  {
397
552
  "kind": "javascript-module",
398
- "path": "src/button/Button.ts",
553
+ "path": "src/calendar/Calendar.ts",
399
554
  "declarations": [
400
555
  {
401
556
  "kind": "class",
402
- "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.",
403
- "name": "Button",
404
- "slots": [
557
+ "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.",
558
+ "name": "Calendar",
559
+ "members": [
405
560
  {
406
- "description": "The button content",
407
- "name": ""
561
+ "kind": "field",
562
+ "name": "dialogLabelId",
563
+ "type": {
564
+ "text": "string"
565
+ },
566
+ "privacy": "private",
567
+ "default": "\"dialog-header\""
408
568
  },
409
569
  {
410
- "description": "Used to place content before button text. Typically used for icons.",
411
- "name": "before"
570
+ "kind": "field",
571
+ "name": "monthSelectNode",
572
+ "type": {
573
+ "text": "HTMLElement"
574
+ },
575
+ "privacy": "private"
412
576
  },
413
577
  {
414
- "description": "Used to place content after button text. Typically used for icons.",
415
- "name": "after"
416
- }
417
- ],
418
- "members": [
578
+ "kind": "field",
579
+ "name": "focusedDayNode",
580
+ "type": {
581
+ "text": "HTMLButtonElement"
582
+ },
583
+ "privacy": "private"
584
+ },
419
585
  {
420
586
  "kind": "field",
421
- "name": "buttonRef",
587
+ "name": "direction",
588
+ "privacy": "private",
589
+ "default": "new DirectionController(this)"
590
+ },
591
+ {
592
+ "kind": "field",
593
+ "name": "swipe",
594
+ "privacy": "private",
595
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
596
+ },
597
+ {
598
+ "kind": "field",
599
+ "name": "shortcuts",
422
600
  "privacy": "private"
423
601
  },
424
602
  {
425
603
  "kind": "field",
426
- "name": "lightDom",
604
+ "name": "dateFormatShort",
605
+ "type": {
606
+ "text": "Intl.DateTimeFormat"
607
+ },
427
608
  "privacy": "private",
428
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
609
+ "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"
429
610
  },
430
611
  {
431
612
  "kind": "field",
432
- "name": "variant",
613
+ "name": "localization",
433
614
  "type": {
434
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
615
+ "text": "CalendarLocalizedText"
435
616
  },
436
- "default": "\"default\"",
437
- "description": "The style variant of the button.",
438
- "attribute": "variant",
439
- "reflects": true
617
+ "default": "localization"
440
618
  },
441
619
  {
442
620
  "kind": "field",
443
- "name": "type",
621
+ "name": "value",
444
622
  "type": {
445
- "text": "\"button\" | \"submit\" | \"reset\""
623
+ "text": "string"
446
624
  },
447
- "default": "\"submit\"",
448
- "description": "The type of the button.",
449
- "attribute": "type",
450
- "reflects": true
625
+ "default": "\"\"",
626
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
627
+ "attribute": "value"
451
628
  },
452
629
  {
453
630
  "kind": "field",
454
- "name": "size",
631
+ "name": "firstDayOfWeek",
455
632
  "type": {
456
- "text": "\"s\" | \"m\" | \"l\""
633
+ "text": "DaysOfWeek"
457
634
  },
458
- "default": "\"m\"",
459
- "description": "The size of the button.\nThis affects font-size and padding.",
460
- "attribute": "size",
461
- "reflects": true
635
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
636
+ "attribute": "firstDayOfWeek"
462
637
  },
463
638
  {
464
639
  "kind": "field",
465
- "name": "href",
640
+ "name": "min",
466
641
  "type": {
467
- "text": "string | undefined"
642
+ "text": "string"
468
643
  },
469
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
470
- "attribute": "href",
471
- "reflects": true
644
+ "default": "\"\"",
645
+ "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.",
646
+ "attribute": "min"
472
647
  },
473
648
  {
474
649
  "kind": "field",
475
- "name": "download",
650
+ "name": "max",
476
651
  "type": {
477
- "text": "boolean"
652
+ "text": "string"
478
653
  },
479
- "default": "false",
480
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
481
- "attribute": "download"
654
+ "default": "\"\"",
655
+ "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.",
656
+ "attribute": "max"
482
657
  },
483
658
  {
484
659
  "kind": "field",
485
- "name": "target",
660
+ "name": "isDateDisabled",
486
661
  "type": {
487
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
662
+ "text": "DateDisabledPredicate"
488
663
  },
489
- "default": "\"_self\"",
490
- "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.",
491
- "attribute": "target",
492
- "reflects": true
664
+ "default": "isDateDisabled",
665
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
493
666
  },
494
667
  {
495
668
  "kind": "field",
496
- "name": "expand",
669
+ "name": "activeFocus",
497
670
  "type": {
498
671
  "text": "boolean"
499
672
  },
500
- "default": "false",
501
- "description": "Controls whether the button expands to fill the width of its container.",
502
- "attribute": "expand",
503
- "reflects": true
673
+ "privacy": "private",
674
+ "default": "false"
504
675
  },
505
676
  {
506
- "kind": "method",
507
- "name": "renderLink",
677
+ "kind": "field",
678
+ "name": "focusedDay",
508
679
  "privacy": "private",
680
+ "default": "new Date()"
681
+ },
682
+ {
683
+ "kind": "method",
684
+ "name": "focus",
509
685
  "parameters": [
510
686
  {
511
- "name": "innards",
687
+ "name": "options",
688
+ "optional": true,
512
689
  "type": {
513
- "text": "TemplateResult"
690
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
514
691
  }
515
692
  }
516
- ],
517
- "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."
693
+ ]
518
694
  },
519
695
  {
520
696
  "kind": "method",
521
- "name": "renderButton",
697
+ "name": "createDateFormatter",
698
+ "privacy": "private"
699
+ },
700
+ {
701
+ "kind": "field",
702
+ "name": "handleDaySelect",
703
+ "privacy": "private"
704
+ },
705
+ {
706
+ "kind": "method",
707
+ "name": "addDays",
522
708
  "privacy": "private",
523
709
  "parameters": [
524
710
  {
525
- "name": "innards",
711
+ "name": "days",
526
712
  "type": {
527
- "text": "TemplateResult"
713
+ "text": "number"
528
714
  }
529
715
  }
530
716
  ]
531
717
  },
532
718
  {
533
719
  "kind": "method",
534
- "name": "renderLightDom",
720
+ "name": "addMonths",
721
+ "privacy": "private",
722
+ "parameters": [
723
+ {
724
+ "name": "months",
725
+ "type": {
726
+ "text": "number"
727
+ }
728
+ }
729
+ ]
730
+ },
731
+ {
732
+ "kind": "method",
733
+ "name": "addYears",
734
+ "privacy": "private",
735
+ "parameters": [
736
+ {
737
+ "name": "years",
738
+ "type": {
739
+ "text": "number"
740
+ }
741
+ }
742
+ ]
743
+ },
744
+ {
745
+ "kind": "method",
746
+ "name": "startOfWeek",
535
747
  "privacy": "private"
536
748
  },
537
749
  {
538
750
  "kind": "method",
539
- "name": "handleClick",
751
+ "name": "endOfWeek",
540
752
  "privacy": "private"
541
753
  },
542
754
  {
543
- "kind": "field",
544
- "name": "disabled",
545
- "type": {
546
- "text": "boolean"
547
- },
548
- "default": "false",
549
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
550
- "attribute": "disabled",
551
- "reflects": true,
552
- "inheritedFrom": {
553
- "name": "InputMixin",
554
- "module": "src/common/mixins/InputMixin.ts"
555
- }
755
+ "kind": "method",
756
+ "name": "setMonth",
757
+ "privacy": "private",
758
+ "parameters": [
759
+ {
760
+ "name": "month",
761
+ "type": {
762
+ "text": "number"
763
+ }
764
+ }
765
+ ]
556
766
  },
557
767
  {
558
- "kind": "field",
559
- "name": "name",
560
- "type": {
561
- "text": "string | undefined"
562
- },
563
- "description": "The name of the form component.",
564
- "attribute": "name",
565
- "inheritedFrom": {
566
- "name": "InputMixin",
567
- "module": "src/common/mixins/InputMixin.ts"
568
- }
768
+ "kind": "method",
769
+ "name": "setYear",
770
+ "privacy": "private",
771
+ "parameters": [
772
+ {
773
+ "name": "year",
774
+ "type": {
775
+ "text": "number"
776
+ }
777
+ }
778
+ ]
779
+ },
780
+ {
781
+ "kind": "method",
782
+ "name": "setFocusedDay",
783
+ "privacy": "private",
784
+ "parameters": [
785
+ {
786
+ "name": "day",
787
+ "type": {
788
+ "text": "Date"
789
+ }
790
+ }
791
+ ]
569
792
  },
570
793
  {
571
794
  "kind": "field",
572
- "name": "value",
573
- "type": {
574
- "text": "string"
575
- },
576
- "default": "\"\"",
577
- "description": "The value of the form component.",
578
- "attribute": "value",
579
- "inheritedFrom": {
580
- "name": "InputMixin",
581
- "module": "src/common/mixins/InputMixin.ts"
582
- }
795
+ "name": "handleMonthSelect",
796
+ "privacy": "private"
583
797
  },
584
798
  {
585
799
  "kind": "field",
586
- "name": "form",
587
- "privacy": "protected",
588
- "description": "Gets the form, if any, associated with the form element.",
589
- "inheritedFrom": {
590
- "name": "InputMixin",
591
- "module": "src/common/mixins/InputMixin.ts"
592
- }
800
+ "name": "handleYearSelect",
801
+ "privacy": "private"
593
802
  },
594
803
  {
595
804
  "kind": "field",
596
- "name": "focusableRef",
597
- "privacy": "protected",
598
- "inheritedFrom": {
599
- "name": "FocusableMixin",
600
- "module": "src/common/mixins/FocusableMixin.ts"
601
- }
805
+ "name": "handleNextMonthClick",
806
+ "privacy": "private"
602
807
  },
603
808
  {
604
- "kind": "method",
605
- "name": "focus",
606
- "parameters": [
607
- {
608
- "name": "options",
609
- "optional": true,
610
- "type": {
611
- "text": "FocusOptions"
612
- },
613
- "description": "An object which controls aspects of the focusing process."
614
- }
615
- ],
616
- "description": "Programmatically move focus to the component.",
617
- "inheritedFrom": {
618
- "name": "FocusableMixin",
619
- "module": "src/common/mixins/FocusableMixin.ts"
620
- }
809
+ "kind": "field",
810
+ "name": "handlePreviousMonthClick",
811
+ "privacy": "private"
621
812
  },
622
813
  {
623
- "kind": "method",
624
- "name": "blur",
625
- "description": "Programmatically remove focus from the component.",
626
- "inheritedFrom": {
627
- "name": "FocusableMixin",
628
- "module": "src/common/mixins/FocusableMixin.ts"
629
- }
814
+ "kind": "field",
815
+ "name": "enableActiveFocus",
816
+ "privacy": "private"
630
817
  },
631
818
  {
632
- "kind": "method",
633
- "name": "click",
634
- "description": "Programmatically simulates a click on the component.",
635
- "inheritedFrom": {
636
- "name": "FocusableMixin",
637
- "module": "src/common/mixins/FocusableMixin.ts"
638
- }
819
+ "kind": "field",
820
+ "name": "disableActiveFocus",
821
+ "privacy": "private"
639
822
  },
640
823
  {
641
824
  "kind": "field",
@@ -654,115 +837,42 @@
654
837
  ],
655
838
  "attributes": [
656
839
  {
657
- "name": "variant",
658
- "type": {
659
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
660
- },
661
- "default": "\"default\"",
662
- "description": "The style variant of the button.",
663
- "fieldName": "variant"
664
- },
665
- {
666
- "name": "type",
667
- "type": {
668
- "text": "\"button\" | \"submit\" | \"reset\""
669
- },
670
- "default": "\"submit\"",
671
- "description": "The type of the button.",
672
- "fieldName": "type"
673
- },
674
- {
675
- "name": "size",
676
- "type": {
677
- "text": "\"s\" | \"m\" | \"l\""
678
- },
679
- "default": "\"m\"",
680
- "description": "The size of the button.\nThis affects font-size and padding.",
681
- "fieldName": "size"
682
- },
683
- {
684
- "name": "href",
685
- "type": {
686
- "text": "string | undefined"
687
- },
688
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
689
- "fieldName": "href"
690
- },
691
- {
692
- "name": "download",
693
- "type": {
694
- "text": "boolean"
695
- },
696
- "default": "false",
697
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
698
- "fieldName": "download"
699
- },
700
- {
701
- "name": "target",
702
- "type": {
703
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
704
- },
705
- "default": "\"_self\"",
706
- "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.",
707
- "fieldName": "target"
708
- },
709
- {
710
- "name": "expand",
840
+ "name": "value",
711
841
  "type": {
712
- "text": "boolean"
842
+ "text": "string"
713
843
  },
714
- "default": "false",
715
- "description": "Controls whether the button expands to fill the width of its container.",
716
- "fieldName": "expand"
844
+ "default": "\"\"",
845
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
846
+ "fieldName": "value"
717
847
  },
718
848
  {
719
- "name": "disabled",
849
+ "name": "firstDayOfWeek",
720
850
  "type": {
721
- "text": "boolean"
851
+ "text": "DaysOfWeek"
722
852
  },
723
- "default": "false",
724
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
725
- "fieldName": "disabled",
726
- "inheritedFrom": {
727
- "name": "InputMixin",
728
- "module": "src/common/mixins/InputMixin.ts"
729
- }
853
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
854
+ "fieldName": "firstDayOfWeek"
730
855
  },
731
856
  {
732
- "name": "name",
857
+ "name": "min",
733
858
  "type": {
734
- "text": "string | undefined"
859
+ "text": "string"
735
860
  },
736
- "description": "The name of the form component.",
737
- "fieldName": "name",
738
- "inheritedFrom": {
739
- "name": "InputMixin",
740
- "module": "src/common/mixins/InputMixin.ts"
741
- }
861
+ "default": "\"\"",
862
+ "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.",
863
+ "fieldName": "min"
742
864
  },
743
865
  {
744
- "name": "value",
866
+ "name": "max",
745
867
  "type": {
746
868
  "text": "string"
747
869
  },
748
870
  "default": "\"\"",
749
- "description": "The value of the form component.",
750
- "fieldName": "value",
751
- "inheritedFrom": {
752
- "name": "InputMixin",
753
- "module": "src/common/mixins/InputMixin.ts"
754
- }
871
+ "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.",
872
+ "fieldName": "max"
755
873
  }
756
874
  ],
757
875
  "mixins": [
758
- {
759
- "name": "InputMixin",
760
- "module": "/src/common/mixins/InputMixin.js"
761
- },
762
- {
763
- "name": "FocusableMixin",
764
- "module": "/src/common/mixins/FocusableMixin.js"
765
- },
766
876
  {
767
877
  "name": "DraftComponentMixin",
768
878
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -773,8 +883,8 @@
773
883
  "package": "lit"
774
884
  },
775
885
  "status": "draft",
776
- "category": "action",
777
- "tagName": "nord-button",
886
+ "category": "list",
887
+ "tagName": "nord-calendar",
778
888
  "customElement": true
779
889
  }
780
890
  ],
@@ -783,292 +893,383 @@
783
893
  "kind": "js",
784
894
  "name": "default",
785
895
  "declaration": {
786
- "name": "Button",
787
- "module": "src/button/Button.ts"
896
+ "name": "Calendar",
897
+ "module": "src/calendar/Calendar.ts"
898
+ }
899
+ },
900
+ {
901
+ "kind": "custom-element-definition",
902
+ "name": "nord-calendar",
903
+ "declaration": {
904
+ "name": "Calendar",
905
+ "module": "src/calendar/Calendar.ts"
906
+ }
907
+ }
908
+ ],
909
+ "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"
910
+ },
911
+ {
912
+ "kind": "javascript-module",
913
+ "path": "src/calendar/DateSelectEvent.ts",
914
+ "declarations": [
915
+ {
916
+ "kind": "class",
917
+ "description": "",
918
+ "name": "DateSelectEvent",
919
+ "members": [
920
+ {
921
+ "kind": "field",
922
+ "name": "eventName",
923
+ "type": {
924
+ "text": "string"
925
+ },
926
+ "static": true,
927
+ "default": "\"nord-select\""
928
+ },
929
+ {
930
+ "kind": "field",
931
+ "name": "date",
932
+ "type": {
933
+ "text": "Date"
934
+ },
935
+ "default": "date"
936
+ }
937
+ ],
938
+ "superclass": {
939
+ "name": "NordEvent",
940
+ "module": "/src/common/events.js"
941
+ }
942
+ }
943
+ ],
944
+ "exports": [
945
+ {
946
+ "kind": "js",
947
+ "name": "DateSelectEvent",
948
+ "declaration": {
949
+ "name": "DateSelectEvent",
950
+ "module": "src/calendar/DateSelectEvent.ts"
951
+ }
952
+ }
953
+ ],
954
+ "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"
955
+ },
956
+ {
957
+ "kind": "javascript-module",
958
+ "path": "src/calendar/calendar-localization.ts",
959
+ "declarations": [
960
+ {
961
+ "kind": "variable",
962
+ "name": "localization",
963
+ "type": {
964
+ "text": "CalendarLocalizedText"
965
+ },
966
+ "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}"
967
+ }
968
+ ],
969
+ "exports": [
970
+ {
971
+ "kind": "js",
972
+ "name": "default",
973
+ "declaration": {
974
+ "name": "localization",
975
+ "module": "src/calendar/calendar-localization.ts"
976
+ }
977
+ }
978
+ ],
979
+ "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"
980
+ },
981
+ {
982
+ "kind": "javascript-module",
983
+ "path": "src/calendar/month-view.ts",
984
+ "declarations": [
985
+ {
986
+ "kind": "function",
987
+ "name": "dayView",
988
+ "parameters": [
989
+ {
990
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
991
+ "type": {
992
+ "text": "DatePickerDayProps"
993
+ }
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "kind": "function",
999
+ "name": "monthView",
1000
+ "parameters": [
1001
+ {
1002
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1003
+ "type": {
1004
+ "text": "MonthViewArgs"
1005
+ }
1006
+ }
1007
+ ]
1008
+ }
1009
+ ],
1010
+ "exports": [
1011
+ {
1012
+ "kind": "js",
1013
+ "name": "dayView",
1014
+ "declaration": {
1015
+ "name": "dayView",
1016
+ "module": "src/calendar/month-view.ts"
788
1017
  }
789
1018
  },
790
1019
  {
791
- "kind": "custom-element-definition",
792
- "name": "nord-button",
1020
+ "kind": "js",
1021
+ "name": "monthView",
793
1022
  "declaration": {
794
- "name": "Button",
795
- "module": "src/button/Button.ts"
1023
+ "name": "monthView",
1024
+ "module": "src/calendar/month-view.ts"
796
1025
  }
797
1026
  }
798
1027
  ],
799
- "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"
1028
+ "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"
800
1029
  },
801
1030
  {
802
1031
  "kind": "javascript-module",
803
- "path": "src/calendar/Calendar.ts",
1032
+ "path": "src/button/Button.ts",
804
1033
  "declarations": [
805
1034
  {
806
1035
  "kind": "class",
807
- "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.",
808
- "name": "Calendar",
809
- "members": [
810
- {
811
- "kind": "field",
812
- "name": "dialogLabelId",
813
- "type": {
814
- "text": "string"
815
- },
816
- "privacy": "private",
817
- "default": "\"dialog-header\""
818
- },
819
- {
820
- "kind": "field",
821
- "name": "monthSelectNode",
822
- "type": {
823
- "text": "HTMLElement"
824
- },
825
- "privacy": "private"
826
- },
1036
+ "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.",
1037
+ "name": "Button",
1038
+ "slots": [
827
1039
  {
828
- "kind": "field",
829
- "name": "focusedDayNode",
830
- "type": {
831
- "text": "HTMLButtonElement"
832
- },
833
- "privacy": "private"
1040
+ "description": "The button content",
1041
+ "name": ""
834
1042
  },
835
1043
  {
836
- "kind": "field",
837
- "name": "direction",
838
- "privacy": "private",
839
- "default": "new DirectionController(this)"
1044
+ "description": "Used to place content before button text. Typically used for icons.",
1045
+ "name": "before"
840
1046
  },
841
1047
  {
842
- "kind": "field",
843
- "name": "swipe",
844
- "privacy": "private",
845
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
846
- },
1048
+ "description": "Used to place content after button text. Typically used for icons.",
1049
+ "name": "after"
1050
+ }
1051
+ ],
1052
+ "members": [
847
1053
  {
848
1054
  "kind": "field",
849
- "name": "shortcuts",
1055
+ "name": "buttonRef",
850
1056
  "privacy": "private"
851
1057
  },
852
1058
  {
853
1059
  "kind": "field",
854
- "name": "dateFormatShort",
855
- "type": {
856
- "text": "Intl.DateTimeFormat"
857
- },
1060
+ "name": "lightDom",
858
1061
  "privacy": "private",
859
- "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"
1062
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
860
1063
  },
861
1064
  {
862
1065
  "kind": "field",
863
- "name": "localization",
1066
+ "name": "variant",
864
1067
  "type": {
865
- "text": "CalendarLocalizedText"
1068
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
866
1069
  },
867
- "default": "localization"
1070
+ "default": "\"default\"",
1071
+ "description": "The style variant of the button.",
1072
+ "attribute": "variant",
1073
+ "reflects": true
868
1074
  },
869
1075
  {
870
1076
  "kind": "field",
871
- "name": "value",
1077
+ "name": "type",
872
1078
  "type": {
873
- "text": "string"
1079
+ "text": "\"button\" | \"submit\" | \"reset\""
874
1080
  },
875
- "default": "\"\"",
876
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
877
- "attribute": "value"
1081
+ "default": "\"submit\"",
1082
+ "description": "The type of the button.",
1083
+ "attribute": "type",
1084
+ "reflects": true
878
1085
  },
879
1086
  {
880
1087
  "kind": "field",
881
- "name": "firstDayOfWeek",
1088
+ "name": "size",
882
1089
  "type": {
883
- "text": "DaysOfWeek"
1090
+ "text": "\"s\" | \"m\" | \"l\""
884
1091
  },
885
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
886
- "attribute": "firstDayOfWeek"
1092
+ "default": "\"m\"",
1093
+ "description": "The size of the button.\nThis affects font-size and padding.",
1094
+ "attribute": "size",
1095
+ "reflects": true
887
1096
  },
888
1097
  {
889
1098
  "kind": "field",
890
- "name": "min",
1099
+ "name": "href",
891
1100
  "type": {
892
- "text": "string"
1101
+ "text": "string | undefined"
893
1102
  },
894
- "default": "\"\"",
895
- "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.",
896
- "attribute": "min"
1103
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1104
+ "attribute": "href",
1105
+ "reflects": true
897
1106
  },
898
1107
  {
899
1108
  "kind": "field",
900
- "name": "max",
1109
+ "name": "download",
901
1110
  "type": {
902
- "text": "string"
1111
+ "text": "boolean"
903
1112
  },
904
- "default": "\"\"",
905
- "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.",
906
- "attribute": "max"
1113
+ "default": "false",
1114
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1115
+ "attribute": "download"
907
1116
  },
908
1117
  {
909
1118
  "kind": "field",
910
- "name": "isDateDisabled",
1119
+ "name": "target",
911
1120
  "type": {
912
- "text": "DateDisabledPredicate"
1121
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
913
1122
  },
914
- "default": "isDateDisabled",
915
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1123
+ "default": "\"_self\"",
1124
+ "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.",
1125
+ "attribute": "target",
1126
+ "reflects": true
916
1127
  },
917
1128
  {
918
1129
  "kind": "field",
919
- "name": "activeFocus",
1130
+ "name": "expand",
920
1131
  "type": {
921
1132
  "text": "boolean"
922
1133
  },
923
- "privacy": "private",
924
- "default": "false"
925
- },
926
- {
927
- "kind": "field",
928
- "name": "focusedDay",
929
- "privacy": "private",
930
- "default": "new Date()"
931
- },
932
- {
933
- "kind": "method",
934
- "name": "focus",
935
- "parameters": [
936
- {
937
- "name": "options",
938
- "optional": true,
939
- "type": {
940
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
941
- }
942
- }
943
- ]
944
- },
945
- {
946
- "kind": "method",
947
- "name": "createDateFormatter",
948
- "privacy": "private"
949
- },
950
- {
951
- "kind": "field",
952
- "name": "handleDaySelect",
953
- "privacy": "private"
954
- },
955
- {
956
- "kind": "method",
957
- "name": "addDays",
958
- "privacy": "private",
959
- "parameters": [
960
- {
961
- "name": "days",
962
- "type": {
963
- "text": "number"
964
- }
965
- }
966
- ]
1134
+ "default": "false",
1135
+ "description": "Controls whether the button expands to fill the width of its container.",
1136
+ "attribute": "expand",
1137
+ "reflects": true
967
1138
  },
968
1139
  {
969
1140
  "kind": "method",
970
- "name": "addMonths",
1141
+ "name": "renderLink",
971
1142
  "privacy": "private",
972
1143
  "parameters": [
973
1144
  {
974
- "name": "months",
1145
+ "name": "innards",
975
1146
  "type": {
976
- "text": "number"
1147
+ "text": "TemplateResult"
977
1148
  }
978
1149
  }
979
- ]
1150
+ ],
1151
+ "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."
980
1152
  },
981
1153
  {
982
1154
  "kind": "method",
983
- "name": "addYears",
1155
+ "name": "renderButton",
984
1156
  "privacy": "private",
985
1157
  "parameters": [
986
1158
  {
987
- "name": "years",
1159
+ "name": "innards",
988
1160
  "type": {
989
- "text": "number"
1161
+ "text": "TemplateResult"
990
1162
  }
991
1163
  }
992
1164
  ]
993
1165
  },
994
1166
  {
995
1167
  "kind": "method",
996
- "name": "startOfWeek",
1168
+ "name": "renderLightDom",
997
1169
  "privacy": "private"
998
1170
  },
999
1171
  {
1000
1172
  "kind": "method",
1001
- "name": "endOfWeek",
1173
+ "name": "handleClick",
1002
1174
  "privacy": "private"
1003
1175
  },
1004
1176
  {
1005
- "kind": "method",
1006
- "name": "setMonth",
1007
- "privacy": "private",
1008
- "parameters": [
1009
- {
1010
- "name": "month",
1011
- "type": {
1012
- "text": "number"
1013
- }
1014
- }
1015
- ]
1016
- },
1017
- {
1018
- "kind": "method",
1019
- "name": "setYear",
1020
- "privacy": "private",
1021
- "parameters": [
1022
- {
1023
- "name": "year",
1024
- "type": {
1025
- "text": "number"
1026
- }
1027
- }
1028
- ]
1177
+ "kind": "field",
1178
+ "name": "disabled",
1179
+ "type": {
1180
+ "text": "boolean"
1181
+ },
1182
+ "default": "false",
1183
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1184
+ "attribute": "disabled",
1185
+ "reflects": true,
1186
+ "inheritedFrom": {
1187
+ "name": "InputMixin",
1188
+ "module": "src/common/mixins/InputMixin.ts"
1189
+ }
1029
1190
  },
1030
1191
  {
1031
- "kind": "method",
1032
- "name": "setFocusedDay",
1033
- "privacy": "private",
1034
- "parameters": [
1035
- {
1036
- "name": "day",
1037
- "type": {
1038
- "text": "Date"
1039
- }
1040
- }
1041
- ]
1192
+ "kind": "field",
1193
+ "name": "name",
1194
+ "type": {
1195
+ "text": "string | undefined"
1196
+ },
1197
+ "description": "The name of the form component.",
1198
+ "attribute": "name",
1199
+ "inheritedFrom": {
1200
+ "name": "InputMixin",
1201
+ "module": "src/common/mixins/InputMixin.ts"
1202
+ }
1042
1203
  },
1043
1204
  {
1044
1205
  "kind": "field",
1045
- "name": "handleMonthSelect",
1046
- "privacy": "private"
1206
+ "name": "value",
1207
+ "type": {
1208
+ "text": "string"
1209
+ },
1210
+ "default": "\"\"",
1211
+ "description": "The value of the form component.",
1212
+ "attribute": "value",
1213
+ "inheritedFrom": {
1214
+ "name": "InputMixin",
1215
+ "module": "src/common/mixins/InputMixin.ts"
1216
+ }
1047
1217
  },
1048
1218
  {
1049
1219
  "kind": "field",
1050
- "name": "handleYearSelect",
1051
- "privacy": "private"
1220
+ "name": "form",
1221
+ "privacy": "protected",
1222
+ "description": "Gets the form, if any, associated with the form element.",
1223
+ "inheritedFrom": {
1224
+ "name": "InputMixin",
1225
+ "module": "src/common/mixins/InputMixin.ts"
1226
+ }
1052
1227
  },
1053
1228
  {
1054
1229
  "kind": "field",
1055
- "name": "handleNextMonthClick",
1056
- "privacy": "private"
1230
+ "name": "focusableRef",
1231
+ "privacy": "protected",
1232
+ "inheritedFrom": {
1233
+ "name": "FocusableMixin",
1234
+ "module": "src/common/mixins/FocusableMixin.ts"
1235
+ }
1057
1236
  },
1058
1237
  {
1059
- "kind": "field",
1060
- "name": "handlePreviousMonthClick",
1061
- "privacy": "private"
1238
+ "kind": "method",
1239
+ "name": "focus",
1240
+ "parameters": [
1241
+ {
1242
+ "name": "options",
1243
+ "optional": true,
1244
+ "type": {
1245
+ "text": "FocusOptions"
1246
+ },
1247
+ "description": "An object which controls aspects of the focusing process."
1248
+ }
1249
+ ],
1250
+ "description": "Programmatically move focus to the component.",
1251
+ "inheritedFrom": {
1252
+ "name": "FocusableMixin",
1253
+ "module": "src/common/mixins/FocusableMixin.ts"
1254
+ }
1062
1255
  },
1063
1256
  {
1064
- "kind": "field",
1065
- "name": "enableActiveFocus",
1066
- "privacy": "private"
1257
+ "kind": "method",
1258
+ "name": "blur",
1259
+ "description": "Programmatically remove focus from the component.",
1260
+ "inheritedFrom": {
1261
+ "name": "FocusableMixin",
1262
+ "module": "src/common/mixins/FocusableMixin.ts"
1263
+ }
1067
1264
  },
1068
1265
  {
1069
- "kind": "field",
1070
- "name": "disableActiveFocus",
1071
- "privacy": "private"
1266
+ "kind": "method",
1267
+ "name": "click",
1268
+ "description": "Programmatically simulates a click on the component.",
1269
+ "inheritedFrom": {
1270
+ "name": "FocusableMixin",
1271
+ "module": "src/common/mixins/FocusableMixin.ts"
1272
+ }
1072
1273
  },
1073
1274
  {
1074
1275
  "kind": "field",
@@ -1087,42 +1288,115 @@
1087
1288
  ],
1088
1289
  "attributes": [
1089
1290
  {
1090
- "name": "value",
1291
+ "name": "variant",
1091
1292
  "type": {
1092
- "text": "string"
1293
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1093
1294
  },
1094
- "default": "\"\"",
1095
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1096
- "fieldName": "value"
1295
+ "default": "\"default\"",
1296
+ "description": "The style variant of the button.",
1297
+ "fieldName": "variant"
1097
1298
  },
1098
1299
  {
1099
- "name": "firstDayOfWeek",
1300
+ "name": "type",
1100
1301
  "type": {
1101
- "text": "DaysOfWeek"
1302
+ "text": "\"button\" | \"submit\" | \"reset\""
1102
1303
  },
1103
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1104
- "fieldName": "firstDayOfWeek"
1304
+ "default": "\"submit\"",
1305
+ "description": "The type of the button.",
1306
+ "fieldName": "type"
1105
1307
  },
1106
1308
  {
1107
- "name": "min",
1309
+ "name": "size",
1108
1310
  "type": {
1109
- "text": "string"
1311
+ "text": "\"s\" | \"m\" | \"l\""
1110
1312
  },
1111
- "default": "\"\"",
1112
- "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.",
1113
- "fieldName": "min"
1313
+ "default": "\"m\"",
1314
+ "description": "The size of the button.\nThis affects font-size and padding.",
1315
+ "fieldName": "size"
1114
1316
  },
1115
1317
  {
1116
- "name": "max",
1318
+ "name": "href",
1319
+ "type": {
1320
+ "text": "string | undefined"
1321
+ },
1322
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1323
+ "fieldName": "href"
1324
+ },
1325
+ {
1326
+ "name": "download",
1327
+ "type": {
1328
+ "text": "boolean"
1329
+ },
1330
+ "default": "false",
1331
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1332
+ "fieldName": "download"
1333
+ },
1334
+ {
1335
+ "name": "target",
1336
+ "type": {
1337
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1338
+ },
1339
+ "default": "\"_self\"",
1340
+ "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.",
1341
+ "fieldName": "target"
1342
+ },
1343
+ {
1344
+ "name": "expand",
1345
+ "type": {
1346
+ "text": "boolean"
1347
+ },
1348
+ "default": "false",
1349
+ "description": "Controls whether the button expands to fill the width of its container.",
1350
+ "fieldName": "expand"
1351
+ },
1352
+ {
1353
+ "name": "disabled",
1354
+ "type": {
1355
+ "text": "boolean"
1356
+ },
1357
+ "default": "false",
1358
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1359
+ "fieldName": "disabled",
1360
+ "inheritedFrom": {
1361
+ "name": "InputMixin",
1362
+ "module": "src/common/mixins/InputMixin.ts"
1363
+ }
1364
+ },
1365
+ {
1366
+ "name": "name",
1367
+ "type": {
1368
+ "text": "string | undefined"
1369
+ },
1370
+ "description": "The name of the form component.",
1371
+ "fieldName": "name",
1372
+ "inheritedFrom": {
1373
+ "name": "InputMixin",
1374
+ "module": "src/common/mixins/InputMixin.ts"
1375
+ }
1376
+ },
1377
+ {
1378
+ "name": "value",
1117
1379
  "type": {
1118
1380
  "text": "string"
1119
1381
  },
1120
1382
  "default": "\"\"",
1121
- "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.",
1122
- "fieldName": "max"
1383
+ "description": "The value of the form component.",
1384
+ "fieldName": "value",
1385
+ "inheritedFrom": {
1386
+ "name": "InputMixin",
1387
+ "module": "src/common/mixins/InputMixin.ts"
1388
+ }
1123
1389
  }
1124
1390
  ],
1125
1391
  "mixins": [
1392
+ {
1393
+ "name": "InputMixin",
1394
+ "module": "/src/common/mixins/InputMixin.js"
1395
+ },
1396
+ {
1397
+ "name": "FocusableMixin",
1398
+ "module": "/src/common/mixins/FocusableMixin.js"
1399
+ },
1126
1400
  {
1127
1401
  "name": "DraftComponentMixin",
1128
1402
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -1133,8 +1407,8 @@
1133
1407
  "package": "lit"
1134
1408
  },
1135
1409
  "status": "draft",
1136
- "category": "list",
1137
- "tagName": "nord-calendar",
1410
+ "category": "action",
1411
+ "tagName": "nord-button",
1138
1412
  "customElement": true
1139
1413
  }
1140
1414
  ],
@@ -1143,77 +1417,107 @@
1143
1417
  "kind": "js",
1144
1418
  "name": "default",
1145
1419
  "declaration": {
1146
- "name": "Calendar",
1147
- "module": "src/calendar/Calendar.ts"
1420
+ "name": "Button",
1421
+ "module": "src/button/Button.ts"
1148
1422
  }
1149
1423
  },
1150
1424
  {
1151
1425
  "kind": "custom-element-definition",
1152
- "name": "nord-calendar",
1426
+ "name": "nord-button",
1153
1427
  "declaration": {
1154
- "name": "Calendar",
1155
- "module": "src/calendar/Calendar.ts"
1428
+ "name": "Button",
1429
+ "module": "src/button/Button.ts"
1156
1430
  }
1157
1431
  }
1158
1432
  ],
1159
- "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"
1433
+ "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"
1160
1434
  },
1161
1435
  {
1162
1436
  "kind": "javascript-module",
1163
- "path": "src/calendar/DateSelectEvent.ts",
1437
+ "path": "src/card/Card.ts",
1164
1438
  "declarations": [
1165
1439
  {
1166
1440
  "kind": "class",
1167
- "description": "",
1168
- "name": "DateSelectEvent",
1441
+ "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.",
1442
+ "name": "Card",
1443
+ "slots": [
1444
+ {
1445
+ "description": "The card content.",
1446
+ "name": ""
1447
+ },
1448
+ {
1449
+ "description": "Optional slot that holds a header for the card.",
1450
+ "name": "header"
1451
+ },
1452
+ {
1453
+ "description": "Optional slot that holds footer content for the card.",
1454
+ "name": "footer"
1455
+ }
1456
+ ],
1169
1457
  "members": [
1170
1458
  {
1171
1459
  "kind": "field",
1172
- "name": "eventName",
1460
+ "name": "headerSlot",
1461
+ "privacy": "private",
1462
+ "default": "new SlotController(this, \"header\")"
1463
+ },
1464
+ {
1465
+ "kind": "field",
1466
+ "name": "footerSlot",
1467
+ "privacy": "private",
1468
+ "default": "new SlotController(this, \"footer\")"
1469
+ },
1470
+ {
1471
+ "kind": "field",
1472
+ "name": "padding",
1173
1473
  "type": {
1174
- "text": "string"
1474
+ "text": "\"m\" | \"l\" | \"none\""
1175
1475
  },
1176
- "static": true,
1177
- "default": "\"nord-select\""
1476
+ "default": "\"m\"",
1477
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1478
+ "attribute": "padding",
1479
+ "reflects": true
1178
1480
  },
1179
1481
  {
1180
- "kind": "field",
1181
- "name": "date",
1482
+ "kind": "field",
1483
+ "name": "_warningLogged",
1484
+ "type": {
1485
+ "text": "boolean"
1486
+ },
1487
+ "privacy": "private",
1488
+ "static": true,
1489
+ "default": "false",
1490
+ "inheritedFrom": {
1491
+ "name": "DraftComponentMixin",
1492
+ "module": "src/common/mixins/DraftComponentMixin.ts"
1493
+ }
1494
+ }
1495
+ ],
1496
+ "attributes": [
1497
+ {
1498
+ "name": "padding",
1182
1499
  "type": {
1183
- "text": "Date"
1500
+ "text": "\"m\" | \"l\" | \"none\""
1184
1501
  },
1185
- "default": "date"
1502
+ "default": "\"m\"",
1503
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1504
+ "fieldName": "padding"
1505
+ }
1506
+ ],
1507
+ "mixins": [
1508
+ {
1509
+ "name": "DraftComponentMixin",
1510
+ "module": "/src/common/mixins/DraftComponentMixin.js"
1186
1511
  }
1187
1512
  ],
1188
1513
  "superclass": {
1189
- "name": "NordEvent",
1190
- "module": "/src/common/events.js"
1191
- }
1192
- }
1193
- ],
1194
- "exports": [
1195
- {
1196
- "kind": "js",
1197
- "name": "DateSelectEvent",
1198
- "declaration": {
1199
- "name": "DateSelectEvent",
1200
- "module": "src/calendar/DateSelectEvent.ts"
1201
- }
1202
- }
1203
- ],
1204
- "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"
1205
- },
1206
- {
1207
- "kind": "javascript-module",
1208
- "path": "src/calendar/calendar-localization.ts",
1209
- "declarations": [
1210
- {
1211
- "kind": "variable",
1212
- "name": "localization",
1213
- "type": {
1214
- "text": "CalendarLocalizedText"
1514
+ "name": "LitElement",
1515
+ "package": "lit"
1215
1516
  },
1216
- "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}"
1517
+ "status": "draft",
1518
+ "category": "structure",
1519
+ "tagName": "nord-card",
1520
+ "customElement": true
1217
1521
  }
1218
1522
  ],
1219
1523
  "exports": [
@@ -1221,61 +1525,20 @@
1221
1525
  "kind": "js",
1222
1526
  "name": "default",
1223
1527
  "declaration": {
1224
- "name": "localization",
1225
- "module": "src/calendar/calendar-localization.ts"
1226
- }
1227
- }
1228
- ],
1229
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1230
- },
1231
- {
1232
- "kind": "javascript-module",
1233
- "path": "src/calendar/month-view.ts",
1234
- "declarations": [
1235
- {
1236
- "kind": "function",
1237
- "name": "dayView",
1238
- "parameters": [
1239
- {
1240
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1241
- "type": {
1242
- "text": "DatePickerDayProps"
1243
- }
1244
- }
1245
- ]
1246
- },
1247
- {
1248
- "kind": "function",
1249
- "name": "monthView",
1250
- "parameters": [
1251
- {
1252
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1253
- "type": {
1254
- "text": "MonthViewArgs"
1255
- }
1256
- }
1257
- ]
1258
- }
1259
- ],
1260
- "exports": [
1261
- {
1262
- "kind": "js",
1263
- "name": "dayView",
1264
- "declaration": {
1265
- "name": "dayView",
1266
- "module": "src/calendar/month-view.ts"
1528
+ "name": "Card",
1529
+ "module": "src/card/Card.ts"
1267
1530
  }
1268
1531
  },
1269
1532
  {
1270
- "kind": "js",
1271
- "name": "monthView",
1533
+ "kind": "custom-element-definition",
1534
+ "name": "nord-card",
1272
1535
  "declaration": {
1273
- "name": "monthView",
1274
- "module": "src/calendar/month-view.ts"
1536
+ "name": "Card",
1537
+ "module": "src/card/Card.ts"
1275
1538
  }
1276
1539
  }
1277
1540
  ],
1278
- "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"
1541
+ "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"
1279
1542
  },
1280
1543
  {
1281
1544
  "kind": "javascript-module",
@@ -1323,11 +1586,6 @@
1323
1586
  "kind": "method",
1324
1587
  "name": "handleChange",
1325
1588
  "privacy": "protected",
1326
- "return": {
1327
- "type": {
1328
- "text": "void"
1329
- }
1330
- },
1331
1589
  "parameters": [
1332
1590
  {
1333
1591
  "name": "e",
@@ -1336,6 +1594,11 @@
1336
1594
  }
1337
1595
  }
1338
1596
  ],
1597
+ "return": {
1598
+ "type": {
1599
+ "text": "void"
1600
+ }
1601
+ },
1339
1602
  "inheritedFrom": {
1340
1603
  "name": "FormAssociatedMixin",
1341
1604
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -1839,149 +2102,17 @@
1839
2102
  ],
1840
2103
  "mixins": [
1841
2104
  {
1842
- "name": "FormAssociatedMixin",
1843
- "module": "/src/common/mixins/FormAssociatedMixin.js"
1844
- },
1845
- {
1846
- "name": "InputMixin",
1847
- "module": "/src/common/mixins/InputMixin.js"
1848
- },
1849
- {
1850
- "name": "FocusableMixin",
1851
- "module": "/src/common/mixins/FocusableMixin.js"
1852
- },
1853
- {
1854
- "name": "DraftComponentMixin",
1855
- "module": "/src/common/mixins/DraftComponentMixin.js"
1856
- }
1857
- ],
1858
- "superclass": {
1859
- "name": "LitElement",
1860
- "package": "lit"
1861
- },
1862
- "status": "draft",
1863
- "category": "form",
1864
- "tagName": "nord-checkbox",
1865
- "customElement": true,
1866
- "events": [
1867
- {
1868
- "name": "input",
1869
- "type": {
1870
- "text": "NordEvent"
1871
- },
1872
- "description": "Fired as the user types into the input.",
1873
- "inheritedFrom": {
1874
- "name": "FormAssociatedMixin",
1875
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1876
- }
1877
- },
1878
- {
1879
- "name": "change",
1880
- "type": {
1881
- "text": "NordEvent"
1882
- },
1883
- "description": "Fired whenever the input's value is changed via user interaction.",
1884
- "inheritedFrom": {
1885
- "name": "FormAssociatedMixin",
1886
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1887
- }
1888
- }
1889
- ]
1890
- }
1891
- ],
1892
- "exports": [
1893
- {
1894
- "kind": "js",
1895
- "name": "default",
1896
- "declaration": {
1897
- "name": "Checkbox",
1898
- "module": "src/checkbox/Checkbox.ts"
1899
- }
1900
- },
1901
- {
1902
- "kind": "custom-element-definition",
1903
- "name": "nord-checkbox",
1904
- "declaration": {
1905
- "name": "Checkbox",
1906
- "module": "src/checkbox/Checkbox.ts"
1907
- }
1908
- }
1909
- ],
1910
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
1911
- },
1912
- {
1913
- "kind": "javascript-module",
1914
- "path": "src/card/Card.ts",
1915
- "declarations": [
1916
- {
1917
- "kind": "class",
1918
- "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.",
1919
- "name": "Card",
1920
- "slots": [
1921
- {
1922
- "description": "The card content.",
1923
- "name": ""
1924
- },
1925
- {
1926
- "description": "Optional slot that holds a header for the card.",
1927
- "name": "header"
1928
- },
1929
- {
1930
- "description": "Optional slot that holds footer content for the card.",
1931
- "name": "footer"
1932
- }
1933
- ],
1934
- "members": [
1935
- {
1936
- "kind": "field",
1937
- "name": "headerSlot",
1938
- "privacy": "private",
1939
- "default": "new SlotController(this, \"header\")"
1940
- },
1941
- {
1942
- "kind": "field",
1943
- "name": "footerSlot",
1944
- "privacy": "private",
1945
- "default": "new SlotController(this, \"footer\")"
1946
- },
1947
- {
1948
- "kind": "field",
1949
- "name": "padding",
1950
- "type": {
1951
- "text": "\"m\" | \"l\" | \"none\""
1952
- },
1953
- "default": "\"m\"",
1954
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1955
- "attribute": "padding",
1956
- "reflects": true
1957
- },
1958
- {
1959
- "kind": "field",
1960
- "name": "_warningLogged",
1961
- "type": {
1962
- "text": "boolean"
1963
- },
1964
- "privacy": "private",
1965
- "static": true,
1966
- "default": "false",
1967
- "inheritedFrom": {
1968
- "name": "DraftComponentMixin",
1969
- "module": "src/common/mixins/DraftComponentMixin.ts"
1970
- }
1971
- }
1972
- ],
1973
- "attributes": [
1974
- {
1975
- "name": "padding",
1976
- "type": {
1977
- "text": "\"m\" | \"l\" | \"none\""
1978
- },
1979
- "default": "\"m\"",
1980
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1981
- "fieldName": "padding"
1982
- }
1983
- ],
1984
- "mixins": [
2105
+ "name": "FormAssociatedMixin",
2106
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
2107
+ },
2108
+ {
2109
+ "name": "InputMixin",
2110
+ "module": "/src/common/mixins/InputMixin.js"
2111
+ },
2112
+ {
2113
+ "name": "FocusableMixin",
2114
+ "module": "/src/common/mixins/FocusableMixin.js"
2115
+ },
1985
2116
  {
1986
2117
  "name": "DraftComponentMixin",
1987
2118
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -1992,9 +2123,33 @@
1992
2123
  "package": "lit"
1993
2124
  },
1994
2125
  "status": "draft",
1995
- "category": "structure",
1996
- "tagName": "nord-card",
1997
- "customElement": true
2126
+ "category": "form",
2127
+ "tagName": "nord-checkbox",
2128
+ "customElement": true,
2129
+ "events": [
2130
+ {
2131
+ "name": "input",
2132
+ "type": {
2133
+ "text": "NordEvent"
2134
+ },
2135
+ "description": "Fired as the user types into the input.",
2136
+ "inheritedFrom": {
2137
+ "name": "FormAssociatedMixin",
2138
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2139
+ }
2140
+ },
2141
+ {
2142
+ "name": "change",
2143
+ "type": {
2144
+ "text": "NordEvent"
2145
+ },
2146
+ "description": "Fired whenever the input's value is changed via user interaction.",
2147
+ "inheritedFrom": {
2148
+ "name": "FormAssociatedMixin",
2149
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2150
+ }
2151
+ }
2152
+ ]
1998
2153
  }
1999
2154
  ],
2000
2155
  "exports": [
@@ -2002,20 +2157,20 @@
2002
2157
  "kind": "js",
2003
2158
  "name": "default",
2004
2159
  "declaration": {
2005
- "name": "Card",
2006
- "module": "src/card/Card.ts"
2160
+ "name": "Checkbox",
2161
+ "module": "src/checkbox/Checkbox.ts"
2007
2162
  }
2008
2163
  },
2009
2164
  {
2010
2165
  "kind": "custom-element-definition",
2011
- "name": "nord-card",
2166
+ "name": "nord-checkbox",
2012
2167
  "declaration": {
2013
- "name": "Card",
2014
- "module": "src/card/Card.ts"
2168
+ "name": "Checkbox",
2169
+ "module": "src/checkbox/Checkbox.ts"
2015
2170
  }
2016
2171
  }
2017
2172
  ],
2018
- "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"
2173
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
2019
2174
  },
2020
2175
  {
2021
2176
  "kind": "javascript-module",
@@ -3380,6 +3535,34 @@
3380
3535
  }
3381
3536
  ]
3382
3537
  },
3538
+ {
3539
+ "kind": "javascript-module",
3540
+ "path": "src/common/fsm.ts",
3541
+ "declarations": [
3542
+ {
3543
+ "kind": "function",
3544
+ "name": "fsm",
3545
+ "parameters": [
3546
+ {
3547
+ "name": "config",
3548
+ "type": {
3549
+ "text": "TTransitions"
3550
+ }
3551
+ }
3552
+ ]
3553
+ }
3554
+ ],
3555
+ "exports": [
3556
+ {
3557
+ "kind": "js",
3558
+ "name": "fsm",
3559
+ "declaration": {
3560
+ "name": "fsm",
3561
+ "module": "src/common/fsm.ts"
3562
+ }
3563
+ }
3564
+ ]
3565
+ },
3383
3566
  {
3384
3567
  "kind": "javascript-module",
3385
3568
  "path": "src/common/input.ts",
@@ -3997,6 +4180,14 @@
3997
4180
  "kind": "method",
3998
4181
  "name": "handleChange",
3999
4182
  "privacy": "protected",
4183
+ "parameters": [
4184
+ {
4185
+ "name": "e",
4186
+ "type": {
4187
+ "text": "Event"
4188
+ }
4189
+ }
4190
+ ],
4000
4191
  "inheritedFrom": {
4001
4192
  "name": "FormAssociatedMixin",
4002
4193
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -4454,6 +4645,72 @@
4454
4645
  ],
4455
4646
  "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\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 to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker 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### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\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\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
4456
4647
  },
4648
+ {
4649
+ "kind": "javascript-module",
4650
+ "path": "src/empty-state/EmptyState.ts",
4651
+ "declarations": [
4652
+ {
4653
+ "kind": "class",
4654
+ "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
4655
+ "name": "EmptyState",
4656
+ "slots": [
4657
+ {
4658
+ "description": "default slot",
4659
+ "name": ""
4660
+ }
4661
+ ],
4662
+ "members": [
4663
+ {
4664
+ "kind": "field",
4665
+ "name": "_warningLogged",
4666
+ "type": {
4667
+ "text": "boolean"
4668
+ },
4669
+ "privacy": "private",
4670
+ "static": true,
4671
+ "default": "false",
4672
+ "inheritedFrom": {
4673
+ "name": "DraftComponentMixin",
4674
+ "module": "src/common/mixins/DraftComponentMixin.ts"
4675
+ }
4676
+ }
4677
+ ],
4678
+ "mixins": [
4679
+ {
4680
+ "name": "DraftComponentMixin",
4681
+ "module": "/src/common/mixins/DraftComponentMixin.js"
4682
+ }
4683
+ ],
4684
+ "superclass": {
4685
+ "name": "LitElement",
4686
+ "package": "lit"
4687
+ },
4688
+ "status": "draft",
4689
+ "category": "feedback",
4690
+ "tagName": "nord-empty-state",
4691
+ "customElement": true
4692
+ }
4693
+ ],
4694
+ "exports": [
4695
+ {
4696
+ "kind": "js",
4697
+ "name": "default",
4698
+ "declaration": {
4699
+ "name": "EmptyState",
4700
+ "module": "src/empty-state/EmptyState.ts"
4701
+ }
4702
+ },
4703
+ {
4704
+ "kind": "custom-element-definition",
4705
+ "name": "nord-empty-state",
4706
+ "declaration": {
4707
+ "name": "EmptyState",
4708
+ "module": "src/empty-state/EmptyState.ts"
4709
+ }
4710
+ }
4711
+ ],
4712
+ "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 another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, 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\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\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\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</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\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</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\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
4713
+ },
4457
4714
  {
4458
4715
  "kind": "javascript-module",
4459
4716
  "path": "src/fieldset/Fieldset.ts",
@@ -4605,72 +4862,6 @@
4605
4862
  ],
4606
4863
  "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 the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset 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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
4607
4864
  },
4608
- {
4609
- "kind": "javascript-module",
4610
- "path": "src/empty-state/EmptyState.ts",
4611
- "declarations": [
4612
- {
4613
- "kind": "class",
4614
- "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state should provide\nexplanation or guidance to help user progress.",
4615
- "name": "EmptyState",
4616
- "slots": [
4617
- {
4618
- "description": "default slot",
4619
- "name": ""
4620
- }
4621
- ],
4622
- "members": [
4623
- {
4624
- "kind": "field",
4625
- "name": "_warningLogged",
4626
- "type": {
4627
- "text": "boolean"
4628
- },
4629
- "privacy": "private",
4630
- "static": true,
4631
- "default": "false",
4632
- "inheritedFrom": {
4633
- "name": "DraftComponentMixin",
4634
- "module": "src/common/mixins/DraftComponentMixin.ts"
4635
- }
4636
- }
4637
- ],
4638
- "mixins": [
4639
- {
4640
- "name": "DraftComponentMixin",
4641
- "module": "/src/common/mixins/DraftComponentMixin.js"
4642
- }
4643
- ],
4644
- "superclass": {
4645
- "name": "LitElement",
4646
- "package": "lit"
4647
- },
4648
- "status": "draft",
4649
- "category": "feedback",
4650
- "tagName": "nord-empty-state",
4651
- "customElement": true
4652
- }
4653
- ],
4654
- "exports": [
4655
- {
4656
- "kind": "js",
4657
- "name": "default",
4658
- "declaration": {
4659
- "name": "EmptyState",
4660
- "module": "src/empty-state/EmptyState.ts"
4661
- }
4662
- },
4663
- {
4664
- "kind": "custom-element-definition",
4665
- "name": "nord-empty-state",
4666
- "declaration": {
4667
- "name": "EmptyState",
4668
- "module": "src/empty-state/EmptyState.ts"
4669
- }
4670
- }
4671
- ],
4672
- "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 another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, 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\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\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\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</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\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</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\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
4673
- },
4674
4865
  {
4675
4866
  "kind": "javascript-module",
4676
4867
  "path": "src/header/Header.ts",
@@ -5263,6 +5454,14 @@
5263
5454
  "kind": "method",
5264
5455
  "name": "handleChange",
5265
5456
  "privacy": "protected",
5457
+ "parameters": [
5458
+ {
5459
+ "name": "e",
5460
+ "type": {
5461
+ "text": "Event"
5462
+ }
5463
+ }
5464
+ ],
5266
5465
  "inheritedFrom": {
5267
5466
  "name": "FormAssociatedMixin",
5268
5467
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -5650,7 +5849,7 @@
5650
5849
  "declarations": [
5651
5850
  {
5652
5851
  "kind": "class",
5653
- "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configurations: one-column. Please note\nthat responsive behaviour is still under work.",
5852
+ "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
5654
5853
  "name": "Layout",
5655
5854
  "slots": [
5656
5855
  {
@@ -6282,11 +6481,6 @@
6282
6481
  "kind": "method",
6283
6482
  "name": "handleChange",
6284
6483
  "privacy": "protected",
6285
- "return": {
6286
- "type": {
6287
- "text": "void"
6288
- }
6289
- },
6290
6484
  "parameters": [
6291
6485
  {
6292
6486
  "name": "e",
@@ -6295,6 +6489,11 @@
6295
6489
  }
6296
6490
  }
6297
6491
  ],
6492
+ "return": {
6493
+ "type": {
6494
+ "text": "void"
6495
+ }
6496
+ },
6298
6497
  "inheritedFrom": {
6299
6498
  "name": "FormAssociatedMixin",
6300
6499
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -7083,6 +7282,14 @@
7083
7282
  "kind": "method",
7084
7283
  "name": "handleChange",
7085
7284
  "privacy": "protected",
7285
+ "parameters": [
7286
+ {
7287
+ "name": "e",
7288
+ "type": {
7289
+ "text": "Event"
7290
+ }
7291
+ }
7292
+ ],
7086
7293
  "inheritedFrom": {
7087
7294
  "name": "FormAssociatedMixin",
7088
7295
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -8043,6 +8250,14 @@
8043
8250
  "kind": "method",
8044
8251
  "name": "handleChange",
8045
8252
  "privacy": "protected",
8253
+ "parameters": [
8254
+ {
8255
+ "name": "e",
8256
+ "type": {
8257
+ "text": "Event"
8258
+ }
8259
+ }
8260
+ ],
8046
8261
  "inheritedFrom": {
8047
8262
  "name": "FormAssociatedMixin",
8048
8263
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -10128,7 +10343,15 @@
10128
10343
  {
10129
10344
  "kind": "method",
10130
10345
  "name": "handleChange",
10131
- "privacy": "protected"
10346
+ "privacy": "protected",
10347
+ "parameters": [
10348
+ {
10349
+ "name": "e",
10350
+ "type": {
10351
+ "text": "Event"
10352
+ }
10353
+ }
10354
+ ]
10132
10355
  },
10133
10356
  {
10134
10357
  "kind": "method",