@skf-design-system/ui-components 1.0.1-beta.1 → 1.0.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -26
- package/dist/components/accordion/accordion-item.component.d.ts +36 -0
- package/dist/components/accordion/accordion-item.component.js +87 -0
- package/dist/components/accordion/accordion-item.d.ts +3 -3
- package/dist/components/accordion/accordion-item.js +4 -5
- package/dist/components/accordion/accordion-item.styles.js +77 -0
- package/dist/components/accordion/accordion.component.d.ts +9 -13
- package/dist/components/accordion/accordion.component.js +12 -13
- package/dist/components/accordion/accordion.d.ts +0 -1
- package/dist/components/accordion/accordion.js +0 -2
- package/dist/components/alert/alert.component.d.ts +6 -10
- package/dist/components/alert/alert.component.js +15 -16
- package/dist/components/alert/alert.styles.js +0 -5
- package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
- package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
- package/dist/components/breadcrumb/breadcrumb.js +6 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
- package/dist/components/button/button.component.d.ts +13 -10
- package/dist/components/button/button.component.js +83 -76
- package/dist/components/button/button.styles.d.ts +1 -2
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/card/card.component.d.ts +1 -1
- package/dist/components/card/card.component.js +18 -30
- package/dist/components/card/card.styles.js +25 -28
- package/dist/components/checkbox/checkbox.component.d.ts +16 -14
- package/dist/components/checkbox/checkbox.component.js +5 -5
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
- package/dist/components/checkbox/checkbox.styles.js +1 -5
- package/dist/components/date-picker/datepicker.calendar.component.d.ts +5 -0
- package/dist/components/date-picker/datepicker.calendar.component.js +128 -95
- package/dist/components/date-picker/datepicker.calendar.styles.js +35 -25
- package/dist/components/date-picker/datepicker.component.d.ts +5 -0
- package/dist/components/date-picker/datepicker.component.js +117 -97
- package/dist/components/date-picker/datepicker.helpers.d.ts +3 -2
- package/dist/components/date-picker/datepicker.helpers.js +46 -39
- package/dist/components/date-picker/datepicker.styles.js +14 -26
- package/dist/components/date-picker-input/datepicker-input.component.d.ts +14 -5
- package/dist/components/date-picker-input/datepicker-input.component.js +264 -219
- package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +36 -2
- package/dist/components/date-picker-input/datepicker-input.helpers.js +25 -23
- package/dist/components/date-picker-input/datepicker-input.styles.js +6 -10
- package/dist/components/dialog/dialog.component.d.ts +20 -29
- package/dist/components/dialog/dialog.component.js +85 -75
- package/dist/components/dialog/dialog.styles.js +4 -4
- 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 +61 -0
- package/dist/components/drawer/drawer.component.js +125 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +6 -0
- package/dist/components/drawer/drawer.styles.js +71 -0
- package/dist/components/header/header.component.d.ts +46 -0
- package/dist/components/header/header.component.js +116 -0
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/header.js +6 -0
- package/dist/components/header/header.styles.js +68 -0
- package/dist/components/heading/heading.component.d.ts +3 -11
- package/dist/components/heading/heading.component.js +24 -23
- 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 +11 -17
- package/dist/components/icon/icon.component.js +2 -2
- package/dist/components/icon/icon.styles.d.ts +1 -2
- package/dist/components/icon/icon.styles.js +1 -1
- package/dist/components/input/input.component.d.ts +30 -31
- package/dist/components/input/input.component.js +138 -125
- 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.d.ts +12 -14
- package/dist/components/link/link.component.js +35 -34
- package/dist/components/link/link.styles.d.ts +1 -2
- package/dist/components/link/link.styles.js +24 -20
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/loader/loader.component.js +36 -40
- package/dist/components/loader/loader.styles.d.ts +1 -2
- package/dist/components/loader/loader.styles.js +40 -32
- package/dist/components/logo/logo.component.d.ts +4 -5
- package/dist/components/logo/logo.component.js +1 -1
- package/dist/components/menu/menu-item.component.d.ts +13 -0
- package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
- package/dist/components/menu/menu.component.d.ts +10 -8
- package/dist/components/menu/menu.component.js +8 -10
- package/dist/components/nav/nav-item.component.d.ts +18 -0
- package/dist/components/nav/nav-item.component.js +38 -0
- package/dist/components/nav/nav-item.d.ts +8 -0
- package/dist/components/nav/nav-item.js +6 -0
- package/dist/components/nav/nav-item.styles.js +39 -0
- 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/popover/popover.component.d.ts +11 -8
- package/dist/components/popover/popover.component.js +24 -26
- package/dist/components/progress/progress.component.d.ts +2 -2
- package/dist/components/progress/progress.component.js +31 -37
- package/dist/components/progress/progress.styles.js +40 -35
- package/dist/components/radio/radio.component.d.ts +19 -13
- package/dist/components/radio/radio.component.js +12 -12
- 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-item.component.d.ts +36 -0
- package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
- package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button-item.js +6 -0
- package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
- package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
- package/dist/components/segmented-button/segmented-button.component.js +73 -0
- package/dist/components/segmented-button/segmented-button.d.ts +8 -0
- package/dist/components/segmented-button/segmented-button.js +6 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
- package/dist/components/segmented-button/segmented-button.styles.js +16 -0
- package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
- package/dist/components/select/select-option-group.style.d.ts +1 -0
- package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
- package/dist/components/{select-option → select}/select-option.component.js +15 -15
- package/dist/components/select/select-option.controllers.d.ts +15 -0
- package/dist/components/select/select-option.styles.d.ts +1 -0
- package/dist/components/select/select.component.d.ts +16 -15
- package/dist/components/select/select.component.js +19 -19
- package/dist/components/select/select.controllers.d.ts +21 -10
- package/dist/components/select/select.controllers.js +31 -23
- package/dist/components/select/select.stories.icons.d.ts +7 -0
- package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
- package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
- package/dist/components/stepper/stepper.component.d.ts +4 -3
- package/dist/components/stepper/stepper.component.js +15 -15
- package/dist/components/stepper/stepper.helpers.d.ts +1 -1
- package/dist/components/switch/switch.component.d.ts +7 -6
- package/dist/components/switch/switch.component.js +21 -21
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab-group/tab-group.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tag/tag.component.d.ts +14 -16
- package/dist/components/tag/tag.component.js +36 -39
- package/dist/components/textarea/textarea.component.d.ts +10 -11
- package/dist/components/textarea/textarea.component.js +65 -67
- package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
- package/dist/components/{toast-item → toast}/toast-item.js +4 -0
- package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
- package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
- package/dist/components/toast/toast.component.d.ts +6 -5
- package/dist/components/toast/toast.component.js +15 -15
- package/dist/components/toast/toast.singleton.d.ts +4 -4
- package/dist/components/toast/toast.singleton.js +12 -12
- package/dist/components/tooltip/tooltip.component.d.ts +7 -7
- package/dist/components/tooltip/tooltip.component.js +16 -11
- package/dist/custom-elements.json +2718 -2073
- package/dist/index.d.ts +16 -6
- package/dist/index.js +103 -75
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
- package/dist/internal/base-classes/popover/popover.base.js +138 -77
- package/dist/internal/base-classes/popover/popover.styles.js +14 -1
- package/dist/internal/components/hint/hint.component.d.ts +2 -2
- package/dist/internal/components/hint/hint.component.js +2 -2
- package/dist/internal/components/hint/hint.styles.d.ts +1 -2
- package/dist/internal/components/hint/hint.styles.js +1 -1
- package/dist/internal/constants/iconSeverity.d.ts +3 -2
- package/dist/internal/constants/iconSeverity.js +2 -3
- package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
- package/dist/internal/controllers/popover.controller.d.ts +12 -7
- package/dist/internal/controllers/popover.controller.js +9 -14
- package/dist/internal/helpers/hintSeverity.d.ts +2 -2
- package/dist/internal/helpers/hintSeverity.js +1 -1
- package/dist/internal/helpers/utilityTypes.d.ts +1 -1
- 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/internal/types/formField.d.ts +1 -1
- package/dist/internal/types.d.ts +18 -0
- package/dist/styles/component.styles.d.ts +1 -2
- package/dist/styles/component.styles.js +1 -1
- package/dist/styles/form-field.styles.js +11 -6
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +673 -1310
- package/dist/types/vue/index.d.ts +456 -319
- package/dist/vscode.html-custom-data.json +402 -1080
- package/dist/web-types.json +986 -767
- package/package.json +44 -55
- package/dist/components/collapse/collapse.component.d.ts +0 -40
- package/dist/components/collapse/collapse.component.js +0 -86
- package/dist/components/collapse/collapse.d.ts +0 -8
- package/dist/components/collapse/collapse.js +0 -6
- package/dist/components/collapse/collapse.styles.d.ts +0 -2
- package/dist/components/collapse/collapse.styles.js +0 -77
- package/dist/components/menu-item/menu-item.component.d.ts +0 -25
- package/dist/components/select-option/select-option.controllers.d.ts +0 -9
- package/dist/internal/constants/heading.d.ts +0 -2
- package/dist/react/index.d.ts +0 -36
- package/dist/react/index.js +0 -36
- 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-datepicker/index.d.ts +0 -12
- package/dist/react/skf-datepicker/index.js +0 -18
- 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
- /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
- /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
- /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
- /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group/select-option-group.style.d.ts → drawer/drawer.styles.d.ts} +0 -0
- /package/dist/components/{select-option/select-option.styles.d.ts → header/header.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
- /package/dist/components/{stepper-item/stepper-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
- /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
- /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
- /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
- /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
- /package/dist/components/{select-option → select}/select-option.js +0 -0
- /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
- /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
- /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
- /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,28 +1,28 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import u from "../../styles/component.styles.js";
|
2
|
+
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
|
+
import { componentStyles as y } from "../../styles/component.styles.js";
|
5
4
|
import "lit";
|
6
5
|
import { property as r } from "lit/decorators.js";
|
7
|
-
import { classMap as
|
8
|
-
import { ifDefined as
|
9
|
-
import { html as f, literal as
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
+
import { ifDefined as l } from "lit/directives/if-defined.js";
|
8
|
+
import { html as f, literal as d } from "lit/static-html.js";
|
9
|
+
import { styles as k } from "./link.styles.js";
|
10
|
+
var v = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (h, t, i, n) => {
|
11
|
+
for (var c = n > 1 ? void 0 : n ? b(t, i) : t, p = h.length - 1, a; p >= 0; p--)
|
12
|
+
(a = h[p]) && (c = (n ? a(t, i, c) : a(c)) || c);
|
13
|
+
return n && c && v(t, i, c), c;
|
14
14
|
}, s;
|
15
|
-
const e = (s = class extends
|
15
|
+
const e = (s = class extends m {
|
16
16
|
constructor() {
|
17
|
-
super(...arguments), this.as = "a", this.color = "primary", this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
17
|
+
super(...arguments), this.as = "a", this.color = "primary", this.disabled = !1, this.iconPlacement = "left", this.stretch = !1, this.type = "button", this._preprocessOnClick = (t) => {
|
18
18
|
this.as === "a" && this.onClick && t.preventDefault(), t.stopPropagation(), this.emit("click");
|
19
19
|
};
|
20
20
|
}
|
21
21
|
set onClick(t) {
|
22
22
|
if (!t) return;
|
23
23
|
this._onClick = t;
|
24
|
-
const i = (
|
25
|
-
t(
|
24
|
+
const i = (n) => {
|
25
|
+
t(n, this.href ?? this.route);
|
26
26
|
};
|
27
27
|
this._assertValidOnClick(t), this.removeEventListener("click", i), this.addEventListener("click", i);
|
28
28
|
}
|
@@ -48,16 +48,16 @@ const e = (s = class extends d {
|
|
48
48
|
inverse: "inverse"
|
49
49
|
});
|
50
50
|
return f`
|
51
|
-
<skf-icon color=${t[this.color]} name=${
|
51
|
+
<skf-icon color=${t[this.color]} name=${l(this.icon)} size="sm"></skf-icon>
|
52
52
|
`;
|
53
53
|
}
|
54
54
|
render() {
|
55
|
-
const t = this.as === "a", i = t ?
|
55
|
+
const t = this.as === "a", i = t ? d`a` : d`button`;
|
56
56
|
return f`
|
57
57
|
<${i}
|
58
|
-
?disabled=${
|
58
|
+
?disabled=${l(t ? void 0 : this.disabled)}
|
59
59
|
@click=${this._preprocessOnClick}
|
60
|
-
class=${
|
60
|
+
class=${u({
|
61
61
|
link: !0,
|
62
62
|
"link--color-inverse": this.color === "inverse",
|
63
63
|
"link--color-primary": this.color === "primary",
|
@@ -65,39 +65,43 @@ const e = (s = class extends d {
|
|
65
65
|
"link--stretch": this.stretch,
|
66
66
|
...s.classMap
|
67
67
|
})}
|
68
|
-
download=${
|
69
|
-
href=${
|
70
|
-
|
71
|
-
|
72
|
-
|
68
|
+
download=${l(t ? this.download : void 0)}
|
69
|
+
href=${l(t ? this.href : void 0)}
|
70
|
+
part="root"
|
71
|
+
rel=${l(t ? this.rel : void 0)}
|
72
|
+
target=${l(t ? this.target : void 0)}
|
73
|
+
type=${l(t ? void 0 : this.type)}
|
73
74
|
>
|
74
75
|
${this.icon && this._renderIcon()}
|
75
76
|
<slot>Default link text</slot>
|
76
77
|
</${i}>
|
77
78
|
`;
|
78
79
|
}
|
79
|
-
}, s.styles = [
|
80
|
+
}, s.styles = [y, k], s.classMap = {}, s);
|
80
81
|
o([
|
81
|
-
r({
|
82
|
+
r({ reflect: !0 })
|
82
83
|
], e.prototype, "as", 2);
|
83
84
|
o([
|
84
|
-
r({
|
85
|
+
r({ reflect: !0 })
|
85
86
|
], e.prototype, "color", 2);
|
86
87
|
o([
|
87
88
|
r({ type: Boolean, reflect: !0 })
|
88
89
|
], e.prototype, "disabled", 2);
|
89
90
|
o([
|
90
|
-
r(
|
91
|
+
r()
|
91
92
|
], e.prototype, "download", 2);
|
92
93
|
o([
|
93
|
-
r(
|
94
|
+
r()
|
94
95
|
], e.prototype, "href", 2);
|
95
96
|
o([
|
96
|
-
r(
|
97
|
+
r()
|
97
98
|
], e.prototype, "icon", 2);
|
98
99
|
o([
|
99
100
|
r({ attribute: "icon-placement", reflect: !0 })
|
100
101
|
], e.prototype, "iconPlacement", 2);
|
102
|
+
o([
|
103
|
+
r({ type: Object, attribute: !1 })
|
104
|
+
], e.prototype, "onClick", 1);
|
101
105
|
o([
|
102
106
|
r()
|
103
107
|
], e.prototype, "rel", 2);
|
@@ -113,10 +117,7 @@ o([
|
|
113
117
|
o([
|
114
118
|
r()
|
115
119
|
], e.prototype, "type", 2);
|
116
|
-
|
117
|
-
r({ attribute: !1 })
|
118
|
-
], e.prototype, "onClick", 1);
|
119
|
-
let E = e;
|
120
|
+
let L = e;
|
120
121
|
export {
|
121
|
-
|
122
|
+
L as SkfLink
|
122
123
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,53 +1,57 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
2
|
+
const e = r`
|
3
3
|
/* stylelint-disable selector-class-pattern */
|
4
4
|
@layer components {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
display: inline;
|
8
|
+
}
|
9
|
+
|
5
10
|
.link {
|
6
11
|
align-items: center;
|
7
|
-
color: var(--state-color, var(--color));
|
12
|
+
color: var(--_skf-link-state-color, var(--_skf-link-color));
|
8
13
|
display: inline-flex;
|
9
|
-
flex-direction: var(--flex-direction, rows);
|
10
14
|
font-weight: var(--skf-font-weight-bold);
|
11
|
-
gap: var(--skf-spacing-
|
12
|
-
|
15
|
+
gap: 0 var(--skf-spacing-25);
|
16
|
+
vertical-align: top;
|
13
17
|
|
14
18
|
&:is(a) {
|
15
19
|
text-decoration: none;
|
16
20
|
}
|
17
21
|
|
18
22
|
&:disabled {
|
19
|
-
--state-color: var(--color-disabled);
|
23
|
+
--_skf-link-state-color: var(--_skf-link-color-disabled);
|
20
24
|
}
|
21
25
|
|
22
26
|
&:hover {
|
23
|
-
--state-color: var(--color-hover);
|
27
|
+
--_skf-link-state-color: var(--_skf-link-color-hover);
|
24
28
|
}
|
25
29
|
|
26
30
|
&:focus-visible {
|
27
31
|
border-radius: var(--skf-border-radius-sm);
|
28
|
-
outline: var(--skf-border-width-md) solid var(--outline-color);
|
32
|
+
outline: var(--skf-border-width-md) solid var(--_skf-link-outline-color);
|
29
33
|
outline-offset: var(--skf-size-2);
|
30
34
|
}
|
31
35
|
}
|
32
36
|
|
33
37
|
.link--color-primary {
|
34
|
-
--color: var(--skf-interactive-text-color-primary);
|
35
|
-
--color-active: var(--skf-interactive-text-color-primary-active);
|
36
|
-
--color-disabled: var(--skf-interactive-text-color-disabled);
|
37
|
-
--color-hover: var(--skf-interactive-text-color-primary-hover);
|
38
|
-
--outline-color: var(--skf-interactive-text-color-primary);
|
38
|
+
--_skf-link-color: var(--skf-interactive-text-color-primary);
|
39
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-primary-active);
|
40
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
41
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-primary-hover);
|
42
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-primary);
|
39
43
|
}
|
40
44
|
|
41
45
|
.link--color-inverse {
|
42
|
-
--color: var(--skf-interactive-text-color-inverse);
|
43
|
-
--color-active: var(--skf-interactive-text-color-inverse-active);
|
44
|
-
--color-disabled: var(--skf-interactive-text-color-disabled);
|
45
|
-
--color-hover: var(--skf-interactive-text-color-inverse-hover);
|
46
|
-
--outline-color: var(--skf-interactive-text-color-inverse);
|
46
|
+
--_skf-link-color: var(--skf-interactive-text-color-inverse);
|
47
|
+
--_skf-link-color-active: var(--skf-interactive-text-color-inverse-active);
|
48
|
+
--_skf-link-color-disabled: var(--skf-interactive-text-color-disabled);
|
49
|
+
--_skf-link-color-hover: var(--skf-interactive-text-color-inverse-hover);
|
50
|
+
--_skf-link-outline-color: var(--skf-interactive-text-color-inverse);
|
47
51
|
}
|
48
52
|
|
49
53
|
.link--icon-right {
|
50
|
-
|
54
|
+
flex-direction: row-reverse;
|
51
55
|
}
|
52
56
|
|
53
57
|
.link--stretch {
|
@@ -56,5 +60,5 @@ const o = r`
|
|
56
60
|
}
|
57
61
|
`;
|
58
62
|
export {
|
59
|
-
|
63
|
+
e as styles
|
60
64
|
};
|
@@ -1,52 +1,48 @@
|
|
1
|
-
var
|
2
|
-
throw TypeError(
|
1
|
+
var m = (t) => {
|
2
|
+
throw TypeError(t);
|
3
3
|
};
|
4
|
-
var f = (
|
5
|
-
var
|
6
|
-
import { SkfElement as
|
7
|
-
import
|
8
|
-
import { html as
|
9
|
-
import { property as
|
10
|
-
import {
|
11
|
-
|
12
|
-
var
|
13
|
-
|
14
|
-
|
15
|
-
return i && x(e, t, i), i;
|
4
|
+
var f = (t, e, r) => e.has(t) || m("Cannot " + r);
|
5
|
+
var n = (t, e, r) => (f(t, e, "read from private field"), r ? r.call(t) : e.get(t)), h = (t, e, r) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), u = (t, e, r, l) => (f(t, e, "write to private field"), l ? l.call(t, r) : e.set(t, r), r);
|
6
|
+
import { SkfElement as b } from "../../internal/components/skf-element.js";
|
7
|
+
import { componentStyles as y } from "../../styles/component.styles.js";
|
8
|
+
import { html as g } from "lit";
|
9
|
+
import { property as c } from "lit/decorators.js";
|
10
|
+
import { styles as C } from "./loader.styles.js";
|
11
|
+
var _ = Object.defineProperty, p = (t, e, r, l) => {
|
12
|
+
for (var i = void 0, o = t.length - 1, v; o >= 0; o--)
|
13
|
+
(v = t[o]) && (i = v(e, r, i) || i);
|
14
|
+
return i && _(e, r, i), i;
|
16
15
|
}, s;
|
17
|
-
const d = class d extends
|
16
|
+
const d = class d extends b {
|
18
17
|
constructor() {
|
19
|
-
super();
|
18
|
+
super(...arguments);
|
20
19
|
h(this, s);
|
21
|
-
|
20
|
+
u(this, s, this.attachInternals()), this.ariaLabel = "Loading...", this.invert = !1, this.size = "md";
|
21
|
+
}
|
22
|
+
connectedCallback() {
|
23
|
+
super.connectedCallback(), n(this, s).role = "progressbar", n(this, s).ariaLive = "polite";
|
22
24
|
}
|
23
25
|
render() {
|
24
|
-
return
|
25
|
-
<div
|
26
|
-
class
|
27
|
-
|
28
|
-
|
29
|
-
"loader--small": this.size === "sm"
|
30
|
-
})}
|
31
|
-
>
|
32
|
-
<div class="loader__circle"></div>
|
33
|
-
<div class="loader__circle"></div>
|
34
|
-
<div class="loader__circle"></div>
|
26
|
+
return g`
|
27
|
+
<div id="root">
|
28
|
+
<div class="circle"></div>
|
29
|
+
<div class="circle"></div>
|
30
|
+
<div class="circle"></div>
|
35
31
|
</div>
|
36
32
|
`;
|
37
33
|
}
|
38
34
|
};
|
39
|
-
s = new WeakMap(), d.styles = [
|
40
|
-
let
|
41
|
-
|
42
|
-
|
43
|
-
],
|
44
|
-
|
45
|
-
|
46
|
-
],
|
47
|
-
|
48
|
-
|
49
|
-
],
|
35
|
+
s = new WeakMap(), d.styles = [y, C];
|
36
|
+
let a = d;
|
37
|
+
p([
|
38
|
+
c({ reflect: !0, attribute: "aria-label" })
|
39
|
+
], a.prototype, "ariaLabel");
|
40
|
+
p([
|
41
|
+
c({ type: Boolean })
|
42
|
+
], a.prototype, "invert");
|
43
|
+
p([
|
44
|
+
c({ reflect: !0 })
|
45
|
+
], a.prototype, "size");
|
50
46
|
export {
|
51
|
-
|
47
|
+
a as SkfLoader
|
52
48
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -1,51 +1,59 @@
|
|
1
1
|
import { css as a } from "lit";
|
2
|
-
const
|
3
|
-
/* stylelint-disable selector-class-pattern */
|
2
|
+
const o = a`
|
4
3
|
@layer components {
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
display: inline-flex;
|
7
|
+
}
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
#root {
|
10
|
+
--_skf-loader-color: var(--skf-bg-color-emphasised);
|
11
|
+
--_skf-loader-gap: var(--skf-spacing-50);
|
12
|
+
--_skf-loader-size: var(--skf-size-12);
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
display: flex;
|
15
|
+
gap: var(--_skf-loader-gap);
|
16
|
+
}
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
.circle {
|
19
|
+
animation: skf-loader 0.5s infinite ease-in alternate;
|
20
|
+
aspect-ratio: 1;
|
21
|
+
background-color: var(--_skf-loader-color);
|
22
|
+
border-radius: 50%;
|
23
|
+
inline-size: var(--_skf-loader-size);
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
&:nth-child(2) {
|
26
|
+
animation-delay: 0.1s;
|
27
|
+
}
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
&:nth-child(3) {
|
30
|
+
animation-delay: 0.2s;
|
31
|
+
}
|
31
32
|
}
|
33
|
+
}
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
+
@layer mods {
|
36
|
+
:host([invert]) {
|
37
|
+
#root {
|
38
|
+
--_skf-loader-color: var(--skf-bg-color-neutral-1);
|
39
|
+
}
|
35
40
|
}
|
36
41
|
|
37
|
-
|
38
|
-
|
42
|
+
:host([size='sm']) {
|
43
|
+
#root {
|
44
|
+
--_skf-loader-gap: var(--skf-spacing-25);
|
45
|
+
--_skf-loader-size: var(--skf-size-4);
|
46
|
+
}
|
39
47
|
}
|
40
48
|
}
|
49
|
+
}
|
41
50
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
}
|
51
|
+
@keyframes skf-loader {
|
52
|
+
to {
|
53
|
+
opacity: 0;
|
46
54
|
}
|
47
55
|
}
|
48
56
|
`;
|
49
57
|
export {
|
50
|
-
|
58
|
+
o as styles
|
51
59
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import type { Logo } from '@skf-design-system/ui-assets';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
|
+
type SkfLogoColor = Logo;
|
4
5
|
/**
|
5
6
|
* The `<skf-logo>` component is used to display the SKF logo.
|
6
7
|
*
|
@@ -12,10 +13,8 @@ export declare class SkfLogo extends SkfElement {
|
|
12
13
|
static styles: CSSResultGroup;
|
13
14
|
/** Defines the title of the logo */
|
14
15
|
title: string;
|
15
|
-
/**
|
16
|
-
|
17
|
-
* @type { "primary" | "secondary" | "inverse" }
|
18
|
-
*/
|
19
|
-
color: Logo;
|
16
|
+
/** Defines the color of the logo */
|
17
|
+
color: SkfLogoColor;
|
20
18
|
render(): import("lit").TemplateResult<1>;
|
21
19
|
}
|
20
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SkfElement as i } from "../../internal/components/skf-element.js";
|
2
|
-
import m from "../../styles/component.styles.js";
|
2
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
3
3
|
import { html as 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";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { SkfLink } from '../link/link.component.js';
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
3
|
+
/**
|
4
|
+
* The `<skf-menu-item>` is used in conjunction with the `<skf-menu>` component
|
5
|
+
*
|
6
|
+
* @slot - The component's main content
|
7
|
+
*
|
8
|
+
* @tagname skf-menu-item
|
9
|
+
*/
|
10
|
+
export declare class SkfMenuItem extends SkfLink {
|
11
|
+
static styles: CSSResultGroup;
|
12
|
+
constructor();
|
13
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { SkfLink as s } from "../link/link.component.js";
|
2
2
|
import "lit";
|
3
|
-
import { styles as
|
3
|
+
import { styles as e } from "./menu-item.styles.js";
|
4
4
|
const t = class t extends s {
|
5
5
|
constructor() {
|
6
|
-
super(), s.classMap = { "menu-item": !0 };
|
6
|
+
super(), this.role = "menuitem", s.classMap = { "menu-item": !0 };
|
7
7
|
}
|
8
8
|
};
|
9
|
-
t.styles = [s.styles,
|
9
|
+
t.styles = [s.styles, e];
|
10
10
|
let r = t;
|
11
11
|
export {
|
12
12
|
r as SkfMenuItem
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import { SkfPopoverBase } from '../../internal/base-classes/popover/popover.base.js';
|
2
2
|
import type { CSSResultGroup } from 'lit';
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* For a popover menu like skf-menu containing skf-menu-item elements, the correct ARIA role is menu. This role indicates that the element represents a menu, typically triggered by a button or another interactive element, like in a popover context. The menu role is suitable for context menus or secondary menus. Each skf-menu-item will implicitly have the correct menuitem role. It's important to make sure the menu is properly linked to its trigger using ARIA attributes like aria-haspopup and aria-expanded on the trigger and aria-controls on the menu to establish the relationship between the trigger and the menu for assistive technologies. Setting the menu role directly on the skf-menu element is the right way to go here.
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* The `<skf-menu>` is a component that displays a list of actions or options
|
5
8
|
*
|
6
|
-
*
|
9
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/983e5d-popover) for design principles
|
7
10
|
*
|
8
|
-
* @
|
9
|
-
* @
|
10
|
-
* @property {string} [anchor] - The id of the element the menu will be anchored to
|
11
|
+
* @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
|
12
|
+
* @attribute {string} anchor - The id of the element the menu will be anchored to
|
11
13
|
*
|
12
|
-
* @event
|
13
|
-
* @event
|
14
|
+
* @event {CustomEvent} skf-opened - Fired when the menu is opened
|
15
|
+
* @event {CustomEvent} skf-closed - Fired when the menu is closed
|
14
16
|
*
|
15
17
|
* @slot - The menu popover content
|
16
18
|
*
|
@@ -19,6 +21,6 @@ import type { CSSResultGroup } from 'lit';
|
|
19
21
|
export declare class SkfMenu extends SkfPopoverBase {
|
20
22
|
static styles: CSSResultGroup;
|
21
23
|
constructor();
|
24
|
+
/** @internal */
|
22
25
|
addEventListeners($element: HTMLElement | Element): void;
|
23
|
-
removeEventListeners($element: HTMLElement | Element): void;
|
24
26
|
}
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import { SkfPopoverBase as t } from "../../internal/base-classes/popover/popover.base.js";
|
2
|
-
import { styles as
|
2
|
+
import { styles as r } 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.role = "menu", this.triggerEvent = "click", this.variant = "menu", t.classMap = { menu: !0 };
|
6
6
|
}
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
removeEventListeners(e) {
|
11
|
-
e.removeEventListener("mouseenter", this.open);
|
7
|
+
/** @internal */
|
8
|
+
addEventListeners(i) {
|
9
|
+
i.addEventListener(this.triggerEvent, this.open.bind(this), { signal: this.signal });
|
12
10
|
}
|
13
11
|
};
|
14
|
-
s.styles = [t.styles,
|
15
|
-
let
|
12
|
+
s.styles = [t.styles, r];
|
13
|
+
let e = s;
|
16
14
|
export {
|
17
|
-
|
15
|
+
e as SkfMenu
|
18
16
|
};
|
@@ -0,0 +1,18 @@
|
|
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
|
+
* @slot - The component's main content
|
9
|
+
*
|
10
|
+
* @tagname skf-nav-item
|
11
|
+
*/
|
12
|
+
export declare class SkfNavItem extends SkfElement {
|
13
|
+
static styles: CSSResultGroup;
|
14
|
+
href: string;
|
15
|
+
icon?: SkfLink['icon'];
|
16
|
+
connectedCallback(): void;
|
17
|
+
render(): import("lit").TemplateResult<1>;
|
18
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import "../link/link.js";
|
2
|
+
import { SkfElement as m } from "../../internal/components/skf-element.js";
|
3
|
+
import { componentStyles as 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
|
+
};
|