@nordhealth/components 3.8.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/custom-elements.json +2487 -1870
  2. package/lib/AutocompleteMixin-3cf61f49.js +2 -0
  3. package/lib/{AutocompleteMixin-5a7e10b2.js.map → AutocompleteMixin-3cf61f49.js.map} +1 -1
  4. package/lib/Avatar.js +1 -1
  5. package/lib/Avatar.js.map +1 -1
  6. package/lib/Badge.js +1 -1
  7. package/lib/Badge.js.map +1 -1
  8. package/lib/Banner.js +1 -1
  9. package/lib/Banner.js.map +1 -1
  10. package/lib/Button.js +1 -1
  11. package/lib/Button.js.map +1 -1
  12. package/lib/ButtonGroup.js +1 -1
  13. package/lib/ButtonGroup.js.map +1 -1
  14. package/lib/{Calendar-38b5ce2b.js → Calendar-dc74855f.js} +2 -2
  15. package/lib/Calendar-dc74855f.js.map +1 -0
  16. package/lib/Calendar.js +1 -1
  17. package/lib/Card.js +1 -1
  18. package/lib/Card.js.map +1 -1
  19. package/lib/Checkbox.js +1 -1
  20. package/lib/Checkbox.js.map +1 -1
  21. package/lib/CommandMenu.js +1 -1
  22. package/lib/CommandMenu.js.map +1 -1
  23. package/lib/CommandMenuAction.js +1 -1
  24. package/lib/CommandMenuAction.js.map +1 -1
  25. package/lib/{Component-2253424f.js → Component-420bbc41.js} +2 -2
  26. package/lib/Component-420bbc41.js.map +1 -0
  27. package/lib/DatePicker.js +1 -1
  28. package/lib/DatePicker.js.map +1 -1
  29. package/lib/DateSelectEvent.js.map +1 -1
  30. package/lib/DirectionController-f35f5476.js.map +1 -1
  31. package/lib/Divider.js +1 -1
  32. package/lib/Divider.js.map +1 -1
  33. package/lib/Drawer.js +1 -1
  34. package/lib/Drawer.js.map +1 -1
  35. package/lib/Dropdown.js +1 -1
  36. package/lib/Dropdown.js.map +1 -1
  37. package/lib/DropdownGroup.js +1 -1
  38. package/lib/DropdownGroup.js.map +1 -1
  39. package/lib/{DropdownItem-588f5a6b.js → DropdownItem-caa387e2.js} +2 -2
  40. package/lib/DropdownItem-caa387e2.js.map +1 -0
  41. package/lib/DropdownItem.js +1 -1
  42. package/lib/DropdownItem.js.map +1 -1
  43. package/lib/EmptyState.js +1 -1
  44. package/lib/EmptyState.js.map +1 -1
  45. package/lib/EventController-d99ebeef.js.map +1 -1
  46. package/lib/Fieldset.js +1 -1
  47. package/lib/Fieldset.js.map +1 -1
  48. package/lib/{FocusableMixin-d30213b4.js → FocusableMixin-4300e44e.js} +2 -2
  49. package/lib/{FocusableMixin-d30213b4.js.map → FocusableMixin-4300e44e.js.map} +1 -1
  50. package/lib/Footer.js +2 -0
  51. package/lib/Footer.js.map +1 -0
  52. package/lib/FormAssociatedMixin-6f1c13ac.js +2 -0
  53. package/lib/FormAssociatedMixin-6f1c13ac.js.map +1 -0
  54. package/lib/FormDataController-592ff3dd.js +2 -0
  55. package/lib/FormDataController-592ff3dd.js.map +1 -0
  56. package/lib/{FormField-87551be2.js → FormField-cbfebb3f.js} +2 -2
  57. package/lib/FormField-cbfebb3f.js.map +1 -0
  58. package/lib/Header.js +1 -1
  59. package/lib/Header.js.map +1 -1
  60. package/lib/Icon.js +1 -1
  61. package/lib/Icon.js.map +1 -1
  62. package/lib/IconManager.js.map +1 -1
  63. package/lib/Input.js +1 -1
  64. package/lib/Input.js.map +1 -1
  65. package/lib/{InputMixin-83b5bd46.js → InputMixin-f9fb4034.js} +2 -2
  66. package/lib/{InputMixin-83b5bd46.js.map → InputMixin-f9fb4034.js.map} +1 -1
  67. package/lib/KeyboardController.js.map +1 -1
  68. package/lib/Layout.js +1 -1
  69. package/lib/Layout.js.map +1 -1
  70. package/lib/LightDismissController-11ae4745.js +2 -0
  71. package/lib/LightDismissController-11ae4745.js.map +1 -0
  72. package/lib/{LightDomController-5388d84c.js → LightDomController-3d3edb76.js} +2 -2
  73. package/lib/{LightDomController-5388d84c.js.map → LightDomController-3d3edb76.js.map} +1 -1
  74. package/lib/LocalizeController.js +1 -1
  75. package/lib/LocalizeController.js.map +1 -1
  76. package/lib/Message.js +1 -1
  77. package/lib/Message.js.map +1 -1
  78. package/lib/Modal.js +1 -1
  79. package/lib/Modal.js.map +1 -1
  80. package/lib/ModalController.js +1 -1
  81. package/lib/ModalController.js.map +1 -1
  82. package/lib/NavGroup.js +1 -1
  83. package/lib/NavGroup.js.map +1 -1
  84. package/lib/NavItem.js +1 -1
  85. package/lib/NavItem.js.map +1 -1
  86. package/lib/{NavToggle-cb2c3648.js → NavToggle-9a4439da.js} +2 -2
  87. package/lib/{NavToggle-cb2c3648.js.map → NavToggle-9a4439da.js.map} +1 -1
  88. package/lib/NavToggle.js +1 -1
  89. package/lib/Navigation.js +1 -1
  90. package/lib/Navigation.js.map +1 -1
  91. package/lib/Notification.js +1 -1
  92. package/lib/Notification.js.map +1 -1
  93. package/lib/NotificationGroup.js +1 -1
  94. package/lib/NotificationGroup.js.map +1 -1
  95. package/lib/{NotificationMixin-207f1f56.js → NotificationMixin-c06bb631.js} +2 -2
  96. package/lib/{NotificationMixin-207f1f56.js.map → NotificationMixin-c06bb631.js.map} +1 -1
  97. package/lib/Popout-e5584f6a.js +2 -0
  98. package/lib/Popout-e5584f6a.js.map +1 -0
  99. package/lib/Popout.js +1 -1
  100. package/lib/ProgressBar.js +1 -1
  101. package/lib/ProgressBar.js.map +1 -1
  102. package/lib/Qrcode.js +1 -1
  103. package/lib/Qrcode.js.map +1 -1
  104. package/lib/Radio.js +1 -1
  105. package/lib/Radio.js.map +1 -1
  106. package/lib/Range.js +1 -1
  107. package/lib/Range.js.map +1 -1
  108. package/lib/ScrollbarController-773c79f4.js.map +1 -1
  109. package/lib/Select.js +1 -1
  110. package/lib/Select.js.map +1 -1
  111. package/lib/SelectEvent.js.map +1 -1
  112. package/lib/ShortcutController-87615e31.js.map +1 -1
  113. package/lib/SizeMixin-fb379434.js +2 -0
  114. package/lib/{SizeMixin-ab074eff.js.map → SizeMixin-fb379434.js.map} +1 -1
  115. package/lib/Skeleton.js +1 -1
  116. package/lib/Skeleton.js.map +1 -1
  117. package/lib/SlotController-d733c575.js.map +1 -1
  118. package/lib/Spinner.js +1 -1
  119. package/lib/Spinner.js.map +1 -1
  120. package/lib/Stack.js +1 -1
  121. package/lib/Stack.js.map +1 -1
  122. package/lib/{Sticky-c34c9b12.js → Sticky-acc92284.js} +2 -2
  123. package/lib/Sticky-acc92284.js.map +1 -0
  124. package/lib/Tab.js +1 -1
  125. package/lib/Tab.js.map +1 -1
  126. package/lib/TabGroup.js +1 -1
  127. package/lib/TabGroup.js.map +1 -1
  128. package/lib/TabPanel.js +1 -1
  129. package/lib/TabPanel.js.map +1 -1
  130. package/lib/Table.js +1 -1
  131. package/lib/Table.js.map +1 -1
  132. package/lib/Tag.js +2 -0
  133. package/lib/Tag.js.map +1 -0
  134. package/lib/{TextField-2d778949.js → TextField-8b226327.js} +2 -2
  135. package/lib/{TextField-2d778949.js.map → TextField-8b226327.js.map} +1 -1
  136. package/lib/Textarea.js +1 -1
  137. package/lib/Textarea.js.map +1 -1
  138. package/lib/Toast.js +1 -1
  139. package/lib/Toast.js.map +1 -1
  140. package/lib/ToastGroup.js +1 -1
  141. package/lib/ToastGroup.js.map +1 -1
  142. package/lib/Toggle.js +1 -1
  143. package/lib/Toggle.js.map +1 -1
  144. package/lib/Tooltip.js +1 -1
  145. package/lib/Tooltip.js.map +1 -1
  146. package/lib/TopBar.js +1 -1
  147. package/lib/TopBar.js.map +1 -1
  148. package/lib/VisuallyHidden.js +1 -1
  149. package/lib/VisuallyHidden.js.map +1 -1
  150. package/lib/bundle.js +18 -35
  151. package/lib/bundle.js.map +1 -1
  152. package/lib/{class-map-512f0bc1.js → class-map-cb77ead2.js} +2 -2
  153. package/lib/class-map-cb77ead2.js.map +1 -0
  154. package/lib/collection-2f8e38bd.js +7 -0
  155. package/lib/collection-2f8e38bd.js.map +1 -0
  156. package/lib/cond-44672025.js +2 -0
  157. package/lib/{cond-bb9ee891.js.map → cond-44672025.js.map} +1 -1
  158. package/lib/{directive-e9ce14b4.js → directive-de55b00a.js} +1 -1
  159. package/lib/directive-de55b00a.js.map +1 -0
  160. package/lib/en-us.js +1 -1
  161. package/lib/en-us.js.map +1 -1
  162. package/lib/events-d9666e88.js.map +1 -1
  163. package/lib/fi-fi.js +1 -1
  164. package/lib/fi-fi.js.map +1 -1
  165. package/lib/{if-defined-cccde88f.js → if-defined-9b177db4.js} +2 -2
  166. package/lib/if-defined-9b177db4.js.map +1 -0
  167. package/lib/index.js +1 -1
  168. package/lib/interface-checked-small-07292940.js +2 -0
  169. package/lib/interface-checked-small-07292940.js.map +1 -0
  170. package/lib/localization9.js +2 -0
  171. package/lib/localization9.js.map +1 -0
  172. package/lib/observe-a9c6dfb6.js.map +1 -1
  173. package/lib/positioning-a572d126.js +2 -0
  174. package/lib/positioning-a572d126.js.map +1 -0
  175. package/lib/{property-c78323b1.js → property-03f59dce.js} +2 -2
  176. package/lib/property-03f59dce.js.map +1 -0
  177. package/lib/{query-36bfe0e4.js → query-2d22378e.js} +1 -1
  178. package/lib/query-2d22378e.js.map +1 -0
  179. package/lib/query-assigned-elements-15485e3d.js +34 -0
  180. package/lib/query-assigned-elements-15485e3d.js.map +1 -0
  181. package/lib/{ref-99418ab4.js → ref-5526fb07.js} +4 -4
  182. package/lib/ref-5526fb07.js.map +1 -0
  183. package/lib/src/avatar/Avatar.d.ts +4 -4
  184. package/lib/src/badge/Badge.d.ts +1 -1
  185. package/lib/src/banner/Banner.d.ts +1 -1
  186. package/lib/src/button-group/ButtonGroup.d.ts +1 -1
  187. package/lib/src/calendar/Calendar.d.ts +3 -3
  188. package/lib/src/card/Card.d.ts +1 -1
  189. package/lib/src/checkbox/Checkbox.d.ts +1 -1
  190. package/lib/src/command-menu/CommandMenu.d.ts +1 -1
  191. package/lib/src/command-menu/CommandMenuAction.d.ts +1 -1
  192. package/lib/src/common/controllers/FocusTrapController.d.ts +2 -8
  193. package/lib/src/common/controllers/LightDismissController.d.ts +3 -1
  194. package/lib/src/common/inert.d.ts +1 -0
  195. package/lib/src/date-picker/DatePicker.d.ts +3 -3
  196. package/lib/src/drawer/Drawer.d.ts +2 -1
  197. package/lib/src/dropdown/Dropdown.d.ts +1 -2
  198. package/lib/src/dropdown-group/DropdownGroup.d.ts +1 -1
  199. package/lib/src/empty-state/EmptyState.d.ts +1 -1
  200. package/lib/src/fieldset/Fieldset.d.ts +1 -1
  201. package/lib/src/footer/Footer.d.ts +25 -0
  202. package/lib/src/footer/Footer.test.d.ts +3 -0
  203. package/lib/src/header/Header.d.ts +1 -1
  204. package/lib/src/icon/Icon.d.ts +1 -1
  205. package/lib/src/index.d.ts +2 -0
  206. package/lib/src/input/Input.d.ts +1 -1
  207. package/lib/src/layout/Layout.d.ts +8 -2
  208. package/lib/src/layout/Layout.test.d.ts +2 -0
  209. package/lib/src/localization/en-us.d.ts +3 -0
  210. package/lib/src/localization/translation.d.ts +3 -0
  211. package/lib/src/message/Message.d.ts +1 -1
  212. package/lib/src/modal/Modal.d.ts +2 -14
  213. package/lib/src/nav-group/NavGroup.d.ts +1 -1
  214. package/lib/src/nav-toggle/NavToggle.d.ts +1 -1
  215. package/lib/src/navigation/Navigation.d.ts +1 -1
  216. package/lib/src/notification/Notification.d.ts +2 -2
  217. package/lib/src/notification-group/NotificationGroup.d.ts +3 -5
  218. package/lib/src/popout/Popout.d.ts +1 -1
  219. package/lib/src/progress-bar/ProgressBar.d.ts +1 -1
  220. package/lib/src/qrcode/Qrcode.d.ts +1 -1
  221. package/lib/src/radio/Radio.d.ts +1 -1
  222. package/lib/src/range/Range.d.ts +1 -1
  223. package/lib/src/select/Select.d.ts +1 -1
  224. package/lib/src/skeleton/Skeleton.d.ts +1 -1
  225. package/lib/src/spinner/Spinner.d.ts +1 -1
  226. package/lib/src/stack/Stack.d.ts +1 -1
  227. package/lib/src/tab/Tab.d.ts +1 -1
  228. package/lib/src/tab-group/TabGroup.d.ts +1 -1
  229. package/lib/src/tab-panel/TabPanel.d.ts +1 -1
  230. package/lib/src/tag/Tag.d.ts +44 -0
  231. package/lib/src/tag/Tag.test.d.ts +6 -0
  232. package/lib/src/tag/localization.d.ts +4 -0
  233. package/lib/src/textarea/Textarea.d.ts +1 -1
  234. package/lib/src/toast/Toast.d.ts +1 -1
  235. package/lib/src/toast-group/ToastGroup.d.ts +1 -1
  236. package/lib/src/toggle/Toggle.d.ts +1 -1
  237. package/lib/src/tooltip/Tooltip.d.ts +1 -1
  238. package/lib/src/top-bar/TopBar.d.ts +1 -1
  239. package/lib/src/visually-hidden/VisuallyHidden.d.ts +1 -1
  240. package/lib/{state-d31c6912.js → state-70f38ceb.js} +2 -2
  241. package/lib/state-70f38ceb.js.map +1 -0
  242. package/lib/style-map-ed7e6cc6.js +7 -0
  243. package/lib/style-map-ed7e6cc6.js.map +1 -0
  244. package/lib/translation.js +1 -1
  245. package/lib/translation.js.map +1 -1
  246. package/package.json +5 -5
  247. package/lib/AutocompleteMixin-5a7e10b2.js +0 -2
  248. package/lib/Calendar-38b5ce2b.js.map +0 -1
  249. package/lib/Component-2253424f.js.map +0 -1
  250. package/lib/DraftComponentMixin-9e4b7b34.js +0 -2
  251. package/lib/DraftComponentMixin-9e4b7b34.js.map +0 -1
  252. package/lib/DropdownItem-588f5a6b.js.map +0 -1
  253. package/lib/FormAssociatedMixin-a278fda4.js +0 -2
  254. package/lib/FormAssociatedMixin-a278fda4.js.map +0 -1
  255. package/lib/FormField-87551be2.js.map +0 -1
  256. package/lib/LightDismissController-a2645ae6.js +0 -2
  257. package/lib/LightDismissController-a2645ae6.js.map +0 -1
  258. package/lib/Popout-2220e77b.js +0 -2
  259. package/lib/Popout-2220e77b.js.map +0 -1
  260. package/lib/SizeMixin-ab074eff.js +0 -2
  261. package/lib/Sticky-c34c9b12.js.map +0 -1
  262. package/lib/class-map-512f0bc1.js.map +0 -1
  263. package/lib/collection-511dcfac.js +0 -7
  264. package/lib/collection-511dcfac.js.map +0 -1
  265. package/lib/cond-bb9ee891.js +0 -2
  266. package/lib/directive-e9ce14b4.js.map +0 -1
  267. package/lib/if-defined-cccde88f.js.map +0 -1
  268. package/lib/positioning-2346bdd6.js +0 -2
  269. package/lib/positioning-2346bdd6.js.map +0 -1
  270. package/lib/property-c78323b1.js.map +0 -1
  271. package/lib/query-36bfe0e4.js.map +0 -1
  272. package/lib/query-assigned-elements-92ce7494.js +0 -51
  273. package/lib/query-assigned-elements-92ce7494.js.map +0 -1
  274. package/lib/ref-99418ab4.js.map +0 -1
  275. package/lib/state-d31c6912.js.map +0 -1
  276. package/lib/style-map-f8a1c8d5.js +0 -7
  277. package/lib/style-map-f8a1c8d5.js.map +0 -1
@@ -14,7 +14,8 @@ type NavState = States<typeof navMachine>;
14
14
  * @slot - The default main section content.
15
15
  * @slot nav - Used to place content inside the navigation sidebar.
16
16
  * @slot top-bar - Used to place the [Top Bar](../top-bar/) component.
17
- * @slot header - Used to place content inside the header section.
17
+ * @slot header - Used to place content inside the header section. This slot can be made sticky by utilizing the `sticky` property on the layout component.
18
+ * @slot footer - Used to place content inside the footer section. This slot can be made sticky by utilizing the `stickyFooter` property on the layout component.
18
19
  * @slot drawer - Used to place additional content/details relating to a selected item.
19
20
  * @slot nav-toggle - Used to place a own nav-toggle component, for cases where you might need to add a tooltip.
20
21
  *
@@ -29,6 +30,7 @@ export default class Layout extends LitElement {
29
30
  private drawerSlot;
30
31
  private topBarSlot;
31
32
  private headerSlot;
33
+ private footerSlot;
32
34
  private direction;
33
35
  private events;
34
36
  private lightDismiss;
@@ -62,6 +64,10 @@ export default class Layout extends LitElement {
62
64
  * Controls whether the layout's header has sticky positioning.
63
65
  */
64
66
  sticky: boolean;
67
+ /**
68
+ * Controls whether the layout's footer has sticky positioning.
69
+ */
70
+ stickyFooter: boolean;
65
71
  /**
66
72
  * A getter whose values reflects whether the layout component considers the viewport to be narrow or not.
67
73
  * A narrow viewport is considered to be less than 768px wide.
@@ -69,7 +75,7 @@ export default class Layout extends LitElement {
69
75
  get isNarrow(): boolean;
70
76
  connectedCallback(): void;
71
77
  willUpdate(): void;
72
- render(): import("lit").TemplateResult<1>;
78
+ render(): import("lit-html").TemplateResult<1>;
73
79
  private renderNavToggle;
74
80
  private renderNavCollapse;
75
81
  protected handleNavWidthChange(): void;
@@ -4,6 +4,7 @@ import "../stack/Stack.js";
4
4
  import "../table/Table.js";
5
5
  import "../input/Input.js";
6
6
  import "../button/Button.js";
7
+ import "../button-group/ButtonGroup.js";
7
8
  import "../header/Header.js";
8
9
  import "../card/Card.js";
9
10
  import "../badge/Badge.js";
@@ -22,3 +23,4 @@ import "../tab/Tab.js";
22
23
  import "../tab-panel/TabPanel.js";
23
24
  import "../tab-group/TabGroup.js";
24
25
  import "../drawer/Drawer.js";
26
+ import "../footer/Footer.js";
@@ -40,5 +40,8 @@ declare const en: {
40
40
  "nord-message": {
41
41
  unreadLabel: string;
42
42
  };
43
+ "nord-tag": {
44
+ removeLabel: string;
45
+ };
43
46
  };
44
47
  export default en;
@@ -67,5 +67,8 @@ export declare function resolveTranslation(langCode: string): {
67
67
  "nord-message": {
68
68
  unreadLabel: string;
69
69
  };
70
+ "nord-tag": {
71
+ removeLabel: string;
72
+ };
70
73
  };
71
74
  export { en as fallback };
@@ -5,7 +5,7 @@ declare const Message_base: (new (...args: any[]) => import("../common/mixins/Fo
5
5
  * such as notifications, tasks or conversations. Message
6
6
  * can be placed directly inside a dropdown component.
7
7
  *
8
- * @status draft
8
+ * @status new
9
9
  * @category action
10
10
  * @slot - The message content.
11
11
  * @slot footer - Used to place content after the message. Typically used for a timestamp.
@@ -1,4 +1,5 @@
1
1
  import { LitElement } from "lit";
2
+ import "../footer/Footer.js";
2
3
  /**
3
4
  * Modal component is used to display content that temporarily blocks interactions
4
5
  * with the main view of an application. Modal should be used sparingly and
@@ -20,19 +21,6 @@ import { LitElement } from "lit";
20
21
  */
21
22
  export default class Modal extends LitElement {
22
23
  static styles: import("lit").CSSResult[];
23
- /**
24
- * @internal
25
- * ensures clicking on the backdrop does not move focus to <body>,
26
- * which can causes issues with focus trapping, and returning focus on modal close,
27
- * when there are multiple modals.
28
- */
29
- static shadowRootOptions: {
30
- delegatesFocus: boolean;
31
- mode: ShadowRootMode;
32
- slotAssignment?: SlotAssignmentMode | undefined;
33
- customElements?: CustomElementRegistry | undefined;
34
- registry?: CustomElementRegistry | undefined;
35
- };
36
24
  private modal;
37
25
  private backdrop;
38
26
  private headerSlot;
@@ -77,7 +65,7 @@ export default class Modal extends LitElement {
77
65
  * @param options An object which controls aspects of the focusing process.
78
66
  */
79
67
  focus(options?: FocusOptions): void;
80
- render(): import("lit").TemplateResult<1>;
68
+ render(): import("lit-html").TemplateResult<1>;
81
69
  protected handleOpenUpdated(prev: boolean): void;
82
70
  private handleDismiss;
83
71
  }
@@ -14,7 +14,7 @@ export default class NavGroup extends LitElement {
14
14
  * Heading and accessible label for the nav group
15
15
  */
16
16
  heading?: string;
17
- render(): import("lit").TemplateResult<1>;
17
+ render(): import("lit-html").TemplateResult<1>;
18
18
  }
19
19
  declare global {
20
20
  interface HTMLElementTagNameMap {
@@ -16,7 +16,7 @@ export default class NavToggle extends NavToggle_base {
16
16
  static styles: import("lit").CSSResult[];
17
17
  private direction;
18
18
  private localization;
19
- render(): import("lit").TemplateResult<1>;
19
+ render(): import("lit-html").TemplateResult<1>;
20
20
  }
21
21
  declare global {
22
22
  interface HTMLElementTagNameMap {
@@ -18,7 +18,7 @@ export default class Navigation extends LitElement {
18
18
  private events;
19
19
  private allowItemsToRemainOpen;
20
20
  connectedCallback(): void;
21
- render(): import("lit").TemplateResult<1>;
21
+ render(): import("lit-html").TemplateResult<1>;
22
22
  private handleActivate;
23
23
  }
24
24
  declare global {
@@ -6,7 +6,7 @@ declare const Notification_base: (new (...args: any[]) => import("../common/mixi
6
6
  * Notifications provide important information that requires action or acknowledgement.
7
7
  * A notification is displayed until the user dismisses it.
8
8
  *
9
- * @status draft
9
+ * @status new
10
10
  * @category feedback
11
11
  * @slot - Default slot used for the notification text/message.
12
12
  * @slot icon - Slot used for the notification icon.
@@ -16,7 +16,7 @@ declare const Notification_base: (new (...args: any[]) => import("../common/mixi
16
16
  export default class Notification extends Notification_base {
17
17
  static styles: import("lit").CSSResult[];
18
18
  private localize;
19
- render(): import("lit").TemplateResult<1>;
19
+ render(): import("lit-html").TemplateResult<1>;
20
20
  }
21
21
  declare global {
22
22
  interface HTMLElementTagNameMap {
@@ -1,19 +1,17 @@
1
1
  import { LitElement } from "lit";
2
- declare const NotificationGroup_base: typeof LitElement;
3
2
  /**
4
3
  * Notification group is used to position and style a group of notifications.
5
4
  *
6
- * @status draft
5
+ * @status new
7
6
  * @category feedback
8
7
  * @slot - Default slot in which to place notifications.
9
8
  */
10
- export default class NotificationGroup extends NotificationGroup_base {
9
+ export default class NotificationGroup extends LitElement {
11
10
  static styles: import("lit").CSSResult[];
12
- render(): import("lit").TemplateResult<1>;
11
+ render(): import("lit-html").TemplateResult<1>;
13
12
  }
14
13
  declare global {
15
14
  interface HTMLElementTagNameMap {
16
15
  "nord-notification-group": NotificationGroup;
17
16
  }
18
17
  }
19
- export {};
@@ -49,7 +49,7 @@ export default class Popout extends Popout_base {
49
49
  firstUpdated(): void;
50
50
  connectedCallback(): void;
51
51
  disconnectedCallback(): void;
52
- render(): import("lit").TemplateResult<1>;
52
+ render(): import("lit-html").TemplateResult<1>;
53
53
  protected handleIdChange(): void;
54
54
  protected handleOpenChange(): void;
55
55
  protected handleAnchorChange(): void;
@@ -32,7 +32,7 @@ export default class ProgressBar extends ProgressBar_base {
32
32
  * for assistive technology.
33
33
  */
34
34
  label: string;
35
- render(): import("lit").TemplateResult<1>;
35
+ render(): import("lit-html").TemplateResult<1>;
36
36
  }
37
37
  declare global {
38
38
  interface HTMLElementTagNameMap {
@@ -42,7 +42,7 @@ export default class Qrcode extends LitElement {
42
42
  correction: "L" | "M" | "Q" | "H";
43
43
  firstUpdated(): void;
44
44
  private generate;
45
- render(): import("lit").TemplateResult<1>;
45
+ render(): import("lit-html").TemplateResult<1>;
46
46
  }
47
47
  declare global {
48
48
  interface HTMLElementTagNameMap {
@@ -29,7 +29,7 @@ export default class Radio extends Radio_base {
29
29
  * Controls whether the checkbox is checked or not.
30
30
  */
31
31
  checked: boolean;
32
- render(): import("lit").TemplateResult<1>;
32
+ render(): import("lit-html").TemplateResult<1>;
33
33
  protected handleCheckedChange(previousChecked: boolean): void;
34
34
  private uncheckSiblings;
35
35
  protected handleChange(e: Event): void;
@@ -34,7 +34,7 @@ export default class Range extends Range_base {
34
34
  * Controls whether the input expands to fill the width of its container.
35
35
  */
36
36
  expand: boolean;
37
- render(): import("lit").TemplateResult<1>;
37
+ render(): import("lit-html").TemplateResult<1>;
38
38
  protected handleInput(e: Event): void;
39
39
  }
40
40
  declare global {
@@ -24,7 +24,7 @@ export default class Select extends Select_base {
24
24
  * Controls whether the select expands to fill the width of its container.
25
25
  */
26
26
  expand: boolean;
27
- render(): import("lit").TemplateResult<1>;
27
+ render(): import("lit-html").TemplateResult<1>;
28
28
  private get options();
29
29
  private getButtonText;
30
30
  private renderOption;
@@ -18,7 +18,7 @@ export default class Skeleton extends LitElement {
18
18
  * The default is no animation.
19
19
  */
20
20
  effect?: "pulse" | "sheen";
21
- render(): import("lit").TemplateResult<1>;
21
+ render(): import("lit-html").TemplateResult<1>;
22
22
  }
23
23
  declare global {
24
24
  interface HTMLElementTagNameMap {
@@ -25,7 +25,7 @@ export default class Spinner extends LitElement {
25
25
  * If no label is supplied, the spinner is hidden from assistive technology.
26
26
  */
27
27
  label?: string;
28
- render(): import("lit").TemplateResult<1>;
28
+ render(): import("lit-html").TemplateResult<1>;
29
29
  }
30
30
  declare global {
31
31
  interface HTMLElementTagNameMap {
@@ -32,7 +32,7 @@ export default class Stack extends LitElement {
32
32
  * How to justify the child items inside the stack.
33
33
  */
34
34
  justifyContent?: "center" | "start" | "end" | "baseline" | "space-between" | "space-around" | "space-evenly";
35
- render(): import("lit").TemplateResult<1>;
35
+ render(): import("lit-html").TemplateResult<1>;
36
36
  }
37
37
  declare global {
38
38
  interface HTMLElementTagNameMap {
@@ -16,7 +16,7 @@ export default class Tab extends LitElement {
16
16
  * Whether the tab item is selected
17
17
  */
18
18
  selected: boolean;
19
- render(): import("lit").TemplateResult<1>;
19
+ render(): import("lit-html").TemplateResult<1>;
20
20
  /**
21
21
  * Apply accessible attributes and values to the tab button.
22
22
  * Observe the selected property if it changes
@@ -35,7 +35,7 @@ export default class TabGroup extends LitElement {
35
35
  * The current tab node selected in the tab group.
36
36
  */
37
37
  private selectedTab;
38
- render(): import("lit").TemplateResult<1>;
38
+ render(): import("lit-html").TemplateResult<1>;
39
39
  connectedCallback(): void;
40
40
  private updateSlots;
41
41
  firstUpdated(): void;
@@ -9,7 +9,7 @@ import { LitElement } from "lit";
9
9
  */
10
10
  export default class TabPanel extends LitElement {
11
11
  static styles: import("lit").CSSResult[];
12
- render(): import("lit").TemplateResult<1>;
12
+ render(): import("lit-html").TemplateResult<1>;
13
13
  connectedCallback(): void;
14
14
  }
15
15
  declare global {
@@ -0,0 +1,44 @@
1
+ import { LitElement } from "lit";
2
+ import { FormDataController } from "../common/controllers/FormDataController.js";
3
+ declare const Tag_base: (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
4
+ /**
5
+ * Tags represent a set of keywords that help label, categorize,
6
+ * and organize objects. Commonly used to signify the attributes of an object.
7
+ *
8
+ * @status draft
9
+ * @category text
10
+ * @slot - The tag content.
11
+ *
12
+ * @localization removeLabel - Accessible label for the remove button.
13
+ */
14
+ export default class Tag extends Tag_base {
15
+ static styles: import("lit").CSSResult[];
16
+ private localize;
17
+ protected formData: FormDataController;
18
+ protected get formValue(): string | undefined;
19
+ protected inputId: string;
20
+ /**
21
+ * The behavioral variant of the tag.
22
+ */
23
+ variant: "default" | "removable" | "selectable";
24
+ /**
25
+ * Controls whether the tag is checked or not (only relevant when variant is set to `selectable`).
26
+ */
27
+ checked: boolean;
28
+ /**
29
+ * The size of the tag. This affects the font-size.
30
+ */
31
+ size: "s" | "m";
32
+ protected handleChange(e: Event): void;
33
+ protected handleRemove(): void;
34
+ render(): import("lit-html").TemplateResult<1>;
35
+ private renderStaticTag;
36
+ private renderRemovableTag;
37
+ private renderSelectableTag;
38
+ }
39
+ declare global {
40
+ interface HTMLElementTagNameMap {
41
+ "nord-tag": Tag;
42
+ }
43
+ }
44
+ export {};
@@ -0,0 +1,6 @@
1
+ import "../stack/Stack.js";
2
+ import "../icon/Icon.js";
3
+ import "../input/Input.js";
4
+ import "../fieldset/Fieldset.js";
5
+ import "../checkbox/Checkbox.js";
6
+ import "../button/Button.js";
@@ -0,0 +1,4 @@
1
+ declare const localization: {
2
+ removeLabel: string;
3
+ };
4
+ export default localization;
@@ -44,7 +44,7 @@ export default class Textarea extends Textarea_base {
44
44
  * When combined with `maxlength`, both the count and the max length are shown.
45
45
  */
46
46
  characterCounter: boolean;
47
- render(): import("lit").TemplateResult<1>;
47
+ render(): import("lit-html").TemplateResult<1>;
48
48
  private renderCharacterCounter;
49
49
  private handleLangChange;
50
50
  protected resizeToFitContent(): void;
@@ -26,7 +26,7 @@ export default class Toast extends Toast_base {
26
26
  * The returned promise resolves when toast's exit animation is complete.
27
27
  */
28
28
  dismiss(): Promise<void>;
29
- render(): import("lit").TemplateResult<1>;
29
+ render(): import("lit-html").TemplateResult<1>;
30
30
  protected handleAutoDismissChange(): void;
31
31
  }
32
32
  declare global {
@@ -10,7 +10,7 @@ type ToastOptions = Partial<Pick<Toast, "variant" | "autoDismiss">>;
10
10
  */
11
11
  export default class ToastGroup extends LitElement {
12
12
  static styles: import("lit").CSSResult[];
13
- render(): import("lit").TemplateResult<1>;
13
+ render(): import("lit-html").TemplateResult<1>;
14
14
  /**
15
15
  * Convenience method for creating and adding a toast to the group.
16
16
  * @param {string} text - The text/message of the toast.
@@ -27,7 +27,7 @@ export default class Toggle extends Toggle_base {
27
27
  * The size of the toggle switch.
28
28
  */
29
29
  size: "s" | "m" | "l";
30
- render(): import("lit").TemplateResult<1>;
30
+ render(): import("lit-html").TemplateResult<1>;
31
31
  protected handleChange(e: Event): void;
32
32
  }
33
33
  declare global {
@@ -52,7 +52,7 @@ export default class Tooltip extends LitElement {
52
52
  * Apply all event listeners
53
53
  */
54
54
  connectedCallback(): void;
55
- render(): import("lit").TemplateResult<1>;
55
+ render(): import("lit-html").TemplateResult<1>;
56
56
  protected handleIdChange(): void;
57
57
  private handleStateChange;
58
58
  /**
@@ -8,7 +8,7 @@ import { LitElement } from "lit";
8
8
  */
9
9
  export default class TopBar extends LitElement {
10
10
  static styles: import("lit").CSSResult[];
11
- render(): import("lit").TemplateResult<1>;
11
+ render(): import("lit-html").TemplateResult<1>;
12
12
  }
13
13
  declare global {
14
14
  interface HTMLElementTagNameMap {
@@ -10,7 +10,7 @@ import { LitElement } from "lit";
10
10
  */
11
11
  export default class VisuallyHidden extends LitElement {
12
12
  static styles: import("lit").CSSResult;
13
- render(): import("lit").TemplateResult<1>;
13
+ render(): import("lit-html").TemplateResult<1>;
14
14
  }
15
15
  declare global {
16
16
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
- import{n as r}from"./property-c78323b1.js";
1
+ import{e as r}from"./property-03f59dce.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */function t(t){return r({...t,state:!0})}export{t};
7
- //# sourceMappingURL=state-d31c6912.js.map
7
+ //# sourceMappingURL=state-70f38ceb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state-70f38ceb.js","sources":["../node_modules/@lit/reactive-element/decorators/state.js"],"sourcesContent":["import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n"],"names":["t","r","state"],"mappings":";;;;;GAKG,SAASA,EAAEA,GAAG,OAAOC,EAAE,IAAID,EAAEE,OAAM,GAAI"}
@@ -0,0 +1,7 @@
1
+ import{T as t}from"./query-assigned-elements-15485e3d.js";import{e,i as r,t as s}from"./directive-de55b00a.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */const n="important",i=" !"+n,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ut){this.ut=new Set;for(const t in r)this.ut.add(t);return this.render(r)}this.ut.forEach((t=>{null==r[t]&&(this.ut.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const t in r){const e=r[t];if(null!=e){this.ut.add(t);const r="string"==typeof e&&e.endsWith(i);t.includes("-")||r?s.setProperty(t,r?e.slice(0,-11):e,r?n:""):s[t]=e}}return t}});export{o};
7
+ //# sourceMappingURL=style-map-ed7e6cc6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-map-ed7e6cc6.js","sources":["../node_modules/lit-html/directives/style-map.js"],"sourcesContent":["import{noChange as t}from\"../lit-html.js\";import{directive as e,Directive as r,PartType as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const i=\"important\",n=\" !\"+i,o=e(class extends r{constructor(t){var e;if(super(t),t.type!==s.ATTRIBUTE||\"style\"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error(\"The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.\")}render(t){return Object.keys(t).reduce(((e,r)=>{const s=t[r];return null==s?e:e+`${r=r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,\"-$&\").toLowerCase()}:${s};`}),\"\")}update(e,[r]){const{style:s}=e.element;if(void 0===this.ut){this.ut=new Set;for(const t in r)this.ut.add(t);return this.render(r)}this.ut.forEach((t=>{null==r[t]&&(this.ut.delete(t),t.includes(\"-\")?s.removeProperty(t):s[t]=\"\")}));for(const t in r){const e=r[t];if(null!=e){this.ut.add(t);const r=\"string\"==typeof e&&e.endsWith(n);t.includes(\"-\")||r?s.setProperty(t,r?e.slice(0,-11):e,r?i:\"\"):s[t]=e}}return t}});export{o as styleMap};\n//# sourceMappingURL=style-map.js.map\n"],"names":["i","n","o","e","r","constructor","t","super","type","s","ATTRIBUTE","name","strings","length","Error","render","Object","keys","reduce","replace","toLowerCase","update","style","element","this","ut","Set","add","forEach","delete","includes","removeProperty","endsWith","setProperty","slice"],"mappings":";;;;;GAKQ,MAACA,EAAE,YAAYC,EAAE,KAAKD,EAAEE,EAAEC,EAAE,cAAcC,EAAEC,YAAYC,GAAG,IAAIH,EAAE,GAAGI,MAAMD,GAAGA,EAAEE,OAAOC,EAAEC,WAAW,UAAUJ,EAAEK,OAAO,QAAQR,EAAEG,EAAEM,eAAU,IAAST,OAAE,EAAOA,EAAEU,QAAQ,EAAE,MAAMC,MAAM,6GAA6G,CAACC,OAAOT,GAAG,OAAOU,OAAOC,KAAKX,GAAGY,QAAM,CAAGf,EAAEC,KAAK,MAAMK,EAAEH,EAAEF,GAAG,OAAO,MAAMK,EAAEN,EAAEA,EAAE,GAAGC,EAAEA,EAAEe,QAAQ,oCAAoC,OAAOC,iBAAiBX,IAAK,GAAE,GAAG,CAACY,OAAOlB,GAAGC,IAAI,MAAMkB,MAAMb,GAAGN,EAAEoB,QAAQ,QAAG,IAASC,KAAKC,GAAG,CAACD,KAAKC,GAAG,IAAIC,IAAI,IAAI,MAAMpB,KAAKF,EAAEoB,KAAKC,GAAGE,IAAIrB,GAAG,OAAOkB,KAAKT,OAAOX,EAAE,CAACoB,KAAKC,GAAGG,SAAStB,IAAI,MAAMF,EAAEE,KAAKkB,KAAKC,GAAGI,OAAOvB,GAAGA,EAAEwB,SAAS,KAAKrB,EAAEsB,eAAezB,GAAGG,EAAEH,GAAG,GAAI,IAAG,IAAI,MAAMA,KAAKF,EAAE,CAAC,MAAMD,EAAEC,EAAEE,GAAG,GAAG,MAAMH,EAAE,CAACqB,KAAKC,GAAGE,IAAIrB,GAAG,MAAMF,EAAE,iBAAiBD,GAAGA,EAAE6B,SAAS/B,GAAGK,EAAEwB,SAAS,MAAM1B,EAAEK,EAAEwB,YAAY3B,EAAEF,EAAED,EAAE+B,MAAM,GAAG,IAAI/B,EAAEC,EAAEJ,EAAE,IAAIS,EAAEH,GAAGH,CAAC,CAAC,CAAC,OAAOG,CAAC"}
@@ -1,2 +1,2 @@
1
- import t from"./en-us.js";export{default as fallback}from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";const o=new Set,n=new Map;function i(){for(const t of o)t()}function e(){n.clear()}function a(...t){t.forEach((t=>{const o=t.$lang.toLowerCase();n.set(o,t)})),i()}function r(t){return o.add(t),()=>o.delete(t)}function l(t){return n.has(t)}function s(o){const i=o.toLowerCase(),[e]=i.split("-");return n.get(i)||n.get(e)||t}new MutationObserver(i).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});export{e as clearTranslations,l as isTranslationRegistered,a as registerTranslation,s as resolveTranslation,r as subscribe};
1
+ import t from"./en-us.js";export{default as fallback}from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";import"./localization9.js";const o=new Set,i=new Map;function n(){for(const t of o)t()}function a(){i.clear()}function e(...t){t.forEach((t=>{const o=t.$lang.toLowerCase();i.set(o,t)})),n()}function r(t){return o.add(t),()=>o.delete(t)}function l(t){return i.has(t)}function s(o){const n=o.toLowerCase(),[a]=n.split("-");return i.get(n)||i.get(a)||t}new MutationObserver(n).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});export{a as clearTranslations,l as isTranslationRegistered,e as registerTranslation,s as resolveTranslation,r as subscribe};
2
2
  //# sourceMappingURL=translation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation.js","sources":["../src/localization/translation.ts"],"sourcesContent":["import en from \"./en-us.js\"\n\n// gets list of properties beginning prefix\ntype PickStartsWith<T, Prefix extends string> = T extends `${Prefix}${string}` ? T : never\n\nexport type Translation = typeof en\nexport type WellKnownKeys = PickStartsWith<keyof Translation, \"$\">\n\nconst subscribers = new Set<() => void>()\nconst translations = new Map<string, Translation>()\n\nfunction update() {\n for (const subscriber of subscribers) {\n subscriber()\n }\n}\n\n// observe changes to the document's lang\nconst observer = new MutationObserver(update)\nobserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"lang\"],\n})\n\n/**\n * Removes all registered translations\n */\nexport function clearTranslations() {\n translations.clear()\n}\n\n/**\n * Registers one or more translations\n */\nexport function registerTranslation(...translation: Translation[]) {\n translation.forEach(t => {\n const lang = t.$lang.toLowerCase()\n translations.set(lang, t)\n })\n\n update()\n}\n\n/**\n * subscribe to language changes\n * @param onChange callback for when either `lang` attr changes, or a new language is registered.\n * @returns cleanup function\n */\nexport function subscribe(onChange: () => void): () => void {\n subscribers.add(onChange)\n return () => subscribers.delete(onChange)\n}\n\n/**\n * Check whether there is a translation registered for the given lang\n * @param lang the lang code e.g. \"en\" or \"en-GB\"\n */\nexport function isTranslationRegistered(lang: string) {\n return translations.has(lang)\n}\n\n/**\n * Picks the most appropriate translation for the given language, from most specific to least specific.\n * First tries lang + region, then lang only, then fallback.\n */\nexport function resolveTranslation(langCode: string) {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split(\"-\")\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\n\nexport { en as fallback }\n"],"names":["subscribers","Set","translations","Map","update","subscriber","clearTranslations","clear","registerTranslation","translation","forEach","t","lang","$lang","toLowerCase","set","subscribe","onChange","add","delete","isTranslationRegistered","has","resolveTranslation","langCode","langOnly","split","get","en","MutationObserver","observe","document","documentElement","attributes","attributeFilter"],"mappings":"6RAQA,MAAMA,EAAc,IAAIC,IAClBC,EAAe,IAAIC,IAEzB,SAASC,IACP,IAAK,MAAMC,KAAcL,EACvBK,GAEJ,UAYgBC,IACdJ,EAAaK,OACf,CAKgB,SAAAC,KAAuBC,GACrCA,EAAYC,SAAQC,IAClB,MAAMC,EAAOD,EAAEE,MAAMC,cACrBZ,EAAaa,IAAIH,EAAMD,EAAE,IAG3BP,GACF,CAOM,SAAUY,EAAUC,GAExB,OADAjB,EAAYkB,IAAID,GACT,IAAMjB,EAAYmB,OAAOF,EAClC,CAMM,SAAUG,EAAwBR,GACtC,OAAOV,EAAamB,IAAIT,EAC1B,CAMM,SAAUU,EAAmBC,GACjC,MAAMX,EAAOW,EAAST,eACfU,GAAYZ,EAAKa,MAAM,KAE9B,OAAOvB,EAAawB,IAAId,IAASV,EAAawB,IAAIF,IAAaG,CACjE,CApDiB,IAAIC,iBAAiBxB,GAC7ByB,QAAQC,SAASC,gBAAiB,CACzCC,YAAY,EACZC,gBAAiB,CAAC"}
1
+ {"version":3,"file":"translation.js","sources":["../src/localization/translation.ts"],"sourcesContent":["import en from \"./en-us.js\"\n\n// gets list of properties beginning prefix\ntype PickStartsWith<T, Prefix extends string> = T extends `${Prefix}${string}` ? T : never\n\nexport type Translation = typeof en\nexport type WellKnownKeys = PickStartsWith<keyof Translation, \"$\">\n\nconst subscribers = new Set<() => void>()\nconst translations = new Map<string, Translation>()\n\nfunction update() {\n for (const subscriber of subscribers) {\n subscriber()\n }\n}\n\n// observe changes to the document's lang\nconst observer = new MutationObserver(update)\nobserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"lang\"],\n})\n\n/**\n * Removes all registered translations\n */\nexport function clearTranslations() {\n translations.clear()\n}\n\n/**\n * Registers one or more translations\n */\nexport function registerTranslation(...translation: Translation[]) {\n translation.forEach(t => {\n const lang = t.$lang.toLowerCase()\n translations.set(lang, t)\n })\n\n update()\n}\n\n/**\n * subscribe to language changes\n * @param onChange callback for when either `lang` attr changes, or a new language is registered.\n * @returns cleanup function\n */\nexport function subscribe(onChange: () => void): () => void {\n subscribers.add(onChange)\n return () => subscribers.delete(onChange)\n}\n\n/**\n * Check whether there is a translation registered for the given lang\n * @param lang the lang code e.g. \"en\" or \"en-GB\"\n */\nexport function isTranslationRegistered(lang: string) {\n return translations.has(lang)\n}\n\n/**\n * Picks the most appropriate translation for the given language, from most specific to least specific.\n * First tries lang + region, then lang only, then fallback.\n */\nexport function resolveTranslation(langCode: string) {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split(\"-\")\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\n\nexport { en as fallback }\n"],"names":["subscribers","Set","translations","Map","update","subscriber","clearTranslations","clear","registerTranslation","translation","forEach","t","lang","$lang","toLowerCase","set","subscribe","onChange","add","delete","isTranslationRegistered","has","resolveTranslation","langCode","langOnly","split","get","en","MutationObserver","observe","document","documentElement","attributes","attributeFilter"],"mappings":"wTAQA,MAAMA,EAAc,IAAIC,IAClBC,EAAe,IAAIC,IAEzB,SAASC,IACP,IAAK,MAAMC,KAAcL,EACvBK,GAEJ,UAYgBC,IACdJ,EAAaK,OACf,CAKgB,SAAAC,KAAuBC,GACrCA,EAAYC,SAAQC,IAClB,MAAMC,EAAOD,EAAEE,MAAMC,cACrBZ,EAAaa,IAAIH,EAAMD,EAAE,IAG3BP,GACF,CAOM,SAAUY,EAAUC,GAExB,OADAjB,EAAYkB,IAAID,GACT,IAAMjB,EAAYmB,OAAOF,EAClC,CAMM,SAAUG,EAAwBR,GACtC,OAAOV,EAAamB,IAAIT,EAC1B,CAMM,SAAUU,EAAmBC,GACjC,MAAMX,EAAOW,EAAST,eACfU,GAAYZ,EAAKa,MAAM,KAE9B,OAAOvB,EAAawB,IAAId,IAASV,EAAawB,IAAIF,IAAaG,CACjE,CApDiB,IAAIC,iBAAiBxB,GAC7ByB,QAAQC,SAASC,gBAAiB,CACzCC,YAAY,EACZC,gBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordhealth/components",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "description": "This package includes Nord Design System Web Components",
5
5
  "author": "Nordhealth <support@nordhealth.design>",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -43,10 +43,10 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@custom-elements-manifest/analyzer": "0.8.2",
46
- "@nordhealth/css": "^3.1.1",
46
+ "@nordhealth/css": "^3.2.0",
47
47
  "@nordhealth/fonts": "^3.0.0",
48
- "@nordhealth/themes": "^8.0.1",
49
- "@nordhealth/tokens": "^7.0.1",
48
+ "@nordhealth/themes": "^8.0.2",
49
+ "@nordhealth/tokens": "^7.1.0",
50
50
  "@open-wc/eslint-config": "10.0.0",
51
51
  "@open-wc/testing": "3.1.8",
52
52
  "@rollup/plugin-node-resolve": "15.0.2",
@@ -184,5 +184,5 @@
184
184
  }
185
185
  ]
186
186
  },
187
- "gitHead": "03f3b3b0f614c9c42a827b271edb7f234bedde34"
187
+ "gitHead": "b0809f6fb370174be4c67e46472ddd18f882b2c1"
188
188
  }
@@ -1,2 +0,0 @@
1
- import{_ as e}from"./query-assigned-elements-92ce7494.js";import{n as o}from"./property-c78323b1.js";function t(t){class r extends t{constructor(){super(...arguments),this.autocomplete="off"}}return e([o()],r.prototype,"autocomplete",void 0),r}export{t as A};
2
- //# sourceMappingURL=AutocompleteMixin-5a7e10b2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Calendar-38b5ce2b.js","sources":["../../icons/lib/assets/arrow-right-small.js","../../icons/lib/assets/arrow-left-small.js","../../icons/lib/assets/arrow-down-small.js","../src/common/controllers/SwipeController.ts","../src/calendar/Calendar.ts"],"sourcesContent":["export default '<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m6.92903.100342-2.12132 2.121318 7.77819 7.77818-7.77828 7.77826 2.12132 2.1213 8.48536-8.4853c.7811-.7811.7811-2.04743 0-2.82848z\" fill=\"currentColor\"/></svg>'\nexport const title = \"arrow-right-small\"\nexport const tags = \"nordicon arrow right small caret pointing triangle chevron\"\n","export default '<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m13.0712.105225 2.1213 2.121315-7.77816 7.77816 7.77826 7.7783-2.1213 2.1213-8.48539-8.4854c-.78105-.781-.78105-2.04735 0-2.82839z\" fill=\"currentColor\"/></svg>'\nexport const title = \"arrow-left-small\"\nexport const tags = \"nordicon arrow left small caret pointing triangle chevron\"\n","export default '<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m.100342 6.92903 2.121318-2.12132 7.77818 7.77819 7.77826-7.77828 2.1213 2.12132-8.4853 8.48536c-.7811.7811-2.04743.7811-2.82848 0z\" fill=\"currentColor\"/></svg>'\nexport const title = \"arrow-down-small\"\nexport const tags = \"nordicon arrow down small caret pointing triangle chevron\"\n","import { ReactiveController, ReactiveElement } from \"lit\"\nimport { EventController } from \"./EventController.js\"\n\nexport type SwipeDetails = {\n initialX: number\n initialY: number\n pageX: number\n pageY: number\n distX: number\n distY: number\n}\n\nconst preventDefault = (e: Event) => e.preventDefault()\n\ntype SetRequired<T, K extends keyof T> = T & { [Property in K]-?: T[K] }\ntype SwipeControllerOptions = {\n target?: () => HTMLElement\n matchesGesture: (details: SwipeDetails) => boolean\n onSwipeEnd: (details: SwipeDetails) => void\n}\n\nexport class SwipeController implements ReactiveController {\n private events: EventController\n private hadFirstUpdate = false\n\n private initialTouchX: number = 0\n private initialTouchY: number = 0\n private options: SetRequired<SwipeControllerOptions, \"target\">\n\n constructor(host: ReactiveElement, options: SwipeControllerOptions) {\n host.addController(this)\n this.events = new EventController(host)\n\n this.options = {\n target: () => host,\n ...options,\n }\n }\n\n hostUpdated() {\n if (!this.hadFirstUpdate) {\n this.hadFirstUpdate = true\n\n const target = this.options.target()\n this.events.listen(target, \"touchstart\", this.handleTouchStart)\n this.events.listen(target, \"touchmove\", preventDefault)\n this.events.listen(target, \"touchend\", this.handleTouchEnd)\n }\n }\n\n hostDisconnected() {\n this.hadFirstUpdate = false\n }\n\n private handleTouchStart = (event: TouchEvent) => {\n const [{ pageX, pageY }] = event.changedTouches\n this.initialTouchX = pageX\n this.initialTouchY = pageY\n }\n\n private handleTouchEnd = (event: TouchEvent) => {\n const [{ pageX, pageY }] = event.changedTouches\n const { matchesGesture, onSwipeEnd } = this.options\n\n const distX = pageX - this.initialTouchX\n const distY = pageY - this.initialTouchY\n const details = { initialX: this.initialTouchX, initialY: this.initialTouchY, pageX, pageY, distX, distY }\n\n if (matchesGesture(details)) {\n event.preventDefault()\n onSwipeEnd(details)\n }\n }\n}\n\nconst THRESHOLD = 70\n\nexport const isHorizontalSwipe = ({ distX, distY }: SwipeDetails) =>\n Math.abs(distX) >= THRESHOLD && Math.abs(distY) <= THRESHOLD\n\nexport const isDownwardsSwipe = ({ distX, distY }: SwipeDetails) =>\n Math.abs(distY) >= THRESHOLD && Math.abs(distX) <= THRESHOLD && distY > 0\n","import { html, LitElement } from \"lit\"\nimport { customElement, property, query, state } from \"lit/decorators.js\"\nimport { classMap } from \"lit/directives/class-map.js\"\nimport { repeat } from \"lit/directives/repeat.js\"\nimport { createKeybindingsHandler } from \"tinykeys\"\nimport * as arrowRightIcon from \"@nordhealth/icons/lib/assets/arrow-right-small.js\"\nimport * as arrowLeftIcon from \"@nordhealth/icons/lib/assets/arrow-left-small.js\"\nimport * as arrowDownIcon from \"@nordhealth/icons/lib/assets/arrow-down-small.js\"\n\nimport \"../button/Button.js\"\nimport \"../visually-hidden/VisuallyHidden.js\"\nimport Icon from \"../icon/Icon.js\"\n\nimport { isHorizontalSwipe, SwipeController } from \"../common/controllers/SwipeController.js\"\nimport { DirectionController } from \"../common/controllers/DirectionController.js\"\nimport { LocalizeController } from \"../localization/LocalizeController.js\"\nimport { chunk, mapWithOffset } from \"../common/collection.js\"\nimport { cond } from \"../common/directives/cond.js\"\nimport { range } from \"../common/number.js\"\nimport {\n addDays,\n clamp,\n DaysOfWeek,\n endOfMonth,\n endOfWeek,\n getDayNames,\n getMonthNames,\n getViewOfMonth,\n inRange,\n isEqual,\n isEqualMonth,\n parseISODate,\n printISODate,\n setMonth,\n setYear,\n startOfMonth,\n startOfWeek,\n} from \"../common/dates.js\"\nimport { observe } from \"../common/decorators/observe.js\"\n\nimport { DateSelectEvent } from \"./DateSelectEvent.js\"\nimport componentStyle from \"../common/styles/Component.css\"\nimport style from \"./Calendar.css\"\n\nexport type DatePredicate = (date: Date) => boolean\n\nIcon.registerIcon(arrowRightIcon)\nIcon.registerIcon(arrowLeftIcon)\nIcon.registerIcon(arrowDownIcon)\n\nconst preventDefault = (fn: EventListener) => (e: Event) => {\n e.preventDefault()\n fn(e)\n}\n\nconst isDateDisabled: DatePredicate = () => false\nconst isDateHighlighted = () => false\n\nconst dialogLabelId = \"dialog-header\"\n\n/**\n * Calendar allows user to pick a date. It comes with built-in\n * functionality that allows you to set a minimum and a maximum allowed date.\n * Please note that the date must be passed in ISO-8601 format.\n *\n * @status ready\n * @category list\n * @fires {DateSelectEvent} change - Dispatched when a date is selected and the value changes.\n * @fires {DateSelectEvent} nord-focus-date - Dispatched when the calendar's focused date changes.\n *\n * @cssprop [--n-calendar-border-radius=var(--n-border-radius)] - Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).\n * @cssprop [--n-calendar-box-shadow=var(--n-box-shadow-popout)] - Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).\n *\n * @localization prevMonthLabel - Accessible label for the previous month button.\n * @localization nextMonthLabel - Accessible label for the next month button.\n * @localization monthSelectLabel - Accessible label for the month select.\n * @localization yearSelectLabel - Accessible label for the year select.\n */\n@customElement(\"nord-calendar\")\nexport default class Calendar extends LitElement {\n static styles = [componentStyle, style]\n\n @query(\".n-calendar-select-month\", true) private monthSelectNode!: HTMLElement\n @query(`button[tabindex=\"0\"]`) private focusedDayNode!: HTMLButtonElement\n\n private direction = new DirectionController(this)\n private swipe = new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })\n\n private shortcuts = createKeybindingsHandler({\n ArrowRight: preventDefault(() => this.addDays(this.direction.isLTR ? 1 : -1)),\n ArrowLeft: preventDefault(() => this.addDays(this.direction.isLTR ? -1 : 1)),\n ArrowDown: preventDefault(() => this.addDays(7)),\n ArrowUp: preventDefault(() => this.addDays(-7)),\n Home: preventDefault(() => this.startOfWeek()),\n End: preventDefault(() => this.endOfWeek()),\n PageUp: preventDefault(() => this.addMonths(-1)),\n PageDown: preventDefault(() => this.addMonths(1)),\n \"Shift+PageUp\": preventDefault(() => this.addYears(-1)),\n \"Shift+PageDown\": preventDefault(() => this.addYears(1)),\n })\n\n private localize = new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })\n\n /**\n * Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\n * these are used to format dates exclusively for the benefit of screen readers.\n *\n * We prefer DateTimeFormat over date.toLocaleDateString, as the former has\n * better performance when formatting large number of dates. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance\n */\n private dateFormatShort!: Intl.DateTimeFormat\n private monthNames!: string[]\n private monthNamesShort!: string[]\n private dayNames!: string[]\n private dayNamesShort!: string[]\n\n /**\n * The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.\n */\n @property() value: string = \"\"\n\n /**\n * Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\n * Default is Monday.\n */\n @property({ type: Number }) firstDayOfWeek: DaysOfWeek = DaysOfWeek.Monday\n\n /**\n * Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the max property.\n */\n @property() min: string = \"\"\n\n /**\n * Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\n * This setting can be used alone or together with the min property.\n */\n @property() max: string = \"\"\n\n /**\n * Controls whether the calendar expands to fill the width of its container.\n */\n @property({ reflect: true, type: Boolean }) expand = false\n\n /**\n * Controls which days are disabled and therefore disallowed.\n * For example, this can be used to disallow selection of weekends.\n */\n @property({ attribute: false }) isDateDisabled: DatePredicate = isDateDisabled\n\n /**\n * Controls which days are highlighted with a small indicator.\n * Returning a \"falsy\" value will not show an indicator.\n * Returning \"truthy\" value will show the indicator, but without an accessible label.\n * Returning a string will show the indicator, and use the string as accessible label.\n * It is recommended to return a string rather than a truthy value whenever possible.\n */\n @property({ attribute: false }) isDateHighlighted: (date: Date) => string | boolean = isDateHighlighted\n\n @state() private activeFocus = false\n @state() private focusedDay = new Date()\n\n /**\n * Programmatically move focus to the calendar.\n * @param options An object which controls aspects of the focusing process.\n */\n focus(options?: FocusOptions & { target: \"day\" | \"month\" }) {\n const target = options?.target ?? \"day\"\n\n if (target === \"day\") {\n this.focusedDayNode.focus()\n } else if (target === \"month\") {\n this.monthSelectNode.focus()\n }\n }\n\n render() {\n const today = new Date()\n const valueAsDate = parseISODate(this.value)\n const focusedMonth = this.focusedDay.getMonth()\n const focusedYear = this.focusedDay.getFullYear()\n\n const minDate = parseISODate(this.min)\n const maxDate = parseISODate(this.max)\n const minDateStartOfMonth = minDate ? startOfMonth(minDate) : undefined\n const maxDateEndOfMonth = maxDate ? endOfMonth(maxDate) : undefined\n\n const selectedYear = (valueAsDate || this.focusedDay).getFullYear()\n const minYear = minDate ? minDate.getFullYear() : selectedYear - 10\n const maxYear = maxDate ? maxDate.getFullYear() : selectedYear + 10\n\n return html`\n <div class=\"n-calendar\">\n <div class=\"n-calendar-header\">\n <div>\n <nord-visually-hidden>\n <h2 id=${dialogLabelId} aria-live=\"polite\" aria-atomic=\"true\">\n ${this.monthNames[focusedMonth]}, ${this.focusedDay.getFullYear()}\n </h2>\n </nord-visually-hidden>\n\n <div class=\"n-calendar-select\">\n <select\n aria-label=${this.localize.term(\"monthSelectLabel\")}\n class=\"n-calendar-select-month\"\n @input=${this.handleMonthSelect}\n >\n ${this.monthNames.map(\n (month, i) =>\n html`\n <option\n value=${i}\n ?selected=${i === focusedMonth}\n ?disabled=${!inRange(new Date(focusedYear, i, 1), minDateStartOfMonth, maxDateEndOfMonth)}\n >\n ${month}\n </option>\n `\n )}\n </select>\n <div class=\"n-calendar-select-label\" aria-hidden=\"true\">\n <span>${this.monthNamesShort[focusedMonth]}</span>\n <nord-icon color=\"var(--n-color-icon)\" name=\"arrow-down-small\" size=\"xxs\"></nord-icon>\n </div>\n </div>\n\n <div class=\"n-calendar-select\">\n <select\n aria-label=${this.localize.term(\"yearSelectLabel\")}\n class=\"n-calendar-select-year\"\n @input=${this.handleYearSelect}\n >\n ${repeat(\n range(minYear, maxYear),\n year => year,\n year => html`<option ?selected=${year === focusedYear}>${year}</option>`\n )}\n </select>\n <div class=\"n-calendar-select-label\" aria-hidden=\"true\">\n <span>${this.focusedDay.getFullYear()}</span>\n <nord-icon color=\"var(--n-color-icon)\" name=\"arrow-down-small\" size=\"xxs\"></nord-icon>\n </div>\n </div>\n </div>\n\n <div class=\"n-calendar-nav\">\n <nord-button\n class=\"n-calendar-prev\"\n @click=${this.handlePreviousMonthClick}\n ?disabled=${isEqualMonth(minDate, this.focusedDay)}\n type=\"button\"\n >\n <nord-visually-hidden>${this.localize.term(\"prevMonthLabel\")}</nord-visually-hidden>\n <nord-icon name=${this.direction.isLTR ? \"arrow-left-small\" : \"arrow-right-small\"} size=\"s\"></nord-icon>\n </nord-button>\n\n <nord-button\n class=\"n-calendar-next\"\n @click=${this.handleNextMonthClick}\n ?disabled=${isEqualMonth(maxDate, this.focusedDay)}\n type=\"button\"\n >\n <nord-visually-hidden>${this.localize.term(\"nextMonthLabel\")}</nord-visually-hidden>\n <nord-icon name=${this.direction.isLTR ? \"arrow-right-small\" : \"arrow-left-small\"} size=\"s\"></nord-icon>\n </nord-button>\n </div>\n </div>\n\n <table\n class=\"n-calendar-table\"\n aria-labelledby=${dialogLabelId}\n @focusin=${this.enableActiveFocus}\n @focusout=${this.disableActiveFocus}\n >\n <thead>\n <tr>\n ${mapWithOffset(\n this.dayNames,\n this.firstDayOfWeek,\n (dayName, i) =>\n html`\n <th class=\"n-calendar-table-header\" scope=\"col\">\n <span aria-hidden=\"true\">${this.dayNamesShort[i]}</span>\n <nord-visually-hidden>${dayName}</nord-visually-hidden>\n </th>\n `\n )}\n </tr>\n </thead>\n <tbody>\n ${chunk(getViewOfMonth(this.focusedDay, this.firstDayOfWeek), 7).map(\n week =>\n html`\n <tr class=\"n-calendar-row\">\n ${week.map(day => {\n const outsideRange = !inRange(day, minDate, maxDate)\n const isToday = isEqual(day, today)\n const isDisabled = this.isDateDisabled(day)\n const isSelected = isEqual(day, valueAsDate)\n const isInMonth = isEqualMonth(day, this.focusedDay)\n const isHighlighted = this.isDateHighlighted(day)\n const formattedDate = this.dateFormatShort.format(day)\n\n const accessibleLabel =\n isHighlighted && typeof isHighlighted === \"string\"\n ? `${formattedDate}, ${isHighlighted}`\n : formattedDate\n\n return html`\n <td class=\"n-calendar-cell\">\n <button\n type=\"button\"\n tabindex=${isEqual(day, this.focusedDay) ? 0 : -1}\n class=${classMap({\n \"n-calendar-day\": true,\n \"is-outside\": outsideRange,\n \"is-month\": isInMonth,\n \"is-highlighted\": isHighlighted,\n })}\n @click=${() => this.handleDaySelect(day)}\n @keydown=${this.shortcuts}\n ?disabled=${outsideRange}\n aria-disabled=${cond(isDisabled, \"true\")}\n aria-pressed=${isSelected ? \"true\" : \"false\"}\n aria-current=${cond(isToday, \"date\")}\n aria-label=${accessibleLabel}\n >\n <span aria-hidden=\"true\">${day.getDate()}</span>\n </button>\n </td>\n `\n })}\n </tr>\n `\n )}\n </tbody>\n </table>\n </div>\n `\n }\n\n @observe(\"value\")\n protected handleValueChange() {\n this.setFocusedDay(parseISODate(this.value) || new Date())\n }\n\n @observe(\"focusedDay\", \"updated\")\n protected handleFocusedDayChange() {\n if (this.activeFocus) {\n this.focusedDayNode.focus()\n }\n }\n\n private handleLangChange() {\n const lang = this.localize.resolvedLang\n this.dateFormatShort = new Intl.DateTimeFormat(lang, { day: \"numeric\", month: \"long\" })\n this.monthNames = getMonthNames(lang, \"long\")\n this.monthNamesShort = getMonthNames(lang, \"short\")\n this.dayNames = getDayNames(lang, \"long\")\n this.dayNamesShort = getDayNames(lang, \"narrow\")\n }\n\n private handleDaySelect = (day: Date) => {\n const isInRange = inRange(day, parseISODate(this.min), parseISODate(this.max))\n const isAllowed = !this.isDateDisabled(day)\n\n if (isInRange && isAllowed) {\n this.value = printISODate(day)\n this.dispatchEvent(new DateSelectEvent(\"change\", day))\n }\n }\n\n private addDays(days: number) {\n this.setFocusedDay(addDays(this.focusedDay, days))\n }\n\n private addMonths(months: number) {\n this.setMonth(this.focusedDay.getMonth() + months)\n }\n\n private addYears(years: number) {\n this.setYear(this.focusedDay.getFullYear() + years)\n }\n\n private startOfWeek() {\n this.setFocusedDay(startOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private endOfWeek() {\n this.setFocusedDay(endOfWeek(this.focusedDay, this.firstDayOfWeek))\n }\n\n private setMonth(month: number) {\n const min = setMonth(startOfMonth(this.focusedDay), month)\n const max = endOfMonth(min)\n const date = setMonth(this.focusedDay, month)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private setYear(year: number) {\n const min = setYear(startOfMonth(this.focusedDay), year)\n const max = endOfMonth(min)\n const date = setYear(this.focusedDay, year)\n\n this.setFocusedDay(clamp(date, min, max))\n }\n\n private setFocusedDay(day: Date) {\n this.focusedDay = clamp(day, parseISODate(this.min), parseISODate(this.max))\n this.dispatchEvent(new DateSelectEvent(\"nord-focus-date\", this.focusedDay))\n }\n\n private handleMonthSelect = (e: Event) => {\n this.setMonth(parseInt((e.target as HTMLSelectElement).value, 10))\n }\n\n private handleYearSelect = (e: Event) => {\n this.setYear(parseInt((e.target as HTMLSelectElement).value, 10))\n }\n\n private handleNextMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(1)\n }\n\n private handlePreviousMonthClick = (event: MouseEvent) => {\n event.preventDefault()\n this.addMonths(-1)\n }\n\n private enableActiveFocus = () => {\n this.activeFocus = true\n }\n\n private disableActiveFocus = (e: FocusEvent) => {\n const table = e.currentTarget as Node\n const relatedTarget = e.relatedTarget as Node\n\n if (relatedTarget && !table.contains(relatedTarget)) {\n this.activeFocus = false\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"nord-calendar\": Calendar\n }\n}\n"],"names":["preventDefault","e","SwipeController","constructor","host","options","this","hadFirstUpdate","initialTouchX","initialTouchY","handleTouchStart","event","pageX","pageY","changedTouches","handleTouchEnd","matchesGesture","onSwipeEnd","distX","distY","details","initialX","initialY","addController","events","EventController","target","hostUpdated","listen","hostDisconnected","isHorizontalSwipe","Math","abs","isDownwardsSwipe","Icon","registerIcon","arrowRightIcon","arrowLeftIcon","arrowDownIcon","fn","isDateDisabled","isDateHighlighted","dialogLabelId","Calendar","LitElement","direction","DirectionController","swipe","addMonths","shortcuts","createKeybindingsHandler","ArrowRight","addDays","isLTR","ArrowLeft","ArrowDown","ArrowUp","Home","startOfWeek","End","endOfWeek","PageUp","PageDown","addYears","localize","LocalizeController","onLangChange","handleLangChange","value","firstDayOfWeek","min","max","expand","activeFocus","focusedDay","Date","handleDaySelect","day","isInRange","inRange","parseISODate","isAllowed","printISODate","dispatchEvent","DateSelectEvent","handleMonthSelect","setMonth","parseInt","handleYearSelect","setYear","handleNextMonthClick","handlePreviousMonthClick","enableActiveFocus","disableActiveFocus","table","currentTarget","relatedTarget","contains","focus","_a","focusedDayNode","monthSelectNode","render","today","valueAsDate","focusedMonth","getMonth","focusedYear","getFullYear","minDate","maxDate","minDateStartOfMonth","startOfMonth","undefined","maxDateEndOfMonth","endOfMonth","selectedYear","minYear","maxYear","html","monthNames","term","map","month","i","monthNamesShort","repeat","range","year","isEqualMonth","mapWithOffset","dayNames","dayName","dayNamesShort","chunk","getViewOfMonth","week","outsideRange","isToday","isEqual","isDisabled","isSelected","isInMonth","isHighlighted","formattedDate","dateFormatShort","format","accessibleLabel","classMap","cond","getDate","handleValueChange","setFocusedDay","handleFocusedDayChange","lang","resolvedLang","Intl","DateTimeFormat","getMonthNames","getDayNames","days","months","years","date","clamp","styles","componentStyle","style","__decorate","query","prototype","property","type","Number","reflect","Boolean","attribute","state","observe","customElement"],"mappings":"k/BAAe,6OACM,yBACD,2GCFL,6OACM,wBACD,0GCFL,8OACM,wBACD,8DCUpB,MAAMA,EAAkBC,GAAaA,EAAED,uBAS1BE,EAQX,WAAAC,CAAYC,EAAuBC,GAN3BC,KAAcC,gBAAG,EAEjBD,KAAaE,cAAW,EACxBF,KAAaG,cAAW,EA4BxBH,KAAAI,iBAAoBC,IAC1B,OAAOC,MAAEA,EAAKC,MAAEA,IAAWF,EAAMG,eACjCR,KAAKE,cAAgBI,EACrBN,KAAKG,cAAgBI,CAAK,EAGpBP,KAAAS,eAAkBJ,IACxB,OAAOC,MAAEA,EAAKC,MAAEA,IAAWF,EAAMG,gBAC3BE,eAAEA,EAAcC,WAAEA,GAAeX,KAAKD,QAEtCa,EAAQN,EAAQN,KAAKE,cACrBW,EAAQN,EAAQP,KAAKG,cACrBW,EAAU,CAAEC,SAAUf,KAAKE,cAAec,SAAUhB,KAAKG,cAAeG,QAAOC,QAAOK,QAAOC,SAE/FH,EAAeI,KACjBT,EAAMX,iBACNiB,EAAWG,GACZ,EAzCDhB,EAAKmB,cAAcjB,MACnBA,KAAKkB,OAAS,IAAIC,EAAgBrB,GAElCE,KAAKD,QAAU,CACbqB,OAAQ,IAAMtB,KACXC,EAEN,CAED,WAAAsB,GACE,IAAKrB,KAAKC,eAAgB,CACxBD,KAAKC,gBAAiB,EAEtB,MAAMmB,EAASpB,K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