@skf-design-system/ui-components 1.0.0-alpha.29 → 1.0.0-alpha.30
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 +6 -4
- package/dist/components/button/button.component.js +59 -47
- package/dist/components/button/button.styles.js +55 -45
- 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 +3 -3
- 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.d.ts +1 -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 +3 -6
- package/dist/components/icon/icon.component.js +28 -19
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/input/input.component.d.ts +4 -4
- package/dist/components/link/link.component.d.ts +7 -6
- package/dist/components/link/link.component.js +33 -27
- 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/menu/menu.component.d.ts +24 -0
- package/dist/components/menu/menu.component.js +18 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.js +6 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +11 -0
- package/dist/components/menu-item/menu-item.component.d.ts +25 -0
- package/dist/components/menu-item/menu-item.component.js +13 -0
- package/dist/components/menu-item/menu-item.d.ts +8 -0
- package/dist/components/menu-item/menu-item.js +6 -0
- package/dist/components/menu-item/menu-item.styles.d.ts +1 -0
- package/dist/components/menu-item/menu-item.styles.js +19 -0
- package/dist/components/popover/popover.component.d.ts +29 -0
- package/dist/components/popover/popover.component.js +37 -0
- package/dist/components/popover/popover.d.ts +8 -0
- package/dist/components/popover/popover.js +6 -0
- package/dist/components/popover/popover.styles.d.ts +1 -0
- package/dist/components/popover/popover.styles.js +12 -0
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -22
- package/dist/components/progress/progress.styles.js +19 -18
- package/dist/components/radio/radio.component.d.ts +3 -3
- package/dist/components/select/select.component.d.ts +10 -12
- package/dist/components/select/select.component.js +115 -118
- package/dist/components/select/select.controllers.d.ts +1 -26
- package/dist/components/select/select.controllers.js +35 -95
- 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/stepper/stepper.component.d.ts +38 -0
- package/dist/components/stepper/stepper.component.js +91 -0
- package/dist/components/stepper/stepper.d.ts +8 -0
- package/dist/components/stepper/stepper.helpers.d.ts +16 -0
- package/dist/components/stepper/stepper.helpers.js +18 -0
- package/dist/components/stepper/stepper.js +6 -0
- package/dist/components/stepper/stepper.styles.d.ts +1 -0
- package/dist/components/stepper/stepper.styles.js +15 -0
- package/dist/components/stepper-item/stepper-item.component.d.ts +47 -0
- package/dist/components/stepper-item/stepper-item.component.js +113 -0
- package/dist/components/stepper-item/stepper-item.d.ts +8 -0
- package/dist/components/stepper-item/stepper-item.js +6 -0
- package/dist/components/stepper-item/stepper-item.styles.d.ts +1 -0
- package/dist/components/stepper-item/stepper-item.styles.js +98 -0
- package/dist/components/switch/switch.component.d.ts +2 -2
- package/dist/components/switch/switch.component.js +13 -6
- package/dist/components/switch/switch.styles.js +16 -13
- package/dist/components/tab/tab.component.d.ts +2 -2
- package/dist/components/tab-group/tab-group.component.d.ts +2 -2
- package/dist/components/tab-panel/tab-panel.component.d.ts +1 -1
- 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/toast/toast.component.d.ts +1 -1
- package/dist/components/toast/toast.singleton.d.ts +3 -3
- package/dist/components/toast-item/toast-item.component.d.ts +1 -1
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
- package/dist/components/tooltip/tooltip.component.d.ts +24 -0
- package/dist/components/tooltip/tooltip.component.js +18 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +6 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.styles.js +12 -0
- package/dist/custom-elements.json +1316 -79
- package/dist/index.d.ts +7 -0
- package/dist/index.js +73 -52
- package/dist/internal/base-classes/popover/popover.base.d.ts +29 -0
- package/dist/internal/base-classes/popover/popover.base.js +116 -0
- package/dist/internal/base-classes/popover/popover.styles.d.ts +1 -0
- package/dist/internal/base-classes/popover/popover.styles.js +29 -0
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/skf-element.js +26 -25
- package/dist/internal/controllers/popover.controller.d.ts +16 -0
- package/dist/internal/controllers/popover.controller.js +44 -0
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.js +7 -0
- package/dist/react/skf-dialog/index.d.ts +15 -0
- package/dist/react/skf-dialog/index.js +19 -0
- package/dist/react/skf-menu/index.d.ts +12 -0
- package/dist/react/skf-menu/index.js +18 -0
- package/dist/react/skf-menu-item/index.d.ts +27 -0
- package/dist/react/skf-menu-item/index.js +23 -0
- package/dist/react/skf-popover/index.d.ts +12 -0
- package/dist/react/skf-popover/index.js +18 -0
- package/dist/react/skf-stepper/index.d.ts +9 -0
- package/dist/react/skf-stepper/index.js +17 -0
- package/dist/react/skf-stepper-item/index.d.ts +9 -0
- package/dist/react/skf-stepper-item/index.js +17 -0
- package/dist/react/skf-tooltip/index.d.ts +12 -0
- package/dist/react/skf-tooltip/index.js +18 -0
- package/dist/styles/component.styles.js +15 -2
- package/dist/types/jsx/custom-element-jsx.d.ts +1263 -228
- package/dist/types/vue/index.d.ts +260 -2
- package/dist/vscode.html-custom-data.json +335 -8
- package/dist/web-types.json +623 -38
- package/package.json +31 -30
- package/custom-elements.json +0 -18265
@@ -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;
|
@@ -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,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;
|
@@ -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.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-tooltip>` is a component that displays a list of actions or options.
|
5
|
+
*
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
|
+
*
|
8
|
+
* @property {"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 dropdown
|
9
|
+
* @property {boolean} [isOpen=false] - Whether the dropdown is open
|
10
|
+
* @property {string} [anchor] - The id of the element the dropdown will be anchored to
|
11
|
+
*
|
12
|
+
* @event open - Fired when the dropdown is opened
|
13
|
+
* @event close - Fired when the dropdown is closed
|
14
|
+
*
|
15
|
+
* @slot - The tooltip popover content
|
16
|
+
*
|
17
|
+
* @tagname skf-tooltip
|
18
|
+
*/
|
19
|
+
export declare class SkfTooltip extends SkfPopoverBase {
|
20
|
+
static styles: CSSResultGroup;
|
21
|
+
constructor();
|
22
|
+
addEventListeners($element: HTMLElement | Element): void;
|
23
|
+
removeEventListeners($element: HTMLElement | Element): void;
|
24
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { styles as o } from "./tooltip.styles.js";
|
2
|
+
import { SkfPopoverBase as s } from "../../internal/base-classes/popover/popover.base.js";
|
3
|
+
const t = class t extends s {
|
4
|
+
constructor() {
|
5
|
+
super(), this.arrow = !0, this.offset = 8, this.placement = "top", s.classMap = { tooltip: !0 };
|
6
|
+
}
|
7
|
+
addEventListeners(e) {
|
8
|
+
e.addEventListener("mouseenter", this.open), e.addEventListener("mouseleave", this.close);
|
9
|
+
}
|
10
|
+
removeEventListeners(e) {
|
11
|
+
e.removeEventListener("mouseenter", this.open), e.removeEventListener("mouseleave", this.close);
|
12
|
+
}
|
13
|
+
};
|
14
|
+
t.styles = [s.styles, o];
|
15
|
+
let r = t;
|
16
|
+
export {
|
17
|
+
r as SkfTooltip
|
18
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|