@warp-ds/elements 1.0.0-alpha.5 → 1.0.0-alpha.6

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.
@@ -0,0 +1 @@
1
+ export const styles: import("lit").CSSResult;
@@ -0,0 +1,4 @@
1
+ import {css} from 'lit';
2
+ export const styles = css`
3
+ @import "https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css";
4
+ `;
@@ -88,7 +88,7 @@
88
88
  integrity="sha512-YBk7HhgDZvBxmtOfUdvX0z8IH2d10Hp3aEygaMNhtF8fSOvBZ16D/1bXZTJV6ndk/L/DlXxYStP8jrF77v2MIg=="
89
89
  crossorigin="anonymous"
90
90
  ></script>
91
- <script type="module" crossorigin src="/assets/scripts.501aea67.js"></script>
91
+ <script type="module" crossorigin src="/scripts.bd8d8c7c.js"></script>
92
92
  </head>
93
93
  <body>
94
94
  <script data-for="sidebar" type="application/json">
@@ -0,0 +1,16 @@
1
+ export * from "./packages/alert";
2
+ export * from "./packages/button";
3
+ export * from "./packages/card";
4
+ export * from "./packages/select";
5
+ export * from "./packages/box";
6
+ export * from "./packages/breadcrumbs";
7
+ export * from "./packages/toast/toast";
8
+ export * from "./packages/toast/toast-container";
9
+ export * from "./packages/toast/api";
10
+ export * from "./packages/broadcast";
11
+ export * from "./packages/attention";
12
+ export * from "./packages/textfield";
13
+ export * from "./packages/expandable";
14
+ export * from "./packages/affix";
15
+ export * from "./packages/utils/expand-transition";
16
+ export * from "./packages/utils/unstyled-heading";
package/dist/index.html CHANGED
@@ -89,7 +89,7 @@
89
89
  integrity="sha512-YBk7HhgDZvBxmtOfUdvX0z8IH2d10Hp3aEygaMNhtF8fSOvBZ16D/1bXZTJV6ndk/L/DlXxYStP8jrF77v2MIg=="
90
90
  crossorigin="anonymous"
91
91
  ></script>
92
- <script type="module" crossorigin src="/assets/scripts.501aea67.js"></script>
92
+ <script type="module" crossorigin src="/scripts.bd8d8c7c.js"></script>
93
93
  </head>
94
94
  <body>
95
95
  <script data-for="sidebar" type="application/json">
@@ -0,0 +1,2 @@
1
+ export const clear: import("lit").TemplateResult<1>;
2
+ export const search: import("lit").TemplateResult<1>;
@@ -0,0 +1,26 @@
1
+ export class WarpAffix extends LitElement {
2
+ static styles: import("lit").CSSResult;
3
+ static properties: {
4
+ ariaLabel: {
5
+ type: StringConstructor;
6
+ attribute: string;
7
+ };
8
+ clear: {
9
+ type: BooleanConstructor;
10
+ };
11
+ search: {
12
+ type: BooleanConstructor;
13
+ };
14
+ label: {
15
+ type: StringConstructor;
16
+ };
17
+ };
18
+ get _classBase(): any;
19
+ get _classes(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
20
+ get _searchButton(): import("lit").TemplateResult<1>;
21
+ get _clearButton(): import("lit").TemplateResult<1>;
22
+ get _text(): import("lit").TemplateResult<1>;
23
+ get _markup(): import("lit").TemplateResult<1>;
24
+ render(): import("lit").TemplateResult<1>;
25
+ }
26
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,21 @@
1
+ export class WarpAlert extends LitElement {
2
+ static properties: {
3
+ variant: {
4
+ type: StringConstructor;
5
+ reflect: boolean;
6
+ };
7
+ show: {
8
+ type: BooleanConstructor;
9
+ reflect: boolean;
10
+ };
11
+ role: {
12
+ type: StringConstructor;
13
+ reflect: boolean;
14
+ };
15
+ };
16
+ static styles: import("lit").CSSResult;
17
+ show: boolean;
18
+ get _style(): any;
19
+ render(): import("lit").TemplateResult<1>;
20
+ }
21
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,4 @@
1
+ export function negativeSvg(): import("lit").TemplateResult<1>;
2
+ export function positiveSvg(): import("lit").TemplateResult<1>;
3
+ export function warningSvg(): import("lit").TemplateResult<1>;
4
+ export function infoSvg(): import("lit").TemplateResult<1>;
@@ -0,0 +1,66 @@
1
+ declare const WarpAttention_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ };
5
+ [x: string]: any;
6
+ createProperty(name: any, options: any): void;
7
+ };
8
+ export class WarpAttention extends WarpAttention_base {
9
+ static properties: {
10
+ show: {
11
+ type: BooleanConstructor;
12
+ reflect: boolean;
13
+ };
14
+ placement: {
15
+ type: StringConstructor;
16
+ };
17
+ tooltip: {
18
+ type: BooleanConstructor;
19
+ reflect: boolean;
20
+ };
21
+ callout: {
22
+ type: BooleanConstructor;
23
+ reflect: boolean;
24
+ };
25
+ popover: {
26
+ type: BooleanConstructor;
27
+ reflect: boolean;
28
+ };
29
+ noArrow: {
30
+ type: BooleanConstructor;
31
+ reflect: boolean;
32
+ };
33
+ };
34
+ static styles: import("lit").CSSResult[];
35
+ show: boolean;
36
+ tooltip: boolean;
37
+ callout: boolean;
38
+ popover: boolean;
39
+ noArrow: boolean;
40
+ connectedCallback(): void;
41
+ set _actualDirection(arg: any);
42
+ get _actualDirection(): any;
43
+ placement: any;
44
+ get _arrowDirection(): any;
45
+ updated(): void;
46
+ attentionState: {
47
+ isShowing: boolean;
48
+ isCallout: boolean;
49
+ actualDirection: any;
50
+ directionName: any;
51
+ arrowEl: any;
52
+ attentionEl: any;
53
+ targetEl: any;
54
+ noArrow: boolean;
55
+ };
56
+ setAriaLabels(): void;
57
+ firstUpdated(): void;
58
+ get _attentionEl(): any;
59
+ get _targetEl(): any;
60
+ get _messageEl(): any;
61
+ get _wrapperClasses(): string;
62
+ get _arrowClasses(): string;
63
+ get _arrowHtml(): import("lit").TemplateResult<1> | "";
64
+ render(): import("lit").TemplateResult<1>;
65
+ }
66
+ export {};
@@ -0,0 +1,20 @@
1
+ export class WarpBox extends LitElement {
2
+ static properties: {
3
+ bleed: {
4
+ type: BooleanConstructor;
5
+ };
6
+ bordered: {
7
+ type: BooleanConstructor;
8
+ };
9
+ info: {
10
+ type: BooleanConstructor;
11
+ };
12
+ neutral: {
13
+ type: BooleanConstructor;
14
+ };
15
+ };
16
+ static styles: import("lit").CSSResult;
17
+ get _class(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
18
+ render(): import("lit").TemplateResult<1>;
19
+ }
20
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,6 @@
1
+ export class WarpBreadcrumbs extends LitElement {
2
+ static styles: import("lit").CSSResult;
3
+ _children: any[];
4
+ render(): import("lit").TemplateResult<1>;
5
+ }
6
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,37 @@
1
+ export class WarpBroadcast extends LitElement {
2
+ static properties: {
3
+ _messages: {
4
+ state: boolean;
5
+ hasChanged(newVal: any, oldVal: any): boolean;
6
+ };
7
+ _hiddenMessageIds: {
8
+ state: boolean;
9
+ type: ArrayConstructor;
10
+ };
11
+ interval: {
12
+ type: NumberConstructor;
13
+ attribute: boolean;
14
+ reflect: boolean;
15
+ };
16
+ url: {
17
+ type: StringConstructor;
18
+ attribute: boolean;
19
+ reflect: boolean;
20
+ };
21
+ api: {
22
+ type: StringConstructor;
23
+ attribute: boolean;
24
+ reflect: boolean;
25
+ };
26
+ };
27
+ static styles: import("lit").CSSResult;
28
+ _messages: any[];
29
+ interval: number;
30
+ _hiddenMessageIds: any[];
31
+ url: string;
32
+ connectedCallback(): Promise<void>;
33
+ _fetchMessage(): Promise<void>;
34
+ _del(id: any): Promise<void>;
35
+ render(): import("lit").TemplateResult<1>;
36
+ }
37
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,2 @@
1
+ export { WarpBroadcast };
2
+ import { WarpBroadcast } from "./component";
@@ -0,0 +1,63 @@
1
+ declare const WarpButton_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ };
5
+ [x: string]: any;
6
+ createProperty(name: any, options: any): void;
7
+ };
8
+ export class WarpButton extends WarpButton_base {
9
+ static shadowRootOptions: {
10
+ delegatesFocus: boolean;
11
+ mode: ShadowRootMode;
12
+ slotAssignment?: SlotAssignmentMode;
13
+ };
14
+ static properties: {
15
+ type: {
16
+ type: number;
17
+ reflect: boolean;
18
+ };
19
+ autofocus: {
20
+ type: BooleanConstructor;
21
+ reflect: boolean;
22
+ };
23
+ variant: {
24
+ type: StringConstructor;
25
+ reflect: boolean;
26
+ };
27
+ quiet: {
28
+ type: BooleanConstructor;
29
+ reflect: boolean;
30
+ };
31
+ small: {
32
+ type: BooleanConstructor;
33
+ reflect: boolean;
34
+ };
35
+ loading: {
36
+ type: BooleanConstructor;
37
+ reflect: boolean;
38
+ };
39
+ href: {
40
+ type: StringConstructor;
41
+ reflect: boolean;
42
+ };
43
+ target: {
44
+ type: StringConstructor;
45
+ reflect: boolean;
46
+ };
47
+ rel: {
48
+ type: StringConstructor;
49
+ reflect: boolean;
50
+ };
51
+ buttonClass: {
52
+ type: StringConstructor;
53
+ reflect: boolean;
54
+ };
55
+ };
56
+ static styles: any[];
57
+ variant: string;
58
+ connectedCallback(): void;
59
+ firstUpdated(): void;
60
+ get _classes(): string;
61
+ render(): import("lit").TemplateResult<1>;
62
+ }
63
+ export {};
@@ -0,0 +1,25 @@
1
+ export class WarpCard extends LitElement {
2
+ static styles: import("lit").CSSResult[];
3
+ static properties: {
4
+ selected: {
5
+ type: BooleanConstructor;
6
+ reflect: boolean;
7
+ };
8
+ flat: {
9
+ type: BooleanConstructor;
10
+ };
11
+ clickable: {
12
+ type: BooleanConstructor;
13
+ };
14
+ };
15
+ selected: boolean;
16
+ flat: boolean;
17
+ clickable: boolean;
18
+ get _outerClasses(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
19
+ get _innerClasses(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
20
+ get uuButton(): import("lit").TemplateResult<1>;
21
+ get uuSpan(): import("lit").TemplateResult<1>;
22
+ keypressed(e: any): void;
23
+ render(): import("lit").TemplateResult<1>;
24
+ }
25
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,58 @@
1
+ declare const WarpExpandable_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ };
5
+ [x: string]: any;
6
+ createProperty(name: any, options: any): void;
7
+ };
8
+ export class WarpExpandable extends WarpExpandable_base {
9
+ static properties: {
10
+ expanded: {
11
+ type: BooleanConstructor;
12
+ reflect: boolean;
13
+ };
14
+ title: {
15
+ type: StringConstructor;
16
+ };
17
+ info: {
18
+ type: BooleanConstructor;
19
+ };
20
+ box: {
21
+ type: BooleanConstructor;
22
+ };
23
+ bleed: {
24
+ type: BooleanConstructor;
25
+ };
26
+ buttonClass: {
27
+ type: StringConstructor;
28
+ };
29
+ contentClass: {
30
+ type: StringConstructor;
31
+ };
32
+ noChevron: {
33
+ type: BooleanConstructor;
34
+ };
35
+ animated: {
36
+ type: BooleanConstructor;
37
+ };
38
+ headingLevel: {
39
+ type: NumberConstructor;
40
+ };
41
+ _hasTitle: {
42
+ type: BooleanConstructor;
43
+ state: boolean;
44
+ };
45
+ };
46
+ static styles: import("lit").CSSResult[];
47
+ expanded: boolean;
48
+ animated: boolean;
49
+ info: boolean;
50
+ box: boolean;
51
+ bleed: boolean;
52
+ noChevron: boolean;
53
+ _hasTitle: boolean;
54
+ firstUpdated(): void;
55
+ get _expandableSlot(): import("lit").TemplateResult<1>;
56
+ render(): import("lit").TemplateResult<1>;
57
+ }
58
+ export {};
@@ -0,0 +1,43 @@
1
+ declare const WarpSelect_base: {
2
+ new (): {
3
+ [x: string]: any;
4
+ };
5
+ [x: string]: any;
6
+ createProperty(name: any, options: any): void;
7
+ };
8
+ export class WarpSelect extends WarpSelect_base {
9
+ static properties: {
10
+ autoFocus: {
11
+ type: BooleanConstructor;
12
+ reflect: boolean;
13
+ };
14
+ invalid: {
15
+ type: BooleanConstructor;
16
+ reflect: boolean;
17
+ };
18
+ always: {
19
+ type: BooleanConstructor;
20
+ reflect: boolean;
21
+ };
22
+ hint: {
23
+ type: StringConstructor;
24
+ reflect: boolean;
25
+ };
26
+ label: {
27
+ type: StringConstructor;
28
+ reflect: boolean;
29
+ };
30
+ optional: {
31
+ type: BooleanConstructor;
32
+ reflect: boolean;
33
+ };
34
+ _options: {
35
+ state: boolean;
36
+ };
37
+ };
38
+ static styles: import("lit").CSSResult;
39
+ _options: any;
40
+ render(): import("lit").TemplateResult<1>;
41
+ #private;
42
+ }
43
+ export {};
@@ -0,0 +1,80 @@
1
+ export class WarpTextField extends LitElement {
2
+ static properties: {
3
+ disabled: {
4
+ type: BooleanConstructor;
5
+ };
6
+ invalid: {
7
+ type: BooleanConstructor;
8
+ };
9
+ id: {
10
+ type: StringConstructor;
11
+ };
12
+ label: {
13
+ type: StringConstructor;
14
+ };
15
+ helpText: {
16
+ type: StringConstructor;
17
+ attribute: string;
18
+ };
19
+ size: {
20
+ type: StringConstructor;
21
+ };
22
+ max: {
23
+ type: NumberConstructor;
24
+ };
25
+ min: {
26
+ type: NumberConstructor;
27
+ };
28
+ minLength: {
29
+ type: NumberConstructor;
30
+ attribute: string;
31
+ };
32
+ maxLength: {
33
+ type: NumberConstructor;
34
+ attribute: string;
35
+ };
36
+ name: {
37
+ type: StringConstructor;
38
+ };
39
+ pattern: {
40
+ type: StringConstructor;
41
+ };
42
+ placeholder: {
43
+ type: StringConstructor;
44
+ };
45
+ readOnly: {
46
+ type: BooleanConstructor;
47
+ attribute: string;
48
+ };
49
+ required: {
50
+ type: BooleanConstructor;
51
+ };
52
+ type: {
53
+ type: StringConstructor;
54
+ };
55
+ value: {
56
+ type: StringConstructor;
57
+ };
58
+ _hasPrefix: {
59
+ state: boolean;
60
+ };
61
+ _hasSuffix: {
62
+ state: boolean;
63
+ };
64
+ };
65
+ static styles: import("lit").CSSResult[];
66
+ type: string;
67
+ get _outerWrapperStyles(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
68
+ get _innerWrapperStyles(): import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directive").DirectiveResult<typeof import(".pnpm/lit-html@2.6.1/node_modules/lit-html/directives/class-map").ClassMapDirective>;
69
+ get _label(): import("lit").TemplateResult<1>;
70
+ get _helpId(): string;
71
+ get _id(): string;
72
+ get _error(): string;
73
+ handler(e: any): void;
74
+ prefixSlotChange(e: any): void;
75
+ _hasPrefix: boolean;
76
+ suffixSlotChange(e: any): void;
77
+ _hasSuffix: boolean;
78
+ render(): import("lit").TemplateResult<1>;
79
+ }
80
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Toast helper function options
3
+ * @typedef {Object} ToastOptions
4
+ * @property {(number|string)} [id] Custom identifier
5
+ * @property {('success'|'error'|'warning'|'info')} [type] Type of alert
6
+ * @property {String} [text] The toast message. Only needed when updating text on existing toast
7
+ * @property {(number|string)} [duration] Duration of toast in milliseconds. Defaults to 5000. For accessibility reasons, toasts should never be interactive and therefore need to auto remove. If you must disable auto remove, set duration to Number.POSITIVE_INFINITY.
8
+ * @property {Boolean} [canclose] Whether the toast can be dismissed. Defaults to false. WARNING! For accessibility reasons, toasts should not be interactive and canclose should always be false. If the toast absolutely must be dismissble, set this to true.
9
+ */
10
+ /**
11
+ * Creates a new toast
12
+ * @param {String} message Message
13
+ * @param {ToastOptions?} options Toast options
14
+ * @returns {ToastOptions} Toast details
15
+ */
16
+ export function toast(message: string, options: ToastOptions | null): ToastOptions;
17
+ /**
18
+ * Remove an existing toast
19
+ * @param {String|Number} id Toast identifier
20
+ * @return {Promise<Boolean>} Resolves to true if deleted, false if not found
21
+ */
22
+ export function removeToast(id: string | number): Promise<boolean>;
23
+ /**
24
+ * Update an existing toast
25
+ * @param {String|Number} id Toast identifier
26
+ * @param {ToastOptions?} options Toast options
27
+ * @returns {WarpToastContainer} Toast details
28
+ */
29
+ export function updateToast(id: string | number, options: ToastOptions | null): WarpToastContainer;
30
+ /**
31
+ * Toast helper function options
32
+ */
33
+ export type ToastOptions = {
34
+ /**
35
+ * Custom identifier
36
+ */
37
+ id?: (number | string);
38
+ /**
39
+ * Type of alert
40
+ */
41
+ type?: ('success' | 'error' | 'warning' | 'info');
42
+ /**
43
+ * The toast message. Only needed when updating text on existing toast
44
+ */
45
+ text?: string;
46
+ /**
47
+ * Duration of toast in milliseconds. Defaults to 5000. For accessibility reasons, toasts should never be interactive and therefore need to auto remove. If you must disable auto remove, set duration to Number.POSITIVE_INFINITY.
48
+ */
49
+ duration?: (number | string);
50
+ /**
51
+ * Whether the toast can be dismissed. Defaults to false. WARNING! For accessibility reasons, toasts should not be interactive and canclose should always be false. If the toast absolutely must be dismissble, set this to true.
52
+ */
53
+ canclose?: boolean;
54
+ };
@@ -0,0 +1,3 @@
1
+ export function successSVG(options: any): import("lit").TemplateResult<1>;
2
+ export function failureSVG(options: any): import("lit").TemplateResult<1>;
3
+ export function closeSVG(): import("lit").TemplateResult<1>;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Toast helper function options
3
+ * @typedef {Object} ToastOptions
4
+ * @property {(number|string)} [id] Custom identifier
5
+ * @property {('success'|'error'|'warning'|'info')} [type] Type of alert
6
+ * @property {String} [text] The toast message. Only needed when updating text on existing toast
7
+ * @property {(number|string)} [duration] Duration of toast in milliseconds. Defaults to 5000. For accessibility reasons, toasts should never be interactive and therefore need to auto remove. If you must disable auto remove, set duration to Number.POSITIVE_INFINITY.
8
+ * @property {Boolean} [canClose] Whether the toast can be dismissed. Defaults to false. WARNING! For accessibility reasons, toasts should not be interactive and canclose should always be false. If the toast absolutely must be dismissble, set this to true.
9
+ */
10
+ export class WarpToastContainer extends LitElement {
11
+ static styles: import("lit").CSSResult[];
12
+ static properties: {
13
+ _toasts: {
14
+ state: boolean;
15
+ };
16
+ };
17
+ static init(): Element;
18
+ _toasts: any;
19
+ _interval: number;
20
+ get _toastsArray(): any;
21
+ /**
22
+ *
23
+ * @param {String|Number} id
24
+ * @returns {ToastOptions}
25
+ */
26
+ get(id: string | number): ToastOptions;
27
+ /**
28
+ *
29
+ * @param {Object} toast
30
+ * @returns {WarpToastContainer}
31
+ */
32
+ set(toast: any): WarpToastContainer;
33
+ /**
34
+ *
35
+ * @param {String|Number} id
36
+ * @returns {ToastOptions | false}
37
+ */
38
+ del(id: string | number): ToastOptions | false;
39
+ render(): import("lit").TemplateResult<1>;
40
+ }
41
+ /**
42
+ * Toast helper function options
43
+ */
44
+ export type ToastOptions = {
45
+ /**
46
+ * Custom identifier
47
+ */
48
+ id?: (number | string);
49
+ /**
50
+ * Type of alert
51
+ */
52
+ type?: ('success' | 'error' | 'warning' | 'info');
53
+ /**
54
+ * The toast message. Only needed when updating text on existing toast
55
+ */
56
+ text?: string;
57
+ /**
58
+ * Duration of toast in milliseconds. Defaults to 5000. For accessibility reasons, toasts should never be interactive and therefore need to auto remove. If you must disable auto remove, set duration to Number.POSITIVE_INFINITY.
59
+ */
60
+ duration?: (number | string);
61
+ /**
62
+ * Whether the toast can be dismissed. Defaults to false. WARNING! For accessibility reasons, toasts should not be interactive and canclose should always be false. If the toast absolutely must be dismissble, set this to true.
63
+ */
64
+ canClose?: boolean;
65
+ };
66
+ import { LitElement } from ".pnpm/lit-element@3.2.2/node_modules/lit-element/lit-element";