@skf-design-system/ui-components 1.0.0-beta.7 → 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.component.js +3 -3
- package/dist/components/alert/alert.component.d.ts +2 -2
- package/dist/components/alert/alert.component.js +32 -32
- 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 +3 -1
- package/dist/components/button/button.component.js +60 -47
- package/dist/components/button/button.styles.js +64 -45
- package/dist/components/card/card.component.js +4 -4
- package/dist/components/checkbox/checkbox.component.js +4 -4
- package/dist/components/dialog/dialog.component.d.ts +0 -1
- package/dist/components/dialog/dialog.component.js +21 -23
- package/dist/components/divider/divider.component.js +12 -12
- package/dist/components/heading/heading.component.js +13 -13
- package/dist/components/icon/icon.component.d.ts +1 -4
- package/dist/components/icon/icon.component.js +32 -23
- package/dist/components/icon/icon.styles.js +53 -47
- package/dist/components/link/link.component.d.ts +1 -0
- package/dist/components/link/link.component.js +42 -42
- 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 +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.js +7 -7
- package/dist/components/radio/radio.component.js +4 -4
- 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/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/tab/tab.component.js +4 -4
- package/dist/components/tab-panel/tab-panel.component.js +12 -12
- package/dist/components/tag/tag.component.js +9 -9
- package/dist/components/textarea/textarea.component.js +3 -3
- package/dist/components/toast/toast.component.d.ts +7 -4
- package/dist/components/toast/toast.component.js +30 -26
- 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/toast-wrapper/toast-wrapper.component.js +10 -10
- 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 +2179 -1002
- package/dist/index.d.ts +6 -0
- package/dist/index.js +72 -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/components/hint/hint.component.js +13 -13
- 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 +1 -1
- package/dist/react/index.d.ts +10 -2
- package/dist/react/index.js +10 -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-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 +594 -163
- package/dist/types/vue/index.d.ts +326 -74
- package/dist/vscode.html-custom-data.json +722 -390
- package/dist/web-types.json +836 -290
- package/package.json +33 -33
package/dist/index.d.ts
CHANGED
@@ -12,11 +12,16 @@ export { default as SkfInput } from './components/input/input.js';
|
|
12
12
|
export { default as SkfLink } from './components/link/link.js';
|
13
13
|
export { default as SkfLoader } from './components/loader/loader.js';
|
14
14
|
export { default as SkfLogo } from './components/logo/logo.js';
|
15
|
+
export { default as SkfMenuItem } from './components/menu-item/menu-item.js';
|
16
|
+
export { default as SkfMenu } from './components/menu/menu.js';
|
17
|
+
export { default as SkfPopover } from './components/popover/popover.js';
|
15
18
|
export { default as SkfProgress } from './components/progress/progress.js';
|
16
19
|
export { default as SkfRadio } from './components/radio/radio.js';
|
17
20
|
export { default as SkfOptionGroup } from './components/select-option-group/select-option-group.js';
|
18
21
|
export { default as SkfOption } from './components/select-option/select-option.js';
|
19
22
|
export { default as SkfSelect } from './components/select/select.js';
|
23
|
+
export { default as SkfStepperItem } from './components/stepper-item/stepper-item.js';
|
24
|
+
export { default as SkfStepper } from './components/stepper/stepper.js';
|
20
25
|
export { default as SkfSwitch } from './components/switch/switch.js';
|
21
26
|
export { default as SkfTabGoup } from './components/tab-group/tab-group.js';
|
22
27
|
export { default as SkfTabPanel } from './components/tab-panel/tab-panel.js';
|
@@ -24,3 +29,4 @@ export { default as SkfTab } from './components/tab/tab.js';
|
|
24
29
|
export { default as SkfTag } from './components/tag/tag.js';
|
25
30
|
export { default as SkfTextArea } from './components/textarea/textarea.js';
|
26
31
|
export { default as SkfToast } from './components/toast/toast.js';
|
32
|
+
export { default as SkfTooltip } from './components/tooltip/tooltip.js';
|
package/dist/index.js
CHANGED
@@ -12,11 +12,16 @@ import "./components/input/input.js";
|
|
12
12
|
import "./components/link/link.js";
|
13
13
|
import "./components/loader/loader.js";
|
14
14
|
import "./components/logo/logo.js";
|
15
|
+
import "./components/menu-item/menu-item.js";
|
16
|
+
import "./components/menu/menu.js";
|
17
|
+
import "./components/popover/popover.js";
|
15
18
|
import "./components/progress/progress.js";
|
16
19
|
import "./components/radio/radio.js";
|
17
20
|
import "./components/select-option-group/select-option-group.js";
|
18
21
|
import "./components/select-option/select-option.js";
|
19
22
|
import "./components/select/select.js";
|
23
|
+
import "./components/stepper-item/stepper-item.js";
|
24
|
+
import "./components/stepper/stepper.js";
|
20
25
|
import "./components/switch/switch.js";
|
21
26
|
import "./components/tab-group/tab-group.js";
|
22
27
|
import "./components/tab-panel/tab-panel.js";
|
@@ -24,59 +29,72 @@ import "./components/tab/tab.js";
|
|
24
29
|
import "./components/tag/tag.js";
|
25
30
|
import "./components/textarea/textarea.js";
|
26
31
|
import "./components/toast/toast.js";
|
27
|
-
import
|
28
|
-
import {
|
29
|
-
import {
|
30
|
-
import {
|
31
|
-
import {
|
32
|
-
import {
|
33
|
-
import {
|
34
|
-
import {
|
35
|
-
import {
|
36
|
-
import {
|
37
|
-
import {
|
38
|
-
import {
|
39
|
-
import {
|
40
|
-
import {
|
41
|
-
import {
|
42
|
-
import {
|
43
|
-
import {
|
44
|
-
import {
|
45
|
-
import {
|
46
|
-
import {
|
47
|
-
import {
|
48
|
-
import {
|
49
|
-
import {
|
50
|
-
import {
|
51
|
-
import {
|
52
|
-
import {
|
53
|
-
import {
|
32
|
+
import "./components/tooltip/tooltip.js";
|
33
|
+
import { SkfAccordion as H } from "./components/accordion/accordion.component.js";
|
34
|
+
import { SkfAlert as j } from "./components/alert/alert.component.js";
|
35
|
+
import { SkfButton as y } from "./components/button/button.component.js";
|
36
|
+
import { SkfCard as E } from "./components/card/card.component.js";
|
37
|
+
import { SkfCheckbox as J } from "./components/checkbox/checkbox.component.js";
|
38
|
+
import { SkfCollapse as N } from "./components/collapse/collapse.component.js";
|
39
|
+
import { SkfDialog as U } from "./components/dialog/dialog.component.js";
|
40
|
+
import { SkfDivider as W } from "./components/divider/divider.component.js";
|
41
|
+
import { SkfHeading as Y } from "./components/heading/heading.component.js";
|
42
|
+
import { SkfIcon as _ } from "./components/icon/icon.component.js";
|
43
|
+
import { SkfInput as oo } from "./components/input/input.component.js";
|
44
|
+
import { SkfLink as to } from "./components/link/link.component.js";
|
45
|
+
import { SkfLoader as fo } from "./components/loader/loader.component.js";
|
46
|
+
import { SkfLogo as eo } from "./components/logo/logo.component.js";
|
47
|
+
import { SkfMenuItem as So } from "./components/menu-item/menu-item.component.js";
|
48
|
+
import { SkfMenu as xo } from "./components/menu/menu.component.js";
|
49
|
+
import { SkfPopover as no } from "./components/popover/popover.component.js";
|
50
|
+
import { SkfProgress as lo } from "./components/progress/progress.component.js";
|
51
|
+
import { SkfRadio as To } from "./components/radio/radio.component.js";
|
52
|
+
import { SkfSelectOptionGroup as bo } from "./components/select-option-group/select-option-group.component.js";
|
53
|
+
import { SkfSelectOption as Io } from "./components/select-option/select-option.component.js";
|
54
|
+
import { SkfSelect as Go } from "./components/select/select.component.js";
|
55
|
+
import { SkfStepperItem as Co } from "./components/stepper-item/stepper-item.component.js";
|
56
|
+
import { SkfStepper as Po } from "./components/stepper/stepper.component.js";
|
57
|
+
import { SkfSwitch as vo } from "./components/switch/switch.component.js";
|
58
|
+
import { SkfTabGroup as Mo } from "./components/tab-group/tab-group.component.js";
|
59
|
+
import { SkfTabPanel as Bo } from "./components/tab-panel/tab-panel.component.js";
|
60
|
+
import { SkfTab as Ro } from "./components/tab/tab.component.js";
|
61
|
+
import { SkfTag as qo } from "./components/tag/tag.component.js";
|
62
|
+
import { SkfTextArea as zo } from "./components/textarea/textarea.component.js";
|
63
|
+
import { SkfToast as Fo } from "./components/toast/toast.component.js";
|
64
|
+
import { SkfTooltip as Ko } from "./components/tooltip/tooltip.component.js";
|
65
|
+
import { SkfAccordionItem as Qo } from "./components/accordion/accordion-item.js";
|
54
66
|
export {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
67
|
+
H as SkfAccordion,
|
68
|
+
Qo as SkfAccordionItem,
|
69
|
+
j as SkfAlert,
|
70
|
+
y as SkfButton,
|
71
|
+
E as SkfCard,
|
72
|
+
J as SkfCheckbox,
|
73
|
+
N as SkfCollapse,
|
74
|
+
U as SkfDialog,
|
75
|
+
W as SkfDivider,
|
76
|
+
Y as SkfHeading,
|
77
|
+
_ as SkfIcon,
|
78
|
+
oo as SkfInput,
|
79
|
+
to as SkfLink,
|
80
|
+
fo as SkfLoader,
|
81
|
+
eo as SkfLogo,
|
82
|
+
xo as SkfMenu,
|
83
|
+
So as SkfMenuItem,
|
84
|
+
Io as SkfOption,
|
85
|
+
bo as SkfOptionGroup,
|
86
|
+
no as SkfPopover,
|
87
|
+
lo as SkfProgress,
|
88
|
+
To as SkfRadio,
|
89
|
+
Go as SkfSelect,
|
90
|
+
Po as SkfStepper,
|
91
|
+
Co as SkfStepperItem,
|
92
|
+
vo as SkfSwitch,
|
93
|
+
Ro as SkfTab,
|
94
|
+
Mo as SkfTabGoup,
|
95
|
+
Bo as SkfTabPanel,
|
96
|
+
qo as SkfTag,
|
97
|
+
zo as SkfTextArea,
|
98
|
+
Fo as SkfToast,
|
99
|
+
Ko as SkfTooltip
|
82
100
|
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { type Placement } from '@floating-ui/dom';
|
2
|
+
import { SkfElement } from '../../components/skf-element.js';
|
3
|
+
import { PopoverController } from '../../controllers/popover.controller.js';
|
4
|
+
import { type CSSResultGroup } from 'lit';
|
5
|
+
export declare class SkfPopoverBase extends SkfElement {
|
6
|
+
static styles: CSSResultGroup;
|
7
|
+
static classMap: {};
|
8
|
+
isOpen: boolean;
|
9
|
+
placement: Placement;
|
10
|
+
variant: 'dropdown' | 'popup' | 'tooltip';
|
11
|
+
anchor?: string;
|
12
|
+
offset: number;
|
13
|
+
$anchor?: Element | HTMLElement | null;
|
14
|
+
arrow: boolean;
|
15
|
+
$popover: HTMLElement;
|
16
|
+
$arrow: HTMLElement;
|
17
|
+
/** @internal */
|
18
|
+
protected popoverController: PopoverController;
|
19
|
+
private _toggleOpen;
|
20
|
+
private _handleToggle;
|
21
|
+
handleToggleOpen: () => void;
|
22
|
+
handleAnchorChange: () => Promise<void>;
|
23
|
+
reposition: () => Promise<void>;
|
24
|
+
open: () => boolean;
|
25
|
+
close: () => boolean;
|
26
|
+
addEventListeners($element: HTMLElement | Element): void;
|
27
|
+
removeEventListeners($element: HTMLElement | Element): void;
|
28
|
+
render(): import("lit").TemplateResult<1>;
|
29
|
+
}
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import { flip as b, offset as C, arrow as _, computePosition as E } from "@floating-ui/dom";
|
2
|
+
import { SkfElement as P } from "../../components/skf-element.js";
|
3
|
+
import { PopoverController as L } from "../../controllers/popover.controller.js";
|
4
|
+
import { watch as $ } from "../../helpers/watch.js";
|
5
|
+
import M from "../../../styles/component.styles.js";
|
6
|
+
import { html as y, nothing as T } from "lit";
|
7
|
+
import { property as a, state as h, query as u } from "lit/decorators.js";
|
8
|
+
import { classMap as j } from "lit/directives/class-map.js";
|
9
|
+
import { styles as k } from "./popover.styles.js";
|
10
|
+
var B = Object.defineProperty, o = (l, t, i, c) => {
|
11
|
+
for (var r = void 0, n = l.length - 1, p; n >= 0; n--)
|
12
|
+
(p = l[n]) && (r = p(t, i, r) || r);
|
13
|
+
return r && B(t, i, r), r;
|
14
|
+
}, s;
|
15
|
+
const e = (s = class extends P {
|
16
|
+
constructor() {
|
17
|
+
super(...arguments), this.isOpen = !1, this.placement = "top", this.variant = "popup", this.offset = 0, this.arrow = !1, this.popoverController = new L(this), this._toggleOpen = (t) => this.isOpen = t ?? !this.isOpen, this._handleToggle = (t) => {
|
18
|
+
const i = t.newState === "open";
|
19
|
+
this.isOpen = i, this.emit(i ? "open" : "close");
|
20
|
+
}, this.handleToggleOpen = () => {
|
21
|
+
this.$popover.togglePopover(this.isOpen), this.$popover.animate([{ opacity: 0 }, { opacity: 1 }], {
|
22
|
+
duration: 150,
|
23
|
+
easing: "ease-out",
|
24
|
+
fill: "forwards"
|
25
|
+
});
|
26
|
+
}, this.handleAnchorChange = async () => {
|
27
|
+
if (!this.anchor) return;
|
28
|
+
await this.popoverController.stop(), this.$anchor && this.removeEventListeners(this.$anchor);
|
29
|
+
const t = this.getRootNode();
|
30
|
+
this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
|
31
|
+
}, this.reposition = async () => {
|
32
|
+
var n, p, f;
|
33
|
+
if (!this.$anchor) return;
|
34
|
+
const t = [b(), C(this.offset)];
|
35
|
+
this.arrow && t.push(_({ element: this.$arrow }));
|
36
|
+
const { x: i, y: c, middlewareData: r } = await E(this.$anchor, this.$popover, {
|
37
|
+
placement: this.placement,
|
38
|
+
middleware: t,
|
39
|
+
strategy: "fixed"
|
40
|
+
});
|
41
|
+
if (Object.assign(this.$popover.style, {
|
42
|
+
left: `${String(i)}px`,
|
43
|
+
top: `${String(c)}px`
|
44
|
+
}), this.arrow) {
|
45
|
+
const m = this.placement.split("-")[0], d = { top: "bottom", right: "left", bottom: "top", left: "right" }[m] ?? "", g = (n = r.flip) == null ? void 0 : n.index, v = (p = r.arrow) == null ? void 0 : p.x, w = (f = r.arrow) == null ? void 0 : f.y, O = typeof v == "number" ? `${String(v)}px` : "", S = typeof w == "number" ? `${String(w)}px` : "", x = {
|
46
|
+
bottom: 45,
|
47
|
+
right: 135,
|
48
|
+
top: 225,
|
49
|
+
left: 315
|
50
|
+
};
|
51
|
+
Object.assign(this.$arrow.style, {
|
52
|
+
top: S,
|
53
|
+
[this.placement.includes("left") ? "right" : "left"]: O,
|
54
|
+
[g ? m : d]: "calc(var(--_skf-popover-arrow-size) * -1)",
|
55
|
+
rotate: `${(x[d] + (g ? 180 : 0)).toString()}deg`
|
56
|
+
});
|
57
|
+
}
|
58
|
+
}, this.open = () => this._toggleOpen(!0), this.close = () => this._toggleOpen(!1);
|
59
|
+
}
|
60
|
+
addEventListeners(t) {
|
61
|
+
throw new Error(`Cannot add eventListeners for ${t.id}. Method not implemented.`);
|
62
|
+
}
|
63
|
+
removeEventListeners(t) {
|
64
|
+
throw new Error(`Cannot remove eventListeners for ${t.id}. Method not implemented.`);
|
65
|
+
}
|
66
|
+
render() {
|
67
|
+
return y`
|
68
|
+
<div
|
69
|
+
@toggle=${this._handleToggle}
|
70
|
+
class=${j({ popover: !0, ...s.classMap })}
|
71
|
+
id="popover"
|
72
|
+
popover
|
73
|
+
>
|
74
|
+
<slot></slot>
|
75
|
+
${this.arrow ? y`<div class="popover__arrow" id="arrow"></div>` : T}
|
76
|
+
</div>
|
77
|
+
`;
|
78
|
+
}
|
79
|
+
}, s.styles = [M, k], s.classMap = {}, s);
|
80
|
+
o([
|
81
|
+
a({ type: Boolean, reflect: !0 })
|
82
|
+
], e.prototype, "isOpen");
|
83
|
+
o([
|
84
|
+
a()
|
85
|
+
], e.prototype, "placement");
|
86
|
+
o([
|
87
|
+
a()
|
88
|
+
], e.prototype, "variant");
|
89
|
+
o([
|
90
|
+
a()
|
91
|
+
], e.prototype, "anchor");
|
92
|
+
o([
|
93
|
+
h()
|
94
|
+
], e.prototype, "offset");
|
95
|
+
o([
|
96
|
+
h()
|
97
|
+
], e.prototype, "$anchor");
|
98
|
+
o([
|
99
|
+
h()
|
100
|
+
], e.prototype, "arrow");
|
101
|
+
o([
|
102
|
+
u("#popover")
|
103
|
+
], e.prototype, "$popover");
|
104
|
+
o([
|
105
|
+
u("#arrow")
|
106
|
+
], e.prototype, "$arrow");
|
107
|
+
o([
|
108
|
+
$("isOpen", { afterUpdate: !0 })
|
109
|
+
], e.prototype, "handleToggleOpen");
|
110
|
+
o([
|
111
|
+
$("anchor")
|
112
|
+
], e.prototype, "handleAnchorChange");
|
113
|
+
let X = e;
|
114
|
+
export {
|
115
|
+
X as SkfPopoverBase
|
116
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { css as o } from "lit";
|
2
|
+
const e = o`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
.popover {
|
6
|
+
background-color: var(--skf-bg-color-neutral-1);
|
7
|
+
border: none;
|
8
|
+
border-radius: var(--skf-border-radius-sm);
|
9
|
+
box-shadow: var(--skf-shadow-md);
|
10
|
+
opacity: 0;
|
11
|
+
overflow: visible;
|
12
|
+
}
|
13
|
+
|
14
|
+
.popover__arrow {
|
15
|
+
--_skf-popover-arrow-size: calc(6px * 0.7071);
|
16
|
+
|
17
|
+
background-color: var(--skf-bg-color-neutral-1);
|
18
|
+
block-size: calc(var(--_skf-popover-arrow-size) * 2);
|
19
|
+
box-shadow: 1px 1px 2px 0 rgb(0 0 0 / 5%);
|
20
|
+
inline-size: calc(var(--_skf-popover-arrow-size) * 2);
|
21
|
+
position: absolute;
|
22
|
+
rotate: 45deg;
|
23
|
+
z-index: -1;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
`;
|
27
|
+
export {
|
28
|
+
e as styles
|
29
|
+
};
|
@@ -1,21 +1,21 @@
|
|
1
1
|
import "../../../components/icon/icon.js";
|
2
|
-
import { SkfElement as
|
3
|
-
import { ICON_SEVERITY as
|
2
|
+
import { SkfElement as n } from "../skf-element.js";
|
3
|
+
import { ICON_SEVERITY as l } from "../../constants/iconSeverity.js";
|
4
4
|
import v from "../../../styles/component.styles.js";
|
5
5
|
import { html as f } from "lit";
|
6
|
-
import { property as
|
7
|
-
import
|
6
|
+
import { property as d } from "lit/decorators.js";
|
7
|
+
import y from "./hint.styles.js";
|
8
8
|
var a = Object.defineProperty, c = (s, i, m, h) => {
|
9
|
-
for (var r = void 0,
|
10
|
-
(p = s[
|
9
|
+
for (var r = void 0, e = s.length - 1, p; e >= 0; e--)
|
10
|
+
(p = s[e]) && (r = p(i, m, r) || r);
|
11
11
|
return r && a(i, m, r), r;
|
12
12
|
};
|
13
|
-
const o = class o extends
|
13
|
+
const o = class o extends n {
|
14
14
|
render() {
|
15
15
|
return f`
|
16
16
|
<div id="root">
|
17
17
|
${this.severity && f`
|
18
|
-
<skf-icon color=${this.severity} name="${
|
18
|
+
<skf-icon color=${this.severity} name="${l[this.severity]}" size="xs">
|
19
19
|
</skf-icon>
|
20
20
|
`}
|
21
21
|
<slot></slot>
|
@@ -23,11 +23,11 @@ const o = class o extends l {
|
|
23
23
|
`;
|
24
24
|
}
|
25
25
|
};
|
26
|
-
o.styles = [v,
|
27
|
-
let
|
26
|
+
o.styles = [v, y];
|
27
|
+
let t = o;
|
28
28
|
c([
|
29
|
-
|
30
|
-
],
|
29
|
+
d()
|
30
|
+
], t.prototype, "severity");
|
31
31
|
export {
|
32
|
-
|
32
|
+
t as SkfHint
|
33
33
|
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { SkfSelect } from '../../components/select/select.component.js';
|
2
|
+
import type { SkfPopoverBase } from '../base-classes/popover/popover.base.js';
|
3
|
+
import type { ReactiveController } from 'lit';
|
4
|
+
type ControllerHost = SkfPopoverBase | SkfSelect;
|
5
|
+
export declare class PopoverController implements ReactiveController {
|
6
|
+
host?: ControllerHost;
|
7
|
+
private cleanup;
|
8
|
+
private active;
|
9
|
+
private autoStart;
|
10
|
+
constructor(host: ControllerHost, autoStart?: boolean);
|
11
|
+
hostConnected(): void;
|
12
|
+
hostDisconnected(): void;
|
13
|
+
start(): void;
|
14
|
+
stop(): Promise<void>;
|
15
|
+
}
|
16
|
+
export {};
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import "../../components/select/select.component.js";
|
2
|
+
import { autoUpdate as n } from "@floating-ui/dom";
|
3
|
+
class p {
|
4
|
+
constructor(t, o = !0) {
|
5
|
+
this.active = !1, this.autoStart = !0, this.host = t, t.addController(this), this.autoStart = o;
|
6
|
+
}
|
7
|
+
hostConnected() {
|
8
|
+
var t;
|
9
|
+
this.autoStart && ((t = this.host) == null || t.updateComplete.then(() => {
|
10
|
+
this.start();
|
11
|
+
}).catch((o) => {
|
12
|
+
console.error(o);
|
13
|
+
}));
|
14
|
+
}
|
15
|
+
hostDisconnected() {
|
16
|
+
this.stop().catch((t) => {
|
17
|
+
console.error(t);
|
18
|
+
});
|
19
|
+
}
|
20
|
+
start() {
|
21
|
+
var e, r;
|
22
|
+
const t = (e = this.host) == null ? void 0 : e.$anchor, o = (r = this.host) == null ? void 0 : r.$popover;
|
23
|
+
if (!t || !o) {
|
24
|
+
console.warn("PopoverController: anchor or popup not found");
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
this.active || (this.cleanup = n(t, o, () => {
|
28
|
+
var s;
|
29
|
+
(s = this.host) == null || s.reposition().catch((i) => {
|
30
|
+
console.error(i);
|
31
|
+
});
|
32
|
+
}), this.active = !0);
|
33
|
+
}
|
34
|
+
async stop() {
|
35
|
+
return new Promise((t) => {
|
36
|
+
this.cleanup ? (this.cleanup(), this.cleanup = void 0, requestAnimationFrame(() => {
|
37
|
+
t();
|
38
|
+
})) : t(), this.active = !1;
|
39
|
+
});
|
40
|
+
}
|
41
|
+
}
|
42
|
+
export {
|
43
|
+
p as PopoverController
|
44
|
+
};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { FormFieldBaseProps } from '../types/formField.js';
|
2
|
-
export declare function hintSeverity(hostSeverity: FormFieldBaseProps['severity'], invalid: boolean): "error" | ("
|
2
|
+
export declare function hintSeverity(hostSeverity: FormFieldBaseProps['severity'], invalid: boolean): "error" | ("success" | "info" | "warning" | "alert") | undefined;
|
package/dist/react/index.d.ts
CHANGED
@@ -1,22 +1,29 @@
|
|
1
1
|
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
+
export { default as SkfBreadcrumb } from './skf-breadcrumb/index.js';
|
4
|
+
export { default as SkfBreadcrumbItem } from './skf-breadcrumb-item/index.js';
|
5
|
+
export { default as SkfButton } from './skf-button/index.js';
|
2
6
|
export { default as SkfCard } from './skf-card/index.js';
|
3
7
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
8
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
9
|
export { default as SkfDialog } from './skf-dialog/index.js';
|
6
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
7
10
|
export { default as SkfDivider } from './skf-divider/index.js';
|
8
|
-
export { default as SkfButton } from './skf-button/index.js';
|
9
11
|
export { default as SkfHeading } from './skf-heading/index.js';
|
10
12
|
export { default as SkfIcon } from './skf-icon/index.js';
|
11
13
|
export { default as SkfInput } from './skf-input/index.js';
|
12
14
|
export { default as SkfLink } from './skf-link/index.js';
|
13
15
|
export { default as SkfLoader } from './skf-loader/index.js';
|
14
16
|
export { default as SkfLogo } from './skf-logo/index.js';
|
17
|
+
export { default as SkfMenu } from './skf-menu/index.js';
|
18
|
+
export { default as SkfMenuItem } from './skf-menu-item/index.js';
|
19
|
+
export { default as SkfPopover } from './skf-popover/index.js';
|
15
20
|
export { default as SkfProgress } from './skf-progress/index.js';
|
16
21
|
export { default as SkfRadio } from './skf-radio/index.js';
|
17
22
|
export { default as SkfSelect } from './skf-select/index.js';
|
18
23
|
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
19
24
|
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
25
|
+
export { default as SkfStepper } from './skf-stepper/index.js';
|
26
|
+
export { default as SkfStepperItem } from './skf-stepper-item/index.js';
|
20
27
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
21
28
|
export { default as SkfTab } from './skf-tab/index.js';
|
22
29
|
export { default as SkfTabGroup } from './skf-tab-group/index.js';
|
@@ -25,3 +32,4 @@ export { default as SkfTag } from './skf-tag/index.js';
|
|
25
32
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
26
33
|
export { default as SkfToast } from './skf-toast/index.js';
|
27
34
|
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
35
|
+
export { default as SkfTooltip } from './skf-tooltip/index.js';
|
package/dist/react/index.js
CHANGED
@@ -1,22 +1,29 @@
|
|
1
1
|
export { default as SkfAccordion } from './skf-accordion/index.js';
|
2
|
+
export { default as SkfAlert } from './skf-alert/index.js';
|
3
|
+
export { default as SkfBreadcrumb } from './skf-breadcrumb/index.js';
|
4
|
+
export { default as SkfBreadcrumbItem } from './skf-breadcrumb-item/index.js';
|
5
|
+
export { default as SkfButton } from './skf-button/index.js';
|
2
6
|
export { default as SkfCard } from './skf-card/index.js';
|
3
7
|
export { default as SkfCheckbox } from './skf-checkbox/index.js';
|
4
8
|
export { default as SkfCollapse } from './skf-collapse/index.js';
|
5
9
|
export { default as SkfDialog } from './skf-dialog/index.js';
|
6
|
-
export { default as SkfAlert } from './skf-alert/index.js';
|
7
10
|
export { default as SkfDivider } from './skf-divider/index.js';
|
8
|
-
export { default as SkfButton } from './skf-button/index.js';
|
9
11
|
export { default as SkfHeading } from './skf-heading/index.js';
|
10
12
|
export { default as SkfIcon } from './skf-icon/index.js';
|
11
13
|
export { default as SkfInput } from './skf-input/index.js';
|
12
14
|
export { default as SkfLink } from './skf-link/index.js';
|
13
15
|
export { default as SkfLoader } from './skf-loader/index.js';
|
14
16
|
export { default as SkfLogo } from './skf-logo/index.js';
|
17
|
+
export { default as SkfMenu } from './skf-menu/index.js';
|
18
|
+
export { default as SkfMenuItem } from './skf-menu-item/index.js';
|
19
|
+
export { default as SkfPopover } from './skf-popover/index.js';
|
15
20
|
export { default as SkfProgress } from './skf-progress/index.js';
|
16
21
|
export { default as SkfRadio } from './skf-radio/index.js';
|
17
22
|
export { default as SkfSelect } from './skf-select/index.js';
|
18
23
|
export { default as SkfSelectOption } from './skf-select-option/index.js';
|
19
24
|
export { default as SkfSelectOptionGroup } from './skf-select-option-group/index.js';
|
25
|
+
export { default as SkfStepper } from './skf-stepper/index.js';
|
26
|
+
export { default as SkfStepperItem } from './skf-stepper-item/index.js';
|
20
27
|
export { default as SkfSwitch } from './skf-switch/index.js';
|
21
28
|
export { default as SkfTab } from './skf-tab/index.js';
|
22
29
|
export { default as SkfTabGroup } from './skf-tab-group/index.js';
|
@@ -25,3 +32,4 @@ export { default as SkfTag } from './skf-tag/index.js';
|
|
25
32
|
export { default as SkfTextArea } from './skf-textarea/index.js';
|
26
33
|
export { default as SkfToast } from './skf-toast/index.js';
|
27
34
|
export { default as SkfToastWrapper } from './skf-toast-wrapper/index.js';
|
35
|
+
export { default as SkfTooltip } from './skf-tooltip/index.js';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import Component from '../../components/breadcrumb/breadcrumb.js';
|
2
|
+
import { type SkfBreadcrumb } from '../../components/breadcrumb/breadcrumb.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onClick: EventName<Event & {
|
6
|
+
target: SkfBreadcrumb;
|
7
|
+
}>;
|
8
|
+
}>;
|
9
|
+
export default reactWrapper;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/breadcrumb/breadcrumb.js';
|
4
|
+
import {} from '../../components/breadcrumb/breadcrumb.js';
|
5
|
+
import {} from '@lit/react';
|
6
|
+
const tagName = 'skf-breadcrumb';
|
7
|
+
Component.define('skf-breadcrumb');
|
8
|
+
const reactWrapper = createComponent({
|
9
|
+
tagName,
|
10
|
+
elementClass: Component,
|
11
|
+
react: React,
|
12
|
+
events: {
|
13
|
+
onClick: 'click',
|
14
|
+
},
|
15
|
+
displayName: 'SkfBreadcrumb',
|
16
|
+
});
|
17
|
+
export default reactWrapper;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/breadcrumb-item/breadcrumb-item.js';
|
4
|
+
const tagName = 'skf-breadcrumb-item';
|
5
|
+
Component.define('skf-breadcrumb-item');
|
6
|
+
const reactWrapper = createComponent({
|
7
|
+
tagName,
|
8
|
+
elementClass: Component,
|
9
|
+
react: React,
|
10
|
+
events: {},
|
11
|
+
displayName: 'SkfBreadcrumbItem',
|
12
|
+
});
|
13
|
+
export default reactWrapper;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import Component from '../../components/menu/menu.js';
|
2
|
+
import { type SkfMenu } from '../../components/menu/menu.js';
|
3
|
+
import { type EventName } from '@lit/react';
|
4
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
5
|
+
onOpen: EventName<Event & {
|
6
|
+
target: SkfMenu;
|
7
|
+
}>;
|
8
|
+
onClose: EventName<Event & {
|
9
|
+
target: SkfMenu;
|
10
|
+
}>;
|
11
|
+
}>;
|
12
|
+
export default reactWrapper;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/menu/menu.js';
|
4
|
+
import {} from '../../components/menu/menu.js';
|
5
|
+
import {} from '@lit/react';
|
6
|
+
const tagName = 'skf-menu';
|
7
|
+
Component.define('skf-menu');
|
8
|
+
const reactWrapper = createComponent({
|
9
|
+
tagName,
|
10
|
+
elementClass: Component,
|
11
|
+
react: React,
|
12
|
+
events: {
|
13
|
+
onOpen: 'open',
|
14
|
+
onClose: 'close',
|
15
|
+
},
|
16
|
+
displayName: 'SkfMenu',
|
17
|
+
});
|
18
|
+
export default reactWrapper;
|