@nordhealth/components 1.0.0-rc.8 → 1.0.1

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 (211) hide show
  1. package/custom-elements.json +1462 -952
  2. package/lib/Avatar.js +1 -1
  3. package/lib/Avatar.js.map +1 -1
  4. package/lib/Badge.js +1 -1
  5. package/lib/Badge.js.map +1 -1
  6. package/lib/Banner.js +1 -1
  7. package/lib/Banner.js.map +1 -1
  8. package/lib/Button.js +1 -1
  9. package/lib/Button.js.map +1 -1
  10. package/lib/Calendar-52774c03.js +2 -0
  11. package/lib/Calendar-52774c03.js.map +1 -0
  12. package/lib/Calendar.js +1 -1
  13. package/lib/Card.js +1 -1
  14. package/lib/Card.js.map +1 -1
  15. package/lib/Checkbox.js +1 -1
  16. package/lib/Checkbox.js.map +1 -1
  17. package/lib/CommandMenu.js +1 -1
  18. package/lib/CommandMenu.js.map +1 -1
  19. package/lib/CommandMenuAction.js +1 -1
  20. package/lib/CommandMenuAction.js.map +1 -1
  21. package/lib/{Component-9d373ef3.js → Component-6bf383d6.js} +2 -2
  22. package/lib/Component-6bf383d6.js.map +1 -0
  23. package/lib/DatePicker.js +1 -1
  24. package/lib/DatePicker.js.map +1 -1
  25. package/lib/DateSelectEvent.js.map +1 -1
  26. package/lib/DirectionController-8b298382.js +2 -0
  27. package/lib/DirectionController-8b298382.js.map +1 -0
  28. package/lib/DraftComponentMixin-9e4b7b34.js.map +1 -1
  29. package/lib/Dropdown.js +1 -1
  30. package/lib/Dropdown.js.map +1 -1
  31. package/lib/DropdownGroup.js +1 -1
  32. package/lib/DropdownGroup.js.map +1 -1
  33. package/lib/DropdownItem.js +1 -1
  34. package/lib/DropdownItem.js.map +1 -1
  35. package/lib/EmptyState.js +1 -1
  36. package/lib/EmptyState.js.map +1 -1
  37. package/lib/EventController-d99ebeef.js.map +1 -1
  38. package/lib/Fieldset.js +1 -1
  39. package/lib/Fieldset.js.map +1 -1
  40. package/lib/{FocusableMixin-ebb67709.js → FocusableMixin-c010d3b3.js} +2 -2
  41. package/lib/{FocusableMixin-ebb67709.js.map → FocusableMixin-c010d3b3.js.map} +1 -1
  42. package/lib/FormAssociatedMixin-f69a60dd.js +2 -0
  43. package/lib/FormAssociatedMixin-f69a60dd.js.map +1 -0
  44. package/lib/{FormField-50bd73d5.js → FormField-900069ed.js} +2 -2
  45. package/lib/FormField-900069ed.js.map +1 -0
  46. package/lib/Header.js +1 -1
  47. package/lib/Header.js.map +1 -1
  48. package/lib/Icon.js +1 -1
  49. package/lib/Icon.js.map +1 -1
  50. package/lib/Input.js +1 -1
  51. package/lib/Input.js.map +1 -1
  52. package/lib/{InputMixin-94d15730.js → InputMixin-84ca72ae.js} +2 -2
  53. package/lib/InputMixin-84ca72ae.js.map +1 -0
  54. package/lib/KeyboardController.js +1 -1
  55. package/lib/KeyboardController.js.map +1 -1
  56. package/lib/Layout.js +1 -1
  57. package/lib/Layout.js.map +1 -1
  58. package/lib/LightDismissController-a2645ae6.js +2 -0
  59. package/lib/LightDismissController-a2645ae6.js.map +1 -0
  60. package/lib/LightDomController-f21f0a7c.js +2 -0
  61. package/lib/LightDomController-f21f0a7c.js.map +1 -0
  62. package/lib/LocalizeController.js +2 -0
  63. package/lib/LocalizeController.js.map +1 -0
  64. package/lib/NavGroup.js +1 -1
  65. package/lib/NavGroup.js.map +1 -1
  66. package/lib/NavItem.js +1 -1
  67. package/lib/NavItem.js.map +1 -1
  68. package/lib/Navigation.js +1 -1
  69. package/lib/Navigation.js.map +1 -1
  70. package/lib/Popout.js +1 -1
  71. package/lib/Popout.js.map +1 -1
  72. package/lib/ProgressBar.js +1 -1
  73. package/lib/ProgressBar.js.map +1 -1
  74. package/lib/Radio.js +1 -1
  75. package/lib/Radio.js.map +1 -1
  76. package/lib/Select.js +1 -1
  77. package/lib/Select.js.map +1 -1
  78. package/lib/SelectEvent.js.map +1 -1
  79. package/lib/ShortcutController-87615e31.js +2 -0
  80. package/lib/ShortcutController-87615e31.js.map +1 -0
  81. package/lib/SlotController-ea6eff46.js +2 -0
  82. package/lib/SlotController-ea6eff46.js.map +1 -0
  83. package/lib/Spinner.js +1 -1
  84. package/lib/Spinner.js.map +1 -1
  85. package/lib/Stack.js +1 -1
  86. package/lib/Stack.js.map +1 -1
  87. package/lib/Table.js +1 -1
  88. package/lib/Table.js.map +1 -1
  89. package/lib/{TextField-ece1c786.js → TextField-0ba775e0.js} +2 -2
  90. package/lib/TextField-0ba775e0.js.map +1 -0
  91. package/lib/Textarea.js +1 -1
  92. package/lib/Textarea.js.map +1 -1
  93. package/lib/Tooltip.js +1 -1
  94. package/lib/Tooltip.js.map +1 -1
  95. package/lib/VisuallyHidden.js +1 -1
  96. package/lib/VisuallyHidden.js.map +1 -1
  97. package/lib/bundle.js +16 -25
  98. package/lib/bundle.js.map +1 -1
  99. package/lib/{class-map-87423405.js → class-map-f93f9ba8.js} +2 -2
  100. package/lib/{class-map-87423405.js.map → class-map-f93f9ba8.js.map} +1 -1
  101. package/lib/{collection-f3631dc8.js → collection-800f5002.js} +2 -2
  102. package/lib/{collection-f3631dc8.js.map → collection-800f5002.js.map} +1 -1
  103. package/lib/cond-a3e00141.js +2 -0
  104. package/lib/cond-a3e00141.js.map +1 -0
  105. package/lib/date-adapter.js +1 -1
  106. package/lib/date-adapter.js.map +1 -1
  107. package/lib/dates-56f73760.js +2 -0
  108. package/lib/dates-56f73760.js.map +1 -0
  109. package/lib/directive-de55b00a.js.map +1 -1
  110. package/lib/en-us.js +2 -0
  111. package/lib/en-us.js.map +1 -0
  112. package/lib/events-731d0007.js.map +1 -1
  113. package/lib/fi-fi.js +2 -0
  114. package/lib/fi-fi.js.map +1 -0
  115. package/lib/fsm-50373df9.js.map +1 -1
  116. package/lib/if-defined-ee2efb2f.js +7 -0
  117. package/lib/{if-defined-fe657a02.js.map → if-defined-ee2efb2f.js.map} +1 -1
  118. package/lib/index.js +1 -1
  119. package/lib/{lit-element-74b6bb4b.js → lit-element-99bdfe5a.js} +3 -3
  120. package/lib/{lit-element-74b6bb4b.js.map → lit-element-99bdfe5a.js.map} +1 -1
  121. package/lib/localization.js +2 -0
  122. package/lib/localization.js.map +1 -0
  123. package/lib/localization2.js +2 -0
  124. package/lib/localization2.js.map +1 -0
  125. package/lib/localization3.js +2 -0
  126. package/lib/localization3.js.map +1 -0
  127. package/lib/month-view.js +1 -1
  128. package/lib/month-view.js.map +1 -1
  129. package/lib/number-ff1c5d88.js +7 -0
  130. package/lib/{number-3a8ef88a.js.map → number-ff1c5d88.js.map} +1 -1
  131. package/lib/observe-a9c6dfb6.js +2 -0
  132. package/lib/observe-a9c6dfb6.js.map +1 -0
  133. package/lib/positioning-763efb3a.js +2 -0
  134. package/lib/positioning-763efb3a.js.map +1 -0
  135. package/lib/query-assigned-elements-ef860822.js +12 -0
  136. package/lib/query-assigned-elements-ef860822.js.map +1 -0
  137. package/lib/{ref-7d028e3a.js → ref-7e1d4d24.js} +3 -3
  138. package/lib/ref-7e1d4d24.js.map +1 -0
  139. package/lib/src/avatar/Avatar.d.ts +2 -2
  140. package/lib/src/calendar/Calendar.d.ts +9 -6
  141. package/lib/src/calendar/localization.d.ts +7 -0
  142. package/lib/src/calendar/month-view.d.ts +3 -3
  143. package/lib/src/command-menu/CommandMenu.d.ts +5 -3
  144. package/lib/src/command-menu/CommandMenuAction.d.ts +3 -4
  145. package/lib/src/command-menu/SelectEvent.d.ts +1 -1
  146. package/lib/src/command-menu/localization.d.ts +11 -0
  147. package/lib/src/common/collection.d.ts +1 -1
  148. package/lib/src/common/dates.d.ts +2 -0
  149. package/lib/src/common/decorators/observe.d.ts +3 -0
  150. package/lib/src/common/directives/cond.d.ts +29 -7
  151. package/lib/src/common/fsm.d.ts +5 -3
  152. package/lib/src/common/mixins/InputMixin.d.ts +1 -1
  153. package/lib/src/date-picker/DatePicker.d.ts +3 -9
  154. package/lib/src/date-picker/localization.d.ts +7 -0
  155. package/lib/src/dropdown/Dropdown.d.ts +7 -4
  156. package/lib/src/dropdown-group/DropdownGroup.d.ts +2 -4
  157. package/lib/src/dropdown-item/DropdownItem.d.ts +1 -1
  158. package/lib/src/header/Header.d.ts +4 -6
  159. package/lib/src/icon/Icon.d.ts +4 -5
  160. package/lib/src/index.d.ts +2 -0
  161. package/lib/src/localization/LocalizeController.d.ts +28 -0
  162. package/lib/src/localization/LocalizeController.test.d.ts +1 -0
  163. package/lib/src/localization/en-us.d.ts +28 -0
  164. package/lib/src/localization/fi-fi.d.ts +3 -0
  165. package/lib/src/localization/translation.d.ts +31 -0
  166. package/lib/src/localization/translation.test.d.ts +1 -0
  167. package/lib/src/navigation/Navigation.test.d.ts +1 -0
  168. package/lib/src/popout/Popout.d.ts +5 -9
  169. package/lib/src/radio/Radio.d.ts +1 -1
  170. package/lib/src/stack/Stack.d.ts +1 -1
  171. package/lib/src/textarea/Textarea.d.ts +2 -3
  172. package/lib/src/tooltip/Tooltip.d.ts +3 -6
  173. package/lib/translation.js +2 -0
  174. package/lib/translation.js.map +1 -0
  175. package/lib/unsafe-html-feceb926.js +7 -0
  176. package/lib/{unsafe-html-989a642b.js.map → unsafe-html-feceb926.js.map} +1 -1
  177. package/package.json +12 -12
  178. package/lib/Calendar-5fe3a48c.js +0 -2
  179. package/lib/Calendar-5fe3a48c.js.map +0 -1
  180. package/lib/Component-9d373ef3.js.map +0 -1
  181. package/lib/DirectionController-82794ee9.js +0 -2
  182. package/lib/DirectionController-82794ee9.js.map +0 -1
  183. package/lib/FormAssociatedMixin-1f97ed66.js +0 -2
  184. package/lib/FormAssociatedMixin-1f97ed66.js.map +0 -1
  185. package/lib/FormField-50bd73d5.js.map +0 -1
  186. package/lib/InputMixin-94d15730.js.map +0 -1
  187. package/lib/LightDismissController-a35d0f66.js +0 -2
  188. package/lib/LightDismissController-a35d0f66.js.map +0 -1
  189. package/lib/LightDomController-011334da.js +0 -2
  190. package/lib/LightDomController-011334da.js.map +0 -1
  191. package/lib/ShortcutController-93173ff4.js +0 -2
  192. package/lib/ShortcutController-93173ff4.js.map +0 -1
  193. package/lib/SlotController-683d0e7c.js +0 -2
  194. package/lib/SlotController-683d0e7c.js.map +0 -1
  195. package/lib/TextField-ece1c786.js.map +0 -1
  196. package/lib/calendar-localization.js +0 -2
  197. package/lib/calendar-localization.js.map +0 -1
  198. package/lib/date-localization.js +0 -2
  199. package/lib/date-localization.js.map +0 -1
  200. package/lib/dates-ccf5a897.js +0 -2
  201. package/lib/dates-ccf5a897.js.map +0 -1
  202. package/lib/if-defined-fe657a02.js +0 -7
  203. package/lib/number-3a8ef88a.js +0 -7
  204. package/lib/positioning-72899e14.js +0 -2
  205. package/lib/positioning-72899e14.js.map +0 -1
  206. package/lib/query-assigned-elements-37b095c4.js +0 -26
  207. package/lib/query-assigned-elements-37b095c4.js.map +0 -1
  208. package/lib/ref-7d028e3a.js.map +0 -1
  209. package/lib/src/calendar/calendar-localization.d.ts +0 -15
  210. package/lib/src/date-picker/date-localization.d.ts +0 -8
  211. package/lib/unsafe-html-989a642b.js +0 -7
@@ -262,6 +262,30 @@
262
262
  "name": "default",
263
263
  "module": "\"./dropdown-group/DropdownGroup.js\""
264
264
  }
265
+ },
266
+ {
267
+ "kind": "js",
268
+ "name": "registerTranslation",
269
+ "declaration": {
270
+ "name": "registerTranslation",
271
+ "module": "\"./localization/translation.js\""
272
+ }
273
+ },
274
+ {
275
+ "kind": "js",
276
+ "name": "isTranslationRegistered",
277
+ "declaration": {
278
+ "name": "isTranslationRegistered",
279
+ "module": "\"./localization/translation.js\""
280
+ }
281
+ },
282
+ {
283
+ "kind": "js",
284
+ "name": "Translation",
285
+ "declaration": {
286
+ "name": "Translation",
287
+ "module": "\"./localization/translation.js\""
288
+ }
265
289
  }
266
290
  ]
267
291
  },
@@ -314,6 +338,11 @@
314
338
  "description": "The name of the person.",
315
339
  "attribute": "name"
316
340
  },
341
+ {
342
+ "kind": "method",
343
+ "name": "handleSrcChange",
344
+ "privacy": "protected"
345
+ },
317
346
  {
318
347
  "kind": "method",
319
348
  "name": "renderImage",
@@ -393,74 +422,6 @@
393
422
  ],
394
423
  "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"
395
424
  },
396
- {
397
- "kind": "javascript-module",
398
- "path": "src/banner/Banner.ts",
399
- "declarations": [
400
- {
401
- "kind": "class",
402
- "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
403
- "name": "Banner",
404
- "slots": [
405
- {
406
- "description": "default slot",
407
- "name": ""
408
- }
409
- ],
410
- "members": [
411
- {
412
- "kind": "field",
413
- "name": "variant",
414
- "type": {
415
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
416
- },
417
- "default": "\"info\"",
418
- "description": "The style variant of the banner.",
419
- "attribute": "variant",
420
- "reflects": true
421
- }
422
- ],
423
- "attributes": [
424
- {
425
- "name": "variant",
426
- "type": {
427
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
428
- },
429
- "default": "\"info\"",
430
- "description": "The style variant of the banner.",
431
- "fieldName": "variant"
432
- }
433
- ],
434
- "superclass": {
435
- "name": "LitElement",
436
- "package": "lit"
437
- },
438
- "status": "new",
439
- "category": "feedback",
440
- "tagName": "nord-banner",
441
- "customElement": true
442
- }
443
- ],
444
- "exports": [
445
- {
446
- "kind": "js",
447
- "name": "default",
448
- "declaration": {
449
- "name": "Banner",
450
- "module": "src/banner/Banner.ts"
451
- }
452
- },
453
- {
454
- "kind": "custom-element-definition",
455
- "name": "nord-banner",
456
- "declaration": {
457
- "name": "Banner",
458
- "module": "src/banner/Banner.ts"
459
- }
460
- }
461
- ],
462
- "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"
463
- },
464
425
  {
465
426
  "kind": "javascript-module",
466
427
  "path": "src/badge/Badge.ts",
@@ -531,341 +492,353 @@
531
492
  },
532
493
  {
533
494
  "kind": "javascript-module",
534
- "path": "src/calendar/Calendar.ts",
495
+ "path": "src/button/Button.ts",
535
496
  "declarations": [
536
497
  {
537
498
  "kind": "class",
538
- "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
539
- "name": "Calendar",
540
- "members": [
499
+ "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.",
500
+ "name": "Button",
501
+ "slots": [
541
502
  {
542
- "kind": "field",
543
- "name": "dialogLabelId",
544
- "type": {
545
- "text": "string"
546
- },
547
- "privacy": "private",
548
- "default": "\"dialog-header\""
503
+ "description": "The button content",
504
+ "name": ""
549
505
  },
550
506
  {
551
- "kind": "field",
552
- "name": "monthSelectNode",
553
- "type": {
554
- "text": "HTMLElement"
555
- },
556
- "privacy": "private"
507
+ "description": "Used to place content at the start of button text. Typically used for icons.",
508
+ "name": "start"
557
509
  },
510
+ {
511
+ "description": "Used to place content at the end of button text. Typically used for icons.",
512
+ "name": "end"
513
+ }
514
+ ],
515
+ "members": [
558
516
  {
559
517
  "kind": "field",
560
- "name": "focusedDayNode",
561
- "type": {
562
- "text": "HTMLButtonElement"
563
- },
518
+ "name": "buttonRef",
564
519
  "privacy": "private"
565
520
  },
566
521
  {
567
522
  "kind": "field",
568
- "name": "direction",
523
+ "name": "events",
569
524
  "privacy": "private",
570
- "default": "new DirectionController(this)"
525
+ "default": "new EventController(this)"
571
526
  },
572
527
  {
573
528
  "kind": "field",
574
- "name": "swipe",
529
+ "name": "lightDom",
575
530
  "privacy": "private",
576
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
577
- },
578
- {
579
- "kind": "field",
580
- "name": "shortcuts",
581
- "privacy": "private"
531
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
582
532
  },
583
533
  {
584
534
  "kind": "field",
585
- "name": "dateFormatShort",
535
+ "name": "variant",
586
536
  "type": {
587
- "text": "Intl.DateTimeFormat"
537
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
588
538
  },
589
- "privacy": "private",
590
- "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"
539
+ "default": "\"default\"",
540
+ "description": "The style variant of the button.",
541
+ "attribute": "variant",
542
+ "reflects": true
591
543
  },
592
544
  {
593
545
  "kind": "field",
594
- "name": "localization",
546
+ "name": "type",
595
547
  "type": {
596
- "text": "CalendarLocalizedText"
548
+ "text": "\"button\" | \"submit\" | \"reset\""
597
549
  },
598
- "default": "localization"
550
+ "default": "\"submit\"",
551
+ "description": "The type of the button.",
552
+ "attribute": "type",
553
+ "reflects": true
599
554
  },
600
555
  {
601
556
  "kind": "field",
602
- "name": "value",
557
+ "name": "size",
603
558
  "type": {
604
- "text": "string"
559
+ "text": "\"s\" | \"m\" | \"l\""
605
560
  },
606
- "default": "\"\"",
607
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
608
- "attribute": "value"
561
+ "default": "\"m\"",
562
+ "description": "The size of the button.\nThis affects font-size and padding.",
563
+ "attribute": "size",
564
+ "reflects": true
609
565
  },
610
566
  {
611
567
  "kind": "field",
612
- "name": "firstDayOfWeek",
568
+ "name": "accessibleExpanded",
613
569
  "type": {
614
- "text": "DaysOfWeek"
570
+ "text": "\"true\" | \"false\" | undefined"
615
571
  },
616
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
617
- "attribute": "firstDayOfWeek"
572
+ "privacy": "private",
573
+ "attribute": "aria-expanded"
618
574
  },
619
575
  {
620
576
  "kind": "field",
621
- "name": "min",
577
+ "name": "accessibleHasPopup",
622
578
  "type": {
623
- "text": "string"
579
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
624
580
  },
625
- "default": "\"\"",
626
- "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.",
627
- "attribute": "min"
581
+ "privacy": "private",
582
+ "attribute": "aria-haspopup"
628
583
  },
629
584
  {
630
585
  "kind": "field",
631
- "name": "max",
586
+ "name": "href",
632
587
  "type": {
633
- "text": "string"
588
+ "text": "string | undefined"
634
589
  },
635
- "default": "\"\"",
636
- "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.",
637
- "attribute": "max"
590
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
591
+ "attribute": "href",
592
+ "reflects": true
638
593
  },
639
594
  {
640
595
  "kind": "field",
641
- "name": "expand",
596
+ "name": "download",
642
597
  "type": {
643
598
  "text": "boolean"
644
599
  },
645
600
  "default": "false",
646
- "description": "Controls whether the calendar expands to fill the width of its container.",
647
- "attribute": "expand",
648
- "reflects": true
601
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
602
+ "attribute": "download"
649
603
  },
650
604
  {
651
605
  "kind": "field",
652
- "name": "isDateDisabled",
606
+ "name": "target",
653
607
  "type": {
654
- "text": "DateDisabledPredicate"
608
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
655
609
  },
656
- "default": "isDateDisabled",
657
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
610
+ "default": "\"_self\"",
611
+ "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.",
612
+ "attribute": "target",
613
+ "reflects": true
658
614
  },
659
615
  {
660
616
  "kind": "field",
661
- "name": "activeFocus",
617
+ "name": "expand",
662
618
  "type": {
663
619
  "text": "boolean"
664
620
  },
665
- "privacy": "private",
666
- "default": "false"
621
+ "default": "false",
622
+ "description": "Controls whether the button expands to fill the width of its container.",
623
+ "attribute": "expand",
624
+ "reflects": true
667
625
  },
668
626
  {
669
- "kind": "field",
670
- "name": "focusedDay",
627
+ "kind": "method",
628
+ "name": "renderLink",
671
629
  "privacy": "private",
672
- "default": "new Date()"
630
+ "parameters": [
631
+ {
632
+ "name": "innards",
633
+ "type": {
634
+ "text": "TemplateResult"
635
+ }
636
+ }
637
+ ],
638
+ "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."
673
639
  },
674
640
  {
675
641
  "kind": "method",
676
- "name": "focus",
642
+ "name": "renderButton",
643
+ "privacy": "private",
677
644
  "parameters": [
678
645
  {
679
- "name": "options",
680
- "optional": true,
646
+ "name": "innards",
681
647
  "type": {
682
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
683
- },
684
- "description": "An object which controls aspects of the focusing process."
648
+ "text": "TemplateResult"
649
+ }
685
650
  }
686
- ],
687
- "description": "Programmatically move focus to the calendar."
651
+ ]
688
652
  },
689
653
  {
690
654
  "kind": "method",
691
- "name": "createDateFormatter",
655
+ "name": "renderLightDom",
692
656
  "privacy": "private"
693
657
  },
694
658
  {
695
659
  "kind": "field",
696
- "name": "handleDaySelect",
660
+ "name": "handleOuterClick",
697
661
  "privacy": "private"
698
662
  },
699
663
  {
700
664
  "kind": "method",
701
- "name": "addDays",
665
+ "name": "handleClick",
702
666
  "privacy": "private",
703
667
  "parameters": [
704
668
  {
705
- "name": "days",
669
+ "name": "e",
706
670
  "type": {
707
- "text": "number"
671
+ "text": "Event"
708
672
  }
709
673
  }
710
674
  ]
711
675
  },
712
676
  {
713
- "kind": "method",
714
- "name": "addMonths",
715
- "privacy": "private",
716
- "parameters": [
717
- {
718
- "name": "months",
719
- "type": {
720
- "text": "number"
721
- }
722
- }
723
- ]
677
+ "kind": "field",
678
+ "name": "disabled",
679
+ "type": {
680
+ "text": "boolean"
681
+ },
682
+ "default": "false",
683
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
684
+ "attribute": "disabled",
685
+ "reflects": true,
686
+ "inheritedFrom": {
687
+ "name": "InputMixin",
688
+ "module": "src/common/mixins/InputMixin.ts"
689
+ }
724
690
  },
725
691
  {
726
- "kind": "method",
727
- "name": "addYears",
728
- "privacy": "private",
729
- "parameters": [
730
- {
731
- "name": "years",
732
- "type": {
733
- "text": "number"
734
- }
735
- }
736
- ]
692
+ "kind": "field",
693
+ "name": "name",
694
+ "type": {
695
+ "text": "string | undefined"
696
+ },
697
+ "description": "The name of the form component.",
698
+ "attribute": "name",
699
+ "inheritedFrom": {
700
+ "name": "InputMixin",
701
+ "module": "src/common/mixins/InputMixin.ts"
702
+ }
737
703
  },
738
704
  {
739
- "kind": "method",
740
- "name": "startOfWeek",
741
- "privacy": "private"
705
+ "kind": "field",
706
+ "name": "value",
707
+ "type": {
708
+ "text": "string"
709
+ },
710
+ "default": "\"\"",
711
+ "description": "The value of the form component.",
712
+ "attribute": "value",
713
+ "inheritedFrom": {
714
+ "name": "InputMixin",
715
+ "module": "src/common/mixins/InputMixin.ts"
716
+ }
742
717
  },
743
718
  {
744
- "kind": "method",
745
- "name": "endOfWeek",
746
- "privacy": "private"
719
+ "kind": "field",
720
+ "name": "form",
721
+ "privacy": "protected",
722
+ "description": "Gets the form, if any, associated with the form element.",
723
+ "inheritedFrom": {
724
+ "name": "InputMixin",
725
+ "module": "src/common/mixins/InputMixin.ts"
726
+ }
747
727
  },
748
728
  {
749
- "kind": "method",
750
- "name": "setMonth",
751
- "privacy": "private",
752
- "parameters": [
753
- {
754
- "name": "month",
755
- "type": {
756
- "text": "number"
757
- }
758
- }
759
- ]
729
+ "kind": "field",
730
+ "name": "focusableRef",
731
+ "privacy": "protected",
732
+ "inheritedFrom": {
733
+ "name": "FocusableMixin",
734
+ "module": "src/common/mixins/FocusableMixin.ts"
735
+ }
760
736
  },
761
737
  {
762
738
  "kind": "method",
763
- "name": "setYear",
764
- "privacy": "private",
739
+ "name": "focus",
765
740
  "parameters": [
766
741
  {
767
- "name": "year",
742
+ "name": "options",
743
+ "optional": true,
768
744
  "type": {
769
- "text": "number"
770
- }
745
+ "text": "FocusOptions"
746
+ },
747
+ "description": "An object which controls aspects of the focusing process."
771
748
  }
772
- ]
749
+ ],
750
+ "description": "Programmatically move focus to the component.",
751
+ "inheritedFrom": {
752
+ "name": "FocusableMixin",
753
+ "module": "src/common/mixins/FocusableMixin.ts"
754
+ }
773
755
  },
774
756
  {
775
757
  "kind": "method",
776
- "name": "setFocusedDay",
777
- "privacy": "private",
778
- "parameters": [
779
- {
780
- "name": "day",
781
- "type": {
782
- "text": "Date"
783
- }
784
- }
785
- ]
786
- },
787
- {
788
- "kind": "field",
789
- "name": "handleMonthSelect",
790
- "privacy": "private"
791
- },
792
- {
793
- "kind": "field",
794
- "name": "handleYearSelect",
795
- "privacy": "private"
758
+ "name": "blur",
759
+ "description": "Programmatically remove focus from the component.",
760
+ "inheritedFrom": {
761
+ "name": "FocusableMixin",
762
+ "module": "src/common/mixins/FocusableMixin.ts"
763
+ }
796
764
  },
797
765
  {
798
- "kind": "field",
799
- "name": "handleNextMonthClick",
800
- "privacy": "private"
801
- },
766
+ "kind": "method",
767
+ "name": "click",
768
+ "description": "Programmatically simulates a click on the component.",
769
+ "inheritedFrom": {
770
+ "name": "FocusableMixin",
771
+ "module": "src/common/mixins/FocusableMixin.ts"
772
+ }
773
+ }
774
+ ],
775
+ "attributes": [
802
776
  {
803
- "kind": "field",
804
- "name": "handlePreviousMonthClick",
805
- "privacy": "private"
777
+ "name": "variant",
778
+ "type": {
779
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
780
+ },
781
+ "default": "\"default\"",
782
+ "description": "The style variant of the button.",
783
+ "fieldName": "variant"
806
784
  },
807
785
  {
808
- "kind": "field",
809
- "name": "enableActiveFocus",
810
- "privacy": "private"
786
+ "name": "type",
787
+ "type": {
788
+ "text": "\"button\" | \"submit\" | \"reset\""
789
+ },
790
+ "default": "\"submit\"",
791
+ "description": "The type of the button.",
792
+ "fieldName": "type"
811
793
  },
812
794
  {
813
- "kind": "field",
814
- "name": "disableActiveFocus",
815
- "privacy": "private"
816
- }
817
- ],
818
- "events": [
819
- {
820
- "name": "nord-focus-date",
795
+ "name": "size",
821
796
  "type": {
822
- "text": "DateSelectEvent"
797
+ "text": "\"s\" | \"m\" | \"l\""
823
798
  },
824
- "description": "Dispatched when the calendar's focused date changes."
799
+ "default": "\"m\"",
800
+ "description": "The size of the button.\nThis affects font-size and padding.",
801
+ "fieldName": "size"
825
802
  },
826
803
  {
804
+ "name": "aria-expanded",
827
805
  "type": {
828
- "text": "DateSelectEvent"
806
+ "text": "\"true\" | \"false\" | undefined"
829
807
  },
830
- "description": "Dispatched when a date is selected and the value changes.",
831
- "name": "change"
832
- }
833
- ],
834
- "attributes": [
808
+ "fieldName": "accessibleExpanded"
809
+ },
835
810
  {
836
- "name": "value",
811
+ "name": "aria-haspopup",
837
812
  "type": {
838
- "text": "string"
813
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
839
814
  },
840
- "default": "\"\"",
841
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
842
- "fieldName": "value"
815
+ "fieldName": "accessibleHasPopup"
843
816
  },
844
817
  {
845
- "name": "firstDayOfWeek",
818
+ "name": "href",
846
819
  "type": {
847
- "text": "DaysOfWeek"
820
+ "text": "string | undefined"
848
821
  },
849
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
850
- "fieldName": "firstDayOfWeek"
822
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
823
+ "fieldName": "href"
851
824
  },
852
825
  {
853
- "name": "min",
826
+ "name": "download",
854
827
  "type": {
855
- "text": "string"
828
+ "text": "boolean"
856
829
  },
857
- "default": "\"\"",
858
- "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.",
859
- "fieldName": "min"
830
+ "default": "false",
831
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
832
+ "fieldName": "download"
860
833
  },
861
834
  {
862
- "name": "max",
835
+ "name": "target",
863
836
  "type": {
864
- "text": "string"
837
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
865
838
  },
866
- "default": "\"\"",
867
- "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.",
868
- "fieldName": "max"
839
+ "default": "\"_self\"",
840
+ "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.",
841
+ "fieldName": "target"
869
842
  },
870
843
  {
871
844
  "name": "expand",
@@ -873,271 +846,224 @@
873
846
  "text": "boolean"
874
847
  },
875
848
  "default": "false",
876
- "description": "Controls whether the calendar expands to fill the width of its container.",
849
+ "description": "Controls whether the button expands to fill the width of its container.",
877
850
  "fieldName": "expand"
878
- }
879
- ],
880
- "superclass": {
881
- "name": "LitElement",
882
- "package": "lit"
883
- },
884
- "status": "ready",
885
- "category": "list",
886
- "tagName": "nord-calendar",
887
- "customElement": true
888
- }
889
- ],
890
- "exports": [
891
- {
892
- "kind": "js",
893
- "name": "default",
894
- "declaration": {
895
- "name": "Calendar",
896
- "module": "src/calendar/Calendar.ts"
897
- }
898
- },
899
- {
900
- "kind": "custom-element-definition",
901
- "name": "nord-calendar",
902
- "declaration": {
903
- "name": "Calendar",
904
- "module": "src/calendar/Calendar.ts"
905
- }
906
- }
907
- ],
908
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use 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"
909
- },
910
- {
911
- "kind": "javascript-module",
912
- "path": "src/calendar/DateSelectEvent.ts",
913
- "declarations": [
914
- {
915
- "kind": "class",
916
- "description": "",
917
- "name": "DateSelectEvent",
918
- "members": [
851
+ },
919
852
  {
920
- "kind": "field",
921
- "name": "date",
853
+ "name": "disabled",
922
854
  "type": {
923
- "text": "Date"
855
+ "text": "boolean"
924
856
  },
925
- "default": "date"
926
- }
927
- ],
928
- "superclass": {
929
- "name": "NordEvent",
930
- "module": "/src/common/events.js"
931
- }
932
- }
933
- ],
934
- "exports": [
935
- {
936
- "kind": "js",
937
- "name": "DateSelectEvent",
938
- "declaration": {
939
- "name": "DateSelectEvent",
940
- "module": "src/calendar/DateSelectEvent.ts"
941
- }
942
- }
943
- ],
944
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
945
- },
946
- {
947
- "kind": "javascript-module",
948
- "path": "src/calendar/calendar-localization.ts",
949
- "declarations": [
950
- {
951
- "kind": "variable",
952
- "name": "localization",
953
- "type": {
954
- "text": "CalendarLocalizedText"
955
- },
956
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
957
- }
958
- ],
959
- "exports": [
960
- {
961
- "kind": "js",
962
- "name": "default",
963
- "declaration": {
964
- "name": "localization",
965
- "module": "src/calendar/calendar-localization.ts"
966
- }
967
- }
968
- ],
969
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
970
- },
971
- {
972
- "kind": "javascript-module",
973
- "path": "src/calendar/month-view.ts",
974
- "declarations": [
975
- {
976
- "kind": "function",
977
- "name": "dayView",
978
- "parameters": [
857
+ "default": "false",
858
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
859
+ "fieldName": "disabled",
860
+ "inheritedFrom": {
861
+ "name": "InputMixin",
862
+ "module": "src/common/mixins/InputMixin.ts"
863
+ }
864
+ },
979
865
  {
980
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
866
+ "name": "name",
981
867
  "type": {
982
- "text": "DatePickerDayProps"
868
+ "text": "string | undefined"
869
+ },
870
+ "description": "The name of the form component.",
871
+ "fieldName": "name",
872
+ "inheritedFrom": {
873
+ "name": "InputMixin",
874
+ "module": "src/common/mixins/InputMixin.ts"
983
875
  }
984
- }
985
- ]
986
- },
987
- {
988
- "kind": "function",
989
- "name": "monthView",
990
- "parameters": [
876
+ },
991
877
  {
992
- "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}",
878
+ "name": "value",
993
879
  "type": {
994
- "text": "MonthViewArgs"
880
+ "text": "string"
881
+ },
882
+ "default": "\"\"",
883
+ "description": "The value of the form component.",
884
+ "fieldName": "value",
885
+ "inheritedFrom": {
886
+ "name": "InputMixin",
887
+ "module": "src/common/mixins/InputMixin.ts"
995
888
  }
996
889
  }
997
- ]
890
+ ],
891
+ "mixins": [
892
+ {
893
+ "name": "InputMixin",
894
+ "module": "/src/common/mixins/InputMixin.js"
895
+ },
896
+ {
897
+ "name": "FocusableMixin",
898
+ "module": "/src/common/mixins/FocusableMixin.js"
899
+ }
900
+ ],
901
+ "superclass": {
902
+ "name": "LitElement",
903
+ "package": "lit"
904
+ },
905
+ "status": "ready",
906
+ "category": "action",
907
+ "tagName": "nord-button",
908
+ "customElement": true
998
909
  }
999
910
  ],
1000
911
  "exports": [
1001
912
  {
1002
913
  "kind": "js",
1003
- "name": "dayView",
914
+ "name": "default",
1004
915
  "declaration": {
1005
- "name": "dayView",
1006
- "module": "src/calendar/month-view.ts"
916
+ "name": "Button",
917
+ "module": "src/button/Button.ts"
1007
918
  }
1008
919
  },
1009
920
  {
1010
- "kind": "js",
1011
- "name": "monthView",
921
+ "kind": "custom-element-definition",
922
+ "name": "nord-button",
1012
923
  "declaration": {
1013
- "name": "monthView",
1014
- "module": "src/calendar/month-view.ts"
924
+ "name": "Button",
925
+ "module": "src/button/Button.ts"
1015
926
  }
1016
927
  }
1017
928
  ],
1018
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
929
+ "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"
1019
930
  },
1020
931
  {
1021
932
  "kind": "javascript-module",
1022
- "path": "src/button/Button.ts",
933
+ "path": "src/calendar/Calendar.ts",
1023
934
  "declarations": [
1024
935
  {
1025
936
  "kind": "class",
1026
- "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.",
1027
- "name": "Button",
1028
- "slots": [
937
+ "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.",
938
+ "name": "Calendar",
939
+ "members": [
1029
940
  {
1030
- "description": "The button content",
1031
- "name": ""
941
+ "kind": "field",
942
+ "name": "dialogLabelId",
943
+ "type": {
944
+ "text": "string"
945
+ },
946
+ "privacy": "private",
947
+ "default": "\"dialog-header\""
1032
948
  },
1033
949
  {
1034
- "description": "Used to place content at the start of button text. Typically used for icons.",
1035
- "name": "start"
950
+ "kind": "field",
951
+ "name": "monthSelectNode",
952
+ "type": {
953
+ "text": "HTMLElement"
954
+ },
955
+ "privacy": "private"
1036
956
  },
1037
957
  {
1038
- "description": "Used to place content at the end of button text. Typically used for icons.",
1039
- "name": "end"
1040
- }
1041
- ],
1042
- "members": [
958
+ "kind": "field",
959
+ "name": "focusedDayNode",
960
+ "type": {
961
+ "text": "HTMLButtonElement"
962
+ },
963
+ "privacy": "private"
964
+ },
1043
965
  {
1044
966
  "kind": "field",
1045
- "name": "buttonRef",
967
+ "name": "direction",
968
+ "privacy": "private",
969
+ "default": "new DirectionController(this)"
970
+ },
971
+ {
972
+ "kind": "field",
973
+ "name": "swipe",
974
+ "privacy": "private",
975
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
976
+ },
977
+ {
978
+ "kind": "field",
979
+ "name": "shortcuts",
1046
980
  "privacy": "private"
1047
981
  },
1048
982
  {
1049
983
  "kind": "field",
1050
- "name": "events",
984
+ "name": "localize",
1051
985
  "privacy": "private",
1052
- "default": "new EventController(this)"
986
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1053
987
  },
1054
988
  {
1055
989
  "kind": "field",
1056
- "name": "lightDom",
990
+ "name": "dateFormatShort",
991
+ "type": {
992
+ "text": "Intl.DateTimeFormat"
993
+ },
1057
994
  "privacy": "private",
1058
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
995
+ "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"
1059
996
  },
1060
997
  {
1061
998
  "kind": "field",
1062
- "name": "variant",
999
+ "name": "monthNames",
1063
1000
  "type": {
1064
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1001
+ "text": "string[]"
1065
1002
  },
1066
- "default": "\"default\"",
1067
- "description": "The style variant of the button.",
1068
- "attribute": "variant",
1069
- "reflects": true
1003
+ "privacy": "private"
1070
1004
  },
1071
1005
  {
1072
1006
  "kind": "field",
1073
- "name": "type",
1007
+ "name": "monthNamesShort",
1074
1008
  "type": {
1075
- "text": "\"button\" | \"submit\" | \"reset\""
1009
+ "text": "string[]"
1076
1010
  },
1077
- "default": "\"submit\"",
1078
- "description": "The type of the button.",
1079
- "attribute": "type",
1080
- "reflects": true
1011
+ "privacy": "private"
1081
1012
  },
1082
1013
  {
1083
1014
  "kind": "field",
1084
- "name": "size",
1015
+ "name": "dayNames",
1085
1016
  "type": {
1086
- "text": "\"s\" | \"m\" | \"l\""
1017
+ "text": "string[]"
1087
1018
  },
1088
- "default": "\"m\"",
1089
- "description": "The size of the button.\nThis affects font-size and padding.",
1090
- "attribute": "size",
1091
- "reflects": true
1019
+ "privacy": "private"
1092
1020
  },
1093
1021
  {
1094
1022
  "kind": "field",
1095
- "name": "accessibleExpanded",
1023
+ "name": "dayNamesShort",
1096
1024
  "type": {
1097
- "text": "\"true\" | \"false\" | undefined"
1025
+ "text": "string[]"
1098
1026
  },
1099
- "privacy": "private",
1100
- "attribute": "aria-expanded"
1027
+ "privacy": "private"
1101
1028
  },
1102
1029
  {
1103
1030
  "kind": "field",
1104
- "name": "accessibleHasPopup",
1031
+ "name": "value",
1105
1032
  "type": {
1106
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1033
+ "text": "string"
1107
1034
  },
1108
- "privacy": "private",
1109
- "attribute": "aria-haspopup"
1035
+ "default": "\"\"",
1036
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1037
+ "attribute": "value"
1110
1038
  },
1111
1039
  {
1112
1040
  "kind": "field",
1113
- "name": "href",
1041
+ "name": "firstDayOfWeek",
1114
1042
  "type": {
1115
- "text": "string | undefined"
1043
+ "text": "DaysOfWeek"
1116
1044
  },
1117
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1118
- "attribute": "href",
1119
- "reflects": true
1045
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1046
+ "attribute": "firstDayOfWeek"
1120
1047
  },
1121
1048
  {
1122
1049
  "kind": "field",
1123
- "name": "download",
1050
+ "name": "min",
1124
1051
  "type": {
1125
- "text": "boolean"
1052
+ "text": "string"
1126
1053
  },
1127
- "default": "false",
1128
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1129
- "attribute": "download"
1054
+ "default": "\"\"",
1055
+ "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.",
1056
+ "attribute": "min"
1130
1057
  },
1131
1058
  {
1132
1059
  "kind": "field",
1133
- "name": "target",
1060
+ "name": "max",
1134
1061
  "type": {
1135
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1062
+ "text": "string"
1136
1063
  },
1137
- "default": "\"_self\"",
1138
- "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.",
1139
- "attribute": "target",
1140
- "reflects": true
1064
+ "default": "\"\"",
1065
+ "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.",
1066
+ "attribute": "max"
1141
1067
  },
1142
1068
  {
1143
1069
  "kind": "field",
@@ -1146,226 +1072,239 @@
1146
1072
  "text": "boolean"
1147
1073
  },
1148
1074
  "default": "false",
1149
- "description": "Controls whether the button expands to fill the width of its container.",
1075
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1150
1076
  "attribute": "expand",
1151
1077
  "reflects": true
1152
1078
  },
1079
+ {
1080
+ "kind": "field",
1081
+ "name": "isDateDisabled",
1082
+ "type": {
1083
+ "text": "DateDisabledPredicate"
1084
+ },
1085
+ "default": "isDateDisabled",
1086
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1087
+ },
1088
+ {
1089
+ "kind": "field",
1090
+ "name": "activeFocus",
1091
+ "type": {
1092
+ "text": "boolean"
1093
+ },
1094
+ "privacy": "private",
1095
+ "default": "false"
1096
+ },
1097
+ {
1098
+ "kind": "field",
1099
+ "name": "focusedDay",
1100
+ "privacy": "private",
1101
+ "default": "new Date()"
1102
+ },
1153
1103
  {
1154
1104
  "kind": "method",
1155
- "name": "renderLink",
1105
+ "name": "focus",
1106
+ "parameters": [
1107
+ {
1108
+ "name": "options",
1109
+ "optional": true,
1110
+ "type": {
1111
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
1112
+ },
1113
+ "description": "An object which controls aspects of the focusing process."
1114
+ }
1115
+ ],
1116
+ "description": "Programmatically move focus to the calendar."
1117
+ },
1118
+ {
1119
+ "kind": "method",
1120
+ "name": "handleValueChange",
1121
+ "privacy": "protected"
1122
+ },
1123
+ {
1124
+ "kind": "method",
1125
+ "name": "handleFocusedDayChange",
1126
+ "privacy": "protected"
1127
+ },
1128
+ {
1129
+ "kind": "method",
1130
+ "name": "handleLangChange",
1131
+ "privacy": "private"
1132
+ },
1133
+ {
1134
+ "kind": "field",
1135
+ "name": "handleDaySelect",
1136
+ "privacy": "private"
1137
+ },
1138
+ {
1139
+ "kind": "method",
1140
+ "name": "addDays",
1156
1141
  "privacy": "private",
1157
1142
  "parameters": [
1158
1143
  {
1159
- "name": "innards",
1144
+ "name": "days",
1160
1145
  "type": {
1161
- "text": "TemplateResult"
1146
+ "text": "number"
1162
1147
  }
1163
1148
  }
1164
- ],
1165
- "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."
1149
+ ]
1166
1150
  },
1167
1151
  {
1168
1152
  "kind": "method",
1169
- "name": "renderButton",
1153
+ "name": "addMonths",
1170
1154
  "privacy": "private",
1171
1155
  "parameters": [
1172
1156
  {
1173
- "name": "innards",
1157
+ "name": "months",
1174
1158
  "type": {
1175
- "text": "TemplateResult"
1159
+ "text": "number"
1176
1160
  }
1177
1161
  }
1178
1162
  ]
1179
1163
  },
1180
1164
  {
1181
1165
  "kind": "method",
1182
- "name": "renderLightDom",
1166
+ "name": "addYears",
1167
+ "privacy": "private",
1168
+ "parameters": [
1169
+ {
1170
+ "name": "years",
1171
+ "type": {
1172
+ "text": "number"
1173
+ }
1174
+ }
1175
+ ]
1176
+ },
1177
+ {
1178
+ "kind": "method",
1179
+ "name": "startOfWeek",
1183
1180
  "privacy": "private"
1184
1181
  },
1185
1182
  {
1186
- "kind": "field",
1187
- "name": "handleOuterClick",
1183
+ "kind": "method",
1184
+ "name": "endOfWeek",
1188
1185
  "privacy": "private"
1189
1186
  },
1190
1187
  {
1191
1188
  "kind": "method",
1192
- "name": "handleClick",
1189
+ "name": "setMonth",
1190
+ "privacy": "private",
1191
+ "parameters": [
1192
+ {
1193
+ "name": "month",
1194
+ "type": {
1195
+ "text": "number"
1196
+ }
1197
+ }
1198
+ ]
1199
+ },
1200
+ {
1201
+ "kind": "method",
1202
+ "name": "setYear",
1203
+ "privacy": "private",
1204
+ "parameters": [
1205
+ {
1206
+ "name": "year",
1207
+ "type": {
1208
+ "text": "number"
1209
+ }
1210
+ }
1211
+ ]
1212
+ },
1213
+ {
1214
+ "kind": "method",
1215
+ "name": "setFocusedDay",
1193
1216
  "privacy": "private",
1194
1217
  "parameters": [
1195
1218
  {
1196
- "name": "e",
1219
+ "name": "day",
1197
1220
  "type": {
1198
- "text": "Event"
1221
+ "text": "Date"
1199
1222
  }
1200
1223
  }
1201
1224
  ]
1202
1225
  },
1203
1226
  {
1204
1227
  "kind": "field",
1205
- "name": "disabled",
1206
- "type": {
1207
- "text": "boolean"
1208
- },
1209
- "default": "false",
1210
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1211
- "attribute": "disabled",
1212
- "reflects": true,
1213
- "inheritedFrom": {
1214
- "name": "InputMixin",
1215
- "module": "src/common/mixins/InputMixin.ts"
1216
- }
1228
+ "name": "handleMonthSelect",
1229
+ "privacy": "private"
1217
1230
  },
1218
1231
  {
1219
1232
  "kind": "field",
1220
- "name": "name",
1221
- "type": {
1222
- "text": "string | undefined"
1223
- },
1224
- "description": "The name of the form component.",
1225
- "attribute": "name",
1226
- "inheritedFrom": {
1227
- "name": "InputMixin",
1228
- "module": "src/common/mixins/InputMixin.ts"
1229
- }
1233
+ "name": "handleYearSelect",
1234
+ "privacy": "private"
1230
1235
  },
1231
1236
  {
1232
1237
  "kind": "field",
1233
- "name": "value",
1234
- "type": {
1235
- "text": "string"
1236
- },
1237
- "default": "\"\"",
1238
- "description": "The value of the form component.",
1239
- "attribute": "value",
1240
- "inheritedFrom": {
1241
- "name": "InputMixin",
1242
- "module": "src/common/mixins/InputMixin.ts"
1243
- }
1238
+ "name": "handleNextMonthClick",
1239
+ "privacy": "private"
1244
1240
  },
1245
1241
  {
1246
1242
  "kind": "field",
1247
- "name": "form",
1248
- "privacy": "protected",
1249
- "description": "Gets the form, if any, associated with the form element.",
1250
- "inheritedFrom": {
1251
- "name": "InputMixin",
1252
- "module": "src/common/mixins/InputMixin.ts"
1253
- }
1243
+ "name": "handlePreviousMonthClick",
1244
+ "privacy": "private"
1254
1245
  },
1255
1246
  {
1256
1247
  "kind": "field",
1257
- "name": "focusableRef",
1258
- "privacy": "protected",
1259
- "inheritedFrom": {
1260
- "name": "FocusableMixin",
1261
- "module": "src/common/mixins/FocusableMixin.ts"
1262
- }
1263
- },
1264
- {
1265
- "kind": "method",
1266
- "name": "focus",
1267
- "parameters": [
1268
- {
1269
- "name": "options",
1270
- "optional": true,
1271
- "type": {
1272
- "text": "FocusOptions"
1273
- },
1274
- "description": "An object which controls aspects of the focusing process."
1275
- }
1276
- ],
1277
- "description": "Programmatically move focus to the component.",
1278
- "inheritedFrom": {
1279
- "name": "FocusableMixin",
1280
- "module": "src/common/mixins/FocusableMixin.ts"
1281
- }
1282
- },
1283
- {
1284
- "kind": "method",
1285
- "name": "blur",
1286
- "description": "Programmatically remove focus from the component.",
1287
- "inheritedFrom": {
1288
- "name": "FocusableMixin",
1289
- "module": "src/common/mixins/FocusableMixin.ts"
1290
- }
1248
+ "name": "enableActiveFocus",
1249
+ "privacy": "private"
1291
1250
  },
1292
1251
  {
1293
- "kind": "method",
1294
- "name": "click",
1295
- "description": "Programmatically simulates a click on the component.",
1296
- "inheritedFrom": {
1297
- "name": "FocusableMixin",
1298
- "module": "src/common/mixins/FocusableMixin.ts"
1299
- }
1252
+ "kind": "field",
1253
+ "name": "disableActiveFocus",
1254
+ "privacy": "private"
1300
1255
  }
1301
1256
  ],
1302
- "attributes": [
1303
- {
1304
- "name": "variant",
1305
- "type": {
1306
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1307
- },
1308
- "default": "\"default\"",
1309
- "description": "The style variant of the button.",
1310
- "fieldName": "variant"
1311
- },
1312
- {
1313
- "name": "type",
1314
- "type": {
1315
- "text": "\"button\" | \"submit\" | \"reset\""
1316
- },
1317
- "default": "\"submit\"",
1318
- "description": "The type of the button.",
1319
- "fieldName": "type"
1320
- },
1257
+ "events": [
1321
1258
  {
1322
- "name": "size",
1259
+ "name": "nord-focus-date",
1323
1260
  "type": {
1324
- "text": "\"s\" | \"m\" | \"l\""
1261
+ "text": "DateSelectEvent"
1325
1262
  },
1326
- "default": "\"m\"",
1327
- "description": "The size of the button.\nThis affects font-size and padding.",
1328
- "fieldName": "size"
1263
+ "description": "Dispatched when the calendar's focused date changes."
1329
1264
  },
1330
1265
  {
1331
- "name": "aria-expanded",
1332
1266
  "type": {
1333
- "text": "\"true\" | \"false\" | undefined"
1267
+ "text": "DateSelectEvent"
1334
1268
  },
1335
- "fieldName": "accessibleExpanded"
1336
- },
1269
+ "description": "Dispatched when a date is selected and the value changes.",
1270
+ "name": "change"
1271
+ }
1272
+ ],
1273
+ "attributes": [
1337
1274
  {
1338
- "name": "aria-haspopup",
1275
+ "name": "value",
1339
1276
  "type": {
1340
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1277
+ "text": "string"
1341
1278
  },
1342
- "fieldName": "accessibleHasPopup"
1279
+ "default": "\"\"",
1280
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1281
+ "fieldName": "value"
1343
1282
  },
1344
1283
  {
1345
- "name": "href",
1284
+ "name": "firstDayOfWeek",
1346
1285
  "type": {
1347
- "text": "string | undefined"
1286
+ "text": "DaysOfWeek"
1348
1287
  },
1349
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1350
- "fieldName": "href"
1288
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1289
+ "fieldName": "firstDayOfWeek"
1351
1290
  },
1352
1291
  {
1353
- "name": "download",
1292
+ "name": "min",
1354
1293
  "type": {
1355
- "text": "boolean"
1294
+ "text": "string"
1356
1295
  },
1357
- "default": "false",
1358
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1359
- "fieldName": "download"
1296
+ "default": "\"\"",
1297
+ "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.",
1298
+ "fieldName": "min"
1360
1299
  },
1361
1300
  {
1362
- "name": "target",
1301
+ "name": "max",
1363
1302
  "type": {
1364
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1303
+ "text": "string"
1365
1304
  },
1366
- "default": "\"_self\"",
1367
- "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.",
1368
- "fieldName": "target"
1305
+ "default": "\"\"",
1306
+ "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.",
1307
+ "fieldName": "max"
1369
1308
  },
1370
1309
  {
1371
1310
  "name": "expand",
@@ -1373,65 +1312,185 @@
1373
1312
  "text": "boolean"
1374
1313
  },
1375
1314
  "default": "false",
1376
- "description": "Controls whether the button expands to fill the width of its container.",
1315
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1377
1316
  "fieldName": "expand"
1378
- },
1317
+ }
1318
+ ],
1319
+ "superclass": {
1320
+ "name": "LitElement",
1321
+ "package": "lit"
1322
+ },
1323
+ "status": "ready",
1324
+ "category": "list",
1325
+ "tagName": "nord-calendar",
1326
+ "customElement": true
1327
+ }
1328
+ ],
1329
+ "exports": [
1330
+ {
1331
+ "kind": "js",
1332
+ "name": "default",
1333
+ "declaration": {
1334
+ "name": "Calendar",
1335
+ "module": "src/calendar/Calendar.ts"
1336
+ }
1337
+ },
1338
+ {
1339
+ "kind": "custom-element-definition",
1340
+ "name": "nord-calendar",
1341
+ "declaration": {
1342
+ "name": "Calendar",
1343
+ "module": "src/calendar/Calendar.ts"
1344
+ }
1345
+ }
1346
+ ],
1347
+ "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"
1348
+ },
1349
+ {
1350
+ "kind": "javascript-module",
1351
+ "path": "src/calendar/DateSelectEvent.ts",
1352
+ "declarations": [
1353
+ {
1354
+ "kind": "class",
1355
+ "description": "",
1356
+ "name": "DateSelectEvent",
1357
+ "superclass": {
1358
+ "name": "NordEvent",
1359
+ "module": "/src/common/events.js"
1360
+ }
1361
+ }
1362
+ ],
1363
+ "exports": [
1364
+ {
1365
+ "kind": "js",
1366
+ "name": "DateSelectEvent",
1367
+ "declaration": {
1368
+ "name": "DateSelectEvent",
1369
+ "module": "src/calendar/DateSelectEvent.ts"
1370
+ }
1371
+ }
1372
+ ],
1373
+ "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"
1374
+ },
1375
+ {
1376
+ "kind": "javascript-module",
1377
+ "path": "src/calendar/localization.ts",
1378
+ "declarations": [
1379
+ {
1380
+ "kind": "variable",
1381
+ "name": "calendarLocalization",
1382
+ "type": {
1383
+ "text": "object"
1384
+ },
1385
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1386
+ }
1387
+ ],
1388
+ "exports": [
1389
+ {
1390
+ "kind": "js",
1391
+ "name": "default",
1392
+ "declaration": {
1393
+ "name": "calendarLocalization",
1394
+ "module": "src/calendar/localization.ts"
1395
+ }
1396
+ }
1397
+ ],
1398
+ "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"
1399
+ },
1400
+ {
1401
+ "kind": "javascript-module",
1402
+ "path": "src/calendar/month-view.ts",
1403
+ "declarations": [
1404
+ {
1405
+ "kind": "function",
1406
+ "name": "dayView",
1407
+ "parameters": [
1379
1408
  {
1380
- "name": "disabled",
1409
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1381
1410
  "type": {
1382
- "text": "boolean"
1383
- },
1384
- "default": "false",
1385
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1386
- "fieldName": "disabled",
1387
- "inheritedFrom": {
1388
- "name": "InputMixin",
1389
- "module": "src/common/mixins/InputMixin.ts"
1411
+ "text": "DatePickerDayProps"
1390
1412
  }
1391
- },
1413
+ }
1414
+ ]
1415
+ },
1416
+ {
1417
+ "kind": "function",
1418
+ "name": "monthView",
1419
+ "parameters": [
1392
1420
  {
1393
- "name": "name",
1421
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1394
1422
  "type": {
1395
- "text": "string | undefined"
1396
- },
1397
- "description": "The name of the form component.",
1398
- "fieldName": "name",
1399
- "inheritedFrom": {
1400
- "name": "InputMixin",
1401
- "module": "src/common/mixins/InputMixin.ts"
1423
+ "text": "MonthViewArgs"
1402
1424
  }
1403
- },
1425
+ }
1426
+ ]
1427
+ }
1428
+ ],
1429
+ "exports": [
1430
+ {
1431
+ "kind": "js",
1432
+ "name": "dayView",
1433
+ "declaration": {
1434
+ "name": "dayView",
1435
+ "module": "src/calendar/month-view.ts"
1436
+ }
1437
+ },
1438
+ {
1439
+ "kind": "js",
1440
+ "name": "monthView",
1441
+ "declaration": {
1442
+ "name": "monthView",
1443
+ "module": "src/calendar/month-view.ts"
1444
+ }
1445
+ }
1446
+ ],
1447
+ "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"
1448
+ },
1449
+ {
1450
+ "kind": "javascript-module",
1451
+ "path": "src/banner/Banner.ts",
1452
+ "declarations": [
1453
+ {
1454
+ "kind": "class",
1455
+ "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
1456
+ "name": "Banner",
1457
+ "slots": [
1404
1458
  {
1405
- "name": "value",
1459
+ "description": "default slot",
1460
+ "name": ""
1461
+ }
1462
+ ],
1463
+ "members": [
1464
+ {
1465
+ "kind": "field",
1466
+ "name": "variant",
1406
1467
  "type": {
1407
- "text": "string"
1468
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1408
1469
  },
1409
- "default": "\"\"",
1410
- "description": "The value of the form component.",
1411
- "fieldName": "value",
1412
- "inheritedFrom": {
1413
- "name": "InputMixin",
1414
- "module": "src/common/mixins/InputMixin.ts"
1415
- }
1470
+ "default": "\"info\"",
1471
+ "description": "The style variant of the banner.",
1472
+ "attribute": "variant",
1473
+ "reflects": true
1416
1474
  }
1417
1475
  ],
1418
- "mixins": [
1419
- {
1420
- "name": "InputMixin",
1421
- "module": "/src/common/mixins/InputMixin.js"
1422
- },
1476
+ "attributes": [
1423
1477
  {
1424
- "name": "FocusableMixin",
1425
- "module": "/src/common/mixins/FocusableMixin.js"
1478
+ "name": "variant",
1479
+ "type": {
1480
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1481
+ },
1482
+ "default": "\"info\"",
1483
+ "description": "The style variant of the banner.",
1484
+ "fieldName": "variant"
1426
1485
  }
1427
1486
  ],
1428
1487
  "superclass": {
1429
1488
  "name": "LitElement",
1430
1489
  "package": "lit"
1431
1490
  },
1432
- "status": "ready",
1433
- "category": "action",
1434
- "tagName": "nord-button",
1491
+ "status": "new",
1492
+ "category": "feedback",
1493
+ "tagName": "nord-banner",
1435
1494
  "customElement": true
1436
1495
  }
1437
1496
  ],
@@ -1440,20 +1499,20 @@
1440
1499
  "kind": "js",
1441
1500
  "name": "default",
1442
1501
  "declaration": {
1443
- "name": "Button",
1444
- "module": "src/button/Button.ts"
1502
+ "name": "Banner",
1503
+ "module": "src/banner/Banner.ts"
1445
1504
  }
1446
1505
  },
1447
1506
  {
1448
1507
  "kind": "custom-element-definition",
1449
- "name": "nord-button",
1508
+ "name": "nord-banner",
1450
1509
  "declaration": {
1451
- "name": "Button",
1452
- "module": "src/button/Button.ts"
1510
+ "name": "Banner",
1511
+ "module": "src/banner/Banner.ts"
1453
1512
  }
1454
1513
  }
1455
1514
  ],
1456
- "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"
1515
+ "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"
1457
1516
  },
1458
1517
  {
1459
1518
  "kind": "javascript-module",
@@ -2190,6 +2249,12 @@
2190
2249
  },
2191
2250
  "privacy": "private"
2192
2251
  },
2252
+ {
2253
+ "kind": "field",
2254
+ "name": "localize",
2255
+ "privacy": "private",
2256
+ "default": "new LocalizeController<\"nord-command-menu\">(this)"
2257
+ },
2193
2258
  {
2194
2259
  "kind": "field",
2195
2260
  "name": "dismissController",
@@ -2337,6 +2402,21 @@
2337
2402
  }
2338
2403
  ]
2339
2404
  },
2405
+ {
2406
+ "kind": "method",
2407
+ "name": "handleCommandsChange",
2408
+ "privacy": "protected"
2409
+ },
2410
+ {
2411
+ "kind": "method",
2412
+ "name": "handleBump",
2413
+ "privacy": "protected"
2414
+ },
2415
+ {
2416
+ "kind": "method",
2417
+ "name": "focusOnOpen",
2418
+ "privacy": "protected"
2419
+ },
2340
2420
  {
2341
2421
  "kind": "method",
2342
2422
  "name": "handleAnimationEnd",
@@ -2540,7 +2620,7 @@
2540
2620
  {
2541
2621
  "kind": "method",
2542
2622
  "name": "ensureInView",
2543
- "privacy": "private",
2623
+ "privacy": "protected",
2544
2624
  "description": "Scroll to show element"
2545
2625
  },
2546
2626
  {
@@ -2617,15 +2697,6 @@
2617
2697
  "description": "",
2618
2698
  "name": "KeyboardController",
2619
2699
  "members": [
2620
- {
2621
- "kind": "field",
2622
- "name": "host",
2623
- "type": {
2624
- "text": "CommandMenu"
2625
- },
2626
- "privacy": "private",
2627
- "default": "host"
2628
- },
2629
2700
  {
2630
2701
  "kind": "field",
2631
2702
  "name": "globalShortcuts",
@@ -2689,14 +2760,6 @@
2689
2760
  },
2690
2761
  "static": true,
2691
2762
  "default": "\"nord-select\""
2692
- },
2693
- {
2694
- "kind": "field",
2695
- "name": "command",
2696
- "type": {
2697
- "text": "ICommandMenuAction"
2698
- },
2699
- "default": "command"
2700
2763
  }
2701
2764
  ],
2702
2765
  "superclass": {
@@ -2717,6 +2780,31 @@
2717
2780
  ],
2718
2781
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2719
2782
  },
2783
+ {
2784
+ "kind": "javascript-module",
2785
+ "path": "src/command-menu/localization.ts",
2786
+ "declarations": [
2787
+ {
2788
+ "kind": "variable",
2789
+ "name": "commandMenuLocalization",
2790
+ "type": {
2791
+ "text": "object"
2792
+ },
2793
+ "default": "{\n instructions: \"Press 'Enter' to confirm your input or 'Escape' to cancel\",\n inputLabel: \"Type the name of a command to run.\",\n footerArrowKeys: \"Navigate\",\n footerEnterKey: \"Select\",\n footerEscapeKey: \"Esc to dismiss\",\n footerBackspaceKey: \"Move to parent\",\n noResults: (searchTerm: string) => `No results for “${searchTerm}”`,\n tip: \"Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.\",\n}"
2794
+ }
2795
+ ],
2796
+ "exports": [
2797
+ {
2798
+ "kind": "js",
2799
+ "name": "default",
2800
+ "declaration": {
2801
+ "name": "commandMenuLocalization",
2802
+ "module": "src/command-menu/localization.ts"
2803
+ }
2804
+ }
2805
+ ],
2806
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2807
+ },
2720
2808
  {
2721
2809
  "kind": "javascript-module",
2722
2810
  "path": "src/common/attribute.ts",
@@ -2869,7 +2957,7 @@
2869
2957
  {
2870
2958
  "name": "mapFn",
2871
2959
  "type": {
2872
- "text": "(item: T) => U"
2960
+ "text": "(item: T, i: number) => U"
2873
2961
  }
2874
2962
  }
2875
2963
  ],
@@ -2972,6 +3060,42 @@
2972
3060
  ],
2973
3061
  "description": "print date in format YYYY-MM-DD"
2974
3062
  },
3063
+ {
3064
+ "kind": "function",
3065
+ "name": "getDayNames",
3066
+ "parameters": [
3067
+ {
3068
+ "name": "locale",
3069
+ "type": {
3070
+ "text": "string"
3071
+ }
3072
+ },
3073
+ {
3074
+ "name": "weekday",
3075
+ "type": {
3076
+ "text": "Exclude<Intl.DateTimeFormatOptions[\"weekday\"], undefined>"
3077
+ }
3078
+ }
3079
+ ]
3080
+ },
3081
+ {
3082
+ "kind": "function",
3083
+ "name": "getMonthNames",
3084
+ "parameters": [
3085
+ {
3086
+ "name": "locale",
3087
+ "type": {
3088
+ "text": "string"
3089
+ }
3090
+ },
3091
+ {
3092
+ "name": "month",
3093
+ "type": {
3094
+ "text": "Exclude<Intl.DateTimeFormatOptions[\"month\"], undefined>"
3095
+ }
3096
+ }
3097
+ ]
3098
+ },
2975
3099
  {
2976
3100
  "kind": "function",
2977
3101
  "name": "isEqualMonth",
@@ -3336,6 +3460,22 @@
3336
3460
  "module": "src/common/dates.ts"
3337
3461
  }
3338
3462
  },
3463
+ {
3464
+ "kind": "js",
3465
+ "name": "getDayNames",
3466
+ "declaration": {
3467
+ "name": "getDayNames",
3468
+ "module": "src/common/dates.ts"
3469
+ }
3470
+ },
3471
+ {
3472
+ "kind": "js",
3473
+ "name": "getMonthNames",
3474
+ "declaration": {
3475
+ "name": "getMonthNames",
3476
+ "module": "src/common/dates.ts"
3477
+ }
3478
+ },
3339
3479
  {
3340
3480
  "kind": "js",
3341
3481
  "name": "isEqualMonth",
@@ -3873,6 +4013,12 @@
3873
4013
  "privacy": "private",
3874
4014
  "default": "new SwipeController(this, {\n target: () => this.dialog,\n matchesGesture: isDownwardsSwipe,\n onSwipeEnd: () => this.hide(false),\n })"
3875
4015
  },
4016
+ {
4017
+ "kind": "field",
4018
+ "name": "localize",
4019
+ "privacy": "private",
4020
+ "default": "new LocalizeController<\"nord-date-picker\">(this, {\n onLangChange: () => this.createDateFormatters(),\n })"
4021
+ },
3876
4022
  {
3877
4023
  "kind": "field",
3878
4024
  "name": "dateFormatLong",
@@ -3960,15 +4106,6 @@
3960
4106
  "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
3961
4107
  "attribute": "first-day-of-week"
3962
4108
  },
3963
- {
3964
- "kind": "field",
3965
- "name": "localization",
3966
- "type": {
3967
- "text": "DatePickerLocalizedText"
3968
- },
3969
- "default": "localization",
3970
- "description": "Button labels, day names, month names, etc, used for localization.\nDefault is English."
3971
- },
3972
4109
  {
3973
4110
  "kind": "field",
3974
4111
  "name": "dateAdapter",
@@ -4690,15 +4827,15 @@
4690
4827
  },
4691
4828
  {
4692
4829
  "kind": "javascript-module",
4693
- "path": "src/date-picker/date-localization.ts",
4830
+ "path": "src/date-picker/localization.ts",
4694
4831
  "declarations": [
4695
4832
  {
4696
4833
  "kind": "variable",
4697
- "name": "localization",
4834
+ "name": "datePickerLocalization",
4698
4835
  "type": {
4699
- "text": "DatePickerLocalizedText"
4836
+ "text": "object"
4700
4837
  },
4701
- "default": "{\n ...calendarLocalization,\n closeLabel: \"Close window\",\n buttonLabel: \"Choose date\",\n selectedDateMessage: \"Selected date is\",\n}"
4838
+ "default": "{\n modalHeading: \"Choose a date\",\n closeLabel: \"Close window\",\n buttonLabel: \"Choose date\",\n selectedDateMessage: \"Selected date is\",\n}"
4702
4839
  }
4703
4840
  ],
4704
4841
  "exports": [
@@ -4706,8 +4843,8 @@
4706
4843
  "kind": "js",
4707
4844
  "name": "default",
4708
4845
  "declaration": {
4709
- "name": "localization",
4710
- "module": "src/date-picker/date-localization.ts"
4846
+ "name": "datePickerLocalization",
4847
+ "module": "src/date-picker/localization.ts"
4711
4848
  }
4712
4849
  }
4713
4850
  ],
@@ -4732,15 +4869,6 @@
4732
4869
  }
4733
4870
  ],
4734
4871
  "members": [
4735
- {
4736
- "kind": "field",
4737
- "name": "shadowRootOptions",
4738
- "type": {
4739
- "text": "object"
4740
- },
4741
- "static": true,
4742
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }"
4743
- },
4744
4872
  {
4745
4873
  "kind": "field",
4746
4874
  "name": "popout",
@@ -4797,20 +4925,6 @@
4797
4925
  "kind": "method",
4798
4926
  "name": "handleOpen",
4799
4927
  "privacy": "private"
4800
- },
4801
- {
4802
- "kind": "field",
4803
- "name": "_warningLogged",
4804
- "type": {
4805
- "text": "boolean"
4806
- },
4807
- "privacy": "private",
4808
- "static": true,
4809
- "default": "false",
4810
- "inheritedFrom": {
4811
- "name": "DraftComponentMixin",
4812
- "module": "src/common/mixins/DraftComponentMixin.ts"
4813
- }
4814
4928
  }
4815
4929
  ],
4816
4930
  "attributes": [
@@ -4840,17 +4954,11 @@
4840
4954
  "fieldName": "expand"
4841
4955
  }
4842
4956
  ],
4843
- "mixins": [
4844
- {
4845
- "name": "DraftComponentMixin",
4846
- "module": "/src/common/mixins/DraftComponentMixin.js"
4847
- }
4848
- ],
4849
4957
  "superclass": {
4850
4958
  "name": "LitElement",
4851
4959
  "package": "lit"
4852
4960
  },
4853
- "status": "draft",
4961
+ "status": "new",
4854
4962
  "category": "action",
4855
4963
  "tagName": "nord-dropdown",
4856
4964
  "customElement": true
@@ -4899,20 +5007,6 @@
4899
5007
  },
4900
5008
  "description": "Heading and accessible label for the dropdown group.",
4901
5009
  "attribute": "heading"
4902
- },
4903
- {
4904
- "kind": "field",
4905
- "name": "_warningLogged",
4906
- "type": {
4907
- "text": "boolean"
4908
- },
4909
- "privacy": "private",
4910
- "static": true,
4911
- "default": "false",
4912
- "inheritedFrom": {
4913
- "name": "DraftComponentMixin",
4914
- "module": "src/common/mixins/DraftComponentMixin.ts"
4915
- }
4916
5010
  }
4917
5011
  ],
4918
5012
  "attributes": [
@@ -4925,17 +5019,11 @@
4925
5019
  "fieldName": "heading"
4926
5020
  }
4927
5021
  ],
4928
- "mixins": [
4929
- {
4930
- "name": "DraftComponentMixin",
4931
- "module": "/src/common/mixins/DraftComponentMixin.js"
4932
- }
4933
- ],
4934
5022
  "superclass": {
4935
5023
  "name": "LitElement",
4936
5024
  "package": "lit"
4937
5025
  },
4938
- "status": "draft",
5026
+ "status": "new",
4939
5027
  "category": "action",
4940
5028
  "tagName": "nord-dropdown-group",
4941
5029
  "customElement": true
@@ -5039,20 +5127,6 @@
5039
5127
  "name": "FocusableMixin",
5040
5128
  "module": "src/common/mixins/FocusableMixin.ts"
5041
5129
  }
5042
- },
5043
- {
5044
- "kind": "field",
5045
- "name": "_warningLogged",
5046
- "type": {
5047
- "text": "boolean"
5048
- },
5049
- "privacy": "private",
5050
- "static": true,
5051
- "default": "false",
5052
- "inheritedFrom": {
5053
- "name": "DraftComponentMixin",
5054
- "module": "src/common/mixins/DraftComponentMixin.ts"
5055
- }
5056
5130
  }
5057
5131
  ],
5058
5132
  "attributes": [
@@ -5069,17 +5143,13 @@
5069
5143
  {
5070
5144
  "name": "FocusableMixin",
5071
5145
  "module": "/src/common/mixins/FocusableMixin.js"
5072
- },
5073
- {
5074
- "name": "DraftComponentMixin",
5075
- "module": "/src/common/mixins/DraftComponentMixin.js"
5076
5146
  }
5077
5147
  ],
5078
5148
  "superclass": {
5079
5149
  "name": "LitElement",
5080
5150
  "package": "lit"
5081
5151
  },
5082
- "status": "draft",
5152
+ "status": "new",
5083
5153
  "category": "action",
5084
5154
  "tagName": "nord-dropdown-item",
5085
5155
  "customElement": true
@@ -5296,42 +5366,22 @@
5296
5366
  },
5297
5367
  {
5298
5368
  "description": "Optional slot for buttons, toggles, etc.",
5299
- "name": "action"
5369
+ "name": "end"
5300
5370
  }
5301
5371
  ],
5302
5372
  "members": [
5303
5373
  {
5304
5374
  "kind": "field",
5305
- "name": "actionSlot",
5306
- "privacy": "private",
5307
- "default": "new SlotController(this, \"action\")"
5308
- },
5309
- {
5310
- "kind": "field",
5311
- "name": "_warningLogged",
5312
- "type": {
5313
- "text": "boolean"
5314
- },
5375
+ "name": "endSlot",
5315
5376
  "privacy": "private",
5316
- "static": true,
5317
- "default": "false",
5318
- "inheritedFrom": {
5319
- "name": "DraftComponentMixin",
5320
- "module": "src/common/mixins/DraftComponentMixin.ts"
5321
- }
5322
- }
5323
- ],
5324
- "mixins": [
5325
- {
5326
- "name": "DraftComponentMixin",
5327
- "module": "/src/common/mixins/DraftComponentMixin.js"
5377
+ "default": "new SlotController(this, \"end\")"
5328
5378
  }
5329
5379
  ],
5330
5380
  "superclass": {
5331
5381
  "name": "LitElement",
5332
5382
  "package": "lit"
5333
5383
  },
5334
- "status": "draft",
5384
+ "status": "new",
5335
5385
  "category": "structure",
5336
5386
  "tagName": "nord-header",
5337
5387
  "customElement": true
@@ -5480,7 +5530,7 @@
5480
5530
  "text": "string"
5481
5531
  },
5482
5532
  "default": "\"\"",
5483
- "description": "The name of the icon to display, as defined by nordicons.",
5533
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
5484
5534
  "attribute": "name",
5485
5535
  "reflects": true
5486
5536
  },
@@ -5526,13 +5576,8 @@
5526
5576
  },
5527
5577
  {
5528
5578
  "kind": "method",
5529
- "name": "resolve",
5530
- "privacy": "private",
5531
- "return": {
5532
- "type": {
5533
- "text": "string | Promise<string>"
5534
- }
5535
- }
5579
+ "name": "handleNameChange",
5580
+ "privacy": "protected"
5536
5581
  }
5537
5582
  ],
5538
5583
  "attributes": [
@@ -5542,7 +5587,7 @@
5542
5587
  "text": "string"
5543
5588
  },
5544
5589
  "default": "\"\"",
5545
- "description": "The name of the icon to display, as defined by nordicons.",
5590
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
5546
5591
  "fieldName": "name"
5547
5592
  },
5548
5593
  {
@@ -5599,7 +5644,7 @@
5599
5644
  }
5600
5645
  }
5601
5646
  ],
5602
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
5647
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
5603
5648
  },
5604
5649
  {
5605
5650
  "kind": "javascript-module",
@@ -6307,6 +6352,256 @@
6307
6352
  ],
6308
6353
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n"
6309
6354
  },
6355
+ {
6356
+ "kind": "javascript-module",
6357
+ "path": "src/localization/LocalizeController.ts",
6358
+ "declarations": [
6359
+ {
6360
+ "kind": "class",
6361
+ "description": "",
6362
+ "name": "LocalizeController",
6363
+ "members": [
6364
+ {
6365
+ "kind": "field",
6366
+ "name": "unsubscribe",
6367
+ "type": {
6368
+ "text": "ReturnType<typeof subscribe> | undefined"
6369
+ },
6370
+ "privacy": "private"
6371
+ },
6372
+ {
6373
+ "kind": "field",
6374
+ "name": "resolvedTranslation",
6375
+ "type": {
6376
+ "text": "Translation"
6377
+ },
6378
+ "privacy": "private"
6379
+ },
6380
+ {
6381
+ "kind": "field",
6382
+ "name": "lang",
6383
+ "description": "The lang of the document or element, with element taking precedence"
6384
+ },
6385
+ {
6386
+ "kind": "field",
6387
+ "name": "resolvedLang",
6388
+ "description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation"
6389
+ },
6390
+ {
6391
+ "kind": "method",
6392
+ "name": "hostConnected"
6393
+ },
6394
+ {
6395
+ "kind": "method",
6396
+ "name": "hostDisconnected"
6397
+ },
6398
+ {
6399
+ "kind": "method",
6400
+ "name": "term",
6401
+ "return": {
6402
+ "type": {
6403
+ "text": "Result<Translation[TComponentName], Key>"
6404
+ }
6405
+ },
6406
+ "parameters": [
6407
+ {
6408
+ "name": "key",
6409
+ "type": {
6410
+ "text": "Key"
6411
+ }
6412
+ },
6413
+ {
6414
+ "name": "args",
6415
+ "type": {
6416
+ "text": "FuncParams<Translation[TComponentName], Key>"
6417
+ }
6418
+ }
6419
+ ]
6420
+ },
6421
+ {
6422
+ "kind": "field",
6423
+ "name": "handleLangChange",
6424
+ "privacy": "private"
6425
+ }
6426
+ ]
6427
+ }
6428
+ ],
6429
+ "exports": [
6430
+ {
6431
+ "kind": "js",
6432
+ "name": "LocalizeController",
6433
+ "declaration": {
6434
+ "name": "LocalizeController",
6435
+ "module": "src/localization/LocalizeController.ts"
6436
+ }
6437
+ }
6438
+ ]
6439
+ },
6440
+ {
6441
+ "kind": "javascript-module",
6442
+ "path": "src/localization/en-us.ts",
6443
+ "declarations": [
6444
+ {
6445
+ "kind": "variable",
6446
+ "name": "en",
6447
+ "type": {
6448
+ "text": "object"
6449
+ },
6450
+ "default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n}"
6451
+ }
6452
+ ],
6453
+ "exports": [
6454
+ {
6455
+ "kind": "js",
6456
+ "name": "default",
6457
+ "declaration": {
6458
+ "name": "en",
6459
+ "module": "src/localization/en-us.ts"
6460
+ }
6461
+ }
6462
+ ]
6463
+ },
6464
+ {
6465
+ "kind": "javascript-module",
6466
+ "path": "src/localization/fi-fi.ts",
6467
+ "declarations": [
6468
+ {
6469
+ "kind": "variable",
6470
+ "name": "fi",
6471
+ "type": {
6472
+ "text": "Translation"
6473
+ },
6474
+ "default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n}"
6475
+ }
6476
+ ],
6477
+ "exports": [
6478
+ {
6479
+ "kind": "js",
6480
+ "name": "default",
6481
+ "declaration": {
6482
+ "name": "fi",
6483
+ "module": "src/localization/fi-fi.ts"
6484
+ }
6485
+ }
6486
+ ]
6487
+ },
6488
+ {
6489
+ "kind": "javascript-module",
6490
+ "path": "src/localization/translation.ts",
6491
+ "declarations": [
6492
+ {
6493
+ "kind": "function",
6494
+ "name": "clearTranslations",
6495
+ "description": "Removes all registered translations"
6496
+ },
6497
+ {
6498
+ "kind": "function",
6499
+ "name": "registerTranslation",
6500
+ "parameters": [
6501
+ {
6502
+ "name": "translation",
6503
+ "type": {
6504
+ "text": "Translation[]"
6505
+ }
6506
+ }
6507
+ ],
6508
+ "description": "Registers one or more translations"
6509
+ },
6510
+ {
6511
+ "kind": "function",
6512
+ "name": "subscribe",
6513
+ "return": {
6514
+ "type": {
6515
+ "text": ""
6516
+ }
6517
+ },
6518
+ "parameters": [
6519
+ {
6520
+ "name": "onChange",
6521
+ "type": {
6522
+ "text": "() => void"
6523
+ },
6524
+ "description": "callback for when either `lang` attr changes, or a new language is registered."
6525
+ }
6526
+ ],
6527
+ "description": "subscribe to language changes"
6528
+ },
6529
+ {
6530
+ "kind": "function",
6531
+ "name": "isTranslationRegistered",
6532
+ "parameters": [
6533
+ {
6534
+ "name": "lang",
6535
+ "type": {
6536
+ "text": "string"
6537
+ },
6538
+ "description": "the lang code e.g. \"en\" or \"en-GB\""
6539
+ }
6540
+ ],
6541
+ "description": "Check whether there is a translation registered for the given lang"
6542
+ },
6543
+ {
6544
+ "kind": "function",
6545
+ "name": "resolveTranslation",
6546
+ "return": {
6547
+ "type": {
6548
+ "text": "Translation"
6549
+ }
6550
+ },
6551
+ "parameters": [
6552
+ {
6553
+ "name": "langCode",
6554
+ "type": {
6555
+ "text": "string"
6556
+ }
6557
+ }
6558
+ ],
6559
+ "description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
6560
+ }
6561
+ ],
6562
+ "exports": [
6563
+ {
6564
+ "kind": "js",
6565
+ "name": "clearTranslations",
6566
+ "declaration": {
6567
+ "name": "clearTranslations",
6568
+ "module": "src/localization/translation.ts"
6569
+ }
6570
+ },
6571
+ {
6572
+ "kind": "js",
6573
+ "name": "registerTranslation",
6574
+ "declaration": {
6575
+ "name": "registerTranslation",
6576
+ "module": "src/localization/translation.ts"
6577
+ }
6578
+ },
6579
+ {
6580
+ "kind": "js",
6581
+ "name": "subscribe",
6582
+ "declaration": {
6583
+ "name": "subscribe",
6584
+ "module": "src/localization/translation.ts"
6585
+ }
6586
+ },
6587
+ {
6588
+ "kind": "js",
6589
+ "name": "isTranslationRegistered",
6590
+ "declaration": {
6591
+ "name": "isTranslationRegistered",
6592
+ "module": "src/localization/translation.ts"
6593
+ }
6594
+ },
6595
+ {
6596
+ "kind": "js",
6597
+ "name": "resolveTranslation",
6598
+ "declaration": {
6599
+ "name": "resolveTranslation",
6600
+ "module": "src/localization/translation.ts"
6601
+ }
6602
+ }
6603
+ ]
6604
+ },
6310
6605
  {
6311
6606
  "kind": "javascript-module",
6312
6607
  "path": "src/nav-group/NavGroup.ts",
@@ -6857,6 +7152,16 @@
6857
7152
  ],
6858
7153
  "description": "Hide the popout."
6859
7154
  },
7155
+ {
7156
+ "kind": "method",
7157
+ "name": "handleIdChange",
7158
+ "privacy": "protected"
7159
+ },
7160
+ {
7161
+ "kind": "method",
7162
+ "name": "handleOpenChange",
7163
+ "privacy": "protected"
7164
+ },
6860
7165
  {
6861
7166
  "kind": "field",
6862
7167
  "name": "updatePosition",
@@ -6873,20 +7178,6 @@
6873
7178
  "kind": "method",
6874
7179
  "name": "getToggle",
6875
7180
  "privacy": "private"
6876
- },
6877
- {
6878
- "kind": "field",
6879
- "name": "_warningLogged",
6880
- "type": {
6881
- "text": "boolean"
6882
- },
6883
- "privacy": "private",
6884
- "static": true,
6885
- "default": "false",
6886
- "inheritedFrom": {
6887
- "name": "DraftComponentMixin",
6888
- "module": "src/common/mixins/DraftComponentMixin.ts"
6889
- }
6890
7181
  }
6891
7182
  ],
6892
7183
  "events": [
@@ -6934,17 +7225,11 @@
6934
7225
  "fieldName": "id"
6935
7226
  }
6936
7227
  ],
6937
- "mixins": [
6938
- {
6939
- "name": "DraftComponentMixin",
6940
- "module": "/src/common/mixins/DraftComponentMixin.js"
6941
- }
6942
- ],
6943
7228
  "superclass": {
6944
7229
  "name": "LitElement",
6945
7230
  "package": "lit"
6946
7231
  },
6947
- "status": "draft",
7232
+ "status": "new",
6948
7233
  "category": "overlay",
6949
7234
  "tagName": "nord-popout",
6950
7235
  "customElement": true
@@ -7241,6 +7526,19 @@
7241
7526
  "attribute": "checked",
7242
7527
  "reflects": true
7243
7528
  },
7529
+ {
7530
+ "kind": "method",
7531
+ "name": "handleCheckedChange",
7532
+ "privacy": "protected",
7533
+ "parameters": [
7534
+ {
7535
+ "name": "previousChecked",
7536
+ "type": {
7537
+ "text": "boolean"
7538
+ }
7539
+ }
7540
+ ]
7541
+ },
7244
7542
  {
7245
7543
  "kind": "method",
7246
7544
  "name": "uncheckSiblings",
@@ -8536,6 +8834,7 @@
8536
8834
  "type": {
8537
8835
  "text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
8538
8836
  },
8837
+ "default": "\"stretch\"",
8539
8838
  "description": "How to align the child items inside the stack.",
8540
8839
  "attribute": "align-items",
8541
8840
  "reflects": true
@@ -8566,7 +8865,7 @@
8566
8865
  "kind": "field",
8567
8866
  "name": "justifyContent",
8568
8867
  "type": {
8569
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
8868
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
8570
8869
  },
8571
8870
  "description": "How to justify the child items inside the stack.",
8572
8871
  "attribute": "justify-content",
@@ -8597,6 +8896,7 @@
8597
8896
  "type": {
8598
8897
  "text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
8599
8898
  },
8899
+ "default": "\"stretch\"",
8600
8900
  "description": "How to align the child items inside the stack.",
8601
8901
  "fieldName": "alignItems"
8602
8902
  },
@@ -8621,7 +8921,7 @@
8621
8921
  {
8622
8922
  "name": "justify-content",
8623
8923
  "type": {
8624
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
8924
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
8625
8925
  },
8626
8926
  "description": "How to justify the child items inside the stack.",
8627
8927
  "fieldName": "justifyContent"
@@ -8787,7 +9087,7 @@
8787
9087
  {
8788
9088
  "kind": "method",
8789
9089
  "name": "resizeToFitContent",
8790
- "privacy": "private"
9090
+ "privacy": "protected"
8791
9091
  },
8792
9092
  {
8793
9093
  "kind": "field",
@@ -9478,7 +9778,12 @@
9478
9778
  },
9479
9779
  {
9480
9780
  "kind": "method",
9481
- "name": "handleTransition",
9781
+ "name": "handleIdChange",
9782
+ "privacy": "protected"
9783
+ },
9784
+ {
9785
+ "kind": "method",
9786
+ "name": "handleStateChange",
9482
9787
  "privacy": "private",
9483
9788
  "parameters": [
9484
9789
  {
@@ -9697,11 +10002,6 @@
9697
10002
  "name": "observe",
9698
10003
  "privacy": "private",
9699
10004
  "static": true
9700
- },
9701
- {
9702
- "kind": "field",
9703
- "name": "host",
9704
- "default": "host"
9705
10005
  }
9706
10006
  ]
9707
10007
  }
@@ -9954,16 +10254,6 @@
9954
10254
  "kind": "field",
9955
10255
  "name": "handleFormData",
9956
10256
  "privacy": "private"
9957
- },
9958
- {
9959
- "kind": "field",
9960
- "name": "host",
9961
- "default": "host"
9962
- },
9963
- {
9964
- "kind": "field",
9965
- "name": "options",
9966
- "default": "options"
9967
10257
  }
9968
10258
  ]
9969
10259
  }
@@ -9995,7 +10285,7 @@
9995
10285
  "text": "ShortcutController"
9996
10286
  },
9997
10287
  "privacy": "private",
9998
- "default": "new ShortcutController(this.host, { Escape: this.handleEsc })"
10288
+ "default": "new ShortcutController(host, { Escape: this.handleEsc })"
9999
10289
  },
10000
10290
  {
10001
10291
  "kind": "field",
@@ -10019,16 +10309,6 @@
10019
10309
  "kind": "field",
10020
10310
  "name": "handleClickOut",
10021
10311
  "privacy": "private"
10022
- },
10023
- {
10024
- "kind": "field",
10025
- "name": "host",
10026
- "default": "host"
10027
- },
10028
- {
10029
- "kind": "field",
10030
- "name": "options",
10031
- "default": "options"
10032
10312
  }
10033
10313
  ]
10034
10314
  }
@@ -10068,16 +10348,6 @@
10068
10348
  {
10069
10349
  "kind": "method",
10070
10350
  "name": "hostDisconnected"
10071
- },
10072
- {
10073
- "kind": "field",
10074
- "name": "host",
10075
- "default": "host"
10076
- },
10077
- {
10078
- "kind": "field",
10079
- "name": "options",
10080
- "default": "options"
10081
10351
  }
10082
10352
  ]
10083
10353
  }
@@ -10153,11 +10423,6 @@
10153
10423
  "name": "syncLightDom",
10154
10424
  "privacy": "private"
10155
10425
  },
10156
- {
10157
- "kind": "field",
10158
- "name": "options",
10159
- "default": "options"
10160
- },
10161
10426
  {
10162
10427
  "kind": "field",
10163
10428
  "name": "events",
@@ -10203,24 +10468,6 @@
10203
10468
  "name": "SlotController",
10204
10469
  "module": "src/common/controllers/SlotController.ts"
10205
10470
  }
10206
- },
10207
- {
10208
- "kind": "field",
10209
- "name": "host",
10210
- "default": "host",
10211
- "inheritedFrom": {
10212
- "name": "SlotController",
10213
- "module": "src/common/controllers/SlotController.ts"
10214
- }
10215
- },
10216
- {
10217
- "kind": "field",
10218
- "name": "slotName",
10219
- "default": "slotName",
10220
- "inheritedFrom": {
10221
- "name": "SlotController",
10222
- "module": "src/common/controllers/SlotController.ts"
10223
- }
10224
10471
  }
10225
10472
  ],
10226
10473
  "superclass": {
@@ -10279,16 +10526,6 @@
10279
10526
  {
10280
10527
  "kind": "method",
10281
10528
  "name": "hostDisconnected"
10282
- },
10283
- {
10284
- "kind": "field",
10285
- "name": "host",
10286
- "default": "host"
10287
- },
10288
- {
10289
- "kind": "field",
10290
- "name": "options",
10291
- "default": "options"
10292
10529
  }
10293
10530
  ]
10294
10531
  }
@@ -10344,16 +10581,6 @@
10344
10581
  }
10345
10582
  }
10346
10583
  ]
10347
- },
10348
- {
10349
- "kind": "field",
10350
- "name": "shortcuts",
10351
- "default": "shortcuts"
10352
- },
10353
- {
10354
- "kind": "field",
10355
- "name": "target",
10356
- "default": "target"
10357
10584
  }
10358
10585
  ]
10359
10586
  }
@@ -10428,16 +10655,116 @@
10428
10655
  }
10429
10656
  }
10430
10657
  ]
10658
+ }
10659
+ ]
10660
+ }
10661
+ ],
10662
+ "exports": [
10663
+ {
10664
+ "kind": "js",
10665
+ "name": "SlotController",
10666
+ "declaration": {
10667
+ "name": "SlotController",
10668
+ "module": "src/common/controllers/SlotController.ts"
10669
+ }
10670
+ }
10671
+ ]
10672
+ },
10673
+ {
10674
+ "kind": "javascript-module",
10675
+ "path": "src/common/controllers/SwipeController.ts",
10676
+ "declarations": [
10677
+ {
10678
+ "kind": "class",
10679
+ "description": "",
10680
+ "name": "SwipeController",
10681
+ "members": [
10682
+ {
10683
+ "kind": "field",
10684
+ "name": "events",
10685
+ "type": {
10686
+ "text": "EventController"
10687
+ },
10688
+ "privacy": "private",
10689
+ "default": "new EventController(host)"
10690
+ },
10691
+ {
10692
+ "kind": "field",
10693
+ "name": "hadFirstUpdate",
10694
+ "type": {
10695
+ "text": "boolean"
10696
+ },
10697
+ "privacy": "private",
10698
+ "default": "false"
10699
+ },
10700
+ {
10701
+ "kind": "field",
10702
+ "name": "initialTouchX",
10703
+ "type": {
10704
+ "text": "number"
10705
+ },
10706
+ "privacy": "private",
10707
+ "default": "0"
10708
+ },
10709
+ {
10710
+ "kind": "field",
10711
+ "name": "initialTouchY",
10712
+ "type": {
10713
+ "text": "number"
10714
+ },
10715
+ "privacy": "private",
10716
+ "default": "0"
10717
+ },
10718
+ {
10719
+ "kind": "field",
10720
+ "name": "options",
10721
+ "type": {
10722
+ "text": "SetRequired<SwipeControllerOptions, \"target\">"
10723
+ },
10724
+ "privacy": "private",
10725
+ "default": "{\n target: () => host,\n ...options,\n }"
10726
+ },
10727
+ {
10728
+ "kind": "method",
10729
+ "name": "hostUpdated"
10730
+ },
10731
+ {
10732
+ "kind": "method",
10733
+ "name": "hostDisconnected"
10431
10734
  },
10432
10735
  {
10433
10736
  "kind": "field",
10434
- "name": "host",
10435
- "default": "host"
10737
+ "name": "handleTouchStart",
10738
+ "privacy": "private"
10436
10739
  },
10437
10740
  {
10438
10741
  "kind": "field",
10439
- "name": "slotName",
10440
- "default": "slotName"
10742
+ "name": "handleTouchEnd",
10743
+ "privacy": "private"
10744
+ }
10745
+ ]
10746
+ },
10747
+ {
10748
+ "kind": "function",
10749
+ "name": "isHorizontalSwipe",
10750
+ "parameters": [
10751
+ {
10752
+ "name": "{ distX, distY }",
10753
+ "type": {
10754
+ "text": "SwipeDetails"
10755
+ }
10756
+ }
10757
+ ]
10758
+ },
10759
+ {
10760
+ "kind": "function",
10761
+ "name": "isDownwardsSwipe",
10762
+ "parameters": [
10763
+ {
10764
+ "name": "{ distX, distY }",
10765
+ "type": {
10766
+ "text": "SwipeDetails"
10767
+ }
10441
10768
  }
10442
10769
  ]
10443
10770
  }
@@ -10445,108 +10772,271 @@
10445
10772
  "exports": [
10446
10773
  {
10447
10774
  "kind": "js",
10448
- "name": "SlotController",
10775
+ "name": "SwipeController",
10449
10776
  "declaration": {
10450
- "name": "SlotController",
10451
- "module": "src/common/controllers/SlotController.ts"
10777
+ "name": "SwipeController",
10778
+ "module": "src/common/controllers/SwipeController.ts"
10779
+ }
10780
+ },
10781
+ {
10782
+ "kind": "js",
10783
+ "name": "isHorizontalSwipe",
10784
+ "declaration": {
10785
+ "name": "isHorizontalSwipe",
10786
+ "module": "src/common/controllers/SwipeController.ts"
10787
+ }
10788
+ },
10789
+ {
10790
+ "kind": "js",
10791
+ "name": "isDownwardsSwipe",
10792
+ "declaration": {
10793
+ "name": "isDownwardsSwipe",
10794
+ "module": "src/common/controllers/SwipeController.ts"
10795
+ }
10796
+ }
10797
+ ]
10798
+ },
10799
+ {
10800
+ "kind": "javascript-module",
10801
+ "path": "src/common/decorators/observe.ts",
10802
+ "declarations": [
10803
+ {
10804
+ "kind": "function",
10805
+ "name": "observe",
10806
+ "parameters": [
10807
+ {
10808
+ "name": "propertyName",
10809
+ "type": {
10810
+ "text": "string"
10811
+ }
10812
+ },
10813
+ {
10814
+ "name": "lifecycle",
10815
+ "default": "\"update\"",
10816
+ "type": {
10817
+ "text": "ObserveLifecycle"
10818
+ }
10819
+ }
10820
+ ]
10821
+ }
10822
+ ],
10823
+ "exports": [
10824
+ {
10825
+ "kind": "js",
10826
+ "name": "observe",
10827
+ "declaration": {
10828
+ "name": "observe",
10829
+ "module": "src/common/decorators/observe.ts"
10452
10830
  }
10453
10831
  }
10454
10832
  ]
10455
10833
  },
10456
10834
  {
10457
10835
  "kind": "javascript-module",
10458
- "path": "src/common/controllers/SwipeController.ts",
10836
+ "path": "src/common/directives/cond.ts",
10459
10837
  "declarations": [
10460
10838
  {
10461
- "kind": "class",
10462
- "description": "",
10463
- "name": "SwipeController",
10464
- "members": [
10839
+ "kind": "function",
10840
+ "name": "cond",
10841
+ "return": {
10842
+ "type": {
10843
+ "text": "typeof value | typeof nothing"
10844
+ }
10845
+ },
10846
+ "parameters": [
10465
10847
  {
10466
- "kind": "field",
10467
- "name": "events",
10848
+ "name": "value",
10468
10849
  "type": {
10469
- "text": "EventController"
10470
- },
10471
- "privacy": "private",
10472
- "default": "new EventController(host)"
10473
- },
10850
+ "text": "any"
10851
+ }
10852
+ }
10853
+ ],
10854
+ "description": "if value is truthy, return it, otherwise return nothing"
10855
+ },
10856
+ {
10857
+ "kind": "function",
10858
+ "name": "cond",
10859
+ "return": {
10860
+ "type": {
10861
+ "text": "typeof trueCase | typeof nothing"
10862
+ }
10863
+ },
10864
+ "parameters": [
10474
10865
  {
10475
- "kind": "field",
10476
- "name": "hadFirstUpdate",
10866
+ "name": "condition",
10477
10867
  "type": {
10478
- "text": "boolean"
10479
- },
10480
- "privacy": "private",
10481
- "default": "false"
10868
+ "text": "unknown"
10869
+ }
10482
10870
  },
10483
10871
  {
10484
- "kind": "field",
10485
- "name": "initialTouchX",
10872
+ "name": "trueCase",
10486
10873
  "type": {
10487
- "text": "number"
10488
- },
10489
- "privacy": "private",
10490
- "default": "0"
10874
+ "text": "any"
10875
+ }
10876
+ }
10877
+ ],
10878
+ "description": "if condition is truthy, return trueCase, otherwise return nothing"
10879
+ },
10880
+ {
10881
+ "kind": "function",
10882
+ "name": "cond",
10883
+ "return": {
10884
+ "type": {
10885
+ "text": "typeof trueCase"
10886
+ }
10887
+ },
10888
+ "parameters": [
10889
+ {
10890
+ "name": "condition",
10891
+ "type": {
10892
+ "text": "true"
10893
+ }
10491
10894
  },
10492
10895
  {
10493
- "kind": "field",
10494
- "name": "initialTouchY",
10896
+ "name": "trueCase",
10495
10897
  "type": {
10496
- "text": "number"
10497
- },
10498
- "privacy": "private",
10499
- "default": "0"
10898
+ "text": "any"
10899
+ }
10900
+ }
10901
+ ],
10902
+ "description": "condition is true, so always return trueCase"
10903
+ },
10904
+ {
10905
+ "kind": "function",
10906
+ "name": "cond",
10907
+ "return": {
10908
+ "type": {
10909
+ "text": "typeof nothing"
10910
+ }
10911
+ },
10912
+ "parameters": [
10913
+ {
10914
+ "name": "condition",
10915
+ "type": {
10916
+ "text": "false"
10917
+ }
10500
10918
  },
10501
10919
  {
10502
- "kind": "field",
10503
- "name": "options",
10920
+ "name": "trueCase",
10504
10921
  "type": {
10505
- "text": "SetRequired<SwipeControllerOptions, \"target\">"
10506
- },
10507
- "privacy": "private",
10508
- "default": "{\n target: () => host,\n ...options,\n }"
10922
+ "text": "any"
10923
+ }
10924
+ }
10925
+ ],
10926
+ "description": "condition is false, to will always return nothing"
10927
+ },
10928
+ {
10929
+ "kind": "function",
10930
+ "name": "cond",
10931
+ "return": {
10932
+ "type": {
10933
+ "text": "typeof trueCase | typeof falseCase"
10934
+ }
10935
+ },
10936
+ "parameters": [
10937
+ {
10938
+ "name": "condition",
10939
+ "type": {
10940
+ "text": "unknown"
10941
+ }
10509
10942
  },
10510
10943
  {
10511
- "kind": "method",
10512
- "name": "hostUpdated"
10944
+ "name": "trueCase",
10945
+ "type": {
10946
+ "text": "any"
10947
+ }
10513
10948
  },
10514
10949
  {
10515
- "kind": "method",
10516
- "name": "hostDisconnected"
10950
+ "name": "falseCase",
10951
+ "type": {
10952
+ "text": "any"
10953
+ }
10954
+ }
10955
+ ],
10956
+ "description": "if condition is truthy, return trueCase, otherwise return falseCase"
10957
+ },
10958
+ {
10959
+ "kind": "function",
10960
+ "name": "cond",
10961
+ "return": {
10962
+ "type": {
10963
+ "text": "typeof trueCase"
10964
+ }
10965
+ },
10966
+ "parameters": [
10967
+ {
10968
+ "name": "condition",
10969
+ "type": {
10970
+ "text": "true"
10971
+ }
10517
10972
  },
10518
10973
  {
10519
- "kind": "field",
10520
- "name": "handleTouchStart",
10521
- "privacy": "private"
10974
+ "name": "trueCase",
10975
+ "type": {
10976
+ "text": "any"
10977
+ }
10522
10978
  },
10523
10979
  {
10524
- "kind": "field",
10525
- "name": "handleTouchEnd",
10526
- "privacy": "private"
10980
+ "name": "falseCase",
10981
+ "type": {
10982
+ "text": "any"
10983
+ }
10527
10984
  }
10528
- ]
10985
+ ],
10986
+ "description": "condition is true, so always return trueCase"
10529
10987
  },
10530
10988
  {
10531
10989
  "kind": "function",
10532
- "name": "isHorizontalSwipe",
10990
+ "name": "cond",
10991
+ "return": {
10992
+ "type": {
10993
+ "text": "typeof falseCase"
10994
+ }
10995
+ },
10533
10996
  "parameters": [
10534
10997
  {
10535
- "name": "{ distX, distY }",
10998
+ "name": "condition",
10536
10999
  "type": {
10537
- "text": "SwipeDetails"
11000
+ "text": "false"
11001
+ }
11002
+ },
11003
+ {
11004
+ "name": "trueCase",
11005
+ "type": {
11006
+ "text": "any"
11007
+ }
11008
+ },
11009
+ {
11010
+ "name": "falseCase",
11011
+ "type": {
11012
+ "text": "any"
10538
11013
  }
10539
11014
  }
10540
- ]
11015
+ ],
11016
+ "description": "condition is false, so always return falseCase"
10541
11017
  },
10542
11018
  {
10543
11019
  "kind": "function",
10544
- "name": "isDownwardsSwipe",
11020
+ "name": "cond",
10545
11021
  "parameters": [
10546
11022
  {
10547
- "name": "{ distX, distY }",
11023
+ "name": "condition",
10548
11024
  "type": {
10549
- "text": "SwipeDetails"
11025
+ "text": "unknown"
11026
+ }
11027
+ },
11028
+ {
11029
+ "name": "trueCase",
11030
+ "default": "condition",
11031
+ "type": {
11032
+ "text": "any"
11033
+ }
11034
+ },
11035
+ {
11036
+ "name": "falseCase",
11037
+ "default": "nothing",
11038
+ "type": {
11039
+ "text": "any"
10550
11040
  }
10551
11041
  }
10552
11042
  ]
@@ -10555,40 +11045,60 @@
10555
11045
  "exports": [
10556
11046
  {
10557
11047
  "kind": "js",
10558
- "name": "SwipeController",
11048
+ "name": "cond",
10559
11049
  "declaration": {
10560
- "name": "SwipeController",
10561
- "module": "src/common/controllers/SwipeController.ts"
11050
+ "name": "cond",
11051
+ "module": "src/common/directives/cond.ts"
10562
11052
  }
10563
11053
  },
10564
11054
  {
10565
11055
  "kind": "js",
10566
- "name": "isHorizontalSwipe",
11056
+ "name": "cond",
10567
11057
  "declaration": {
10568
- "name": "isHorizontalSwipe",
10569
- "module": "src/common/controllers/SwipeController.ts"
11058
+ "name": "cond",
11059
+ "module": "src/common/directives/cond.ts"
10570
11060
  }
10571
11061
  },
10572
11062
  {
10573
11063
  "kind": "js",
10574
- "name": "isDownwardsSwipe",
11064
+ "name": "cond",
10575
11065
  "declaration": {
10576
- "name": "isDownwardsSwipe",
10577
- "module": "src/common/controllers/SwipeController.ts"
11066
+ "name": "cond",
11067
+ "module": "src/common/directives/cond.ts"
10578
11068
  }
10579
- }
10580
- ]
10581
- },
10582
- {
10583
- "kind": "javascript-module",
10584
- "path": "src/common/directives/cond.ts",
10585
- "declarations": [
11069
+ },
10586
11070
  {
10587
- "kind": "variable",
10588
- "name": "cond"
10589
- }
10590
- ],
10591
- "exports": [
11071
+ "kind": "js",
11072
+ "name": "cond",
11073
+ "declaration": {
11074
+ "name": "cond",
11075
+ "module": "src/common/directives/cond.ts"
11076
+ }
11077
+ },
11078
+ {
11079
+ "kind": "js",
11080
+ "name": "cond",
11081
+ "declaration": {
11082
+ "name": "cond",
11083
+ "module": "src/common/directives/cond.ts"
11084
+ }
11085
+ },
11086
+ {
11087
+ "kind": "js",
11088
+ "name": "cond",
11089
+ "declaration": {
11090
+ "name": "cond",
11091
+ "module": "src/common/directives/cond.ts"
11092
+ }
11093
+ },
11094
+ {
11095
+ "kind": "js",
11096
+ "name": "cond",
11097
+ "declaration": {
11098
+ "name": "cond",
11099
+ "module": "src/common/directives/cond.ts"
11100
+ }
11101
+ },
10592
11102
  {
10593
11103
  "kind": "js",
10594
11104
  "name": "cond",
@@ -11438,7 +11948,7 @@
11438
11948
  "kind": "field",
11439
11949
  "name": "name",
11440
11950
  "type": {
11441
- "text": "string"
11951
+ "text": "string | undefined"
11442
11952
  }
11443
11953
  },
11444
11954
  {