@nordhealth/components 1.0.0-beta.9 → 1.0.0-rc.11

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 (230) hide show
  1. package/custom-elements.json +2231 -908
  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-6540480f.js +2 -0
  11. package/lib/Calendar-6540480f.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-6762b5eb.js → Component-9d373ef3.js} +2 -2
  22. package/lib/Component-9d373ef3.js.map +1 -0
  23. package/lib/DatePicker.js +1 -1
  24. package/lib/DatePicker.js.map +1 -1
  25. package/lib/DateSelectEvent.js +1 -1
  26. package/lib/DateSelectEvent.js.map +1 -1
  27. package/lib/{DirectionController-82794ee9.js → DirectionController-b267af23.js} +2 -2
  28. package/lib/DirectionController-b267af23.js.map +1 -0
  29. package/lib/DraftComponentMixin-9e4b7b34.js +2 -0
  30. package/lib/DraftComponentMixin-9e4b7b34.js.map +1 -0
  31. package/lib/Dropdown.js +2 -0
  32. package/lib/Dropdown.js.map +1 -0
  33. package/lib/DropdownGroup.js +2 -0
  34. package/lib/DropdownGroup.js.map +1 -0
  35. package/lib/DropdownItem.js +2 -0
  36. package/lib/DropdownItem.js.map +1 -0
  37. package/lib/EmptyState.js +1 -1
  38. package/lib/EmptyState.js.map +1 -1
  39. package/lib/EventController-d99ebeef.js +2 -0
  40. package/lib/EventController-d99ebeef.js.map +1 -0
  41. package/lib/Fieldset.js +1 -1
  42. package/lib/Fieldset.js.map +1 -1
  43. package/lib/{FocusableMixin-98e13999.js → FocusableMixin-ebb67709.js} +2 -2
  44. package/lib/{FocusableMixin-98e13999.js.map → FocusableMixin-ebb67709.js.map} +1 -1
  45. package/lib/FormAssociatedMixin-1f97ed66.js +2 -0
  46. package/lib/FormAssociatedMixin-1f97ed66.js.map +1 -0
  47. package/lib/FormField-50bd73d5.js +2 -0
  48. package/lib/FormField-50bd73d5.js.map +1 -0
  49. package/lib/Header.js +1 -1
  50. package/lib/Header.js.map +1 -1
  51. package/lib/Icon.js +1 -1
  52. package/lib/Icon.js.map +1 -1
  53. package/lib/Input.js +1 -1
  54. package/lib/Input.js.map +1 -1
  55. package/lib/InputMixin-94d15730.js +2 -0
  56. package/lib/{InputMixin-33bc2df5.js.map → InputMixin-94d15730.js.map} +1 -1
  57. package/lib/Layout.js +1 -1
  58. package/lib/Layout.js.map +1 -1
  59. package/lib/LightDismissController-a35d0f66.js +2 -0
  60. package/lib/LightDismissController-a35d0f66.js.map +1 -0
  61. package/lib/{LightDomController-f56fa1a4.js → LightDomController-011334da.js} +2 -2
  62. package/lib/{LightDomController-f56fa1a4.js.map → LightDomController-011334da.js.map} +1 -1
  63. package/lib/LocalizeController.js +2 -0
  64. package/lib/LocalizeController.js.map +1 -0
  65. package/lib/NavGroup.js +1 -1
  66. package/lib/NavGroup.js.map +1 -1
  67. package/lib/NavItem.js +1 -1
  68. package/lib/NavItem.js.map +1 -1
  69. package/lib/Navigation.js +1 -1
  70. package/lib/Navigation.js.map +1 -1
  71. package/lib/Popout.js +2 -0
  72. package/lib/Popout.js.map +1 -0
  73. package/lib/ProgressBar.js +2 -0
  74. package/lib/ProgressBar.js.map +1 -0
  75. package/lib/Radio.js +1 -1
  76. package/lib/Radio.js.map +1 -1
  77. package/lib/Select.js +1 -1
  78. package/lib/Select.js.map +1 -1
  79. package/lib/SlotController-683d0e7c.js +2 -0
  80. package/lib/SlotController-683d0e7c.js.map +1 -0
  81. package/lib/Spinner.js +1 -1
  82. package/lib/Spinner.js.map +1 -1
  83. package/lib/Stack.js +1 -1
  84. package/lib/Stack.js.map +1 -1
  85. package/lib/Table.js +1 -1
  86. package/lib/Table.js.map +1 -1
  87. package/lib/TextField-ece1c786.js +2 -0
  88. package/lib/TextField-ece1c786.js.map +1 -0
  89. package/lib/Textarea.js +1 -1
  90. package/lib/Textarea.js.map +1 -1
  91. package/lib/Tooltip.js +1 -1
  92. package/lib/Tooltip.js.map +1 -1
  93. package/lib/VisuallyHidden.js +1 -1
  94. package/lib/VisuallyHidden.js.map +1 -1
  95. package/lib/bundle.js +11 -11
  96. package/lib/bundle.js.map +1 -1
  97. package/lib/{class-map-61e9e8c1.js → class-map-87423405.js} +2 -2
  98. package/lib/{class-map-61e9e8c1.js.map → class-map-87423405.js.map} +1 -1
  99. package/lib/{collection-f3631dc8.js → collection-800f5002.js} +2 -2
  100. package/lib/{collection-f3631dc8.js.map → collection-800f5002.js.map} +1 -1
  101. package/lib/date-adapter.js +1 -1
  102. package/lib/dates-9272b910.js +2 -0
  103. package/lib/dates-9272b910.js.map +1 -0
  104. package/lib/en-us.js +2 -0
  105. package/lib/en-us.js.map +1 -0
  106. package/lib/fi-fi.js +2 -0
  107. package/lib/fi-fi.js.map +1 -0
  108. package/lib/fsm-50373df9.js +2 -0
  109. package/lib/fsm-50373df9.js.map +1 -0
  110. package/lib/if-defined-fe657a02.js +7 -0
  111. package/lib/{if-defined-2a4c6dbc.js.map → if-defined-fe657a02.js.map} +1 -1
  112. package/lib/index.js +1 -1
  113. package/lib/{lit-element-9646ab7e.js → lit-element-74b6bb4b.js} +3 -3
  114. package/lib/{lit-element-9646ab7e.js.map → lit-element-74b6bb4b.js.map} +1 -1
  115. package/lib/localization.js +2 -0
  116. package/lib/localization.js.map +1 -0
  117. package/lib/localization2.js +2 -0
  118. package/lib/localization2.js.map +1 -0
  119. package/lib/localization3.js +2 -0
  120. package/lib/localization3.js.map +1 -0
  121. package/lib/month-view.js +1 -1
  122. package/lib/month-view.js.map +1 -1
  123. package/lib/number-3a8ef88a.js +7 -0
  124. package/lib/{number-e7cd246c.js.map → number-3a8ef88a.js.map} +1 -1
  125. package/lib/positioning-72899e14.js +2 -0
  126. package/lib/positioning-72899e14.js.map +1 -0
  127. package/lib/query-2d22378e.js +12 -0
  128. package/lib/query-2d22378e.js.map +1 -0
  129. package/lib/query-assigned-elements-37b095c4.js +26 -0
  130. package/lib/query-assigned-elements-37b095c4.js.map +1 -0
  131. package/lib/ref-7d028e3a.js +17 -0
  132. package/lib/ref-7d028e3a.js.map +1 -0
  133. package/lib/src/avatar/Avatar.d.ts +4 -6
  134. package/lib/src/avatar/Avatar.test.d.ts +1 -1
  135. package/lib/src/badge/Badge.d.ts +2 -4
  136. package/lib/src/banner/Banner.d.ts +2 -4
  137. package/lib/src/banner/Banner.test.d.ts +3 -0
  138. package/lib/src/button/Button.d.ts +18 -4
  139. package/lib/src/calendar/Calendar.d.ts +20 -7
  140. package/lib/src/calendar/Calendar.test.d.ts +2 -0
  141. package/lib/src/calendar/DateSelectEvent.d.ts +1 -2
  142. package/lib/src/calendar/localization.d.ts +7 -0
  143. package/lib/src/calendar/month-view.d.ts +3 -3
  144. package/lib/src/card/Card.d.ts +2 -4
  145. package/lib/src/checkbox/Checkbox.d.ts +1 -1
  146. package/lib/src/command-menu/CommandMenu.d.ts +3 -4
  147. package/lib/src/command-menu/CommandMenuAction.d.ts +2 -0
  148. package/lib/src/command-menu/localization.d.ts +11 -0
  149. package/lib/src/common/collection.d.ts +1 -1
  150. package/lib/src/common/controllers/EventController.d.ts +14 -0
  151. package/lib/src/common/controllers/FormDataController.d.ts +1 -1
  152. package/lib/src/common/controllers/LightDismissController.d.ts +1 -1
  153. package/lib/src/common/controllers/SlotController.d.ts +1 -1
  154. package/lib/src/common/controllers/SwipeController.d.ts +3 -5
  155. package/lib/src/common/dates.d.ts +2 -0
  156. package/lib/src/common/fsm.d.ts +2 -0
  157. package/lib/src/common/positioning.d.ts +12 -0
  158. package/lib/src/date-picker/DatePicker.d.ts +6 -13
  159. package/lib/src/date-picker/localization.d.ts +7 -0
  160. package/lib/src/dropdown/Dropdown.d.ts +52 -0
  161. package/lib/src/dropdown/Dropdown.test.d.ts +7 -0
  162. package/lib/src/dropdown-group/DropdownGroup.d.ts +24 -0
  163. package/lib/src/dropdown-group/DropdownGroup.test.d.ts +1 -0
  164. package/lib/src/dropdown-item/DropdownItem.d.ts +27 -0
  165. package/lib/src/dropdown-item/DropdownItem.test.d.ts +2 -0
  166. package/lib/src/empty-state/EmptyState.d.ts +2 -4
  167. package/lib/src/fieldset/Fieldset.d.ts +2 -4
  168. package/lib/src/header/Header.test.d.ts +1 -0
  169. package/lib/src/icon/Icon.d.ts +3 -4
  170. package/lib/src/index.d.ts +7 -0
  171. package/lib/src/input/Input.d.ts +3 -3
  172. package/lib/src/layout/Layout.test.d.ts +2 -0
  173. package/lib/src/localization/LocalizeController.d.ts +28 -0
  174. package/lib/src/localization/LocalizeController.test.d.ts +1 -0
  175. package/lib/src/localization/en-us.d.ts +28 -0
  176. package/lib/src/localization/fi-fi.d.ts +3 -0
  177. package/lib/src/localization/translation.d.ts +31 -0
  178. package/lib/src/localization/translation.test.d.ts +1 -0
  179. package/lib/src/navigation/Navigation.test.d.ts +4 -0
  180. package/lib/src/popout/Popout.d.ts +78 -0
  181. package/lib/src/popout/Popout.test.d.ts +2 -0
  182. package/lib/src/progress-bar/ProgressBar.d.ts +38 -0
  183. package/lib/src/progress-bar/ProgressBar.test.d.ts +3 -0
  184. package/lib/src/radio/Radio.d.ts +1 -1
  185. package/lib/src/select/Select.d.ts +1 -1
  186. package/lib/src/spinner/Spinner.d.ts +2 -4
  187. package/lib/src/stack/Stack.d.ts +18 -5
  188. package/lib/src/stack/Stack.test.d.ts +3 -0
  189. package/lib/src/table/Table.d.ts +2 -4
  190. package/lib/src/textarea/Textarea.d.ts +1 -1
  191. package/lib/src/tooltip/Tooltip.d.ts +19 -23
  192. package/lib/src/tooltip/Tooltip.test.d.ts +1 -0
  193. package/lib/src/visually-hidden/VisuallyHidden.d.ts +2 -4
  194. package/lib/translation.js +2 -0
  195. package/lib/translation.js.map +1 -0
  196. package/lib/unsafe-html-989a642b.js +7 -0
  197. package/lib/{unsafe-html-4da54dd2.js.map → unsafe-html-989a642b.js.map} +1 -1
  198. package/package.json +17 -8
  199. package/lib/Calendar-90013fdb.js +0 -13
  200. package/lib/Calendar-90013fdb.js.map +0 -1
  201. package/lib/Component-6762b5eb.js.map +0 -1
  202. package/lib/DirectionController-82794ee9.js.map +0 -1
  203. package/lib/DraftComponentMixin-30345acf.js +0 -26
  204. package/lib/DraftComponentMixin-30345acf.js.map +0 -1
  205. package/lib/FormAssociatedMixin-49b778dd.js +0 -2
  206. package/lib/FormAssociatedMixin-49b778dd.js.map +0 -1
  207. package/lib/FormField-b1c18e6e.js +0 -2
  208. package/lib/FormField-b1c18e6e.js.map +0 -1
  209. package/lib/InputMixin-33bc2df5.js +0 -2
  210. package/lib/LightDismissController-cc5b4bf2.js +0 -2
  211. package/lib/LightDismissController-cc5b4bf2.js.map +0 -1
  212. package/lib/SlotController-5bfc47d1.js +0 -2
  213. package/lib/SlotController-5bfc47d1.js.map +0 -1
  214. package/lib/TextField-b4155167.js +0 -2
  215. package/lib/TextField-b4155167.js.map +0 -1
  216. package/lib/calendar-localization.js +0 -2
  217. package/lib/calendar-localization.js.map +0 -1
  218. package/lib/date-localization.js +0 -2
  219. package/lib/date-localization.js.map +0 -1
  220. package/lib/dates-ccf5a897.js +0 -2
  221. package/lib/dates-ccf5a897.js.map +0 -1
  222. package/lib/directive-helpers-e7b6bf4b.js +0 -7
  223. package/lib/directive-helpers-e7b6bf4b.js.map +0 -1
  224. package/lib/if-defined-2a4c6dbc.js +0 -7
  225. package/lib/number-e7cd246c.js +0 -7
  226. package/lib/ref-eb5cfa10.js +0 -12
  227. package/lib/ref-eb5cfa10.js.map +0 -1
  228. package/lib/src/calendar/calendar-localization.d.ts +0 -15
  229. package/lib/src/date-picker/date-localization.d.ts +0 -8
  230. package/lib/unsafe-html-4da54dd2.js +0 -7
@@ -222,6 +222,70 @@
222
222
  "name": "default",
223
223
  "module": "\"./avatar/Avatar.js\""
224
224
  }
225
+ },
226
+ {
227
+ "kind": "js",
228
+ "name": "ProgressBar",
229
+ "declaration": {
230
+ "name": "default",
231
+ "module": "\"./progress-bar/ProgressBar.js\""
232
+ }
233
+ },
234
+ {
235
+ "kind": "js",
236
+ "name": "Popout",
237
+ "declaration": {
238
+ "name": "default",
239
+ "module": "\"./popout/Popout.js\""
240
+ }
241
+ },
242
+ {
243
+ "kind": "js",
244
+ "name": "Dropdown",
245
+ "declaration": {
246
+ "name": "default",
247
+ "module": "\"./dropdown/Dropdown.js\""
248
+ }
249
+ },
250
+ {
251
+ "kind": "js",
252
+ "name": "DropdownItem",
253
+ "declaration": {
254
+ "name": "default",
255
+ "module": "\"./dropdown-item/DropdownItem.js\""
256
+ }
257
+ },
258
+ {
259
+ "kind": "js",
260
+ "name": "DropdownGroup",
261
+ "declaration": {
262
+ "name": "default",
263
+ "module": "\"./dropdown-group/DropdownGroup.js\""
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
+ }
225
289
  }
226
290
  ]
227
291
  },
@@ -238,7 +302,7 @@
238
302
  "kind": "field",
239
303
  "name": "state",
240
304
  "type": {
241
- "text": "States"
305
+ "text": "States<typeof transition>"
242
306
  },
243
307
  "privacy": "private",
244
308
  "default": "\"initial\""
@@ -247,7 +311,7 @@
247
311
  "kind": "field",
248
312
  "name": "size",
249
313
  "type": {
250
- "text": "\"m\" | \"l\" | \"xl\""
314
+ "text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
251
315
  },
252
316
  "default": "\"m\"",
253
317
  "description": "The size of the avatar.",
@@ -281,7 +345,8 @@
281
345
  },
282
346
  {
283
347
  "kind": "method",
284
- "name": "renderFallback"
348
+ "name": "renderFallback",
349
+ "privacy": "protected"
285
350
  },
286
351
  {
287
352
  "kind": "method",
@@ -292,27 +357,13 @@
292
357
  "kind": "method",
293
358
  "name": "handleError",
294
359
  "privacy": "private"
295
- },
296
- {
297
- "kind": "field",
298
- "name": "_warningLogged",
299
- "type": {
300
- "text": "boolean"
301
- },
302
- "privacy": "private",
303
- "static": true,
304
- "default": "false",
305
- "inheritedFrom": {
306
- "name": "DraftComponentMixin",
307
- "module": "src/common/mixins/DraftComponentMixin.ts"
308
- }
309
360
  }
310
361
  ],
311
362
  "attributes": [
312
363
  {
313
364
  "name": "size",
314
365
  "type": {
315
- "text": "\"m\" | \"l\" | \"xl\""
366
+ "text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
316
367
  },
317
368
  "default": "\"m\"",
318
369
  "description": "The size of the avatar.",
@@ -336,17 +387,11 @@
336
387
  "fieldName": "name"
337
388
  }
338
389
  ],
339
- "mixins": [
340
- {
341
- "name": "DraftComponentMixin",
342
- "module": "/src/common/mixins/DraftComponentMixin.js"
343
- }
344
- ],
345
390
  "superclass": {
346
391
  "name": "LitElement",
347
392
  "package": "lit"
348
393
  },
349
- "status": "draft",
394
+ "status": "new",
350
395
  "category": "image",
351
396
  "tagName": "nord-avatar",
352
397
  "customElement": true
@@ -397,20 +442,6 @@
397
442
  "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
398
443
  "attribute": "type",
399
444
  "reflects": true
400
- },
401
- {
402
- "kind": "field",
403
- "name": "_warningLogged",
404
- "type": {
405
- "text": "boolean"
406
- },
407
- "privacy": "private",
408
- "static": true,
409
- "default": "false",
410
- "inheritedFrom": {
411
- "name": "DraftComponentMixin",
412
- "module": "src/common/mixins/DraftComponentMixin.ts"
413
- }
414
445
  }
415
446
  ],
416
447
  "attributes": [
@@ -424,17 +455,11 @@
424
455
  "fieldName": "type"
425
456
  }
426
457
  ],
427
- "mixins": [
428
- {
429
- "name": "DraftComponentMixin",
430
- "module": "/src/common/mixins/DraftComponentMixin.js"
431
- }
432
- ],
433
458
  "superclass": {
434
459
  "name": "LitElement",
435
460
  "package": "lit"
436
461
  },
437
- "status": "draft",
462
+ "status": "ready",
438
463
  "category": "text",
439
464
  "tagName": "nord-badge",
440
465
  "customElement": true
@@ -485,20 +510,6 @@
485
510
  "description": "The style variant of the banner.",
486
511
  "attribute": "variant",
487
512
  "reflects": true
488
- },
489
- {
490
- "kind": "field",
491
- "name": "_warningLogged",
492
- "type": {
493
- "text": "boolean"
494
- },
495
- "privacy": "private",
496
- "static": true,
497
- "default": "false",
498
- "inheritedFrom": {
499
- "name": "DraftComponentMixin",
500
- "module": "src/common/mixins/DraftComponentMixin.ts"
501
- }
502
513
  }
503
514
  ],
504
515
  "attributes": [
@@ -512,17 +523,11 @@
512
523
  "fieldName": "variant"
513
524
  }
514
525
  ],
515
- "mixins": [
516
- {
517
- "name": "DraftComponentMixin",
518
- "module": "/src/common/mixins/DraftComponentMixin.js"
519
- }
520
- ],
521
526
  "superclass": {
522
527
  "name": "LitElement",
523
528
  "package": "lit"
524
529
  },
525
- "status": "draft",
530
+ "status": "new",
526
531
  "category": "feedback",
527
532
  "tagName": "nord-banner",
528
533
  "customElement": true
@@ -548,6 +553,94 @@
548
553
  ],
549
554
  "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"
550
555
  },
556
+ {
557
+ "kind": "javascript-module",
558
+ "path": "src/card/Card.ts",
559
+ "declarations": [
560
+ {
561
+ "kind": "class",
562
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
563
+ "name": "Card",
564
+ "slots": [
565
+ {
566
+ "description": "The card content.",
567
+ "name": ""
568
+ },
569
+ {
570
+ "description": "Optional slot that holds a header for the card.",
571
+ "name": "header"
572
+ },
573
+ {
574
+ "description": "Optional slot that holds footer content for the card.",
575
+ "name": "footer"
576
+ }
577
+ ],
578
+ "members": [
579
+ {
580
+ "kind": "field",
581
+ "name": "headerSlot",
582
+ "privacy": "private",
583
+ "default": "new SlotController(this, \"header\")"
584
+ },
585
+ {
586
+ "kind": "field",
587
+ "name": "footerSlot",
588
+ "privacy": "private",
589
+ "default": "new SlotController(this, \"footer\")"
590
+ },
591
+ {
592
+ "kind": "field",
593
+ "name": "padding",
594
+ "type": {
595
+ "text": "\"m\" | \"l\" | \"none\""
596
+ },
597
+ "default": "\"m\"",
598
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
599
+ "attribute": "padding",
600
+ "reflects": true
601
+ }
602
+ ],
603
+ "attributes": [
604
+ {
605
+ "name": "padding",
606
+ "type": {
607
+ "text": "\"m\" | \"l\" | \"none\""
608
+ },
609
+ "default": "\"m\"",
610
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
611
+ "fieldName": "padding"
612
+ }
613
+ ],
614
+ "superclass": {
615
+ "name": "LitElement",
616
+ "package": "lit"
617
+ },
618
+ "status": "ready",
619
+ "category": "structure",
620
+ "tagName": "nord-card",
621
+ "customElement": true
622
+ }
623
+ ],
624
+ "exports": [
625
+ {
626
+ "kind": "js",
627
+ "name": "default",
628
+ "declaration": {
629
+ "name": "Card",
630
+ "module": "src/card/Card.ts"
631
+ }
632
+ },
633
+ {
634
+ "kind": "custom-element-definition",
635
+ "name": "nord-card",
636
+ "declaration": {
637
+ "name": "Card",
638
+ "module": "src/card/Card.ts"
639
+ }
640
+ }
641
+ ],
642
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
643
+ },
551
644
  {
552
645
  "kind": "javascript-module",
553
646
  "path": "src/calendar/Calendar.ts",
@@ -599,6 +692,12 @@
599
692
  "name": "shortcuts",
600
693
  "privacy": "private"
601
694
  },
695
+ {
696
+ "kind": "field",
697
+ "name": "localize",
698
+ "privacy": "private",
699
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
700
+ },
602
701
  {
603
702
  "kind": "field",
604
703
  "name": "dateFormatShort",
@@ -610,11 +709,35 @@
610
709
  },
611
710
  {
612
711
  "kind": "field",
613
- "name": "localization",
712
+ "name": "monthNames",
713
+ "type": {
714
+ "text": "string[]"
715
+ },
716
+ "privacy": "private"
717
+ },
718
+ {
719
+ "kind": "field",
720
+ "name": "monthNamesShort",
721
+ "type": {
722
+ "text": "string[]"
723
+ },
724
+ "privacy": "private"
725
+ },
726
+ {
727
+ "kind": "field",
728
+ "name": "dayNames",
729
+ "type": {
730
+ "text": "string[]"
731
+ },
732
+ "privacy": "private"
733
+ },
734
+ {
735
+ "kind": "field",
736
+ "name": "dayNamesShort",
614
737
  "type": {
615
- "text": "CalendarLocalizedText"
738
+ "text": "string[]"
616
739
  },
617
- "default": "localization"
740
+ "privacy": "private"
618
741
  },
619
742
  {
620
743
  "kind": "field",
@@ -655,6 +778,17 @@
655
778
  "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
656
779
  "attribute": "max"
657
780
  },
781
+ {
782
+ "kind": "field",
783
+ "name": "expand",
784
+ "type": {
785
+ "text": "boolean"
786
+ },
787
+ "default": "false",
788
+ "description": "Controls whether the calendar expands to fill the width of its container.",
789
+ "attribute": "expand",
790
+ "reflects": true
791
+ },
658
792
  {
659
793
  "kind": "field",
660
794
  "name": "isDateDisabled",
@@ -688,13 +822,15 @@
688
822
  "optional": true,
689
823
  "type": {
690
824
  "text": "FocusOptions & { target: \"day\" | \"month\" }"
691
- }
825
+ },
826
+ "description": "An object which controls aspects of the focusing process."
692
827
  }
693
- ]
828
+ ],
829
+ "description": "Programmatically move focus to the calendar."
694
830
  },
695
831
  {
696
832
  "kind": "method",
697
- "name": "createDateFormatter",
833
+ "name": "handleLangChange",
698
834
  "privacy": "private"
699
835
  },
700
836
  {
@@ -819,20 +955,22 @@
819
955
  "kind": "field",
820
956
  "name": "disableActiveFocus",
821
957
  "privacy": "private"
958
+ }
959
+ ],
960
+ "events": [
961
+ {
962
+ "name": "nord-focus-date",
963
+ "type": {
964
+ "text": "DateSelectEvent"
965
+ },
966
+ "description": "Dispatched when the calendar's focused date changes."
822
967
  },
823
968
  {
824
- "kind": "field",
825
- "name": "_warningLogged",
826
969
  "type": {
827
- "text": "boolean"
970
+ "text": "DateSelectEvent"
828
971
  },
829
- "privacy": "private",
830
- "static": true,
831
- "default": "false",
832
- "inheritedFrom": {
833
- "name": "DraftComponentMixin",
834
- "module": "src/common/mixins/DraftComponentMixin.ts"
835
- }
972
+ "description": "Dispatched when a date is selected and the value changes.",
973
+ "name": "change"
836
974
  }
837
975
  ],
838
976
  "attributes": [
@@ -870,19 +1008,22 @@
870
1008
  "default": "\"\"",
871
1009
  "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
872
1010
  "fieldName": "max"
873
- }
874
- ],
875
- "mixins": [
1011
+ },
876
1012
  {
877
- "name": "DraftComponentMixin",
878
- "module": "/src/common/mixins/DraftComponentMixin.js"
1013
+ "name": "expand",
1014
+ "type": {
1015
+ "text": "boolean"
1016
+ },
1017
+ "default": "false",
1018
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1019
+ "fieldName": "expand"
879
1020
  }
880
1021
  ],
881
1022
  "superclass": {
882
1023
  "name": "LitElement",
883
1024
  "package": "lit"
884
1025
  },
885
- "status": "draft",
1026
+ "status": "ready",
886
1027
  "category": "list",
887
1028
  "tagName": "nord-calendar",
888
1029
  "customElement": true
@@ -917,15 +1058,6 @@
917
1058
  "description": "",
918
1059
  "name": "DateSelectEvent",
919
1060
  "members": [
920
- {
921
- "kind": "field",
922
- "name": "eventName",
923
- "type": {
924
- "text": "string"
925
- },
926
- "static": true,
927
- "default": "\"nord-select\""
928
- },
929
1061
  {
930
1062
  "kind": "field",
931
1063
  "name": "date",
@@ -955,15 +1087,15 @@
955
1087
  },
956
1088
  {
957
1089
  "kind": "javascript-module",
958
- "path": "src/calendar/calendar-localization.ts",
1090
+ "path": "src/calendar/localization.ts",
959
1091
  "declarations": [
960
1092
  {
961
1093
  "kind": "variable",
962
- "name": "localization",
1094
+ "name": "calendarLocalization",
963
1095
  "type": {
964
- "text": "CalendarLocalizedText"
1096
+ "text": "object"
965
1097
  },
966
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1098
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
967
1099
  }
968
1100
  ],
969
1101
  "exports": [
@@ -971,8 +1103,8 @@
971
1103
  "kind": "js",
972
1104
  "name": "default",
973
1105
  "declaration": {
974
- "name": "localization",
975
- "module": "src/calendar/calendar-localization.ts"
1106
+ "name": "calendarLocalization",
1107
+ "module": "src/calendar/localization.ts"
976
1108
  }
977
1109
  }
978
1110
  ],
@@ -999,7 +1131,7 @@
999
1131
  "name": "monthView",
1000
1132
  "parameters": [
1001
1133
  {
1002
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1134
+ "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}",
1003
1135
  "type": {
1004
1136
  "text": "MonthViewArgs"
1005
1137
  }
@@ -1041,12 +1173,12 @@
1041
1173
  "name": ""
1042
1174
  },
1043
1175
  {
1044
- "description": "Used to place content before button text. Typically used for icons.",
1045
- "name": "before"
1176
+ "description": "Used to place content at the start of button text. Typically used for icons.",
1177
+ "name": "start"
1046
1178
  },
1047
1179
  {
1048
- "description": "Used to place content after button text. Typically used for icons.",
1049
- "name": "after"
1180
+ "description": "Used to place content at the end of button text. Typically used for icons.",
1181
+ "name": "end"
1050
1182
  }
1051
1183
  ],
1052
1184
  "members": [
@@ -1055,6 +1187,12 @@
1055
1187
  "name": "buttonRef",
1056
1188
  "privacy": "private"
1057
1189
  },
1190
+ {
1191
+ "kind": "field",
1192
+ "name": "events",
1193
+ "privacy": "private",
1194
+ "default": "new EventController(this)"
1195
+ },
1058
1196
  {
1059
1197
  "kind": "field",
1060
1198
  "name": "lightDom",
@@ -1094,6 +1232,24 @@
1094
1232
  "attribute": "size",
1095
1233
  "reflects": true
1096
1234
  },
1235
+ {
1236
+ "kind": "field",
1237
+ "name": "accessibleExpanded",
1238
+ "type": {
1239
+ "text": "\"true\" | \"false\" | undefined"
1240
+ },
1241
+ "privacy": "private",
1242
+ "attribute": "aria-expanded"
1243
+ },
1244
+ {
1245
+ "kind": "field",
1246
+ "name": "accessibleHasPopup",
1247
+ "type": {
1248
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1249
+ },
1250
+ "privacy": "private",
1251
+ "attribute": "aria-haspopup"
1252
+ },
1097
1253
  {
1098
1254
  "kind": "field",
1099
1255
  "name": "href",
@@ -1176,7 +1332,15 @@
1176
1332
  {
1177
1333
  "kind": "method",
1178
1334
  "name": "handleClick",
1179
- "privacy": "private"
1335
+ "privacy": "private",
1336
+ "parameters": [
1337
+ {
1338
+ "name": "e",
1339
+ "type": {
1340
+ "text": "Event"
1341
+ }
1342
+ }
1343
+ ]
1180
1344
  },
1181
1345
  {
1182
1346
  "kind": "field",
@@ -1275,20 +1439,6 @@
1275
1439
  "name": "FocusableMixin",
1276
1440
  "module": "src/common/mixins/FocusableMixin.ts"
1277
1441
  }
1278
- },
1279
- {
1280
- "kind": "field",
1281
- "name": "_warningLogged",
1282
- "type": {
1283
- "text": "boolean"
1284
- },
1285
- "privacy": "private",
1286
- "static": true,
1287
- "default": "false",
1288
- "inheritedFrom": {
1289
- "name": "DraftComponentMixin",
1290
- "module": "src/common/mixins/DraftComponentMixin.ts"
1291
- }
1292
1442
  }
1293
1443
  ],
1294
1444
  "attributes": [
@@ -1319,6 +1469,20 @@
1319
1469
  "description": "The size of the button.\nThis affects font-size and padding.",
1320
1470
  "fieldName": "size"
1321
1471
  },
1472
+ {
1473
+ "name": "aria-expanded",
1474
+ "type": {
1475
+ "text": "\"true\" | \"false\" | undefined"
1476
+ },
1477
+ "fieldName": "accessibleExpanded"
1478
+ },
1479
+ {
1480
+ "name": "aria-haspopup",
1481
+ "type": {
1482
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1483
+ },
1484
+ "fieldName": "accessibleHasPopup"
1485
+ },
1322
1486
  {
1323
1487
  "name": "href",
1324
1488
  "type": {
@@ -1401,17 +1565,13 @@
1401
1565
  {
1402
1566
  "name": "FocusableMixin",
1403
1567
  "module": "/src/common/mixins/FocusableMixin.js"
1404
- },
1405
- {
1406
- "name": "DraftComponentMixin",
1407
- "module": "/src/common/mixins/DraftComponentMixin.js"
1408
1568
  }
1409
1569
  ],
1410
1570
  "superclass": {
1411
1571
  "name": "LitElement",
1412
1572
  "package": "lit"
1413
1573
  },
1414
- "status": "draft",
1574
+ "status": "ready",
1415
1575
  "category": "action",
1416
1576
  "tagName": "nord-button",
1417
1577
  "customElement": true
@@ -1437,114 +1597,6 @@
1437
1597
  ],
1438
1598
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use 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"
1439
1599
  },
1440
- {
1441
- "kind": "javascript-module",
1442
- "path": "src/card/Card.ts",
1443
- "declarations": [
1444
- {
1445
- "kind": "class",
1446
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1447
- "name": "Card",
1448
- "slots": [
1449
- {
1450
- "description": "The card content.",
1451
- "name": ""
1452
- },
1453
- {
1454
- "description": "Optional slot that holds a header for the card.",
1455
- "name": "header"
1456
- },
1457
- {
1458
- "description": "Optional slot that holds footer content for the card.",
1459
- "name": "footer"
1460
- }
1461
- ],
1462
- "members": [
1463
- {
1464
- "kind": "field",
1465
- "name": "headerSlot",
1466
- "privacy": "private",
1467
- "default": "new SlotController(this, \"header\")"
1468
- },
1469
- {
1470
- "kind": "field",
1471
- "name": "footerSlot",
1472
- "privacy": "private",
1473
- "default": "new SlotController(this, \"footer\")"
1474
- },
1475
- {
1476
- "kind": "field",
1477
- "name": "padding",
1478
- "type": {
1479
- "text": "\"m\" | \"l\" | \"none\""
1480
- },
1481
- "default": "\"m\"",
1482
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1483
- "attribute": "padding",
1484
- "reflects": true
1485
- },
1486
- {
1487
- "kind": "field",
1488
- "name": "_warningLogged",
1489
- "type": {
1490
- "text": "boolean"
1491
- },
1492
- "privacy": "private",
1493
- "static": true,
1494
- "default": "false",
1495
- "inheritedFrom": {
1496
- "name": "DraftComponentMixin",
1497
- "module": "src/common/mixins/DraftComponentMixin.ts"
1498
- }
1499
- }
1500
- ],
1501
- "attributes": [
1502
- {
1503
- "name": "padding",
1504
- "type": {
1505
- "text": "\"m\" | \"l\" | \"none\""
1506
- },
1507
- "default": "\"m\"",
1508
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1509
- "fieldName": "padding"
1510
- }
1511
- ],
1512
- "mixins": [
1513
- {
1514
- "name": "DraftComponentMixin",
1515
- "module": "/src/common/mixins/DraftComponentMixin.js"
1516
- }
1517
- ],
1518
- "superclass": {
1519
- "name": "LitElement",
1520
- "package": "lit"
1521
- },
1522
- "status": "draft",
1523
- "category": "structure",
1524
- "tagName": "nord-card",
1525
- "customElement": true
1526
- }
1527
- ],
1528
- "exports": [
1529
- {
1530
- "kind": "js",
1531
- "name": "default",
1532
- "declaration": {
1533
- "name": "Card",
1534
- "module": "src/card/Card.ts"
1535
- }
1536
- },
1537
- {
1538
- "kind": "custom-element-definition",
1539
- "name": "nord-card",
1540
- "declaration": {
1541
- "name": "Card",
1542
- "module": "src/card/Card.ts"
1543
- }
1544
- }
1545
- ],
1546
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1547
- },
1548
1600
  {
1549
1601
  "kind": "javascript-module",
1550
1602
  "path": "src/checkbox/Checkbox.ts",
@@ -1952,20 +2004,6 @@
1952
2004
  "name": "FocusableMixin",
1953
2005
  "module": "src/common/mixins/FocusableMixin.ts"
1954
2006
  }
1955
- },
1956
- {
1957
- "kind": "field",
1958
- "name": "_warningLogged",
1959
- "type": {
1960
- "text": "boolean"
1961
- },
1962
- "privacy": "private",
1963
- "static": true,
1964
- "default": "false",
1965
- "inheritedFrom": {
1966
- "name": "DraftComponentMixin",
1967
- "module": "src/common/mixins/DraftComponentMixin.ts"
1968
- }
1969
2007
  }
1970
2008
  ],
1971
2009
  "attributes": [
@@ -2117,17 +2155,13 @@
2117
2155
  {
2118
2156
  "name": "FocusableMixin",
2119
2157
  "module": "/src/common/mixins/FocusableMixin.js"
2120
- },
2121
- {
2122
- "name": "DraftComponentMixin",
2123
- "module": "/src/common/mixins/DraftComponentMixin.js"
2124
2158
  }
2125
2159
  ],
2126
2160
  "superclass": {
2127
2161
  "name": "LitElement",
2128
2162
  "package": "lit"
2129
2163
  },
2130
- "status": "draft",
2164
+ "status": "ready",
2131
2165
  "category": "form",
2132
2166
  "tagName": "nord-checkbox",
2133
2167
  "customElement": true,
@@ -2210,6 +2244,12 @@
2210
2244
  },
2211
2245
  "privacy": "private"
2212
2246
  },
2247
+ {
2248
+ "kind": "field",
2249
+ "name": "localize",
2250
+ "privacy": "private",
2251
+ "default": "new LocalizeController<\"nord-command-menu\">(this)"
2252
+ },
2213
2253
  {
2214
2254
  "kind": "field",
2215
2255
  "name": "dismissController",
@@ -2450,20 +2490,6 @@
2450
2490
  "kind": "method",
2451
2491
  "name": "filterCommands",
2452
2492
  "privacy": "private"
2453
- },
2454
- {
2455
- "kind": "field",
2456
- "name": "_warningLogged",
2457
- "type": {
2458
- "text": "boolean"
2459
- },
2460
- "privacy": "private",
2461
- "static": true,
2462
- "default": "false",
2463
- "inheritedFrom": {
2464
- "name": "DraftComponentMixin",
2465
- "module": "src/common/mixins/DraftComponentMixin.ts"
2466
- }
2467
2493
  }
2468
2494
  ],
2469
2495
  "events": [
@@ -2509,17 +2535,11 @@
2509
2535
  "fieldName": "placeholder"
2510
2536
  }
2511
2537
  ],
2512
- "mixins": [
2513
- {
2514
- "name": "DraftComponentMixin",
2515
- "module": "/src/common/mixins/DraftComponentMixin.js"
2516
- }
2517
- ],
2518
2538
  "superclass": {
2519
2539
  "name": "LitElement",
2520
2540
  "package": "lit"
2521
2541
  },
2522
- "status": "draft",
2542
+ "status": "ready",
2523
2543
  "category": "action",
2524
2544
  "tagName": "nord-command-menu",
2525
2545
  "customElement": true
@@ -2554,6 +2574,12 @@
2554
2574
  "description": "Command Menu Action displays a single action that can be executed by the user. For usage examples, please see Command Menu component.",
2555
2575
  "name": "CommandMenuAction",
2556
2576
  "members": [
2577
+ {
2578
+ "kind": "field",
2579
+ "name": "direction",
2580
+ "privacy": "private",
2581
+ "default": "new DirectionController(this)"
2582
+ },
2557
2583
  {
2558
2584
  "kind": "field",
2559
2585
  "name": "command",
@@ -2577,6 +2603,11 @@
2577
2603
  "privacy": "private",
2578
2604
  "description": "Scroll to show element"
2579
2605
  },
2606
+ {
2607
+ "kind": "method",
2608
+ "name": "getIconName",
2609
+ "privacy": "private"
2610
+ },
2580
2611
  {
2581
2612
  "kind": "method",
2582
2613
  "name": "renderShortcut",
@@ -2746,6 +2777,31 @@
2746
2777
  ],
2747
2778
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&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"
2748
2779
  },
2780
+ {
2781
+ "kind": "javascript-module",
2782
+ "path": "src/command-menu/localization.ts",
2783
+ "declarations": [
2784
+ {
2785
+ "kind": "variable",
2786
+ "name": "commandMenuLocalization",
2787
+ "type": {
2788
+ "text": "object"
2789
+ },
2790
+ "default": "{\n instructions: \"Press 'Enter' to confirm your input or 'Escape' to cancel\",\n inputLabel: \"Type the name of a command to run.\",\n footerArrowKeys: \"Navigate\",\n footerEnterKey: \"Select\",\n footerEscapeKey: \"Esc to dismiss\",\n footerBackspaceKey: \"Move to parent\",\n noResults: (searchTerm: string) => `No results for “${searchTerm}”`,\n tip: \"Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.\",\n}"
2791
+ }
2792
+ ],
2793
+ "exports": [
2794
+ {
2795
+ "kind": "js",
2796
+ "name": "default",
2797
+ "declaration": {
2798
+ "name": "commandMenuLocalization",
2799
+ "module": "src/command-menu/localization.ts"
2800
+ }
2801
+ }
2802
+ ],
2803
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&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"
2804
+ },
2749
2805
  {
2750
2806
  "kind": "javascript-module",
2751
2807
  "path": "src/common/attribute.ts",
@@ -2898,7 +2954,7 @@
2898
2954
  {
2899
2955
  "name": "mapFn",
2900
2956
  "type": {
2901
- "text": "(item: T) => U"
2957
+ "text": "(item: T, i: number) => U"
2902
2958
  }
2903
2959
  }
2904
2960
  ],
@@ -3003,12 +3059,48 @@
3003
3059
  },
3004
3060
  {
3005
3061
  "kind": "function",
3006
- "name": "isEqualMonth",
3007
- "return": {
3008
- "type": {
3009
- "text": "boolean"
3010
- }
3011
- },
3062
+ "name": "getDayNames",
3063
+ "parameters": [
3064
+ {
3065
+ "name": "locale",
3066
+ "type": {
3067
+ "text": "string"
3068
+ }
3069
+ },
3070
+ {
3071
+ "name": "weekday",
3072
+ "type": {
3073
+ "text": "Exclude<Intl.DateTimeFormatOptions[\"weekday\"], undefined>"
3074
+ }
3075
+ }
3076
+ ]
3077
+ },
3078
+ {
3079
+ "kind": "function",
3080
+ "name": "getMonthNames",
3081
+ "parameters": [
3082
+ {
3083
+ "name": "locale",
3084
+ "type": {
3085
+ "text": "string"
3086
+ }
3087
+ },
3088
+ {
3089
+ "name": "month",
3090
+ "type": {
3091
+ "text": "Exclude<Intl.DateTimeFormatOptions[\"month\"], undefined>"
3092
+ }
3093
+ }
3094
+ ]
3095
+ },
3096
+ {
3097
+ "kind": "function",
3098
+ "name": "isEqualMonth",
3099
+ "return": {
3100
+ "type": {
3101
+ "text": "boolean"
3102
+ }
3103
+ },
3012
3104
  "parameters": [
3013
3105
  {
3014
3106
  "name": "a",
@@ -3365,6 +3457,22 @@
3365
3457
  "module": "src/common/dates.ts"
3366
3458
  }
3367
3459
  },
3460
+ {
3461
+ "kind": "js",
3462
+ "name": "getDayNames",
3463
+ "declaration": {
3464
+ "name": "getDayNames",
3465
+ "module": "src/common/dates.ts"
3466
+ }
3467
+ },
3468
+ {
3469
+ "kind": "js",
3470
+ "name": "getMonthNames",
3471
+ "declaration": {
3472
+ "name": "getMonthNames",
3473
+ "module": "src/common/dates.ts"
3474
+ }
3475
+ },
3368
3476
  {
3369
3477
  "kind": "js",
3370
3478
  "name": "isEqualMonth",
@@ -3709,6 +3817,112 @@
3709
3817
  }
3710
3818
  ]
3711
3819
  },
3820
+ {
3821
+ "kind": "javascript-module",
3822
+ "path": "src/common/positioning.ts",
3823
+ "declarations": [
3824
+ {
3825
+ "kind": "function",
3826
+ "name": "logicalToPhysical",
3827
+ "return": {
3828
+ "type": {
3829
+ "text": "Side"
3830
+ }
3831
+ },
3832
+ "parameters": [
3833
+ {
3834
+ "name": "logicalSide",
3835
+ "type": {
3836
+ "text": "LogicalSide"
3837
+ }
3838
+ }
3839
+ ],
3840
+ "description": "Converts a single logical position to a physical position"
3841
+ },
3842
+ {
3843
+ "kind": "function",
3844
+ "name": "logicalToPhysical",
3845
+ "return": {
3846
+ "type": {
3847
+ "text": "Placement"
3848
+ }
3849
+ },
3850
+ "parameters": [
3851
+ {
3852
+ "name": "logicalSide",
3853
+ "type": {
3854
+ "text": "LogicalSide"
3855
+ }
3856
+ },
3857
+ {
3858
+ "name": "alignment",
3859
+ "type": {
3860
+ "text": "Alignment"
3861
+ }
3862
+ },
3863
+ {
3864
+ "name": "dir",
3865
+ "type": {
3866
+ "text": "Direction"
3867
+ }
3868
+ }
3869
+ ],
3870
+ "description": "Converts a logical side and alignment to floating-ui compatible placement"
3871
+ },
3872
+ {
3873
+ "kind": "function",
3874
+ "name": "logicalToPhysical",
3875
+ "parameters": [
3876
+ {
3877
+ "name": "logicalSide",
3878
+ "type": {
3879
+ "text": "LogicalSide"
3880
+ }
3881
+ },
3882
+ {
3883
+ "name": "alignment",
3884
+ "optional": true,
3885
+ "type": {
3886
+ "text": "Alignment"
3887
+ }
3888
+ },
3889
+ {
3890
+ "name": "dir",
3891
+ "optional": true,
3892
+ "type": {
3893
+ "text": "Direction"
3894
+ }
3895
+ }
3896
+ ]
3897
+ }
3898
+ ],
3899
+ "exports": [
3900
+ {
3901
+ "kind": "js",
3902
+ "name": "logicalToPhysical",
3903
+ "declaration": {
3904
+ "name": "logicalToPhysical",
3905
+ "module": "src/common/positioning.ts"
3906
+ }
3907
+ },
3908
+ {
3909
+ "kind": "js",
3910
+ "name": "logicalToPhysical",
3911
+ "declaration": {
3912
+ "name": "logicalToPhysical",
3913
+ "module": "src/common/positioning.ts"
3914
+ }
3915
+ },
3916
+ {
3917
+ "kind": "js",
3918
+ "name": "logicalToPhysical",
3919
+ "declaration": {
3920
+ "name": "logicalToPhysical",
3921
+ "module": "src/common/positioning.ts"
3922
+ }
3923
+ }
3924
+ ]
3925
+ },
3712
3926
  {
3713
3927
  "kind": "javascript-module",
3714
3928
  "path": "src/common/ref.ts",
@@ -3796,6 +4010,12 @@
3796
4010
  "privacy": "private",
3797
4011
  "default": "new SwipeController(this, {\n target: () => this.dialog,\n matchesGesture: isDownwardsSwipe,\n onSwipeEnd: () => this.hide(false),\n })"
3798
4012
  },
4013
+ {
4014
+ "kind": "field",
4015
+ "name": "localize",
4016
+ "privacy": "private",
4017
+ "default": "new LocalizeController<\"nord-date-picker\">(this, {\n onLangChange: () => this.createDateFormatters(),\n })"
4018
+ },
3799
4019
  {
3800
4020
  "kind": "field",
3801
4021
  "name": "dateFormatLong",
@@ -3883,15 +4103,6 @@
3883
4103
  "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
3884
4104
  "attribute": "first-day-of-week"
3885
4105
  },
3886
- {
3887
- "kind": "field",
3888
- "name": "localization",
3889
- "type": {
3890
- "text": "DatePickerLocalizedText"
3891
- },
3892
- "default": "localization",
3893
- "description": "Button labels, day names, month names, etc, used for localization.\nDefault is English."
3894
- },
3895
4106
  {
3896
4107
  "kind": "field",
3897
4108
  "name": "dateAdapter",
@@ -3921,10 +4132,14 @@
3921
4132
  "parameters": [
3922
4133
  {
3923
4134
  "name": "moveFocusToButton",
3924
- "default": "true"
4135
+ "default": "true",
4136
+ "description": "controls whether focus should be returned to the date picker's button.",
4137
+ "type": {
4138
+ "text": "boolean"
4139
+ }
3925
4140
  }
3926
4141
  ],
3927
- "description": "Hide the calendar modal. Set `moveFocusToButton` to false to prevent focus\nreturning to the date picker's button. Default is true."
4142
+ "description": "Hide the calendar modal."
3928
4143
  },
3929
4144
  {
3930
4145
  "kind": "method",
@@ -4335,20 +4550,6 @@
4335
4550
  "name": "FocusableMixin",
4336
4551
  "module": "src/common/mixins/FocusableMixin.ts"
4337
4552
  }
4338
- },
4339
- {
4340
- "kind": "field",
4341
- "name": "_warningLogged",
4342
- "type": {
4343
- "text": "boolean"
4344
- },
4345
- "privacy": "private",
4346
- "static": true,
4347
- "default": "false",
4348
- "inheritedFrom": {
4349
- "name": "DraftComponentMixin",
4350
- "module": "src/common/mixins/DraftComponentMixin.ts"
4351
- }
4352
4553
  }
4353
4554
  ],
4354
4555
  "events": [
@@ -4564,17 +4765,13 @@
4564
4765
  {
4565
4766
  "name": "FocusableMixin",
4566
4767
  "module": "/src/common/mixins/FocusableMixin.js"
4567
- },
4568
- {
4569
- "name": "DraftComponentMixin",
4570
- "module": "/src/common/mixins/DraftComponentMixin.js"
4571
4768
  }
4572
4769
  ],
4573
4770
  "superclass": {
4574
4771
  "name": "LitElement",
4575
4772
  "package": "lit"
4576
4773
  },
4577
- "status": "draft",
4774
+ "status": "ready",
4578
4775
  "category": "form",
4579
4776
  "tagName": "nord-date-picker",
4580
4777
  "customElement": true
@@ -4627,15 +4824,15 @@
4627
4824
  },
4628
4825
  {
4629
4826
  "kind": "javascript-module",
4630
- "path": "src/date-picker/date-localization.ts",
4827
+ "path": "src/date-picker/localization.ts",
4631
4828
  "declarations": [
4632
4829
  {
4633
4830
  "kind": "variable",
4634
- "name": "localization",
4831
+ "name": "datePickerLocalization",
4635
4832
  "type": {
4636
- "text": "DatePickerLocalizedText"
4833
+ "text": "object"
4637
4834
  },
4638
- "default": "{\n ...calendarLocalization,\n closeLabel: \"Close window\",\n buttonLabel: \"Choose date\",\n selectedDateMessage: \"Selected date is\",\n}"
4835
+ "default": "{\n modalHeading: \"Choose a date\",\n closeLabel: \"Close window\",\n buttonLabel: \"Choose date\",\n selectedDateMessage: \"Selected date is\",\n}"
4639
4836
  }
4640
4837
  ],
4641
4838
  "exports": [
@@ -4643,8 +4840,8 @@
4643
4840
  "kind": "js",
4644
4841
  "name": "default",
4645
4842
  "declaration": {
4646
- "name": "localization",
4647
- "module": "src/date-picker/date-localization.ts"
4843
+ "name": "datePickerLocalization",
4844
+ "module": "src/date-picker/localization.ts"
4648
4845
  }
4649
4846
  }
4650
4847
  ],
@@ -4652,19 +4849,89 @@
4652
4849
  },
4653
4850
  {
4654
4851
  "kind": "javascript-module",
4655
- "path": "src/empty-state/EmptyState.ts",
4852
+ "path": "src/dropdown/Dropdown.ts",
4656
4853
  "declarations": [
4657
4854
  {
4658
4855
  "kind": "class",
4659
- "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
4660
- "name": "EmptyState",
4856
+ "description": "Dropdown menu displays a list of actions or selectable options for\na user. Dropdown uses popout component internally to create\nthe overlay functionality.",
4857
+ "name": "Dropdown",
4661
4858
  "slots": [
4662
4859
  {
4663
- "description": "default slot",
4860
+ "description": "The dropdown content.",
4664
4861
  "name": ""
4862
+ },
4863
+ {
4864
+ "description": "Used to place the toggle for dropdown.",
4865
+ "name": "toggle"
4665
4866
  }
4666
4867
  ],
4667
4868
  "members": [
4869
+ {
4870
+ "kind": "field",
4871
+ "name": "shadowRootOptions",
4872
+ "type": {
4873
+ "text": "object"
4874
+ },
4875
+ "static": true,
4876
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }"
4877
+ },
4878
+ {
4879
+ "kind": "field",
4880
+ "name": "popout",
4881
+ "type": {
4882
+ "text": "Popout"
4883
+ },
4884
+ "privacy": "private"
4885
+ },
4886
+ {
4887
+ "kind": "field",
4888
+ "name": "align",
4889
+ "type": {
4890
+ "text": "Popout[\"align\"] | undefined"
4891
+ },
4892
+ "description": "Set the alignment of the dropdown in relation to the toggle depending on the position.\n`start` will align the left of the dropdown to the left of the toggle.\n`end` will align the right of the dropdown to the right of the toggle.\nA dropdown with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the dropdown respectively.",
4893
+ "attribute": "align",
4894
+ "reflects": true
4895
+ },
4896
+ {
4897
+ "kind": "field",
4898
+ "name": "position",
4899
+ "type": {
4900
+ "text": "Popout[\"position\"] | undefined"
4901
+ },
4902
+ "description": "Set the position of the dropdown in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
4903
+ "attribute": "position",
4904
+ "reflects": true
4905
+ },
4906
+ {
4907
+ "kind": "field",
4908
+ "name": "expand",
4909
+ "type": {
4910
+ "text": "boolean"
4911
+ },
4912
+ "default": "false",
4913
+ "description": "Controls whether the toggle slot expands to fill the width of its container.",
4914
+ "attribute": "expand",
4915
+ "reflects": true
4916
+ },
4917
+ {
4918
+ "kind": "method",
4919
+ "name": "handleBlur",
4920
+ "privacy": "private",
4921
+ "parameters": [
4922
+ {
4923
+ "name": "e",
4924
+ "type": {
4925
+ "text": "FocusEvent"
4926
+ }
4927
+ }
4928
+ ]
4929
+ },
4930
+ {
4931
+ "kind": "method",
4932
+ "name": "handleOpen",
4933
+ "privacy": "private"
4934
+ },
4668
4935
  {
4669
4936
  "kind": "field",
4670
4937
  "name": "_warningLogged",
@@ -4680,6 +4947,33 @@
4680
4947
  }
4681
4948
  }
4682
4949
  ],
4950
+ "attributes": [
4951
+ {
4952
+ "name": "align",
4953
+ "type": {
4954
+ "text": "Popout[\"align\"] | undefined"
4955
+ },
4956
+ "description": "Set the alignment of the dropdown in relation to the toggle depending on the position.\n`start` will align the left of the dropdown to the left of the toggle.\n`end` will align the right of the dropdown to the right of the toggle.\nA dropdown with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the dropdown respectively.",
4957
+ "fieldName": "align"
4958
+ },
4959
+ {
4960
+ "name": "position",
4961
+ "type": {
4962
+ "text": "Popout[\"position\"] | undefined"
4963
+ },
4964
+ "description": "Set the position of the dropdown in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
4965
+ "fieldName": "position"
4966
+ },
4967
+ {
4968
+ "name": "expand",
4969
+ "type": {
4970
+ "text": "boolean"
4971
+ },
4972
+ "default": "false",
4973
+ "description": "Controls whether the toggle slot expands to fill the width of its container.",
4974
+ "fieldName": "expand"
4975
+ }
4976
+ ],
4683
4977
  "mixins": [
4684
4978
  {
4685
4979
  "name": "DraftComponentMixin",
@@ -4691,8 +4985,8 @@
4691
4985
  "package": "lit"
4692
4986
  },
4693
4987
  "status": "draft",
4694
- "category": "feedback",
4695
- "tagName": "nord-empty-state",
4988
+ "category": "action",
4989
+ "tagName": "nord-dropdown",
4696
4990
  "customElement": true
4697
4991
  }
4698
4992
  ],
@@ -4701,93 +4995,44 @@
4701
4995
  "kind": "js",
4702
4996
  "name": "default",
4703
4997
  "declaration": {
4704
- "name": "EmptyState",
4705
- "module": "src/empty-state/EmptyState.ts"
4998
+ "name": "Dropdown",
4999
+ "module": "src/dropdown/Dropdown.ts"
4706
5000
  }
4707
5001
  },
4708
5002
  {
4709
5003
  "kind": "custom-element-definition",
4710
- "name": "nord-empty-state",
5004
+ "name": "nord-dropdown",
4711
5005
  "declaration": {
4712
- "name": "EmptyState",
4713
- "module": "src/empty-state/EmptyState.ts"
5006
+ "name": "Dropdown",
5007
+ "module": "src/dropdown/Dropdown.ts"
4714
5008
  }
4715
5009
  }
4716
5010
  ],
4717
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
5011
+ "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- Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or commands, where an action is initiated based on the selection.\n- When organizing dropdown menu items, sort the list in a logical order by putting the most selected option at the top.\n- Use for a “more” menu, where the control contains an icon.\n- Use for user profiles, where the control is an avatar.\n- Use in conjunction with the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding primary actions since they should be visible by default.\n- Don’t use for selecting an option from a list of options, use the [select component](/components/select/) instead.\n- Don’t nest elements or components other than the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components. Consider using the [popout component](/components/popout/) when creating custom UI.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, 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 dropdown items 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\nAvoud all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n"
4718
5012
  },
4719
5013
  {
4720
5014
  "kind": "javascript-module",
4721
- "path": "src/fieldset/Fieldset.ts",
5015
+ "path": "src/dropdown-group/DropdownGroup.ts",
4722
5016
  "declarations": [
4723
5017
  {
4724
5018
  "kind": "class",
4725
- "description": "Fieldset is used for grouping sets of input components.\nIt is necessary to use a fieldset with radio and checkbox components.\nIt can also be useful for logically grouping other types of inputs.",
4726
- "name": "Fieldset",
5019
+ "description": "Dropdown group includes all the actions or items in a single dropdown\ngroup and is used for grouping items into related categories.",
5020
+ "name": "DropdownGroup",
4727
5021
  "slots": [
4728
5022
  {
4729
- "description": "Use when a label requires more than plain text.",
4730
- "name": "label"
4731
- },
4732
- {
4733
- "description": "Optional slot that holds hint text for the fieldset.",
4734
- "name": "hint"
4735
- },
4736
- {
4737
- "description": "Optional slot that holds error text for the fieldset.",
4738
- "name": "error"
5023
+ "description": "The dropdown group content.",
5024
+ "name": ""
4739
5025
  }
4740
5026
  ],
4741
5027
  "members": [
4742
5028
  {
4743
5029
  "kind": "field",
4744
- "name": "errorSlot",
4745
- "privacy": "private",
4746
- "default": "new SlotController(this, \"error\")"
4747
- },
4748
- {
4749
- "kind": "field",
4750
- "name": "hintSlot",
4751
- "privacy": "private",
4752
- "default": "new SlotController(this, \"hint\")"
4753
- },
4754
- {
4755
- "kind": "field",
4756
- "name": "label",
4757
- "type": {
4758
- "text": "string"
4759
- },
4760
- "default": "\"\"",
4761
- "description": "Label for the fieldset.",
4762
- "attribute": "label"
4763
- },
4764
- {
4765
- "kind": "field",
4766
- "name": "hint",
4767
- "type": {
4768
- "text": "string | undefined"
4769
- },
4770
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
4771
- "attribute": "hint"
4772
- },
4773
- {
4774
- "kind": "field",
4775
- "name": "error",
5030
+ "name": "heading",
4776
5031
  "type": {
4777
5032
  "text": "string | undefined"
4778
5033
  },
4779
- "description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
4780
- "attribute": "error"
4781
- },
4782
- {
4783
- "kind": "field",
4784
- "name": "hasHint",
4785
- "privacy": "protected"
4786
- },
4787
- {
4788
- "kind": "field",
4789
- "name": "hasError",
4790
- "privacy": "protected"
5034
+ "description": "Heading and accessible label for the dropdown group.",
5035
+ "attribute": "heading"
4791
5036
  },
4792
5037
  {
4793
5038
  "kind": "field",
@@ -4806,29 +5051,12 @@
4806
5051
  ],
4807
5052
  "attributes": [
4808
5053
  {
4809
- "name": "label",
4810
- "type": {
4811
- "text": "string"
4812
- },
4813
- "default": "\"\"",
4814
- "description": "Label for the fieldset.",
4815
- "fieldName": "label"
4816
- },
4817
- {
4818
- "name": "hint",
4819
- "type": {
4820
- "text": "string | undefined"
4821
- },
4822
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
4823
- "fieldName": "hint"
4824
- },
4825
- {
4826
- "name": "error",
5054
+ "name": "heading",
4827
5055
  "type": {
4828
5056
  "text": "string | undefined"
4829
5057
  },
4830
- "description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
4831
- "fieldName": "error"
5058
+ "description": "Heading and accessible label for the dropdown group.",
5059
+ "fieldName": "heading"
4832
5060
  }
4833
5061
  ],
4834
5062
  "mixins": [
@@ -4842,8 +5070,8 @@
4842
5070
  "package": "lit"
4843
5071
  },
4844
5072
  "status": "draft",
4845
- "category": "form",
4846
- "tagName": "nord-fieldset",
5073
+ "category": "action",
5074
+ "tagName": "nord-dropdown-group",
4847
5075
  "customElement": true
4848
5076
  }
4849
5077
  ],
@@ -4852,45 +5080,99 @@
4852
5080
  "kind": "js",
4853
5081
  "name": "default",
4854
5082
  "declaration": {
4855
- "name": "Fieldset",
4856
- "module": "src/fieldset/Fieldset.ts"
5083
+ "name": "DropdownGroup",
5084
+ "module": "src/dropdown-group/DropdownGroup.ts"
4857
5085
  }
4858
5086
  },
4859
5087
  {
4860
5088
  "kind": "custom-element-definition",
4861
- "name": "nord-fieldset",
5089
+ "name": "nord-dropdown-group",
4862
5090
  "declaration": {
4863
- "name": "Fieldset",
4864
- "module": "src/fieldset/Fieldset.ts"
5091
+ "name": "DropdownGroup",
5092
+ "module": "src/dropdown-group/DropdownGroup.ts"
4865
5093
  }
4866
5094
  }
4867
5095
  ],
4868
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
5096
+ "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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, 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 dropdown items 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\nAvoud all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n"
4869
5097
  },
4870
5098
  {
4871
5099
  "kind": "javascript-module",
4872
- "path": "src/header/Header.ts",
5100
+ "path": "src/dropdown-item/DropdownItem.ts",
4873
5101
  "declarations": [
4874
5102
  {
4875
5103
  "kind": "class",
4876
- "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4877
- "name": "Header",
5104
+ "description": "Dropdown item populates dropdown with actions. Items can be\nplaced either inside a dropdown group or directly inside a\ndropdown component.",
5105
+ "name": "DropdownItem",
4878
5106
  "slots": [
4879
5107
  {
4880
- "description": "The header content.",
5108
+ "description": "The dropdown item content.",
4881
5109
  "name": ""
4882
5110
  },
4883
5111
  {
4884
- "description": "Optional slot for buttons, toggles, etc.",
4885
- "name": "action"
5112
+ "description": "Used to place content before dropdown item text. Typically used for icons.",
5113
+ "name": "start"
5114
+ },
5115
+ {
5116
+ "description": "Used to place content after dropdown item text. Typically used for icons.",
5117
+ "name": "end"
4886
5118
  }
4887
5119
  ],
4888
5120
  "members": [
4889
5121
  {
4890
5122
  "kind": "field",
4891
- "name": "actionSlot",
4892
- "privacy": "private",
4893
- "default": "new SlotController(this, \"action\")"
5123
+ "name": "href",
5124
+ "type": {
5125
+ "text": "string | undefined"
5126
+ },
5127
+ "description": "The url the dropdown item should link to.",
5128
+ "attribute": "href",
5129
+ "reflects": true
5130
+ },
5131
+ {
5132
+ "kind": "field",
5133
+ "name": "focusableRef",
5134
+ "privacy": "protected",
5135
+ "inheritedFrom": {
5136
+ "name": "FocusableMixin",
5137
+ "module": "src/common/mixins/FocusableMixin.ts"
5138
+ }
5139
+ },
5140
+ {
5141
+ "kind": "method",
5142
+ "name": "focus",
5143
+ "parameters": [
5144
+ {
5145
+ "name": "options",
5146
+ "optional": true,
5147
+ "type": {
5148
+ "text": "FocusOptions"
5149
+ },
5150
+ "description": "An object which controls aspects of the focusing process."
5151
+ }
5152
+ ],
5153
+ "description": "Programmatically move focus to the component.",
5154
+ "inheritedFrom": {
5155
+ "name": "FocusableMixin",
5156
+ "module": "src/common/mixins/FocusableMixin.ts"
5157
+ }
5158
+ },
5159
+ {
5160
+ "kind": "method",
5161
+ "name": "blur",
5162
+ "description": "Programmatically remove focus from the component.",
5163
+ "inheritedFrom": {
5164
+ "name": "FocusableMixin",
5165
+ "module": "src/common/mixins/FocusableMixin.ts"
5166
+ }
5167
+ },
5168
+ {
5169
+ "kind": "method",
5170
+ "name": "click",
5171
+ "description": "Programmatically simulates a click on the component.",
5172
+ "inheritedFrom": {
5173
+ "name": "FocusableMixin",
5174
+ "module": "src/common/mixins/FocusableMixin.ts"
5175
+ }
4894
5176
  },
4895
5177
  {
4896
5178
  "kind": "field",
@@ -4907,7 +5189,21 @@
4907
5189
  }
4908
5190
  }
4909
5191
  ],
5192
+ "attributes": [
5193
+ {
5194
+ "name": "href",
5195
+ "type": {
5196
+ "text": "string | undefined"
5197
+ },
5198
+ "description": "The url the dropdown item should link to.",
5199
+ "fieldName": "href"
5200
+ }
5201
+ ],
4910
5202
  "mixins": [
5203
+ {
5204
+ "name": "FocusableMixin",
5205
+ "module": "/src/common/mixins/FocusableMixin.js"
5206
+ },
4911
5207
  {
4912
5208
  "name": "DraftComponentMixin",
4913
5209
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -4918,8 +5214,8 @@
4918
5214
  "package": "lit"
4919
5215
  },
4920
5216
  "status": "draft",
4921
- "category": "structure",
4922
- "tagName": "nord-header",
5217
+ "category": "action",
5218
+ "tagName": "nord-dropdown-item",
4923
5219
  "customElement": true
4924
5220
  }
4925
5221
  ],
@@ -4928,67 +5224,325 @@
4928
5224
  "kind": "js",
4929
5225
  "name": "default",
4930
5226
  "declaration": {
4931
- "name": "Header",
4932
- "module": "src/header/Header.ts"
5227
+ "name": "DropdownItem",
5228
+ "module": "src/dropdown-item/DropdownItem.ts"
4933
5229
  }
4934
5230
  },
4935
5231
  {
4936
5232
  "kind": "custom-element-definition",
4937
- "name": "nord-header",
5233
+ "name": "nord-dropdown-item",
4938
5234
  "declaration": {
4939
- "name": "Header",
4940
- "module": "src/header/Header.ts"
5235
+ "name": "DropdownItem",
5236
+ "module": "src/dropdown-item/DropdownItem.ts"
4941
5237
  }
4942
5238
  }
4943
5239
  ],
4944
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
5240
+ "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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use dropdown item outside of dropdown group and dropdown components.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, 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 dropdown items 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\nAvoud all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n"
4945
5241
  },
4946
5242
  {
4947
5243
  "kind": "javascript-module",
4948
- "path": "src/icon/Icon.ts",
5244
+ "path": "src/empty-state/EmptyState.ts",
4949
5245
  "declarations": [
4950
5246
  {
4951
5247
  "kind": "class",
4952
- "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
4953
- "name": "Icon",
5248
+ "description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
5249
+ "name": "EmptyState",
5250
+ "slots": [
5251
+ {
5252
+ "description": "default slot",
5253
+ "name": ""
5254
+ }
5255
+ ],
5256
+ "members": [],
5257
+ "superclass": {
5258
+ "name": "LitElement",
5259
+ "package": "lit"
5260
+ },
5261
+ "status": "new",
5262
+ "category": "feedback",
5263
+ "tagName": "nord-empty-state",
5264
+ "customElement": true
5265
+ }
5266
+ ],
5267
+ "exports": [
5268
+ {
5269
+ "kind": "js",
5270
+ "name": "default",
5271
+ "declaration": {
5272
+ "name": "EmptyState",
5273
+ "module": "src/empty-state/EmptyState.ts"
5274
+ }
5275
+ },
5276
+ {
5277
+ "kind": "custom-element-definition",
5278
+ "name": "nord-empty-state",
5279
+ "declaration": {
5280
+ "name": "EmptyState",
5281
+ "module": "src/empty-state/EmptyState.ts"
5282
+ }
5283
+ }
5284
+ ],
5285
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n"
5286
+ },
5287
+ {
5288
+ "kind": "javascript-module",
5289
+ "path": "src/fieldset/Fieldset.ts",
5290
+ "declarations": [
5291
+ {
5292
+ "kind": "class",
5293
+ "description": "Fieldset is used for grouping sets of input components.\nIt is necessary to use a fieldset with radio and checkbox components.\nIt can also be useful for logically grouping other types of inputs.",
5294
+ "name": "Fieldset",
5295
+ "slots": [
5296
+ {
5297
+ "description": "Use when a label requires more than plain text.",
5298
+ "name": "label"
5299
+ },
5300
+ {
5301
+ "description": "Optional slot that holds hint text for the fieldset.",
5302
+ "name": "hint"
5303
+ },
5304
+ {
5305
+ "description": "Optional slot that holds error text for the fieldset.",
5306
+ "name": "error"
5307
+ }
5308
+ ],
4954
5309
  "members": [
4955
5310
  {
4956
5311
  "kind": "field",
4957
- "name": "resolver",
4958
- "type": {
4959
- "text": "IconResolver"
4960
- },
5312
+ "name": "errorSlot",
4961
5313
  "privacy": "private",
4962
- "static": true
5314
+ "default": "new SlotController(this, \"error\")"
4963
5315
  },
4964
5316
  {
4965
5317
  "kind": "field",
4966
- "name": "registeredIcons",
5318
+ "name": "hintSlot",
4967
5319
  "privacy": "private",
4968
- "static": true,
4969
- "default": "new Map<string, string>()"
4970
- },
4971
- {
4972
- "kind": "method",
4973
- "name": "registerResolver",
4974
- "static": true,
4975
- "parameters": [
4976
- {
4977
- "name": "resolver",
4978
- "type": {
4979
- "text": "IconResolver"
4980
- },
4981
- "description": "The resolver function to register."
4982
- }
4983
- ],
4984
- "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
5320
+ "default": "new SlotController(this, \"hint\")"
4985
5321
  },
4986
5322
  {
4987
- "kind": "method",
4988
- "name": "registerIcon",
4989
- "static": true,
4990
- "return": {
4991
- "type": {
5323
+ "kind": "field",
5324
+ "name": "label",
5325
+ "type": {
5326
+ "text": "string"
5327
+ },
5328
+ "default": "\"\"",
5329
+ "description": "Label for the fieldset.",
5330
+ "attribute": "label"
5331
+ },
5332
+ {
5333
+ "kind": "field",
5334
+ "name": "hint",
5335
+ "type": {
5336
+ "text": "string | undefined"
5337
+ },
5338
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
5339
+ "attribute": "hint"
5340
+ },
5341
+ {
5342
+ "kind": "field",
5343
+ "name": "error",
5344
+ "type": {
5345
+ "text": "string | undefined"
5346
+ },
5347
+ "description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
5348
+ "attribute": "error"
5349
+ },
5350
+ {
5351
+ "kind": "field",
5352
+ "name": "hasHint",
5353
+ "privacy": "protected"
5354
+ },
5355
+ {
5356
+ "kind": "field",
5357
+ "name": "hasError",
5358
+ "privacy": "protected"
5359
+ }
5360
+ ],
5361
+ "attributes": [
5362
+ {
5363
+ "name": "label",
5364
+ "type": {
5365
+ "text": "string"
5366
+ },
5367
+ "default": "\"\"",
5368
+ "description": "Label for the fieldset.",
5369
+ "fieldName": "label"
5370
+ },
5371
+ {
5372
+ "name": "hint",
5373
+ "type": {
5374
+ "text": "string | undefined"
5375
+ },
5376
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
5377
+ "fieldName": "hint"
5378
+ },
5379
+ {
5380
+ "name": "error",
5381
+ "type": {
5382
+ "text": "string | undefined"
5383
+ },
5384
+ "description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
5385
+ "fieldName": "error"
5386
+ }
5387
+ ],
5388
+ "superclass": {
5389
+ "name": "LitElement",
5390
+ "package": "lit"
5391
+ },
5392
+ "status": "ready",
5393
+ "category": "form",
5394
+ "tagName": "nord-fieldset",
5395
+ "customElement": true
5396
+ }
5397
+ ],
5398
+ "exports": [
5399
+ {
5400
+ "kind": "js",
5401
+ "name": "default",
5402
+ "declaration": {
5403
+ "name": "Fieldset",
5404
+ "module": "src/fieldset/Fieldset.ts"
5405
+ }
5406
+ },
5407
+ {
5408
+ "kind": "custom-element-definition",
5409
+ "name": "nord-fieldset",
5410
+ "declaration": {
5411
+ "name": "Fieldset",
5412
+ "module": "src/fieldset/Fieldset.ts"
5413
+ }
5414
+ }
5415
+ ],
5416
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
5417
+ },
5418
+ {
5419
+ "kind": "javascript-module",
5420
+ "path": "src/header/Header.ts",
5421
+ "declarations": [
5422
+ {
5423
+ "kind": "class",
5424
+ "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
5425
+ "name": "Header",
5426
+ "slots": [
5427
+ {
5428
+ "description": "The header content.",
5429
+ "name": ""
5430
+ },
5431
+ {
5432
+ "description": "Optional slot for buttons, toggles, etc.",
5433
+ "name": "action"
5434
+ }
5435
+ ],
5436
+ "members": [
5437
+ {
5438
+ "kind": "field",
5439
+ "name": "actionSlot",
5440
+ "privacy": "private",
5441
+ "default": "new SlotController(this, \"action\")"
5442
+ },
5443
+ {
5444
+ "kind": "field",
5445
+ "name": "_warningLogged",
5446
+ "type": {
5447
+ "text": "boolean"
5448
+ },
5449
+ "privacy": "private",
5450
+ "static": true,
5451
+ "default": "false",
5452
+ "inheritedFrom": {
5453
+ "name": "DraftComponentMixin",
5454
+ "module": "src/common/mixins/DraftComponentMixin.ts"
5455
+ }
5456
+ }
5457
+ ],
5458
+ "mixins": [
5459
+ {
5460
+ "name": "DraftComponentMixin",
5461
+ "module": "/src/common/mixins/DraftComponentMixin.js"
5462
+ }
5463
+ ],
5464
+ "superclass": {
5465
+ "name": "LitElement",
5466
+ "package": "lit"
5467
+ },
5468
+ "status": "draft",
5469
+ "category": "structure",
5470
+ "tagName": "nord-header",
5471
+ "customElement": true
5472
+ }
5473
+ ],
5474
+ "exports": [
5475
+ {
5476
+ "kind": "js",
5477
+ "name": "default",
5478
+ "declaration": {
5479
+ "name": "Header",
5480
+ "module": "src/header/Header.ts"
5481
+ }
5482
+ },
5483
+ {
5484
+ "kind": "custom-element-definition",
5485
+ "name": "nord-header",
5486
+ "declaration": {
5487
+ "name": "Header",
5488
+ "module": "src/header/Header.ts"
5489
+ }
5490
+ }
5491
+ ],
5492
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
5493
+ },
5494
+ {
5495
+ "kind": "javascript-module",
5496
+ "path": "src/icon/Icon.ts",
5497
+ "declarations": [
5498
+ {
5499
+ "kind": "class",
5500
+ "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
5501
+ "name": "Icon",
5502
+ "slots": [
5503
+ {
5504
+ "description": "The default slot used for placing a custom SVG icon.",
5505
+ "name": ""
5506
+ }
5507
+ ],
5508
+ "members": [
5509
+ {
5510
+ "kind": "field",
5511
+ "name": "resolver",
5512
+ "type": {
5513
+ "text": "IconResolver"
5514
+ },
5515
+ "privacy": "private",
5516
+ "static": true
5517
+ },
5518
+ {
5519
+ "kind": "field",
5520
+ "name": "registeredIcons",
5521
+ "privacy": "private",
5522
+ "static": true,
5523
+ "default": "new Map<string, string>()"
5524
+ },
5525
+ {
5526
+ "kind": "method",
5527
+ "name": "registerResolver",
5528
+ "static": true,
5529
+ "parameters": [
5530
+ {
5531
+ "name": "resolver",
5532
+ "type": {
5533
+ "text": "IconResolver"
5534
+ },
5535
+ "description": "The resolver function to register."
5536
+ }
5537
+ ],
5538
+ "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
5539
+ },
5540
+ {
5541
+ "kind": "method",
5542
+ "name": "registerIcon",
5543
+ "static": true,
5544
+ "return": {
5545
+ "type": {
4992
5546
  "text": "void"
4993
5547
  }
4994
5548
  },
@@ -5039,16 +5593,19 @@
5039
5593
  "name": "iconOrName",
5040
5594
  "type": {
5041
5595
  "text": "string | { title: string; default: string }"
5042
- }
5596
+ },
5597
+ "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
5043
5598
  },
5044
5599
  {
5045
5600
  "name": "icon",
5046
5601
  "optional": true,
5047
5602
  "type": {
5048
5603
  "text": "string"
5049
- }
5604
+ },
5605
+ "description": "The SVG string for the icon."
5050
5606
  }
5051
- ]
5607
+ ],
5608
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
5052
5609
  },
5053
5610
  {
5054
5611
  "kind": "field",
@@ -5110,20 +5667,6 @@
5110
5667
  "text": "string | Promise<string>"
5111
5668
  }
5112
5669
  }
5113
- },
5114
- {
5115
- "kind": "field",
5116
- "name": "_warningLogged",
5117
- "type": {
5118
- "text": "boolean"
5119
- },
5120
- "privacy": "private",
5121
- "static": true,
5122
- "default": "false",
5123
- "inheritedFrom": {
5124
- "name": "DraftComponentMixin",
5125
- "module": "src/common/mixins/DraftComponentMixin.ts"
5126
- }
5127
5670
  }
5128
5671
  ],
5129
5672
  "attributes": [
@@ -5162,17 +5705,11 @@
5162
5705
  "fieldName": "label"
5163
5706
  }
5164
5707
  ],
5165
- "mixins": [
5166
- {
5167
- "name": "DraftComponentMixin",
5168
- "module": "/src/common/mixins/DraftComponentMixin.js"
5169
- }
5170
- ],
5171
5708
  "superclass": {
5172
5709
  "name": "LitElement",
5173
5710
  "package": "lit"
5174
5711
  },
5175
- "status": "draft",
5712
+ "status": "ready",
5176
5713
  "category": "image",
5177
5714
  "tagName": "nord-icon",
5178
5715
  "customElement": true
@@ -5220,16 +5757,16 @@
5220
5757
  "name": "error"
5221
5758
  },
5222
5759
  {
5223
- "description": "Optional slot that holds an icon for the input.",
5224
- "name": "before"
5760
+ "description": "Optional slot used to place an icon at the start of the input.",
5761
+ "name": "start"
5225
5762
  }
5226
5763
  ],
5227
5764
  "members": [
5228
5765
  {
5229
5766
  "kind": "field",
5230
- "name": "beforeSlot",
5767
+ "name": "startSlot",
5231
5768
  "privacy": "private",
5232
- "default": "new SlotController(this, \"before\")"
5769
+ "default": "new SlotController(this, \"start\")"
5233
5770
  },
5234
5771
  {
5235
5772
  "kind": "field",
@@ -5623,23 +6160,9 @@
5623
6160
  "name": "FocusableMixin",
5624
6161
  "module": "src/common/mixins/FocusableMixin.ts"
5625
6162
  }
5626
- },
5627
- {
5628
- "kind": "field",
5629
- "name": "_warningLogged",
5630
- "type": {
5631
- "text": "boolean"
5632
- },
5633
- "privacy": "private",
5634
- "static": true,
5635
- "default": "false",
5636
- "inheritedFrom": {
5637
- "name": "DraftComponentMixin",
5638
- "module": "src/common/mixins/DraftComponentMixin.ts"
5639
- }
5640
- }
5641
- ],
5642
- "attributes": [
6163
+ }
6164
+ ],
6165
+ "attributes": [
5643
6166
  {
5644
6167
  "name": "type",
5645
6168
  "type": {
@@ -5788,17 +6311,13 @@
5788
6311
  {
5789
6312
  "name": "FocusableMixin",
5790
6313
  "module": "/src/common/mixins/FocusableMixin.js"
5791
- },
5792
- {
5793
- "name": "DraftComponentMixin",
5794
- "module": "/src/common/mixins/DraftComponentMixin.js"
5795
6314
  }
5796
6315
  ],
5797
6316
  "superclass": {
5798
6317
  "name": "LitElement",
5799
6318
  "package": "lit"
5800
6319
  },
5801
- "status": "draft",
6320
+ "status": "ready",
5802
6321
  "category": "form",
5803
6322
  "tagName": "nord-input",
5804
6323
  "customElement": true,
@@ -5922,6 +6441,266 @@
5922
6441
  ],
5923
6442
  "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"
5924
6443
  },
6444
+ {
6445
+ "kind": "javascript-module",
6446
+ "path": "src/localization/LocalizeController.ts",
6447
+ "declarations": [
6448
+ {
6449
+ "kind": "class",
6450
+ "description": "",
6451
+ "name": "LocalizeController",
6452
+ "members": [
6453
+ {
6454
+ "kind": "field",
6455
+ "name": "unsubscribe",
6456
+ "type": {
6457
+ "text": "ReturnType<typeof subscribe> | undefined"
6458
+ },
6459
+ "privacy": "private"
6460
+ },
6461
+ {
6462
+ "kind": "field",
6463
+ "name": "resolvedTranslation",
6464
+ "type": {
6465
+ "text": "Translation"
6466
+ },
6467
+ "privacy": "private"
6468
+ },
6469
+ {
6470
+ "kind": "field",
6471
+ "name": "lang",
6472
+ "description": "The lang of the document or element, with element taking precedence"
6473
+ },
6474
+ {
6475
+ "kind": "field",
6476
+ "name": "resolvedLang",
6477
+ "description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation"
6478
+ },
6479
+ {
6480
+ "kind": "method",
6481
+ "name": "hostConnected"
6482
+ },
6483
+ {
6484
+ "kind": "method",
6485
+ "name": "hostDisconnected"
6486
+ },
6487
+ {
6488
+ "kind": "method",
6489
+ "name": "term",
6490
+ "return": {
6491
+ "type": {
6492
+ "text": "Result<Translation[TComponentName], Key>"
6493
+ }
6494
+ },
6495
+ "parameters": [
6496
+ {
6497
+ "name": "key",
6498
+ "type": {
6499
+ "text": "Key"
6500
+ }
6501
+ },
6502
+ {
6503
+ "name": "args",
6504
+ "type": {
6505
+ "text": "FuncParams<Translation[TComponentName], Key>"
6506
+ }
6507
+ }
6508
+ ]
6509
+ },
6510
+ {
6511
+ "kind": "field",
6512
+ "name": "handleLangChange",
6513
+ "privacy": "private"
6514
+ },
6515
+ {
6516
+ "kind": "field",
6517
+ "name": "host",
6518
+ "default": "host"
6519
+ },
6520
+ {
6521
+ "kind": "field",
6522
+ "name": "options",
6523
+ "default": "options"
6524
+ }
6525
+ ]
6526
+ }
6527
+ ],
6528
+ "exports": [
6529
+ {
6530
+ "kind": "js",
6531
+ "name": "LocalizeController",
6532
+ "declaration": {
6533
+ "name": "LocalizeController",
6534
+ "module": "src/localization/LocalizeController.ts"
6535
+ }
6536
+ }
6537
+ ]
6538
+ },
6539
+ {
6540
+ "kind": "javascript-module",
6541
+ "path": "src/localization/en-us.ts",
6542
+ "declarations": [
6543
+ {
6544
+ "kind": "variable",
6545
+ "name": "en",
6546
+ "type": {
6547
+ "text": "object"
6548
+ },
6549
+ "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}"
6550
+ }
6551
+ ],
6552
+ "exports": [
6553
+ {
6554
+ "kind": "js",
6555
+ "name": "default",
6556
+ "declaration": {
6557
+ "name": "en",
6558
+ "module": "src/localization/en-us.ts"
6559
+ }
6560
+ }
6561
+ ]
6562
+ },
6563
+ {
6564
+ "kind": "javascript-module",
6565
+ "path": "src/localization/fi-fi.ts",
6566
+ "declarations": [
6567
+ {
6568
+ "kind": "variable",
6569
+ "name": "fi",
6570
+ "type": {
6571
+ "text": "Translation"
6572
+ },
6573
+ "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}"
6574
+ }
6575
+ ],
6576
+ "exports": [
6577
+ {
6578
+ "kind": "js",
6579
+ "name": "default",
6580
+ "declaration": {
6581
+ "name": "fi",
6582
+ "module": "src/localization/fi-fi.ts"
6583
+ }
6584
+ }
6585
+ ]
6586
+ },
6587
+ {
6588
+ "kind": "javascript-module",
6589
+ "path": "src/localization/translation.ts",
6590
+ "declarations": [
6591
+ {
6592
+ "kind": "function",
6593
+ "name": "clearTranslations",
6594
+ "description": "Removes all registered translations"
6595
+ },
6596
+ {
6597
+ "kind": "function",
6598
+ "name": "registerTranslation",
6599
+ "parameters": [
6600
+ {
6601
+ "name": "translation",
6602
+ "type": {
6603
+ "text": "Translation[]"
6604
+ }
6605
+ }
6606
+ ],
6607
+ "description": "Registers one or more translations"
6608
+ },
6609
+ {
6610
+ "kind": "function",
6611
+ "name": "subscribe",
6612
+ "return": {
6613
+ "type": {
6614
+ "text": ""
6615
+ }
6616
+ },
6617
+ "parameters": [
6618
+ {
6619
+ "name": "onChange",
6620
+ "type": {
6621
+ "text": "() => void"
6622
+ },
6623
+ "description": "callback for when either `lang` attr changes, or a new language is registered."
6624
+ }
6625
+ ],
6626
+ "description": "subscribe to language changes"
6627
+ },
6628
+ {
6629
+ "kind": "function",
6630
+ "name": "isTranslationRegistered",
6631
+ "parameters": [
6632
+ {
6633
+ "name": "lang",
6634
+ "type": {
6635
+ "text": "string"
6636
+ },
6637
+ "description": "the lang code e.g. \"en\" or \"en-GB\""
6638
+ }
6639
+ ],
6640
+ "description": "Check whether there is a translation registered for the given lang"
6641
+ },
6642
+ {
6643
+ "kind": "function",
6644
+ "name": "resolveTranslation",
6645
+ "return": {
6646
+ "type": {
6647
+ "text": "Translation"
6648
+ }
6649
+ },
6650
+ "parameters": [
6651
+ {
6652
+ "name": "langCode",
6653
+ "type": {
6654
+ "text": "string"
6655
+ }
6656
+ }
6657
+ ],
6658
+ "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."
6659
+ }
6660
+ ],
6661
+ "exports": [
6662
+ {
6663
+ "kind": "js",
6664
+ "name": "clearTranslations",
6665
+ "declaration": {
6666
+ "name": "clearTranslations",
6667
+ "module": "src/localization/translation.ts"
6668
+ }
6669
+ },
6670
+ {
6671
+ "kind": "js",
6672
+ "name": "registerTranslation",
6673
+ "declaration": {
6674
+ "name": "registerTranslation",
6675
+ "module": "src/localization/translation.ts"
6676
+ }
6677
+ },
6678
+ {
6679
+ "kind": "js",
6680
+ "name": "subscribe",
6681
+ "declaration": {
6682
+ "name": "subscribe",
6683
+ "module": "src/localization/translation.ts"
6684
+ }
6685
+ },
6686
+ {
6687
+ "kind": "js",
6688
+ "name": "isTranslationRegistered",
6689
+ "declaration": {
6690
+ "name": "isTranslationRegistered",
6691
+ "module": "src/localization/translation.ts"
6692
+ }
6693
+ },
6694
+ {
6695
+ "kind": "js",
6696
+ "name": "resolveTranslation",
6697
+ "declaration": {
6698
+ "name": "resolveTranslation",
6699
+ "module": "src/localization/translation.ts"
6700
+ }
6701
+ }
6702
+ ]
6703
+ },
5925
6704
  {
5926
6705
  "kind": "javascript-module",
5927
6706
  "path": "src/nav-group/NavGroup.ts",
@@ -6005,32 +6784,396 @@
6005
6784
  }
6006
6785
  }
6007
6786
  ],
6008
- "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
6787
+ "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
6788
+ },
6789
+ {
6790
+ "kind": "javascript-module",
6791
+ "path": "src/nav-item/NavItem.ts",
6792
+ "declarations": [
6793
+ {
6794
+ "kind": "class",
6795
+ "description": "Navigation item populates sidebar navigation with links.\nEvery item should be placed inside a navigation group.",
6796
+ "name": "NavItem",
6797
+ "slots": [
6798
+ {
6799
+ "description": "The default slot used for the nav item's text.",
6800
+ "name": ""
6801
+ },
6802
+ {
6803
+ "description": "Used for nesting navigation. When used the nav-item becomes a button to collapse the subnav, rather than a link.",
6804
+ "name": "subnav"
6805
+ }
6806
+ ],
6807
+ "members": [
6808
+ {
6809
+ "kind": "field",
6810
+ "name": "subnavSlot",
6811
+ "privacy": "private",
6812
+ "default": "new SlotController(this, \"subnav\")"
6813
+ },
6814
+ {
6815
+ "kind": "field",
6816
+ "name": "direction",
6817
+ "privacy": "private",
6818
+ "default": "new DirectionController(this)"
6819
+ },
6820
+ {
6821
+ "kind": "field",
6822
+ "name": "active",
6823
+ "type": {
6824
+ "text": "boolean"
6825
+ },
6826
+ "default": "false",
6827
+ "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
6828
+ "attribute": "active",
6829
+ "reflects": true
6830
+ },
6831
+ {
6832
+ "kind": "field",
6833
+ "name": "icon",
6834
+ "type": {
6835
+ "text": "string | undefined"
6836
+ },
6837
+ "description": "The name of an icon from Nordicons to display for the nav item.",
6838
+ "attribute": "icon"
6839
+ },
6840
+ {
6841
+ "kind": "field",
6842
+ "name": "href",
6843
+ "type": {
6844
+ "text": "string | undefined"
6845
+ },
6846
+ "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
6847
+ "attribute": "href"
6848
+ },
6849
+ {
6850
+ "kind": "field",
6851
+ "name": "badge",
6852
+ "type": {
6853
+ "text": "string | undefined"
6854
+ },
6855
+ "description": "Allows you to add a notification badge with a number next to the nav item.",
6856
+ "attribute": "badge"
6857
+ },
6858
+ {
6859
+ "kind": "field",
6860
+ "name": "open",
6861
+ "type": {
6862
+ "text": "boolean"
6863
+ },
6864
+ "default": "false",
6865
+ "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
6866
+ "attribute": "open"
6867
+ },
6868
+ {
6869
+ "kind": "method",
6870
+ "name": "renderLink",
6871
+ "privacy": "private",
6872
+ "parameters": [
6873
+ {
6874
+ "name": "innards",
6875
+ "type": {
6876
+ "text": "TemplateResult"
6877
+ }
6878
+ }
6879
+ ]
6880
+ },
6881
+ {
6882
+ "kind": "method",
6883
+ "name": "renderToggle",
6884
+ "privacy": "private",
6885
+ "parameters": [
6886
+ {
6887
+ "name": "innards",
6888
+ "type": {
6889
+ "text": "TemplateResult"
6890
+ }
6891
+ }
6892
+ ]
6893
+ },
6894
+ {
6895
+ "kind": "method",
6896
+ "name": "renderButton",
6897
+ "privacy": "private",
6898
+ "parameters": [
6899
+ {
6900
+ "name": "innards",
6901
+ "type": {
6902
+ "text": "TemplateResult"
6903
+ }
6904
+ }
6905
+ ]
6906
+ },
6907
+ {
6908
+ "kind": "method",
6909
+ "name": "toggleOpen",
6910
+ "privacy": "private"
6911
+ },
6912
+ {
6913
+ "kind": "field",
6914
+ "name": "focusableRef",
6915
+ "privacy": "protected",
6916
+ "inheritedFrom": {
6917
+ "name": "FocusableMixin",
6918
+ "module": "src/common/mixins/FocusableMixin.ts"
6919
+ }
6920
+ },
6921
+ {
6922
+ "kind": "method",
6923
+ "name": "focus",
6924
+ "parameters": [
6925
+ {
6926
+ "name": "options",
6927
+ "optional": true,
6928
+ "type": {
6929
+ "text": "FocusOptions"
6930
+ },
6931
+ "description": "An object which controls aspects of the focusing process."
6932
+ }
6933
+ ],
6934
+ "description": "Programmatically move focus to the component.",
6935
+ "inheritedFrom": {
6936
+ "name": "FocusableMixin",
6937
+ "module": "src/common/mixins/FocusableMixin.ts"
6938
+ }
6939
+ },
6940
+ {
6941
+ "kind": "method",
6942
+ "name": "blur",
6943
+ "description": "Programmatically remove focus from the component.",
6944
+ "inheritedFrom": {
6945
+ "name": "FocusableMixin",
6946
+ "module": "src/common/mixins/FocusableMixin.ts"
6947
+ }
6948
+ },
6949
+ {
6950
+ "kind": "method",
6951
+ "name": "click",
6952
+ "description": "Programmatically simulates a click on the component.",
6953
+ "inheritedFrom": {
6954
+ "name": "FocusableMixin",
6955
+ "module": "src/common/mixins/FocusableMixin.ts"
6956
+ }
6957
+ },
6958
+ {
6959
+ "kind": "field",
6960
+ "name": "_warningLogged",
6961
+ "type": {
6962
+ "text": "boolean"
6963
+ },
6964
+ "privacy": "private",
6965
+ "static": true,
6966
+ "default": "false",
6967
+ "inheritedFrom": {
6968
+ "name": "DraftComponentMixin",
6969
+ "module": "src/common/mixins/DraftComponentMixin.ts"
6970
+ }
6971
+ }
6972
+ ],
6973
+ "events": [
6974
+ {
6975
+ "name": "toggle",
6976
+ "type": {
6977
+ "text": "NordEvent"
6978
+ },
6979
+ "description": "Dispatched whenever a nav item's state changes between open and closed."
6980
+ }
6981
+ ],
6982
+ "attributes": [
6983
+ {
6984
+ "name": "active",
6985
+ "type": {
6986
+ "text": "boolean"
6987
+ },
6988
+ "default": "false",
6989
+ "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
6990
+ "fieldName": "active"
6991
+ },
6992
+ {
6993
+ "name": "icon",
6994
+ "type": {
6995
+ "text": "string | undefined"
6996
+ },
6997
+ "description": "The name of an icon from Nordicons to display for the nav item.",
6998
+ "fieldName": "icon"
6999
+ },
7000
+ {
7001
+ "name": "href",
7002
+ "type": {
7003
+ "text": "string | undefined"
7004
+ },
7005
+ "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
7006
+ "fieldName": "href"
7007
+ },
7008
+ {
7009
+ "name": "badge",
7010
+ "type": {
7011
+ "text": "string | undefined"
7012
+ },
7013
+ "description": "Allows you to add a notification badge with a number next to the nav item.",
7014
+ "fieldName": "badge"
7015
+ },
7016
+ {
7017
+ "name": "open",
7018
+ "type": {
7019
+ "text": "boolean"
7020
+ },
7021
+ "default": "false",
7022
+ "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
7023
+ "fieldName": "open"
7024
+ }
7025
+ ],
7026
+ "mixins": [
7027
+ {
7028
+ "name": "FocusableMixin",
7029
+ "module": "/src/common/mixins/FocusableMixin.js"
7030
+ },
7031
+ {
7032
+ "name": "DraftComponentMixin",
7033
+ "module": "/src/common/mixins/DraftComponentMixin.js"
7034
+ }
7035
+ ],
7036
+ "superclass": {
7037
+ "name": "LitElement",
7038
+ "package": "lit"
7039
+ },
7040
+ "status": "draft",
7041
+ "category": "navigation",
7042
+ "tagName": "nord-nav-item",
7043
+ "customElement": true
7044
+ }
7045
+ ],
7046
+ "exports": [
7047
+ {
7048
+ "kind": "js",
7049
+ "name": "default",
7050
+ "declaration": {
7051
+ "name": "NavItem",
7052
+ "module": "src/nav-item/NavItem.ts"
7053
+ }
7054
+ },
7055
+ {
7056
+ "kind": "custom-element-definition",
7057
+ "name": "nord-nav-item",
7058
+ "declaration": {
7059
+ "name": "NavItem",
7060
+ "module": "src/nav-item/NavItem.ts"
7061
+ }
7062
+ }
7063
+ ],
7064
+ "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
7065
+ },
7066
+ {
7067
+ "kind": "javascript-module",
7068
+ "path": "src/navigation/Navigation.ts",
7069
+ "declarations": [
7070
+ {
7071
+ "kind": "class",
7072
+ "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
7073
+ "name": "Navigation",
7074
+ "slots": [
7075
+ {
7076
+ "description": "The main section of the sidebar, for holding nav components.",
7077
+ "name": ""
7078
+ },
7079
+ {
7080
+ "description": "The top section of the sidebar.",
7081
+ "name": "header"
7082
+ },
7083
+ {
7084
+ "description": "The bottom section of the sidebar.",
7085
+ "name": "footer"
7086
+ }
7087
+ ],
7088
+ "members": [
7089
+ {
7090
+ "kind": "field",
7091
+ "name": "_warningLogged",
7092
+ "type": {
7093
+ "text": "boolean"
7094
+ },
7095
+ "privacy": "private",
7096
+ "static": true,
7097
+ "default": "false",
7098
+ "inheritedFrom": {
7099
+ "name": "DraftComponentMixin",
7100
+ "module": "src/common/mixins/DraftComponentMixin.ts"
7101
+ }
7102
+ }
7103
+ ],
7104
+ "mixins": [
7105
+ {
7106
+ "name": "DraftComponentMixin",
7107
+ "module": "/src/common/mixins/DraftComponentMixin.js"
7108
+ }
7109
+ ],
7110
+ "superclass": {
7111
+ "name": "LitElement",
7112
+ "package": "lit"
7113
+ },
7114
+ "status": "draft",
7115
+ "category": "navigation",
7116
+ "tagName": "nord-navigation",
7117
+ "customElement": true
7118
+ }
7119
+ ],
7120
+ "exports": [
7121
+ {
7122
+ "kind": "js",
7123
+ "name": "default",
7124
+ "declaration": {
7125
+ "name": "Navigation",
7126
+ "module": "src/navigation/Navigation.ts"
7127
+ }
7128
+ },
7129
+ {
7130
+ "kind": "custom-element-definition",
7131
+ "name": "nord-navigation",
7132
+ "declaration": {
7133
+ "name": "Navigation",
7134
+ "module": "src/navigation/Navigation.ts"
7135
+ }
7136
+ }
7137
+ ],
7138
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
6009
7139
  },
6010
7140
  {
6011
7141
  "kind": "javascript-module",
6012
- "path": "src/nav-item/NavItem.ts",
7142
+ "path": "src/popout/Popout.ts",
6013
7143
  "declarations": [
6014
7144
  {
6015
7145
  "kind": "class",
6016
- "description": "Navigation item populates sidebar navigation with links.\nEvery item should be placed inside a navigation group.",
6017
- "name": "NavItem",
7146
+ "description": "Popouts are small overlays that open on demand. They let users access additional content and actions without cluttering the page.",
7147
+ "name": "Popout",
6018
7148
  "slots": [
6019
7149
  {
6020
- "description": "The default slot used for the nav item's text.",
7150
+ "description": "The popout content.",
6021
7151
  "name": ""
6022
- },
6023
- {
6024
- "description": "Used for nesting navigation. When used the nav-item becomes a button to collapse the subnav, rather than a link.",
6025
- "name": "subnav"
6026
7152
  }
6027
7153
  ],
6028
7154
  "members": [
6029
7155
  {
6030
7156
  "kind": "field",
6031
- "name": "subnavSlot",
7157
+ "name": "targetElement",
7158
+ "type": {
7159
+ "text": "HTMLElement"
7160
+ },
7161
+ "privacy": "private"
7162
+ },
7163
+ {
7164
+ "kind": "field",
7165
+ "name": "cleanupAutoUpdate",
7166
+ "type": {
7167
+ "text": "ReturnType<typeof autoUpdate> | undefined"
7168
+ },
7169
+ "privacy": "private"
7170
+ },
7171
+ {
7172
+ "kind": "field",
7173
+ "name": "dismiss",
6032
7174
  "privacy": "private",
6033
- "default": "new SlotController(this, \"subnav\")"
7175
+ "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this && node !== this.targetElement,\n })",
7176
+ "description": "Handle dismissal of the popout, clicking outside the target button and popout."
6034
7177
  },
6035
7178
  {
6036
7179
  "kind": "field",
@@ -6040,141 +7183,90 @@
6040
7183
  },
6041
7184
  {
6042
7185
  "kind": "field",
6043
- "name": "active",
7186
+ "name": "open",
6044
7187
  "type": {
6045
7188
  "text": "boolean"
6046
7189
  },
6047
- "default": "false",
6048
- "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
6049
- "attribute": "active",
6050
- "reflects": true
7190
+ "privacy": "private",
7191
+ "default": "false"
6051
7192
  },
6052
7193
  {
6053
7194
  "kind": "field",
6054
- "name": "icon",
7195
+ "name": "computedPosition",
6055
7196
  "type": {
6056
- "text": "string | undefined"
7197
+ "text": "Placement | undefined"
6057
7198
  },
6058
- "description": "The name of an icon from Nordicons to display for the nav item.",
6059
- "attribute": "icon"
7199
+ "privacy": "private"
6060
7200
  },
6061
7201
  {
6062
7202
  "kind": "field",
6063
- "name": "href",
7203
+ "name": "align",
6064
7204
  "type": {
6065
- "text": "string | undefined"
7205
+ "text": "\"start\" | \"end\""
6066
7206
  },
6067
- "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
6068
- "attribute": "href"
7207
+ "default": "\"start\"",
7208
+ "description": "Set the alignment of the popout in relation to the toggle depending on the position.\n`start` will align the left of the popout to the left of the toggle.\n`end` will align the right of the popout to the right of the toggle.\nA popout with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the popout respectively.",
7209
+ "attribute": "align",
7210
+ "reflects": true
6069
7211
  },
6070
7212
  {
6071
7213
  "kind": "field",
6072
- "name": "badge",
7214
+ "name": "position",
6073
7215
  "type": {
6074
- "text": "string | undefined"
7216
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
6075
7217
  },
6076
- "description": "Allows you to add a notification badge with a number next to the nav item.",
6077
- "attribute": "badge"
7218
+ "default": "\"block-end\"",
7219
+ "description": "Set the position of the popout in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
7220
+ "attribute": "position",
7221
+ "reflects": true
6078
7222
  },
6079
7223
  {
6080
7224
  "kind": "field",
6081
- "name": "open",
7225
+ "name": "id",
6082
7226
  "type": {
6083
- "text": "boolean"
7227
+ "text": "string"
6084
7228
  },
6085
- "default": "false",
6086
- "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
6087
- "attribute": "open"
7229
+ "default": "\"\"",
7230
+ "description": "The id for the active element to reference via aria-controls.",
7231
+ "attribute": "id",
7232
+ "reflects": true
6088
7233
  },
6089
7234
  {
6090
7235
  "kind": "method",
6091
- "name": "renderLink",
6092
- "privacy": "private",
6093
- "parameters": [
6094
- {
6095
- "name": "innards",
6096
- "type": {
6097
- "text": "TemplateResult"
6098
- }
6099
- }
6100
- ]
7236
+ "name": "show",
7237
+ "description": "Show the popout, moving focus to the calendar inside."
6101
7238
  },
6102
7239
  {
6103
7240
  "kind": "method",
6104
- "name": "renderToggle",
6105
- "privacy": "private",
7241
+ "name": "hide",
6106
7242
  "parameters": [
6107
7243
  {
6108
- "name": "innards",
7244
+ "name": "moveFocusToButton",
7245
+ "default": "true",
7246
+ "description": "prevent focus returning to the target\nbutton. Default is true.",
6109
7247
  "type": {
6110
- "text": "TemplateResult"
7248
+ "text": "boolean"
6111
7249
  }
6112
7250
  }
6113
- ]
7251
+ ],
7252
+ "description": "Hide the popout."
6114
7253
  },
6115
7254
  {
6116
- "kind": "method",
6117
- "name": "renderButton",
7255
+ "kind": "field",
7256
+ "name": "updatePosition",
6118
7257
  "privacy": "private",
6119
- "parameters": [
6120
- {
6121
- "name": "innards",
6122
- "type": {
6123
- "text": "TemplateResult"
6124
- }
6125
- }
6126
- ]
6127
- },
6128
- {
6129
- "kind": "method",
6130
- "name": "toggleOpen",
6131
- "privacy": "private"
7258
+ "description": "Get the position of the element toggling the popout\nand position the popout underneath it, taking into account the optional placement."
6132
7259
  },
6133
7260
  {
6134
7261
  "kind": "field",
6135
- "name": "focusableRef",
6136
- "privacy": "protected",
6137
- "inheritedFrom": {
6138
- "name": "FocusableMixin",
6139
- "module": "src/common/mixins/FocusableMixin.ts"
6140
- }
6141
- },
6142
- {
6143
- "kind": "method",
6144
- "name": "focus",
6145
- "parameters": [
6146
- {
6147
- "name": "options",
6148
- "optional": true,
6149
- "type": {
6150
- "text": "FocusOptions"
6151
- },
6152
- "description": "An object which controls aspects of the focusing process."
6153
- }
6154
- ],
6155
- "description": "Programmatically move focus to the component.",
6156
- "inheritedFrom": {
6157
- "name": "FocusableMixin",
6158
- "module": "src/common/mixins/FocusableMixin.ts"
6159
- }
6160
- },
6161
- {
6162
- "kind": "method",
6163
- "name": "blur",
6164
- "description": "Programmatically remove focus from the component.",
6165
- "inheritedFrom": {
6166
- "name": "FocusableMixin",
6167
- "module": "src/common/mixins/FocusableMixin.ts"
6168
- }
7262
+ "name": "toggleOpen",
7263
+ "privacy": "private",
7264
+ "description": "Toggle the popout open or closed using state.\nUpdating the position to underneath the target button before the popout is opened."
6169
7265
  },
6170
7266
  {
6171
7267
  "kind": "method",
6172
- "name": "click",
6173
- "description": "Programmatically simulates a click on the component.",
6174
- "inheritedFrom": {
6175
- "name": "FocusableMixin",
6176
- "module": "src/common/mixins/FocusableMixin.ts"
6177
- }
7268
+ "name": "getToggle",
7269
+ "privacy": "private"
6178
7270
  },
6179
7271
  {
6180
7272
  "kind": "field",
@@ -6193,62 +7285,50 @@
6193
7285
  ],
6194
7286
  "events": [
6195
7287
  {
6196
- "name": "toggle",
7288
+ "name": "open",
6197
7289
  "type": {
6198
7290
  "text": "NordEvent"
6199
7291
  },
6200
- "description": "Dispatched whenever a nav item's state changes between open and closed."
6201
- }
6202
- ],
6203
- "attributes": [
6204
- {
6205
- "name": "active",
6206
- "type": {
6207
- "text": "boolean"
6208
- },
6209
- "default": "false",
6210
- "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
6211
- "fieldName": "active"
7292
+ "description": "Dispatched when the popout is opened."
6212
7293
  },
6213
7294
  {
6214
- "name": "icon",
7295
+ "name": "close",
6215
7296
  "type": {
6216
- "text": "string | undefined"
7297
+ "text": "NordEvent"
6217
7298
  },
6218
- "description": "The name of an icon from Nordicons to display for the nav item.",
6219
- "fieldName": "icon"
6220
- },
7299
+ "description": "Dispatched when the popout is closed."
7300
+ }
7301
+ ],
7302
+ "attributes": [
6221
7303
  {
6222
- "name": "href",
7304
+ "name": "align",
6223
7305
  "type": {
6224
- "text": "string | undefined"
7306
+ "text": "\"start\" | \"end\""
6225
7307
  },
6226
- "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
6227
- "fieldName": "href"
7308
+ "default": "\"start\"",
7309
+ "description": "Set the alignment of the popout in relation to the toggle depending on the position.\n`start` will align the left of the popout to the left of the toggle.\n`end` will align the right of the popout to the right of the toggle.\nA popout with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the popout respectively.",
7310
+ "fieldName": "align"
6228
7311
  },
6229
7312
  {
6230
- "name": "badge",
7313
+ "name": "position",
6231
7314
  "type": {
6232
- "text": "string | undefined"
7315
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
6233
7316
  },
6234
- "description": "Allows you to add a notification badge with a number next to the nav item.",
6235
- "fieldName": "badge"
7317
+ "default": "\"block-end\"",
7318
+ "description": "Set the position of the popout in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
7319
+ "fieldName": "position"
6236
7320
  },
6237
7321
  {
6238
- "name": "open",
7322
+ "name": "id",
6239
7323
  "type": {
6240
- "text": "boolean"
7324
+ "text": "string"
6241
7325
  },
6242
- "default": "false",
6243
- "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
6244
- "fieldName": "open"
7326
+ "default": "\"\"",
7327
+ "description": "The id for the active element to reference via aria-controls.",
7328
+ "fieldName": "id"
6245
7329
  }
6246
7330
  ],
6247
7331
  "mixins": [
6248
- {
6249
- "name": "FocusableMixin",
6250
- "module": "/src/common/mixins/FocusableMixin.js"
6251
- },
6252
7332
  {
6253
7333
  "name": "DraftComponentMixin",
6254
7334
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -6259,8 +7339,8 @@
6259
7339
  "package": "lit"
6260
7340
  },
6261
7341
  "status": "draft",
6262
- "category": "navigation",
6263
- "tagName": "nord-nav-item",
7342
+ "category": "overlay",
7343
+ "tagName": "nord-popout",
6264
7344
  "customElement": true
6265
7345
  }
6266
7346
  ],
@@ -6269,72 +7349,150 @@
6269
7349
  "kind": "js",
6270
7350
  "name": "default",
6271
7351
  "declaration": {
6272
- "name": "NavItem",
6273
- "module": "src/nav-item/NavItem.ts"
7352
+ "name": "Popout",
7353
+ "module": "src/popout/Popout.ts"
6274
7354
  }
6275
7355
  },
6276
7356
  {
6277
7357
  "kind": "custom-element-definition",
6278
- "name": "nord-nav-item",
7358
+ "name": "nord-popout",
6279
7359
  "declaration": {
6280
- "name": "NavItem",
6281
- "module": "src/nav-item/NavItem.ts"
7360
+ "name": "Popout",
7361
+ "module": "src/popout/Popout.ts"
6282
7362
  }
6283
7363
  }
6284
7364
  ],
6285
- "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
7365
+ "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 position popout next to the button or other interface element that toggles it.\n- Use a popout to contain controls or information that doesn’t need to be shown immediately.\n- Use a popout to contain items that will most likely not fit into the current view.\n- Use a clearly labelled button to reveal the popout.\n- Use the appropriate `aria-haspopup` and `role` attributes for both the toggle button and containing items. Please refer to the [MDN documentation on both role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values) and [child role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#associated_roles).\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide information inside a popout that is imperative to using the current view.\n- Don’t obscure other controls that are important with the popout.\n- Don’t allow the popout to be obscured by other controls or the outer bounds of the current view.\n</div>\n\n---\n\n## Content guidelines\n\nIf a popout contains actions, they should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nPopout actions should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in popout actions, 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 popout actions 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\nAvoud all caps for popout actions:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\n---\n\n## Additional considerations\n\n- The popout component is a containing component, only providing a way to reveal and hide controls by using a single button.\n"
6286
7366
  },
6287
7367
  {
6288
7368
  "kind": "javascript-module",
6289
- "path": "src/navigation/Navigation.ts",
7369
+ "path": "src/progress-bar/ProgressBar.ts",
6290
7370
  "declarations": [
6291
7371
  {
6292
7372
  "kind": "class",
6293
- "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
6294
- "name": "Navigation",
6295
- "slots": [
7373
+ "description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
7374
+ "name": "ProgressBar",
7375
+ "members": [
6296
7376
  {
6297
- "description": "The main section of the sidebar, for holding nav components.",
6298
- "name": ""
7377
+ "kind": "field",
7378
+ "name": "value",
7379
+ "type": {
7380
+ "text": "number | undefined"
7381
+ },
7382
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
7383
+ "attribute": "value",
7384
+ "reflects": true
7385
+ },
7386
+ {
7387
+ "kind": "field",
7388
+ "name": "max",
7389
+ "type": {
7390
+ "text": "number"
7391
+ },
7392
+ "default": "100",
7393
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
7394
+ "attribute": "max",
7395
+ "reflects": true
7396
+ },
7397
+ {
7398
+ "kind": "field",
7399
+ "name": "label",
7400
+ "type": {
7401
+ "text": "string"
7402
+ },
7403
+ "default": "\"Current progress\"",
7404
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
7405
+ "attribute": "label",
7406
+ "reflects": true
7407
+ },
7408
+ {
7409
+ "kind": "field",
7410
+ "name": "focusableRef",
7411
+ "privacy": "protected",
7412
+ "inheritedFrom": {
7413
+ "name": "FocusableMixin",
7414
+ "module": "src/common/mixins/FocusableMixin.ts"
7415
+ }
7416
+ },
7417
+ {
7418
+ "kind": "method",
7419
+ "name": "focus",
7420
+ "parameters": [
7421
+ {
7422
+ "name": "options",
7423
+ "optional": true,
7424
+ "type": {
7425
+ "text": "FocusOptions"
7426
+ },
7427
+ "description": "An object which controls aspects of the focusing process."
7428
+ }
7429
+ ],
7430
+ "description": "Programmatically move focus to the component.",
7431
+ "inheritedFrom": {
7432
+ "name": "FocusableMixin",
7433
+ "module": "src/common/mixins/FocusableMixin.ts"
7434
+ }
6299
7435
  },
6300
7436
  {
6301
- "description": "The top section of the sidebar.",
6302
- "name": "header"
7437
+ "kind": "method",
7438
+ "name": "blur",
7439
+ "description": "Programmatically remove focus from the component.",
7440
+ "inheritedFrom": {
7441
+ "name": "FocusableMixin",
7442
+ "module": "src/common/mixins/FocusableMixin.ts"
7443
+ }
6303
7444
  },
6304
7445
  {
6305
- "description": "The bottom section of the sidebar.",
6306
- "name": "footer"
7446
+ "kind": "method",
7447
+ "name": "click",
7448
+ "description": "Programmatically simulates a click on the component.",
7449
+ "inheritedFrom": {
7450
+ "name": "FocusableMixin",
7451
+ "module": "src/common/mixins/FocusableMixin.ts"
7452
+ }
6307
7453
  }
6308
7454
  ],
6309
- "members": [
7455
+ "attributes": [
6310
7456
  {
6311
- "kind": "field",
6312
- "name": "_warningLogged",
7457
+ "name": "value",
6313
7458
  "type": {
6314
- "text": "boolean"
7459
+ "text": "number | undefined"
6315
7460
  },
6316
- "privacy": "private",
6317
- "static": true,
6318
- "default": "false",
6319
- "inheritedFrom": {
6320
- "name": "DraftComponentMixin",
6321
- "module": "src/common/mixins/DraftComponentMixin.ts"
6322
- }
7461
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
7462
+ "fieldName": "value"
7463
+ },
7464
+ {
7465
+ "name": "max",
7466
+ "type": {
7467
+ "text": "number"
7468
+ },
7469
+ "default": "100",
7470
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
7471
+ "fieldName": "max"
7472
+ },
7473
+ {
7474
+ "name": "label",
7475
+ "type": {
7476
+ "text": "string"
7477
+ },
7478
+ "default": "\"Current progress\"",
7479
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
7480
+ "fieldName": "label"
6323
7481
  }
6324
7482
  ],
6325
7483
  "mixins": [
6326
7484
  {
6327
- "name": "DraftComponentMixin",
6328
- "module": "/src/common/mixins/DraftComponentMixin.js"
7485
+ "name": "FocusableMixin",
7486
+ "module": "/src/common/mixins/FocusableMixin.js"
6329
7487
  }
6330
7488
  ],
6331
7489
  "superclass": {
6332
7490
  "name": "LitElement",
6333
7491
  "package": "lit"
6334
7492
  },
6335
- "status": "draft",
6336
- "category": "navigation",
6337
- "tagName": "nord-navigation",
7493
+ "status": "new",
7494
+ "category": "feedback",
7495
+ "tagName": "nord-progress-bar",
6338
7496
  "customElement": true
6339
7497
  }
6340
7498
  ],
@@ -6343,20 +7501,20 @@
6343
7501
  "kind": "js",
6344
7502
  "name": "default",
6345
7503
  "declaration": {
6346
- "name": "Navigation",
6347
- "module": "src/navigation/Navigation.ts"
7504
+ "name": "ProgressBar",
7505
+ "module": "src/progress-bar/ProgressBar.ts"
6348
7506
  }
6349
7507
  },
6350
7508
  {
6351
7509
  "kind": "custom-element-definition",
6352
- "name": "nord-navigation",
7510
+ "name": "nord-progress-bar",
6353
7511
  "declaration": {
6354
- "name": "Navigation",
6355
- "module": "src/navigation/Navigation.ts"
7512
+ "name": "ProgressBar",
7513
+ "module": "src/progress-bar/ProgressBar.ts"
6356
7514
  }
6357
7515
  }
6358
7516
  ],
6359
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
7517
+ "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 show the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n"
6360
7518
  },
6361
7519
  {
6362
7520
  "kind": "javascript-module",
@@ -6788,20 +7946,6 @@
6788
7946
  "name": "FocusableMixin",
6789
7947
  "module": "src/common/mixins/FocusableMixin.ts"
6790
7948
  }
6791
- },
6792
- {
6793
- "kind": "field",
6794
- "name": "_warningLogged",
6795
- "type": {
6796
- "text": "boolean"
6797
- },
6798
- "privacy": "private",
6799
- "static": true,
6800
- "default": "false",
6801
- "inheritedFrom": {
6802
- "name": "DraftComponentMixin",
6803
- "module": "src/common/mixins/DraftComponentMixin.ts"
6804
- }
6805
7949
  }
6806
7950
  ],
6807
7951
  "attributes": [
@@ -6953,17 +8097,13 @@
6953
8097
  {
6954
8098
  "name": "FocusableMixin",
6955
8099
  "module": "/src/common/mixins/FocusableMixin.js"
6956
- },
6957
- {
6958
- "name": "DraftComponentMixin",
6959
- "module": "/src/common/mixins/DraftComponentMixin.js"
6960
8100
  }
6961
8101
  ],
6962
8102
  "superclass": {
6963
8103
  "name": "LitElement",
6964
8104
  "package": "lit"
6965
8105
  },
6966
- "status": "draft",
8106
+ "status": "ready",
6967
8107
  "category": "form",
6968
8108
  "tagName": "nord-radio",
6969
8109
  "customElement": true,
@@ -7451,20 +8591,6 @@
7451
8591
  "name": "FocusableMixin",
7452
8592
  "module": "src/common/mixins/FocusableMixin.ts"
7453
8593
  }
7454
- },
7455
- {
7456
- "kind": "field",
7457
- "name": "_warningLogged",
7458
- "type": {
7459
- "text": "boolean"
7460
- },
7461
- "privacy": "private",
7462
- "static": true,
7463
- "default": "false",
7464
- "inheritedFrom": {
7465
- "name": "DraftComponentMixin",
7466
- "module": "src/common/mixins/DraftComponentMixin.ts"
7467
- }
7468
8594
  }
7469
8595
  ],
7470
8596
  "mixins": [
@@ -7479,17 +8605,13 @@
7479
8605
  {
7480
8606
  "name": "FocusableMixin",
7481
8607
  "module": "/src/common/mixins/FocusableMixin.js"
7482
- },
7483
- {
7484
- "name": "DraftComponentMixin",
7485
- "module": "/src/common/mixins/DraftComponentMixin.js"
7486
8608
  }
7487
8609
  ],
7488
8610
  "superclass": {
7489
8611
  "name": "LitElement",
7490
8612
  "package": "lit"
7491
8613
  },
7492
- "status": "draft",
8614
+ "status": "ready",
7493
8615
  "category": "form",
7494
8616
  "tagName": "nord-select",
7495
8617
  "customElement": true,
@@ -7706,20 +8828,6 @@
7706
8828
  "description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
7707
8829
  "attribute": "label",
7708
8830
  "reflects": true
7709
- },
7710
- {
7711
- "kind": "field",
7712
- "name": "_warningLogged",
7713
- "type": {
7714
- "text": "boolean"
7715
- },
7716
- "privacy": "private",
7717
- "static": true,
7718
- "default": "false",
7719
- "inheritedFrom": {
7720
- "name": "DraftComponentMixin",
7721
- "module": "src/common/mixins/DraftComponentMixin.ts"
7722
- }
7723
8831
  }
7724
8832
  ],
7725
8833
  "attributes": [
@@ -7749,17 +8857,11 @@
7749
8857
  "fieldName": "label"
7750
8858
  }
7751
8859
  ],
7752
- "mixins": [
7753
- {
7754
- "name": "DraftComponentMixin",
7755
- "module": "/src/common/mixins/DraftComponentMixin.js"
7756
- }
7757
- ],
7758
8860
  "superclass": {
7759
8861
  "name": "LitElement",
7760
8862
  "package": "lit"
7761
8863
  },
7762
- "status": "draft",
8864
+ "status": "ready",
7763
8865
  "category": "feedback",
7764
8866
  "tagName": "nord-spinner",
7765
8867
  "customElement": true
@@ -7826,7 +8928,7 @@
7826
8928
  "kind": "field",
7827
8929
  "name": "alignItems",
7828
8930
  "type": {
7829
- "text": "\"center\" | \"start\" | \"end\" | undefined"
8931
+ "text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
7830
8932
  },
7831
8933
  "description": "How to align the child items inside the stack.",
7832
8934
  "attribute": "align-items",
@@ -7834,17 +8936,35 @@
7834
8936
  },
7835
8937
  {
7836
8938
  "kind": "field",
7837
- "name": "_warningLogged",
8939
+ "name": "responsive",
7838
8940
  "type": {
7839
8941
  "text": "boolean"
7840
8942
  },
7841
- "privacy": "private",
7842
- "static": true,
7843
8943
  "default": "false",
7844
- "inheritedFrom": {
7845
- "name": "DraftComponentMixin",
7846
- "module": "src/common/mixins/DraftComponentMixin.ts"
7847
- }
8944
+ "description": "Enable or disable responsive behaviour of the stack component.\nSetting this option \"true\" makes sure that contents are\nstacked vertically on mobile (768px and under).",
8945
+ "attribute": "responsive",
8946
+ "reflects": true
8947
+ },
8948
+ {
8949
+ "kind": "field",
8950
+ "name": "wrap",
8951
+ "type": {
8952
+ "text": "boolean"
8953
+ },
8954
+ "default": "false",
8955
+ "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
8956
+ "attribute": "wrap",
8957
+ "reflects": true
8958
+ },
8959
+ {
8960
+ "kind": "field",
8961
+ "name": "justifyContent",
8962
+ "type": {
8963
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
8964
+ },
8965
+ "description": "How to justify the child items inside the stack.",
8966
+ "attribute": "justify-content",
8967
+ "reflects": true
7848
8968
  }
7849
8969
  ],
7850
8970
  "attributes": [
@@ -7869,23 +8989,43 @@
7869
8989
  {
7870
8990
  "name": "align-items",
7871
8991
  "type": {
7872
- "text": "\"center\" | \"start\" | \"end\" | undefined"
8992
+ "text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
7873
8993
  },
7874
8994
  "description": "How to align the child items inside the stack.",
7875
8995
  "fieldName": "alignItems"
7876
- }
7877
- ],
7878
- "mixins": [
8996
+ },
7879
8997
  {
7880
- "name": "DraftComponentMixin",
7881
- "module": "/src/common/mixins/DraftComponentMixin.js"
8998
+ "name": "responsive",
8999
+ "type": {
9000
+ "text": "boolean"
9001
+ },
9002
+ "default": "false",
9003
+ "description": "Enable or disable responsive behaviour of the stack component.\nSetting this option \"true\" makes sure that contents are\nstacked vertically on mobile (768px and under).",
9004
+ "fieldName": "responsive"
9005
+ },
9006
+ {
9007
+ "name": "wrap",
9008
+ "type": {
9009
+ "text": "boolean"
9010
+ },
9011
+ "default": "false",
9012
+ "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
9013
+ "fieldName": "wrap"
9014
+ },
9015
+ {
9016
+ "name": "justify-content",
9017
+ "type": {
9018
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
9019
+ },
9020
+ "description": "How to justify the child items inside the stack.",
9021
+ "fieldName": "justifyContent"
7882
9022
  }
7883
9023
  ],
7884
9024
  "superclass": {
7885
9025
  "name": "LitElement",
7886
9026
  "package": "lit"
7887
9027
  },
7888
- "status": "draft",
9028
+ "status": "ready",
7889
9029
  "category": "structure",
7890
9030
  "tagName": "nord-stack",
7891
9031
  "customElement": true
@@ -7948,20 +9088,6 @@
7948
9088
  "name": "createRenderRoot",
7949
9089
  "privacy": "protected",
7950
9090
  "description": "opt out of shadow dom"
7951
- },
7952
- {
7953
- "kind": "field",
7954
- "name": "_warningLogged",
7955
- "type": {
7956
- "text": "boolean"
7957
- },
7958
- "privacy": "private",
7959
- "static": true,
7960
- "default": "false",
7961
- "inheritedFrom": {
7962
- "name": "DraftComponentMixin",
7963
- "module": "src/common/mixins/DraftComponentMixin.ts"
7964
- }
7965
9091
  }
7966
9092
  ],
7967
9093
  "attributes": [
@@ -7975,17 +9101,11 @@
7975
9101
  "fieldName": "density"
7976
9102
  }
7977
9103
  ],
7978
- "mixins": [
7979
- {
7980
- "name": "DraftComponentMixin",
7981
- "module": "/src/common/mixins/DraftComponentMixin.js"
7982
- }
7983
- ],
7984
9104
  "superclass": {
7985
9105
  "name": "LitElement",
7986
9106
  "package": "lit"
7987
9107
  },
7988
- "status": "draft",
9108
+ "status": "ready",
7989
9109
  "category": "list",
7990
9110
  "tagName": "nord-table",
7991
9111
  "customElement": true
@@ -8419,20 +9539,6 @@
8419
9539
  "name": "FocusableMixin",
8420
9540
  "module": "src/common/mixins/FocusableMixin.ts"
8421
9541
  }
8422
- },
8423
- {
8424
- "kind": "field",
8425
- "name": "_warningLogged",
8426
- "type": {
8427
- "text": "boolean"
8428
- },
8429
- "privacy": "private",
8430
- "static": true,
8431
- "default": "false",
8432
- "inheritedFrom": {
8433
- "name": "DraftComponentMixin",
8434
- "module": "src/common/mixins/DraftComponentMixin.ts"
8435
- }
8436
9542
  }
8437
9543
  ],
8438
9544
  "attributes": [
@@ -8584,17 +9690,13 @@
8584
9690
  {
8585
9691
  "name": "FocusableMixin",
8586
9692
  "module": "/src/common/mixins/FocusableMixin.js"
8587
- },
8588
- {
8589
- "name": "DraftComponentMixin",
8590
- "module": "/src/common/mixins/DraftComponentMixin.js"
8591
9693
  }
8592
9694
  ],
8593
9695
  "superclass": {
8594
9696
  "name": "LitElement",
8595
9697
  "package": "lit"
8596
9698
  },
8597
- "status": "draft",
9699
+ "status": "ready",
8598
9700
  "category": "form",
8599
9701
  "tagName": "nord-textarea",
8600
9702
  "customElement": true,
@@ -8679,9 +9781,23 @@
8679
9781
  },
8680
9782
  {
8681
9783
  "kind": "field",
8682
- "name": "targetElement",
9784
+ "name": "events",
9785
+ "privacy": "private",
9786
+ "default": "new EventController(this)"
9787
+ },
9788
+ {
9789
+ "kind": "field",
9790
+ "name": "currentElement",
9791
+ "type": {
9792
+ "text": "FocusableElement | undefined"
9793
+ },
9794
+ "privacy": "private"
9795
+ },
9796
+ {
9797
+ "kind": "field",
9798
+ "name": "timeoutId",
8683
9799
  "type": {
8684
- "text": "FocusableElement"
9800
+ "text": "ReturnType<typeof setTimeout> | undefined"
8685
9801
  },
8686
9802
  "privacy": "private"
8687
9803
  },
@@ -8693,20 +9809,30 @@
8693
9809
  },
8694
9810
  {
8695
9811
  "kind": "field",
8696
- "name": "visible",
9812
+ "name": "state",
8697
9813
  "type": {
8698
- "text": "boolean"
9814
+ "text": "TooltipStates"
8699
9815
  },
8700
- "default": "false",
8701
- "description": "Determines whether the tooltip is visible or not."
9816
+ "privacy": "private",
9817
+ "default": "\"hidden\"",
9818
+ "description": "The current state of the tooltip, dependent on the state machine"
9819
+ },
9820
+ {
9821
+ "kind": "field",
9822
+ "name": "coords",
9823
+ "type": {
9824
+ "text": "[number, number]"
9825
+ },
9826
+ "privacy": "private",
9827
+ "default": "[0, 0]"
8702
9828
  },
8703
9829
  {
8704
9830
  "kind": "field",
8705
9831
  "name": "position",
8706
9832
  "type": {
8707
- "text": "\"bottom\" | \"top\" | \"left\" | \"right\" | undefined"
9833
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
8708
9834
  },
8709
- "default": "\"top\"",
9835
+ "default": "\"block-start\"",
8710
9836
  "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
8711
9837
  "attribute": "position",
8712
9838
  "reflects": true
@@ -8739,11 +9865,24 @@
8739
9865
  "type": {
8740
9866
  "text": "number"
8741
9867
  },
8742
- "default": "300",
9868
+ "default": "500",
8743
9869
  "description": "The delay in milliseconds before the tooltip is opened.",
8744
9870
  "attribute": "delay",
8745
9871
  "reflects": true
8746
9872
  },
9873
+ {
9874
+ "kind": "method",
9875
+ "name": "handleTransition",
9876
+ "privacy": "private",
9877
+ "parameters": [
9878
+ {
9879
+ "name": "prevState",
9880
+ "type": {
9881
+ "text": "TooltipStates"
9882
+ }
9883
+ }
9884
+ ]
9885
+ },
8747
9886
  {
8748
9887
  "kind": "field",
8749
9888
  "name": "updatePosition",
@@ -8752,57 +9891,47 @@
8752
9891
  },
8753
9892
  {
8754
9893
  "kind": "field",
8755
- "name": "handleScroll",
9894
+ "name": "hideTooltip",
8756
9895
  "privacy": "private"
8757
9896
  },
8758
9897
  {
8759
9898
  "kind": "field",
8760
- "name": "showTooltip",
8761
- "privacy": "private",
8762
- "description": "Show and hide the tooltip using inline styles"
8763
- },
8764
- {
8765
- "kind": "field",
8766
- "name": "hideTooltip",
9899
+ "name": "reposition",
8767
9900
  "privacy": "private"
8768
9901
  },
8769
9902
  {
8770
9903
  "kind": "field",
8771
- "name": "hideOnEscape",
9904
+ "name": "handleShow",
8772
9905
  "privacy": "private"
8773
9906
  },
8774
9907
  {
8775
9908
  "kind": "field",
8776
- "name": "addDescribedBy",
9909
+ "name": "handleHide",
8777
9910
  "privacy": "private"
8778
9911
  },
8779
9912
  {
8780
9913
  "kind": "field",
8781
- "name": "removeDescribedBy",
9914
+ "name": "hideOnEscape",
8782
9915
  "privacy": "private"
8783
9916
  },
8784
9917
  {
8785
9918
  "kind": "field",
8786
- "name": "_warningLogged",
8787
- "type": {
8788
- "text": "boolean"
8789
- },
8790
- "privacy": "private",
8791
- "static": true,
8792
- "default": "false",
8793
- "inheritedFrom": {
8794
- "name": "DraftComponentMixin",
8795
- "module": "src/common/mixins/DraftComponentMixin.ts"
8796
- }
9919
+ "name": "addDescribedBy",
9920
+ "privacy": "private"
9921
+ },
9922
+ {
9923
+ "kind": "field",
9924
+ "name": "removeDescribedBy",
9925
+ "privacy": "private"
8797
9926
  }
8798
9927
  ],
8799
9928
  "attributes": [
8800
9929
  {
8801
9930
  "name": "position",
8802
9931
  "type": {
8803
- "text": "\"bottom\" | \"top\" | \"left\" | \"right\" | undefined"
9932
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
8804
9933
  },
8805
- "default": "\"top\"",
9934
+ "default": "\"block-start\"",
8806
9935
  "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
8807
9936
  "fieldName": "position"
8808
9937
  },
@@ -8829,22 +9958,16 @@
8829
9958
  "type": {
8830
9959
  "text": "number"
8831
9960
  },
8832
- "default": "300",
9961
+ "default": "500",
8833
9962
  "description": "The delay in milliseconds before the tooltip is opened.",
8834
9963
  "fieldName": "delay"
8835
9964
  }
8836
9965
  ],
8837
- "mixins": [
8838
- {
8839
- "name": "DraftComponentMixin",
8840
- "module": "/src/common/mixins/DraftComponentMixin.js"
8841
- }
8842
- ],
8843
9966
  "superclass": {
8844
9967
  "name": "LitElement",
8845
9968
  "package": "lit"
8846
9969
  },
8847
- "status": "draft",
9970
+ "status": "ready",
8848
9971
  "category": "overlay",
8849
9972
  "tagName": "nord-tooltip",
8850
9973
  "customElement": true
@@ -8868,7 +9991,7 @@
8868
9991
  }
8869
9992
  }
8870
9993
  ],
8871
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessability.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n-------\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n-------\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n"
9994
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n"
8872
9995
  },
8873
9996
  {
8874
9997
  "kind": "javascript-module",
@@ -8884,33 +10007,12 @@
8884
10007
  "name": ""
8885
10008
  }
8886
10009
  ],
8887
- "members": [
8888
- {
8889
- "kind": "field",
8890
- "name": "_warningLogged",
8891
- "type": {
8892
- "text": "boolean"
8893
- },
8894
- "privacy": "private",
8895
- "static": true,
8896
- "default": "false",
8897
- "inheritedFrom": {
8898
- "name": "DraftComponentMixin",
8899
- "module": "src/common/mixins/DraftComponentMixin.ts"
8900
- }
8901
- }
8902
- ],
8903
- "mixins": [
8904
- {
8905
- "name": "DraftComponentMixin",
8906
- "module": "/src/common/mixins/DraftComponentMixin.js"
8907
- }
8908
- ],
10010
+ "members": [],
8909
10011
  "superclass": {
8910
10012
  "name": "LitElement",
8911
10013
  "package": "lit"
8912
10014
  },
8913
- "status": "draft",
10015
+ "status": "ready",
8914
10016
  "category": "text",
8915
10017
  "tagName": "nord-visually-hidden",
8916
10018
  "customElement": true
@@ -9009,6 +10111,217 @@
9009
10111
  }
9010
10112
  ]
9011
10113
  },
10114
+ {
10115
+ "kind": "javascript-module",
10116
+ "path": "src/common/controllers/EventController.ts",
10117
+ "declarations": [
10118
+ {
10119
+ "kind": "class",
10120
+ "description": "",
10121
+ "name": "EventController",
10122
+ "members": [
10123
+ {
10124
+ "kind": "field",
10125
+ "name": "listeners",
10126
+ "type": {
10127
+ "text": "Array<() => void>"
10128
+ },
10129
+ "privacy": "private",
10130
+ "default": "[]"
10131
+ },
10132
+ {
10133
+ "kind": "method",
10134
+ "name": "hostDisconnected"
10135
+ },
10136
+ {
10137
+ "kind": "method",
10138
+ "name": "listen",
10139
+ "return": {
10140
+ "type": {
10141
+ "text": "void"
10142
+ }
10143
+ },
10144
+ "parameters": [
10145
+ {
10146
+ "name": "window",
10147
+ "type": {
10148
+ "text": "Window"
10149
+ }
10150
+ },
10151
+ {
10152
+ "name": "type",
10153
+ "type": {
10154
+ "text": "K"
10155
+ }
10156
+ },
10157
+ {
10158
+ "name": "listener",
10159
+ "type": {
10160
+ "text": "(this: Window, ev: WindowEventMap[K]) => any"
10161
+ }
10162
+ },
10163
+ {
10164
+ "name": "options",
10165
+ "optional": true,
10166
+ "type": {
10167
+ "text": "boolean | AddEventListenerOptions"
10168
+ }
10169
+ }
10170
+ ]
10171
+ },
10172
+ {
10173
+ "kind": "method",
10174
+ "name": "listen",
10175
+ "return": {
10176
+ "type": {
10177
+ "text": "void"
10178
+ }
10179
+ },
10180
+ "parameters": [
10181
+ {
10182
+ "name": "document",
10183
+ "type": {
10184
+ "text": "Document"
10185
+ }
10186
+ },
10187
+ {
10188
+ "name": "type",
10189
+ "type": {
10190
+ "text": "K"
10191
+ }
10192
+ },
10193
+ {
10194
+ "name": "listener",
10195
+ "type": {
10196
+ "text": "(this: Document, ev: DocumentEventMap[K]) => any"
10197
+ }
10198
+ },
10199
+ {
10200
+ "name": "options",
10201
+ "optional": true,
10202
+ "type": {
10203
+ "text": "boolean | AddEventListenerOptions"
10204
+ }
10205
+ }
10206
+ ]
10207
+ },
10208
+ {
10209
+ "kind": "method",
10210
+ "name": "listen",
10211
+ "return": {
10212
+ "type": {
10213
+ "text": "void"
10214
+ }
10215
+ },
10216
+ "parameters": [
10217
+ {
10218
+ "name": "element",
10219
+ "type": {
10220
+ "text": "HTMLElement"
10221
+ }
10222
+ },
10223
+ {
10224
+ "name": "type",
10225
+ "type": {
10226
+ "text": "K"
10227
+ }
10228
+ },
10229
+ {
10230
+ "name": "listener",
10231
+ "type": {
10232
+ "text": "(this: HTMLElement, ev: HTMLElementEventMap[K]) => any"
10233
+ }
10234
+ },
10235
+ {
10236
+ "name": "options",
10237
+ "optional": true,
10238
+ "type": {
10239
+ "text": "boolean | AddEventListenerOptions"
10240
+ }
10241
+ }
10242
+ ]
10243
+ },
10244
+ {
10245
+ "kind": "method",
10246
+ "name": "listen",
10247
+ "return": {
10248
+ "type": {
10249
+ "text": "void"
10250
+ }
10251
+ },
10252
+ "parameters": [
10253
+ {
10254
+ "name": "element",
10255
+ "type": {
10256
+ "text": "ShadowRoot"
10257
+ }
10258
+ },
10259
+ {
10260
+ "name": "type",
10261
+ "type": {
10262
+ "text": "K"
10263
+ }
10264
+ },
10265
+ {
10266
+ "name": "listener",
10267
+ "type": {
10268
+ "text": "(this: ShadowRoot, ev: ShadowRootEventMap[K]) => any"
10269
+ }
10270
+ },
10271
+ {
10272
+ "name": "options",
10273
+ "optional": true,
10274
+ "type": {
10275
+ "text": "boolean | AddEventListenerOptions"
10276
+ }
10277
+ }
10278
+ ]
10279
+ },
10280
+ {
10281
+ "kind": "method",
10282
+ "name": "listen",
10283
+ "parameters": [
10284
+ {
10285
+ "name": "element",
10286
+ "type": {
10287
+ "text": "Window | Document | HTMLElement | ShadowRoot"
10288
+ }
10289
+ },
10290
+ {
10291
+ "name": "type",
10292
+ "type": {
10293
+ "text": "string"
10294
+ }
10295
+ },
10296
+ {
10297
+ "name": "listener",
10298
+ "type": {
10299
+ "text": "(ev: any) => any"
10300
+ }
10301
+ },
10302
+ {
10303
+ "name": "options",
10304
+ "optional": true,
10305
+ "type": {
10306
+ "text": "boolean | AddEventListenerOptions"
10307
+ }
10308
+ }
10309
+ ]
10310
+ }
10311
+ ]
10312
+ }
10313
+ ],
10314
+ "exports": [
10315
+ {
10316
+ "kind": "js",
10317
+ "name": "EventController",
10318
+ "declaration": {
10319
+ "name": "EventController",
10320
+ "module": "src/common/controllers/EventController.ts"
10321
+ }
10322
+ }
10323
+ ]
10324
+ },
9012
10325
  {
9013
10326
  "kind": "javascript-module",
9014
10327
  "path": "src/common/controllers/FormDataController.ts",
@@ -9019,12 +10332,17 @@
9019
10332
  "name": "FormDataController",
9020
10333
  "members": [
9021
10334
  {
9022
- "kind": "method",
9023
- "name": "hostConnected"
10335
+ "kind": "field",
10336
+ "name": "events",
10337
+ "type": {
10338
+ "text": "EventController"
10339
+ },
10340
+ "privacy": "private",
10341
+ "default": "new EventController(host)"
9024
10342
  },
9025
10343
  {
9026
10344
  "kind": "method",
9027
- "name": "hostDisconnected"
10345
+ "name": "hostConnected"
9028
10346
  },
9029
10347
  {
9030
10348
  "kind": "field",
@@ -9074,12 +10392,17 @@
9074
10392
  "default": "new ShortcutController(this.host, { Escape: this.handleEsc })"
9075
10393
  },
9076
10394
  {
9077
- "kind": "method",
9078
- "name": "hostConnected"
10395
+ "kind": "field",
10396
+ "name": "events",
10397
+ "type": {
10398
+ "text": "EventController"
10399
+ },
10400
+ "privacy": "private",
10401
+ "default": "new EventController(host)"
9079
10402
  },
9080
10403
  {
9081
10404
  "kind": "method",
9082
- "name": "hostDisconnected"
10405
+ "name": "hostConnected"
9083
10406
  },
9084
10407
  {
9085
10408
  "kind": "field",
@@ -9200,11 +10523,7 @@
9200
10523
  },
9201
10524
  {
9202
10525
  "kind": "method",
9203
- "name": "hostDisconnected",
9204
- "inheritedFrom": {
9205
- "name": "SlotController",
9206
- "module": "src/common/controllers/SlotController.ts"
9207
- }
10526
+ "name": "hostDisconnected"
9208
10527
  },
9209
10528
  {
9210
10529
  "kind": "field",
@@ -9233,6 +10552,19 @@
9233
10552
  "name": "options",
9234
10553
  "default": "options"
9235
10554
  },
10555
+ {
10556
+ "kind": "field",
10557
+ "name": "events",
10558
+ "type": {
10559
+ "text": "EventController"
10560
+ },
10561
+ "privacy": "private",
10562
+ "default": "new EventController(host)",
10563
+ "inheritedFrom": {
10564
+ "name": "SlotController",
10565
+ "module": "src/common/controllers/SlotController.ts"
10566
+ }
10567
+ },
9236
10568
  {
9237
10569
  "kind": "field",
9238
10570
  "name": "hasContent",
@@ -9449,12 +10781,17 @@
9449
10781
  "name": "SlotController",
9450
10782
  "members": [
9451
10783
  {
9452
- "kind": "method",
9453
- "name": "hostConnected"
10784
+ "kind": "field",
10785
+ "name": "events",
10786
+ "type": {
10787
+ "text": "EventController"
10788
+ },
10789
+ "privacy": "private",
10790
+ "default": "new EventController(host)"
9454
10791
  },
9455
10792
  {
9456
10793
  "kind": "method",
9457
- "name": "hostDisconnected"
10794
+ "name": "hostConnected"
9458
10795
  },
9459
10796
  {
9460
10797
  "kind": "field",
@@ -9521,16 +10858,16 @@
9521
10858
  "members": [
9522
10859
  {
9523
10860
  "kind": "field",
9524
- "name": "host",
10861
+ "name": "events",
9525
10862
  "type": {
9526
- "text": "ReactiveElement"
10863
+ "text": "EventController"
9527
10864
  },
9528
10865
  "privacy": "private",
9529
- "default": "host"
10866
+ "default": "new EventController(host)"
9530
10867
  },
9531
10868
  {
9532
10869
  "kind": "field",
9533
- "name": "attached",
10870
+ "name": "hadFirstUpdate",
9534
10871
  "type": {
9535
10872
  "text": "boolean"
9536
10873
  },
@@ -9557,26 +10894,12 @@
9557
10894
  },
9558
10895
  {
9559
10896
  "kind": "field",
9560
- "name": "target",
9561
- "type": {
9562
- "text": "() => HTMLElement"
9563
- },
9564
- "privacy": "private"
9565
- },
9566
- {
9567
- "kind": "field",
9568
- "name": "onSwipeEnd",
10897
+ "name": "options",
9569
10898
  "type": {
9570
- "text": "SwipeControllerOptions[\"onSwipeEnd\"]"
10899
+ "text": "SetRequired<SwipeControllerOptions, \"target\">"
9571
10900
  },
9572
- "privacy": "private"
9573
- },
9574
- {
9575
- "kind": "field",
9576
- "name": "matchesGesture",
9577
- "type": {
9578
- "text": "SwipeControllerOptions[\"matchesGesture\"]"
9579
- }
10901
+ "privacy": "private",
10902
+ "default": "{\n target: () => host,\n ...options,\n }"
9580
10903
  },
9581
10904
  {
9582
10905
  "kind": "method",