@skf-design-system/ui-components 1.0.0-beta.5 → 1.0.0-beta.7
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-item.d.ts +1 -1
- package/dist/components/accordion/accordion.component.d.ts +4 -4
- package/dist/components/accordion/accordion.component.js +18 -17
- package/dist/components/accordion/accordion.styles.d.ts +1 -2
- package/dist/components/accordion/accordion.styles.js +5 -4
- package/dist/components/alert/alert.component.d.ts +3 -3
- package/dist/components/alert/alert.component.js +44 -33
- package/dist/components/alert/alert.styles.d.ts +1 -2
- package/dist/components/alert/alert.styles.js +29 -24
- package/dist/components/button/button.component.d.ts +26 -4
- package/dist/components/button/button.component.js +78 -54
- package/dist/components/button/button.styles.js +1 -0
- package/dist/components/card/card.component.d.ts +4 -4
- package/dist/components/card/card.component.js +35 -24
- package/dist/components/card/card.styles.d.ts +1 -2
- package/dist/components/card/card.styles.js +14 -12
- package/dist/components/checkbox/checkbox.component.d.ts +11 -12
- package/dist/components/checkbox/checkbox.component.js +95 -89
- package/dist/components/collapse/collapse.component.d.ts +8 -8
- package/dist/components/collapse/collapse.component.js +42 -34
- package/dist/components/collapse/collapse.styles.js +15 -14
- package/dist/components/dialog/dialog.component.d.ts +75 -0
- package/dist/components/dialog/dialog.component.js +189 -0
- package/dist/components/dialog/dialog.d.ts +8 -0
- package/dist/components/dialog/dialog.js +6 -0
- package/dist/components/dialog/dialog.styles.js +91 -0
- package/dist/components/divider/divider.component.d.ts +3 -3
- package/dist/components/divider/divider.component.js +39 -27
- package/dist/components/divider/divider.styles.d.ts +1 -2
- package/dist/components/divider/divider.styles.js +26 -26
- package/dist/components/heading/heading.component.d.ts +2 -2
- package/dist/components/icon/icon.component.d.ts +1 -1
- package/dist/components/input/input.component.d.ts +12 -11
- package/dist/components/input/input.component.js +88 -89
- package/dist/components/link/link.component.d.ts +6 -6
- package/dist/components/link/link.component.js +20 -14
- package/dist/components/link/link.styles.js +36 -40
- package/dist/components/loader/loader.component.d.ts +2 -2
- package/dist/components/loader/loader.component.js +32 -25
- package/dist/components/loader/loader.styles.js +11 -10
- package/dist/components/logo/logo.component.d.ts +3 -3
- package/dist/components/logo/logo.component.js +25 -14
- package/dist/components/logo/logo.styles.d.ts +1 -2
- package/dist/components/logo/logo.styles.js +11 -9
- package/dist/components/progress/progress.component.d.ts +22 -0
- package/dist/components/progress/progress.component.js +49 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +6 -0
- package/dist/components/progress/progress.styles.js +48 -0
- package/dist/components/radio/radio.component.d.ts +7 -9
- package/dist/components/radio/radio.component.js +93 -77
- package/dist/components/select/select.component.d.ts +2 -2
- package/dist/components/select/select.component.js +16 -13
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select-option/select-option.component.d.ts +1 -1
- package/dist/components/select-option/select-option.controllers.d.ts +1 -1
- package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
- package/dist/components/switch/switch.component.d.ts +2 -2
- package/dist/components/switch/switch.component.js +17 -7
- package/dist/components/switch/switch.styles.js +16 -13
- package/dist/components/tab/tab.component.d.ts +29 -0
- package/dist/components/tab/tab.component.js +57 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tab.js +6 -0
- package/dist/components/tab/tab.styles.d.ts +1 -0
- package/dist/components/tab/tab.styles.js +123 -0
- package/dist/components/tab-group/tab-group.component.d.ts +43 -0
- package/dist/components/tab-group/tab-group.component.js +98 -0
- package/dist/components/tab-group/tab-group.d.ts +8 -0
- package/dist/components/tab-group/tab-group.js +6 -0
- package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
- package/dist/components/tab-group/tab-group.styles.js +75 -0
- package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
- package/dist/components/tab-panel/tab-panel.component.js +36 -0
- package/dist/components/tab-panel/tab-panel.d.ts +8 -0
- package/dist/components/tab-panel/tab-panel.js +6 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
- package/dist/components/tab-panel/tab-panel.styles.js +13 -0
- package/dist/components/tag/tag.component.d.ts +2 -2
- package/dist/components/tag/tag.component.js +61 -45
- package/dist/components/tag/tag.styles.js +30 -28
- package/dist/components/textarea/textarea.component.d.ts +4 -4
- package/dist/components/textarea/textarea.component.js +5 -5
- package/dist/components/toast/toast.component.d.ts +1 -1
- package/dist/components/toast/toast.component.js +13 -13
- package/dist/components/toast/toast.singleton.d.ts +3 -3
- package/dist/components/toast/toast.styles.d.ts +1 -0
- package/dist/components/toast-item/toast-item.component.d.ts +1 -1
- package/dist/components/toast-item/toast-item.component.js +1 -1
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
- package/dist/components/toast-wrapper/toast-wrapper.component.js +1 -1
- package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
- package/dist/custom-elements.json +1170 -511
- package/dist/index.d.ts +5 -0
- package/dist/index.js +59 -44
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -11
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/skf-element.js +26 -25
- package/dist/internal/helpers/hintSeverity.d.ts +1 -1
- package/dist/internal/helpers/watch.d.ts +27 -0
- package/dist/internal/helpers/watch.js +28 -0
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +7 -2
- package/dist/react/index.js +7 -2
- package/dist/react/skf-button/index.d.ts +7 -1
- package/dist/react/skf-button/index.js +5 -1
- package/dist/react/skf-dialog/index.d.ts +15 -0
- package/dist/react/skf-dialog/index.js +19 -0
- package/dist/react/skf-progress/index.d.ts +3 -0
- package/dist/react/skf-progress/index.js +13 -0
- package/dist/react/skf-tab/index.d.ts +12 -0
- package/dist/react/skf-tab/index.js +18 -0
- package/dist/react/skf-tab-group/index.d.ts +3 -0
- package/dist/react/skf-tab-group/index.js +13 -0
- package/dist/react/skf-tab-panel/index.d.ts +3 -0
- package/dist/react/skf-tab-panel/index.js +13 -0
- package/dist/styles/component.styles.js +15 -2
- package/dist/types/jsx/custom-element-jsx.d.ts +246 -101
- package/dist/types/vue/index.d.ts +215 -65
- package/dist/vscode.html-custom-data.json +276 -182
- package/dist/web-types.json +556 -248
- package/package.json +33 -32
- /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → dialog/dialog.styles.d.ts} +0 -0
- /package/dist/components/{toast/toast.style.d.ts → progress/progress.styles.d.ts} +0 -0
- /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
- /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
- /package/dist/components/toast-item/{toast-item.style.js → toast-item.styles.js} +0 -0
- /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
import { css as r } from "lit";
|
2
|
+
const a = r`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
}
|
8
|
+
|
9
|
+
:host([stretch]) {
|
10
|
+
block-size: 100%;
|
11
|
+
}
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Root
|
15
|
+
*/
|
16
|
+
.tab-group {
|
17
|
+
background-color: var(--skf-bg-color-neutral-1);
|
18
|
+
}
|
19
|
+
|
20
|
+
.tab-group--expanded {
|
21
|
+
border: var(
|
22
|
+
--_skf-tab-group-border,
|
23
|
+
var(--skf-border-width-sm) solid var(--skf-border-color-tertiary)
|
24
|
+
);
|
25
|
+
border-end-end-radius: var(--skf-border-radius-sm);
|
26
|
+
border-end-start-radius: var(--skf-border-radius-sm);
|
27
|
+
box-shadow: var(--skf-shadow-md);
|
28
|
+
|
29
|
+
::slotted(skf-tab) {
|
30
|
+
flex: 1;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
.tab-group--no-border {
|
35
|
+
--_skf-tab-group-border: none;
|
36
|
+
}
|
37
|
+
|
38
|
+
.tab-group--stretch {
|
39
|
+
block-size: inherit;
|
40
|
+
display: flex;
|
41
|
+
flex-direction: column;
|
42
|
+
}
|
43
|
+
|
44
|
+
/**
|
45
|
+
* Tabs
|
46
|
+
*/
|
47
|
+
.tab-group__tabs {
|
48
|
+
display: flex;
|
49
|
+
|
50
|
+
.tab-group--compressed & {
|
51
|
+
gap: var(--skf-spacing-100);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Body
|
57
|
+
*/
|
58
|
+
.tab-group__body {
|
59
|
+
padding-block: var(--_skf-tab-group-body-padding-block, var(--skf-spacing-100) 0);
|
60
|
+
|
61
|
+
.tab-group--stretch & {
|
62
|
+
overflow-y: auto;
|
63
|
+
}
|
64
|
+
|
65
|
+
.tab-group--expanded:not(.tab-group--no-padding) & {
|
66
|
+
--_skf-tab-group-body-padding-block: var(--skf-spacing-100);
|
67
|
+
|
68
|
+
padding-inline: var(--skf-spacing-100);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
`;
|
73
|
+
export {
|
74
|
+
a as styles
|
75
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-tab-panel>` is a component that displays a list of actions or options.
|
5
|
+
*
|
6
|
+
* @slot - The tab panel's content
|
7
|
+
*
|
8
|
+
* @tagname skf-tab-panel
|
9
|
+
*/
|
10
|
+
export declare class SkfTabPanel extends SkfElement {
|
11
|
+
static styles: CSSResultGroup;
|
12
|
+
/** The tab panel's name. */
|
13
|
+
name: string;
|
14
|
+
active: boolean;
|
15
|
+
constructor();
|
16
|
+
/** @internal */
|
17
|
+
handleActiveChanged(): void;
|
18
|
+
render(): import("lit").TemplateResult<1>;
|
19
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { SkfElement as c } from "../../internal/components/skf-element.js";
|
2
|
+
import { watch as h } from "../../internal/helpers/watch.js";
|
3
|
+
import l from "../../styles/component.styles.js";
|
4
|
+
import { html as v } from "lit";
|
5
|
+
import { property as f, state as d } from "lit/decorators.js";
|
6
|
+
import { styles as y } from "./tab-panel.styles.js";
|
7
|
+
var u = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (n, r, s, o) => {
|
8
|
+
for (var t = o > 1 ? void 0 : o ? _(r, s) : r, i = n.length - 1, p; i >= 0; i--)
|
9
|
+
(p = n[i]) && (t = (o ? p(r, s, t) : p(t)) || t);
|
10
|
+
return o && t && u(r, s, t), t;
|
11
|
+
};
|
12
|
+
const m = class m extends c {
|
13
|
+
constructor() {
|
14
|
+
super(), this.name = "", this.active = !1, this.role = "tabpanel";
|
15
|
+
}
|
16
|
+
handleActiveChanged() {
|
17
|
+
this.ariaHidden = this.active ? "false" : "true", this.tabIndex = this.active ? 0 : -1;
|
18
|
+
}
|
19
|
+
render() {
|
20
|
+
return v`<slot></slot>`;
|
21
|
+
}
|
22
|
+
};
|
23
|
+
m.styles = [l, y];
|
24
|
+
let e = m;
|
25
|
+
a([
|
26
|
+
f()
|
27
|
+
], e.prototype, "name", 2);
|
28
|
+
a([
|
29
|
+
d()
|
30
|
+
], e.prototype, "active", 2);
|
31
|
+
a([
|
32
|
+
h("active")
|
33
|
+
], e.prototype, "handleActiveChanged", 1);
|
34
|
+
export {
|
35
|
+
e as SkfTabPanel
|
36
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import '
|
2
|
-
import { SkfElement } from '
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
3
3
|
import type { Icon, SeverityBgColor } from '@skf-design-system/ui-assets';
|
4
4
|
import { type CSSResultGroup } from 'lit';
|
5
5
|
/**
|
@@ -1,36 +1,37 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
2
|
import { SkfElement as u } from "../../internal/components/skf-element.js";
|
3
|
-
import
|
4
|
-
import { html as a, nothing as
|
5
|
-
import { property as
|
6
|
-
import {
|
3
|
+
import f from "../../styles/component.styles.js";
|
4
|
+
import { html as a, nothing as p } from "lit";
|
5
|
+
import { property as l, query as d } from "lit/decorators.js";
|
6
|
+
import { classMap as v } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
7
8
|
import { styles as k } from "./tag.styles.js";
|
8
|
-
var
|
9
|
-
for (var
|
10
|
-
(c =
|
11
|
-
return
|
9
|
+
var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (m, t, s, r) => {
|
10
|
+
for (var e = r > 1 ? void 0 : r ? y(t, s) : t, n = m.length - 1, c; n >= 0; n--)
|
11
|
+
(c = m[n]) && (e = (r ? c(t, s, e) : c(e)) || e);
|
12
|
+
return r && e && b(t, s, e), e;
|
12
13
|
};
|
13
14
|
const h = class h extends u {
|
14
15
|
constructor() {
|
15
|
-
super(...arguments), this.size = "md", this._handleKeyDown = (
|
16
|
-
(
|
17
|
-
}, this._handleRemove = (
|
18
|
-
this._onRemove && this._onRemove(
|
19
|
-
}, this._handleClick = (
|
20
|
-
var
|
21
|
-
|
22
|
-
const
|
23
|
-
console.log("$clickTarget",
|
16
|
+
super(...arguments), this.size = "md", this._handleKeyDown = (t) => {
|
17
|
+
(t.key === "Enter" || t.key === " ") && this.$removeButton.click();
|
18
|
+
}, this._handleRemove = (t) => {
|
19
|
+
this._onRemove && this._onRemove(t);
|
20
|
+
}, this._handleClick = (t) => {
|
21
|
+
var e;
|
22
|
+
t.stopPropagation();
|
23
|
+
const s = t.composedPath()[0];
|
24
|
+
console.log("$clickTarget", s), s.localName === "button" ? this.remove() : (e = this.onClick) == null || e.call(this, t);
|
24
25
|
};
|
25
26
|
}
|
26
|
-
set onClick(
|
27
|
-
|
27
|
+
set onClick(t) {
|
28
|
+
t && (this._onClick = t);
|
28
29
|
}
|
29
30
|
get onClick() {
|
30
31
|
return this._onClick;
|
31
32
|
}
|
32
|
-
set onRemove(
|
33
|
-
|
33
|
+
set onRemove(t) {
|
34
|
+
t && (this._onRemove = t);
|
34
35
|
}
|
35
36
|
get onRemove() {
|
36
37
|
return this._onRemove;
|
@@ -41,47 +42,62 @@ const h = class h extends u {
|
|
41
42
|
disconnectedCallback() {
|
42
43
|
super.disconnectedCallback(), this.removeEventListener("click", this._handleClick);
|
43
44
|
}
|
44
|
-
attributeChangedCallback(
|
45
|
-
super.attributeChangedCallback(
|
45
|
+
attributeChangedCallback(t, s, r) {
|
46
|
+
super.attributeChangedCallback(t, s, r), t === "removable" && r !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
|
46
47
|
}
|
47
48
|
render() {
|
48
49
|
return a`
|
49
|
-
<div
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
50
|
+
<div
|
51
|
+
class=${v({
|
52
|
+
tag: !0,
|
53
|
+
"tag--color-alert": this.color === "alert",
|
54
|
+
"tag--color-error": this.color === "error",
|
55
|
+
"tag--color-info": this.color === "info",
|
56
|
+
"tag--color-success": this.color === "success",
|
57
|
+
"tag--color-warning": this.color === "warning",
|
58
|
+
"tag--small": this.size === "sm"
|
59
|
+
})}
|
60
|
+
>
|
61
|
+
${this.icon ? a`
|
62
|
+
<skf-icon
|
63
|
+
class="tag__icon"
|
64
|
+
color=${_(this.color)}
|
65
|
+
name=${this.icon}
|
66
|
+
size="sm"
|
67
|
+
></skf-icon>
|
68
|
+
` : p}
|
69
|
+
<slot class="tag__slot"></slot>
|
54
70
|
${this.removable ? a`
|
55
|
-
<button @click=${this._handleRemove} type="button">
|
71
|
+
<button @click=${this._handleRemove} class="tag__btn" type="button">
|
56
72
|
<skf-icon name="close" size="xs"></skf-icon>
|
57
73
|
</button>
|
58
|
-
` :
|
74
|
+
` : p}
|
59
75
|
</div>
|
60
76
|
`;
|
61
77
|
}
|
62
78
|
};
|
63
|
-
h.styles = [
|
79
|
+
h.styles = [f, k];
|
64
80
|
let o = h;
|
65
|
-
|
66
|
-
|
81
|
+
i([
|
82
|
+
l({ reflect: !0 })
|
67
83
|
], o.prototype, "size", 2);
|
68
|
-
|
69
|
-
|
84
|
+
i([
|
85
|
+
l()
|
70
86
|
], o.prototype, "icon", 2);
|
71
|
-
|
72
|
-
|
87
|
+
i([
|
88
|
+
l({ reflect: !0 })
|
73
89
|
], o.prototype, "color", 2);
|
74
|
-
|
75
|
-
|
90
|
+
i([
|
91
|
+
l({ attribute: !1 })
|
76
92
|
], o.prototype, "onClick", 1);
|
77
|
-
|
78
|
-
|
93
|
+
i([
|
94
|
+
l({ attribute: !1 })
|
79
95
|
], o.prototype, "onRemove", 1);
|
80
|
-
|
81
|
-
|
96
|
+
i([
|
97
|
+
l({ type: Boolean, reflect: !0 })
|
82
98
|
], o.prototype, "removable", 2);
|
83
|
-
|
84
|
-
|
99
|
+
i([
|
100
|
+
d("button")
|
85
101
|
], o.prototype, "$removeButton", 2);
|
86
102
|
export {
|
87
103
|
o as SkfTag
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
2
|
const s = r`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
3
4
|
@layer components {
|
4
|
-
|
5
|
+
.tag {
|
5
6
|
align-items: center;
|
6
7
|
background-color: var(--_skf-tag-bg-color, var(--skf-bg-color-neutral-1));
|
7
8
|
block-size: var(--_skf-tag-height, var(--skf-size-32));
|
@@ -14,46 +15,47 @@ const s = r`
|
|
14
15
|
gap: var(--skf-spacing-25);
|
15
16
|
max-inline-size: 48ch;
|
16
17
|
padding-inline: var(--skf-spacing-50);
|
18
|
+
}
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
.tag--color-alert {
|
21
|
+
--_skf-tag-bg-color: var(--skf-severity-bg-color-alert);
|
22
|
+
--_skf-tag-border-color: var(--skf-severity-fg-color-alert);
|
23
|
+
}
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
.tag--color-error {
|
26
|
+
--_skf-tag-bg-color: var(--skf-severity-bg-color-error);
|
27
|
+
--_skf-tag-border-color: var(--skf-severity-fg-color-error);
|
28
|
+
}
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
.tag--color-info {
|
31
|
+
--_skf-tag-bg-color: var(--skf-severity-bg-color-info);
|
32
|
+
--_skf-tag-border-color: var(--skf-severity-fg-color-info);
|
33
|
+
}
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
35
|
+
.tag--color-success {
|
36
|
+
--_skf-tag-bg-color: var(--skf-severity-bg-color-success);
|
37
|
+
--_skf-tag-border-color: var(--skf-severity-fg-color-success);
|
38
|
+
}
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
.tag--color-warning {
|
41
|
+
--_skf-tag-bg-color: var(--skf-severity-bg-color-warning);
|
42
|
+
--_skf-tag-border-color: var(--skf-severity-fg-color-warning);
|
43
|
+
}
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
45
|
+
.tag--small {
|
46
|
+
--_skf-tag-border-radius: 0.25rem; /* token needed */
|
47
|
+
--_skf-tag-font-size: var(--skf-font-size-25);
|
48
|
+
--_skf-tag-height: var(--skf-size-24);
|
48
49
|
}
|
49
50
|
|
50
|
-
|
51
|
+
.tag__slot {
|
52
|
+
display: block;
|
51
53
|
overflow: hidden;
|
52
54
|
text-overflow: ellipsis;
|
53
55
|
white-space: nowrap;
|
54
56
|
}
|
55
57
|
|
56
|
-
|
58
|
+
.tag__btn {
|
57
59
|
display: flex;
|
58
60
|
|
59
61
|
&:focus-visible {
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import '
|
2
|
-
import { FormBase } from '
|
3
|
-
import '
|
4
|
-
import type { FormFieldBaseProps } from '
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import '../../internal/components/hint/hint.js';
|
4
|
+
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
5
|
import { type CSSResultGroup } from 'lit';
|
6
6
|
interface SkfTextAreaProps extends Omit<FormFieldBaseProps, 'type'> {
|
7
7
|
cols?: number;
|
@@ -4,7 +4,7 @@ import "../../internal/components/hint/hint.js";
|
|
4
4
|
import { Asterisk as c } from "../../internal/templates/asterisk.js";
|
5
5
|
import y from "../../styles/component.styles.js";
|
6
6
|
import { html as p, nothing as v } from "lit";
|
7
|
-
import { property as r, state as
|
7
|
+
import { property as r, state as b, query as f } from "lit/decorators.js";
|
8
8
|
import { ifDefined as n } from "lit/directives/if-defined.js";
|
9
9
|
import g from "./textarea.styles.js";
|
10
10
|
var $ = Object.defineProperty, E = Object.getOwnPropertyDescriptor, e = (h, t, s, a) => {
|
@@ -46,7 +46,7 @@ const u = class u extends m {
|
|
46
46
|
attributeChangedCallback(t, s, a) {
|
47
47
|
if (super.attributeChangedCallback(t, s, a), t === "value" && this._internals.setFormValue(a), t === "custom-invalid")
|
48
48
|
if (typeof a == "string") {
|
49
|
-
const o =
|
49
|
+
const o = this.withFallback(a);
|
50
50
|
this.pristine = !1, this._internals.setValidity({ customError: !0 }, o), this.invalid = !0, this.hint = o, this.checkValidity();
|
51
51
|
} else
|
52
52
|
this._internals.setValidity({}), this.validateInput();
|
@@ -69,7 +69,7 @@ const u = class u extends m {
|
|
69
69
|
const o = this.hasAttribute(l) ? this.getAttribute(l) : this.$input.validationMessage;
|
70
70
|
this._internals.setValidity(
|
71
71
|
{ [this.validationError]: !0, customError: this._internals.validity.customError },
|
72
|
-
o
|
72
|
+
this.withFallback(o)
|
73
73
|
), this.invalid && this.customErrorDisplay && this.checkValidity();
|
74
74
|
}
|
75
75
|
}
|
@@ -173,10 +173,10 @@ e([
|
|
173
173
|
r()
|
174
174
|
], i.prototype, "value", 2);
|
175
175
|
e([
|
176
|
-
|
176
|
+
b()
|
177
177
|
], i.prototype, "invalid", 2);
|
178
178
|
e([
|
179
|
-
|
179
|
+
f("textarea")
|
180
180
|
], i.prototype, "$input", 2);
|
181
181
|
function _(h, t) {
|
182
182
|
return t ? "error" : h;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SkfElement } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
4
|
* SkfToast is the only component a user (developer) interacts with to create a toast notification. Once rendered it will invoke a singleton instance to manage the toast notifications.
|
@@ -1,21 +1,21 @@
|
|
1
|
-
import { Singleton as
|
2
|
-
import { SkfElement as
|
3
|
-
import { html as
|
1
|
+
import { Singleton as h } from "./toast.singleton.js";
|
2
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
3
|
+
import { html as f } from "lit";
|
4
4
|
import { property as s, queryAssignedNodes as y } from "lit/decorators.js";
|
5
|
-
import { styles as a } from "./toast.
|
6
|
-
var u = Object.defineProperty, o = (l,
|
7
|
-
for (var e = void 0,
|
8
|
-
(
|
9
|
-
return e && u(
|
5
|
+
import { styles as a } from "./toast.styles.js";
|
6
|
+
var u = Object.defineProperty, o = (l, i, n, b) => {
|
7
|
+
for (var e = void 0, r = l.length - 1, m; r >= 0; r--)
|
8
|
+
(m = l[r]) && (e = m(i, n, e) || e);
|
9
|
+
return e && u(i, n, e), e;
|
10
10
|
};
|
11
|
-
const p = class p extends
|
11
|
+
const p = class p extends d {
|
12
12
|
constructor() {
|
13
13
|
super(), this.closeable = !1, this.debug = !1, this.severity = "info", this.timer = 5, this._singleton = void 0;
|
14
14
|
}
|
15
15
|
firstUpdated() {
|
16
|
-
this._singleton = new
|
17
|
-
text: this._slottedText.map((
|
18
|
-
timer: this.timer,
|
16
|
+
this._singleton = new h(this.getRootNode()), this._singleton.addData({
|
17
|
+
text: this._slottedText.map((i) => i.textContent).join(),
|
18
|
+
timer: this.timer = this.timer && this.timer < 5 ? 5 : this.timer,
|
19
19
|
closeable: this.closeable,
|
20
20
|
originEl: this,
|
21
21
|
severity: this.severity,
|
@@ -24,7 +24,7 @@ const p = class p extends m {
|
|
24
24
|
});
|
25
25
|
}
|
26
26
|
render() {
|
27
|
-
return
|
27
|
+
return f`<slot></slot>`;
|
28
28
|
}
|
29
29
|
};
|
30
30
|
p.styles = [a];
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import '
|
2
|
-
import '
|
3
|
-
import type { SkfToast } from '
|
1
|
+
import '../toast-item/toast-item.js';
|
2
|
+
import '../toast-wrapper/toast-wrapper.js';
|
3
|
+
import type { SkfToast } from '../toast/toast.component.js';
|
4
4
|
interface ToastData {
|
5
5
|
text: string;
|
6
6
|
timer: number;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { SkfAlert as l } from "../alert/alert.component.js";
|
2
2
|
import { MOTION_DURATIONS as h } from "@skf-design-system/ui-assets";
|
3
3
|
import { property as u } from "lit/decorators.js";
|
4
|
-
import p from "./toast-item.
|
4
|
+
import p from "./toast-item.styles.js";
|
5
5
|
var d = Object.defineProperty, f = (a, t, e, m) => {
|
6
6
|
for (var i = void 0, r = a.length - 1, o; r >= 0; r--)
|
7
7
|
(o = a[r]) && (i = o(t, e, i) || i);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { SkfAlert } from '
|
2
|
-
import { SkfElement } from '
|
1
|
+
import type { SkfAlert } from '../alert/alert.component.js';
|
2
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
5
5
|
* The `<skf-toast-wrapper>` is a component without UI that positions where the toast shows up on the screen. The toast-wrapper is used internally by the toast component.
|
@@ -2,7 +2,7 @@ import { SkfElement as h } from "../../internal/components/skf-element.js";
|
|
2
2
|
import d from "../../styles/component.styles.js";
|
3
3
|
import { html as m } from "lit";
|
4
4
|
import { property as p, queryAssignedElements as a } from "lit/decorators.js";
|
5
|
-
import { styles as u } from "./toast-wrapper.
|
5
|
+
import { styles as u } from "./toast-wrapper.styles.js";
|
6
6
|
var y = Object.defineProperty, r = (l, i, n, g) => {
|
7
7
|
for (var t = void 0, o = l.length - 1, f; o >= 0; o--)
|
8
8
|
(f = l[o]) && (t = f(i, n, t) || t);
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|