@skf-design-system/ui-components 1.0.0-beta.5 → 1.0.1-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/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 +5 -5
- package/dist/components/alert/alert.component.js +46 -35
- package/dist/components/alert/alert.styles.d.ts +1 -2
- package/dist/components/alert/alert.styles.js +29 -24
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +8 -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/button/button.component.d.ts +29 -5
- package/dist/components/button/button.component.js +89 -52
- package/dist/components/button/button.styles.js +65 -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 +11 -12
- package/dist/components/checkbox/checkbox.component.js +96 -90
- 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 +74 -0
- package/dist/components/dialog/dialog.component.js +187 -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/heading/heading.component.js +13 -13
- package/dist/components/icon/icon.component.d.ts +2 -5
- package/dist/components/icon/icon.component.js +32 -23
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/input/input.component.d.ts +12 -11
- package/dist/components/input/input.component.js +88 -89
- package/dist/components/link/link.component.d.ts +7 -6
- package/dist/components/link/link.component.js +49 -43
- 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 +39 -32
- 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 +28 -17
- 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 +22 -0
- package/dist/components/progress/progress.component.js +49 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +6 -0
- package/dist/components/progress/progress.styles.d.ts +1 -0
- package/dist/components/progress/progress.styles.js +48 -0
- package/dist/components/radio/radio.component.d.ts +7 -9
- package/dist/components/radio/radio.component.js +95 -79
- package/dist/components/select/select.component.d.ts +10 -12
- package/dist/components/select/select.component.js +120 -120
- 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/select-option-group/select-option-group.component.js +9 -9
- 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 +17 -7
- package/dist/components/switch/switch.styles.js +16 -13
- package/dist/components/tab/tab.component.d.ts +29 -0
- package/dist/components/tab/tab.component.js +57 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tab.js +6 -0
- package/dist/components/tab/tab.styles.d.ts +1 -0
- package/dist/components/tab/tab.styles.js +123 -0
- package/dist/components/tab-group/tab-group.component.d.ts +43 -0
- package/dist/components/tab-group/tab-group.component.js +98 -0
- package/dist/components/tab-group/tab-group.d.ts +8 -0
- package/dist/components/tab-group/tab-group.js +6 -0
- package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
- package/dist/components/tab-group/tab-group.styles.js +75 -0
- package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
- package/dist/components/tab-panel/tab-panel.component.js +36 -0
- package/dist/components/tab-panel/tab-panel.d.ts +8 -0
- package/dist/components/tab-panel/tab-panel.js +6 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
- package/dist/components/tab-panel/tab-panel.styles.js +13 -0
- 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/textarea/textarea.component.js +2 -2
- package/dist/components/toast/toast.component.d.ts +8 -5
- package/dist/components/toast/toast.component.js +30 -26
- package/dist/components/toast/toast.singleton.d.ts +5 -10
- package/dist/components/toast/toast.singleton.js +25 -25
- package/dist/components/toast/toast.styles.d.ts +1 -0
- package/dist/components/toast-item/toast-item.component.d.ts +1 -1
- package/dist/components/toast-item/toast-item.component.js +15 -15
- package/dist/components/toast-item/toast-item.styles.js +18 -0
- package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
- package/dist/components/toast-wrapper/toast-wrapper.component.js +11 -11
- package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
- 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 +2465 -629
- package/dist/index.d.ts +11 -0
- package/dist/index.js +77 -44
- 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/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -11
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +13 -13
- 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/helpers/watch.d.ts +27 -0
- package/dist/internal/helpers/watch.js +28 -0
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +7 -6
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +13 -0
- 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-button/index.d.ts +7 -1
- package/dist/react/skf-button/index.js +5 -1
- 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-progress/index.d.ts +3 -0
- package/dist/react/skf-progress/index.js +13 -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-tab/index.d.ts +12 -0
- package/dist/react/skf-tab/index.js +18 -0
- package/dist/react/skf-tab-group/index.d.ts +3 -0
- package/dist/react/skf-tab-group/index.js +13 -0
- package/dist/react/skf-tab-panel/index.d.ts +3 -0
- package/dist/react/skf-tab-panel/index.js +13 -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 +603 -27
- package/dist/types/vue/index.d.ts +413 -11
- package/dist/vscode.html-custom-data.json +462 -36
- package/dist/web-types.json +944 -90
- package/package.json +43 -42
- package/dist/components/toast-item/toast-item.style.js +0 -16
- /package/dist/components/{toast/toast.style.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → breadcrumb-item/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
- /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
- /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
@@ -0,0 +1,187 @@
|
|
1
|
+
var _ = (o) => {
|
2
|
+
throw TypeError(o);
|
3
|
+
};
|
4
|
+
var w = (o, e, t) => e.has(o) || _("Cannot " + t);
|
5
|
+
var f = (o, e, t) => (w(o, e, "read from private field"), t ? t.call(o) : e.get(o)), g = (o, e, t) => e.has(o) ? _("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t), h = (o, e, t, a) => (w(o, e, "write to private field"), a ? a.call(o, t) : e.set(o, t), t);
|
6
|
+
import "../button/button.js";
|
7
|
+
import "../heading/heading.js";
|
8
|
+
import "../icon/icon.js";
|
9
|
+
import { SkfElement as v } from "../../internal/components/skf-element.js";
|
10
|
+
import { watch as C } from "../../internal/helpers/watch.js";
|
11
|
+
import B from "../../styles/component.styles.js";
|
12
|
+
import { html as b, nothing as k } from "lit";
|
13
|
+
import { property as c, state as m, query as P, queryAssignedElements as M } from "lit/decorators.js";
|
14
|
+
import { classMap as $ } from "lit/directives/class-map.js";
|
15
|
+
import { styles as O } from "./dialog.styles.js";
|
16
|
+
var A = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (o, e, t, a) => {
|
17
|
+
for (var n = a > 1 ? void 0 : a ? E(e, t) : e, l = o.length - 1, r; l >= 0; l--)
|
18
|
+
(r = o[l]) && (n = (a ? r(e, t, n) : r(n)) || n);
|
19
|
+
return a && n && A(e, t, n), n;
|
20
|
+
}, p, u, d;
|
21
|
+
const y = class y extends v {
|
22
|
+
constructor() {
|
23
|
+
super(...arguments);
|
24
|
+
g(this, p);
|
25
|
+
g(this, u);
|
26
|
+
g(this, d);
|
27
|
+
h(this, p, 0), h(this, u, 20), h(this, d, !1), this.fullscreen = !1, this.noCloseButton = !1, this.noPadding = !1, this.onClose = null, this.modal = !0, this.renderFoot = !1, this.show = async () => await this.showModal(), this._handleBackdropClick = (t) => {
|
28
|
+
this._isModal || t.target !== this.$dialog || this.close();
|
29
|
+
}, this._handleClose = (t) => {
|
30
|
+
console.log("Handle close reached"), this.onClose && this.onClose(t), this.close();
|
31
|
+
}, this.showModal = async () => await (async () => (console.log("%cmodal ->", "color: red", this.modal), this.$dialog.showModal(), await this._transition().entry(), this.emit("skf-dialog-open"), !0))(), this.close = async () => (console.log("close reached"), f(this, d) ? void 0 : (h(this, d, !0), await (async () => (this.emit("skf-dialog-close"), await this._transition().exit(), this.$dialog.close(), this.open = !1, h(this, d, !1), !0))()));
|
32
|
+
}
|
33
|
+
firstUpdated() {
|
34
|
+
this.$dialog.addEventListener("close", (t) => {
|
35
|
+
t.stopPropagation(), console.log("close event detected 1", t), this.emit("close");
|
36
|
+
});
|
37
|
+
}
|
38
|
+
handleOpenChange() {
|
39
|
+
var t;
|
40
|
+
switch (!0) {
|
41
|
+
case (this.open === !0 && !!this.modal):
|
42
|
+
this.showModal();
|
43
|
+
break;
|
44
|
+
case (this.open === !0 && !this.modal):
|
45
|
+
this.show();
|
46
|
+
break;
|
47
|
+
case this.open === !1:
|
48
|
+
this.close();
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
this.open && (this.renderFoot = !!((t = this.footerEls) != null && t.length));
|
52
|
+
}
|
53
|
+
/** @internal */
|
54
|
+
_transition() {
|
55
|
+
const t = this.fullscreen ? {} : {
|
56
|
+
translate: `${String(f(this, p))} ${String(f(this, u))}px`
|
57
|
+
};
|
58
|
+
return { entry: () => new Promise((l) => {
|
59
|
+
const r = this.$dialog.animate(
|
60
|
+
[
|
61
|
+
{
|
62
|
+
opacity: 0,
|
63
|
+
...t
|
64
|
+
},
|
65
|
+
{ opacity: 1, translate: "0 0" }
|
66
|
+
],
|
67
|
+
{
|
68
|
+
duration: 200,
|
69
|
+
fill: "forwards",
|
70
|
+
easing: "ease-out"
|
71
|
+
}
|
72
|
+
);
|
73
|
+
this.$dialog.animate([{ opacity: 0 }, { opacity: 1 }], {
|
74
|
+
duration: 200,
|
75
|
+
fill: "forwards",
|
76
|
+
pseudoElement: "::backdrop"
|
77
|
+
}), r.onfinish = () => {
|
78
|
+
l("opened");
|
79
|
+
};
|
80
|
+
}), exit: () => new Promise((l) => {
|
81
|
+
const r = this.$dialog.animate(
|
82
|
+
[
|
83
|
+
{ opacity: 1, translate: "0 0" },
|
84
|
+
{
|
85
|
+
opacity: 0,
|
86
|
+
...t
|
87
|
+
}
|
88
|
+
],
|
89
|
+
{
|
90
|
+
duration: 200,
|
91
|
+
fill: "forwards",
|
92
|
+
easing: "ease-in"
|
93
|
+
}
|
94
|
+
);
|
95
|
+
this.$dialog.animate([{ opacity: 1 }, { opacity: 0 }], {
|
96
|
+
duration: 200,
|
97
|
+
fill: "forwards",
|
98
|
+
pseudoElement: "::backdrop"
|
99
|
+
}), r.onfinish = () => {
|
100
|
+
l("closed");
|
101
|
+
};
|
102
|
+
}) };
|
103
|
+
}
|
104
|
+
/** @internal */
|
105
|
+
get _isModal() {
|
106
|
+
return typeof this.modal == "string";
|
107
|
+
}
|
108
|
+
render() {
|
109
|
+
return b`
|
110
|
+
<dialog
|
111
|
+
@close=${this._handleClose}
|
112
|
+
@mousedown=${this._handleBackdropClick}
|
113
|
+
@touchstart=${this._handleBackdropClick}
|
114
|
+
autofocus
|
115
|
+
class=${$({
|
116
|
+
dialog: !0,
|
117
|
+
"dialog--fullscreen": this.fullscreen,
|
118
|
+
"dialog--no-padding": this.noPadding
|
119
|
+
})}
|
120
|
+
>
|
121
|
+
<div class="dialog__head">
|
122
|
+
<h2 class="dialog__heading">${this.heading}</h2>
|
123
|
+
${this.noCloseButton ? k : b`
|
124
|
+
<button
|
125
|
+
@click=${this._handleClose}
|
126
|
+
aria-label=${this.closeButtonAriaLabel ?? "Close dialog"}
|
127
|
+
class="dialog__close-btn"
|
128
|
+
>
|
129
|
+
<skf-icon name="close" color="inverse"></skf-icon>
|
130
|
+
</button>
|
131
|
+
`}
|
132
|
+
</div>
|
133
|
+
<div class="dialog__body">
|
134
|
+
<slot class="dialog__main"></slot>
|
135
|
+
<slot
|
136
|
+
class=${$({
|
137
|
+
dialog__foot: !0,
|
138
|
+
"dialog__foot--hidden": !this.renderFoot
|
139
|
+
})}
|
140
|
+
name="footer"
|
141
|
+
></slot>
|
142
|
+
</div>
|
143
|
+
</dialog>
|
144
|
+
`;
|
145
|
+
}
|
146
|
+
};
|
147
|
+
p = new WeakMap(), u = new WeakMap(), d = new WeakMap(), y.styles = [B, O];
|
148
|
+
let s = y;
|
149
|
+
i([
|
150
|
+
c({ attribute: "close-button-aria-label" })
|
151
|
+
], s.prototype, "closeButtonAriaLabel", 2);
|
152
|
+
i([
|
153
|
+
c()
|
154
|
+
], s.prototype, "heading", 2);
|
155
|
+
i([
|
156
|
+
c({ type: Boolean })
|
157
|
+
], s.prototype, "fullscreen", 2);
|
158
|
+
i([
|
159
|
+
c({ type: Boolean, attribute: "no-close-button" })
|
160
|
+
], s.prototype, "noCloseButton", 2);
|
161
|
+
i([
|
162
|
+
c({ type: Boolean, attribute: "no-padding" })
|
163
|
+
], s.prototype, "noPadding", 2);
|
164
|
+
i([
|
165
|
+
c({ type: Boolean, reflect: !0 })
|
166
|
+
], s.prototype, "open", 2);
|
167
|
+
i([
|
168
|
+
m()
|
169
|
+
], s.prototype, "onClose", 2);
|
170
|
+
i([
|
171
|
+
P("dialog")
|
172
|
+
], s.prototype, "$dialog", 2);
|
173
|
+
i([
|
174
|
+
M({ slot: "footer" })
|
175
|
+
], s.prototype, "footerEls", 2);
|
176
|
+
i([
|
177
|
+
m()
|
178
|
+
], s.prototype, "modal", 2);
|
179
|
+
i([
|
180
|
+
m()
|
181
|
+
], s.prototype, "renderFoot", 2);
|
182
|
+
i([
|
183
|
+
C("open")
|
184
|
+
], s.prototype, "handleOpenChange", 1);
|
185
|
+
export {
|
186
|
+
s as SkfDialog
|
187
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { css as a } from "lit";
|
2
|
+
const o = a`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
.dialog {
|
6
|
+
--_skf-dialog-head-height: var(--skf-size-48);
|
7
|
+
--_skf-dialog-inset: var(--skf-spacing-100);
|
8
|
+
|
9
|
+
all: unset;
|
10
|
+
background-color: var(--skf-bg-color-neutral-1);
|
11
|
+
display: none;
|
12
|
+
grid-template:
|
13
|
+
'head' auto
|
14
|
+
'body' calc(100% - var(--_skf-dialog-head-height)) / 1fr;
|
15
|
+
inset: var(--_skf-dialog-inset);
|
16
|
+
max-block-size: calc(100% - var(--_skf-dialog-inset) * 2);
|
17
|
+
overflow: hidden;
|
18
|
+
position: fixed;
|
19
|
+
|
20
|
+
&[open] {
|
21
|
+
display: grid;
|
22
|
+
}
|
23
|
+
|
24
|
+
&:not(.dialog--fullscreen) {
|
25
|
+
block-size: var(--skf-dialog-height, fit-content);
|
26
|
+
margin: auto;
|
27
|
+
max-inline-size: min(100%, var(--skf-dialog-width, 400px));
|
28
|
+
}
|
29
|
+
|
30
|
+
&::backdrop {
|
31
|
+
background-color: color-mix(in srgb, var(--skf-bg-color-neutral-7), transparent);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
.dialog__head {
|
36
|
+
align-items: center;
|
37
|
+
background-color: var(--skf-color-brand-base);
|
38
|
+
block-size: var(--_skf-dialog-head-height);
|
39
|
+
display: flex;
|
40
|
+
grid-area: head;
|
41
|
+
justify-content: space-between;
|
42
|
+
padding-inline: var(--skf-box-spacing);
|
43
|
+
}
|
44
|
+
|
45
|
+
.dialog__heading {
|
46
|
+
color: var(--skf-text-color-inverse);
|
47
|
+
font-size: var(--skf-font-size-200);
|
48
|
+
}
|
49
|
+
|
50
|
+
.dialog__close-btn {
|
51
|
+
align-items: center;
|
52
|
+
display: flex;
|
53
|
+
|
54
|
+
&:focus-visible {
|
55
|
+
border-radius: var(--skf-border-radius-sm);
|
56
|
+
outline: var(--skf-border-width-sm) solid var(--skf-interactive-text-color-inverse);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
.dialog__body {
|
61
|
+
/* block-size: calc(100% - (var(--_skf-dialog-head-height) + (var(--skf-box-spacing) * 2))); */
|
62
|
+
display: flex;
|
63
|
+
flex-direction: column;
|
64
|
+
row-gap: var(--skf-spacing-100);
|
65
|
+
|
66
|
+
.dialog:not(.dialog--no-padding) & {
|
67
|
+
padding: var(--skf-box-spacing);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.dialog__main {
|
72
|
+
display: block;
|
73
|
+
flex: 1;
|
74
|
+
overflow-y: auto;
|
75
|
+
}
|
76
|
+
|
77
|
+
.dialog__foot {
|
78
|
+
display: flex;
|
79
|
+
flex-wrap: wrap;
|
80
|
+
gap: var(--skf-spacing-100);
|
81
|
+
justify-content: flex-end;
|
82
|
+
}
|
83
|
+
|
84
|
+
.dialog__foot--hidden {
|
85
|
+
display: none;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
`;
|
89
|
+
export {
|
90
|
+
o as styles
|
91
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SkfElement } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import type { BorderColor } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
@@ -20,9 +20,9 @@ export declare class SkfDivider extends SkfElement {
|
|
20
20
|
*/
|
21
21
|
color: BorderColor;
|
22
22
|
/** If true, renders a div for presentational purpose instead of the semantic hr-element */
|
23
|
-
decorative
|
23
|
+
decorative: boolean;
|
24
24
|
/** If true, renders the divider vertically */
|
25
|
-
vertical
|
25
|
+
vertical: boolean;
|
26
26
|
constructor();
|
27
27
|
connectedCallback(): void;
|
28
28
|
render(): import("lit").TemplateResult<1>;
|
@@ -1,42 +1,54 @@
|
|
1
|
-
var
|
2
|
-
throw TypeError(
|
1
|
+
var v = (r) => {
|
2
|
+
throw TypeError(r);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var
|
4
|
+
var m = (r, e, t) => e.has(r) || v("Cannot " + t);
|
5
|
+
var c = (r, e, t) => (m(r, e, "read from private field"), t ? t.call(r) : e.get(r)), f = (r, e, t) => e.has(r) ? v("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), y = (r, e, t, a) => (m(r, e, "write to private field"), a ? a.call(r, t) : e.set(r, t), t);
|
6
6
|
import { SkfElement as u } from "../../internal/components/skf-element.js";
|
7
7
|
import b from "../../styles/component.styles.js";
|
8
8
|
import { html as C } from "lit";
|
9
|
-
import { property as
|
10
|
-
import _ from "
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
import { property as n } from "lit/decorators.js";
|
10
|
+
import { classMap as _ } from "lit/directives/class-map.js";
|
11
|
+
import { styles as x } from "./divider.styles.js";
|
12
|
+
var B = Object.defineProperty, d = (r, e, t, a) => {
|
13
|
+
for (var o = void 0, l = r.length - 1, h; l >= 0; l--)
|
14
|
+
(h = r[l]) && (o = h(e, t, o) || o);
|
15
|
+
return o && B(e, t, o), o;
|
15
16
|
}, i;
|
16
|
-
const
|
17
|
+
const p = class p extends u {
|
17
18
|
constructor() {
|
18
19
|
super();
|
19
|
-
|
20
|
-
this.color = "primary", y(this, i, this.attachInternals());
|
20
|
+
f(this, i);
|
21
|
+
this.color = "primary", this.decorative = !1, this.vertical = !1, y(this, i, this.attachInternals());
|
21
22
|
}
|
22
23
|
connectedCallback() {
|
23
|
-
super.connectedCallback(),
|
24
|
+
super.connectedCallback(), c(this, i).role = this.decorative ? "generic" : "separator", c(this, i).ariaOrientation = this.vertical ? "vertical" : "horizontal";
|
24
25
|
}
|
25
26
|
render() {
|
26
|
-
return C
|
27
|
+
return C`
|
28
|
+
<div
|
29
|
+
class=${_({
|
30
|
+
divider: !0,
|
31
|
+
"divider--color-emphasised": this.color === "emphasised",
|
32
|
+
"divider--color-inverse": this.color === "inverse",
|
33
|
+
"divider--color-secondary": this.color === "secondary",
|
34
|
+
"divider--color-tertiary": this.color === "tertiary",
|
35
|
+
"divider--vertical": this.vertical
|
36
|
+
})}
|
37
|
+
></div>
|
38
|
+
`;
|
27
39
|
}
|
28
40
|
};
|
29
|
-
i = new WeakMap(),
|
30
|
-
let
|
31
|
-
|
32
|
-
|
33
|
-
],
|
34
|
-
|
35
|
-
|
36
|
-
],
|
37
|
-
|
38
|
-
|
39
|
-
],
|
41
|
+
i = new WeakMap(), p.styles = [b, x];
|
42
|
+
let s = p;
|
43
|
+
d([
|
44
|
+
n({ reflect: !0 })
|
45
|
+
], s.prototype, "color");
|
46
|
+
d([
|
47
|
+
n({ type: Boolean })
|
48
|
+
], s.prototype, "decorative");
|
49
|
+
d([
|
50
|
+
n({ type: Boolean, reflect: !0 })
|
51
|
+
], s.prototype, "vertical");
|
40
52
|
export {
|
41
|
-
|
53
|
+
s as SkfDivider
|
42
54
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,43 +1,43 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
3
|
-
|
4
|
-
|
5
|
-
--_skf-divider-border: var(--skf-border-width-sm) solid
|
2
|
+
const d = r`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
.divider {
|
5
|
+
--_skf-divider-border: var(--skf-border-width-sm) solid
|
6
|
+
var(--_skf-divider-border-color, var(--skf-border-color-primary));
|
6
7
|
|
7
8
|
display: block;
|
8
9
|
|
9
|
-
|
10
|
+
&:not(.divider--vertical) {
|
10
11
|
border-top: var(--_skf-divider-border);
|
11
12
|
margin-block: var(--skf-divider-spacing, var(--skf-spacing-100));
|
12
13
|
margin-inline: var(--skf-divider-inset, 0);
|
13
14
|
}
|
15
|
+
}
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
17
|
+
.divider--vertical {
|
18
|
+
block-size: 100%;
|
19
|
+
border-left: var(--_skf-divider-border);
|
20
|
+
margin-block: var(--skf-divider-inset, 0);
|
21
|
+
margin-inline: var(--skf-divider-spacing, var(--skf-spacing-100));
|
22
|
+
}
|
22
23
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
/** Colors */
|
25
|
+
.divider--color-emphasised {
|
26
|
+
--_skf-divider-border-color: var(--skf-border-color-emphasised);
|
27
|
+
}
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
.divider--color-inverse {
|
30
|
+
--_skf-divider-border-color: var(--skf-border-color-inverse);
|
31
|
+
}
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
.divider--color-secondary {
|
34
|
+
--_skf-divider-border-color: var(--skf-border-color-secondary);
|
35
|
+
}
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
}
|
37
|
+
.divider--color-tertiary {
|
38
|
+
--_skf-divider-border-color: var(--skf-border-color-tertiary);
|
39
39
|
}
|
40
40
|
`;
|
41
41
|
export {
|
42
|
-
|
42
|
+
d as styles
|
43
43
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SkfElement } from '
|
2
|
-
import type { HeadingType } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
|
+
import type { HeadingType } from '../../internal/constants/heading.js';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
5
5
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { SkfElement as
|
1
|
+
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
2
|
import u from "../../styles/component.styles.js";
|
3
3
|
import "lit";
|
4
|
-
import { property as
|
4
|
+
import { property as n } from "lit/decorators.js";
|
5
5
|
import { html as y, unsafeStatic as l } from "lit/static-html.js";
|
6
6
|
import c from "./heading.styles.js";
|
7
|
-
var
|
8
|
-
for (var t = void 0,
|
9
|
-
(m = o[
|
10
|
-
return t &&
|
7
|
+
var d = Object.defineProperty, a = (o, p, i, h) => {
|
8
|
+
for (var t = void 0, e = o.length - 1, m; e >= 0; e--)
|
9
|
+
(m = o[e]) && (t = m(p, i, t) || t);
|
10
|
+
return t && d(p, i, t), t;
|
11
11
|
};
|
12
|
-
const
|
12
|
+
const s = class s extends f {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments), this.as = "h1";
|
15
15
|
}
|
@@ -21,13 +21,13 @@ const e = class e extends n {
|
|
21
21
|
`;
|
22
22
|
}
|
23
23
|
};
|
24
|
-
|
25
|
-
let r =
|
26
|
-
|
27
|
-
|
24
|
+
s.styles = [u, c];
|
25
|
+
let r = s;
|
26
|
+
a([
|
27
|
+
n({ reflect: !0 })
|
28
28
|
], r.prototype, "as");
|
29
|
-
|
30
|
-
|
29
|
+
a([
|
30
|
+
n({ attribute: "styled-as" })
|
31
31
|
], r.prototype, "styledAs");
|
32
32
|
export {
|
33
33
|
r as SkfHeading
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SkfElement } from '
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { type Icon, type IconColor, type IconSize, type SeverityFgColor } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
4
|
/**
|
@@ -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,42 +1,51 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
2
|
import { ICONS as d } from "@skf-design-system/ui-assets";
|
3
|
-
import
|
4
|
-
import { html as
|
3
|
+
import u from "../../styles/component.styles.js";
|
4
|
+
import { html as c } from "lit";
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
var
|
10
|
-
for (var
|
11
|
-
(a = m[i]) && (
|
12
|
-
return
|
6
|
+
import { classMap as h } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
+
import y from "./icon.styles.js";
|
9
|
+
var $ = Object.defineProperty, o = (m, p, n, b) => {
|
10
|
+
for (var e = void 0, i = m.length - 1, a; i >= 0; i--)
|
11
|
+
(a = m[i]) && (e = a(p, n, e) || e);
|
12
|
+
return e && $(p, n, e), e;
|
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 c`
|
20
|
+
<div
|
21
|
+
aria-hidden=${s(this.label ? void 0 : "true")}
|
22
|
+
aria-label=${s(this.label)}
|
23
|
+
class=${h({
|
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
|
+
${d[this.name]}
|
31
|
+
</div>
|
32
|
+
`;
|
24
33
|
}
|
25
34
|
};
|
26
|
-
|
27
|
-
let
|
35
|
+
l.styles = [u, y];
|
36
|
+
let r = l;
|
28
37
|
o([
|
29
38
|
t({ reflect: !0 })
|
30
|
-
],
|
39
|
+
], r.prototype, "color");
|
31
40
|
o([
|
32
41
|
t()
|
33
|
-
],
|
42
|
+
], r.prototype, "label");
|
34
43
|
o([
|
35
44
|
t()
|
36
|
-
],
|
45
|
+
], r.prototype, "name");
|
37
46
|
o([
|
38
47
|
t({ reflect: !0 })
|
39
|
-
],
|
48
|
+
], r.prototype, "size");
|
40
49
|
export {
|
41
|
-
|
50
|
+
r as SkfIcon
|
42
51
|
};
|