@skf-design-system/ui-components 1.0.0-alpha.36 → 1.0.0-alpha.37
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/loader/loader.component.d.ts +5 -1
- package/dist/components/loader/loader.component.js +43 -29
- package/dist/components/loader/loader.styles.js +5 -9
- package/dist/components/select/select.controllers.js +4 -9
- package/dist/custom-elements.json +26 -6
- package/dist/internal/base-classes/popover/popover.base.d.ts +2 -2
- package/dist/vscode.html-custom-data.json +1 -1
- package/dist/web-types.json +2 -2
- package/package.json +6 -6
@@ -1,5 +1,6 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
type Size = 'md' | 'sm';
|
3
4
|
/**
|
4
5
|
* The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
|
5
6
|
*
|
@@ -15,7 +16,10 @@ export declare class SkfLoader extends SkfElement {
|
|
15
16
|
/** If true, inverts the color (to be used on colored backgrounds) */
|
16
17
|
invert: boolean;
|
17
18
|
/** Defines the size of the loader */
|
18
|
-
size
|
19
|
+
size: Size;
|
19
20
|
connectedCallback(): void;
|
21
|
+
/** @internal */
|
22
|
+
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
20
23
|
render(): import("lit").TemplateResult<1>;
|
21
24
|
}
|
25
|
+
export {};
|
@@ -1,29 +1,40 @@
|
|
1
|
-
var
|
1
|
+
var y = (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 b = (t, e, r) => e.has(t) || y("Cannot " + r);
|
5
|
+
var m = (t, e, r) => (b(t, e, "read from private field"), r ? r.call(t) : e.get(t)), v = (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), h = (t, e, r, i) => (b(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as _ } from "../../internal/components/skf-element.js";
|
7
|
+
import { stateMap as g } from "../../internal/helpers/stateMap.js";
|
8
|
+
import { watch as C } from "../../internal/helpers/watch.js";
|
9
|
+
import { componentStyles as O } from "../../styles/component.styles.js";
|
10
|
+
import { html as P } from "lit";
|
11
|
+
import { property as d } from "lit/decorators.js";
|
12
|
+
import { styles as S } from "./loader.styles.js";
|
13
|
+
var j = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (t, e, r, i) => {
|
14
|
+
for (var s = i > 1 ? void 0 : i ? w(e, r) : e, n = t.length - 1, c; n >= 0; n--)
|
15
|
+
(c = t[n]) && (s = (i ? c(e, r, s) : c(s)) || s);
|
16
|
+
return i && s && j(e, r, s), s;
|
17
|
+
};
|
18
|
+
const u = {
|
19
|
+
invert: "invert",
|
20
|
+
size: ["md", "sm"]
|
21
|
+
};
|
22
|
+
var o, p;
|
23
|
+
const f = class f extends _ {
|
17
24
|
constructor() {
|
18
25
|
super(...arguments);
|
19
|
-
|
20
|
-
|
26
|
+
v(this, o);
|
27
|
+
v(this, p);
|
28
|
+
h(this, o, this.attachInternals()), h(this, p, m(this, o).states), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
|
21
29
|
}
|
22
30
|
connectedCallback() {
|
23
|
-
super.connectedCallback(),
|
31
|
+
super.connectedCallback(), this.role = "progressbar", this.ariaLive = "polite";
|
32
|
+
}
|
33
|
+
_handleStateChange(r, i, s) {
|
34
|
+
g(m(this, p), u[r]).set(s);
|
24
35
|
}
|
25
36
|
render() {
|
26
|
-
return
|
37
|
+
return P`
|
27
38
|
<div id="root">
|
28
39
|
<div class="circle"></div>
|
29
40
|
<div class="circle"></div>
|
@@ -32,17 +43,20 @@ const d = class d extends b {
|
|
32
43
|
`;
|
33
44
|
}
|
34
45
|
};
|
35
|
-
|
36
|
-
let a =
|
37
|
-
|
38
|
-
|
39
|
-
], a.prototype, "ariaLabel");
|
40
|
-
|
41
|
-
|
42
|
-
], a.prototype, "invert");
|
43
|
-
|
44
|
-
|
45
|
-
], a.prototype, "size");
|
46
|
+
o = new WeakMap(), p = new WeakMap(), f.styles = [O, S];
|
47
|
+
let a = f;
|
48
|
+
l([
|
49
|
+
d({ type: String, attribute: "aria-label" })
|
50
|
+
], a.prototype, "ariaLabel", 2);
|
51
|
+
l([
|
52
|
+
d({ type: Boolean })
|
53
|
+
], a.prototype, "invert", 2);
|
54
|
+
l([
|
55
|
+
d({ type: String })
|
56
|
+
], a.prototype, "size", 2);
|
57
|
+
l([
|
58
|
+
C(Object.keys(u))
|
59
|
+
], a.prototype, "_handleStateChange", 1);
|
46
60
|
export {
|
47
61
|
a as SkfLoader
|
48
62
|
};
|
@@ -33,17 +33,13 @@ const o = a`
|
|
33
33
|
}
|
34
34
|
|
35
35
|
@layer mods {
|
36
|
-
:host(
|
37
|
-
|
38
|
-
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
39
|
-
}
|
36
|
+
:host(:state(invert)) #root {
|
37
|
+
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
40
38
|
}
|
41
39
|
|
42
|
-
:host(
|
43
|
-
|
44
|
-
|
45
|
-
--_skf-loader-size: var(--skf-size-4);
|
46
|
-
}
|
40
|
+
:host(:state(sm)) #root {
|
41
|
+
--_skf-loader-gap: var(--skf-spacing-25);
|
42
|
+
--_skf-loader-size: var(--skf-size-4);
|
47
43
|
}
|
48
44
|
}
|
49
45
|
}
|
@@ -23,7 +23,7 @@ class d {
|
|
23
23
|
document.removeEventListener("click", this._globalClickHandler);
|
24
24
|
}
|
25
25
|
}
|
26
|
-
class
|
26
|
+
class b {
|
27
27
|
constructor(t) {
|
28
28
|
this._handleKeyDown = (e) => {
|
29
29
|
switch (e.key) {
|
@@ -82,7 +82,7 @@ class p {
|
|
82
82
|
return !this.host || !this.host._optionsList ? [] : this.host._optionsList.filter((t) => !t.disabled);
|
83
83
|
}
|
84
84
|
}
|
85
|
-
class
|
85
|
+
class p {
|
86
86
|
constructor(t) {
|
87
87
|
(this.host = t).addController(this);
|
88
88
|
}
|
@@ -103,16 +103,11 @@ class b {
|
|
103
103
|
),
|
104
104
|
reason: "attribute-mismatch",
|
105
105
|
replaceStrings: [t, "min or max", "together with multiple"]
|
106
|
-
}), a({
|
107
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
108
|
-
assert: this.host.hideTags && this.host.multiple || !this.host.hideTags,
|
109
|
-
reason: "attribute-mismatch",
|
110
|
-
replaceStrings: [t, "hide-tags", "together with multiple"]
|
111
106
|
});
|
112
107
|
}
|
113
108
|
}
|
114
109
|
export {
|
115
|
-
|
110
|
+
p as DeveloperFeedbackController,
|
116
111
|
d as GlobalClickController,
|
117
|
-
|
112
|
+
b as KeyboardNavigationController
|
118
113
|
};
|
@@ -820,6 +820,22 @@
|
|
820
820
|
"description": "The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities",
|
821
821
|
"name": "SkfLoader",
|
822
822
|
"members": [
|
823
|
+
{
|
824
|
+
"kind": "field",
|
825
|
+
"name": "#internals",
|
826
|
+
"privacy": "private",
|
827
|
+
"type": {
|
828
|
+
"text": "ElementInternals"
|
829
|
+
}
|
830
|
+
},
|
831
|
+
{
|
832
|
+
"kind": "field",
|
833
|
+
"name": "#states",
|
834
|
+
"privacy": "private",
|
835
|
+
"type": {
|
836
|
+
"text": "CustomStateSet"
|
837
|
+
}
|
838
|
+
},
|
823
839
|
{
|
824
840
|
"kind": "field",
|
825
841
|
"name": "ariaLabel",
|
@@ -828,8 +844,7 @@
|
|
828
844
|
},
|
829
845
|
"default": "'Loading...'",
|
830
846
|
"description": "Defines the aria-label",
|
831
|
-
"attribute": "aria-label"
|
832
|
-
"reflects": true
|
847
|
+
"attribute": "aria-label"
|
833
848
|
},
|
834
849
|
{
|
835
850
|
"kind": "field",
|
@@ -845,12 +860,14 @@
|
|
845
860
|
"kind": "field",
|
846
861
|
"name": "size",
|
847
862
|
"type": {
|
848
|
-
"text": "
|
863
|
+
"text": "Size"
|
849
864
|
},
|
850
865
|
"default": "'md'",
|
851
866
|
"description": "Defines the size of the loader",
|
852
867
|
"attribute": "size",
|
853
|
-
"
|
868
|
+
"expandedType": {
|
869
|
+
"text": "'sm' | 'md'"
|
870
|
+
}
|
854
871
|
}
|
855
872
|
],
|
856
873
|
"attributes": [
|
@@ -875,11 +892,14 @@
|
|
875
892
|
{
|
876
893
|
"name": "size",
|
877
894
|
"type": {
|
878
|
-
"text": "
|
895
|
+
"text": "Size"
|
879
896
|
},
|
880
897
|
"default": "'md'",
|
881
898
|
"description": "Defines the size of the loader",
|
882
|
-
"fieldName": "size"
|
899
|
+
"fieldName": "size",
|
900
|
+
"expandedType": {
|
901
|
+
"text": "'sm' | 'md'"
|
902
|
+
}
|
883
903
|
}
|
884
904
|
],
|
885
905
|
"superclass": {
|
@@ -16,8 +16,8 @@ export declare class SkfPopoverBase extends SkfElement {
|
|
16
16
|
/** @internal */
|
17
17
|
triggerEvent: 'mouseenter' | 'click';
|
18
18
|
$arrow: HTMLElement;
|
19
|
-
abortEventsController: AbortController;
|
20
|
-
signal: AbortSignal;
|
19
|
+
protected abortEventsController: AbortController;
|
20
|
+
protected signal: AbortSignal;
|
21
21
|
protected popoverController: PopoverController;
|
22
22
|
constructor();
|
23
23
|
disconnectedCallback(): void;
|
package/dist/web-types.json
CHANGED
@@ -393,7 +393,7 @@
|
|
393
393
|
{
|
394
394
|
"name": "size",
|
395
395
|
"description": "Defines the size of the loader",
|
396
|
-
"value": { "type": "
|
396
|
+
"value": { "type": "Size", "default": "'md'" }
|
397
397
|
}
|
398
398
|
],
|
399
399
|
"events": [],
|
@@ -412,7 +412,7 @@
|
|
412
412
|
{
|
413
413
|
"name": "size",
|
414
414
|
"description": "Defines the size of the loader",
|
415
|
-
"type": "
|
415
|
+
"type": "Size"
|
416
416
|
}
|
417
417
|
],
|
418
418
|
"events": []
|
package/package.json
CHANGED
@@ -34,15 +34,15 @@
|
|
34
34
|
"sideEffects": true,
|
35
35
|
"type": "module",
|
36
36
|
"types": "./dist/index.d.ts",
|
37
|
-
"version": "1.0.0-alpha.
|
37
|
+
"version": "1.0.0-alpha.37",
|
38
38
|
"dependencies": {
|
39
39
|
"@floating-ui/dom": "^1.7.0",
|
40
40
|
"@js-temporal/polyfill": "^0.5.1"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
43
|
"@chromatic-com/storybook": "^3.2.6",
|
44
|
-
"@commitlint/cli": "^19.8.
|
45
|
-
"@commitlint/config-conventional": "^19.8.
|
44
|
+
"@commitlint/cli": "^19.8.1",
|
45
|
+
"@commitlint/config-conventional": "^19.8.1",
|
46
46
|
"@custom-elements-manifest/analyzer": "^0.10.4",
|
47
47
|
"@eslint/js": "^9.26.0",
|
48
48
|
"@skf-design-system/ui-assets": "0.1.3-beta.4",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
"@storybook/theming": "^8.6.12",
|
57
57
|
"@storybook/web-components": "^8.6.12",
|
58
58
|
"@storybook/web-components-vite": "^8.6.12",
|
59
|
-
"@types/node": "^22.15.
|
59
|
+
"@types/node": "^22.15.17",
|
60
60
|
"@wc-toolkit/module-path-resolver": "^1.0.0",
|
61
61
|
"@wc-toolkit/storybook-helpers": "^1.1.2",
|
62
62
|
"@wc-toolkit/type-parser": "^1.0.3",
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"eslint-plugin-lit-a11y": "^4.1.4",
|
71
71
|
"eslint-plugin-wc": "^3.0.1",
|
72
72
|
"husky": "^9.1.7",
|
73
|
-
"lint-staged": "^
|
73
|
+
"lint-staged": "^16.0.0",
|
74
74
|
"lit": "^3.3.0",
|
75
75
|
"postcss-styled-syntax": "^0.7.1",
|
76
76
|
"prettier": "3.5.3",
|
@@ -82,7 +82,7 @@
|
|
82
82
|
"stylelint-value-no-unknown-custom-properties": "^6.0.1",
|
83
83
|
"tsc-alias": "^1.8.16",
|
84
84
|
"typescript": "^5.8.3",
|
85
|
-
"typescript-eslint": "^8.32.
|
85
|
+
"typescript-eslint": "^8.32.1",
|
86
86
|
"vite": "^6.3.5",
|
87
87
|
"vite-tsconfig-paths": "^5.1.4"
|
88
88
|
},
|