@skf-design-system/ui-components 1.0.1-beta.0 → 1.0.2-beta.0
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 +1 -18
- package/dist/components/accordion/accordion.component.d.ts +4 -4
- package/dist/components/accordion/accordion.component.js +8 -8
- package/dist/components/alert/alert.component.d.ts +8 -9
- package/dist/components/alert/alert.component.js +14 -14
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +1 -1
- package/dist/components/button/button.component.d.ts +3 -3
- package/dist/components/button/button.component.js +59 -55
- package/dist/components/card/card.component.js +18 -30
- package/dist/components/card/card.styles.js +25 -28
- package/dist/components/checkbox/checkbox.component.d.ts +9 -7
- package/dist/components/checkbox/checkbox.component.js +71 -58
- package/dist/components/collapse/collapse.component.js +1 -1
- package/dist/components/date-picker/datepicker.calendar.component.d.ts +77 -0
- package/dist/components/date-picker/datepicker.calendar.component.js +415 -0
- package/dist/components/date-picker/datepicker.calendar.styles.d.ts +1 -0
- package/dist/components/date-picker/datepicker.calendar.styles.js +202 -0
- package/dist/components/date-picker/datepicker.component.d.ts +79 -0
- package/dist/components/date-picker/datepicker.component.js +261 -0
- package/dist/components/date-picker/datepicker.d.ts +10 -0
- package/dist/components/date-picker/datepicker.helpers.d.ts +41 -0
- package/dist/components/date-picker/datepicker.helpers.js +76 -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 +87 -0
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +115 -0
- package/dist/components/date-picker-input/datepicker-input.component.js +441 -0
- package/dist/components/date-picker-input/datepicker-input.d.ts +8 -0
- package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +38 -0
- package/dist/components/date-picker-input/datepicker-input.helpers.js +31 -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 +18 -0
- package/dist/components/dialog/dialog.component.d.ts +18 -28
- package/dist/components/dialog/dialog.component.js +94 -84
- package/dist/components/divider/divider.component.d.ts +4 -8
- package/dist/components/divider/divider.component.js +24 -46
- package/dist/components/divider/divider.styles.js +34 -30
- package/dist/components/drawer/drawer.component.d.ts +57 -0
- package/dist/components/drawer/drawer.component.js +124 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +6 -0
- package/dist/components/drawer/drawer.styles.d.ts +1 -0
- package/dist/components/drawer/drawer.styles.js +71 -0
- package/dist/components/header/header.component.d.ts +45 -0
- package/dist/components/header/header.component.js +110 -0
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/header.js +6 -0
- package/dist/components/header/header.styles.d.ts +1 -0
- package/dist/components/header/header.styles.js +68 -0
- package/dist/components/heading/heading.component.d.ts +6 -12
- package/dist/components/heading/heading.component.js +17 -17
- package/dist/components/heading/heading.styles.d.ts +1 -2
- package/dist/components/heading/heading.styles.js +1 -1
- package/dist/components/icon/icon.component.d.ts +1 -1
- package/dist/components/icon/icon.component.js +19 -19
- package/dist/components/input/input.component.d.ts +3 -2
- package/dist/components/input/input.component.js +89 -82
- package/dist/components/input/input.controllers.d.ts +20 -6
- package/dist/components/input/input.controllers.js +14 -10
- package/dist/components/link/link.component.js +29 -28
- package/dist/components/link/link.styles.js +24 -20
- package/dist/components/loader/loader.component.js +19 -19
- package/dist/components/logo/logo.component.js +6 -6
- package/dist/components/menu/menu.component.d.ts +4 -5
- package/dist/components/menu/menu.component.js +1 -1
- package/dist/components/nav/nav.component.d.ts +17 -0
- package/dist/components/nav/nav.component.js +34 -0
- package/dist/components/nav/nav.d.ts +8 -0
- package/dist/components/nav/nav.js +6 -0
- package/dist/components/nav/nav.styles.d.ts +1 -0
- package/dist/components/nav/nav.styles.js +17 -0
- package/dist/components/nav-item/nav-item.component.d.ts +20 -0
- package/dist/components/nav-item/nav-item.component.js +38 -0
- package/dist/components/nav-item/nav-item.d.ts +8 -0
- package/dist/components/nav-item/nav-item.js +6 -0
- package/dist/components/nav-item/nav-item.styles.d.ts +1 -0
- package/dist/components/nav-item/nav-item.styles.js +39 -0
- package/dist/components/popover/popover.component.d.ts +5 -6
- package/dist/components/popover/popover.component.js +24 -24
- package/dist/components/progress/progress.component.js +7 -7
- package/dist/components/radio/radio.component.d.ts +10 -6
- package/dist/components/radio/radio.component.js +14 -14
- package/dist/components/radio/radio.styles.d.ts +1 -2
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button.component.d.ts +32 -0
- package/dist/components/segmented-button/segmented-button.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
- package/dist/components/segmented-button-item/segmented-button-item.component.d.ts +36 -0
- package/dist/components/segmented-button-item/segmented-button-item.d.ts +8 -0
- package/dist/components/segmented-button-item/segmented-button-item.styles.d.ts +1 -0
- package/dist/components/select/select.component.js +2 -2
- package/dist/components/select/select.controllers.d.ts +20 -9
- package/dist/components/select/select.controllers.js +27 -22
- package/dist/components/select-option/select-option.controllers.d.ts +11 -5
- package/dist/components/select-option-group/select-option-group.component.js +9 -9
- package/dist/components/stepper/stepper.component.d.ts +2 -1
- package/dist/components/stepper/stepper.component.js +9 -9
- package/dist/components/stepper/stepper.helpers.js +5 -5
- package/dist/components/stepper-item/stepper-item.component.js +25 -25
- package/dist/components/switch/switch.component.d.ts +7 -6
- package/dist/components/switch/switch.component.js +7 -7
- package/dist/components/tab/tab.component.js +4 -4
- package/dist/components/tab-panel/tab-panel.component.js +12 -12
- package/dist/components/tag/tag.component.d.ts +4 -2
- package/dist/components/tag/tag.component.js +14 -14
- package/dist/components/textarea/textarea.component.js +10 -10
- package/dist/components/toast/toast.component.d.ts +1 -1
- package/dist/components/toast/toast.component.js +13 -13
- package/dist/components/toast-wrapper/toast-wrapper.component.js +10 -10
- package/dist/components/tooltip/tooltip.component.d.ts +5 -6
- package/dist/components/tooltip/tooltip.component.js +11 -11
- package/dist/custom-elements.json +3702 -2190
- package/dist/index.d.ts +6 -0
- package/dist/index.js +84 -66
- package/dist/internal/base-classes/popover/popover.base.d.ts +17 -7
- package/dist/internal/base-classes/popover/popover.base.js +119 -75
- package/dist/internal/base-classes/popover/popover.styles.js +14 -1
- package/dist/internal/components/hint/hint.component.js +13 -13
- package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
- package/dist/internal/controllers/popover.controller.d.ts +12 -6
- package/dist/internal/controllers/popover.controller.js +9 -14
- package/dist/internal/helpers/dateFormatter.d.ts +2 -0
- package/dist/internal/helpers/utilityTypes.d.ts +22 -0
- package/dist/internal/helpers/uuid.d.ts +15 -0
- package/dist/internal/helpers/uuid.js +14 -0
- package/dist/internal/storybook/styles.d.ts +1 -0
- package/dist/styles/form-field.styles.js +11 -6
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +663 -1240
- package/dist/types/vue/index.d.ts +453 -255
- package/dist/vscode.html-custom-data.json +821 -503
- package/dist/web-types.json +1005 -633
- package/package.json +43 -52
- package/dist/react/index.d.ts +0 -35
- package/dist/react/index.js +0 -35
- package/dist/react/skf-accordion/index.d.ts +0 -3
- package/dist/react/skf-accordion/index.js +0 -13
- package/dist/react/skf-alert/index.d.ts +0 -9
- package/dist/react/skf-alert/index.js +0 -17
- package/dist/react/skf-breadcrumb/index.d.ts +0 -9
- package/dist/react/skf-breadcrumb/index.js +0 -17
- package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
- package/dist/react/skf-breadcrumb-item/index.js +0 -13
- package/dist/react/skf-button/index.d.ts +0 -9
- package/dist/react/skf-button/index.js +0 -17
- package/dist/react/skf-card/index.d.ts +0 -3
- package/dist/react/skf-card/index.js +0 -13
- package/dist/react/skf-checkbox/index.d.ts +0 -9
- package/dist/react/skf-checkbox/index.js +0 -17
- package/dist/react/skf-collapse/index.d.ts +0 -9
- package/dist/react/skf-collapse/index.js +0 -17
- package/dist/react/skf-dialog/index.d.ts +0 -15
- package/dist/react/skf-dialog/index.js +0 -19
- package/dist/react/skf-divider/index.d.ts +0 -3
- package/dist/react/skf-divider/index.js +0 -13
- package/dist/react/skf-heading/index.d.ts +0 -3
- package/dist/react/skf-heading/index.js +0 -13
- package/dist/react/skf-icon/index.d.ts +0 -3
- package/dist/react/skf-icon/index.js +0 -13
- package/dist/react/skf-input/index.d.ts +0 -12
- package/dist/react/skf-input/index.js +0 -18
- package/dist/react/skf-link/index.d.ts +0 -3
- package/dist/react/skf-link/index.js +0 -13
- package/dist/react/skf-loader/index.d.ts +0 -3
- package/dist/react/skf-loader/index.js +0 -13
- package/dist/react/skf-logo/index.d.ts +0 -3
- package/dist/react/skf-logo/index.js +0 -13
- package/dist/react/skf-menu/index.d.ts +0 -12
- package/dist/react/skf-menu/index.js +0 -18
- package/dist/react/skf-menu-item/index.d.ts +0 -27
- package/dist/react/skf-menu-item/index.js +0 -23
- package/dist/react/skf-popover/index.d.ts +0 -12
- package/dist/react/skf-popover/index.js +0 -18
- package/dist/react/skf-progress/index.d.ts +0 -3
- package/dist/react/skf-progress/index.js +0 -13
- package/dist/react/skf-radio/index.d.ts +0 -9
- package/dist/react/skf-radio/index.js +0 -17
- package/dist/react/skf-select/index.d.ts +0 -21
- package/dist/react/skf-select/index.js +0 -21
- package/dist/react/skf-select-option/index.d.ts +0 -9
- package/dist/react/skf-select-option/index.js +0 -17
- package/dist/react/skf-select-option-group/index.d.ts +0 -3
- package/dist/react/skf-select-option-group/index.js +0 -13
- package/dist/react/skf-stepper/index.d.ts +0 -9
- package/dist/react/skf-stepper/index.js +0 -17
- package/dist/react/skf-stepper-item/index.d.ts +0 -9
- package/dist/react/skf-stepper-item/index.js +0 -17
- package/dist/react/skf-switch/index.d.ts +0 -3
- package/dist/react/skf-switch/index.js +0 -13
- package/dist/react/skf-tab/index.d.ts +0 -12
- package/dist/react/skf-tab/index.js +0 -18
- package/dist/react/skf-tab-group/index.d.ts +0 -3
- package/dist/react/skf-tab-group/index.js +0 -13
- package/dist/react/skf-tab-panel/index.d.ts +0 -3
- package/dist/react/skf-tab-panel/index.js +0 -13
- package/dist/react/skf-tag/index.d.ts +0 -3
- package/dist/react/skf-tag/index.js +0 -13
- package/dist/react/skf-textarea/index.d.ts +0 -12
- package/dist/react/skf-textarea/index.js +0 -18
- package/dist/react/skf-toast/index.d.ts +0 -3
- package/dist/react/skf-toast/index.js +0 -13
- package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
- package/dist/react/skf-toast-wrapper/index.js +0 -13
- package/dist/react/skf-tooltip/index.d.ts +0 -12
- package/dist/react/skf-tooltip/index.js +0 -18
@@ -3,8 +3,8 @@ import { FormBase as m } from "../../internal/components/formBase.js";
|
|
3
3
|
import "../../internal/components/hint/hint.js";
|
4
4
|
import { Asterisk as c } from "../../internal/templates/asterisk.js";
|
5
5
|
import y from "../../styles/component.styles.js";
|
6
|
-
import {
|
7
|
-
import { property as r, state as
|
6
|
+
import { nothing as p, html as v } from "lit";
|
7
|
+
import { property as r, state as b, query as f } from "lit/decorators.js";
|
8
8
|
import { ifDefined as n } from "lit/directives/if-defined.js";
|
9
9
|
import g from "./textarea.styles.js";
|
10
10
|
var $ = Object.defineProperty, E = Object.getOwnPropertyDescriptor, e = (h, t, s, a) => {
|
@@ -22,7 +22,7 @@ const u = class u extends m {
|
|
22
22
|
};
|
23
23
|
}
|
24
24
|
set customInvalid(t) {
|
25
|
-
this.customError = t
|
25
|
+
this.customError = t ?? "";
|
26
26
|
}
|
27
27
|
get customInvalid() {
|
28
28
|
return this.customError;
|
@@ -77,7 +77,7 @@ const u = class u extends m {
|
|
77
77
|
}
|
78
78
|
render() {
|
79
79
|
var t, s;
|
80
|
-
return
|
80
|
+
return v`
|
81
81
|
<div id="root">
|
82
82
|
<label>
|
83
83
|
<div class=${this.hideLabel ? "visually-hidden" : ""} id="label">
|
@@ -90,8 +90,8 @@ const u = class u extends m {
|
|
90
90
|
?required=${this.required}
|
91
91
|
.value=${this.value}
|
92
92
|
@input=${this._handleInput}
|
93
|
-
aria-describedby=${n((t = this.hint) != null && t.trim() ? "hint" :
|
94
|
-
aria-errormessage=${n((s = this.hint) != null && s.trim() ? "hint" :
|
93
|
+
aria-describedby=${n((t = this.hint) != null && t.trim() ? "hint" : p)}
|
94
|
+
aria-errormessage=${n((s = this.hint) != null && s.trim() ? "hint" : p)}
|
95
95
|
aria-invalid=${!!this.invalid}
|
96
96
|
cols=${n(this.cols)}
|
97
97
|
maxlength=${n(this.maxLength)}
|
@@ -103,13 +103,13 @@ const u = class u extends m {
|
|
103
103
|
</textarea>
|
104
104
|
</div>
|
105
105
|
</label>
|
106
|
-
${this.hint &&
|
106
|
+
${this.hint && v`
|
107
107
|
<skf-hint
|
108
108
|
aria-live=${this.invalid ? "assertive" : "polite"}
|
109
109
|
id="hint"
|
110
110
|
severity=${n(_(this.severity, this.invalid))}
|
111
111
|
>
|
112
|
-
${this.customInvalid
|
112
|
+
${this.customInvalid ?? this.hint}
|
113
113
|
</skf-hint>
|
114
114
|
`}
|
115
115
|
</div>
|
@@ -173,10 +173,10 @@ e([
|
|
173
173
|
r()
|
174
174
|
], i.prototype, "value", 2);
|
175
175
|
e([
|
176
|
-
|
176
|
+
b()
|
177
177
|
], i.prototype, "invalid", 2);
|
178
178
|
e([
|
179
|
-
|
179
|
+
f("textarea")
|
180
180
|
], i.prototype, "$input", 2);
|
181
181
|
function _(h, t) {
|
182
182
|
return t ? "error" : h;
|
@@ -8,7 +8,7 @@ import { type CSSResultGroup } from 'lit';
|
|
8
8
|
* Once the queue in the singleton is empty, the SkfToastWrapper will be removed from the DOM.
|
9
9
|
*/
|
10
10
|
/**
|
11
|
-
* A simple toast component that displays a message to the user.
|
11
|
+
* A simple toast component that displays a message to the user. Invoke a toast message by appending a <skf-toast> tag to the DOM. Position in DOM is irrelevant. A transient toast will disappear after a set amount of time. Once toast is dismissed it will be removed from the DOM.
|
12
12
|
*
|
13
13
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/98e432-toast) for design principles
|
14
14
|
*
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import { Singleton as
|
2
|
-
import { SkfElement as
|
3
|
-
import { html as
|
1
|
+
import { Singleton as l } from "./toast.singleton.js";
|
2
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
3
|
+
import { html as f } from "lit";
|
4
4
|
import { property as s, queryAssignedNodes as y } from "lit/decorators.js";
|
5
|
-
import { styles as
|
6
|
-
var
|
7
|
-
for (var i = void 0,
|
8
|
-
(m = n[
|
9
|
-
return i &&
|
5
|
+
import { styles as a } from "./toast.styles.js";
|
6
|
+
var u = Object.defineProperty, e = (n, o, h, g) => {
|
7
|
+
for (var i = void 0, r = n.length - 1, m; r >= 0; r--)
|
8
|
+
(m = n[r]) && (i = m(o, h, i) || i);
|
9
|
+
return i && u(o, h, i), i;
|
10
10
|
};
|
11
|
-
const p = class p extends
|
11
|
+
const p = class p extends d {
|
12
12
|
constructor() {
|
13
13
|
super(), this.debug = !1, this.persistent = !1, this.severity = "info", this.timer = 5, this._singleton = void 0;
|
14
14
|
}
|
15
15
|
firstUpdated() {
|
16
|
-
this._singleton = new
|
16
|
+
this._singleton = new l(this.getRootNode()), this._singleton.addData({
|
17
17
|
debug: this.debug,
|
18
18
|
icon: this.icon,
|
19
19
|
originEl: this,
|
20
20
|
persistent: this.persistent,
|
21
21
|
severity: this.severity,
|
22
|
-
text: this._slottedText.map((
|
22
|
+
text: this._slottedText.map((o) => o.textContent).join(),
|
23
23
|
timer: this.timer = this.timer && this.timer < 5 ? 5 : this.timer,
|
24
24
|
topOffset: this.topOffset
|
25
25
|
});
|
26
26
|
}
|
27
27
|
render() {
|
28
|
-
return
|
28
|
+
return f`<slot></slot>`;
|
29
29
|
}
|
30
30
|
};
|
31
|
-
p.styles = [
|
31
|
+
p.styles = [a];
|
32
32
|
let t = p;
|
33
33
|
e([
|
34
34
|
s({ type: Boolean })
|
@@ -3,12 +3,12 @@ import d from "../../styles/component.styles.js";
|
|
3
3
|
import { html as m } from "lit";
|
4
4
|
import { property as p, queryAssignedElements as a } from "lit/decorators.js";
|
5
5
|
import { styles as u } from "./toast-wrapper.styles.js";
|
6
|
-
var y = Object.defineProperty,
|
7
|
-
for (var t = void 0,
|
8
|
-
(f = l[
|
9
|
-
return t && y(
|
6
|
+
var y = Object.defineProperty, r = (l, i, n, g) => {
|
7
|
+
for (var t = void 0, o = l.length - 1, f; o >= 0; o--)
|
8
|
+
(f = l[o]) && (t = f(i, n, t) || t);
|
9
|
+
return t && y(i, n, t), t;
|
10
10
|
};
|
11
|
-
const
|
11
|
+
const s = class s extends h {
|
12
12
|
constructor() {
|
13
13
|
super(...arguments), this.debug = !1, this._handleSlotChange = () => {
|
14
14
|
this._slottedChildren.length === 0 && this.remove();
|
@@ -21,15 +21,15 @@ const o = class o extends h {
|
|
21
21
|
return m`<slot @slotchange=${this._handleSlotChange}></slot>`;
|
22
22
|
}
|
23
23
|
};
|
24
|
-
|
25
|
-
let e =
|
26
|
-
|
24
|
+
s.styles = [d, u];
|
25
|
+
let e = s;
|
26
|
+
r([
|
27
27
|
p({ type: Boolean, reflect: !0 })
|
28
28
|
], e.prototype, "debug");
|
29
|
-
|
29
|
+
r([
|
30
30
|
a()
|
31
31
|
], e.prototype, "_slottedChildren");
|
32
|
-
|
32
|
+
r([
|
33
33
|
p({ type: Number, reflect: !0 })
|
34
34
|
], e.prototype, "topOffset");
|
35
35
|
export {
|
@@ -1,16 +1,15 @@
|
|
1
1
|
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
|
-
* The `<skf-tooltip>` is a component that displays a
|
4
|
+
* The `<skf-tooltip>` is a component that displays a tooltip.
|
5
5
|
*
|
6
6
|
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
7
|
*
|
8
|
-
* @
|
9
|
-
* @
|
10
|
-
* @property {string} [anchor] - The id of the element the dropdown will be anchored to
|
8
|
+
* @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 dropdown
|
9
|
+
* @attribute {string} [anchor] - The id of the element the dropdown will be anchored to
|
11
10
|
*
|
12
|
-
* @event
|
13
|
-
* @event
|
11
|
+
* @event skf-opened - Fired when the dropdown is opened
|
12
|
+
* @event skf-closed - Fired when the dropdown is closed
|
14
13
|
*
|
15
14
|
* @slot - The tooltip popover content
|
16
15
|
*
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { styles as
|
2
|
-
import { SkfPopoverBase as
|
3
|
-
const t = class t extends
|
1
|
+
import { styles as n } from "./tooltip.styles.js";
|
2
|
+
import { SkfPopoverBase as e } from "../../internal/base-classes/popover/popover.base.js";
|
3
|
+
const t = class t extends e {
|
4
4
|
constructor() {
|
5
|
-
super(), this.arrow = !0, this.offset = 8, this.placement = "top",
|
5
|
+
super(), this.arrow = !0, this.offset = 8, this.placement = "top", e.classMap = { tooltip: !0 };
|
6
6
|
}
|
7
|
-
addEventListeners(
|
8
|
-
|
7
|
+
addEventListeners(s) {
|
8
|
+
s.addEventListener("blur", this.close, { signal: this.signal }), s.addEventListener("focus", this.open, { signal: this.signal }), s.addEventListener("mouseenter", this.open, { signal: this.signal }), s.addEventListener("mouseleave", this.close, { signal: this.signal });
|
9
9
|
}
|
10
|
-
removeEventListeners(
|
11
|
-
|
10
|
+
removeEventListeners(s) {
|
11
|
+
s.addEventListener("blur", this.close), s.addEventListener("focus", this.open), s.removeEventListener("mouseenter", this.open), s.removeEventListener("mouseleave", this.close);
|
12
12
|
}
|
13
13
|
};
|
14
|
-
t.styles = [
|
15
|
-
let
|
14
|
+
t.styles = [e.styles, n];
|
15
|
+
let i = t;
|
16
16
|
export {
|
17
|
-
|
17
|
+
i as SkfTooltip
|
18
18
|
};
|