@nordhealth/components 1.9.1 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2700 -2097
- package/lib/AutocompleteMixin-ca948bdb.js +2 -0
- package/lib/AutocompleteMixin-ca948bdb.js.map +1 -0
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Calendar-8b474799.js +2 -0
- package/lib/{Calendar-2797d956.js.map → Calendar-8b474799.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/InputMixin-9334d385.js.map +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Qrcode.js +7 -0
- package/lib/Qrcode.js.map +1 -0
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/Table.js +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/TextField-f48e2e5c.js +2 -0
- package/lib/TextField-f48e2e5c.js.map +1 -0
- package/lib/Textarea.js +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/bundle.js +13 -8
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/checkbox/Checkbox.d.ts +4 -0
- package/lib/src/common/mixins/AutocompleteMixin.d.ts +8 -0
- package/lib/src/common/mixins/InputMixin.d.ts +1 -1
- package/lib/src/common/mixins/ReadonlyMixin.d.ts +7 -0
- package/lib/src/date-picker/DatePicker.d.ts +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/input/Input.d.ts +1 -1
- package/lib/src/qrcode/Qrcode.d.ts +53 -0
- package/lib/src/qrcode/Qrcode.test.d.ts +2 -0
- package/lib/src/select/Select.d.ts +1 -1
- package/lib/src/textarea/Textarea.d.ts +1 -1
- package/package.json +6 -5
- package/lib/Calendar-2797d956.js +0 -2
- package/lib/TextField-93a3922f.js +0 -2
- package/lib/TextField-93a3922f.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-8b474799.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-a61df53a.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
|
|
@@ -13,6 +13,10 @@ declare const Checkbox_base: (new (...args: any[]) => import("../common/mixins/F
|
|
|
13
13
|
export default class Checkbox extends Checkbox_base {
|
|
14
14
|
static styles: import("lit").CSSResult[];
|
|
15
15
|
protected get formValue(): string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Controls whether the checkbox is in an indeterminate state.
|
|
18
|
+
*/
|
|
19
|
+
indeterminate: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* Controls whether the checkbox is checked or not.
|
|
18
22
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare type Constructor<T = Record<string, unknown>> = new (...args: any[]) => T;
|
|
3
|
+
declare type AutocompleteAttribute = "off" | "on" | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo";
|
|
4
|
+
export declare class AutocompleteMixinInterface {
|
|
5
|
+
autocomplete: AutocompleteAttribute;
|
|
6
|
+
}
|
|
7
|
+
export declare function AutocompleteMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<AutocompleteMixinInterface> & T;
|
|
8
|
+
export {};
|
|
@@ -4,7 +4,7 @@ export declare class InputMixinInterface {
|
|
|
4
4
|
name: string | undefined;
|
|
5
5
|
value: string;
|
|
6
6
|
disabled: boolean;
|
|
7
|
-
form
|
|
7
|
+
get form(): HTMLFormElement | null;
|
|
8
8
|
}
|
|
9
9
|
export declare function InputMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<InputMixinInterface> & T;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare type Constructor<T = Record<string, unknown>> = new (...args: any[]) => T;
|
|
3
|
+
export declare class ReadonlyMixinInterface {
|
|
4
|
+
readonly: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function ReadonlyMixin<T extends Constructor<LitElement>>(superClass: T): Constructor<ReadonlyMixinInterface> & T;
|
|
7
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import "../visually-hidden/VisuallyHidden.js";
|
|
|
5
5
|
import "../calendar/Calendar.js";
|
|
6
6
|
import type { DateDisabledPredicate } from "../calendar/Calendar.js";
|
|
7
7
|
import { DateAdapter } from "./date-adapter.js";
|
|
8
|
-
declare const DatePicker_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
8
|
+
declare const DatePicker_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/ReadonlyMixin.js").ReadonlyMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* Date Picker allows user to enter a date either through text input,
|
package/lib/src/index.d.ts
CHANGED
|
@@ -41,3 +41,4 @@ export { default as Skeleton } from "./skeleton/Skeleton.js";
|
|
|
41
41
|
export { default as Toast } from "./toast/Toast.js";
|
|
42
42
|
export { default as ToastGroup } from "./toast-group/ToastGroup.js";
|
|
43
43
|
export { default as Divider } from "./divider/Divider.js";
|
|
44
|
+
export { default as Qrcode } from "./qrcode/Qrcode.js";
|
package/lib/src/input/Input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Input_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
2
|
+
declare const Input_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/AutocompleteMixin.js").AutocompleteMixinInterface) & (new (...args: any[]) => import("../common/mixins/ReadonlyMixin.js").ReadonlyMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* Inputs are used to allow users to provide text input when the expected input is short.
|
|
5
5
|
* As well as plain text, Input supports various types of text, including passwords and numbers.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare const Qrcode_base: typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* QR Code component is used for providing information or links
|
|
5
|
+
* to users which they can quickly scan with their smartphone.
|
|
6
|
+
*
|
|
7
|
+
* @status draft
|
|
8
|
+
* @category image
|
|
9
|
+
* @displayName QR Code
|
|
10
|
+
*/
|
|
11
|
+
export default class Qrcode extends Qrcode_base {
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
private canvas;
|
|
14
|
+
private computed;
|
|
15
|
+
/**
|
|
16
|
+
* The value of the QR Code, most commonly an URL.
|
|
17
|
+
*/
|
|
18
|
+
value: string;
|
|
19
|
+
/**
|
|
20
|
+
* Label used by assistive technology. If unspecified, the value will
|
|
21
|
+
* be used instead.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* The size of the rendered QR Code in pixels.
|
|
26
|
+
*/
|
|
27
|
+
size: number;
|
|
28
|
+
/**
|
|
29
|
+
* The fill color of the QR Code.
|
|
30
|
+
* Can accept any valid CSS color value, including custom properties.
|
|
31
|
+
*/
|
|
32
|
+
color: string;
|
|
33
|
+
/**
|
|
34
|
+
* The background color of the QR Code.
|
|
35
|
+
* Can accept any valid CSS color value, including custom properties.
|
|
36
|
+
*/
|
|
37
|
+
background: string;
|
|
38
|
+
/**
|
|
39
|
+
* Error correction level makes the QR Code bigger and helps users to
|
|
40
|
+
* scan it without issues. L, M, Q and H values will use 7%, 15%, 25%
|
|
41
|
+
* and 30% of the QR code for error correction respectively.
|
|
42
|
+
*/
|
|
43
|
+
correction: "L" | "M" | "Q" | "H";
|
|
44
|
+
firstUpdated(): void;
|
|
45
|
+
private generate;
|
|
46
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
47
|
+
}
|
|
48
|
+
declare global {
|
|
49
|
+
interface HTMLElementTagNameMap {
|
|
50
|
+
"nord-qrcode": Qrcode;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import "../button/Button.js";
|
|
3
|
-
declare const Select_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
3
|
+
declare const Select_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/AutocompleteMixin.js").AutocompleteMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
4
4
|
/**
|
|
5
5
|
* Select lets users choose one option from an options menu.
|
|
6
6
|
* Consider using select when you have 5 or more options to choose from.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
declare const Textarea_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
2
|
+
declare const Textarea_base: (new (...args: any[]) => import("../common/mixins/FormAssociatedMixin.js").FormAssociatedMixinInterface) & (new (...args: any[]) => import("../common/mixins/AutocompleteMixin.js").AutocompleteMixinInterface) & (new (...args: any[]) => import("../common/mixins/ReadonlyMixin.js").ReadonlyMixinInterface) & (new (...args: any[]) => import("../common/mixins/InputMixin.js").InputMixinInterface) & (new (...args: any[]) => import("../common/mixins/FocusableMixin.js").FocusableMixinInterface) & typeof LitElement;
|
|
3
3
|
/**
|
|
4
4
|
* Textarea is a component that allows user to write text over
|
|
5
5
|
* multiple rows. Used when the expected user input is long.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordhealth/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
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",
|
|
@@ -34,14 +34,15 @@
|
|
|
34
34
|
"@floating-ui/dom": "0.5.3",
|
|
35
35
|
"@nordhealth/icons": "^1.3.9",
|
|
36
36
|
"lit": "2.2.5",
|
|
37
|
+
"qr-creator": "1.0.0",
|
|
37
38
|
"tinykeys": "1.4.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@custom-elements-manifest/analyzer": "0.6.3",
|
|
41
|
-
"@nordhealth/css": "^1.3.
|
|
42
|
+
"@nordhealth/css": "^1.3.5",
|
|
42
43
|
"@nordhealth/fonts": "^2.0.14",
|
|
43
|
-
"@nordhealth/themes": "^6.3.
|
|
44
|
-
"@nordhealth/tokens": "^5.
|
|
44
|
+
"@nordhealth/themes": "^6.3.1",
|
|
45
|
+
"@nordhealth/tokens": "^5.4.0",
|
|
45
46
|
"@open-wc/eslint-config": "7.0.0",
|
|
46
47
|
"@open-wc/testing": "3.1.5",
|
|
47
48
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
@@ -178,5 +179,5 @@
|
|
|
178
179
|
}
|
|
179
180
|
]
|
|
180
181
|
},
|
|
181
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "dc8867b204d0471b28638910e6d2914030d58da5"
|
|
182
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,2 +0,0 @@
|
|
|
1
|
-
import{r as n}from"./lit-element-67e6cd99.js";const r=n`.n-input-container{position:relative;inline-size:var(--n-input-width,240px)}.n-input{background:var(--n-color-active);color:var(--n-color-text);padding-block-start:calc(var(--n-space-s) - 1px);padding-block-end:calc(var(--n-space-s) - 1px);padding-inline-start:calc(var(--n-space-s) * 1.6);padding-inline-end:calc(var(--n-space-s) * 1.6);border-radius:var(--n-border-radius-s);border:1px solid var(--n-input-border-color,var(--n-color-border-strong));font-family:var(--n-font-family);font-size:var(--n-font-size-m);line-height:var(--n-line-height-form);inline-size:100%;transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly)}@media (max-width:480px){.n-input{font-size:var(--n-font-size-l)}}:host([expand]){--n-input-width:100%;inline-size:100%}.n-input:hover,.n-label-container:hover+.n-input-container .n-input{--n-input-border-color:var(--n-color-border-hover)}.n-input:focus{--n-input-border-color:var(--n-color-accent);background:var(--n-color-surface);outline:0;box-shadow:0 0 0 1px var(--n-input-border-color)}.n-input::placeholder{color:var(--n-color-text-weakest)}.n-input:disabled,.n-label-container:hover+.n-input-container .n-input:disabled{--n-input-border-color:var(--n-color-active);color:var(--n-color-text-weakest)}.n-input[aria-invalid=true]{--n-input-border-color:var(--n-color-status-danger)!important}`;export{r as s};
|
|
2
|
-
//# sourceMappingURL=TextField-93a3922f.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextField-93a3922f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|