@skf-design-system/ui-components 1.0.2-beta.5 → 1.0.2-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/README.md +18 -0
- package/dist/components/accordion/accordion.component.d.ts +1 -1
- package/dist/components/accordion/accordion.component.js +2 -2
- package/dist/components/alert/alert.component.d.ts +3 -2
- package/dist/components/alert/alert.component.js +39 -33
- package/dist/components/button/button.styles.js +3 -3
- package/dist/components/checkbox/checkbox.component.d.ts +4 -2
- package/dist/components/checkbox/checkbox.component.js +73 -65
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/datepicker/datepicker-calendar.component.d.ts +4 -0
- package/dist/components/datepicker/datepicker-calendar.component.js +134 -127
- package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
- package/dist/components/datepicker/datepicker-popup.component.js +100 -88
- package/dist/components/datepicker/datepicker.component.d.ts +4 -2
- package/dist/components/datepicker/datepicker.component.js +151 -140
- package/dist/components/dialog/dialog.component.d.ts +3 -2
- package/dist/components/dialog/dialog.component.js +39 -37
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +9 -9
- package/dist/components/drawer/drawer.component.d.ts +11 -4
- package/dist/components/drawer/drawer.component.js +77 -55
- package/dist/components/drawer/drawer.styles.js +47 -40
- package/dist/components/header/header.component.d.ts +4 -2
- package/dist/components/header/header.component.js +66 -57
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/icon/icon.component.js +7 -7
- package/dist/components/icon/icon.styles.js +2 -2
- package/dist/components/input/input.component.d.ts +4 -8
- package/dist/components/input/input.component.js +147 -147
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +12 -12
- package/dist/components/link/link.component.d.ts +15 -18
- package/dist/components/link/link.component.js +105 -107
- package/dist/components/link/link.styles.js +53 -45
- package/dist/components/loader/loader.component.d.ts +5 -3
- package/dist/components/loader/loader.component.js +39 -28
- package/dist/components/loader/loader.styles.js +6 -10
- package/dist/components/menu/menu-item.component.d.ts +1 -1
- package/dist/components/menu/menu-item.component.js +8 -8
- package/dist/components/menu/menu-item.styles.js +13 -9
- package/dist/components/menu/menu.component.d.ts +5 -2
- package/dist/components/menu/menu.component.js +8 -8
- package/dist/components/nav/nav-item.component.d.ts +4 -0
- package/dist/components/nav/nav-item.component.js +44 -25
- package/dist/components/nav/nav-item.styles.js +29 -25
- package/dist/components/nav/nav.component.d.ts +9 -0
- package/dist/components/nav/nav.component.js +47 -21
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +10 -3
- package/dist/components/popover/popover.component.js +30 -22
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.styles.js +4 -4
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +91 -83
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- package/dist/components/select/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +37 -18
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +7 -2
- package/dist/components/select/select-option.component.js +70 -53
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +18 -10
- package/dist/components/select/select.component.js +175 -132
- package/dist/components/select/select.controllers.js +2 -1
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +26 -23
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -56
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tabs/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +19 -16
- package/dist/components/tabs/tab.component.d.ts +1 -1
- package/dist/components/tabs/tab.component.js +17 -14
- package/dist/components/tabs/tab.styles.js +2 -2
- package/dist/components/tag/tag.component.d.ts +3 -0
- package/dist/components/tag/tag.component.js +50 -41
- package/dist/components/textarea/textarea.component.d.ts +4 -2
- package/dist/components/textarea/textarea.component.js +127 -118
- package/dist/components/toast/toast-item.styles.js +13 -10
- package/dist/components/toast/toast.component.js +9 -9
- package/dist/components/toast/toast.singleton.d.ts +1 -1
- package/dist/components/toast/toast.singleton.js +18 -18
- package/dist/components/tooltip/tooltip.component.d.ts +9 -2
- package/dist/components/tooltip/tooltip.component.js +13 -7
- package/dist/custom-elements.json +1305 -946
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -20
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
- package/dist/internal/base-classes/popover/popover.base.js +28 -29
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/hint/hint.component.d.ts +4 -0
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.js +29 -25
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/helpers/uuid.d.ts +8 -10
- package/dist/internal/helpers/uuid.js +4 -11
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +4 -4
- package/dist/internal/types.d.ts +4 -0
- package/dist/styles/global-alt.css +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +27 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.js +27 -0
- package/dist/translations/index.d.ts +4 -0
- package/dist/translations/pt.d.ts +3 -0
- package/dist/translations/pt.js +27 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.js +27 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +243 -128
- package/dist/types/vue/index.d.ts +136 -127
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +168 -177
- package/dist/web-types.json +411 -381
- package/package.json +34 -41
@@ -1,38 +1,57 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { componentStyles as c } from "../../styles/component.styles.js";
|
4
|
-
import { html as h } from "lit";
|
5
|
-
import { property as f } from "lit/decorators.js";
|
6
|
-
import { ifDefined as u } from "lit/directives/if-defined.js";
|
7
|
-
import { styles as a } from "./nav-item.styles.js";
|
8
|
-
var d = Object.defineProperty, p = (i, s, n, y) => {
|
9
|
-
for (var r = void 0, t = i.length - 1, l; t >= 0; t--)
|
10
|
-
(l = i[t]) && (r = l(s, n, r) || r);
|
11
|
-
return r && d(s, n, r), r;
|
1
|
+
var y = (t) => {
|
2
|
+
throw TypeError(t);
|
12
3
|
};
|
13
|
-
|
4
|
+
var u = (t, e, r) => e.has(t) || y("Cannot " + r);
|
5
|
+
var h = (t, e, r) => (u(t, e, "read from private field"), r ? r.call(t) : e.get(t)), f = (t, e, r) => e.has(t) ? y("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), m = (t, e, r, s) => (u(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
6
|
+
import "../link/link.js";
|
7
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
8
|
+
import { stateMap as g } from "../../internal/helpers/stateMap.js";
|
9
|
+
import { watch as C } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as b } from "../../styles/component.styles.js";
|
11
|
+
import { html as O } from "lit";
|
12
|
+
import { property as _, state as P } from "lit/decorators.js";
|
13
|
+
import { ifDefined as S } from "lit/directives/if-defined.js";
|
14
|
+
import { styles as w } from "./nav-item.styles.js";
|
15
|
+
var D = Object.defineProperty, j = Object.getOwnPropertyDescriptor, l = (t, e, r, s) => {
|
16
|
+
for (var o = s > 1 ? void 0 : s ? j(e, r) : e, a = t.length - 1, c; a >= 0; a--)
|
17
|
+
(c = t[a]) && (o = (s ? c(e, r, o) : c(o)) || o);
|
18
|
+
return s && o && D(e, r, o), o;
|
19
|
+
}, n, p;
|
20
|
+
const v = class v extends d {
|
14
21
|
constructor() {
|
15
|
-
super(...arguments)
|
22
|
+
super(...arguments);
|
23
|
+
f(this, n);
|
24
|
+
f(this, p);
|
25
|
+
m(this, n, this.attachInternals()), m(this, p, h(this, n).states), this.href = "", this.vertical = !1;
|
16
26
|
}
|
17
27
|
connectedCallback() {
|
18
|
-
super.connectedCallback(), this.role = "
|
28
|
+
super.connectedCallback(), this.role = "listitem";
|
29
|
+
}
|
30
|
+
_handleStateChange() {
|
31
|
+
g(h(this, p), "vertical").set(this.vertical);
|
19
32
|
}
|
20
33
|
render() {
|
21
|
-
return
|
22
|
-
<skf-link color="inverse" href=${this.href} icon=${
|
34
|
+
return O`
|
35
|
+
<skf-link color="inverse" href=${this.href} icon=${S(this.icon)}>
|
23
36
|
<slot></slot>
|
24
37
|
</skf-link>
|
25
38
|
`;
|
26
39
|
}
|
27
40
|
};
|
28
|
-
|
29
|
-
let
|
30
|
-
|
31
|
-
|
32
|
-
],
|
33
|
-
|
34
|
-
|
35
|
-
],
|
41
|
+
n = new WeakMap(), p = new WeakMap(), v.styles = [b, w];
|
42
|
+
let i = v;
|
43
|
+
l([
|
44
|
+
_({ type: String })
|
45
|
+
], i.prototype, "href", 2);
|
46
|
+
l([
|
47
|
+
_({ type: String })
|
48
|
+
], i.prototype, "icon", 2);
|
49
|
+
l([
|
50
|
+
P()
|
51
|
+
], i.prototype, "vertical", 2);
|
52
|
+
l([
|
53
|
+
C("vertical")
|
54
|
+
], i.prototype, "_handleStateChange", 1);
|
36
55
|
export {
|
37
|
-
|
56
|
+
i as SkfNavItem
|
38
57
|
};
|
@@ -1,36 +1,40 @@
|
|
1
1
|
import { css as t } from "lit";
|
2
2
|
const s = t`
|
3
3
|
@layer components {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
@layer base {
|
5
|
+
skf-link::part(root) {
|
6
|
+
block-size: var(--skf-header-height);
|
7
|
+
display: flex;
|
8
|
+
padding-inline: var(--skf-spacing-100);
|
9
|
+
position: relative;
|
10
|
+
}
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
skf-link::part(root)::after {
|
13
|
+
content: '';
|
14
|
+
position: absolute;
|
15
|
+
transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
|
16
|
+
var(--skf-motion-easing-ease-in);
|
17
|
+
}
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
skf-link::part(root):hover::after {
|
20
|
+
--_skf-nav-link-translate: 0;
|
21
|
+
}
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
:host(:not(:state(vertical))) skf-link::part(root)::after {
|
24
|
+
border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
25
|
+
inset-block-end: 0;
|
26
|
+
inset-inline: 0;
|
27
|
+
translate: 0 var(--_skf-nav-link-translate, 100%);
|
28
|
+
}
|
27
29
|
}
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
@layer mods {
|
32
|
+
:host(:state(vertical)) skf-link::part(root)::after {
|
33
|
+
border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
34
|
+
inset-block: 0;
|
35
|
+
inset-inline-start: 0;
|
36
|
+
translate: var(--_skf-nav-link-translate, -100%) 0;
|
37
|
+
}
|
34
38
|
}
|
35
39
|
}
|
36
40
|
`;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type Language } from '../../utilities/localize.js';
|
2
3
|
import { type CSSResultGroup } from 'lit';
|
3
4
|
/**
|
4
5
|
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
@@ -10,8 +11,16 @@ import { type CSSResultGroup } from 'lit';
|
|
10
11
|
* @tagname skf-nav
|
11
12
|
*/
|
12
13
|
export declare class SkfNav extends SkfElement {
|
14
|
+
#private;
|
13
15
|
static styles: CSSResultGroup;
|
16
|
+
/** Sets the internal language of the component */
|
17
|
+
lang: Language;
|
18
|
+
/** If true, the navigation will be displayed vertically */
|
14
19
|
vertical: boolean;
|
20
|
+
/** @internal */
|
21
|
+
private _items;
|
15
22
|
connectedCallback(): void;
|
23
|
+
/** @internal */
|
24
|
+
_handleStateChange(): void;
|
16
25
|
render(): import("lit").TemplateResult<1>;
|
17
26
|
}
|
@@ -1,34 +1,60 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { html as p } from "lit";
|
4
|
-
import { property as c } from "lit/decorators.js";
|
5
|
-
import { ifDefined as f } from "lit/directives/if-defined.js";
|
6
|
-
import { styles as u } from "./nav.styles.js";
|
7
|
-
var v = Object.defineProperty, d = (i, a, l, h) => {
|
8
|
-
for (var e = void 0, r = i.length - 1, n; r >= 0; r--)
|
9
|
-
(n = i[r]) && (e = n(a, l, e) || e);
|
10
|
-
return e && v(a, l, e), e;
|
1
|
+
var u = (t) => {
|
2
|
+
throw TypeError(t);
|
11
3
|
};
|
12
|
-
|
4
|
+
var g = (t, e, r) => e.has(t) || u("Cannot " + r);
|
5
|
+
var p = (t, e, r) => (g(t, e, "read from private field"), r ? r.call(t) : e.get(t)), c = (t, e, r) => e.has(t) ? u("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), m = (t, e, r, i) => (g(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as C } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as b } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as w } from "../../styles/component.styles.js";
|
10
|
+
import { LocalizeController as O } from "../../utilities/localize.js";
|
11
|
+
import { html as P } from "lit";
|
12
|
+
import { property as _, queryAssignedElements as D } from "lit/decorators.js";
|
13
|
+
import { ifDefined as E } from "lit/directives/if-defined.js";
|
14
|
+
import { styles as S } from "./nav.styles.js";
|
15
|
+
var j = Object.defineProperty, x = Object.getOwnPropertyDescriptor, h = (t, e, r, i) => {
|
16
|
+
for (var o = i > 1 ? void 0 : i ? x(e, r) : e, f = t.length - 1, v; f >= 0; f--)
|
17
|
+
(v = t[f]) && (o = (i ? v(e, r, o) : v(o)) || o);
|
18
|
+
return i && o && j(e, r, o), o;
|
19
|
+
}, a, l, n;
|
20
|
+
const y = class y extends d {
|
13
21
|
constructor() {
|
14
|
-
super(...arguments)
|
22
|
+
super(...arguments);
|
23
|
+
c(this, a);
|
24
|
+
c(this, l);
|
25
|
+
c(this, n);
|
26
|
+
m(this, a, new O(this)), m(this, l, this.attachInternals()), m(this, n, p(this, l).states), this.lang = "en", this.vertical = !1;
|
15
27
|
}
|
16
28
|
connectedCallback() {
|
17
|
-
super.connectedCallback(), this.ariaLabel = this.
|
29
|
+
super.connectedCallback(), this.ariaLabel = p(this, a).term("mainNavigation"), this.role = "navigation";
|
30
|
+
}
|
31
|
+
_handleStateChange() {
|
32
|
+
C(p(this, n), "vertical").set(this.vertical), this._items.forEach((r) => {
|
33
|
+
r.vertical = this.vertical;
|
34
|
+
});
|
18
35
|
}
|
19
36
|
render() {
|
20
|
-
return
|
21
|
-
<ul aria-orientation=${
|
37
|
+
return P`
|
38
|
+
<ul aria-orientation=${E(this.vertical ? "vertical" : void 0)}>
|
22
39
|
<slot></slot>
|
23
40
|
</ul>
|
24
41
|
`;
|
25
42
|
}
|
26
43
|
};
|
27
|
-
|
28
|
-
let
|
29
|
-
|
30
|
-
|
31
|
-
],
|
44
|
+
a = new WeakMap(), l = new WeakMap(), n = new WeakMap(), y.styles = [w, S];
|
45
|
+
let s = y;
|
46
|
+
h([
|
47
|
+
_({ type: String })
|
48
|
+
], s.prototype, "lang", 2);
|
49
|
+
h([
|
50
|
+
_({ type: Boolean })
|
51
|
+
], s.prototype, "vertical", 2);
|
52
|
+
h([
|
53
|
+
D({ selector: "skf-nav-item" })
|
54
|
+
], s.prototype, "_items", 2);
|
55
|
+
h([
|
56
|
+
b("vertical")
|
57
|
+
], s.prototype, "_handleStateChange", 1);
|
32
58
|
export {
|
33
|
-
|
59
|
+
s as SkfNav
|
34
60
|
};
|
@@ -1,17 +1,23 @@
|
|
1
1
|
import { css as t } from "lit";
|
2
|
-
const
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
const o = t`
|
3
|
+
@layer components {
|
4
|
+
@layer base {
|
5
|
+
:host(:not(:state(vertical))) {
|
6
|
+
width: fit-content;
|
7
|
+
}
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
+
ul {
|
10
|
+
display: flex;
|
11
|
+
}
|
12
|
+
}
|
9
13
|
|
10
|
-
|
11
|
-
|
14
|
+
@layer mods {
|
15
|
+
:host(:state(vertical)) ul {
|
16
|
+
flex-direction: column;
|
17
|
+
}
|
12
18
|
}
|
13
19
|
}
|
14
20
|
`;
|
15
21
|
export {
|
16
|
-
|
22
|
+
o as styles
|
17
23
|
};
|
@@ -9,10 +9,13 @@ import type { CSSResultGroup } from 'lit';
|
|
9
9
|
* See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
|
10
10
|
*
|
11
11
|
* @attribute {"top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end"} [placement='bottom-start'] - The placement of the popover
|
12
|
-
* @attribute {string} anchor - The id of the element the
|
12
|
+
* @attribute {string} anchor - The id of the element the popover will be anchored to
|
13
13
|
*
|
14
|
-
* @
|
15
|
-
* @
|
14
|
+
* @property {(void) => void} open() - Method that opens the popover
|
15
|
+
* @property {(void) => void} close() - Method that closes the popover
|
16
|
+
*
|
17
|
+
* @event {CustomEvent} skf-opened - Fired when the popover is opened
|
18
|
+
* @event {CustomEvent} skf-closed - Fired when the popover is closed
|
16
19
|
*
|
17
20
|
* @slot - The popover content
|
18
21
|
*
|
@@ -28,5 +31,9 @@ export declare class SkfPopover extends SkfPopoverBase {
|
|
28
31
|
/** @internal */
|
29
32
|
hideArrowChanged(): void;
|
30
33
|
/** @internal */
|
34
|
+
openExtended(): void;
|
35
|
+
/** @internal */
|
31
36
|
addEventListeners($element: HTMLElement | Element): void;
|
37
|
+
/** @internal */
|
38
|
+
_checkClickOutside: (e: Event) => void;
|
32
39
|
}
|
@@ -1,35 +1,43 @@
|
|
1
1
|
import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
-
import { watch as
|
3
|
-
import { property as
|
2
|
+
import { watch as l } from "../../internal/helpers/watch.js";
|
3
|
+
import { property as c } from "lit/decorators.js";
|
4
4
|
import { styles as w } from "./popover.styles.js";
|
5
|
-
var
|
6
|
-
for (var
|
7
|
-
(p =
|
8
|
-
return s &&
|
5
|
+
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (d, t, i, s) => {
|
6
|
+
for (var e = s > 1 ? void 0 : s ? v(t, i) : t, o = d.length - 1, p; o >= 0; o--)
|
7
|
+
(p = d[o]) && (e = (s ? p(t, i, e) : p(e)) || e);
|
8
|
+
return s && e && f(t, i, e), e;
|
9
9
|
};
|
10
|
-
const
|
10
|
+
const a = class a extends h {
|
11
11
|
constructor() {
|
12
|
-
super(), this.offset = 8, this.hideArrow = !1, this.
|
12
|
+
super(), this.offset = 8, this.hideArrow = !1, this._checkClickOutside = (t) => {
|
13
|
+
this.isOpen && !this.contains(t.target) && this.close();
|
14
|
+
}, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", this.variant = "popup", h.classMap = { popover: !0 };
|
13
15
|
}
|
14
16
|
hideArrowChanged() {
|
15
17
|
this.arrow = !this.hideArrow;
|
16
18
|
}
|
17
19
|
/** @internal */
|
18
|
-
|
19
|
-
|
20
|
+
openExtended() {
|
21
|
+
window.top && window.self !== window.top && window.top.addEventListener("click", this._checkClickOutside, {
|
22
|
+
signal: this.signal
|
23
|
+
});
|
24
|
+
}
|
25
|
+
/** @internal */
|
26
|
+
addEventListeners(t) {
|
27
|
+
t.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
|
20
28
|
}
|
21
29
|
};
|
22
|
-
|
23
|
-
let
|
24
|
-
|
25
|
-
|
26
|
-
],
|
27
|
-
|
28
|
-
|
29
|
-
],
|
30
|
-
|
31
|
-
|
32
|
-
],
|
30
|
+
a.styles = [h.styles, w];
|
31
|
+
let r = a;
|
32
|
+
n([
|
33
|
+
c({ type: Number })
|
34
|
+
], r.prototype, "offset", 2);
|
35
|
+
n([
|
36
|
+
c({ type: Boolean })
|
37
|
+
], r.prototype, "hideArrow", 2);
|
38
|
+
n([
|
39
|
+
l("hideArrow")
|
40
|
+
], r.prototype, "hideArrowChanged", 1);
|
33
41
|
export {
|
34
|
-
|
42
|
+
r as SkfPopover
|
35
43
|
};
|
@@ -18,5 +18,7 @@ export declare class SkfProgress extends SkfElement {
|
|
18
18
|
/** Specifies how much of the task that has been completed */
|
19
19
|
value: number;
|
20
20
|
connectedCallback(): void;
|
21
|
+
/** @internal */
|
22
|
+
_handleStateChange(): void;
|
21
23
|
render(): import("lit").TemplateResult<1>;
|
22
24
|
}
|
@@ -1,43 +1,52 @@
|
|
1
|
-
var
|
1
|
+
var v = (t) => {
|
2
2
|
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var
|
6
|
-
import { SkfElement as
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
4
|
+
var y = (t, e, r) => e.has(t) || v("Cannot " + r);
|
5
|
+
var c = (t, e, r) => (y(t, e, "read from private field"), r ? r.call(t) : e.get(t)), u = (t, e, r) => e.has(t) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), d = (t, e, r, a) => (y(t, e, "write to private field"), a ? a.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as _ } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as x } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as C } from "../../styles/component.styles.js";
|
10
|
+
import { html as O } from "lit";
|
11
|
+
import { property as f } from "lit/decorators.js";
|
12
|
+
import { styles as g } from "./progress.styles.js";
|
13
|
+
var w = Object.defineProperty, j = Object.getOwnPropertyDescriptor, n = (t, e, r, a) => {
|
14
|
+
for (var s = a > 1 ? void 0 : a ? j(e, r) : e, l = t.length - 1, h; l >= 0; l--)
|
15
|
+
(h = t[l]) && (s = (a ? h(e, r, s) : h(s)) || s);
|
16
|
+
return a && s && w(e, r, s), s;
|
17
|
+
}, i, p;
|
18
|
+
const m = class m extends b {
|
17
19
|
constructor() {
|
18
20
|
super(...arguments);
|
19
|
-
|
20
|
-
|
21
|
+
u(this, i);
|
22
|
+
u(this, p);
|
23
|
+
d(this, i, this.attachInternals()), d(this, p, c(this, i).states), this.animated = !1, this.max = 1, this.value = 0;
|
21
24
|
}
|
22
25
|
connectedCallback() {
|
23
|
-
super.connectedCallback(),
|
26
|
+
super.connectedCallback(), this.role = "progressbar";
|
27
|
+
}
|
28
|
+
_handleStateChange() {
|
29
|
+
_(c(this, p), "animated").set(this.animated);
|
24
30
|
}
|
25
31
|
render() {
|
26
32
|
const r = this.value / this.max * 100;
|
27
|
-
return
|
33
|
+
return O`<div id="root" style="--_skf-progress-value: ${r}%"></div>`;
|
28
34
|
}
|
29
35
|
};
|
30
|
-
|
31
|
-
let o =
|
32
|
-
|
33
|
-
|
34
|
-
], o.prototype, "animated");
|
35
|
-
|
36
|
-
|
37
|
-
], o.prototype, "max");
|
38
|
-
|
39
|
-
|
40
|
-
], o.prototype, "value");
|
36
|
+
i = new WeakMap(), p = new WeakMap(), m.styles = [C, g], m.formAssociated = !0;
|
37
|
+
let o = m;
|
38
|
+
n([
|
39
|
+
f({ type: Boolean })
|
40
|
+
], o.prototype, "animated", 2);
|
41
|
+
n([
|
42
|
+
f({ type: Number })
|
43
|
+
], o.prototype, "max", 2);
|
44
|
+
n([
|
45
|
+
f({ type: Number })
|
46
|
+
], o.prototype, "value", 2);
|
47
|
+
n([
|
48
|
+
x("animated")
|
49
|
+
], o.prototype, "_handleStateChange", 1);
|
41
50
|
export {
|
42
51
|
o as SkfProgress
|
43
52
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
2
|
+
const a = r`
|
3
3
|
@layer components {
|
4
4
|
@layer base {
|
5
5
|
#root {
|
@@ -11,7 +11,7 @@ const o = r`
|
|
11
11
|
overflow: hidden;
|
12
12
|
|
13
13
|
&::after {
|
14
|
-
background-color: var(--skf-bg-color-
|
14
|
+
background-color: var(--skf-bg-color-emphasized);
|
15
15
|
block-size: inherit;
|
16
16
|
border-radius: inherit;
|
17
17
|
content: '';
|
@@ -24,7 +24,7 @@ const o = r`
|
|
24
24
|
}
|
25
25
|
|
26
26
|
@layer mods {
|
27
|
-
:host(
|
27
|
+
:host(:state(animated)) {
|
28
28
|
#root::after {
|
29
29
|
animation: skf-progress-animation calc(var(--skf-motion-duration-slow) * 1ms) linear
|
30
30
|
infinite reverse;
|
@@ -51,5 +51,5 @@ const o = r`
|
|
51
51
|
}
|
52
52
|
`;
|
53
53
|
export {
|
54
|
-
|
54
|
+
a as styles
|
55
55
|
};
|
@@ -2,6 +2,7 @@ import '../icon/icon.js';
|
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
3
|
import type { FormFieldSeverity } from '../../internal/types.js';
|
4
4
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
|
+
import { type Language } from '../../utilities/localize.js';
|
5
6
|
import { type CSSResultGroup } from 'lit';
|
6
7
|
/**
|
7
8
|
* The `<skf-radio>` component is used to create a radio input
|
@@ -18,6 +19,7 @@ import { type CSSResultGroup } from 'lit';
|
|
18
19
|
* @tagname skf-radio
|
19
20
|
*/
|
20
21
|
export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
22
|
+
#private;
|
21
23
|
static styles: CSSResultGroup;
|
22
24
|
/**
|
23
25
|
* @internal
|
@@ -32,10 +34,10 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
|
32
34
|
customInvalid: boolean;
|
33
35
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
34
36
|
label?: string;
|
37
|
+
/** Sets the internal language of the component */
|
38
|
+
lang: Language;
|
35
39
|
/** If defined, adds name to the input-element */
|
36
40
|
name?: string;
|
37
|
-
/** If defined, renders an alternative A11y text for the asterisk */
|
38
|
-
requiredLabel?: string;
|
39
41
|
/** Size of the Radio */
|
40
42
|
size: 'sm' | 'md';
|
41
43
|
/** If defined, displays provided severity state */
|