@nordhealth/components 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1353 -930
- package/lib/Avatar.js +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/{Calendar-49dc5248.js → Calendar-1cdf8429.js} +2 -2
- package/lib/{Calendar-49dc5248.js.map → Calendar-1cdf8429.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/{Component-49a41387.js → Component-92eb6234.js} +2 -2
- package/lib/Component-92eb6234.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/Divider.js +1 -1
- package/lib/DraftComponentMixin-9e4b7b34.js +2 -0
- package/lib/DraftComponentMixin-9e4b7b34.js.map +1 -0
- package/lib/Drawer.js +1 -1
- package/lib/Drawer.js.map +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownItem.js +1 -1
- package/lib/EmptyState.js +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/FocusableMixin-34870ed3.js +2 -0
- package/lib/FocusableMixin-34870ed3.js.map +1 -0
- package/lib/{FormAssociatedMixin-f6e5b3cd.js → FormAssociatedMixin-3cc6e83b.js} +2 -2
- package/lib/{FormAssociatedMixin-f6e5b3cd.js.map → FormAssociatedMixin-3cc6e83b.js.map} +1 -1
- package/lib/{FormField-72062bf1.js → FormField-081da729.js} +2 -2
- package/lib/FormField-081da729.js.map +1 -0
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/Icon.js +1 -1
- package/lib/Input.js +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/{LightDomController-9a6e398f.js → LightDomController-3c726b20.js} +2 -2
- package/lib/{LightDomController-9a6e398f.js.map → LightDomController-3c726b20.js.map} +1 -1
- package/lib/LocalizeController.js +1 -1
- package/lib/LocalizeController.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/NavItem.js +1 -1
- package/lib/NavToggle.js +2 -0
- package/lib/NavToggle.js.map +1 -0
- package/lib/Navigation.js +1 -1
- package/lib/Popout-08f11a8d.js +2 -0
- package/lib/Popout-08f11a8d.js.map +1 -0
- package/lib/Popout.js +1 -1
- package/lib/Popout.js.map +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/Qrcode.js +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Tab.js +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/{TextField-94b0839b.js → TextField-a7382912.js} +2 -2
- package/lib/{TextField-94b0839b.js.map → TextField-a7382912.js.map} +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Toast.js +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/VisuallyHidden.js +1 -1
- package/lib/bundle.js +6 -6
- package/lib/bundle.js.map +1 -1
- package/lib/{class-map-cd6c8cbd.js → class-map-949b7d3b.js} +2 -2
- package/lib/{class-map-cd6c8cbd.js.map → class-map-949b7d3b.js.map} +1 -1
- package/lib/cond-338158e9.js +2 -0
- package/lib/{cond-0a8d4554.js.map → cond-338158e9.js.map} +1 -1
- package/lib/en-us.js +1 -1
- package/lib/en-us.js.map +1 -1
- package/lib/fi-fi.js +1 -1
- package/lib/fi-fi.js.map +1 -1
- package/lib/{if-defined-f43b1487.js → if-defined-4598a996.js} +2 -2
- package/lib/{if-defined-f43b1487.js.map → if-defined-4598a996.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/{lit-element-79bc2e0e.js → lit-element-9178eae5.js} +3 -3
- package/lib/{lit-element-79bc2e0e.js.map → lit-element-9178eae5.js.map} +1 -1
- package/lib/localization5.js +2 -0
- package/lib/localization5.js.map +1 -0
- package/lib/month-view.js +1 -1
- package/lib/positioning-3bbd3548.js.map +1 -1
- package/lib/{ref-697b28b5.js → ref-0e619221.js} +3 -3
- package/lib/{ref-697b28b5.js.map → ref-0e619221.js.map} +1 -1
- package/lib/repeat-ae6f075f.js +7 -0
- package/lib/{repeat-e7acc0bd.js.map → repeat-ae6f075f.js.map} +1 -1
- package/lib/src/avatar/Avatar.d.ts +7 -1
- package/lib/src/button/Button.test.d.ts +1 -0
- package/lib/src/common/mixins/FloatingComponentMixin.d.ts +11 -0
- package/lib/src/common/positioning.d.ts +2 -1
- package/lib/src/dropdown/Dropdown.d.ts +3 -21
- package/lib/src/index.d.ts +1 -0
- package/lib/src/layout/Layout.d.ts +6 -0
- package/lib/src/layout/Layout.test.d.ts +1 -0
- package/lib/src/localization/en-us.d.ts +3 -0
- package/lib/src/nav-toggle/NavToggle.d.ts +24 -0
- package/lib/src/nav-toggle/NavToggle.test.d.ts +2 -0
- package/lib/src/nav-toggle/localization.d.ts +4 -0
- package/lib/src/popout/Popout.d.ts +9 -20
- package/lib/translation.js +1 -1
- package/lib/translation.js.map +1 -1
- package/lib/{unsafe-html-be8023cd.js → unsafe-html-6be42999.js} +2 -2
- package/lib/{unsafe-html-be8023cd.js.map → unsafe-html-6be42999.js.map} +1 -1
- package/package.json +2 -2
- package/lib/Component-49a41387.js.map +0 -1
- package/lib/FocusableMixin-99db12c1.js +0 -2
- package/lib/FocusableMixin-99db12c1.js.map +0 -1
- package/lib/FormField-72062bf1.js.map +0 -1
- package/lib/cond-0a8d4554.js +0 -2
- package/lib/repeat-e7acc0bd.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import type Popout from "../popout/Popout.js";
|
|
3
2
|
import "../popout/Popout.js";
|
|
3
|
+
declare const Dropdown_base: (new (...args: any[]) => import("../common/mixins/FloatingComponentMixin.js").FloatingMixinInterface) & typeof LitElement;
|
|
4
4
|
/**
|
|
5
5
|
* Dropdown menu displays a list of actions or selectable options for
|
|
6
6
|
* a user. Dropdown uses popout component internally to create
|
|
@@ -13,7 +13,7 @@ import "../popout/Popout.js";
|
|
|
13
13
|
*
|
|
14
14
|
* @cssprop [--n-dropdown-size=250px] - Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content.
|
|
15
15
|
*/
|
|
16
|
-
export default class Dropdown extends
|
|
16
|
+
export default class Dropdown extends Dropdown_base {
|
|
17
17
|
static styles: import("lit").CSSResult[];
|
|
18
18
|
/**
|
|
19
19
|
* we delegate focus, to ensure focus does not move to body if you click
|
|
@@ -27,25 +27,6 @@ export default class Dropdown extends LitElement implements Pick<Popout, "hide"
|
|
|
27
27
|
customElements?: CustomElementRegistry | undefined;
|
|
28
28
|
};
|
|
29
29
|
private popout;
|
|
30
|
-
/**
|
|
31
|
-
* Controls whether the dropdown is open or not.
|
|
32
|
-
*/
|
|
33
|
-
open: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Set the alignment of the dropdown in relation to the toggle depending on the position.
|
|
36
|
-
* `start` will align the left of the dropdown to the left of the toggle.
|
|
37
|
-
* `end` will align the right of the dropdown to the right of the toggle.
|
|
38
|
-
* A dropdown with a set position of `inline-start` or `inline-end` will switch
|
|
39
|
-
* `start` and `end` to the top and bottom of the dropdown respectively.
|
|
40
|
-
*/
|
|
41
|
-
align?: Popout["align"];
|
|
42
|
-
/**
|
|
43
|
-
* Set the position of the dropdown in relation to the toggle.
|
|
44
|
-
* Options follow logical properties.
|
|
45
|
-
* `block-start` and `block-end` referring to top and bottom respectively,
|
|
46
|
-
* `inline-start` and `inline-end` referring to left and right respectively.
|
|
47
|
-
*/
|
|
48
|
-
position?: Popout["position"];
|
|
49
30
|
/**
|
|
50
31
|
* Controls whether the toggle slot expands to fill the width of its container.
|
|
51
32
|
*/
|
|
@@ -68,3 +49,4 @@ declare global {
|
|
|
68
49
|
"nord-dropdown": Dropdown;
|
|
69
50
|
}
|
|
70
51
|
}
|
|
52
|
+
export {};
|
package/lib/src/index.d.ts
CHANGED
|
@@ -43,3 +43,4 @@ export { default as ToastGroup } from "./toast-group/ToastGroup.js";
|
|
|
43
43
|
export { default as Divider } from "./divider/Divider.js";
|
|
44
44
|
export { default as Qrcode } from "./qrcode/Qrcode.js";
|
|
45
45
|
export { default as Drawer } from "./drawer/Drawer.js";
|
|
46
|
+
export { default as NavToggle } from "./nav-toggle/NavToggle.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { States } from "../common/fsm.js";
|
|
3
|
+
import "../nav-toggle/NavToggle.js";
|
|
3
4
|
declare const navMachine: {
|
|
4
5
|
transition(currentState: "closed" | "opened" | "peek" | "unpeek" | "wait" | "blocked", event: "click" | "open" | "close" | "focusin" | "focusout" | "pointerenter" | "pointerleave" | "toggle" | "transitionend" | "timeout" | "dropdownOpen" | "dropdownClose"): "closed" | "opened" | "peek" | "unpeek" | "wait" | "blocked";
|
|
5
6
|
};
|
|
@@ -14,6 +15,7 @@ declare type NavState = States<typeof navMachine>;
|
|
|
14
15
|
* @slot nav - Used to place content inside the navigation sidebar.
|
|
15
16
|
* @slot header - Used to place content inside the header section.
|
|
16
17
|
* @slot drawer - Used to place additional content/details relating to a selected item.
|
|
18
|
+
* @slot nav-toggle - Used to place a own nav-toggle component, for cases where you might need to add a tooltip.
|
|
17
19
|
*
|
|
18
20
|
* @cssprop [--n-layout-padding=var(--n-space-l)] - Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).
|
|
19
21
|
* @cssprop [--n-layout-drawer-inline-size=320px] - Controls the width of the drawer area, when used.
|
|
@@ -30,6 +32,7 @@ export default class Layout extends LitElement {
|
|
|
30
32
|
private navWidth;
|
|
31
33
|
private isDragging;
|
|
32
34
|
private navState;
|
|
35
|
+
private wideScreen;
|
|
33
36
|
/**
|
|
34
37
|
* Controls whether the navigation is hidden off-screen or not.
|
|
35
38
|
* Defaults to `true` for wide viewports, and `false` otherwise.
|
|
@@ -37,6 +40,8 @@ export default class Layout extends LitElement {
|
|
|
37
40
|
navOpen: boolean;
|
|
38
41
|
/**
|
|
39
42
|
* ID reference of element used to toggle the navigation.
|
|
43
|
+
* This is deprecated, the layout component will now render its own nav toggle to simplify usage.
|
|
44
|
+
* @deprecated
|
|
40
45
|
*/
|
|
41
46
|
navToggle?: string;
|
|
42
47
|
/**
|
|
@@ -46,6 +51,7 @@ export default class Layout extends LitElement {
|
|
|
46
51
|
padding: "m" | "none";
|
|
47
52
|
connectedCallback(): void;
|
|
48
53
|
render(): import("lit-html").TemplateResult<1>;
|
|
54
|
+
private renderNavToggle;
|
|
49
55
|
protected handleNavWidthChange(): void;
|
|
50
56
|
protected handleNavStateChange(prev: NavState): void;
|
|
51
57
|
protected handleOpenChange(): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../button/Button.js";
|
|
3
|
+
import "../visually-hidden/VisuallyHidden.js";
|
|
4
|
+
declare const NavToggle_base: (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* Nav toggle is meant for hiding and showing the primary navigation.
|
|
7
|
+
* This component is used internally in the Layout component, but can also be
|
|
8
|
+
* used separate to further customize the behaviour.
|
|
9
|
+
*
|
|
10
|
+
* @status draft
|
|
11
|
+
* @category action
|
|
12
|
+
*/
|
|
13
|
+
export default class NavToggle extends NavToggle_base {
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
private direction;
|
|
16
|
+
private localization;
|
|
17
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
"nord-nav-toggle": NavToggle;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
+
declare const Popout_base: (new (...args: any[]) => import("../common/mixins/FloatingComponentMixin.js").FloatingMixinInterface) & typeof LitElement;
|
|
2
3
|
/**
|
|
3
4
|
* Popouts are small overlays that open on demand. They let users access additional content and actions without cluttering the page.
|
|
4
5
|
*
|
|
@@ -6,9 +7,10 @@ import { LitElement } from "lit";
|
|
|
6
7
|
* @category overlay
|
|
7
8
|
* @slot - The popout content.
|
|
8
9
|
*/
|
|
9
|
-
export default class Popout extends
|
|
10
|
+
export default class Popout extends Popout_base {
|
|
10
11
|
static styles: import("lit").CSSResult[];
|
|
11
12
|
private targetElement;
|
|
13
|
+
private anchorElement;
|
|
12
14
|
private cleanupAutoUpdate?;
|
|
13
15
|
private popout;
|
|
14
16
|
private scrollBar;
|
|
@@ -20,29 +22,14 @@ export default class Popout extends LitElement {
|
|
|
20
22
|
private direction;
|
|
21
23
|
private computedPosition?;
|
|
22
24
|
private smallViewport;
|
|
23
|
-
/**
|
|
24
|
-
* Controls whether the popout is open or not.
|
|
25
|
-
*/
|
|
26
|
-
open: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Set the alignment of the popout in relation to the toggle depending on the position.
|
|
29
|
-
* `start` will align the left of the popout to the left of the toggle.
|
|
30
|
-
* `end` will align the right of the popout to the right of the toggle.
|
|
31
|
-
* A popout with a set position of `inline-start` or `inline-end` will switch
|
|
32
|
-
* `start` and `end` to the top and bottom of the popout respectively.
|
|
33
|
-
*/
|
|
34
|
-
align: "start" | "end";
|
|
35
|
-
/**
|
|
36
|
-
* Set the position of the popout in relation to the toggle.
|
|
37
|
-
* Options follow logical properties.
|
|
38
|
-
* `block-start` and `block-end` referring to top and bottom respectively,
|
|
39
|
-
* `inline-start` and `inline-end` referring to left and right respectively.
|
|
40
|
-
*/
|
|
41
|
-
position: "block-end" | "block-start" | "inline-start" | "inline-end";
|
|
42
25
|
/**
|
|
43
26
|
* The id for the active element to reference via aria-controls.
|
|
44
27
|
*/
|
|
45
28
|
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Set an optional anchor element to align against, replacing the triggering element.
|
|
31
|
+
*/
|
|
32
|
+
anchor?: string;
|
|
46
33
|
/**
|
|
47
34
|
* Show the popout, moving focus to the calendar inside.
|
|
48
35
|
*/
|
|
@@ -74,6 +61,7 @@ export default class Popout extends LitElement {
|
|
|
74
61
|
*/
|
|
75
62
|
private toggleOpen;
|
|
76
63
|
private getToggle;
|
|
64
|
+
private getAnchor;
|
|
77
65
|
/**
|
|
78
66
|
* Update the smallViewport flag to switch between "sheet" and "floating".
|
|
79
67
|
* autoUpdate is needed when a viewport gets larger and the popout is open.
|
|
@@ -85,3 +73,4 @@ declare global {
|
|
|
85
73
|
"nord-popout": Popout;
|
|
86
74
|
}
|
|
87
75
|
}
|
|
76
|
+
export {};
|
package/lib/translation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";const o=new Set,n=new Map;function e(){for(const t of o)t()}function i(){n.clear()}function r(...t){t.forEach((t=>{const o=t.$lang.toLowerCase();n.set(o,t)})),e()}function a(t){return o.add(t),()=>o.delete(t)}function c(t){return n.has(t)}function s(o){const e=o.toLowerCase(),[i]=e.split("-");return n.get(e)||n.get(i)||t}new MutationObserver(e).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});export{i as clearTranslations,c as isTranslationRegistered,r as registerTranslation,s as resolveTranslation,a as subscribe};
|
|
1
|
+
import t from"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";const o=new Set,n=new Map;function e(){for(const t of o)t()}function i(){n.clear()}function r(...t){t.forEach((t=>{const o=t.$lang.toLowerCase();n.set(o,t)})),e()}function a(t){return o.add(t),()=>o.delete(t)}function c(t){return n.has(t)}function s(o){const e=o.toLowerCase(),[i]=e.split("-");return n.get(e)||n.get(i)||t}new MutationObserver(e).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});export{i as clearTranslations,c as isTranslationRegistered,r as registerTranslation,s as resolveTranslation,a as subscribe};
|
|
2
2
|
//# sourceMappingURL=translation.js.map
|
package/lib/translation.js.map
CHANGED
|
@@ -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<Type, Prefix extends string> = {\n [Property in keyof Type]: Property extends `${Prefix}${string}` ? Property : never\n}[keyof Type]\n\nexport type Translation = typeof en\nexport type WellKnownKeys = PickStartsWith<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): Translation {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split(\"-\")\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\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":"
|
|
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<Type, Prefix extends string> = {\n [Property in keyof Type]: Property extends `${Prefix}${string}` ? Property : never\n}[keyof Type]\n\nexport type Translation = typeof en\nexport type WellKnownKeys = PickStartsWith<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): Translation {\n const lang = langCode.toLowerCase()\n const [langOnly] = lang.split(\"-\")\n\n return translations.get(lang) || translations.get(langOnly) || en\n}\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":"gKAUA,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,7 +1,7 @@
|
|
|
1
|
-
import{b as t,x as r}from"./lit-element-
|
|
1
|
+
import{b as t,x as r}from"./lit-element-9178eae5.js";import{e,i,t as s}from"./directive-de55b00a.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/class n extends i{constructor(r){if(super(r),this.it=t,r.type!==s.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===t||null==e)return this._t=void 0,this.it=e;if(e===r)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const i=[e];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}n.directiveName="unsafeHTML",n.resultType=1;const o=e(n);export{o};
|
|
7
|
-
//# sourceMappingURL=unsafe-html-
|
|
7
|
+
//# sourceMappingURL=unsafe-html-6be42999.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unsafe-html-
|
|
1
|
+
{"version":3,"file":"unsafe-html-6be42999.js","sources":["../node_modules/lit-html/directives/unsafe-html.js"],"sourcesContent":["import{nothing as t,noChange as i}from\"../lit-html.js\";import{Directive as r,PartType as s,directive as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends r{constructor(i){if(super(i),this.it=t,i.type!==s.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=n(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n"],"names":["e","r","constructor","i","super","this","it","t","type","s","CHILD","Error","directiveName","render","_t","raw","_$litType$","resultType","strings","values","o","n"],"mappings":";;;;;GAKG,MAAMA,UAAUC,EAAEC,YAAYC,GAAG,GAAGC,MAAMD,GAAGE,KAAKC,GAAGC,EAAEJ,EAAEK,OAAOC,EAAEC,MAAM,MAAMC,MAAMN,KAAKH,YAAYU,cAAc,wCAAwC,CAACC,OAAOZ,GAAG,GAAGA,IAAIM,GAAG,MAAMN,EAAE,OAAOI,KAAKS,QAAG,EAAOT,KAAKC,GAAGL,EAAE,GAAGA,IAAIE,EAAE,OAAOF,EAAE,GAAG,iBAAiBA,EAAE,MAAMU,MAAMN,KAAKH,YAAYU,cAAc,qCAAqC,GAAGX,IAAII,KAAKC,GAAG,OAAOD,KAAKS,GAAGT,KAAKC,GAAGL,EAAE,MAAMQ,EAAE,CAACR,GAAG,OAAOQ,EAAEM,IAAIN,EAAEJ,KAAKS,GAAG,CAACE,WAAWX,KAAKH,YAAYe,WAAWC,QAAQT,EAAEU,OAAO,GAAG,EAAEnB,EAAEY,cAAc,aAAaZ,EAAEiB,WAAW,EAAO,MAACG,EAAEC,EAAErB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordhealth/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.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",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
}
|
|
180
180
|
]
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "f883abbcc0a291b6fbf9603993b3bd48fcfc2846"
|
|
183
183
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component-49a41387.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as l}from"./ref-697b28b5.js";function u(u){return class extends u{constructor(){super(...arguments),this.focusableRef=l()}focus(l){var u;null===(u=this.focusableRef.value)||void 0===u||u.focus(l)}blur(){var l;null===(l=this.focusableRef.value)||void 0===l||l.blur()}click(){var l;null===(l=this.focusableRef.value)||void 0===l||l.click()}}}export{u as F};
|
|
2
|
-
//# sourceMappingURL=FocusableMixin-99db12c1.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FocusableMixin-99db12c1.js","sources":["../src/common/mixins/FocusableMixin.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\n\nimport { LitElement } from \"lit\"\nimport { createRef, Ref } from \"lit/directives/ref.js\"\n\ntype Constructable<T = Record<string, unknown>> = new (...args: any[]) => T\n\nexport declare class FocusableMixinInterface {\n protected focusableRef: Ref<HTMLElement>\n focus(options?: FocusOptions): void\n blur(): void\n click(): void\n}\n\nexport function FocusableMixin<T extends Constructable<LitElement>>(superClass: T) {\n class FocusableElement extends superClass {\n protected focusableRef = createRef<HTMLButtonElement>()\n\n /**\n * Programmatically move focus to the component.\n * @param {FocusOptions} options An object which controls aspects of the focusing process.\n */\n focus(options?: FocusOptions) {\n this.focusableRef.value?.focus(options)\n }\n\n /**\n * Programmatically remove focus from the component.\n */\n blur() {\n this.focusableRef.value?.blur()\n }\n\n /**\n * Programmatically simulates a click on the component.\n */\n click() {\n this.focusableRef.value?.click()\n }\n }\n\n return FocusableElement as unknown as Constructable<FocusableMixinInterface> & T\n}\n"],"names":["FocusableMixin","superClass","constructor","this","focusableRef","createRef","focus","options","_a","value","blur","click"],"mappings":"sCAcM,SAAUA,EAAoDC,GA2BlE,OA1BA,cAA+BA,EAA/BC,kCACYC,KAAYC,aAAGC,GAuB1B,CAjBCC,MAAMC,iBACJC,EAAAL,KAAKC,aAAaK,sBAAOH,MAAMC,EAChC,CAKDG,aAC2B,QAAzBF,EAAAL,KAAKC,aAAaK,aAAO,IAAAD,GAAAA,EAAAE,MAC1B,CAKDC,cAC2B,QAAzBH,EAAAL,KAAKC,aAAaK,aAAO,IAAAD,GAAAA,EAAAG,OAC1B,EAIL"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormField-72062bf1.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/cond-0a8d4554.js
DELETED
package/lib/repeat-e7acc0bd.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{x as e}from"./lit-element-79bc2e0e.js";import{e as t,i as s,t as r}from"./directive-de55b00a.js";import{m as l,u as o,r as n,p as i,s as u}from"./ref-697b28b5.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const f=(e,t,s)=>{const r=new Map;for(let l=t;l<=s;l++)r.set(e[l],l);return r},c=t(class extends s{constructor(e){if(super(e),e.type!==r.CHILD)throw Error("repeat() can only be used in text expressions")}ht(e,t,s){let r;void 0===s?s=t:void 0!==t&&(r=t);const l=[],o=[];let n=0;for(const t of e)l[n]=r?r(t,n):n,o[n]=s(t,n),n++;return{values:o,keys:l}}render(e,t,s){return this.ht(e,t,s).values}update(t,[s,r,c]){var a;const h=l(t),{values:d,keys:p}=this.ht(s,r,c);if(!Array.isArray(h))return this.ut=p,d;const v=null!==(a=this.ut)&&void 0!==a?a:this.ut=[],m=[];let y,b,x=0,g=h.length-1,j=0,k=d.length-1;for(;x<=g&&j<=k;)if(null===h[x])x++;else if(null===h[g])g--;else if(v[x]===p[j])m[j]=o(h[x],d[j]),x++,j++;else if(v[g]===p[k])m[k]=o(h[g],d[k]),g--,k--;else if(v[x]===p[k])m[k]=o(h[x],d[k]),n(t,m[k+1],h[x]),x++,k--;else if(v[g]===p[j])m[j]=o(h[g],d[j]),n(t,h[x],h[g]),g--,j++;else if(void 0===y&&(y=f(p,j,k),b=f(v,x,g)),y.has(v[x]))if(y.has(v[g])){const e=b.get(p[j]),s=void 0!==e?h[e]:null;if(null===s){const e=n(t,h[x]);o(e,d[j]),m[j]=e}else m[j]=o(s,d[j]),n(t,h[x],s),h[e]=null;j++}else i(h[g]),g--;else i(h[x]),x++;for(;j<=k;){const e=n(t,m[k+1]);o(e,d[j]),m[j++]=e}for(;x<=g;){const e=h[x++];null!==e&&i(e)}return this.ut=p,u(t,m),e}});export{c};
|
|
7
|
-
//# sourceMappingURL=repeat-e7acc0bd.js.map
|