@skf-design-system/ui-components 0.0.1-beta.3 → 1.0.0-beta.3
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/dist/components/accordion/accordion.component.d.ts +9 -5
- package/dist/components/accordion/accordion.component.js +22 -19
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.styles.js +3 -3
- package/dist/components/alert/alert.component.d.ts +7 -5
- package/dist/components/alert/alert.component.js +61 -0
- package/dist/components/alert/alert.js +6 -0
- package/dist/components/alert/alert.styles.js +63 -0
- package/dist/components/button/button.component.js +1 -1
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +3 -3
- package/dist/components/card/card.component.js +16 -19
- package/dist/components/card/card.styles.js +11 -3
- package/dist/components/checkbox/checkbox.component.d.ts +9 -6
- package/dist/components/checkbox/checkbox.component.js +8 -8
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/checkbox/checkbox.test.d.ts +1 -0
- package/dist/components/collapse/collapse.component.d.ts +9 -6
- package/dist/components/collapse/collapse.component.js +39 -36
- package/dist/components/collapse/collapse.styles.js +3 -3
- package/dist/components/collapse/collapse.test.d.ts +1 -0
- package/dist/components/divider/divider.component.d.ts +13 -10
- package/dist/components/divider/divider.component.js +34 -29
- package/dist/components/divider/divider.styles.js +1 -5
- package/dist/components/heading/heading.component.d.ts +12 -2
- package/dist/components/heading/heading.component.js +34 -0
- package/dist/components/heading/heading.js +6 -0
- package/dist/components/heading/heading.styles.js +62 -0
- package/dist/components/icon/icon.component.d.ts +14 -8
- package/dist/components/icon/icon.component.js +6 -6
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +34 -29
- package/dist/components/input/input.component.js +36 -36
- package/dist/components/link/link.component.d.ts +15 -12
- package/dist/components/link/link.component.js +7 -7
- package/dist/components/link/link.styles.js +1 -1
- package/dist/components/loader/loader.component.d.ts +7 -7
- package/dist/components/loader/loader.component.js +35 -61
- package/dist/components/loader/loader.styles.js +42 -10
- package/dist/components/logo/logo.component.d.ts +5 -3
- package/dist/components/logo/logo.component.js +8 -8
- package/dist/components/logo/logo.styles.js +2 -2
- package/dist/components/radio/radio.component.d.ts +15 -13
- package/dist/components/radio/radio.component.js +3 -3
- package/dist/components/radio/radio.styles.js +3 -3
- package/dist/components/select/select.component.d.ts +137 -0
- package/dist/components/select/select.component.js +311 -0
- package/dist/components/select/select.controllers.d.ts +59 -0
- package/dist/components/select/select.controllers.js +169 -0
- package/dist/components/select/select.d.ts +8 -0
- package/dist/components/select/select.js +6 -0
- package/dist/components/select/select.styles.d.ts +1 -0
- package/dist/components/select/select.styles.js +116 -0
- package/dist/components/select-option/select-option.component.d.ts +77 -0
- package/dist/components/select-option/select-option.component.js +117 -0
- package/dist/components/select-option/select-option.controllers.d.ts +9 -0
- package/dist/components/select-option/select-option.d.ts +8 -0
- package/dist/components/select-option/select-option.js +6 -0
- package/dist/components/select-option/select-option.styles.d.ts +1 -0
- package/dist/components/select-option/select-option.styles.js +53 -0
- package/dist/components/select-option-group/select-option-group.component.d.ts +16 -0
- package/dist/components/select-option-group/select-option-group.component.js +31 -0
- package/dist/components/select-option-group/select-option-group.d.ts +8 -0
- package/dist/components/select-option-group/select-option-group.js +6 -0
- package/dist/components/select-option-group/select-option-group.style.d.ts +1 -0
- package/dist/components/select-option-group/select-option-group.style.js +18 -0
- package/dist/components/switch/switch.component.d.ts +2 -3
- package/dist/components/switch/switch.component.js +106 -0
- package/dist/components/switch/switch.js +6 -0
- package/dist/components/switch/switch.styles.js +80 -0
- package/dist/components/switch/switch.test.d.ts +1 -0
- package/dist/components/tag/tag.component.d.ts +25 -4
- package/dist/components/tag/tag.component.js +66 -29
- package/dist/components/tag/tag.styles.js +6 -5
- package/dist/components/textarea/textarea.component.d.ts +26 -23
- package/dist/components/textarea/textarea.component.js +15 -12
- package/dist/custom-elements.json +960 -305
- package/dist/index.d.ts +6 -0
- package/dist/index.js +48 -30
- package/dist/internal/components/formBase.d.ts +18 -1
- package/dist/internal/components/formBase.js +25 -13
- package/dist/internal/components/skf-element.d.ts +4 -4
- package/dist/internal/components/skf-element.js +15 -19
- package/dist/internal/helpers/array.d.ts +4 -0
- package/dist/internal/helpers/findMatchingTags.d.ts +2 -0
- package/dist/internal/helpers/findMatchingTags.js +12 -0
- package/dist/internal/helpers/hintSeverity.d.ts +2 -0
- package/dist/internal/helpers/hintSeverity.js +6 -0
- package/dist/internal/helpers/raiseError.d.ts +28 -0
- package/dist/internal/helpers/raiseError.js +29 -0
- package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -6
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.js +3 -0
- package/dist/react/skf-select/index.d.ts +21 -0
- package/dist/react/skf-select/index.js +21 -0
- package/dist/react/skf-select-option/index.d.ts +9 -0
- package/dist/react/skf-select-option/index.js +17 -0
- package/dist/react/skf-select-option-group/index.d.ts +3 -0
- package/dist/react/skf-select-option-group/index.js +13 -0
- package/dist/styles/form-field.styles.js +7 -7
- package/dist/types/jsx/custom-element-jsx.d.ts +290 -140
- package/dist/types/vue/index.d.ts +223 -90
- package/dist/vscode.html-custom-data.json +294 -97
- package/dist/web-types.json +614 -242
- package/package.json +34 -30
@@ -1,17 +1,18 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
2
|
import { SkfElement as h } from "../../internal/components/skf-element.js";
|
3
3
|
import m from "../../styles/component.styles.js";
|
4
|
-
import { property as
|
5
|
-
import {
|
6
|
-
import u from "
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
import { property as i } from "lit/decorators.js";
|
5
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
6
|
+
import { html as u, unsafeStatic as l } from "lit/static-html.js";
|
7
|
+
import f from "./collapse.styles.js";
|
8
|
+
var y = Object.defineProperty, o = (a, s, d, g) => {
|
9
|
+
for (var t = void 0, r = a.length - 1, p; r >= 0; r--)
|
10
|
+
(p = a[r]) && (t = p(s, d, t) || t);
|
11
|
+
return t && y(s, d, t), t;
|
11
12
|
};
|
12
13
|
const n = class n extends h {
|
13
14
|
constructor() {
|
14
|
-
super(...arguments), this.
|
15
|
+
super(...arguments), this.headingAs = "h2", this._toggle = () => {
|
15
16
|
this.dispatchEvent(
|
16
17
|
new CustomEvent("skf-collapse-toggle", {
|
17
18
|
bubbles: !0,
|
@@ -30,45 +31,47 @@ const n = class n extends h {
|
|
30
31
|
this.expanded = !0;
|
31
32
|
}
|
32
33
|
render() {
|
33
|
-
return
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<div id="
|
47
|
-
<
|
34
|
+
return u`
|
35
|
+
<div id="root">
|
36
|
+
<${l(this.headingAs)} id="heading">
|
37
|
+
<button
|
38
|
+
@click=${this._toggle}
|
39
|
+
aria-controls="main"
|
40
|
+
aria-expanded=${c(this.expanded ? "true" : "false")}
|
41
|
+
type="button"
|
42
|
+
>
|
43
|
+
<span id="label">${this.heading}</span>
|
44
|
+
<skf-icon name=${this.expanded ? "caretUp" : "caretDown"}></skf-icon>
|
45
|
+
</button>
|
46
|
+
</${l(this.headingAs)}>
|
47
|
+
<div id="body">
|
48
|
+
<div id="main" data-testid="main">
|
49
|
+
<slot></slot>
|
50
|
+
</div>
|
48
51
|
</div>
|
49
52
|
</div>
|
50
53
|
`;
|
51
54
|
}
|
52
55
|
};
|
53
|
-
n.styles = [m,
|
56
|
+
n.styles = [m, f];
|
54
57
|
let e = n;
|
55
|
-
|
56
|
-
|
58
|
+
o([
|
59
|
+
i({ type: Boolean, reflect: !0 })
|
57
60
|
], e.prototype, "animated");
|
58
|
-
|
59
|
-
|
61
|
+
o([
|
62
|
+
i({ type: Boolean, reflect: !0 })
|
60
63
|
], e.prototype, "expanded");
|
61
|
-
|
62
|
-
|
64
|
+
o([
|
65
|
+
i()
|
63
66
|
], e.prototype, "heading");
|
64
|
-
|
65
|
-
|
67
|
+
o([
|
68
|
+
i({ attribute: "heading-as" })
|
66
69
|
], e.prototype, "headingAs");
|
67
|
-
|
68
|
-
|
70
|
+
o([
|
71
|
+
i({ type: Boolean, reflect: !0 })
|
69
72
|
], e.prototype, "small");
|
70
|
-
|
71
|
-
|
73
|
+
o([
|
74
|
+
i({ type: Boolean, reflect: !0 })
|
72
75
|
], e.prototype, "truncate");
|
73
76
|
export {
|
74
77
|
e as SkfCollapse
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { css as
|
2
|
-
const s =
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const s = o`
|
3
3
|
@layer components {
|
4
|
-
|
4
|
+
#root {
|
5
5
|
background: var(--skf-bg-color-neutral-1);
|
6
6
|
border-bottom: var(--skf-border-width-sm) solid var(--skf-border-color-tertiary);
|
7
7
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -2,7 +2,9 @@ import { SkfElement } from '@internal/components/skf-element.js';
|
|
2
2
|
import type { BorderColor } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
5
|
-
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
5
|
+
* The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
|
6
|
+
*
|
7
|
+
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/3831f1-divider) for design principles
|
6
8
|
*
|
7
9
|
* @cssproperty --skf-divider-spacing - The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical
|
8
10
|
* @cssproperty --skf-divider-inset - The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical
|
@@ -10,17 +12,18 @@ import { type CSSResultGroup } from 'lit';
|
|
10
12
|
* @tagname skf-divider
|
11
13
|
*/
|
12
14
|
export declare class SkfDivider extends SkfElement {
|
15
|
+
#private;
|
13
16
|
static styles: CSSResultGroup;
|
14
|
-
/**
|
15
|
-
|
16
|
-
|
17
|
+
/**
|
18
|
+
* Defines the Divider color
|
19
|
+
* @type { "emphasised" | "primary" | "secondary" | "tertiary" | "inverse" }
|
20
|
+
*/
|
21
|
+
color: BorderColor;
|
17
22
|
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
18
|
-
decorative?: boolean
|
23
|
+
decorative?: boolean;
|
19
24
|
/** If true, renders the divider vertically */
|
20
|
-
vertical?: boolean
|
21
|
-
|
22
|
-
|
23
|
-
/** @internal */
|
24
|
-
private renderDefault;
|
25
|
+
vertical?: boolean;
|
26
|
+
constructor();
|
27
|
+
connectedCallback(): void;
|
25
28
|
render(): import("lit").TemplateResult<1>;
|
26
29
|
}
|
@@ -1,37 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { html as c } from "lit";
|
4
|
-
import { property as o } from "lit/decorators.js";
|
5
|
-
import { when as d } from "lit/directives/when.js";
|
6
|
-
import f from "./divider.styles.js";
|
7
|
-
var v = Object.defineProperty, i = (s, l, n, u) => {
|
8
|
-
for (var r = void 0, t = s.length - 1, p; t >= 0; t--)
|
9
|
-
(p = s[t]) && (r = p(l, n, r) || r);
|
10
|
-
return r && v(l, n, r), r;
|
1
|
+
var f = (t) => {
|
2
|
+
throw TypeError(t);
|
11
3
|
};
|
12
|
-
|
4
|
+
var d = (t, r, e) => r.has(t) || f("Cannot " + e);
|
5
|
+
var s = (t, r, e) => (d(t, r, "read from private field"), e ? e.call(t) : r.get(t)), v = (t, r, e) => r.has(t) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, e), y = (t, r, e, l) => (d(t, r, "write to private field"), l ? l.call(t, e) : r.set(t, e), e);
|
6
|
+
import { SkfElement as u } from "../../internal/components/skf-element.js";
|
7
|
+
import b from "../../styles/component.styles.js";
|
8
|
+
import { html as C } from "lit";
|
9
|
+
import { property as p } from "lit/decorators.js";
|
10
|
+
import _ from "./divider.styles.js";
|
11
|
+
var x = Object.defineProperty, c = (t, r, e, l) => {
|
12
|
+
for (var o = void 0, n = t.length - 1, h; n >= 0; n--)
|
13
|
+
(h = t[n]) && (o = h(r, e, o) || o);
|
14
|
+
return o && x(r, e, o), o;
|
15
|
+
}, i;
|
16
|
+
const m = class m extends u {
|
13
17
|
constructor() {
|
14
|
-
super(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
super();
|
19
|
+
v(this, i);
|
20
|
+
this.color = "primary", y(this, i, this.attachInternals());
|
21
|
+
}
|
22
|
+
connectedCallback() {
|
23
|
+
super.connectedCallback(), s(this, i).role = this.decorative ? "generic" : "separator", s(this, i).ariaOrientation = this.vertical ? "vertical" : "horizontal";
|
19
24
|
}
|
20
25
|
render() {
|
21
|
-
return
|
26
|
+
return C`<div id="root"></div>`;
|
22
27
|
}
|
23
28
|
};
|
24
|
-
|
25
|
-
let
|
26
|
-
|
27
|
-
|
28
|
-
],
|
29
|
-
|
30
|
-
|
31
|
-
],
|
32
|
-
|
33
|
-
|
34
|
-
],
|
29
|
+
i = new WeakMap(), m.styles = [b, _];
|
30
|
+
let a = m;
|
31
|
+
c([
|
32
|
+
p({ reflect: !0 })
|
33
|
+
], a.prototype, "color");
|
34
|
+
c([
|
35
|
+
p({ type: Boolean })
|
36
|
+
], a.prototype, "decorative");
|
37
|
+
c([
|
38
|
+
p({ type: Boolean, reflect: !0 })
|
39
|
+
], a.prototype, "vertical");
|
35
40
|
export {
|
36
|
-
|
41
|
+
a as SkfDivider
|
37
42
|
};
|
@@ -1,10 +1,6 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
2
|
const i = r`
|
3
|
-
|
4
|
-
display: contents;
|
5
|
-
}
|
6
|
-
|
7
|
-
#divider {
|
3
|
+
#root {
|
8
4
|
--_skf-divider-border-color: var(--skf-border-color-primary);
|
9
5
|
--_skf-divider-border: var(--skf-border-width-sm) solid var(--_skf-divider-border-color);
|
10
6
|
|
@@ -5,13 +5,23 @@ import { type CSSResultGroup } from 'lit';
|
|
5
5
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
6
6
|
* It extends the interface of native html `<h1>` to `<h4>` elements.
|
7
7
|
*
|
8
|
+
* @slot - The headings content
|
9
|
+
*
|
8
10
|
* @tagname skf-heading
|
9
11
|
*/
|
10
12
|
export declare class SkfHeading extends SkfElement {
|
11
13
|
static styles: CSSResultGroup;
|
12
|
-
/**
|
14
|
+
/**
|
15
|
+
* Controls which heading element will be rendered. Should not be used to affect appearance
|
16
|
+
*
|
17
|
+
* @type { "h1" | "h2" | "h3" | "h4" }
|
18
|
+
*/
|
13
19
|
as: HeadingType;
|
14
|
-
/**
|
20
|
+
/**
|
21
|
+
* If provided, changes the appearance of the heading
|
22
|
+
*
|
23
|
+
* @type { "h1" | "h2" | "h3" | "h4" }
|
24
|
+
*/
|
15
25
|
styledAs?: HeadingType;
|
16
26
|
render(): import("lit").TemplateResult;
|
17
27
|
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { SkfElement as n } from "../../internal/components/skf-element.js";
|
2
|
+
import u from "../../styles/component.styles.js";
|
3
|
+
import "lit";
|
4
|
+
import { property as a } from "lit/decorators.js";
|
5
|
+
import { html as y, unsafeStatic as l } from "lit/static-html.js";
|
6
|
+
import c from "./heading.styles.js";
|
7
|
+
var h = Object.defineProperty, f = (o, p, i, d) => {
|
8
|
+
for (var t = void 0, s = o.length - 1, m; s >= 0; s--)
|
9
|
+
(m = o[s]) && (t = m(p, i, t) || t);
|
10
|
+
return t && h(p, i, t), t;
|
11
|
+
};
|
12
|
+
const e = class e extends n {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments), this.as = "h1";
|
15
|
+
}
|
16
|
+
render() {
|
17
|
+
return y`
|
18
|
+
<${l(this.as)} id="root">
|
19
|
+
<slot></slot>
|
20
|
+
</${l(this.as)}>
|
21
|
+
`;
|
22
|
+
}
|
23
|
+
};
|
24
|
+
e.styles = [u, c];
|
25
|
+
let r = e;
|
26
|
+
f([
|
27
|
+
a({ reflect: !0 })
|
28
|
+
], r.prototype, "as");
|
29
|
+
f([
|
30
|
+
a({ attribute: "styled-as" })
|
31
|
+
], r.prototype, "styledAs");
|
32
|
+
export {
|
33
|
+
r as SkfHeading
|
34
|
+
};
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import { css as s } from "lit";
|
2
|
+
const t = s`
|
3
|
+
@layer components {
|
4
|
+
:host {
|
5
|
+
display: contents;
|
6
|
+
}
|
7
|
+
|
8
|
+
#root {
|
9
|
+
color: var(--skf-text-color-primary);
|
10
|
+
font-size: var(--_skf-heading-size);
|
11
|
+
font-weight: var(--_skf-heading-weight);
|
12
|
+
line-height: 1.2;
|
13
|
+
|
14
|
+
/* Defaults */
|
15
|
+
:host([as='h1']) & {
|
16
|
+
--_skf-heading-size: var(--skf-font-size-700);
|
17
|
+
--_skf-heading-weight: var(--skf-font-weight-regular);
|
18
|
+
}
|
19
|
+
|
20
|
+
:host(:is([as='h2'], [as='h3'], [as='h4'])) & {
|
21
|
+
--_skf-heading-weight: var(--skf-font-weight-bold);
|
22
|
+
}
|
23
|
+
|
24
|
+
:host([as='h2']) & {
|
25
|
+
--_skf-heading-size: var(--skf-font-size-300);
|
26
|
+
}
|
27
|
+
|
28
|
+
:host([as='h3']) & {
|
29
|
+
--_skf-heading-size: var(--skf-font-size-200);
|
30
|
+
}
|
31
|
+
|
32
|
+
:host([as='h4']) & {
|
33
|
+
--_skf-heading-size: var(--skf-font-size-200);
|
34
|
+
}
|
35
|
+
|
36
|
+
/** Styled As */
|
37
|
+
:host([styled-as='h1']) & {
|
38
|
+
--_skf-heading-size: var(--skf-font-size-700);
|
39
|
+
--_skf-heading-weight: var(--skf-font-weight-regular);
|
40
|
+
}
|
41
|
+
|
42
|
+
:host(:is([styled-as='h2'], [styled-as='h3'], [styled-as='h4'])) & {
|
43
|
+
--_skf-heading-weight: var(--skf-font-weight-bold);
|
44
|
+
}
|
45
|
+
|
46
|
+
:host([styled-as='h2']) & {
|
47
|
+
--_skf-heading-size: var(--skf-font-size-300);
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([styled-as='h3']) & {
|
51
|
+
--_skf-heading-size: var(--skf-font-size-200);
|
52
|
+
}
|
53
|
+
|
54
|
+
:host([styled-as='h4']) & {
|
55
|
+
--_skf-heading-size: var(--skf-font-size-200);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
`;
|
60
|
+
export {
|
61
|
+
t as default
|
62
|
+
};
|
@@ -10,19 +10,25 @@ import { type CSSResultGroup } from 'lit';
|
|
10
10
|
*/
|
11
11
|
export declare class SkfIcon extends SkfElement {
|
12
12
|
static styles: CSSResultGroup;
|
13
|
-
/** @internal */
|
14
13
|
private _rootId;
|
15
|
-
/**
|
16
|
-
|
17
|
-
|
14
|
+
/**
|
15
|
+
* Sets the color of the icon
|
16
|
+
* @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" }
|
17
|
+
*/
|
18
|
+
color: IconColor | SeverityFgColor;
|
19
|
+
/** If defined, adds an alternate description to use for assistive devices */
|
18
20
|
label?: string;
|
19
|
-
/**
|
21
|
+
/**
|
22
|
+
* Name of the icon to display
|
23
|
+
* @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
|
24
|
+
*/
|
20
25
|
name: Icon;
|
21
|
-
/**
|
26
|
+
/**
|
27
|
+
* Size of the icon
|
28
|
+
* @type { "xs" | "sm" | "md" | "lg" }
|
29
|
+
*/
|
22
30
|
size?: IconSize;
|
23
|
-
/** @internal */
|
24
31
|
private renderDecorativeIcon;
|
25
|
-
/** @internal */
|
26
32
|
private renderInformativeIcon;
|
27
33
|
render(): import("lit").TemplateResult<1>;
|
28
34
|
}
|
@@ -5,15 +5,15 @@ import { html as l } from "lit";
|
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
6
|
import { ifDefined as c } from "lit/directives/if-defined.js";
|
7
7
|
import { when as v } from "lit/directives/when.js";
|
8
|
-
import
|
9
|
-
var
|
8
|
+
import u from "./icon.styles.js";
|
9
|
+
var y = Object.defineProperty, o = (m, n, p, I) => {
|
10
10
|
for (var r = void 0, i = m.length - 1, a; i >= 0; i--)
|
11
11
|
(a = m[i]) && (r = a(n, p, r) || r);
|
12
|
-
return r &&
|
12
|
+
return r && y(n, p, r), r;
|
13
13
|
};
|
14
14
|
const s = class s extends f {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this._rootId = "
|
16
|
+
super(...arguments), this._rootId = "root", this.color = "primary", this.size = "md", this.renderDecorativeIcon = () => l`
|
17
17
|
<div aria-hidden="true" id=${this._rootId}>${d[this.name]}</div>
|
18
18
|
`, this.renderInformativeIcon = () => l`
|
19
19
|
<div aria-label=${c(this.label)} id=${this._rootId} role="img">${d[this.name]}</div>
|
@@ -23,7 +23,7 @@ const s = class s extends f {
|
|
23
23
|
return v(!!this.label, this.renderInformativeIcon, this.renderDecorativeIcon);
|
24
24
|
}
|
25
25
|
};
|
26
|
-
s.styles = [h,
|
26
|
+
s.styles = [h, u];
|
27
27
|
let e = s;
|
28
28
|
o([
|
29
29
|
t({ reflect: !0 })
|
@@ -32,7 +32,7 @@ o([
|
|
32
32
|
t()
|
33
33
|
], e.prototype, "label");
|
34
34
|
o([
|
35
|
-
t(
|
35
|
+
t()
|
36
36
|
], e.prototype, "name");
|
37
37
|
o([
|
38
38
|
t({ reflect: !0 })
|
@@ -14,7 +14,7 @@ import { type CSSResultGroup } from 'lit';
|
|
14
14
|
* @event change - Fires when the value of the input changes
|
15
15
|
* @event invalid - Fires when the input is invalid
|
16
16
|
*
|
17
|
-
* @slot
|
17
|
+
* @slot - The Inputs label. Alternatively, you can use the `label` attribute.
|
18
18
|
*
|
19
19
|
* @tagname skf-input
|
20
20
|
*
|
@@ -24,57 +24,63 @@ import { type CSSResultGroup } from 'lit';
|
|
24
24
|
export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
25
25
|
static styles: CSSResultGroup;
|
26
26
|
private customError;
|
27
|
-
/**
|
27
|
+
/** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
|
28
28
|
buttonAriaLabelClear: string;
|
29
|
-
/**
|
29
|
+
/** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
|
30
30
|
buttonAriaLabelHide: string;
|
31
|
-
/**
|
31
|
+
/** Custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
|
32
32
|
buttonAriaLabelShow: string;
|
33
|
-
/** If
|
33
|
+
/** If defined, forces component to invalid state until removed. Its value is used as hint text. */
|
34
34
|
set customInvalid(value: string | undefined);
|
35
35
|
get customInvalid(): string | undefined;
|
36
|
-
/** If
|
37
|
-
debug
|
36
|
+
/** If true, outputs helping hints in console */
|
37
|
+
debug?: boolean;
|
38
38
|
/** If true, hides the label visually */
|
39
|
-
hideLabel
|
40
|
-
/** If
|
39
|
+
hideLabel?: boolean;
|
40
|
+
/** If defined, displays informational text below the field */
|
41
41
|
hint?: string;
|
42
|
-
/**
|
42
|
+
/** Tells what keyboard to use if applicable */
|
43
43
|
inputmode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
44
|
-
/**
|
44
|
+
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
45
45
|
label?: string;
|
46
|
-
/** If
|
46
|
+
/** If defined, displays a prefix/adornment before the input-element */
|
47
47
|
leading?: string;
|
48
|
-
/** If
|
48
|
+
/** If defined, sets the maximum value to accept for this input */
|
49
49
|
max?: number | string;
|
50
|
-
/** If
|
50
|
+
/** If defined, sets the maximum character length to accept for this input */
|
51
51
|
maxLength?: number;
|
52
|
-
/** If
|
52
|
+
/** If defined, sets the minimum value to accept for this input */
|
53
53
|
min?: number | string;
|
54
|
-
/** If
|
54
|
+
/** If defined, sets the minimum character length to accept for this input */
|
55
55
|
minLength?: number;
|
56
|
-
/** If
|
56
|
+
/** If defined, adds name to the input-element */
|
57
57
|
name?: string;
|
58
|
-
/** If
|
58
|
+
/** If defined, adds name to the input-element */
|
59
59
|
pattern?: string;
|
60
|
-
/** If
|
60
|
+
/** If defined, displays placeholder text */
|
61
61
|
placeholder?: string;
|
62
62
|
/** If true, makes the element not mutable, meaning the user can not edit the control */
|
63
63
|
readonly?: boolean;
|
64
|
-
/** If
|
64
|
+
/** If defined, renders an alternative A11y text for the asterisk */
|
65
65
|
requiredLabel?: string;
|
66
|
-
/**
|
66
|
+
/**
|
67
|
+
* If defined, displays provided severity state
|
68
|
+
* @type { "alert" | "success" | "info" | "warning" }
|
69
|
+
*/
|
67
70
|
severity?: FormFieldBaseProps['severity'];
|
68
|
-
/** If
|
71
|
+
/** If true, displays valid state after interaction */
|
69
72
|
showValid?: boolean;
|
70
|
-
/**
|
71
|
-
size
|
72
|
-
/** If
|
73
|
+
/** Size of the input */
|
74
|
+
size: 'sm' | 'md';
|
75
|
+
/** If defined, displays a suffix/adornment after the input-element */
|
73
76
|
trailing?: string;
|
74
|
-
/**
|
77
|
+
/**
|
78
|
+
* Type of input control
|
79
|
+
* @type { 'button' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' }
|
80
|
+
*/
|
75
81
|
type?: Exclude<FormFieldBaseProps['type'], 'checkbox' | 'radio'>;
|
76
|
-
/**
|
77
|
-
validateOn
|
82
|
+
/** Sets validation start */
|
83
|
+
validateOn: 'input' | 'change' | 'submit';
|
78
84
|
/** The current value of the input field */
|
79
85
|
value: string;
|
80
86
|
/** @internal */
|
@@ -88,7 +94,6 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
88
94
|
private _numberController;
|
89
95
|
/** @internal */
|
90
96
|
private _passwordController;
|
91
|
-
constructor();
|
92
97
|
protected firstUpdated(): void;
|
93
98
|
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
94
99
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|