@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-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/README.md +12 -8
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +87 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +5 -9
- package/dist/components/accordion/accordion.component.js +4 -5
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/accordion/accordion.js +0 -2
- package/dist/components/alert/alert.component.d.ts +4 -7
- package/dist/components/alert/alert.component.js +8 -9
- package/dist/components/alert/alert.styles.js +0 -5
- package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +83 -76
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +1 -1
- package/dist/components/checkbox/checkbox.component.d.ts +8 -6
- package/dist/components/checkbox/checkbox.component.js +2 -2
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/date-picker/datepicker.calendar.component.js +1 -1
- package/dist/components/date-picker/datepicker.component.js +1 -1
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +1 -0
- package/dist/components/date-picker-input/datepicker-input.component.js +3 -2
- package/dist/components/dialog/dialog.component.d.ts +5 -4
- package/dist/components/dialog/dialog.component.js +44 -44
- package/dist/components/dialog/dialog.styles.js +4 -4
- package/dist/components/divider/divider.component.js +1 -1
- package/dist/components/drawer/drawer.component.d.ts +12 -8
- package/dist/components/drawer/drawer.component.js +5 -4
- package/dist/components/header/header.component.d.ts +3 -2
- package/dist/components/header/header.component.js +34 -28
- package/dist/components/heading/heading.component.d.ts +3 -5
- package/dist/components/heading/heading.component.js +22 -21
- package/dist/components/icon/icon.component.d.ts +11 -17
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +30 -31
- package/dist/components/input/input.component.js +136 -123
- package/dist/components/link/link.component.d.ts +12 -14
- package/dist/components/link/link.component.js +34 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +2 -2
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- package/dist/components/logo/logo.component.d.ts +4 -5
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
- package/dist/components/menu/menu.component.d.ts +9 -6
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/{nav-item → nav}/nav-item.component.d.ts +0 -2
- package/dist/components/{nav-item → nav}/nav-item.component.js +1 -1
- package/dist/components/nav/nav.component.js +1 -1
- package/dist/components/popover/popover.component.d.ts +10 -6
- package/dist/components/popover/popover.component.js +22 -24
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.styles.js +40 -35
- package/dist/components/radio/radio.component.d.ts +9 -7
- package/dist/components/radio/radio.component.js +2 -2
- package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
- package/dist/components/{select-option → select}/select-option.component.js +15 -15
- package/dist/components/select/select.component.d.ts +16 -15
- package/dist/components/select/select.component.js +17 -17
- package/dist/components/select/select.controllers.d.ts +1 -1
- package/dist/components/select/select.controllers.js +14 -11
- package/dist/components/select/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
- package/dist/components/stepper/stepper.component.d.ts +2 -2
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.js +15 -15
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tag/tag.component.d.ts +10 -14
- package/dist/components/tag/tag.component.js +32 -35
- package/dist/components/textarea/textarea.component.d.ts +10 -11
- package/dist/components/textarea/textarea.component.js +62 -64
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +5 -4
- package/dist/components/toast/toast.component.js +15 -15
- package/dist/components/toast/toast.singleton.d.ts +4 -4
- package/dist/components/toast/toast.singleton.js +12 -12
- package/dist/components/tooltip/tooltip.component.d.ts +2 -1
- package/dist/components/tooltip/tooltip.component.js +15 -10
- package/dist/custom-elements.json +733 -820
- package/dist/index.d.ts +13 -7
- package/dist/index.js +100 -84
- package/dist/internal/base-classes/popover/popover.base.d.ts +10 -5
- package/dist/internal/base-classes/popover/popover.base.js +77 -60
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +2 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +162 -180
- package/dist/types/vue/index.d.ts +162 -180
- package/dist/vscode.html-custom-data.json +133 -1091
- package/dist/web-types.json +368 -424
- package/package.json +24 -25
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -86
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/internal/constants/heading.d.ts +0 -2
- /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
- /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
- /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{nav-item → nav}/nav-item.styles.js +0 -0
- /package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
- /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
- /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,18 +1,23 @@
|
|
1
|
-
import type { SkfIcon } from '../icon/icon.component.js';
|
2
1
|
import '../icon/icon.js';
|
3
2
|
import '../loader/loader.js';
|
4
3
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
4
|
+
import type { Icon } from '../../internal/types.js';
|
5
5
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
6
|
+
type SkfButtonType = HTMLButtonElement['type'];
|
6
7
|
/**
|
7
8
|
* Component to be used in forms or for interactivity
|
8
9
|
*
|
10
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/02493d-buttons) for design principles
|
11
|
+
*
|
9
12
|
* @slot - The Primary content
|
10
13
|
*
|
11
|
-
* @event click - Fires when the button is clicked
|
14
|
+
* @event {CustomEvent} click - Fires when the button is clicked
|
12
15
|
*
|
13
16
|
* @tagname skf-button
|
14
17
|
*/
|
15
18
|
export declare class SkfButton extends SkfElement {
|
19
|
+
#private;
|
20
|
+
static styles: CSSResultGroup;
|
16
21
|
static formAssociated: boolean;
|
17
22
|
static shadowRootOptions: {
|
18
23
|
delegatesFocus: boolean;
|
@@ -20,18 +25,15 @@ export declare class SkfButton extends SkfElement {
|
|
20
25
|
serializable?: boolean;
|
21
26
|
slotAssignment?: SlotAssignmentMode;
|
22
27
|
};
|
23
|
-
static styles: CSSResultGroup;
|
24
28
|
/** @internal */
|
25
29
|
private _transitionOptions;
|
26
|
-
_internals: ElementInternals;
|
27
30
|
/** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
|
28
31
|
destructive: boolean;
|
29
32
|
/** If true, removes border */
|
30
33
|
disabled: boolean;
|
31
34
|
/** If provided, renders an icon before or after the text */
|
32
|
-
|
33
|
-
|
34
|
-
/** If true, removes border */
|
35
|
+
icon?: Icon;
|
36
|
+
/** If true, button will take a square shape */
|
35
37
|
iconOnly: boolean;
|
36
38
|
/** Determines the positioning of the icon in relation to the text */
|
37
39
|
iconPosition: 'left' | 'right';
|
@@ -39,10 +41,9 @@ export declare class SkfButton extends SkfElement {
|
|
39
41
|
loading: boolean;
|
40
42
|
noValidate: boolean;
|
41
43
|
/** If provided, displays an alternative size */
|
42
|
-
size
|
44
|
+
size?: 'sm' | 'md' | 'lg';
|
43
45
|
/** If provided, changes the button type */
|
44
|
-
|
45
|
-
type: HTMLButtonElement['type'];
|
46
|
+
type: SkfButtonType;
|
46
47
|
/** If provided, alters the appearance */
|
47
48
|
variant: 'primary' | 'secondary' | 'tertiary';
|
48
49
|
/** @internal */
|
@@ -55,6 +56,7 @@ export declare class SkfButton extends SkfElement {
|
|
55
56
|
private $button?;
|
56
57
|
constructor();
|
57
58
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
59
|
+
/** @internal */
|
58
60
|
_handleLoadingChange(): void;
|
59
61
|
/** @internal */
|
60
62
|
_handleClick: (e: MouseEvent) => void;
|
@@ -72,3 +74,4 @@ export declare class SkfButton extends SkfElement {
|
|
72
74
|
private _renderIcon;
|
73
75
|
render(): import("lit").TemplateResult<1>;
|
74
76
|
}
|
77
|
+
export {};
|
@@ -1,33 +1,40 @@
|
|
1
|
+
var u = (i) => {
|
2
|
+
throw TypeError(i);
|
3
|
+
};
|
4
|
+
var _ = (i, s, t) => s.has(i) || u("Cannot " + t);
|
5
|
+
var p = (i, s, t) => (_(i, s, "read from private field"), t ? t.call(i) : s.get(i)), v = (i, s, t) => s.has(i) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), $ = (i, s, t, a) => (_(i, s, "write to private field"), a ? a.call(i, t) : s.set(i, t), t);
|
1
6
|
import "../icon/icon.js";
|
2
7
|
import "../loader/loader.js";
|
3
|
-
import { SkfElement as
|
4
|
-
import { watch as
|
5
|
-
import
|
6
|
-
import { html as
|
7
|
-
import { property as
|
8
|
-
import { classMap as
|
9
|
-
import { ifDefined as
|
10
|
-
import
|
11
|
-
var
|
12
|
-
for (var
|
13
|
-
(
|
14
|
-
return
|
15
|
-
};
|
16
|
-
const
|
8
|
+
import { SkfElement as O } from "../../internal/components/skf-element.js";
|
9
|
+
import { watch as V } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as w } from "../../styles/component.styles.js";
|
11
|
+
import { html as y, LitElement as z, nothing as b } from "lit";
|
12
|
+
import { property as r, state as P, query as m } from "lit/decorators.js";
|
13
|
+
import { classMap as L } from "lit/directives/class-map.js";
|
14
|
+
import { ifDefined as g } from "lit/directives/if-defined.js";
|
15
|
+
import { styles as C } from "./button.styles.js";
|
16
|
+
var F = Object.defineProperty, k = Object.getOwnPropertyDescriptor, o = (i, s, t, a) => {
|
17
|
+
for (var n = a > 1 ? void 0 : a ? k(s, t) : s, h = i.length - 1, d; h >= 0; h--)
|
18
|
+
(d = i[h]) && (n = (a ? d(s, t, n) : d(n)) || n);
|
19
|
+
return a && n && F(s, t, n), n;
|
20
|
+
}, l;
|
21
|
+
const c = class c extends O {
|
17
22
|
constructor() {
|
18
|
-
super()
|
23
|
+
super();
|
24
|
+
v(this, l);
|
25
|
+
this._transitionOptions = {
|
19
26
|
duration: 200,
|
20
27
|
fill: "forwards"
|
21
28
|
}, this.destructive = !1, this.disabled = !1, this.iconOnly = !1, this.iconPosition = "left", this.loading = !1, this.noValidate = !1, this.size = "md", this.type = "button", this.variant = "primary", this._loaderVisible = !1, this._handleClick = (t) => {
|
22
29
|
t.preventDefault(), t.stopPropagation(), !(this.disabled || this.loading) && (this.dispatchEvent(new CustomEvent("click", { bubbles: !0, composed: !0, detail: t })), this.type === "submit" && this._submitForm(), this.type === "reset" && this._resetForm());
|
23
30
|
}, this._submitForm = () => {
|
24
|
-
var
|
25
|
-
const t = !((
|
26
|
-
(
|
31
|
+
var h, d, f;
|
32
|
+
const t = !((h = p(this, l).form) != null && h.reportValidity()), a = !this.noValidate, n = !((d = p(this, l).form) != null && d.hasAttribute("no-validate"));
|
33
|
+
(a || n) && t || (f = p(this, l).form) == null || f.requestSubmit();
|
27
34
|
}, this._resetForm = () => {
|
28
35
|
var t;
|
29
|
-
(t = this.
|
30
|
-
}, this._renderIcon = () =>
|
36
|
+
(t = p(this, l).form) == null || t.reset();
|
37
|
+
}, this._renderIcon = () => y`<skf-icon class="skf-icon-host" name=${g(this.icon)}></skf-icon>`, $(this, l, this.attachInternals());
|
31
38
|
}
|
32
39
|
firstUpdated(t) {
|
33
40
|
if (t.has("loading") && this.loading) {
|
@@ -53,11 +60,12 @@ const h = class h extends m {
|
|
53
60
|
!this.$body || !this.$loader || (await this.$loader.animate({ opacity: 0 }, this._transitionOptions).finished, this._loaderVisible = !1, this.$body.animate({ opacity: 1 }, this._transitionOptions));
|
54
61
|
}
|
55
62
|
render() {
|
56
|
-
return
|
63
|
+
return y`
|
57
64
|
<button
|
58
65
|
?disabled=${this.disabled || this.loading}
|
66
|
+
@click=${this._handleClick}
|
59
67
|
aria-busy=${this.loading}
|
60
|
-
class=${
|
68
|
+
class=${L({
|
61
69
|
btn: !0,
|
62
70
|
"btn--destructive": this.destructive,
|
63
71
|
"btn--icon-only": this.iconOnly,
|
@@ -68,68 +76,67 @@ const h = class h extends m {
|
|
68
76
|
"btn--variant-secondary": this.variant === "secondary",
|
69
77
|
"btn--variant-tertiary": this.variant === "tertiary"
|
70
78
|
})}
|
71
|
-
type=${
|
72
|
-
@click=${this._handleClick}
|
79
|
+
type=${g(this.type)}
|
73
80
|
title=${/* An empty title prevents browser validation tooltips from appearing on hover */
|
74
81
|
this.title}
|
75
82
|
>
|
76
|
-
${this.variant === "primary" && this._loaderVisible ?
|
83
|
+
${this.variant === "primary" && this._loaderVisible ? y`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
|
77
84
|
<div class="btn__body" id="body">
|
78
|
-
${this.icon && this.iconPosition === "left" ? this._renderIcon() :
|
79
|
-
${this.iconOnly ?
|
80
|
-
${this.icon && this.iconPosition === "right" ? this._renderIcon() :
|
85
|
+
${this.icon && this.iconPosition === "left" ? this._renderIcon() : b}
|
86
|
+
${this.iconOnly ? b : y`<slot class="btn__label"></slot>`}
|
87
|
+
${this.icon && this.iconPosition === "right" ? this._renderIcon() : b}
|
81
88
|
</div>
|
82
89
|
</button>
|
83
90
|
`;
|
84
91
|
}
|
85
92
|
};
|
86
|
-
|
87
|
-
let
|
88
|
-
|
89
|
-
|
90
|
-
],
|
91
|
-
|
92
|
-
|
93
|
-
],
|
94
|
-
|
95
|
-
|
96
|
-
],
|
97
|
-
|
98
|
-
|
99
|
-
],
|
100
|
-
|
101
|
-
|
102
|
-
],
|
103
|
-
|
104
|
-
|
105
|
-
],
|
106
|
-
|
107
|
-
|
108
|
-
],
|
109
|
-
|
110
|
-
|
111
|
-
],
|
112
|
-
|
113
|
-
|
114
|
-
],
|
115
|
-
|
116
|
-
|
117
|
-
],
|
118
|
-
|
119
|
-
|
120
|
-
],
|
121
|
-
|
122
|
-
|
123
|
-
],
|
124
|
-
|
125
|
-
|
126
|
-
],
|
127
|
-
|
128
|
-
|
129
|
-
],
|
130
|
-
|
131
|
-
|
132
|
-
],
|
93
|
+
l = new WeakMap(), c.styles = [w, C], c.formAssociated = !0, c.shadowRootOptions = { ...z.shadowRootOptions, delegatesFocus: !0 };
|
94
|
+
let e = c;
|
95
|
+
o([
|
96
|
+
r({ type: Boolean })
|
97
|
+
], e.prototype, "destructive", 2);
|
98
|
+
o([
|
99
|
+
r({ type: Boolean })
|
100
|
+
], e.prototype, "disabled", 2);
|
101
|
+
o([
|
102
|
+
r()
|
103
|
+
], e.prototype, "icon", 2);
|
104
|
+
o([
|
105
|
+
r({ type: Boolean, attribute: "icon-only" })
|
106
|
+
], e.prototype, "iconOnly", 2);
|
107
|
+
o([
|
108
|
+
r({ attribute: "icon-position" })
|
109
|
+
], e.prototype, "iconPosition", 2);
|
110
|
+
o([
|
111
|
+
r({ type: Boolean, reflect: !0 })
|
112
|
+
], e.prototype, "loading", 2);
|
113
|
+
o([
|
114
|
+
r({ type: Boolean, attribute: "no-validate" })
|
115
|
+
], e.prototype, "noValidate", 2);
|
116
|
+
o([
|
117
|
+
r({ reflect: !0 })
|
118
|
+
], e.prototype, "size", 2);
|
119
|
+
o([
|
120
|
+
r()
|
121
|
+
], e.prototype, "type", 2);
|
122
|
+
o([
|
123
|
+
r({ reflect: !0 })
|
124
|
+
], e.prototype, "variant", 2);
|
125
|
+
o([
|
126
|
+
P()
|
127
|
+
], e.prototype, "_loaderVisible", 2);
|
128
|
+
o([
|
129
|
+
m("skf-loader")
|
130
|
+
], e.prototype, "$loader", 2);
|
131
|
+
o([
|
132
|
+
m("#body")
|
133
|
+
], e.prototype, "$body", 2);
|
134
|
+
o([
|
135
|
+
m("button")
|
136
|
+
], e.prototype, "$button", 2);
|
137
|
+
o([
|
138
|
+
V("loading", { afterUpdate: !0 })
|
139
|
+
], e.prototype, "_handleLoadingChange", 1);
|
133
140
|
export {
|
134
|
-
|
141
|
+
e as SkfButton
|
135
142
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -3,7 +3,7 @@ import { type CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
4
4
|
* The `<skf-card>` can be used to group related subjects in a container
|
5
5
|
*
|
6
|
-
*
|
6
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/021eed-card) for design principles
|
7
7
|
*
|
8
8
|
* @slot - The card's main content
|
9
9
|
*
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
3
|
import { html as d } from "lit";
|
4
4
|
import { property as o } from "lit/decorators.js";
|
5
5
|
import { styles as u } from "./card.styles.js";
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import type { FormFieldSeverity } from '../../internal/types.js';
|
3
4
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
4
5
|
import { type CSSResultGroup } from 'lit';
|
5
6
|
/**
|
@@ -10,7 +11,7 @@ import { type CSSResultGroup } from 'lit';
|
|
10
11
|
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
11
12
|
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
12
13
|
*
|
13
|
-
* @event
|
14
|
+
* @event {Event} change - When the value of the input changes
|
14
15
|
*
|
15
16
|
* @slot - The Radios label. Alternatively, you can use the `label` attribute.
|
16
17
|
*
|
@@ -38,11 +39,8 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
38
39
|
name?: string;
|
39
40
|
/** If defined, renders an alternative A11y text for the asterisk */
|
40
41
|
requiredLabel?: string;
|
41
|
-
/**
|
42
|
-
|
43
|
-
* @type { "alert" | "success" | "info" | "warning" }
|
44
|
-
*/
|
45
|
-
severity?: FormFieldBaseProps['severity'];
|
42
|
+
/** If defined, styles checkbox using provided severity */
|
43
|
+
severity?: FormFieldSeverity;
|
46
44
|
/** If true, displays valid state after interaction */
|
47
45
|
showValid: boolean;
|
48
46
|
/** Size of the checkbox */
|
@@ -54,9 +52,13 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
54
52
|
private _invalid;
|
55
53
|
/** @internal */
|
56
54
|
private $input?;
|
55
|
+
/** @internal */
|
57
56
|
handleCheckedChange(): void;
|
57
|
+
/** @internal */
|
58
58
|
handleInvalidChange(): void;
|
59
|
+
/** @internal */
|
59
60
|
handleDebugInvalid(): void;
|
61
|
+
/** @internal */
|
60
62
|
handleCustomInvalidChange(): void;
|
61
63
|
protected firstUpdated(): void;
|
62
64
|
/** @internal */
|
@@ -2,11 +2,11 @@ import "../icon/icon.js";
|
|
2
2
|
import { FormBase as p } from "../../internal/components/formBase.js";
|
3
3
|
import { watch as h } from "../../internal/helpers/watch.js";
|
4
4
|
import { Asterisk as v } from "../../internal/templates/asterisk.js";
|
5
|
-
import m from "../../styles/component.styles.js";
|
5
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
6
6
|
import { html as c, nothing as f } from "lit";
|
7
7
|
import { property as r, state as y, query as g } from "lit/decorators.js";
|
8
8
|
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
9
|
-
import b from "./checkbox.styles.js";
|
9
|
+
import { styles as b } from "./checkbox.styles.js";
|
10
10
|
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s, a) => {
|
11
11
|
for (var l = a > 1 ? void 0 : a ? $(t, s) : t, n = u.length - 1, o; n >= 0; n--)
|
12
12
|
(o = u[n]) && (l = (a ? o(t, s, l) : o(l)) || l);
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult[];
|
@@ -65,10 +65,6 @@ const i = [
|
|
65
65
|
--_skf-checkbox-border-color: var(--skf-severity-fg-color-success);
|
66
66
|
}
|
67
67
|
|
68
|
-
:host([severity='alert']:not([invalid], [valid])) & {
|
69
|
-
--_skf-checkbox-border-color: var(--skf-severity-fg-color-alert);
|
70
|
-
}
|
71
|
-
|
72
68
|
:host([severity='info']:not([invalid], [valid])) & {
|
73
69
|
--_skf-checkbox-border-color: var(--skf-severity-fg-color-info);
|
74
70
|
}
|
@@ -110,5 +106,5 @@ const i = [
|
|
110
106
|
`
|
111
107
|
];
|
112
108
|
export {
|
113
|
-
i as
|
109
|
+
i as styles
|
114
110
|
};
|
@@ -3,7 +3,7 @@ import { compareDates as $ } from "./datepicker.helpers.js";
|
|
3
3
|
import { SkfElement as O } from "../../internal/components/skf-element.js";
|
4
4
|
import { watch as R } from "../../internal/helpers/watch.js";
|
5
5
|
import { Temporal as m } from "@js-temporal/polyfill";
|
6
|
-
import C from "../../styles/component.styles.js";
|
6
|
+
import { componentStyles as C } from "../../styles/component.styles.js";
|
7
7
|
import { html as p } from "lit";
|
8
8
|
import { property as g, state as M } from "lit/decorators.js";
|
9
9
|
import { repeat as w } from "lit/directives/repeat.js";
|
@@ -2,7 +2,7 @@ import "../button/button.js";
|
|
2
2
|
import { dateFormatter as l, is as v } from "../date-picker-input/datepicker-input.helpers.js";
|
3
3
|
import { SkfElement as R } from "../../internal/components/skf-element.js";
|
4
4
|
import { watch as p } from "../../internal/helpers/watch.js";
|
5
|
-
import S from "../../styles/component.styles.js";
|
5
|
+
import { componentStyles as S } from "../../styles/component.styles.js";
|
6
6
|
import { html as D } from "lit";
|
7
7
|
import { property as o, state as m } from "lit/decorators.js";
|
8
8
|
import "./datepicker.js";
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import '../../internal/components/hint/hint.js';
|
3
4
|
import { PopoverController } from '../../internal/controllers/popover.controller.js';
|
4
5
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
6
|
import { type CSSResultGroup } from 'lit';
|
@@ -2,12 +2,13 @@ import { dateFormatter as v, is as f, isPopoverOpen as S, debounce as E } from "
|
|
2
2
|
import "../icon/icon.js";
|
3
3
|
import { computePosition as C, flip as I, offset as O } from "@floating-ui/dom";
|
4
4
|
import { FormBase as M } from "../../internal/components/formBase.js";
|
5
|
+
import "../../internal/components/hint/hint.js";
|
5
6
|
import { PopoverController as P } from "../../internal/controllers/popover.controller.js";
|
6
7
|
import { hintSeverity as T } from "../../internal/helpers/hintSeverity.js";
|
7
8
|
import { watch as B } from "../../internal/helpers/watch.js";
|
8
9
|
import { Asterisk as x } from "../../internal/templates/asterisk.js";
|
9
10
|
import { Temporal as w } from "@js-temporal/polyfill";
|
10
|
-
import L from "../../styles/component.styles.js";
|
11
|
+
import { componentStyles as L } from "../../styles/component.styles.js";
|
11
12
|
import { nothing as g, html as y } from "lit";
|
12
13
|
import { property as h, state as $, query as b, queryAssignedNodes as R } from "lit/decorators.js";
|
13
14
|
import { ifDefined as p } from "lit/directives/if-defined.js";
|
@@ -332,7 +333,7 @@ const _ = class _ extends M {
|
|
332
333
|
<skf-hint
|
333
334
|
aria-live=${this.invalid ? "assertive" : "polite"}
|
334
335
|
id="hint"
|
335
|
-
severity=${p(T(this.
|
336
|
+
severity=${p(T(this.invalid, this.severity))}
|
336
337
|
>${this.customInvalid ?? this.hint}
|
337
338
|
</skf-hint>
|
338
339
|
`}
|
@@ -11,13 +11,13 @@ import { type CSSResultGroup } from 'lit';
|
|
11
11
|
* @slot - The dialog component's content
|
12
12
|
* @slot footer - The dialog component's buttons goes here
|
13
13
|
*
|
14
|
-
* @event skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
|
15
|
-
* @event skf-dialog-closing - Fires when the dialog is closed (before transitioned out)
|
16
|
-
* @event skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
|
17
|
-
*
|
18
14
|
* @cssproperty --skf-dialog-height - A custom height for the Dialog. Pass valid CSS **block-size** values
|
19
15
|
* @cssproperty --skf-dialog-width - A custom width for the Dialog Pass valid CSS **inline-size** values
|
20
16
|
*
|
17
|
+
* @event {CustomEvent} skf-dialog-opened - Fires when the dialog is opened (after transitioned in)
|
18
|
+
* @event {CustomEvent} skf-dialog-closing - Fires when the dialog is closing (before transitioned out)
|
19
|
+
* @event {CustomEvent} skf-dialog-closed - Fires when the dialog is closed (after transitioned out)
|
20
|
+
*
|
21
21
|
* @tagname skf-dialog
|
22
22
|
*/
|
23
23
|
export declare class SkfDialog extends SkfElement {
|
@@ -43,6 +43,7 @@ export declare class SkfDialog extends SkfElement {
|
|
43
43
|
$dialog?: HTMLDialogElement;
|
44
44
|
/** @internal */
|
45
45
|
footerEls?: HTMLElement[];
|
46
|
+
/** @internal */
|
46
47
|
handleOpenChange(): void;
|
47
48
|
protected firstUpdated(): void;
|
48
49
|
/** @internal */
|