@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,10 +1,10 @@
|
|
1
|
-
import type { SkfBreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.component.js';
|
2
1
|
import { SkfElement } from '../../internal/components/skf-element';
|
3
2
|
import { type CSSResultGroup } from 'lit';
|
3
|
+
import type { SkfBreadcrumbItem } from './breadcrumb-item.component.js';
|
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
|
*
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { SkfElement as c } from "../../internal/components/skf-element.js";
|
2
|
+
import { componentStyles as f } from "../../styles/component.styles.js";
|
3
|
+
import "lit";
|
4
|
+
import { property as p, state as _, queryAssignedElements as d } from "lit/decorators.js";
|
5
|
+
import { classMap as y } from "lit/directives/class-map.js";
|
6
|
+
import { ifDefined as u } from "lit/directives/if-defined.js";
|
7
|
+
import { literal as h, html as b } from "lit/static-html.js";
|
8
|
+
import { styles as g } from "./breadcrumb.styles.js";
|
9
|
+
var v = Object.defineProperty, r = (a, t, i, n) => {
|
10
|
+
for (var s = void 0, l = a.length - 1, m; l >= 0; l--)
|
11
|
+
(m = a[l]) && (s = m(t, i, s) || s);
|
12
|
+
return s && v(t, i, s), s;
|
13
|
+
};
|
14
|
+
const o = class o extends c {
|
15
|
+
constructor() {
|
16
|
+
super(...arguments), this.label = "Breadcrumb", this.size = "md", this._isDynamic = !1, this._handleSlotChange = () => {
|
17
|
+
this._items.forEach((t, i) => {
|
18
|
+
this._isDynamic = !!t.href;
|
19
|
+
const n = i === this._items.length - 1;
|
20
|
+
this._isDynamic && n && (t._isCurrent = !0);
|
21
|
+
});
|
22
|
+
};
|
23
|
+
}
|
24
|
+
firstUpdated() {
|
25
|
+
this._handleSlotChange();
|
26
|
+
}
|
27
|
+
render() {
|
28
|
+
const t = this._isDynamic ? h`nav` : h`div`;
|
29
|
+
return b`
|
30
|
+
<${t}
|
31
|
+
aria-label=${u(this.label && this._isDynamic ? this.label : void 0)}
|
32
|
+
class=${y({
|
33
|
+
breadcrumb: !0,
|
34
|
+
"breadcrumb--small": this.size === "sm"
|
35
|
+
})}
|
36
|
+
>
|
37
|
+
<ol class="breadcrumb__list">
|
38
|
+
<slot @slotchange=${this._handleSlotChange}></slot>
|
39
|
+
</ol>
|
40
|
+
</{tag}>
|
41
|
+
`;
|
42
|
+
}
|
43
|
+
};
|
44
|
+
o.styles = [f, g];
|
45
|
+
let e = o;
|
46
|
+
r([
|
47
|
+
p()
|
48
|
+
], e.prototype, "label");
|
49
|
+
r([
|
50
|
+
p({ reflect: !0 })
|
51
|
+
], e.prototype, "size");
|
52
|
+
r([
|
53
|
+
_()
|
54
|
+
], e.prototype, "_isDynamic");
|
55
|
+
r([
|
56
|
+
d()
|
57
|
+
], e.prototype, "_items");
|
58
|
+
export {
|
59
|
+
e as SkfBreadcrumb
|
60
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { css as t } from "lit";
|
2
|
+
const s = t`
|
3
|
+
/* stylelint-disable selector-class-pattern */
|
4
|
+
@layer components {
|
5
|
+
:host {
|
6
|
+
contain: layout;
|
7
|
+
}
|
8
|
+
|
9
|
+
.breadcrumb--small {
|
10
|
+
font-size: var(--skf-font-size-75);
|
11
|
+
font-weight: var(--skf-font-weight-medium);
|
12
|
+
}
|
13
|
+
|
14
|
+
.breadcrumb__list {
|
15
|
+
align-items: center;
|
16
|
+
display: flex;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
`;
|
20
|
+
export {
|
21
|
+
s as styles
|
22
|
+
};
|
@@ -1,18 +1,23 @@
|
|
1
|
-
import type { SkfIcon } from '../icon/icon.component.js';
|
2
1
|
import '../icon/icon.js';
|
3
2
|
import '../loader/loader.js';
|
4
3
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
4
|
+
import type { Icon } from '../../internal/types.js';
|
5
5
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
6
|
+
type SkfButtonType = HTMLButtonElement['type'];
|
6
7
|
/**
|
7
8
|
* Component to be used in forms or for interactivity
|
8
9
|
*
|
10
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/02493d-buttons) for design principles
|
11
|
+
*
|
9
12
|
* @slot - The Primary content
|
10
13
|
*
|
11
|
-
* @event click - Fires when the button is clicked
|
14
|
+
* @event {CustomEvent} click - Fires when the button is clicked
|
12
15
|
*
|
13
16
|
* @tagname skf-button
|
14
17
|
*/
|
15
18
|
export declare class SkfButton extends SkfElement {
|
19
|
+
#private;
|
20
|
+
static styles: CSSResultGroup;
|
16
21
|
static formAssociated: boolean;
|
17
22
|
static shadowRootOptions: {
|
18
23
|
delegatesFocus: boolean;
|
@@ -20,18 +25,15 @@ export declare class SkfButton extends SkfElement {
|
|
20
25
|
serializable?: boolean;
|
21
26
|
slotAssignment?: SlotAssignmentMode;
|
22
27
|
};
|
23
|
-
static styles: CSSResultGroup;
|
24
28
|
/** @internal */
|
25
29
|
private _transitionOptions;
|
26
|
-
_internals: ElementInternals;
|
27
30
|
/** If true, gives destructive appearance. **Notice!** Only applicable if `variant` is `primary`. */
|
28
31
|
destructive: boolean;
|
29
32
|
/** If true, removes border */
|
30
33
|
disabled: boolean;
|
31
34
|
/** If provided, renders an icon before or after the text */
|
32
|
-
|
33
|
-
|
34
|
-
/** If true, removes border */
|
35
|
+
icon?: Icon;
|
36
|
+
/** If true, button will take a square shape */
|
35
37
|
iconOnly: boolean;
|
36
38
|
/** Determines the positioning of the icon in relation to the text */
|
37
39
|
iconPosition: 'left' | 'right';
|
@@ -39,10 +41,9 @@ export declare class SkfButton extends SkfElement {
|
|
39
41
|
loading: boolean;
|
40
42
|
noValidate: boolean;
|
41
43
|
/** If provided, displays an alternative size */
|
42
|
-
size
|
44
|
+
size?: 'sm' | 'md' | 'lg';
|
43
45
|
/** If provided, changes the button type */
|
44
|
-
|
45
|
-
type: HTMLButtonElement['type'];
|
46
|
+
type: SkfButtonType;
|
46
47
|
/** If provided, alters the appearance */
|
47
48
|
variant: 'primary' | 'secondary' | 'tertiary';
|
48
49
|
/** @internal */
|
@@ -55,6 +56,7 @@ export declare class SkfButton extends SkfElement {
|
|
55
56
|
private $button?;
|
56
57
|
constructor();
|
57
58
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
59
|
+
/** @internal */
|
58
60
|
_handleLoadingChange(): void;
|
59
61
|
/** @internal */
|
60
62
|
_handleClick: (e: MouseEvent) => void;
|
@@ -72,3 +74,4 @@ export declare class SkfButton extends SkfElement {
|
|
72
74
|
private _renderIcon;
|
73
75
|
render(): import("lit").TemplateResult<1>;
|
74
76
|
}
|
77
|
+
export {};
|
@@ -1,33 +1,40 @@
|
|
1
|
+
var u = (i) => {
|
2
|
+
throw TypeError(i);
|
3
|
+
};
|
4
|
+
var _ = (i, s, t) => s.has(i) || u("Cannot " + t);
|
5
|
+
var p = (i, s, t) => (_(i, s, "read from private field"), t ? t.call(i) : s.get(i)), v = (i, s, t) => s.has(i) ? u("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), $ = (i, s, t, a) => (_(i, s, "write to private field"), a ? a.call(i, t) : s.set(i, t), t);
|
1
6
|
import "../icon/icon.js";
|
2
7
|
import "../loader/loader.js";
|
3
|
-
import { SkfElement as
|
4
|
-
import { watch as
|
5
|
-
import
|
6
|
-
import { html as
|
7
|
-
import { property as
|
8
|
-
import { classMap as
|
9
|
-
import { ifDefined as
|
10
|
-
import
|
11
|
-
var
|
12
|
-
for (var
|
13
|
-
(
|
14
|
-
return
|
15
|
-
};
|
16
|
-
const
|
8
|
+
import { SkfElement as O } from "../../internal/components/skf-element.js";
|
9
|
+
import { watch as V } from "../../internal/helpers/watch.js";
|
10
|
+
import { componentStyles as w } from "../../styles/component.styles.js";
|
11
|
+
import { html as y, LitElement as z, nothing as b } from "lit";
|
12
|
+
import { property as r, state as P, query as m } from "lit/decorators.js";
|
13
|
+
import { classMap as L } from "lit/directives/class-map.js";
|
14
|
+
import { ifDefined as g } from "lit/directives/if-defined.js";
|
15
|
+
import { styles as C } from "./button.styles.js";
|
16
|
+
var F = Object.defineProperty, k = Object.getOwnPropertyDescriptor, o = (i, s, t, a) => {
|
17
|
+
for (var n = a > 1 ? void 0 : a ? k(s, t) : s, h = i.length - 1, d; h >= 0; h--)
|
18
|
+
(d = i[h]) && (n = (a ? d(s, t, n) : d(n)) || n);
|
19
|
+
return a && n && F(s, t, n), n;
|
20
|
+
}, l;
|
21
|
+
const c = class c extends O {
|
17
22
|
constructor() {
|
18
|
-
super()
|
23
|
+
super();
|
24
|
+
v(this, l);
|
25
|
+
this._transitionOptions = {
|
19
26
|
duration: 200,
|
20
27
|
fill: "forwards"
|
21
28
|
}, this.destructive = !1, this.disabled = !1, this.iconOnly = !1, this.iconPosition = "left", this.loading = !1, this.noValidate = !1, this.size = "md", this.type = "button", this.variant = "primary", this._loaderVisible = !1, this._handleClick = (t) => {
|
22
29
|
t.preventDefault(), t.stopPropagation(), !(this.disabled || this.loading) && (this.dispatchEvent(new CustomEvent("click", { bubbles: !0, composed: !0, detail: t })), this.type === "submit" && this._submitForm(), this.type === "reset" && this._resetForm());
|
23
30
|
}, this._submitForm = () => {
|
24
|
-
var
|
25
|
-
const t = !((
|
26
|
-
(
|
31
|
+
var h, d, f;
|
32
|
+
const t = !((h = p(this, l).form) != null && h.reportValidity()), a = !this.noValidate, n = !((d = p(this, l).form) != null && d.hasAttribute("no-validate"));
|
33
|
+
(a || n) && t || (f = p(this, l).form) == null || f.requestSubmit();
|
27
34
|
}, this._resetForm = () => {
|
28
35
|
var t;
|
29
|
-
(t = this.
|
30
|
-
}, this._renderIcon = () =>
|
36
|
+
(t = p(this, l).form) == null || t.reset();
|
37
|
+
}, this._renderIcon = () => y`<skf-icon class="skf-icon-host" name=${g(this.icon)}></skf-icon>`, $(this, l, this.attachInternals());
|
31
38
|
}
|
32
39
|
firstUpdated(t) {
|
33
40
|
if (t.has("loading") && this.loading) {
|
@@ -53,11 +60,12 @@ const h = class h extends m {
|
|
53
60
|
!this.$body || !this.$loader || (await this.$loader.animate({ opacity: 0 }, this._transitionOptions).finished, this._loaderVisible = !1, this.$body.animate({ opacity: 1 }, this._transitionOptions));
|
54
61
|
}
|
55
62
|
render() {
|
56
|
-
return
|
63
|
+
return y`
|
57
64
|
<button
|
58
65
|
?disabled=${this.disabled || this.loading}
|
66
|
+
@click=${this._handleClick}
|
59
67
|
aria-busy=${this.loading}
|
60
|
-
class=${
|
68
|
+
class=${L({
|
61
69
|
btn: !0,
|
62
70
|
"btn--destructive": this.destructive,
|
63
71
|
"btn--icon-only": this.iconOnly,
|
@@ -68,68 +76,67 @@ const h = class h extends m {
|
|
68
76
|
"btn--variant-secondary": this.variant === "secondary",
|
69
77
|
"btn--variant-tertiary": this.variant === "tertiary"
|
70
78
|
})}
|
71
|
-
type=${
|
72
|
-
@click=${this._handleClick}
|
79
|
+
type=${g(this.type)}
|
73
80
|
title=${/* An empty title prevents browser validation tooltips from appearing on hover */
|
74
81
|
this.title}
|
75
82
|
>
|
76
|
-
${this.variant === "primary" && this._loaderVisible ?
|
83
|
+
${this.variant === "primary" && this._loaderVisible ? y`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
|
77
84
|
<div class="btn__body" id="body">
|
78
|
-
${this.icon && this.iconPosition === "left" ? this._renderIcon() :
|
79
|
-
${this.iconOnly ?
|
80
|
-
${this.icon && this.iconPosition === "right" ? this._renderIcon() :
|
85
|
+
${this.icon && this.iconPosition === "left" ? this._renderIcon() : b}
|
86
|
+
${this.iconOnly ? b : y`<slot class="btn__label"></slot>`}
|
87
|
+
${this.icon && this.iconPosition === "right" ? this._renderIcon() : b}
|
81
88
|
</div>
|
82
89
|
</button>
|
83
90
|
`;
|
84
91
|
}
|
85
92
|
};
|
86
|
-
|
87
|
-
let
|
88
|
-
|
89
|
-
|
90
|
-
],
|
91
|
-
|
92
|
-
|
93
|
-
],
|
94
|
-
|
95
|
-
|
96
|
-
],
|
97
|
-
|
98
|
-
|
99
|
-
],
|
100
|
-
|
101
|
-
|
102
|
-
],
|
103
|
-
|
104
|
-
|
105
|
-
],
|
106
|
-
|
107
|
-
|
108
|
-
],
|
109
|
-
|
110
|
-
|
111
|
-
],
|
112
|
-
|
113
|
-
|
114
|
-
],
|
115
|
-
|
116
|
-
|
117
|
-
],
|
118
|
-
|
119
|
-
|
120
|
-
],
|
121
|
-
|
122
|
-
|
123
|
-
],
|
124
|
-
|
125
|
-
|
126
|
-
],
|
127
|
-
|
128
|
-
|
129
|
-
],
|
130
|
-
|
131
|
-
|
132
|
-
],
|
93
|
+
l = new WeakMap(), c.styles = [w, C], c.formAssociated = !0, c.shadowRootOptions = { ...z.shadowRootOptions, delegatesFocus: !0 };
|
94
|
+
let e = c;
|
95
|
+
o([
|
96
|
+
r({ type: Boolean })
|
97
|
+
], e.prototype, "destructive", 2);
|
98
|
+
o([
|
99
|
+
r({ type: Boolean })
|
100
|
+
], e.prototype, "disabled", 2);
|
101
|
+
o([
|
102
|
+
r()
|
103
|
+
], e.prototype, "icon", 2);
|
104
|
+
o([
|
105
|
+
r({ type: Boolean, attribute: "icon-only" })
|
106
|
+
], e.prototype, "iconOnly", 2);
|
107
|
+
o([
|
108
|
+
r({ attribute: "icon-position" })
|
109
|
+
], e.prototype, "iconPosition", 2);
|
110
|
+
o([
|
111
|
+
r({ type: Boolean, reflect: !0 })
|
112
|
+
], e.prototype, "loading", 2);
|
113
|
+
o([
|
114
|
+
r({ type: Boolean, attribute: "no-validate" })
|
115
|
+
], e.prototype, "noValidate", 2);
|
116
|
+
o([
|
117
|
+
r({ reflect: !0 })
|
118
|
+
], e.prototype, "size", 2);
|
119
|
+
o([
|
120
|
+
r()
|
121
|
+
], e.prototype, "type", 2);
|
122
|
+
o([
|
123
|
+
r({ reflect: !0 })
|
124
|
+
], e.prototype, "variant", 2);
|
125
|
+
o([
|
126
|
+
P()
|
127
|
+
], e.prototype, "_loaderVisible", 2);
|
128
|
+
o([
|
129
|
+
m("skf-loader")
|
130
|
+
], e.prototype, "$loader", 2);
|
131
|
+
o([
|
132
|
+
m("#body")
|
133
|
+
], e.prototype, "$body", 2);
|
134
|
+
o([
|
135
|
+
m("button")
|
136
|
+
], e.prototype, "$button", 2);
|
137
|
+
o([
|
138
|
+
V("loading", { afterUpdate: !0 })
|
139
|
+
], e.prototype, "_handleLoadingChange", 1);
|
133
140
|
export {
|
134
|
-
|
141
|
+
e as SkfButton
|
135
142
|
};
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
@@ -3,7 +3,7 @@ import { type CSSResultGroup } from 'lit';
|
|
3
3
|
/**
|
4
4
|
* The `<skf-card>` can be used to group related subjects in a container
|
5
5
|
*
|
6
|
-
*
|
6
|
+
* See [zeroheight](https://zeroheight.com/853e936c9/p/021eed-card) for design principles
|
7
7
|
*
|
8
8
|
* @slot - The card's main content
|
9
9
|
*
|
@@ -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 { componentStyles as 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
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import '../icon/icon.js';
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
|
+
import type { FormFieldSeverity } from '../../internal/types.js';
|
3
4
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
4
5
|
import { type CSSResultGroup } from 'lit';
|
5
6
|
/**
|
@@ -7,10 +8,10 @@ import { type CSSResultGroup } from 'lit';
|
|
7
8
|
*
|
8
9
|
* @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/94464f-checkbox) for design principles
|
9
10
|
*
|
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
|
11
|
+
* @attribute {boolean} [disabled=false] - If true, sets disabled state
|
12
|
+
* @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
|
12
13
|
*
|
13
|
-
* @event
|
14
|
+
* @event {Event} change - When the value of the input changes
|
14
15
|
*
|
15
16
|
* @slot - The Radios label. Alternatively, you can use the `label` attribute.
|
16
17
|
*
|
@@ -24,27 +25,24 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
24
25
|
*/
|
25
26
|
private _initiallyChecked;
|
26
27
|
/** If defined, outputs helping hints in console */
|
27
|
-
debug
|
28
|
+
debug: boolean;
|
28
29
|
/** If true, outputs helping hints in console */
|
29
|
-
get checked(): boolean
|
30
|
-
set checked(value: boolean
|
30
|
+
get checked(): boolean;
|
31
|
+
set checked(value: boolean);
|
31
32
|
/** If true, forces component to invalid state until removed */
|
32
|
-
customInvalid
|
33
|
+
customInvalid: boolean;
|
33
34
|
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
34
|
-
indeterminate
|
35
|
+
indeterminate: boolean;
|
35
36
|
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
36
37
|
label?: string;
|
37
38
|
/** If defined, adds name to the input-element */
|
38
39
|
name?: string;
|
39
40
|
/** If defined, renders an alternative A11y text for the asterisk */
|
40
41
|
requiredLabel?: string;
|
41
|
-
/**
|
42
|
-
|
43
|
-
* @type { "alert" | "success" | "info" | "warning" }
|
44
|
-
*/
|
45
|
-
severity?: FormFieldBaseProps['severity'];
|
42
|
+
/** If defined, styles checkbox using provided severity */
|
43
|
+
severity?: FormFieldSeverity;
|
46
44
|
/** If true, displays valid state after interaction */
|
47
|
-
showValid
|
45
|
+
showValid: boolean;
|
48
46
|
/** Size of the checkbox */
|
49
47
|
size: 'sm' | 'md';
|
50
48
|
/** The current value of the input field */
|
@@ -54,9 +52,13 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
54
52
|
private _invalid;
|
55
53
|
/** @internal */
|
56
54
|
private $input?;
|
55
|
+
/** @internal */
|
57
56
|
handleCheckedChange(): void;
|
57
|
+
/** @internal */
|
58
58
|
handleInvalidChange(): void;
|
59
|
+
/** @internal */
|
59
60
|
handleDebugInvalid(): void;
|
61
|
+
/** @internal */
|
60
62
|
handleCustomInvalidChange(): void;
|
61
63
|
protected firstUpdated(): void;
|
62
64
|
/** @internal */
|
@@ -2,11 +2,11 @@ import "../icon/icon.js";
|
|
2
2
|
import { FormBase as p } from "../../internal/components/formBase.js";
|
3
3
|
import { watch as h } from "../../internal/helpers/watch.js";
|
4
4
|
import { Asterisk as v } from "../../internal/templates/asterisk.js";
|
5
|
-
import m from "../../styles/component.styles.js";
|
5
|
+
import { componentStyles as m } from "../../styles/component.styles.js";
|
6
6
|
import { html as c, nothing as f } from "lit";
|
7
7
|
import { property as r, state as y, query as g } from "lit/decorators.js";
|
8
8
|
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
9
|
-
import b from "./checkbox.styles.js";
|
9
|
+
import { styles as b } from "./checkbox.styles.js";
|
10
10
|
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s, a) => {
|
11
11
|
for (var l = a > 1 ? void 0 : a ? $(t, s) : t, n = u.length - 1, o; n >= 0; n--)
|
12
12
|
(o = u[n]) && (l = (a ? o(t, s, l) : o(l)) || l);
|
@@ -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"
|
@@ -1,2 +1 @@
|
|
1
|
-
declare const
|
2
|
-
export default _default;
|
1
|
+
export declare const styles: import("lit").CSSResult[];
|