@skf-design-system/ui-components 1.0.0-beta.7 → 1.0.1-beta.1
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/alert/alert.component.d.ts +2 -2
- package/dist/components/alert/alert.component.js +34 -34
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +1 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +25 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +8 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.d.ts +1 -0
- package/dist/components/button/button.component.d.ts +6 -4
- package/dist/components/button/button.component.js +87 -70
- package/dist/components/button/button.styles.js +64 -45
- package/dist/components/checkbox/checkbox.component.d.ts +3 -1
- package/dist/components/checkbox/checkbox.component.js +71 -58
- package/dist/components/date-picker/datepicker.calendar.component.d.ts +72 -0
- package/dist/components/date-picker/datepicker.calendar.component.js +382 -0
- package/dist/components/date-picker/datepicker.calendar.styles.d.ts +1 -0
- package/dist/components/date-picker/datepicker.calendar.styles.js +192 -0
- package/dist/components/date-picker/datepicker.component.d.ts +74 -0
- package/dist/components/date-picker/datepicker.component.js +241 -0
- package/dist/components/date-picker/datepicker.d.ts +10 -0
- package/dist/components/date-picker/datepicker.helpers.d.ts +40 -0
- package/dist/components/date-picker/datepicker.helpers.js +69 -0
- package/dist/components/date-picker/datepicker.js +8 -0
- package/dist/components/date-picker/datepicker.styles.d.ts +1 -0
- package/dist/components/date-picker/datepicker.styles.js +99 -0
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +107 -0
- package/dist/components/date-picker-input/datepicker-input.component.js +397 -0
- package/dist/components/date-picker-input/datepicker-input.d.ts +8 -0
- package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +4 -0
- package/dist/components/date-picker-input/datepicker-input.helpers.js +29 -0
- package/dist/components/date-picker-input/datepicker-input.js +6 -0
- package/dist/components/date-picker-input/datepicker-input.styles.d.ts +1 -0
- package/dist/components/date-picker-input/datepicker-input.styles.js +22 -0
- package/dist/components/dialog/dialog.component.d.ts +0 -1
- package/dist/components/dialog/dialog.component.js +2 -4
- package/dist/components/icon/icon.component.d.ts +1 -4
- 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 +1 -0
- package/dist/components/input/input.component.js +87 -80
- package/dist/components/link/link.component.d.ts +1 -0
- package/dist/components/link/link.component.js +21 -21
- 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/select/select.component.d.ts +8 -10
- package/dist/components/select/select.component.js +115 -118
- package/dist/components/select/select.controllers.d.ts +0 -25
- package/dist/components/select/select.controllers.js +35 -95
- 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/toast/toast.component.d.ts +7 -4
- package/dist/components/toast/toast.component.js +24 -20
- package/dist/components/toast/toast.singleton.d.ts +2 -7
- package/dist/components/toast/toast.singleton.js +25 -25
- package/dist/components/toast-item/toast-item.component.js +15 -15
- package/dist/components/toast-item/toast-item.styles.js +13 -11
- 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 +3278 -1321
- package/dist/index.d.ts +8 -0
- package/dist/index.js +78 -54
- 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/controllers/popover.controller.d.ts +17 -0
- package/dist/internal/controllers/popover.controller.js +44 -0
- package/dist/internal/helpers/dateFormatter.d.ts +2 -0
- package/dist/internal/helpers/hintSeverity.d.ts +1 -1
- package/dist/internal/helpers/utilityTypes.d.ts +22 -0
- package/dist/react/index.d.ts +11 -2
- package/dist/react/index.js +11 -2
- package/dist/react/skf-breadcrumb/index.d.ts +9 -0
- package/dist/react/skf-breadcrumb/index.js +17 -0
- package/dist/react/skf-breadcrumb-item/index.d.ts +3 -0
- package/dist/react/skf-breadcrumb-item/index.js +13 -0
- package/dist/react/skf-datepicker/index.d.ts +12 -0
- package/dist/react/skf-datepicker/index.js +18 -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/types/jsx/custom-element-jsx.d.ts +628 -155
- package/dist/types/vue/index.d.ts +369 -74
- package/dist/vscode.html-custom-data.json +761 -391
- package/dist/web-types.json +936 -293
- package/package.json +34 -33
@@ -119,9 +119,7 @@ const y = class y extends v {
|
|
119
119
|
})}
|
120
120
|
>
|
121
121
|
<div class="dialog__head">
|
122
|
-
<h2 class="dialog__heading">
|
123
|
-
<slot name="heading"></slot>
|
124
|
-
</h2>
|
122
|
+
<h2 class="dialog__heading">${this.heading}</h2>
|
125
123
|
${this.noCloseButton ? k : b`
|
126
124
|
<button
|
127
125
|
@click=${this._handleClose}
|
@@ -137,7 +135,7 @@ const y = class y extends v {
|
|
137
135
|
<slot
|
138
136
|
class=${$({
|
139
137
|
dialog__foot: !0,
|
140
|
-
"dialog__foot
|
138
|
+
"dialog__foot--hidden": !this.renderFoot
|
141
139
|
})}
|
142
140
|
name="footer"
|
143
141
|
></slot>
|
@@ -10,7 +10,6 @@ import { type CSSResultGroup } from 'lit';
|
|
10
10
|
*/
|
11
11
|
export declare class SkfIcon extends SkfElement {
|
12
12
|
static styles: CSSResultGroup;
|
13
|
-
private _rootId;
|
14
13
|
/**
|
15
14
|
* Sets the color of the icon
|
16
15
|
* @type { "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert" }
|
@@ -27,8 +26,6 @@ export declare class SkfIcon extends SkfElement {
|
|
27
26
|
* Size of the icon
|
28
27
|
* @type { "xs" | "sm" | "md" | "lg" }
|
29
28
|
*/
|
30
|
-
size
|
31
|
-
private renderDecorativeIcon;
|
32
|
-
private renderInformativeIcon;
|
29
|
+
size: IconSize;
|
33
30
|
render(): import("lit").TemplateResult<1>;
|
34
31
|
}
|
@@ -1,30 +1,39 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
|
-
import { ICONS as
|
3
|
-
import
|
4
|
-
import { html as
|
2
|
+
import { ICONS as c } from "@skf-design-system/ui-assets";
|
3
|
+
import d from "../../styles/component.styles.js";
|
4
|
+
import { html as h } from "lit";
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
var y = Object.defineProperty, o = (m,
|
10
|
-
for (var r = void 0, i = m.length - 1,
|
11
|
-
(
|
12
|
-
return r && y(
|
6
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
+
import v from "./icon.styles.js";
|
9
|
+
var y = Object.defineProperty, o = (m, p, a, $) => {
|
10
|
+
for (var r = void 0, i = m.length - 1, n; i >= 0; i--)
|
11
|
+
(n = m[i]) && (r = n(p, a, r) || r);
|
12
|
+
return r && y(p, a, r), r;
|
13
13
|
};
|
14
|
-
const
|
14
|
+
const l = class l extends f {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this.
|
17
|
-
<div aria-hidden="true" id=${this._rootId}>${d[this.name]}</div>
|
18
|
-
`, this.renderInformativeIcon = () => l`
|
19
|
-
<div aria-label=${c(this.label)} id=${this._rootId} role="img">${d[this.name]}</div>
|
20
|
-
`;
|
16
|
+
super(...arguments), this.color = "primary", this.size = "md";
|
21
17
|
}
|
22
18
|
render() {
|
23
|
-
return
|
19
|
+
return h`
|
20
|
+
<div
|
21
|
+
aria-hidden=${s(this.label ? void 0 : "true")}
|
22
|
+
aria-label=${s(this.label)}
|
23
|
+
class=${u({
|
24
|
+
icon: !0,
|
25
|
+
[`icon--color-${this.color}`]: !0,
|
26
|
+
[`icon--size-${this.size}`]: !0
|
27
|
+
})}
|
28
|
+
role=${s(this.label ? "img" : void 0)}
|
29
|
+
>
|
30
|
+
${c[this.name]}
|
31
|
+
</div>
|
32
|
+
`;
|
24
33
|
}
|
25
34
|
};
|
26
|
-
|
27
|
-
let e =
|
35
|
+
l.styles = [d, v];
|
36
|
+
let e = l;
|
28
37
|
o([
|
29
38
|
t({ reflect: !0 })
|
30
39
|
], e.prototype, "color");
|
@@ -1,78 +1,84 @@
|
|
1
1
|
import { css as o } from "lit";
|
2
|
-
const
|
2
|
+
const i = o`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
3
4
|
@layer components {
|
4
5
|
:host {
|
5
6
|
display: inline-flex;
|
6
7
|
}
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
:host-context(.skf-icon-host) {
|
10
|
+
color: inherit;
|
11
|
+
}
|
10
12
|
|
13
|
+
.icon {
|
11
14
|
block-size: var(--_skf-icon-size);
|
12
|
-
color: var(--_skf-icon-color, var(--skf-icon-color-primary));
|
13
15
|
display: inline-flex;
|
14
16
|
flex-shrink: 0; /* Prevents shrink when flex-child */
|
15
17
|
inline-size: var(--_skf-icon-size);
|
16
18
|
pointer-events: none;
|
17
19
|
user-select: none;
|
18
20
|
|
19
|
-
:host-context(.skf-icon-host) & {
|
20
|
-
color:
|
21
|
+
:not(:host-context(.skf-icon-host)) & {
|
22
|
+
color: var(--_skf-icon-color, var(--skf-icon-color-primary));
|
21
23
|
}
|
24
|
+
}
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
/**
|
27
|
+
* Colors
|
28
|
+
*/
|
29
|
+
.icon--color-secondary {
|
30
|
+
--_skf-icon-color: var(--skf-icon-color-secondary);
|
31
|
+
}
|
29
32
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
+
.icon--color-inverse {
|
34
|
+
--_skf-icon-color: var(--skf-icon-color-inverse);
|
35
|
+
}
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
+
.icon--color-emphasised {
|
38
|
+
--_skf-icon-color: var(--skf-icon-color-emphasised);
|
39
|
+
}
|
37
40
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
/* Severity */
|
42
|
+
.icon--color-alert {
|
43
|
+
--_skf-icon-color: var(--skf-severity-fg-color-alert);
|
44
|
+
}
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
+
.icon--color-error {
|
47
|
+
--_skf-icon-color: var(--skf-severity-fg-color-error);
|
48
|
+
}
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
.icon--color-info {
|
51
|
+
--_skf-icon-color: var(--skf-severity-fg-color-info);
|
52
|
+
}
|
50
53
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
+
.icon--color-success {
|
55
|
+
--_skf-icon-color: var(--skf-severity-fg-color-success);
|
56
|
+
}
|
54
57
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
+
.icon--color-warning {
|
59
|
+
--_skf-icon-color: var(--skf-severity-fg-color-warning);
|
60
|
+
}
|
58
61
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
/**
|
63
|
+
* Sizes
|
64
|
+
*/
|
65
|
+
.icon--size-xs {
|
66
|
+
--_skf-icon-size: var(--skf-icon-size-xs);
|
67
|
+
}
|
65
68
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
+
.icon--size-sm {
|
70
|
+
--_skf-icon-size: var(--skf-icon-size-sm);
|
71
|
+
}
|
69
72
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
+
.icon--size-md {
|
74
|
+
--_skf-icon-size: var(--skf-icon-size-md);
|
75
|
+
}
|
76
|
+
|
77
|
+
.icon--size-lg {
|
78
|
+
--_skf-icon-size: var(--skf-icon-size-lg);
|
73
79
|
}
|
74
80
|
}
|
75
81
|
`;
|
76
82
|
export {
|
77
|
-
|
83
|
+
i as default
|
78
84
|
};
|
@@ -105,6 +105,7 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
105
105
|
private _passwordController;
|
106
106
|
protected firstUpdated(): void;
|
107
107
|
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
108
|
+
valueChanged(): void;
|
108
109
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
109
110
|
/** @internal */
|
110
111
|
_handleInput: () => void;
|
@@ -2,22 +2,23 @@ import "../icon/icon.js";
|
|
2
2
|
import { FormBase as b } from "../../internal/components/formBase.js";
|
3
3
|
import "../../internal/components/hint/hint.js";
|
4
4
|
import { hintSeverity as v } from "../../internal/helpers/hintSeverity.js";
|
5
|
-
import {
|
6
|
-
import f from "../../
|
7
|
-
import
|
8
|
-
import {
|
5
|
+
import { watch as y } from "../../internal/helpers/watch.js";
|
6
|
+
import { Asterisk as f } from "../../internal/templates/asterisk.js";
|
7
|
+
import _ from "../../styles/component.styles.js";
|
8
|
+
import { html as h, nothing as u } from "lit";
|
9
|
+
import { property as i, state as c, query as $, queryAssignedNodes as g } from "lit/decorators.js";
|
9
10
|
import { ifDefined as n } from "lit/directives/if-defined.js";
|
10
|
-
import { live as
|
11
|
-
import { InputNumberController as
|
11
|
+
import { live as w } from "lit/directives/live.js";
|
12
|
+
import { InputNumberController as E, InputPasswordController as C } from "./input.controllers.js";
|
12
13
|
import A from "./input.styles.js";
|
13
|
-
var
|
14
|
-
for (var o = a > 1 ? void 0 : a ?
|
15
|
-
(
|
16
|
-
return a && o &&
|
14
|
+
var S = Object.defineProperty, L = Object.getOwnPropertyDescriptor, e = (m, s, r, a) => {
|
15
|
+
for (var o = a > 1 ? void 0 : a ? L(s, r) : s, l = m.length - 1, d; l >= 0; l--)
|
16
|
+
(d = m[l]) && (o = (a ? d(s, r, o) : d(o)) || o);
|
17
|
+
return a && o && S(s, r, o), o;
|
17
18
|
};
|
18
19
|
const p = class p extends b {
|
19
20
|
constructor() {
|
20
|
-
super(...arguments), this.buttonAriaLabelClear = "Clear input", this.buttonAriaLabelHide = "Hide password", this.buttonAriaLabelShow = "Show password", this.inputmode = "text", this.size = "md", this.type = "text", this.validateOn = "change", this.value = "", this.invalid = !1, this._buttonDown = !1, this._numberController = new
|
21
|
+
super(...arguments), this.buttonAriaLabelClear = "Clear input", this.buttonAriaLabelHide = "Hide password", this.buttonAriaLabelShow = "Show password", this.inputmode = "text", this.size = "md", this.type = "text", this.validateOn = "change", this.value = "", this.invalid = !1, this._buttonDown = !1, this._numberController = new E(this), this._passwordController = new C(this), this._handleInput = () => {
|
21
22
|
this.value = this.$input.value || "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
|
22
23
|
}, this._resetValue = (s) => {
|
23
24
|
var r;
|
@@ -91,6 +92,9 @@ const p = class p extends b {
|
|
91
92
|
} else
|
92
93
|
this.removeAttribute("invalid"), !this._pristine && this.showValid && this.setAttribute("valid", "true"), this.hint = this.getAttribute("hint") ?? "";
|
93
94
|
}
|
95
|
+
valueChanged() {
|
96
|
+
this._internals.setFormValue(this.value), console.log("updated internals", this.$input.value), this.validateInput();
|
97
|
+
}
|
94
98
|
attributeChangedCallback(s, r, a) {
|
95
99
|
if (super.attributeChangedCallback(s, r, a), s === "value" && this._internals.setFormValue(a), s === "custom-invalid")
|
96
100
|
if (typeof a == "string") {
|
@@ -131,10 +135,10 @@ const p = class p extends b {
|
|
131
135
|
<label>
|
132
136
|
<div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${s} id="label">
|
133
137
|
<slot>${this.label}</slot>
|
134
|
-
${this.required ?
|
138
|
+
${this.required ? f(this.requiredLabel) : null}
|
135
139
|
</div>
|
136
140
|
<div id="input">
|
137
|
-
${this.type === "search" ? h`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` :
|
141
|
+
${this.type === "search" ? h`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : u}
|
138
142
|
<div
|
139
143
|
data-leading=${n(this.leading)}
|
140
144
|
data-trailing=${n(this.trailing)}
|
@@ -144,12 +148,12 @@ const p = class p extends b {
|
|
144
148
|
?disabled=${this.disabled}
|
145
149
|
?readonly=${this.readonly}
|
146
150
|
?required=${this.required}
|
147
|
-
.value=${
|
151
|
+
.value=${w(this.value)}
|
148
152
|
@blur=${this._onBlur}
|
149
153
|
@input=${this._handleInput}
|
150
154
|
autocomplete=${this.autocomplete}
|
151
|
-
aria-describedby=${n((o = this.hint) != null && o.trim() ? "hint" :
|
152
|
-
aria-errormessage=${n((l = this.hint) != null && l.trim() ? "hint" :
|
155
|
+
aria-describedby=${n((o = this.hint) != null && o.trim() ? "hint" : u)}
|
156
|
+
aria-errormessage=${n((l = this.hint) != null && l.trim() ? "hint" : u)}
|
153
157
|
aria-invalid=${!!this.invalid}
|
154
158
|
autocomplete="off"
|
155
159
|
data-testid="field-input"
|
@@ -170,9 +174,9 @@ const p = class p extends b {
|
|
170
174
|
<div id="action">
|
171
175
|
${this._renderNumberButton("inc")} ${this._renderNumberButton("dec")}
|
172
176
|
</div>
|
173
|
-
` :
|
174
|
-
${this.type === "password" ? this._renderPasswordButton() :
|
175
|
-
${this.type === "search" && this.value.length > 0 ? this._renderSearchButton() :
|
177
|
+
` : u}
|
178
|
+
${this.type === "password" ? this._renderPasswordButton() : u}
|
179
|
+
${this.type === "search" && this.value.length > 0 ? this._renderSearchButton() : u}
|
176
180
|
</div>
|
177
181
|
</label>
|
178
182
|
${this.hint && h`
|
@@ -187,101 +191,104 @@ const p = class p extends b {
|
|
187
191
|
`;
|
188
192
|
}
|
189
193
|
};
|
190
|
-
p.styles = [
|
194
|
+
p.styles = [_, A];
|
191
195
|
let t = p;
|
192
|
-
|
193
|
-
|
196
|
+
e([
|
197
|
+
i({ type: String })
|
194
198
|
], t.prototype, "autocomplete", 2);
|
195
|
-
|
196
|
-
|
199
|
+
e([
|
200
|
+
i({ attribute: "button-aria-label-clear" })
|
197
201
|
], t.prototype, "buttonAriaLabelClear", 2);
|
198
|
-
|
199
|
-
|
202
|
+
e([
|
203
|
+
i({ attribute: "button-aria-label-hide" })
|
200
204
|
], t.prototype, "buttonAriaLabelHide", 2);
|
201
|
-
|
202
|
-
|
205
|
+
e([
|
206
|
+
i({ attribute: "button-aria-label-show" })
|
203
207
|
], t.prototype, "buttonAriaLabelShow", 2);
|
204
|
-
|
205
|
-
|
208
|
+
e([
|
209
|
+
i({ attribute: "custom-invalid", reflect: !0 })
|
206
210
|
], t.prototype, "customInvalid", 1);
|
207
|
-
|
208
|
-
|
211
|
+
e([
|
212
|
+
i({ type: Boolean })
|
209
213
|
], t.prototype, "debug", 2);
|
210
|
-
|
211
|
-
|
214
|
+
e([
|
215
|
+
i({ type: Boolean, attribute: "hide-label" })
|
212
216
|
], t.prototype, "hideLabel", 2);
|
213
|
-
|
214
|
-
|
217
|
+
e([
|
218
|
+
i()
|
215
219
|
], t.prototype, "hint", 2);
|
216
|
-
|
217
|
-
|
220
|
+
e([
|
221
|
+
i({ type: String })
|
218
222
|
], t.prototype, "inputmode", 2);
|
219
|
-
|
220
|
-
|
223
|
+
e([
|
224
|
+
i()
|
221
225
|
], t.prototype, "label", 2);
|
222
|
-
|
223
|
-
|
226
|
+
e([
|
227
|
+
i()
|
224
228
|
], t.prototype, "leading", 2);
|
225
|
-
|
226
|
-
|
229
|
+
e([
|
230
|
+
i()
|
227
231
|
], t.prototype, "max", 2);
|
228
|
-
|
229
|
-
|
232
|
+
e([
|
233
|
+
i({ type: Number, attribute: "maxlength" })
|
230
234
|
], t.prototype, "maxLength", 2);
|
231
|
-
|
232
|
-
|
235
|
+
e([
|
236
|
+
i()
|
233
237
|
], t.prototype, "min", 2);
|
234
|
-
|
235
|
-
|
238
|
+
e([
|
239
|
+
i({ type: Number, attribute: "minlength" })
|
236
240
|
], t.prototype, "minLength", 2);
|
237
|
-
|
238
|
-
|
241
|
+
e([
|
242
|
+
i({ reflect: !0 })
|
239
243
|
], t.prototype, "name", 2);
|
240
|
-
|
241
|
-
|
244
|
+
e([
|
245
|
+
i()
|
242
246
|
], t.prototype, "pattern", 2);
|
243
|
-
|
244
|
-
|
247
|
+
e([
|
248
|
+
i()
|
245
249
|
], t.prototype, "placeholder", 2);
|
246
|
-
|
247
|
-
|
250
|
+
e([
|
251
|
+
i({ type: Boolean })
|
248
252
|
], t.prototype, "readonly", 2);
|
249
|
-
|
250
|
-
|
253
|
+
e([
|
254
|
+
i({ attribute: "required-label" })
|
251
255
|
], t.prototype, "requiredLabel", 2);
|
252
|
-
|
253
|
-
|
256
|
+
e([
|
257
|
+
i({ reflect: !0 })
|
254
258
|
], t.prototype, "severity", 2);
|
255
|
-
|
256
|
-
|
259
|
+
e([
|
260
|
+
i({ type: Boolean, attribute: "show-valid" })
|
257
261
|
], t.prototype, "showValid", 2);
|
258
|
-
|
259
|
-
|
262
|
+
e([
|
263
|
+
i({ reflect: !0 })
|
260
264
|
], t.prototype, "size", 2);
|
261
|
-
|
262
|
-
|
265
|
+
e([
|
266
|
+
i()
|
263
267
|
], t.prototype, "trailing", 2);
|
264
|
-
|
265
|
-
|
268
|
+
e([
|
269
|
+
i()
|
266
270
|
], t.prototype, "type", 2);
|
267
|
-
|
268
|
-
|
271
|
+
e([
|
272
|
+
i({ type: String, attribute: "validate-on" })
|
269
273
|
], t.prototype, "validateOn", 2);
|
270
|
-
|
271
|
-
|
274
|
+
e([
|
275
|
+
i({ reflect: !0 })
|
272
276
|
], t.prototype, "value", 2);
|
273
|
-
|
277
|
+
e([
|
274
278
|
c()
|
275
279
|
], t.prototype, "invalid", 2);
|
276
|
-
|
280
|
+
e([
|
277
281
|
c()
|
278
282
|
], t.prototype, "_buttonDown", 2);
|
279
|
-
|
280
|
-
|
283
|
+
e([
|
284
|
+
$("input")
|
281
285
|
], t.prototype, "$input", 2);
|
282
|
-
|
283
|
-
|
286
|
+
e([
|
287
|
+
g({ flatten: !0 })
|
284
288
|
], t.prototype, "_defaultSlot", 2);
|
289
|
+
e([
|
290
|
+
y("value", { waitUntilFirstUpdate: !0, afterUpdate: !0 })
|
291
|
+
], t.prototype, "valueChanged", 1);
|
285
292
|
export {
|
286
293
|
t as SkfInput
|
287
294
|
};
|
@@ -5,14 +5,14 @@ import u from "../../styles/component.styles.js";
|
|
5
5
|
import "lit";
|
6
6
|
import { property as r } from "lit/decorators.js";
|
7
7
|
import { classMap as k } from "lit/directives/class-map.js";
|
8
|
-
import { ifDefined as
|
8
|
+
import { ifDefined as c } from "lit/directives/if-defined.js";
|
9
9
|
import { html as f, literal as m } from "lit/static-html.js";
|
10
|
-
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (h, t, i,
|
11
|
-
for (var
|
12
|
-
(
|
13
|
-
return
|
14
|
-
};
|
15
|
-
const
|
10
|
+
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (h, t, i, l) => {
|
11
|
+
for (var n = l > 1 ? void 0 : l ? g(t, i) : t, p = h.length - 1, a; p >= 0; p--)
|
12
|
+
(a = h[p]) && (n = (l ? a(t, i, n) : a(n)) || n);
|
13
|
+
return l && n && v(t, i, n), n;
|
14
|
+
}, s;
|
15
|
+
const e = (s = class extends d {
|
16
16
|
constructor() {
|
17
17
|
super(...arguments), this.as = "a", this.color = "primary", this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
18
18
|
this.as === "a" && this.onClick && t.preventDefault(), t.stopPropagation(), this.emit("click");
|
@@ -21,8 +21,8 @@ const a = class a extends d {
|
|
21
21
|
set onClick(t) {
|
22
22
|
if (!t) return;
|
23
23
|
this._onClick = t;
|
24
|
-
const i = (
|
25
|
-
t(
|
24
|
+
const i = (l) => {
|
25
|
+
t(l, this.href ?? this.route);
|
26
26
|
};
|
27
27
|
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
28
28
|
}
|
@@ -48,36 +48,35 @@ const a = class a extends d {
|
|
48
48
|
inverse: "inverse"
|
49
49
|
});
|
50
50
|
return f`
|
51
|
-
<skf-icon color=${t[this.color]} name=${
|
51
|
+
<skf-icon color=${t[this.color]} name=${c(this.icon)} size="sm"></skf-icon>
|
52
52
|
`;
|
53
53
|
}
|
54
54
|
render() {
|
55
55
|
const t = this.as === "a", i = t ? m`a` : m`button`;
|
56
56
|
return f`
|
57
57
|
<${i}
|
58
|
-
?disabled=${
|
58
|
+
?disabled=${c(t ? void 0 : this.disabled)}
|
59
59
|
@click=${this._preprocessOnClick}
|
60
60
|
class=${k({
|
61
61
|
link: !0,
|
62
62
|
"link--color-inverse": this.color === "inverse",
|
63
63
|
"link--color-primary": this.color === "primary",
|
64
64
|
"link--icon-right": this.iconPlacement === "right",
|
65
|
-
"link--stretch": this.stretch
|
65
|
+
"link--stretch": this.stretch,
|
66
|
+
...s.classMap
|
66
67
|
})}
|
67
|
-
download=${
|
68
|
-
href=${
|
69
|
-
rel=${
|
70
|
-
target=${
|
71
|
-
type=${
|
68
|
+
download=${c(t ? this.download : void 0)}
|
69
|
+
href=${c(t ? this.href : void 0)}
|
70
|
+
rel=${c(t ? this.rel : void 0)}
|
71
|
+
target=${c(t ? this.target : void 0)}
|
72
|
+
type=${c(t ? void 0 : this.type)}
|
72
73
|
>
|
73
74
|
${this.icon && this._renderIcon()}
|
74
75
|
<slot>Default link text</slot>
|
75
76
|
</${i}>
|
76
77
|
`;
|
77
78
|
}
|
78
|
-
};
|
79
|
-
a.styles = [u, y];
|
80
|
-
let e = a;
|
79
|
+
}, s.styles = [u, y], s.classMap = {}, s);
|
81
80
|
o([
|
82
81
|
r({ type: String, reflect: !0 })
|
83
82
|
], e.prototype, "as", 2);
|
@@ -117,6 +116,7 @@ o([
|
|
117
116
|
o([
|
118
117
|
r({ attribute: !1 })
|
119
118
|
], e.prototype, "onClick", 1);
|
119
|
+
let E = e;
|
120
120
|
export {
|
121
|
-
|
121
|
+
E as SkfLink
|
122
122
|
};
|
@@ -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-menu>` 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 menu
|
9
|
+
* @property {boolean} [isOpen=false] - Whether the menu is open
|
10
|
+
* @property {string} [anchor] - The id of the element the menu will be anchored to
|
11
|
+
*
|
12
|
+
* @event open - Fired when the menu is opened
|
13
|
+
* @event close - Fired when the menu is closed
|
14
|
+
*
|
15
|
+
* @slot - The menu popover content
|
16
|
+
*
|
17
|
+
* @tagname skf-menu
|
18
|
+
*/
|
19
|
+
export declare class SkfMenu 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 { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
+
import { styles as o } from "./menu.styles.js";
|
3
|
+
const s = class s extends t {
|
4
|
+
constructor() {
|
5
|
+
super(), this.placement = "bottom-start", t.classMap = { menu: !0 };
|
6
|
+
}
|
7
|
+
addEventListeners(e) {
|
8
|
+
e.addEventListener("mouseenter", this.open);
|
9
|
+
}
|
10
|
+
removeEventListeners(e) {
|
11
|
+
e.removeEventListener("mouseenter", this.open);
|
12
|
+
}
|
13
|
+
};
|
14
|
+
s.styles = [t.styles, o];
|
15
|
+
let r = s;
|
16
|
+
export {
|
17
|
+
r as SkfMenu
|
18
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|