@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
@@ -1,20 +1,20 @@
|
|
1
1
|
import { SkfElement as i } from "../../internal/components/skf-element.js";
|
2
|
-
import
|
3
|
-
import { html as
|
2
|
+
import m from "../../styles/component.styles.js";
|
3
|
+
import { html as n } from "lit";
|
4
4
|
import { property as p } from "lit/decorators.js";
|
5
5
|
import { classMap as a } from "lit/directives/class-map.js";
|
6
6
|
import { styles as d } from "./logo.styles.js";
|
7
|
-
var
|
7
|
+
var g = Object.defineProperty, v = (e, l, s, y) => {
|
8
8
|
for (var c = void 0, r = e.length - 1, h; r >= 0; r--)
|
9
9
|
(h = e[r]) && (c = h(l, s, c) || c);
|
10
|
-
return c &&
|
10
|
+
return c && g(l, s, c), c;
|
11
11
|
};
|
12
12
|
const o = class o extends i {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments), this.title = "SKF logotype", this.color = "primary";
|
15
15
|
}
|
16
16
|
render() {
|
17
|
-
return
|
17
|
+
return n`
|
18
18
|
<svg
|
19
19
|
class=${a({
|
20
20
|
logo: !0,
|
@@ -66,7 +66,7 @@ c0,5.8-4.3,6.1-9.1,6.1H1230.9z"
|
|
66
66
|
`;
|
67
67
|
}
|
68
68
|
};
|
69
|
-
o.styles = [
|
69
|
+
o.styles = [m, d];
|
70
70
|
let t = o;
|
71
71
|
v([
|
72
72
|
p()
|
@@ -5,12 +5,11 @@ import type { CSSResultGroup } from 'lit';
|
|
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 menu 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 menu
|
9
|
+
* @attribute {string} [anchor] - The id of the element the menu will be anchored to
|
11
10
|
*
|
12
|
-
* @event
|
13
|
-
* @event
|
11
|
+
* @event skf-opened - Fired when the menu is opened
|
12
|
+
* @event skf-closed - Fired when the menu is closed
|
14
13
|
*
|
15
14
|
* @slot - The menu popover content
|
16
15
|
*
|
@@ -2,7 +2,7 @@ import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover
|
|
2
2
|
import { styles as o } from "./menu.styles.js";
|
3
3
|
const s = class s extends t {
|
4
4
|
constructor() {
|
5
|
-
super(), this.placement = "bottom-start", t.classMap = { menu: !0 };
|
5
|
+
super(), this.placement = "bottom-start", this.triggerEvent = "click", t.classMap = { menu: !0 };
|
6
6
|
}
|
7
7
|
addEventListeners(e) {
|
8
8
|
e.addEventListener("mouseenter", this.open);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
5
|
+
*
|
6
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
7
|
+
*
|
8
|
+
* @slot - The component's main content
|
9
|
+
*
|
10
|
+
* @tagname skf-nav
|
11
|
+
*/
|
12
|
+
export declare class SkfNav extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
vertical: boolean;
|
15
|
+
connectedCallback(): void;
|
16
|
+
render(): import("lit").TemplateResult<1>;
|
17
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { SkfElement as s } from "../../internal/components/skf-element.js";
|
2
|
+
import m from "../../styles/component.styles.js";
|
3
|
+
import { html as p } from "lit";
|
4
|
+
import { property as c } from "lit/decorators.js";
|
5
|
+
import { ifDefined as f } from "lit/directives/if-defined.js";
|
6
|
+
import { styles as u } from "./nav.styles.js";
|
7
|
+
var v = Object.defineProperty, d = (i, a, l, h) => {
|
8
|
+
for (var e = void 0, r = i.length - 1, n; r >= 0; r--)
|
9
|
+
(n = i[r]) && (e = n(a, l, e) || e);
|
10
|
+
return e && v(a, l, e), e;
|
11
|
+
};
|
12
|
+
const o = class o extends s {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments), this.vertical = !1;
|
15
|
+
}
|
16
|
+
connectedCallback() {
|
17
|
+
super.connectedCallback(), this.ariaLabel = this.ariaLabel ?? "Main navigation", this.role = "nav";
|
18
|
+
}
|
19
|
+
render() {
|
20
|
+
return p`
|
21
|
+
<ul aria-orientation=${f(this.vertical ? "vertical" : void 0)} role="menubar">
|
22
|
+
<slot></slot>
|
23
|
+
</ul>
|
24
|
+
`;
|
25
|
+
}
|
26
|
+
};
|
27
|
+
o.styles = [m, u];
|
28
|
+
let t = o;
|
29
|
+
d([
|
30
|
+
c({ type: Boolean, reflect: !0 })
|
31
|
+
], t.prototype, "vertical");
|
32
|
+
export {
|
33
|
+
t as SkfNav
|
34
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import '../link/link.js';
|
2
|
+
import type SkfLink from '../link/link.js';
|
3
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
4
|
+
import { type CSSResultGroup } from 'lit';
|
5
|
+
/**
|
6
|
+
* The `<skf-nav>` is a component that displays a list of <nav-items>.
|
7
|
+
*
|
8
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
9
|
+
*
|
10
|
+
* @slot - The component's main content
|
11
|
+
*
|
12
|
+
* @tagname skf-nav-item
|
13
|
+
*/
|
14
|
+
export declare class SkfNavItem extends SkfElement {
|
15
|
+
static styles: CSSResultGroup;
|
16
|
+
href: string;
|
17
|
+
icon?: SkfLink['icon'];
|
18
|
+
connectedCallback(): void;
|
19
|
+
render(): import("lit").TemplateResult<1>;
|
20
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import "../link/link.js";
|
2
|
+
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
|
+
import c from "../../styles/component.styles.js";
|
4
|
+
import { html as h } from "lit";
|
5
|
+
import { property as f } from "lit/decorators.js";
|
6
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
7
|
+
import { styles as a } from "./nav-item.styles.js";
|
8
|
+
var d = Object.defineProperty, p = (i, s, n, y) => {
|
9
|
+
for (var r = void 0, t = i.length - 1, l; t >= 0; t--)
|
10
|
+
(l = i[t]) && (r = l(s, n, r) || r);
|
11
|
+
return r && d(s, n, r), r;
|
12
|
+
};
|
13
|
+
const o = class o extends m {
|
14
|
+
constructor() {
|
15
|
+
super(...arguments), this.href = "#";
|
16
|
+
}
|
17
|
+
connectedCallback() {
|
18
|
+
super.connectedCallback(), this.role = "menuitem";
|
19
|
+
}
|
20
|
+
render() {
|
21
|
+
return h`
|
22
|
+
<skf-link color="inverse" href=${this.href} icon=${u(this.icon)}>
|
23
|
+
<slot></slot>
|
24
|
+
</skf-link>
|
25
|
+
`;
|
26
|
+
}
|
27
|
+
};
|
28
|
+
o.styles = [c, a];
|
29
|
+
let e = o;
|
30
|
+
p([
|
31
|
+
f({ reflect: !0 })
|
32
|
+
], e.prototype, "href");
|
33
|
+
p([
|
34
|
+
f()
|
35
|
+
], e.prototype, "icon");
|
36
|
+
export {
|
37
|
+
e as SkfNavItem
|
38
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { css as t } from "lit";
|
2
|
+
const s = t`
|
3
|
+
@layer components {
|
4
|
+
skf-link::part(root) {
|
5
|
+
block-size: var(--skf-header-height);
|
6
|
+
display: flex;
|
7
|
+
padding-inline: var(--skf-spacing-100);
|
8
|
+
position: relative;
|
9
|
+
}
|
10
|
+
|
11
|
+
skf-link::part(root)::after {
|
12
|
+
content: '';
|
13
|
+
position: absolute;
|
14
|
+
transition: translate calc(var(--skf-motion-duration-fast) * 1ms)
|
15
|
+
var(--skf-motion-easing-ease-in);
|
16
|
+
}
|
17
|
+
|
18
|
+
skf-link::part(root):hover::after {
|
19
|
+
--_skf-nav-link-translate: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
:host-context(skf-nav:not([vertical])) skf-link::part(root)::after {
|
23
|
+
border-bottom: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
24
|
+
inset-block-end: 0;
|
25
|
+
inset-inline: 0;
|
26
|
+
translate: 0 var(--_skf-nav-link-translate, 100%);
|
27
|
+
}
|
28
|
+
|
29
|
+
:host-context(skf-nav[vertical]) skf-link::part(root)::after {
|
30
|
+
border-left: var(--skf-size-4) solid var(--skf-border-color-inverse);
|
31
|
+
inset-block: 0;
|
32
|
+
inset-inline-start: 0;
|
33
|
+
translate: var(--_skf-nav-link-translate, -100%) 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
`;
|
37
|
+
export {
|
38
|
+
s as styles
|
39
|
+
};
|
@@ -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-popover>` is a general purpose component that displays the slot content.
|
4
|
+
* The `<skf-popover>` is a general purpose component that displays the slot content in a popover.
|
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 menu 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 menu
|
9
|
+
* @attribute {string} [anchor] - The id of the element the menu will be anchored to
|
11
10
|
*
|
12
|
-
* @event
|
13
|
-
* @event
|
11
|
+
* @event skf-opened - Fired when the menu is opened
|
12
|
+
* @event skf-closed - Fired when the menu is closed
|
14
13
|
*
|
15
14
|
* @slot - The popover content
|
16
15
|
*
|
@@ -1,37 +1,37 @@
|
|
1
|
-
import { SkfPopoverBase as
|
2
|
-
import { watch as
|
3
|
-
import { property as
|
4
|
-
import { styles as
|
5
|
-
var
|
6
|
-
for (var
|
7
|
-
(p =
|
8
|
-
return s &&
|
1
|
+
import { SkfPopoverBase as h } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
+
import { watch as f } from "../../internal/helpers/watch.js";
|
3
|
+
import { property as l } from "lit/decorators.js";
|
4
|
+
import { styles as m } from "./popover.styles.js";
|
5
|
+
var d = Object.defineProperty, w = Object.getOwnPropertyDescriptor, n = (v, e, o, s) => {
|
6
|
+
for (var t = s > 1 ? void 0 : s ? w(e, o) : e, i = v.length - 1, p; i >= 0; i--)
|
7
|
+
(p = v[i]) && (t = (s ? p(e, o, t) : p(t)) || t);
|
8
|
+
return s && t && d(e, o, t), t;
|
9
9
|
};
|
10
|
-
const a = class a extends
|
10
|
+
const a = class a extends h {
|
11
11
|
constructor() {
|
12
|
-
super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start",
|
12
|
+
super(), this.offset = 8, this.hideArrow = !1, this.arrow = !this.hideArrow, this.placement = "bottom-start", this.triggerEvent = "click", h.classMap = { popover: !0 };
|
13
13
|
}
|
14
14
|
hideArrowChanged() {
|
15
15
|
this.arrow = !this.hideArrow;
|
16
16
|
}
|
17
17
|
addEventListeners(e) {
|
18
|
-
e.addEventListener(
|
18
|
+
e.addEventListener(this.triggerEvent, this.open, { signal: this.signal });
|
19
19
|
}
|
20
20
|
removeEventListeners(e) {
|
21
|
-
e.removeEventListener(
|
21
|
+
e.removeEventListener(this.triggerEvent, this.open);
|
22
22
|
}
|
23
23
|
};
|
24
|
-
a.styles = [
|
25
|
-
let
|
26
|
-
|
27
|
-
|
28
|
-
],
|
29
|
-
|
30
|
-
|
31
|
-
],
|
32
|
-
|
33
|
-
|
34
|
-
],
|
24
|
+
a.styles = [h.styles, m];
|
25
|
+
let r = a;
|
26
|
+
n([
|
27
|
+
l({ type: Number })
|
28
|
+
], r.prototype, "offset", 2);
|
29
|
+
n([
|
30
|
+
l({ type: Boolean })
|
31
|
+
], r.prototype, "hideArrow", 2);
|
32
|
+
n([
|
33
|
+
f("hideArrow")
|
34
|
+
], r.prototype, "hideArrowChanged", 1);
|
35
35
|
export {
|
36
|
-
|
36
|
+
r as SkfPopover
|
37
37
|
};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
var
|
1
|
+
var h = (t) => {
|
2
2
|
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var
|
5
|
-
var
|
6
|
-
import { SkfElement as
|
4
|
+
var f = (t, e, r) => e.has(t) || h("Cannot " + r);
|
5
|
+
var c = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), d = (t, e, r) => e.has(t) ? h("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), v = (t, e, r, p) => (f(t, e, "write to private field"), p ? p.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as y } from "../../internal/components/skf-element.js";
|
7
7
|
import x from "../../styles/component.styles.js";
|
8
8
|
import { html as b } from "lit";
|
9
9
|
import { property as l } from "lit/decorators.js";
|
@@ -14,11 +14,11 @@ var N = Object.defineProperty, n = (t, e, r, p) => {
|
|
14
14
|
(u = t[m]) && (s = u(e, r, s) || s);
|
15
15
|
return s && N(e, r, s), s;
|
16
16
|
}, o;
|
17
|
-
const i = class i extends
|
17
|
+
const i = class i extends y {
|
18
18
|
constructor() {
|
19
19
|
super();
|
20
|
-
|
21
|
-
this.animated = !1, this.max = 1, this.value = 0,
|
20
|
+
d(this, o);
|
21
|
+
this.animated = !1, this.max = 1, this.value = 0, v(this, o, this.attachInternals()), c(this, o).role = "progressbar";
|
22
22
|
}
|
23
23
|
render() {
|
24
24
|
const r = this.value / this.max * 100;
|
@@ -7,8 +7,8 @@ import { type CSSResultGroup } from 'lit';
|
|
7
7
|
*
|
8
8
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/78d5dd-radio-button) for design principles
|
9
9
|
*
|
10
|
-
* @attribute {boolean} disabled - If true, sets disabled state
|
11
|
-
* @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
|
10
|
+
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
11
|
+
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
12
12
|
*
|
13
13
|
* @event change {object} - When the value of the input changes
|
14
14
|
*
|
@@ -18,13 +18,17 @@ import { type CSSResultGroup } from 'lit';
|
|
18
18
|
*/
|
19
19
|
export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
20
20
|
static styles: CSSResultGroup;
|
21
|
+
/**
|
22
|
+
* @internal
|
23
|
+
* Initial state saved here as default for form resets.
|
24
|
+
*/
|
21
25
|
private _initialChecked;
|
22
26
|
/** If true, outputs helping hints in console */
|
23
|
-
debug
|
27
|
+
debug: boolean;
|
24
28
|
/** If true, outputs helping hints in console */
|
25
|
-
checked
|
29
|
+
checked: boolean;
|
26
30
|
/** If true, forces component to invalid state until removed */
|
27
|
-
customInvalid
|
31
|
+
customInvalid: boolean;
|
28
32
|
/** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
|
29
33
|
label?: string;
|
30
34
|
/** If defined, adds name to the input-element */
|
@@ -39,7 +43,7 @@ export declare class SkfRadio extends FormBase implements FormFieldBaseProps {
|
|
39
43
|
*/
|
40
44
|
severity?: FormFieldBaseProps['severity'];
|
41
45
|
/** If true, displays valid state after interaction */
|
42
|
-
showValid
|
46
|
+
showValid: boolean;
|
43
47
|
/** The current value of the input field */
|
44
48
|
value: string;
|
45
49
|
/** @internal */
|
@@ -2,20 +2,20 @@ import "../icon/icon.js";
|
|
2
2
|
import { FormBase as c } from "../../internal/components/formBase.js";
|
3
3
|
import { watch as n } from "../../internal/helpers/watch.js";
|
4
4
|
import { Asterisk as p } from "../../internal/templates/asterisk.js";
|
5
|
-
import
|
6
|
-
import { html as
|
5
|
+
import v from "../../styles/component.styles.js";
|
6
|
+
import { html as m } from "lit";
|
7
7
|
import { property as r, state as f, query as y } from "lit/decorators.js";
|
8
8
|
import { ifDefined as b } from "lit/directives/if-defined.js";
|
9
9
|
import { live as _ } from "lit/directives/live.js";
|
10
|
-
import g from "./radio.styles.js";
|
11
|
-
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s,
|
12
|
-
for (var a =
|
13
|
-
(h = u[
|
14
|
-
return
|
10
|
+
import { styles as g } from "./radio.styles.js";
|
11
|
+
var k = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (u, e, s, l) => {
|
12
|
+
for (var a = l > 1 ? void 0 : l ? C(e, s) : e, o = u.length - 1, h; o >= 0; o--)
|
13
|
+
(h = u[o]) && (a = (l ? h(e, s, a) : h(a)) || a);
|
14
|
+
return l && a && k(e, s, a), a;
|
15
15
|
};
|
16
16
|
const d = class d extends c {
|
17
17
|
constructor() {
|
18
|
-
super(...arguments), this._initialChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (e) => {
|
18
|
+
super(...arguments), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.customInvalid = !1, this.size = "md", this.showValid = !1, this.value = "", this._invalid = !1, this._resetValue = (e) => {
|
19
19
|
e.stopPropagation(), this.checked = this._initialChecked, this.$input && (this.$input.checked = !!this._initialChecked), this.setFormValue(this.checked ? this.value : "");
|
20
20
|
};
|
21
21
|
}
|
@@ -25,8 +25,8 @@ const d = class d extends c {
|
|
25
25
|
firstUpdated() {
|
26
26
|
var e;
|
27
27
|
(e = this.$input) == null || e.addEventListener("change", (s) => {
|
28
|
-
var
|
29
|
-
s.stopPropagation(), this.pristine = !1, this.checked = (
|
28
|
+
var l;
|
29
|
+
s.stopPropagation(), this.pristine = !1, this.checked = ((l = this.$input) == null ? void 0 : l.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(""), this.emitEvent("change");
|
30
30
|
}), this.addEventListener("invalid", (s) => {
|
31
31
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
|
32
32
|
}), this._initialChecked = this.checked, this.addEventListener("reset", this._resetValue);
|
@@ -55,8 +55,8 @@ const d = class d extends c {
|
|
55
55
|
const e = this.name;
|
56
56
|
if (!e) return;
|
57
57
|
(this.form ?? document).querySelectorAll(`skf-radio[name="${e}"]`).forEach((a) => {
|
58
|
-
const
|
59
|
-
a !== this && (
|
58
|
+
const o = this.form === a.form, h = !this.form && !a.form;
|
59
|
+
a !== this && (o || h) && (a.checked = !1);
|
60
60
|
});
|
61
61
|
}
|
62
62
|
/** @internal */
|
@@ -76,7 +76,7 @@ const d = class d extends c {
|
|
76
76
|
this.setValidity({});
|
77
77
|
}
|
78
78
|
render() {
|
79
|
-
return
|
79
|
+
return m`
|
80
80
|
<label id="root">
|
81
81
|
<input
|
82
82
|
?disabled=${this.disabled}
|
@@ -95,7 +95,7 @@ const d = class d extends c {
|
|
95
95
|
`;
|
96
96
|
}
|
97
97
|
};
|
98
|
-
d.styles = [
|
98
|
+
d.styles = [v, g];
|
99
99
|
let t = d;
|
100
100
|
i([
|
101
101
|
r({ type: Boolean })
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult[];
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-segmented-button>` component consists of multiple `<skf-segmented-button-item>`, working together.
|
5
|
+
*
|
6
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/68ff54-segmented-buttons) for design principles
|
7
|
+
*
|
8
|
+
* @slot - One or more `<skf-segmented-button-item>`
|
9
|
+
*
|
10
|
+
* @tagname skf-segmented-button
|
11
|
+
*/
|
12
|
+
export declare class SkfSegmentedButton extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
/** Sets the default selected control */
|
15
|
+
defaultSelected: number;
|
16
|
+
/** If true, allowes multiple items to be selected */
|
17
|
+
multiple: boolean;
|
18
|
+
/** @internal */
|
19
|
+
value: string;
|
20
|
+
/** @internal */
|
21
|
+
private items;
|
22
|
+
firstUpdated(): void;
|
23
|
+
/** @internal */
|
24
|
+
private _handleSegmentedButtonItemSelected;
|
25
|
+
/** @internal */
|
26
|
+
private _handleSlotChange;
|
27
|
+
/** @internal */
|
28
|
+
private _handleKeyDown;
|
29
|
+
/** @internal */
|
30
|
+
private _getKeyDownNextItem;
|
31
|
+
render(): import("lit").TemplateResult<1>;
|
32
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import '../icon/icon.js';
|
2
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
3
|
+
import { type CSSResultGroup } from 'lit';
|
4
|
+
export interface SkfSegmentedButtonItemEvent {
|
5
|
+
item: SkfSegmentedButtonItem;
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* The `<skf-segmented-button-item>` is used in conjunction with the `<skf-segmented-button>` component
|
9
|
+
*
|
10
|
+
* @event {CustomEvent} my-tag-my-event - Fired when something happens
|
11
|
+
*
|
12
|
+
* @slot - The items label
|
13
|
+
*
|
14
|
+
* @tagname skf-segmented-button-item
|
15
|
+
*/
|
16
|
+
export declare class SkfSegmentedButtonItem extends SkfElement {
|
17
|
+
static styles: CSSResultGroup;
|
18
|
+
static shadowRootOptions: {
|
19
|
+
delegatesFocus: boolean;
|
20
|
+
mode: ShadowRootMode;
|
21
|
+
serializable?: boolean;
|
22
|
+
slotAssignment?: SlotAssignmentMode;
|
23
|
+
};
|
24
|
+
/** If true, items is marked as disabled */
|
25
|
+
disabled: boolean;
|
26
|
+
/** Sets the item value */
|
27
|
+
value: string;
|
28
|
+
constructor();
|
29
|
+
/** @internal */
|
30
|
+
isMultiple: boolean;
|
31
|
+
/** @internal */
|
32
|
+
isSelected: boolean;
|
33
|
+
/** @internal */
|
34
|
+
private _handleClick;
|
35
|
+
render(): import("lit").TemplateResult<1>;
|
36
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { SkfSegmentedButtonItem } from './segmented-button-item.component';
|
2
|
+
export * from './segmented-button-item.component';
|
3
|
+
export default SkfSegmentedButtonItem;
|
4
|
+
declare global {
|
5
|
+
interface HTMLElementTagNameMap {
|
6
|
+
'skf-segmented-button-item': SkfSegmentedButtonItem;
|
7
|
+
}
|
8
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -7,7 +7,7 @@ import { raiseError as w } from "../../internal/helpers/raiseError.js";
|
|
7
7
|
import { watch as $ } from "../../internal/helpers/watch.js";
|
8
8
|
import { Asterisk as V } from "../../internal/templates/asterisk.js";
|
9
9
|
import S from "../../styles/component.styles.js";
|
10
|
-
import {
|
10
|
+
import { nothing as C, html as n } from "lit";
|
11
11
|
import { property as o, state as h, query as p } from "lit/decorators.js";
|
12
12
|
import { classMap as E } from "lit/directives/class-map.js";
|
13
13
|
import { ifDefined as m } from "lit/directives/if-defined.js";
|
@@ -237,7 +237,7 @@ const c = class c extends b {
|
|
237
237
|
id="hint"
|
238
238
|
severity=${m(x(this.severity, this._invalid))}
|
239
239
|
>
|
240
|
-
${this.customInvalid
|
240
|
+
${this.customInvalid ?? this.hint}
|
241
241
|
</skf-hint>
|
242
242
|
`}
|
243
243
|
</div>
|