@skf-design-system/ui-components 1.0.1-beta.1 → 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 +7 -7
- package/dist/components/breadcrumb/breadcrumb.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 +8 -8
- package/dist/components/checkbox/checkbox.component.js +3 -3
- package/dist/components/collapse/collapse.component.js +1 -1
- 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 +13 -5
- package/dist/components/date-picker-input/datepicker-input.component.js +263 -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 +18 -28
- package/dist/components/dialog/dialog.component.js +89 -79
- 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 +11 -11
- 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/input/input.component.d.ts +2 -2
- package/dist/components/input/input.component.js +3 -3
- 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 +1 -0
- package/dist/components/link/link.styles.js +24 -20
- 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 +19 -19
- package/dist/components/radio/radio.component.d.ts +10 -6
- package/dist/components/radio/radio.component.js +10 -10
- 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/stepper/stepper.component.d.ts +2 -1
- package/dist/components/stepper-item/stepper-item.component.js +2 -2
- package/dist/components/switch/switch.component.d.ts +7 -6
- package/dist/components/switch/switch.component.js +7 -7
- package/dist/components/tag/tag.component.d.ts +4 -2
- package/dist/components/tag/tag.component.js +6 -6
- package/dist/components/textarea/textarea.component.js +7 -7
- package/dist/components/toast/toast.component.d.ts +1 -1
- package/dist/components/tooltip/tooltip.component.d.ts +5 -6
- package/dist/components/tooltip/tooltip.component.js +11 -11
- package/dist/custom-elements.json +2477 -1745
- package/dist/index.d.ts +4 -0
- package/dist/index.js +82 -70
- 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/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/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/styles/form-field.styles.js +11 -6
- package/dist/styles/global.css +1 -1
- package/dist/types/jsx/custom-element-jsx.d.ts +642 -1261
- package/dist/types/vue/index.d.ts +422 -267
- package/dist/vscode.html-custom-data.json +805 -525
- package/dist/web-types.json +928 -653
- package/package.json +41 -51
- 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/README.md
CHANGED
@@ -221,24 +221,7 @@ import { SkfInput } from "@skf-design-system/ui-components";
|
|
221
221
|
<skf-input name="input" onchange={(e) => console.log((e.target as unknown as SkfInput).value)}></skf-input>
|
222
222
|
```
|
223
223
|
|
224
|
-
|
225
|
-
|
226
|
-
> Note, for React 18 it is not necessary to install an extra plugin to get code completion since you are writing in react
|
227
|
-
|
228
|
-
React 18 does not support native web components out of the box. If you want to use SKF UI components with React 18 you will have to use our generated wrappers in order to do so.
|
229
|
-
|
230
|
-
```tsx
|
231
|
-
import { SkfInput } from "@skf-design-system/ui-components/react/index.js";
|
232
|
-
|
233
|
-
...
|
234
|
-
|
235
|
-
<SkfInput
|
236
|
-
name="input"
|
237
|
-
onChange={(e) => {
|
238
|
-
console.log( e.target.value );
|
239
|
-
}}
|
240
|
-
/>
|
241
|
-
```
|
224
|
+
⚠️ **React 18** does not support native web components. If you want to use this library you must upgrade React to version 19.
|
242
225
|
|
243
226
|
### Setting up code completion
|
244
227
|
|
@@ -14,7 +14,7 @@ import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
14
14
|
export declare class SkfAccordion extends SkfElement {
|
15
15
|
static styles: CSSResultGroup;
|
16
16
|
/** If true, will animate the expand/collapse state */
|
17
|
-
animated
|
17
|
+
animated: boolean;
|
18
18
|
/**
|
19
19
|
* Defines which heading element will be rendered
|
20
20
|
* @type { "h1" | "h2" | "h3" | "h4" }
|
@@ -23,11 +23,11 @@ export declare class SkfAccordion extends SkfElement {
|
|
23
23
|
/** If true, adds a gap between each item */
|
24
24
|
gap: boolean;
|
25
25
|
/** If true, allowes multiple accordion items to open */
|
26
|
-
multiple
|
26
|
+
multiple: boolean;
|
27
27
|
/** If true, renders the small version */
|
28
|
-
small
|
28
|
+
small: boolean;
|
29
29
|
/** If true, will truncate all headings in collapsed state */
|
30
|
-
truncate
|
30
|
+
truncate: boolean;
|
31
31
|
/** @internal */
|
32
32
|
private $accordionItems;
|
33
33
|
protected updated(_changedProperties: PropertyValues): void;
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import "../collapse/collapse.js";
|
2
|
-
import { SkfElement as
|
2
|
+
import { SkfElement as p } from "../../internal/components/skf-element.js";
|
3
3
|
import m from "../../styles/component.styles.js";
|
4
4
|
import { html as f } from "lit";
|
5
5
|
import { property as a, queryAssignedNodes as d } from "lit/decorators.js";
|
6
6
|
import { classMap as c } from "lit/directives/class-map.js";
|
7
7
|
import { styles as g } from "./accordion.styles.js";
|
8
|
-
var y = Object.defineProperty, s = (
|
9
|
-
for (var r = void 0,
|
10
|
-
(
|
8
|
+
var y = Object.defineProperty, s = (u, t, i, l) => {
|
9
|
+
for (var r = void 0, o = u.length - 1, h; o >= 0; o--)
|
10
|
+
(h = u[o]) && (r = h(t, i, r) || r);
|
11
11
|
return r && y(t, i, r), r;
|
12
12
|
};
|
13
|
-
const n = class n extends
|
13
|
+
const n = class n extends p {
|
14
14
|
constructor() {
|
15
|
-
super(...arguments), this.headingAs = "h2", this.gap = !1, this._setItemAttributes = () => {
|
15
|
+
super(...arguments), this.animated = !1, this.headingAs = "h2", this.gap = !1, this.multiple = !1, this.small = !1, this.truncate = !1, this._setItemAttributes = () => {
|
16
16
|
this.items.forEach((t) => {
|
17
17
|
t.setAttribute("heading-as", this.headingAs), this.animated ? t.setAttribute("animated", "") : t.hasAttribute("animated") && t.removeAttribute("animated"), this.small ? t.setAttribute("small", "") : t.hasAttribute("small") && t.removeAttribute("small"), this.truncate ? t.setAttribute("truncate", "") : t.hasAttribute("truncate") && t.removeAttribute("truncate");
|
18
18
|
});
|
@@ -28,8 +28,8 @@ const n = class n extends h {
|
|
28
28
|
_onChildToggle(t) {
|
29
29
|
if (this.multiple || t.defaultPrevented) return;
|
30
30
|
const i = t.target;
|
31
|
-
this.items.length && this.items.forEach((
|
32
|
-
|
31
|
+
this.items.length && this.items.forEach((l) => {
|
32
|
+
l !== i && l.hasAttribute("expanded") && l.setClose();
|
33
33
|
});
|
34
34
|
}
|
35
35
|
render() {
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import type { SkfIcon } from '../icon/icon.component.js';
|
2
1
|
import '../icon/icon.js';
|
3
2
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
4
|
-
import type { SeverityFgColor } from '@skf-design-system/ui-assets';
|
3
|
+
import type { Icon, SeverityFgColor } from '@skf-design-system/ui-assets';
|
5
4
|
import { type CSSResultGroup } from 'lit';
|
5
|
+
type SkfAlertIcon = Icon;
|
6
|
+
type SkfAlertSeverity = SeverityFgColor;
|
6
7
|
/**
|
7
8
|
* The `<skf-alert>` is a type of notification that appears in-line
|
8
9
|
*
|
@@ -20,15 +21,13 @@ export declare class SkfAlert extends SkfElement {
|
|
20
21
|
/** Close button aria-label */
|
21
22
|
buttonLabel: string;
|
22
23
|
/** If defined, displays leading icon */
|
23
|
-
icon?:
|
24
|
+
icon?: SkfAlertIcon;
|
24
25
|
/** If true, renders with an close button and sets aria-role to `status` */
|
25
|
-
persistent
|
26
|
-
/**
|
27
|
-
|
28
|
-
* @type { "error" | "info" | "warning" | "success" | "alert" }
|
29
|
-
*/
|
30
|
-
severity?: SeverityFgColor;
|
26
|
+
persistent: boolean;
|
27
|
+
/** If defined, gives the supplied appearance */
|
28
|
+
severity?: SkfAlertSeverity;
|
31
29
|
/** @internal */
|
32
30
|
private _handleClose;
|
33
31
|
render(): import("lit").TemplateResult<1>;
|
34
32
|
}
|
33
|
+
export {};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import "../icon/icon.js";
|
2
2
|
import { SkfElement as y } from "../../internal/components/skf-element.js";
|
3
3
|
import f from "../../styles/component.styles.js";
|
4
|
-
import {
|
4
|
+
import { nothing as h, html as p } from "lit";
|
5
5
|
import { property as s } from "lit/decorators.js";
|
6
6
|
import { classMap as u } from "lit/directives/class-map.js";
|
7
|
-
import { ifDefined as
|
7
|
+
import { ifDefined as m } from "lit/directives/if-defined.js";
|
8
8
|
import { styles as v } from "./alert.styles.js";
|
9
9
|
var b = Object.defineProperty, r = (l, a, n, d) => {
|
10
10
|
for (var t = void 0, i = l.length - 1, c; i >= 0; i--)
|
@@ -13,12 +13,12 @@ var b = Object.defineProperty, r = (l, a, n, d) => {
|
|
13
13
|
};
|
14
14
|
const o = class o extends y {
|
15
15
|
constructor() {
|
16
|
-
super(...arguments), this.buttonLabel = "Close", this._handleClose = () => {
|
16
|
+
super(...arguments), this.buttonLabel = "Close", this.persistent = !1, this._handleClose = () => {
|
17
17
|
this.emit("skf-alert-close");
|
18
18
|
};
|
19
19
|
}
|
20
20
|
render() {
|
21
|
-
return
|
21
|
+
return p`
|
22
22
|
<div
|
23
23
|
aria-describedby="main"
|
24
24
|
class=${u({
|
@@ -33,15 +33,15 @@ const o = class o extends y {
|
|
33
33
|
role=${this.persistent ? "status" : "alert"}
|
34
34
|
>
|
35
35
|
<skf-icon
|
36
|
-
color=${
|
37
|
-
name=${
|
36
|
+
color=${m(this.severity ?? "secondary")}
|
37
|
+
name=${m(this.icon ?? "info")}
|
38
38
|
size="sm"
|
39
39
|
></skf-icon>
|
40
40
|
<div class="alert__body">
|
41
41
|
<slot class="alert__main" id="main"></slot>
|
42
42
|
<slot name="link"></slot>
|
43
43
|
</div>
|
44
|
-
${this.persistent ?
|
44
|
+
${this.persistent ? p`
|
45
45
|
<button
|
46
46
|
@click="${this._handleClose}"
|
47
47
|
aria-label=${this.buttonLabel}
|
@@ -4,7 +4,7 @@ import { type CSSResultGroup } from 'lit';
|
|
4
4
|
/**
|
5
5
|
* The `<skf-breadcrumb>` component consists of multiple `<skf-breadcrumb-item>`, working together.
|
6
6
|
*
|
7
|
-
*
|
7
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/3338ef-breadcrumbs) for design principles.
|
8
8
|
*
|
9
9
|
* @event click - Fired when the item is clicked
|
10
10
|
*
|
@@ -1,44 +1,32 @@
|
|
1
|
-
import { SkfElement as
|
2
|
-
import
|
3
|
-
import { html as
|
1
|
+
import { SkfElement as f } from "../../internal/components/skf-element.js";
|
2
|
+
import m from "../../styles/component.styles.js";
|
3
|
+
import { html as d } from "lit";
|
4
4
|
import { property as o } from "lit/decorators.js";
|
5
|
-
import {
|
6
|
-
|
7
|
-
var
|
8
|
-
|
9
|
-
|
10
|
-
return t && u(p, a, t), t;
|
5
|
+
import { styles as u } from "./card.styles.js";
|
6
|
+
var c = Object.defineProperty, s = (p, l, i, y) => {
|
7
|
+
for (var t = void 0, r = p.length - 1, a; r >= 0; r--)
|
8
|
+
(a = p[r]) && (t = a(l, i, t) || t);
|
9
|
+
return t && c(l, i, t), t;
|
11
10
|
};
|
12
|
-
const n = class n extends
|
11
|
+
const n = class n extends f {
|
13
12
|
constructor() {
|
14
13
|
super(...arguments), this.noBorder = !1, this.noPadding = !1, this.stretch = !1;
|
15
14
|
}
|
16
15
|
render() {
|
17
|
-
return
|
18
|
-
<div
|
19
|
-
class=${f({
|
20
|
-
card: !0,
|
21
|
-
"card--no-border": this.noBorder,
|
22
|
-
"card--no-padding": this.noPadding,
|
23
|
-
"card--stretch": this.stretch
|
24
|
-
})}
|
25
|
-
>
|
26
|
-
<slot></slot>
|
27
|
-
</div>
|
28
|
-
`;
|
16
|
+
return d`<slot></slot>`;
|
29
17
|
}
|
30
18
|
};
|
31
|
-
n.styles = [
|
32
|
-
let
|
19
|
+
n.styles = [m, u];
|
20
|
+
let e = n;
|
33
21
|
s([
|
34
|
-
o({ type: Boolean, attribute: "no-border" })
|
35
|
-
],
|
22
|
+
o({ type: Boolean, attribute: "no-border", reflect: !0 })
|
23
|
+
], e.prototype, "noBorder");
|
36
24
|
s([
|
37
|
-
o({ type: Boolean, attribute: "no-padding" })
|
38
|
-
],
|
25
|
+
o({ type: Boolean, attribute: "no-padding", reflect: !0 })
|
26
|
+
], e.prototype, "noPadding");
|
39
27
|
s([
|
40
28
|
o({ type: Boolean, reflect: !0 })
|
41
|
-
],
|
29
|
+
], e.prototype, "stretch");
|
42
30
|
export {
|
43
|
-
|
31
|
+
e as SkfCard
|
44
32
|
};
|
@@ -1,36 +1,33 @@
|
|
1
1
|
import { css as r } from "lit";
|
2
|
-
const
|
3
|
-
|
2
|
+
const s = r`
|
3
|
+
@layer components {
|
4
|
+
@layer base {
|
5
|
+
:host {
|
6
|
+
background-color: var(--skf-bg-color-neutral-1);
|
7
|
+
border: var(--skf-border-width-sm) solid
|
8
|
+
var(--_skf-card-border-color, var(--skf-border-color-tertiary));
|
9
|
+
border-radius: var(--skf-border-radius-sm);
|
10
|
+
box-shadow: var(--skf-shadow-md);
|
11
|
+
contain: layout;
|
12
|
+
padding: var(--_skf-card-padding, var(--skf-spacing-100));
|
13
|
+
}
|
14
|
+
}
|
4
15
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
:host([stretch]) {
|
10
|
-
block-size: 100%;
|
11
|
-
}
|
12
|
-
|
13
|
-
.card {
|
14
|
-
background-color: var(--skf-bg-color-neutral-1);
|
15
|
-
border: var(--skf-border-width-sm) solid
|
16
|
-
var(--_skf-card-border-color, var(--skf-border-color-tertiary));
|
17
|
-
border-radius: var(--skf-border-radius-sm);
|
18
|
-
box-shadow: var(--skf-shadow-md);
|
19
|
-
padding: var(--_skf-card-padding, var(--skf-spacing-100));
|
20
|
-
}
|
21
|
-
|
22
|
-
.card--no-border {
|
23
|
-
--_skf-card-border-color: transparent;
|
24
|
-
}
|
16
|
+
@layer mods {
|
17
|
+
:host([stretch]) {
|
18
|
+
block-size: 100%;
|
19
|
+
}
|
25
20
|
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
:host([no-border]) {
|
22
|
+
--_skf-card-border-color: transparent;
|
23
|
+
}
|
29
24
|
|
30
|
-
|
31
|
-
|
25
|
+
:host([no-padding]) {
|
26
|
+
--_skf-card-padding: 0;
|
27
|
+
}
|
28
|
+
}
|
32
29
|
}
|
33
30
|
`;
|
34
31
|
export {
|
35
|
-
|
32
|
+
s as styles
|
36
33
|
};
|
@@ -7,8 +7,8 @@ import { type CSSResultGroup } from 'lit';
|
|
7
7
|
*
|
8
8
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/94464f-checkbox) 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
|
*
|
@@ -24,14 +24,14 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
24
24
|
*/
|
25
25
|
private _initiallyChecked;
|
26
26
|
/** If defined, outputs helping hints in console */
|
27
|
-
debug
|
27
|
+
debug: boolean;
|
28
28
|
/** If true, outputs helping hints in console */
|
29
|
-
get checked(): boolean
|
30
|
-
set checked(value: boolean
|
29
|
+
get checked(): boolean;
|
30
|
+
set checked(value: boolean);
|
31
31
|
/** If true, forces component to invalid state until removed */
|
32
|
-
customInvalid
|
32
|
+
customInvalid: boolean;
|
33
33
|
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
34
|
-
indeterminate
|
34
|
+
indeterminate: boolean;
|
35
35
|
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
36
36
|
label?: string;
|
37
37
|
/** If defined, adds name to the input-element */
|
@@ -44,7 +44,7 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
44
44
|
*/
|
45
45
|
severity?: FormFieldBaseProps['severity'];
|
46
46
|
/** If true, displays valid state after interaction */
|
47
|
-
showValid
|
47
|
+
showValid: boolean;
|
48
48
|
/** Size of the checkbox */
|
49
49
|
size: 'sm' | 'md';
|
50
50
|
/** The current value of the input field */
|
@@ -14,7 +14,7 @@ var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s
|
|
14
14
|
};
|
15
15
|
const d = class d extends p {
|
16
16
|
constructor() {
|
17
|
-
super(...arguments), this._initiallyChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (t) => {
|
17
|
+
super(...arguments), this._initiallyChecked = !1, this.debug = !1, this.customInvalid = !1, this.indeterminate = !1, this.showValid = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (t) => {
|
18
18
|
t.stopPropagation(), this.checked = this._initiallyChecked, this.$input && (this.$input.checked = !!this._initiallyChecked), this.setFormValue(this.checked ? this.value : null);
|
19
19
|
}, this._renderIcon = (t) => c`
|
20
20
|
<skf-icon color="inverse" name=${t} size=${this.size === "sm" ? "sm" : "md"}></skf-icon>
|
@@ -50,7 +50,7 @@ const d = class d extends p {
|
|
50
50
|
var t;
|
51
51
|
(t = this.$input) == null || t.addEventListener("change", (s) => {
|
52
52
|
var a;
|
53
|
-
s.stopPropagation(), this.pristine = !1, this.checked = (a = this.$input) == null ? void 0 : a.checked, this._validateInput(), this.checked ? (this.indeterminate = !1, this.setFormValue(this.value)) : this.setFormValue(null), this.emitEvent("change");
|
53
|
+
s.stopPropagation(), this.pristine = !1, this.checked = ((a = this.$input) == null ? void 0 : a.checked) ?? !1, this._validateInput(), this.checked ? (this.indeterminate = !1, this.setFormValue(this.value)) : this.setFormValue(null), this.emitEvent("change");
|
54
54
|
}), this.addEventListener("invalid", (s) => {
|
55
55
|
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
|
56
56
|
}), this._initiallyChecked = this.checked, this.addEventListener("reset", this._resetValue), this._validateInput();
|
@@ -77,7 +77,7 @@ const d = class d extends p {
|
|
77
77
|
?checked=${this.checked}
|
78
78
|
?disabled=${this.disabled}
|
79
79
|
?required=${this.required}
|
80
|
-
.indeterminate=${this.indeterminate
|
80
|
+
.indeterminate=${this.indeterminate}
|
81
81
|
aria-invalid=${!!this._invalid}
|
82
82
|
name=${_(this.name)}
|
83
83
|
type="checkbox"
|
@@ -4,7 +4,7 @@ import h from "../../styles/component.styles.js";
|
|
4
4
|
import { property as s } from "lit/decorators.js";
|
5
5
|
import { classMap as m } from "lit/directives/class-map.js";
|
6
6
|
import { ifDefined as f } from "lit/directives/if-defined.js";
|
7
|
-
import {
|
7
|
+
import { unsafeStatic as d, html as u } from "lit/static-html.js";
|
8
8
|
import _ from "./collapse.styles.js";
|
9
9
|
var y = Object.defineProperty, a = (i, n, r, g) => {
|
10
10
|
for (var t = void 0, l = i.length - 1, p; l >= 0; l--)
|
@@ -38,6 +38,11 @@ export declare class SkfDatePickerCalendar extends SkfElement {
|
|
38
38
|
/** @internal */
|
39
39
|
_numberOfDaysLastMonth: number;
|
40
40
|
firstUpdated(): void;
|
41
|
+
_listenToKeyboard: () => {
|
42
|
+
start: () => void;
|
43
|
+
stop: () => void;
|
44
|
+
};
|
45
|
+
_handleKeyDown: (e: KeyboardEvent) => void;
|
41
46
|
/** For single select, the selected date */
|
42
47
|
attributeChangedCallback(name: string, oldVal: unknown, newVal: unknown): void;
|
43
48
|
/** @internal */
|