@nordhealth/components 1.11.0 → 1.13.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 +2316 -2367
- package/lib/Avatar.js +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/Calendar-c2dc6905.js +2 -0
- package/lib/{Calendar-2797d956.js.map → Calendar-c2dc6905.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Card.js.map +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/{Component-a61df53a.js → Component-5a0a26a0.js} +2 -2
- package/lib/Component-5a0a26a0.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/Divider.js.map +1 -1
- package/lib/Dropdown.js +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/Header.js +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/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/Popout.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/ProgressBar.js.map +1 -1
- package/lib/Qrcode.js +2 -2
- package/lib/Qrcode.js.map +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/Spinner.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Tab.js +1 -1
- package/lib/Tab.js.map +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/TabPanel.js.map +1 -1
- package/lib/Table.js +1 -1
- package/lib/Table.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/bundle.js +9 -10
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/button/Button.d.ts +8 -0
- package/lib/src/button/Button.test.d.ts +2 -0
- package/lib/src/card/Card.d.ts +2 -0
- package/lib/src/divider/Divider.d.ts +2 -4
- package/lib/src/modal/Modal.d.ts +2 -4
- package/lib/src/popout/Popout.test.d.ts +7 -0
- package/lib/src/progress-bar/ProgressBar.d.ts +1 -1
- package/lib/src/qrcode/Qrcode.d.ts +2 -4
- package/lib/src/tab/Tab.d.ts +2 -4
- package/lib/src/tab-group/TabGroup.d.ts +2 -4
- package/lib/src/tab-panel/TabPanel.d.ts +2 -4
- package/lib/src/table/Table.d.ts +9 -2
- package/lib/src/table/Table.test.d.ts +1 -0
- package/package.json +6 -6
- package/lib/Calendar-2797d956.js +0 -2
- package/lib/Component-a61df53a.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as Badge}from"./Badge.js";export{default as Button}from"./Button.js";export{default as Card}from"./Card.js";export{default as Input}from"./Input.js";export{default as Icon}from"./Icon.js";export{default as CommandMenu}from"./CommandMenu.js";export{default as CommandMenuAction}from"./CommandMenuAction.js";export{default as Select}from"./Select.js";export{default as Stack}from"./Stack.js";export{default as Spinner}from"./Spinner.js";export{default as Table}from"./Table.js";export{default as VisuallyHidden}from"./VisuallyHidden.js";export{default as Textarea}from"./Textarea.js";export{C as Calendar}from"./Calendar-
|
|
1
|
+
export{default as Badge}from"./Badge.js";export{default as Button}from"./Button.js";export{default as Card}from"./Card.js";export{default as Input}from"./Input.js";export{default as Icon}from"./Icon.js";export{default as CommandMenu}from"./CommandMenu.js";export{default as CommandMenuAction}from"./CommandMenuAction.js";export{default as Select}from"./Select.js";export{default as Stack}from"./Stack.js";export{default as Spinner}from"./Spinner.js";export{default as Table}from"./Table.js";export{default as VisuallyHidden}from"./VisuallyHidden.js";export{default as Textarea}from"./Textarea.js";export{C as Calendar}from"./Calendar-c2dc6905.js";export{default as DatePicker}from"./DatePicker.js";export{default as Checkbox}from"./Checkbox.js";export{default as Tooltip}from"./Tooltip.js";export{default as Fieldset}from"./Fieldset.js";export{default as Radio}from"./Radio.js";export{default as Header}from"./Header.js";export{default as NavGroup}from"./NavGroup.js";export{default as NavItem}from"./NavItem.js";export{default as Navigation}from"./Navigation.js";export{default as Layout}from"./Layout.js";export{default as EmptyState}from"./EmptyState.js";export{default as Banner}from"./Banner.js";export{default as Avatar}from"./Avatar.js";export{default as ProgressBar}from"./ProgressBar.js";export{default as Popout}from"./Popout.js";export{default as Dropdown}from"./Dropdown.js";export{default as DropdownItem}from"./DropdownItem.js";export{default as DropdownGroup}from"./DropdownGroup.js";export{isTranslationRegistered,registerTranslation}from"./translation.js";export{default as TabGroup}from"./TabGroup.js";export{default as Tab}from"./Tab.js";export{default as TabPanel}from"./TabPanel.js";export{default as Toggle}from"./Toggle.js";export{default as Modal}from"./Modal.js";export{default as Skeleton}from"./Skeleton.js";export{default as Toast}from"./Toast.js";export{default as ToastGroup}from"./ToastGroup.js";export{default as Divider}from"./Divider.js";export{default as Qrcode}from"./Qrcode.js";import"./query-assigned-elements-ef860822.js";import"./lit-element-67e6cd99.js";import"./property-03f59dce.js";import"./Component-5a0a26a0.js";import"./ref-57ff8ffc.js";import"./directive-de55b00a.js";import"./EventController-d99ebeef.js";import"./LightDomController-6d26dea2.js";import"./cond-97c45476.js";import"./FocusableMixin-175ea4d7.js";import"./InputMixin-9334d385.js";import"./SlotController-ea6eff46.js";import"./if-defined-fe1a64e3.js";import"./class-map-f1b6f1fa.js";import"./unsafe-html-61a04601.js";import"./FormAssociatedMixin-d0d98a92.js";import"./events-731d0007.js";import"./TextField-f48e2e5c.js";import"./AutocompleteMixin-ca948bdb.js";import"./FormField-d3767c2e.js";import"./state-70f38ceb.js";import"./observe-a9c6dfb6.js";import"./repeat-084c4167.js";import"./collection-800f5002.js";import"./number-c3ab3e95.js";import"./LightDismissController-a2645ae6.js";import"./ShortcutController-87615e31.js";import"./tinykeys.module-84e6cc41.js";import"./KeyboardController.js";import"./SelectEvent.js";import"./LocalizeController.js";import"./DirectionController-8b298382.js";import"./query-2d22378e.js";import"./dates-a8de5b83.js";import"./month-view.js";import"./DateSelectEvent.js";import"./interface-close-small-44ababc3.js";import"./date-adapter.js";import"./positioning-b660767c.js";import"./fsm-50373df9.js";import"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./DraftComponentMixin-9e4b7b34.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import "../spinner/Spinner.js";
|
|
2
3
|
declare const Button_base: (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
3
4
|
/**
|
|
4
5
|
* Buttons are used for interface actions. Primary style should be
|
|
@@ -67,6 +68,13 @@ export default class Button extends Button_base {
|
|
|
67
68
|
* Controls whether the button expands to fill the width of its container.
|
|
68
69
|
*/
|
|
69
70
|
expand: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Controls whether the button is in loading state. Please note that the spinner
|
|
73
|
+
* is hidden from assistive technologies, so you need to make sure to announce
|
|
74
|
+
* the loading state to e.g. screen reader users. We also recommend disabling
|
|
75
|
+
* all user interactions on the button itself while in loading state.
|
|
76
|
+
*/
|
|
77
|
+
loading: boolean;
|
|
70
78
|
connectedCallback(): void;
|
|
71
79
|
render(): TemplateResult<1>;
|
|
72
80
|
/**
|
package/lib/src/card/Card.d.ts
CHANGED
|
@@ -8,11 +8,13 @@ import { LitElement } from "lit";
|
|
|
8
8
|
* @category structure
|
|
9
9
|
* @slot - The card content.
|
|
10
10
|
* @slot header - Optional slot that holds a header for the card.
|
|
11
|
+
* @slot header-end - Optional slot that positions content at the end of the header. Useful for actions or additional info.
|
|
11
12
|
* @slot footer - Optional slot that holds footer content for the card.
|
|
12
13
|
*/
|
|
13
14
|
export default class Card extends LitElement {
|
|
14
15
|
static styles: import("lit").CSSResult[];
|
|
15
16
|
private headerSlot;
|
|
17
|
+
private headerEndSlot;
|
|
16
18
|
private footerSlot;
|
|
17
19
|
/**
|
|
18
20
|
* Controls the padding of the card component. When set to “none”,
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Divider_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* Divider components are used to separate and distinguish sections of
|
|
5
4
|
* content or groups of menu items. Visually, they look like
|
|
6
5
|
* horizontal or vertical lines.
|
|
7
6
|
*
|
|
8
|
-
* @status
|
|
7
|
+
* @status new
|
|
9
8
|
* @category structure
|
|
10
9
|
*/
|
|
11
|
-
export default class Divider extends
|
|
10
|
+
export default class Divider extends LitElement {
|
|
12
11
|
static styles: import("lit").CSSResult[];
|
|
13
12
|
/**
|
|
14
13
|
* The direction of the divider.
|
|
@@ -22,4 +21,3 @@ declare global {
|
|
|
22
21
|
"nord-divider": Divider;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
export {};
|
package/lib/src/modal/Modal.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Modal_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* Modal component is used to display content that temporarily blocks interactions
|
|
5
4
|
* with the main view of an application. Modal should be used sparingly and
|
|
6
5
|
* only when necessary.
|
|
7
6
|
*
|
|
8
|
-
* @status
|
|
7
|
+
* @status new
|
|
9
8
|
* @category overlay
|
|
10
9
|
* @slot - Default slot
|
|
11
10
|
* @slot header - Slot which holds the header of the modal, positioned next to the close button.
|
|
@@ -13,7 +12,7 @@ declare const Modal_base: typeof LitElement;
|
|
|
13
12
|
* @fires cancel - Dispatched before the modal has closed when a user attempts to dismiss a modal. Call `preventDefault()` on the event to prevent the modal closing.
|
|
14
13
|
* @fires close - Dispatched when a modal is closed for any reason.
|
|
15
14
|
*/
|
|
16
|
-
export default class Modal extends
|
|
15
|
+
export default class Modal extends LitElement {
|
|
17
16
|
static styles: import("lit").CSSResult[];
|
|
18
17
|
private modal;
|
|
19
18
|
private backdrop;
|
|
@@ -80,4 +79,3 @@ declare global {
|
|
|
80
79
|
"nord-modal": Modal;
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import "../button/Button.js";
|
|
2
2
|
import "../stack/Stack.js";
|
|
3
|
+
import "../tab-group/TabGroup.js";
|
|
4
|
+
import "../tab-panel/TabPanel.js";
|
|
5
|
+
import "../tab/Tab.js";
|
|
6
|
+
import "../icon/Icon.js";
|
|
7
|
+
import "../tooltip/Tooltip.js";
|
|
8
|
+
import "../toast-group/ToastGroup.js";
|
|
9
|
+
import "../toast/Toast.js";
|
|
@@ -5,7 +5,7 @@ declare const ProgressBar_base: (new (...args: any[]) => import("../common/mixin
|
|
|
5
5
|
* of a task or process. It shows how much of the task has
|
|
6
6
|
* been completed and how much is still left.
|
|
7
7
|
*
|
|
8
|
-
* @status
|
|
8
|
+
* @status ready
|
|
9
9
|
* @category feedback
|
|
10
10
|
*/
|
|
11
11
|
export default class ProgressBar extends ProgressBar_base {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Qrcode_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* QR Code component is used for providing information or links
|
|
5
4
|
* to users which they can quickly scan with their smartphone.
|
|
6
5
|
*
|
|
7
|
-
* @status
|
|
6
|
+
* @status new
|
|
8
7
|
* @category image
|
|
9
8
|
* @displayName QR Code
|
|
10
9
|
*/
|
|
11
|
-
export default class Qrcode extends
|
|
10
|
+
export default class Qrcode extends LitElement {
|
|
12
11
|
static styles: import("lit").CSSResult[];
|
|
13
12
|
private canvas;
|
|
14
13
|
private computed;
|
|
@@ -50,4 +49,3 @@ declare global {
|
|
|
50
49
|
"nord-qrcode": Qrcode;
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
|
-
export {};
|
package/lib/src/tab/Tab.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Tab_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* The interactive tab button for use within the tab group component.
|
|
5
4
|
*
|
|
6
|
-
* @status
|
|
5
|
+
* @status new
|
|
7
6
|
* @category navigation
|
|
8
7
|
* @slot - The tab button content.
|
|
9
8
|
*/
|
|
10
|
-
export default class Tab extends
|
|
9
|
+
export default class Tab extends LitElement {
|
|
11
10
|
static styles: import("lit").CSSResult[];
|
|
12
11
|
private defaultSlot;
|
|
13
12
|
/**
|
|
@@ -27,4 +26,3 @@ declare global {
|
|
|
27
26
|
"nord-tab": Tab;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const TabGroup_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* Tab Group allows multiple panels to be contained within a single window,
|
|
5
4
|
* using tabs as a navigational element.
|
|
6
5
|
*
|
|
7
|
-
* @status
|
|
6
|
+
* @status new
|
|
8
7
|
* @category navigation
|
|
9
8
|
* @slot - The element which contains the content to be revealed.
|
|
10
9
|
* @slot tab - The element which contains all tabs to reveal tabbed content.
|
|
11
10
|
*/
|
|
12
|
-
export default class TabGroup extends
|
|
11
|
+
export default class TabGroup extends LitElement {
|
|
13
12
|
static styles: import("lit").CSSResult[];
|
|
14
13
|
private direction;
|
|
15
14
|
private observer?;
|
|
@@ -74,4 +73,3 @@ declare global {
|
|
|
74
73
|
"nord-tab-group": TabGroup;
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const TabPanel_base: typeof LitElement;
|
|
3
2
|
/**
|
|
4
3
|
* The panel which contains content that can be revealed using a tab
|
|
5
4
|
* in the tab group component.
|
|
6
5
|
*
|
|
7
|
-
* @status
|
|
6
|
+
* @status new
|
|
8
7
|
* @category navigation
|
|
9
8
|
* @slot - The tab panel content.
|
|
10
9
|
*/
|
|
11
|
-
export default class TabPanel extends
|
|
10
|
+
export default class TabPanel extends LitElement {
|
|
12
11
|
static styles: import("lit").CSSResult[];
|
|
13
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
13
|
connectedCallback(): void;
|
|
@@ -18,4 +17,3 @@ declare global {
|
|
|
18
17
|
"nord-tab-panel": TabPanel;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
export {};
|
package/lib/src/table/Table.d.ts
CHANGED
|
@@ -6,15 +6,22 @@ import { LitElement } from "lit";
|
|
|
6
6
|
*
|
|
7
7
|
* @status ready
|
|
8
8
|
* @category list
|
|
9
|
-
* @slot -
|
|
9
|
+
* @slot - Default slot which holds the HTML `<table>` element.
|
|
10
10
|
*/
|
|
11
11
|
export default class Table extends LitElement {
|
|
12
|
-
static styles: import("lit").CSSResult;
|
|
13
12
|
/**
|
|
14
13
|
* Controls the density of the table's rows and headers.
|
|
15
14
|
* Relaxed increases space, condensed reduces space.
|
|
16
15
|
*/
|
|
17
16
|
density: "condensed" | "default" | "relaxed";
|
|
17
|
+
/**
|
|
18
|
+
* Enables scroll-snapping, meaning the scroll position is always column-aligned.
|
|
19
|
+
*/
|
|
20
|
+
scrollSnap: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Controls whether to use zebra striping on tables, which can improve readability.
|
|
23
|
+
*/
|
|
24
|
+
striped: boolean;
|
|
18
25
|
connectedCallback(): void;
|
|
19
26
|
/**
|
|
20
27
|
* renders table styles into nearest root.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordhealth/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.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",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@floating-ui/dom": "0.5.3",
|
|
35
|
-
"@nordhealth/icons": "^1.
|
|
35
|
+
"@nordhealth/icons": "^1.4.0",
|
|
36
36
|
"lit": "2.2.5",
|
|
37
37
|
"qr-creator": "1.0.0",
|
|
38
38
|
"tinykeys": "1.4.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@custom-elements-manifest/analyzer": "0.6.3",
|
|
42
|
-
"@nordhealth/css": "^1.
|
|
42
|
+
"@nordhealth/css": "^1.4.0",
|
|
43
43
|
"@nordhealth/fonts": "^2.0.14",
|
|
44
|
-
"@nordhealth/themes": "^6.3.
|
|
45
|
-
"@nordhealth/tokens": "^5.
|
|
44
|
+
"@nordhealth/themes": "^6.3.1",
|
|
45
|
+
"@nordhealth/tokens": "^5.4.0",
|
|
46
46
|
"@open-wc/eslint-config": "7.0.0",
|
|
47
47
|
"@open-wc/testing": "3.1.5",
|
|
48
48
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
}
|
|
180
180
|
]
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "0708258eba6bf0f9dbb79d6c20805f102d013940"
|
|
183
183
|
}
|
package/lib/Calendar-2797d956.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,n as t}from"./query-assigned-elements-ef860822.js";import{r as a,s as n,$ as o}from"./lit-element-67e6cd99.js";import{e as i}from"./property-03f59dce.js";import{t as s}from"./state-70f38ceb.js";import{i as r}from"./query-2d22378e.js";import{c as l}from"./repeat-084c4167.js";import{o as d}from"./tinykeys.module-84e6cc41.js";import"./Button.js";import"./VisuallyHidden.js";import c from"./Icon.js";import{E as h}from"./EventController-d99ebeef.js";import{D as u}from"./DirectionController-8b298382.js";import{LocalizeController as p}from"./LocalizeController.js";import{r as v}from"./number-c3ab3e95.js";import{i as m,p as f,a as g,s as y,e as b,b as x,g as w,c as D,d as z,f as k,h as F,j as M,k as S,l as Y}from"./dates-a8de5b83.js";import{o as $}from"./observe-a9c6dfb6.js";import{monthView as j}from"./month-view.js";import{DateSelectEvent as C}from"./DateSelectEvent.js";import{s as L}from"./Component-a61df53a.js";var N=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M105 57.4 47.6 2.8a10.566 10.566 0 1 0-14.56 15.316l51.968 49.35a3.486 3.486 0 0 1 0 5.068l-51.968 49.35a10.502 10.502 0 0 0 14.462 15.232l57.638-54.74A17.584 17.584 0 0 0 105 57.4z"/></svg>',title:"arrow-right-small",tags:"nordicon arrow right small caret pointing triangle chevron"});var T=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M99.736 140a10.486 10.486 0 0 1-7.238-2.884L35 82.6a17.598 17.598 0 0 1-.14-24.976l57.638-54.74a10.502 10.502 0 1 1 14.462 15.232l-51.968 49.35a3.486 3.486 0 0 0 0 5.068l51.968 49.35A10.5 10.5 0 0 1 99.736 140z"/></svg>',title:"arrow-left-small",tags:"nordicon arrow left small caret pointing triangle chevron"});var O=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 140 140" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M70 110.236a17.332 17.332 0 0 1-12.306-5.096L2.884 47.502A10.502 10.502 0 1 1 18.116 33.04l49.35 51.968a3.486 3.486 0 0 0 5.068 0l49.35-51.968a10.502 10.502 0 1 1 15.232 14.462L82.6 105a17.766 17.766 0 0 1-12.6 5.236z"/></svg>',title:"arrow-down-small",tags:"nordicon arrow down small caret pointing triangle chevron"});const _=e=>e.preventDefault();class I{constructor(e,t){this.hadFirstUpdate=!1,this.initialTouchX=0,this.initialTouchY=0,this.handleTouchStart=e=>{const[{pageX:t,pageY:a}]=e.changedTouches;this.initialTouchX=t,this.initialTouchY=a},this.handleTouchEnd=e=>{const[{pageX:t,pageY:a}]=e.changedTouches,{matchesGesture:n,onSwipeEnd:o}=this.options,i=t-this.initialTouchX,s=a-this.initialTouchY,r={initialX:this.initialTouchX,initialY:this.initialTouchY,pageX:t,pageY:a,distX:i,distY:s};n(r)&&(e.preventDefault(),o(r))},e.addController(this),this.events=new h(e),this.options={target:()=>e,...t}}hostUpdated(){if(!this.hadFirstUpdate){this.hadFirstUpdate=!0;const e=this.options.target();this.events.listen(e,"touchstart",this.handleTouchStart),this.events.listen(e,"touchmove",_),this.events.listen(e,"touchend",this.handleTouchEnd)}}hostDisconnected(){this.hadFirstUpdate=!1}}const X=({distX:e,distY:t})=>Math.abs(e)>=70&&Math.abs(t)<=70,A=({distX:e,distY:t})=>Math.abs(t)>=70&&Math.abs(e)<=70&&t>0,E=a`:host{font-feature-settings:var(--n-font-features-reduced)}.n-calendar{-webkit-user-select:none;user-select:none;background:var(--n-color-surface);box-shadow:var(--n-calendar-box-shadow,var(--n-box-shadow-popout));border-radius:var(--n-border-radius-s);max-inline-size:310px;min-inline-size:290px;padding:var(--n-calendar-padding,16px 16px 20px)}:host([expand]) .n-calendar{max-inline-size:100%;inline-size:100%}@media (max-width:35.9375em){.n-calendar{max-inline-size:100%}}.n-calendar-table{border-collapse:collapse;border-spacing:0;color:var(--n-color-text);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight);line-height:var(--n-date-picker-line-height);text-align:center;inline-size:100%}.n-calendar-table-header{font-size:var(--n-font-size-s);font-weight:var(--n-font-weight-active);letter-spacing:1px;line-height:var(--n-date-picker-line-height);padding-block-end:8px;text-decoration:none;text-transform:uppercase}.n-calendar-cell{text-align:center}.n-calendar-day{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:0 0;border:0;border-radius:var(--n-border-radius-s);color:var(--n-color-text);cursor:pointer;display:inline-block;font-family:var(--n-font-family);font-size:var(--n-font-size-m);font-variant-numeric:tabular-nums;font-weight:var(--n-font-weight);block-size:36px;padding:0 0 1px;position:relative;text-align:center;vertical-align:middle;inline-size:36px;z-index:1}.n-calendar-day[aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link);position:relative;z-index:200}.n-calendar-day:hover{background:var(--n-color-active)}.n-calendar-day:focus,.n-calendar-day[aria-pressed=true]{background:var(--n-color-accent);box-shadow:none;color:var(--n-color-text-on-accent);outline:0}.n-calendar-day:active{background:var(--n-color-accent);box-shadow:none!important;color:var(--n-color-text-on-accent);z-index:200}.n-calendar-day:focus{box-shadow:0 0 5px var(--n-color-accent);z-index:200}.n-calendar-day:not(.is-month){box-shadow:none}.n-calendar-day:not(.is-month),.n-calendar-day[aria-disabled=true]{background:0 0;color:var(--n-color-text-weakest);cursor:default}.n-calendar-day[aria-disabled=true]{color:var(--n-color-text-weaker);text-decoration:line-through}.n-calendar-day:not(.is-month)[aria-disabled=true]{color:var(--n-color-text-weakest);text-decoration:none}.n-calendar-day[aria-disabled=true][aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link)}.n-calendar-day[aria-disabled=true][aria-current=date]:focus{box-shadow:0 0 5px var(--n-color-accent);background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-calendar-day[aria-disabled=true]:not([aria-current=date])::before{display:none}.n-calendar-day.is-outside{background:0 0;box-shadow:none;color:var(--n-color-text-weakest);cursor:default;pointer-events:none}.n-calendar-day.is-outside::before{display:none}.n-calendar-header{align-items:start;display:flex;justify-content:space-between;margin-block-end:16px;inline-size:100%}.n-calendar-nav{white-space:nowrap}.n-calendar-nav nord-button{--n-button-padding-x:11px;margin-inline-start:calc(var(--n-space-s)/ 2)}.n-calendar-select{display:inline-flex;margin-block-start:4px;position:relative;line-height:var(--n-line-height)}.n-calendar-select span{margin-inline-end:var(--n-space-s)}.n-calendar-select select{cursor:pointer;font-size:var(--n-font-size-l);block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%;z-index:2}.n-calendar-select select:focus+.n-calendar-select-label{box-shadow:0 0 0 2px var(--n-color-accent)}.n-calendar-select-label{align-items:center;border-radius:var(--n-border-radius-s);color:var(--n-color-text);display:flex;font-size:var(--n-font-size-xl);font-weight:var(--n-font-weight-active);line-height:var(--n-date-picker-line-height);padding:0 4px 0 8px;pointer-events:none;position:relative;inline-size:100%;z-index:1;text-transform:capitalize}`;c.registerIcon(N),c.registerIcon(T),c.registerIcon(O);const W=e=>t=>{t.preventDefault(),e(t)},U=()=>!1;let B=class extends n{constructor(){super(...arguments),this.dialogLabelId="dialog-header",this.direction=new u(this),this.swipe=new I(this,{matchesGesture:X,onSwipeEnd:({distX:e})=>this.addMonths(e<0?1:-1)}),this.shortcuts=d({ArrowRight:W((()=>this.addDays(this.direction.isLTR?1:-1))),ArrowLeft:W((()=>this.addDays(this.direction.isLTR?-1:1))),ArrowDown:W((()=>this.addDays(7))),ArrowUp:W((()=>this.addDays(-7))),Home:W((()=>this.startOfWeek())),End:W((()=>this.endOfWeek())),PageUp:W((()=>this.addMonths(-1))),PageDown:W((()=>this.addMonths(1))),"Shift+PageUp":W((()=>this.addYears(-1))),"Shift+PageDown":W((()=>this.addYears(1)))}),this.localize=new p(this,{onLangChange:()=>this.handleLangChange()}),this.value="",this.firstDayOfWeek=1,this.min="",this.max="",this.expand=!1,this.isDateDisabled=U,this.activeFocus=!1,this.focusedDay=new Date,this.handleDaySelect=e=>{const t=m(e,f(this.min),f(this.max)),a=!this.isDateDisabled(e);t&&a&&(this.value=g(e),this.dispatchEvent(new C("change",e)))},this.handleMonthSelect=e=>{this.setMonth(parseInt(e.target.value,10))},this.handleYearSelect=e=>{this.setYear(parseInt(e.target.value,10))},this.handleNextMonthClick=e=>{e.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=e=>{e.preventDefault(),this.addMonths(-1)},this.enableActiveFocus=()=>{this.activeFocus=!0},this.disableActiveFocus=()=>{this.activeFocus=!1}}focus(e){var t;const a=null!==(t=null==e?void 0:e.target)&&void 0!==t?t:"day";"day"===a?this.focusedDayNode.focus():"month"===a&&this.monthSelectNode.focus()}render(){const e=f(this.value),t=this.focusedDay.getMonth(),a=this.focusedDay.getFullYear(),n=f(this.min),i=f(this.max),s=n?y(n):void 0,r=i?b(i):void 0,d=(e||this.focusedDay).getFullYear(),c=n?n.getFullYear():d-10,h=i?i.getFullYear():d+10;return o`<div class="n-calendar"><div class="n-calendar-header"><div><nord-visually-hidden><h2 id="${this.dialogLabelId}" aria-live="polite" aria-atomic="true">${this.monthNames[t]}, ${this.focusedDay.getFullYear()}</h2></nord-visually-hidden><div class="n-calendar-select"><select aria-label="${this.localize.term("monthSelectLabel")}" class="n-calendar-select-month" @input="${this.handleMonthSelect}">${this.monthNames.map(((e,n)=>o`<option value="${n}" ?selected="${n===t}" ?disabled="${!m(new Date(a,n,1),s,r)}">${e}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.monthNamesShort[t]}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xs"></nord-icon></div></div><div class="n-calendar-select"><select aria-label="${this.localize.term("yearSelectLabel")}" class="n-calendar-select-year" @input="${this.handleYearSelect}">${l(v(c,h),(e=>e),(e=>o`<option ?selected="${e===a}">${e}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.focusedDay.getFullYear()}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xs"></nord-icon></div></div></div><div class="n-calendar-nav"><nord-button class="n-calendar-prev" @click="${this.handlePreviousMonthClick}" ?disabled="${x(n,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("prevMonthLabel")}</nord-visually-hidden><nord-icon color="var(--n-color-icon)" name="${this.direction.isLTR?"arrow-left-small":"arrow-right-small"}" size="s"></nord-icon></nord-button><nord-button class="n-calendar-next" @click="${this.handleNextMonthClick}" ?disabled="${x(i,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("nextMonthLabel")}</nord-visually-hidden><nord-icon color="var(--n-color-icon)" name="${this.direction.isLTR?"arrow-right-small":"arrow-left-small"}" size="s"></nord-icon></nord-button></div></div>${j({onFocusOut:this.disableActiveFocus,onFocusIn:this.enableActiveFocus,dateFormatter:this.dateFormatShort,selectedDate:e,focusedDate:this.focusedDay,onDateSelect:this.handleDaySelect,onKeyboardNavigation:this.shortcuts,labelledById:this.dialogLabelId,dayNames:this.dayNames,dayNamesShort:this.dayNamesShort,firstDayOfWeek:this.firstDayOfWeek,min:n,max:i,isDateDisabled:this.isDateDisabled})}</div>`}handleValueChange(){this.setFocusedDay(f(this.value)||new Date)}handleFocusedDayChange(){this.activeFocus&&this.focusedDayNode.focus()}handleLangChange(){const e=this.localize.resolvedLang;this.dateFormatShort=new Intl.DateTimeFormat(e,{day:"numeric",month:"long"}),this.monthNames=w(e,"long"),this.monthNamesShort=w(e,"short"),this.dayNames=D(e,"long"),this.dayNamesShort=D(e,"narrow")}addDays(e){this.setFocusedDay(z(this.focusedDay,e))}addMonths(e){this.setMonth(this.focusedDay.getMonth()+e)}addYears(e){this.setYear(this.focusedDay.getFullYear()+e)}startOfWeek(){this.setFocusedDay(k(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(F(this.focusedDay,this.firstDayOfWeek))}setMonth(e){const t=M(y(this.focusedDay),e),a=b(t),n=M(this.focusedDay,e);this.setFocusedDay(S(n,t,a))}setYear(e){const t=Y(y(this.focusedDay),e),a=b(t),n=Y(this.focusedDay,e);this.setFocusedDay(S(n,t,a))}setFocusedDay(e){this.focusedDay=S(e,f(this.min),f(this.max)),this.dispatchEvent(new C("nord-focus-date",this.focusedDay))}};B.styles=[L,E],e([r(".n-calendar-select-month",!0)],B.prototype,"monthSelectNode",void 0),e([r('button[tabindex="0"]')],B.prototype,"focusedDayNode",void 0),e([i()],B.prototype,"value",void 0),e([i({type:Number})],B.prototype,"firstDayOfWeek",void 0),e([i()],B.prototype,"min",void 0),e([i()],B.prototype,"max",void 0),e([i({reflect:!0,type:Boolean})],B.prototype,"expand",void 0),e([i({attribute:!1})],B.prototype,"isDateDisabled",void 0),e([s()],B.prototype,"activeFocus",void 0),e([s()],B.prototype,"focusedDay",void 0),e([$("value")],B.prototype,"handleValueChange",null),e([$("focusedDay","updated")],B.prototype,"handleFocusedDayChange",null),B=e([t("nord-calendar")],B);var P=B;export{P as C,I as S,A as i};
|
|
2
|
-
//# sourceMappingURL=Calendar-2797d956.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component-a61df53a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|