@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
@@ -0,0 +1,71 @@
|
|
1
|
+
import { css as e } from "lit";
|
2
|
+
const o = e`
|
3
|
+
@layer components {
|
4
|
+
dialog {
|
5
|
+
all: unset;
|
6
|
+
background-color: var(--skf-bg-color-neutral-1);
|
7
|
+
display: none;
|
8
|
+
flex-direction: column;
|
9
|
+
inline-size: min(100%, var(--_skf-drawer-size, 540px));
|
10
|
+
inset-block: 0;
|
11
|
+
inset-inline: var(--_skf-drawer-inset, auto 0);
|
12
|
+
position: fixed;
|
13
|
+
translate: 100% 0;
|
14
|
+
|
15
|
+
&[open] {
|
16
|
+
display: flex;
|
17
|
+
|
18
|
+
&::backdrop {
|
19
|
+
background-color: var(--skf-bg-color-neutral-7);
|
20
|
+
opacity: 0.4;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
:host([placement='left']) & {
|
25
|
+
--_skf-drawer-inset: 0 auto;
|
26
|
+
|
27
|
+
translate: -100% 0;
|
28
|
+
}
|
29
|
+
|
30
|
+
:host([size='sm']) & {
|
31
|
+
--_skf-drawer-size: 400px;
|
32
|
+
}
|
33
|
+
|
34
|
+
:host([size='lg']) & {
|
35
|
+
--_skf-drawer-size: 680px;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
header {
|
40
|
+
align-items: center;
|
41
|
+
background-color: var(--skf-bg-color-emphasised);
|
42
|
+
block-size: var(--skf-size-48);
|
43
|
+
color: var(--skf-text-color-inverse);
|
44
|
+
display: flex;
|
45
|
+
justify-content: space-between;
|
46
|
+
padding-inline: var(--skf-box-spacing);
|
47
|
+
}
|
48
|
+
|
49
|
+
h2 {
|
50
|
+
font-size: var(--skf-font-size-200);
|
51
|
+
}
|
52
|
+
|
53
|
+
#close-button {
|
54
|
+
display: inline-flex;
|
55
|
+
|
56
|
+
&:focus-visible {
|
57
|
+
border-radius: var(--skf-border-radius-sm);
|
58
|
+
outline: var(--skf-border-width-sm) solid var(--skf-interactive-text-color-inverse);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
#body {
|
63
|
+
display: block;
|
64
|
+
flex: auto;
|
65
|
+
padding: var(--skf-box-spacing);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
`;
|
69
|
+
export {
|
70
|
+
o as styles
|
71
|
+
};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import '../button/button.js';
|
2
|
+
import '../drawer/drawer.js';
|
3
|
+
import '../logo/logo.js';
|
4
|
+
import { SkfElement } from '../../internal/components/skf-element';
|
5
|
+
import { type CSSResultGroup } from 'lit';
|
6
|
+
/**
|
7
|
+
* The `<skf-header>` component is to be used as the site-header in the app
|
8
|
+
*
|
9
|
+
* @documentation See [zeroheight](https://zeroheight.com/****) for design principles
|
10
|
+
*
|
11
|
+
* @slot - Navigation items
|
12
|
+
*
|
13
|
+
* @tagname skf-header
|
14
|
+
*/
|
15
|
+
export declare class SkfHeader extends SkfElement {
|
16
|
+
static styles: CSSResultGroup;
|
17
|
+
/** @internal */
|
18
|
+
private _dynamicBreakpoint?;
|
19
|
+
/** @internal */
|
20
|
+
private _widthObserver?;
|
21
|
+
/** If true, sets header to display in compact mode only (hanburger menu and drawer) */
|
22
|
+
compact: boolean;
|
23
|
+
/** If defined, sets the aria-label for the hamburger button */
|
24
|
+
hamburgerAriaLabel: string;
|
25
|
+
/** If defined, sets the app or site's name */
|
26
|
+
siteName?: string;
|
27
|
+
/** If defined, sets the site's base-url for the "logo-link" */
|
28
|
+
siteUrl?: string;
|
29
|
+
/** @internal */
|
30
|
+
isCompact: boolean;
|
31
|
+
/** @internal */
|
32
|
+
private openDrawer;
|
33
|
+
/** @internal */
|
34
|
+
private nav;
|
35
|
+
/** @internal */
|
36
|
+
private $navWrapper;
|
37
|
+
firstUpdated(): void;
|
38
|
+
/** @internal */
|
39
|
+
private _observeHostWidth;
|
40
|
+
/** @internal */
|
41
|
+
private _observeNavContainer;
|
42
|
+
/** @internal */
|
43
|
+
private _renderMeta;
|
44
|
+
render(): import("lit").TemplateResult<1>;
|
45
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import "../button/button.js";
|
2
|
+
import "../drawer/drawer.js";
|
3
|
+
import "../logo/logo.js";
|
4
|
+
import { SkfElement as d } from "../../internal/components/skf-element.js";
|
5
|
+
import v from "../../styles/component.styles.js";
|
6
|
+
import { nothing as b, html as a } from "lit";
|
7
|
+
import { property as s, state as f, queryAssignedElements as u, query as w } from "lit/decorators.js";
|
8
|
+
import { ifDefined as m } from "lit/directives/if-defined.js";
|
9
|
+
import { literal as c, html as y } from "lit/static-html.js";
|
10
|
+
import { styles as _ } from "./header.styles.js";
|
11
|
+
var $ = Object.defineProperty, r = (h, e, p, g) => {
|
12
|
+
for (var i = void 0, o = h.length - 1, l; o >= 0; o--)
|
13
|
+
(l = h[o]) && (i = l(e, p, i) || i);
|
14
|
+
return i && $(e, p, i), i;
|
15
|
+
};
|
16
|
+
const n = class n extends d {
|
17
|
+
constructor() {
|
18
|
+
super(...arguments), this.compact = !1, this.hamburgerAriaLabel = "Show navigation", this.isCompact = !1, this.openDrawer = !1;
|
19
|
+
}
|
20
|
+
firstUpdated() {
|
21
|
+
this.updateComplete.then(() => {
|
22
|
+
if (this.compact) {
|
23
|
+
this.isCompact = !0, this.nav[0].vertical = !0;
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
this._observeHostWidth();
|
27
|
+
}).catch(console.error);
|
28
|
+
}
|
29
|
+
/** @internal */
|
30
|
+
_observeHostWidth() {
|
31
|
+
this._widthObserver = new ResizeObserver(() => {
|
32
|
+
var e;
|
33
|
+
this.clientWidth > (this._dynamicBreakpoint ?? 0) && (this._dynamicBreakpoint = null, (e = this._widthObserver) == null || e.disconnect(), this.isCompact = !1, this.nav[0].vertical = !1, this._observeNavContainer());
|
34
|
+
}), this._widthObserver.observe(this);
|
35
|
+
}
|
36
|
+
/** @internal */
|
37
|
+
_observeNavContainer() {
|
38
|
+
this._widthObserver = new ResizeObserver(() => {
|
39
|
+
var e;
|
40
|
+
this.$navWrapper.clientWidth < this.$navWrapper.scrollWidth && (this._dynamicBreakpoint = this.clientWidth, (e = this._widthObserver) == null || e.disconnect(), this.isCompact = !0, this.nav[0].vertical = !0, this._observeHostWidth());
|
41
|
+
}), this._widthObserver.observe(this.$navWrapper);
|
42
|
+
}
|
43
|
+
/** @internal */
|
44
|
+
_renderMeta() {
|
45
|
+
const e = this.siteUrl ? c`a` : c`div`;
|
46
|
+
return y`
|
47
|
+
<${e} href=${m(this.siteUrl)} id="meta">
|
48
|
+
<skf-logo color="inverse"></skf-logo>
|
49
|
+
${this.siteName ? a`<h2>${this.siteName}</h2>` : b}
|
50
|
+
</${e}>
|
51
|
+
`;
|
52
|
+
}
|
53
|
+
render() {
|
54
|
+
return a`
|
55
|
+
<header role="banner">
|
56
|
+
${this._renderMeta()}
|
57
|
+
<div id="nav-wrapper">
|
58
|
+
${this.isCompact ? a`
|
59
|
+
<button
|
60
|
+
@click=${() => this.openDrawer = !this.openDrawer}
|
61
|
+
aria-controls="drawer"
|
62
|
+
aria-expanded=${this.openDrawer}
|
63
|
+
aria-label=${this.hamburgerAriaLabel}
|
64
|
+
>
|
65
|
+
<skf-icon color="inverse" name="hamburgerMenu" size="lg"></skf-icon>
|
66
|
+
</button>
|
67
|
+
<skf-drawer
|
68
|
+
?open=${this.openDrawer}
|
69
|
+
@close=${() => this.openDrawer = !1}
|
70
|
+
heading=${m(this.siteName)}
|
71
|
+
id="drawer"
|
72
|
+
placement="right"
|
73
|
+
>
|
74
|
+
<slot></slot>
|
75
|
+
</skf-drawer>
|
76
|
+
` : a`<slot></slot>`}
|
77
|
+
</div>
|
78
|
+
</header>
|
79
|
+
`;
|
80
|
+
}
|
81
|
+
};
|
82
|
+
n.styles = [v, _];
|
83
|
+
let t = n;
|
84
|
+
r([
|
85
|
+
s({ type: Boolean, reflect: !0 })
|
86
|
+
], t.prototype, "compact");
|
87
|
+
r([
|
88
|
+
s({ attribute: "hamburger-aria-label" })
|
89
|
+
], t.prototype, "hamburgerAriaLabel");
|
90
|
+
r([
|
91
|
+
s({ attribute: "site-name" })
|
92
|
+
], t.prototype, "siteName");
|
93
|
+
r([
|
94
|
+
s({ attribute: "site-url" })
|
95
|
+
], t.prototype, "siteUrl");
|
96
|
+
r([
|
97
|
+
s({ type: Boolean, reflect: !0, state: !0, attribute: "is-compact" })
|
98
|
+
], t.prototype, "isCompact");
|
99
|
+
r([
|
100
|
+
f()
|
101
|
+
], t.prototype, "openDrawer");
|
102
|
+
r([
|
103
|
+
u({ selector: "skf-nav" })
|
104
|
+
], t.prototype, "nav");
|
105
|
+
r([
|
106
|
+
w("#nav-wrapper")
|
107
|
+
], t.prototype, "$navWrapper");
|
108
|
+
export {
|
109
|
+
t as SkfHeader
|
110
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import { css as e } from "lit";
|
2
|
+
const a = e`
|
3
|
+
@layer components {
|
4
|
+
:host {
|
5
|
+
--skf-header-height: 60px;
|
6
|
+
}
|
7
|
+
|
8
|
+
header {
|
9
|
+
align-items: center;
|
10
|
+
background-color: var(--skf-bg-color-emphasised);
|
11
|
+
block-size: var(--skf-header-height);
|
12
|
+
display: flex;
|
13
|
+
gap: var(--skf-spacing-125);
|
14
|
+
justify-content: space-between;
|
15
|
+
padding-inline: var(--skf-spacing-100);
|
16
|
+
}
|
17
|
+
|
18
|
+
#meta {
|
19
|
+
align-items: inherit;
|
20
|
+
color: var(--skf-text-color-inverse);
|
21
|
+
display: inherit;
|
22
|
+
gap: var(--skf-spacing-100);
|
23
|
+
|
24
|
+
&:is(a) {
|
25
|
+
text-decoration: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
:host(:not([is-compact])) &:has(h2)::after {
|
29
|
+
align-self: normal;
|
30
|
+
border-right: 1px solid var(--skf-border-color-inverse);
|
31
|
+
content: '';
|
32
|
+
display: block;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
h2 {
|
37
|
+
font-size: var(--skf-font-size-200);
|
38
|
+
font-weight: var(--skf-font-weight-regular);
|
39
|
+
white-space: nowrap;
|
40
|
+
}
|
41
|
+
|
42
|
+
#nav-wrapper:has(skf-drawer) {
|
43
|
+
display: inline-flex; /** Shrink-wrap icon-button */
|
44
|
+
}
|
45
|
+
|
46
|
+
#nav-wrapper:not(:has(skf-drawer)) {
|
47
|
+
overflow: hidden;
|
48
|
+
}
|
49
|
+
|
50
|
+
skf-drawer::part(body) {
|
51
|
+
background-color: var(--skf-bg-color-emphasised);
|
52
|
+
padding: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
button {
|
56
|
+
color: var(--_skf-header-button-color, var(--skf-interactive-text-color-inverse));
|
57
|
+
display: inline-flex;
|
58
|
+
|
59
|
+
&:focus-visible {
|
60
|
+
border-radius: var(--skf-border-radius-sm);
|
61
|
+
outline: var(--skf-border-width-sm) solid var(--skf-interactive-text-color-inverse);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
`;
|
66
|
+
export {
|
67
|
+
a as styles
|
68
|
+
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import type { HeadingType } from '../../internal/constants/heading.js';
|
3
3
|
import { type CSSResultGroup } from 'lit';
|
4
|
+
type SkfHeadingType = HeadingType;
|
4
5
|
/**
|
5
6
|
* The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
|
6
7
|
* It extends the interface of native html `<h1>` to `<h4>` elements.
|
@@ -11,17 +12,10 @@ import { type CSSResultGroup } from 'lit';
|
|
11
12
|
*/
|
12
13
|
export declare class SkfHeading extends SkfElement {
|
13
14
|
static styles: CSSResultGroup;
|
14
|
-
/**
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
*/
|
19
|
-
as: HeadingType;
|
20
|
-
/**
|
21
|
-
* If provided, changes the appearance of the heading
|
22
|
-
*
|
23
|
-
* @type { "h1" | "h2" | "h3" | "h4" }
|
24
|
-
*/
|
25
|
-
styledAs?: HeadingType;
|
15
|
+
/** Controls which heading element will be rendered. Should not be used to affect appearance */
|
16
|
+
as: SkfHeadingType;
|
17
|
+
/** If defined, changes the appearance of the heading */
|
18
|
+
styledAs?: SkfHeadingType;
|
26
19
|
render(): import("lit").TemplateResult;
|
27
20
|
}
|
21
|
+
export {};
|
@@ -1,33 +1,33 @@
|
|
1
|
-
import { SkfElement as
|
1
|
+
import { SkfElement as n } from "../../internal/components/skf-element.js";
|
2
2
|
import u from "../../styles/component.styles.js";
|
3
3
|
import "lit";
|
4
|
-
import { property as
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
var
|
8
|
-
for (var t = void 0, e = o.length - 1,
|
9
|
-
(
|
10
|
-
return t &&
|
4
|
+
import { property as a } from "lit/decorators.js";
|
5
|
+
import { unsafeStatic as m, html as c } from "lit/static-html.js";
|
6
|
+
import { styles as y } from "./heading.styles.js";
|
7
|
+
var h = Object.defineProperty, f = (o, p, i, d) => {
|
8
|
+
for (var t = void 0, e = o.length - 1, l; e >= 0; e--)
|
9
|
+
(l = o[e]) && (t = l(p, i, t) || t);
|
10
|
+
return t && h(p, i, t), t;
|
11
11
|
};
|
12
|
-
const s = class s extends
|
12
|
+
const s = class s extends n {
|
13
13
|
constructor() {
|
14
14
|
super(...arguments), this.as = "h1";
|
15
15
|
}
|
16
16
|
render() {
|
17
|
-
return
|
18
|
-
<${
|
17
|
+
return c`
|
18
|
+
<${m(this.as)} id="root">
|
19
19
|
<slot></slot>
|
20
|
-
</${
|
20
|
+
</${m(this.as)}>
|
21
21
|
`;
|
22
22
|
}
|
23
23
|
};
|
24
|
-
s.styles = [u,
|
24
|
+
s.styles = [u, y];
|
25
25
|
let r = s;
|
26
|
-
|
27
|
-
|
26
|
+
f([
|
27
|
+
a({ reflect: !0 })
|
28
28
|
], r.prototype, "as");
|
29
|
-
|
30
|
-
|
29
|
+
f([
|
30
|
+
a({ attribute: "styled-as", reflect: !0 })
|
31
31
|
], r.prototype, "styledAs");
|
32
32
|
export {
|
33
33
|
r as SkfHeading
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -19,7 +19,7 @@ export declare class SkfIcon extends SkfElement {
|
|
19
19
|
label?: string;
|
20
20
|
/**
|
21
21
|
* Name of the icon to display
|
22
|
-
* @type { "arrowDown" | "
|
22
|
+
* @type { "addCircleOutline" | "addCircle" | "addPlus" | "arrowBackIos" | "arrowBack" | "arrowDown" | "arrowForwardIos" | "arrowForward" | "arrowLeft" | "arrowRight" | "arrowUpDown" | "arrowUp" | "article" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "bluetoothDisabled" | "bluetooth" | "book" | "bookmarkOutline" | "bookmark" | "calculator" | "calendarBusy" | "calendarCheck" | "calendarEmpty" | "calendarMonth" | "calendarReccuring" | "call" | "caretDown" | "caretUpDown" | "caretUp" | "chat" | "checkCircleOutline" | "checkCircle" | "checkSmall" | "check" | "chevronDownUp" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUpDown" | "chevronUp" | "chip" | "circleStatus" | "closeAll" | "closeAlt" | "close" | "columnGraph" | "comment" | "connection0" | "connection1" | "connection2" | "connection3" | "connection4" | "contentPaste" | "copy" | "cpmCyclesPerMinute" | "dangerOutline" | "danger" | "defectFrequenciesAlt" | "defectFrequencies" | "deleteOutline" | "delete" | "devices" | "directions" | "doubleChevronLeft" | "doubleChevronRight" | "downloadDone" | "download" | "draftOutline" | "draft" | "dragDrop" | "drop" | "duplicate" | "editOutline" | "edit" | "emailOutline" | "emailPdf" | "email" | "errorOutline" | "error" | "exclamation" | "facebook" | "filterOutline" | "filter" | "findReplace" | "forbidden" | "frequencyHz" | "fullScreen" | "fullscreenExit" | "functionalGroup" | "hamburgerMenu" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "homeOutline" | "home" | "hourglassOutline" | "hourglass" | "image" | "imx" | "infoOutline" | "info" | "instagram" | "integration" | "iosShare" | "kebabMore" | "language" | "lightbulbOutline" | "lightbulb" | "link" | "linkedin" | "listGroup" | "list" | "locationPin" | "lockOutline" | "lock" | "logOut" | "login" | "meatballsMoreCircle" | "meatballsMore" | "microphone" | "nearMe" | "noData" | "notificationsBellOutline" | "notificationsBell" | "o" | "offer" | "openInNew" | "overlaysBaseline" | "pan360" | "paper" | "pause" | "pdfOutline" | "pdf" | "person" | "photoCameraOutline" | "photoCamera" | "pieChart" | "pinOutline" | "pin" | "play" | "powerOff" | "printOutline" | "print" | "privacyPolicyOutline" | "privacyPolicy" | "proCollect" | "recAction" | "refresh" | "removeMinus" | "reorder" | "reply" | "report" | "rewakableRoute" | "route" | "search" | "sendOutline" | "send" | "sensorAlt" | "sensor" | "settingsOutline" | "settings" | "share" | "shoppingCart" | "sidebandCursor" | "singleCursor" | "skfBearing" | "spectrum" | "starOutline" | "star" | "stop" | "sync" | "time" | "timewave" | "translate" | "trend" | "trendingUp" | "twitter" | "undo" | "unknownDiamondOutline" | "unknownDiamond" | "unknownOutline" | "unknown" | "unlink" | "unlockOutline" | "unlock" | "unscheduledAction" | "upload" | "vibrationAlt" | "vibration" | "view3D" | "viewFull" | "viewHorizontal" | "viewVertical" | "visibilityOffOutline" | "visibilityOff" | "visibilityOutline" | "visibility" | "warningDiamondOutline" | "warningDiamond" | "warningOutline" | "warning" | "youtube" | "zoomIn" | "zoomOut" }
|
23
23
|
*/
|
24
24
|
name: Icon;
|
25
25
|
/**
|
@@ -1,51 +1,51 @@
|
|
1
1
|
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
|
-
import { ICONS as
|
3
|
-
import
|
4
|
-
import { html as
|
2
|
+
import { ICONS as c } from "@skf-design-system/ui-assets";
|
3
|
+
import d from "../../styles/component.styles.js";
|
4
|
+
import { html as h } from "lit";
|
5
5
|
import { property as t } from "lit/decorators.js";
|
6
|
-
import { classMap as
|
6
|
+
import { classMap as u } from "lit/directives/class-map.js";
|
7
7
|
import { ifDefined as s } from "lit/directives/if-defined.js";
|
8
|
-
import
|
9
|
-
var
|
10
|
-
for (var
|
11
|
-
(
|
12
|
-
return
|
8
|
+
import v from "./icon.styles.js";
|
9
|
+
var y = Object.defineProperty, o = (m, p, a, $) => {
|
10
|
+
for (var r = void 0, i = m.length - 1, n; i >= 0; i--)
|
11
|
+
(n = m[i]) && (r = n(p, a, r) || r);
|
12
|
+
return r && y(p, a, r), r;
|
13
13
|
};
|
14
14
|
const l = class l extends f {
|
15
15
|
constructor() {
|
16
16
|
super(...arguments), this.color = "primary", this.size = "md";
|
17
17
|
}
|
18
18
|
render() {
|
19
|
-
return
|
19
|
+
return h`
|
20
20
|
<div
|
21
21
|
aria-hidden=${s(this.label ? void 0 : "true")}
|
22
22
|
aria-label=${s(this.label)}
|
23
|
-
class=${
|
23
|
+
class=${u({
|
24
24
|
icon: !0,
|
25
25
|
[`icon--color-${this.color}`]: !0,
|
26
26
|
[`icon--size-${this.size}`]: !0
|
27
27
|
})}
|
28
28
|
role=${s(this.label ? "img" : void 0)}
|
29
29
|
>
|
30
|
-
${
|
30
|
+
${c[this.name]}
|
31
31
|
</div>
|
32
32
|
`;
|
33
33
|
}
|
34
34
|
};
|
35
|
-
l.styles = [
|
36
|
-
let
|
35
|
+
l.styles = [d, v];
|
36
|
+
let e = l;
|
37
37
|
o([
|
38
38
|
t({ reflect: !0 })
|
39
|
-
],
|
39
|
+
], e.prototype, "color");
|
40
40
|
o([
|
41
41
|
t()
|
42
|
-
],
|
42
|
+
], e.prototype, "label");
|
43
43
|
o([
|
44
44
|
t()
|
45
|
-
],
|
45
|
+
], e.prototype, "name");
|
46
46
|
o([
|
47
47
|
t({ reflect: !0 })
|
48
|
-
],
|
48
|
+
], e.prototype, "size");
|
49
49
|
export {
|
50
|
-
|
50
|
+
e as SkfIcon
|
51
51
|
};
|
@@ -28,7 +28,7 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
28
28
|
/**
|
29
29
|
* Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
|
30
30
|
* [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
|
31
|
-
* @type {
|
31
|
+
* @type { 'on' | 'off' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-amount' | 'transaction-currency' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'url' | 'photo' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'email' | 'impp' | 'password' | 'webauthn' | 'work' | (string & {})}
|
32
32
|
*/
|
33
33
|
autocomplete?: AutocompleteValues;
|
34
34
|
/** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
|
@@ -72,7 +72,7 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
72
72
|
requiredLabel?: string;
|
73
73
|
/**
|
74
74
|
* If defined, displays provided severity state
|
75
|
-
* @type { "
|
75
|
+
* @type { "success" | "info" | "warning" }
|
76
76
|
*/
|
77
77
|
severity?: FormFieldBaseProps['severity'];
|
78
78
|
/** If true, displays valid state after interaction */
|
@@ -105,6 +105,7 @@ export declare class SkfInput extends FormBase implements FormFieldBaseProps {
|
|
105
105
|
private _passwordController;
|
106
106
|
protected firstUpdated(): void;
|
107
107
|
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
108
|
+
valueChanged(): void;
|
108
109
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
109
110
|
/** @internal */
|
110
111
|
_handleInput: () => void;
|