@skf-design-system/ui-components 1.0.2-beta.1 → 1.0.2-beta.10
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 +25 -1
- package/dist/components/accordion/accordion-item.component.js +49 -38
- package/dist/components/accordion/accordion.component.d.ts +2 -2
- package/dist/components/accordion/accordion.component.js +12 -12
- package/dist/components/alert/alert.component.d.ts +8 -3
- package/dist/components/alert/alert.component.js +59 -50
- package/dist/components/alert/alert.styles.js +51 -47
- package/dist/components/breadcrumb/breadcrumb-item.component.js +30 -32
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb-item.styles.js +16 -15
- package/dist/components/breadcrumb/breadcrumb.component.d.ts +5 -2
- package/dist/components/breadcrumb/breadcrumb.component.js +51 -46
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.styles.js +13 -10
- package/dist/components/button/button.component.js +63 -67
- package/dist/components/button/button.styles.js +5 -4
- package/dist/components/card/card.component.d.ts +5 -0
- package/dist/components/card/card.component.js +46 -24
- package/dist/components/card/card.styles.js +31 -14
- package/dist/components/checkbox/checkbox.component.d.ts +6 -5
- package/dist/components/checkbox/checkbox.component.js +67 -69
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
- package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
- package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
- package/dist/components/datepicker/datepicker-calendar.js +6 -0
- package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
- package/dist/components/datepicker/datepicker-popup.component.js +272 -0
- package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
- package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
- package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
- package/dist/components/datepicker/datepicker-popup.js +6 -0
- package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
- package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +21 -14
- package/dist/components/datepicker/datepicker.component.js +455 -0
- package/dist/components/datepicker/datepicker.d.ts +8 -0
- package/dist/components/datepicker/datepicker.js +6 -0
- package/dist/components/dialog/dialog.component.d.ts +3 -2
- package/dist/components/dialog/dialog.component.js +49 -49
- package/dist/components/dialog/dialog.d.ts +2 -2
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +9 -9
- package/dist/components/drawer/drawer.component.d.ts +12 -4
- package/dist/components/drawer/drawer.component.js +84 -61
- package/dist/components/drawer/drawer.d.ts +2 -2
- package/dist/components/drawer/drawer.styles.js +47 -40
- package/dist/components/header/header.component.d.ts +4 -2
- package/dist/components/header/header.component.js +64 -57
- package/dist/components/header/header.d.ts +2 -2
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/heading/heading.component.d.ts +5 -1
- package/dist/components/heading/heading.component.js +54 -27
- package/dist/components/heading/heading.styles.js +34 -36
- package/dist/components/icon/icon.component.d.ts +4 -0
- package/dist/components/icon/icon.component.js +62 -43
- package/dist/components/icon/icon.styles.js +60 -60
- package/dist/components/input/input.component.d.ts +4 -8
- package/dist/components/input/input.component.js +90 -97
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +14 -19
- package/dist/components/link/link.component.d.ts +15 -18
- package/dist/components/link/link.component.js +104 -107
- package/dist/components/link/link.styles.js +53 -45
- package/dist/components/loader/loader.component.d.ts +5 -3
- package/dist/components/loader/loader.component.js +39 -28
- package/dist/components/loader/loader.styles.js +6 -10
- package/dist/components/logo/logo.component.d.ts +4 -1
- package/dist/components/logo/logo.component.js +55 -51
- package/dist/components/logo/logo.styles.js +26 -16
- package/dist/components/menu/menu-item.component.d.ts +1 -1
- package/dist/components/menu/menu-item.component.js +8 -8
- package/dist/components/menu/menu-item.d.ts +2 -2
- package/dist/components/menu/menu-item.styles.js +13 -9
- package/dist/components/menu/menu.component.d.ts +5 -2
- package/dist/components/menu/menu.component.js +8 -8
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/nav/nav-item.component.d.ts +6 -2
- package/dist/components/nav/nav-item.component.js +44 -25
- package/dist/components/nav/nav-item.styles.js +29 -25
- package/dist/components/nav/nav.component.d.ts +9 -0
- package/dist/components/nav/nav.component.js +47 -21
- package/dist/components/nav/nav.d.ts +2 -2
- package/dist/components/nav/nav.styles.js +15 -9
- package/dist/components/popover/popover.component.d.ts +10 -3
- package/dist/components/popover/popover.component.js +30 -22
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/progress/progress.component.d.ts +2 -0
- package/dist/components/progress/progress.component.js +38 -29
- package/dist/components/progress/progress.d.ts +2 -2
- package/dist/components/progress/progress.styles.js +10 -8
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +96 -91
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.d.ts +2 -2
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button.component.js +22 -24
- package/dist/components/segmented-button/segmented-button.d.ts +2 -2
- package/dist/components/select/select-option-group.component.d.ts +4 -0
- package/dist/components/select/select-option-group.component.js +37 -18
- package/dist/components/select/select-option-group.d.ts +2 -2
- package/dist/components/select/select-option-group.style.js +12 -6
- package/dist/components/select/select-option.component.d.ts +9 -4
- package/dist/components/select/select-option.component.js +70 -58
- package/dist/components/select/select-option.styles.js +43 -31
- package/dist/components/select/select.component.d.ts +21 -12
- package/dist/components/select/select.component.js +125 -87
- package/dist/components/select/select.controllers.js +15 -20
- package/dist/components/select/select.styles.js +8 -2
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +59 -56
- package/dist/components/stepper/stepper-item.d.ts +2 -2
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/stepper/stepper.component.js +2 -3
- package/dist/components/stepper/stepper.d.ts +2 -2
- package/dist/components/stepper/stepper.helpers.js +6 -7
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -58
- package/dist/components/switch/switch.d.ts +2 -2
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +39 -0
- package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
- package/dist/components/{tab → tabs}/tab.component.js +17 -14
- package/dist/components/{tab → tabs}/tab.d.ts +2 -2
- package/dist/components/{tab → tabs}/tab.styles.js +2 -2
- package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
- package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +35 -36
- package/dist/components/tabs/tabs.d.ts +8 -0
- package/dist/components/tabs/tabs.js +6 -0
- package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
- package/dist/components/tag/tag.component.d.ts +10 -2
- package/dist/components/tag/tag.component.js +77 -65
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.styles.js +63 -50
- package/dist/components/textarea/textarea.component.d.ts +4 -2
- package/dist/components/textarea/textarea.component.js +102 -95
- package/dist/components/toast/toast-item.styles.js +13 -10
- package/dist/components/toast/toast.component.js +9 -9
- package/dist/components/toast/toast.singleton.d.ts +1 -1
- package/dist/components/toast/toast.singleton.js +19 -20
- package/dist/components/tooltip/tooltip.component.d.ts +9 -2
- package/dist/components/tooltip/tooltip.component.js +15 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +1681 -1112
- package/dist/index.d.ts +8 -7
- package/dist/index.js +96 -93
- package/dist/internal/base-classes/popover/popover.base.d.ts +24 -5
- package/dist/internal/base-classes/popover/popover.base.js +41 -44
- package/dist/internal/base-classes/popover/popover.styles.js +4 -5
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -19
- package/dist/internal/components/hint/hint.component.d.ts +4 -0
- package/dist/internal/components/hint/hint.component.js +47 -20
- package/dist/internal/components/hint/hint.styles.js +29 -25
- package/dist/internal/components/skf-element.d.ts +1 -3
- package/dist/internal/components/skf-element.js +4 -9
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/controllers/popover.controller.js +11 -14
- package/dist/internal/helpers/stateMap.d.ts +14 -0
- package/dist/internal/helpers/stateMap.js +68 -0
- package/dist/internal/helpers/uuid.d.ts +8 -10
- package/dist/internal/helpers/uuid.js +4 -11
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/helpers/watch.js +12 -12
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +4 -4
- package/dist/internal/types.d.ts +4 -0
- package/dist/styles/component.styles.js +37 -36
- package/dist/styles/global-alt.css +1 -0
- package/dist/styles/global.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +27 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.js +27 -0
- package/dist/translations/index.d.ts +4 -0
- package/dist/translations/pt.d.ts +3 -0
- package/dist/translations/pt.js +27 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.js +27 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +1988 -866
- package/dist/types/vue/index.d.ts +220 -169
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +265 -188
- package/dist/web-types.json +731 -548
- package/package.json +38 -51
- package/dist/components/accordion/accordion-item.test.d.ts +0 -1
- package/dist/components/accordion/accordion.test.d.ts +0 -1
- package/dist/components/checkbox/checkbox.test.d.ts +0 -1
- package/dist/components/date-picker/datepicker.component.js +0 -261
- package/dist/components/date-picker/datepicker.d.ts +0 -10
- package/dist/components/date-picker/datepicker.helpers.js +0 -76
- package/dist/components/date-picker/datepicker.js +0 -8
- package/dist/components/date-picker-input/datepicker-input.component.js +0 -442
- package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
- package/dist/components/date-picker-input/datepicker-input.js +0 -6
- package/dist/components/input/input.test.d.ts +0 -1
- package/dist/components/radio/radio.test.d.ts +0 -1
- package/dist/components/switch/switch.test.d.ts +0 -1
- package/dist/components/tab-group/tab-group.d.ts +0 -8
- package/dist/components/tab-group/tab-group.js +0 -6
- package/dist/components/tab-panel/tab-panel.component.js +0 -36
- package/dist/internal/playwright/index.d.ts +0 -1
- /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
- /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
- /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
- /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
- /package/dist/components/select/{select.stories.icons.d.ts → stories/select.stories.icons.d.ts} +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
- /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
- /package/dist/components/{tab → tabs}/tab.js +0 -0
- /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
- /package/dist/components/{tab-group/tab-group.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
@@ -2,6 +2,7 @@ import '../icon/icon.js';
|
|
2
2
|
import { FormBase } from '../../internal/components/formBase.js';
|
3
3
|
import type { FormFieldSeverity } from '../../internal/types.js';
|
4
4
|
import type { FormFieldBaseProps } from '../../internal/types/formField.js';
|
5
|
+
import { type Language } from '../../utilities/localize.js';
|
5
6
|
import { type CSSResultGroup } from 'lit';
|
6
7
|
/**
|
7
8
|
* The `<skf-checkbox>` component is used to create a checkbox input
|
@@ -18,6 +19,7 @@ import { type CSSResultGroup } from 'lit';
|
|
18
19
|
* @tagname skf-checkbox
|
19
20
|
*/
|
20
21
|
export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps {
|
22
|
+
#private;
|
21
23
|
static styles: CSSResultGroup;
|
22
24
|
/**
|
23
25
|
* @internal
|
@@ -27,18 +29,17 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
27
29
|
/** If defined, outputs helping hints in console */
|
28
30
|
debug: boolean;
|
29
31
|
/** If true, outputs helping hints in console */
|
30
|
-
|
31
|
-
set checked(value: boolean);
|
32
|
+
checked: boolean;
|
32
33
|
/** If true, forces component to invalid state until removed */
|
33
34
|
customInvalid: boolean;
|
34
35
|
/** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
|
35
36
|
indeterminate: boolean;
|
36
37
|
/** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
|
37
38
|
label?: string;
|
39
|
+
/** Sets the internal language of the component */
|
40
|
+
lang: Language;
|
38
41
|
/** If defined, adds name to the input-element */
|
39
42
|
name?: string;
|
40
|
-
/** If defined, renders an alternative A11y text for the asterisk */
|
41
|
-
requiredLabel?: string;
|
42
43
|
/** If defined, styles checkbox using provided severity */
|
43
44
|
severity?: FormFieldSeverity;
|
44
45
|
/** If true, displays valid state after interaction */
|
@@ -53,7 +54,7 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
|
|
53
54
|
/** @internal */
|
54
55
|
private $input?;
|
55
56
|
/** @internal */
|
56
|
-
|
57
|
+
_handleCheckedChange(): void;
|
57
58
|
/** @internal */
|
58
59
|
handleInvalidChange(): void;
|
59
60
|
/** @internal */
|
@@ -1,34 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
import { watch as h } from "../../internal/helpers/watch.js";
|
4
|
-
import { Asterisk as v } from "../../internal/templates/asterisk.js";
|
5
|
-
import { componentStyles as m } from "../../styles/component.styles.js";
|
6
|
-
import { html as c, nothing as f } from "lit";
|
7
|
-
import { property as r, state as y, query as g } from "lit/decorators.js";
|
8
|
-
import { ifDefined as _ } from "lit/directives/if-defined.js";
|
9
|
-
import { styles as b } from "./checkbox.styles.js";
|
10
|
-
var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, i = (u, t, s, a) => {
|
11
|
-
for (var l = a > 1 ? void 0 : a ? $(t, s) : t, n = u.length - 1, o; n >= 0; n--)
|
12
|
-
(o = u[n]) && (l = (a ? o(t, s, l) : o(l)) || l);
|
13
|
-
return a && l && k(t, s, l), l;
|
1
|
+
var c = (i) => {
|
2
|
+
throw TypeError(i);
|
14
3
|
};
|
15
|
-
|
4
|
+
var v = (i, s, t) => s.has(i) || c("Cannot " + t);
|
5
|
+
var m = (i, s, t) => (v(i, s, "read from private field"), t ? t.call(i) : s.get(i)), f = (i, s, t) => s.has(i) ? c("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), y = (i, s, t, l) => (v(i, s, "write to private field"), l ? l.call(i, t) : s.set(i, t), t);
|
6
|
+
import "../icon/icon.js";
|
7
|
+
import { FormBase as _ } from "../../internal/components/formBase.js";
|
8
|
+
import { watch as n } from "../../internal/helpers/watch.js";
|
9
|
+
import { Asterisk as b } from "../../internal/templates/asterisk.js";
|
10
|
+
import { componentStyles as k } from "../../styles/component.styles.js";
|
11
|
+
import { LocalizeController as $ } from "../../utilities/localize.js";
|
12
|
+
import { html as g, nothing as I } from "lit";
|
13
|
+
import { property as r, state as V, query as C } from "lit/decorators.js";
|
14
|
+
import { ifDefined as E } from "lit/directives/if-defined.js";
|
15
|
+
import { styles as w } from "./checkbox.styles.js";
|
16
|
+
var A = Object.defineProperty, D = Object.getOwnPropertyDescriptor, a = (i, s, t, l) => {
|
17
|
+
for (var h = l > 1 ? void 0 : l ? D(s, t) : s, d = i.length - 1, u; d >= 0; d--)
|
18
|
+
(u = i[d]) && (h = (l ? u(s, t, h) : u(h)) || h);
|
19
|
+
return l && h && A(s, t, h), h;
|
20
|
+
}, o;
|
21
|
+
const p = class p extends _ {
|
16
22
|
constructor() {
|
17
|
-
super(...arguments)
|
23
|
+
super(...arguments);
|
24
|
+
f(this, o);
|
25
|
+
this._initiallyChecked = !1, y(this, o, new $(this)), this.debug = !1, this.checked = !1, this.customInvalid = !1, this.indeterminate = !1, this.lang = "en", this.showValid = !1, this.size = "md", this.value = "", this._invalid = !1, this._resetValue = (t) => {
|
18
26
|
t.stopPropagation(), this.checked = this._initiallyChecked, this.$input && (this.$input.checked = !!this._initiallyChecked), this.setFormValue(this.checked ? this.value : null);
|
19
|
-
}, this._renderIcon = (t) =>
|
27
|
+
}, this._renderIcon = (t) => g`
|
20
28
|
<skf-icon color="inverse" name=${t} size=${this.size === "sm" ? "sm" : "md"}></skf-icon>
|
21
29
|
`;
|
22
30
|
}
|
23
|
-
|
24
|
-
|
25
|
-
return ((t = this.$input) == null ? void 0 : t.checked) ?? !1;
|
26
|
-
}
|
27
|
-
set checked(t) {
|
28
|
-
this.setAttribute("checked", String(!!t)), this.$input && (this.$input.checked = !!t);
|
29
|
-
}
|
30
|
-
handleCheckedChange() {
|
31
|
-
this.setFormValue(this.checked ? this.value : null), this._validateInput();
|
31
|
+
_handleCheckedChange() {
|
32
|
+
this.setFormValue(this.checked ? this.value : null), this._validateInput(), this.$input && (this.$input.checked = !!this.checked);
|
32
33
|
}
|
33
34
|
handleInvalidChange() {
|
34
35
|
this._invalid ? (this.setAttribute("invalid", ""), this.showValid && this.removeAttribute("valid"), this.checkValidity()) : (this.removeAttribute("invalid"), !this.pristine && this.showValid && this.setAttribute("valid", "true"));
|
@@ -38,40 +39,37 @@ const d = class d extends p {
|
|
38
39
|
}
|
39
40
|
handleCustomInvalidChange() {
|
40
41
|
if (this.customInvalid) {
|
41
|
-
const
|
42
|
+
const l = (
|
42
43
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
43
44
|
this.getAttribute("data-customerror") || "Set a custom error message using the data-customerror attribute"
|
44
45
|
);
|
45
|
-
this.pristine = !1, this._invalid = !0, this.setValidity({ customError: !0 },
|
46
|
+
this.pristine = !1, this._invalid = !0, this.setValidity({ customError: !0 }, l), this.checkValidity();
|
46
47
|
} else
|
47
48
|
this.setValidity({}), this._validateInput();
|
48
49
|
}
|
49
50
|
firstUpdated() {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}), this.addEventListener("invalid", (s) => {
|
55
|
-
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && s.preventDefault();
|
51
|
+
this.$input?.addEventListener("change", (t) => {
|
52
|
+
t.stopPropagation(), this.pristine = !1, this.checked = this.$input?.checked ?? !1, this._validateInput(), this.checked ? (this.indeterminate = !1, this.setFormValue(this.value)) : this.setFormValue(null), this.emitEvent("change");
|
53
|
+
}), this.addEventListener("invalid", (t) => {
|
54
|
+
this.pristine = !1, this._invalid = !0, this.customErrorDisplay && t.preventDefault();
|
56
55
|
}), this._initiallyChecked = this.checked, this.addEventListener("reset", this._resetValue), this._validateInput();
|
57
56
|
}
|
58
57
|
/** @internal */
|
59
58
|
_validateInput() {
|
60
|
-
var t;
|
61
59
|
if (this._invalid = !1, this.customInvalid)
|
62
60
|
this.setValidity({ customError: !0 }, "Custom error"), this._invalid = !0;
|
63
61
|
else if (this.required && !this.checked) {
|
64
62
|
this.pristine || (this._invalid = !0);
|
65
|
-
const
|
63
|
+
const t = this.hasAttribute("data-valuemissing") ? this.getAttribute("data-valuemissing") : (
|
66
64
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
67
|
-
|
65
|
+
this.$input?.validationMessage || "Please check this box if you want to proceed"
|
68
66
|
);
|
69
|
-
this.setValidity({ valueMissing: !0 }, String(
|
67
|
+
this.setValidity({ valueMissing: !0 }, String(t));
|
70
68
|
} else
|
71
69
|
this.setValidity({});
|
72
70
|
}
|
73
71
|
render() {
|
74
|
-
return
|
72
|
+
return g`
|
75
73
|
<label id="root">
|
76
74
|
<input
|
77
75
|
?checked=${this.checked}
|
@@ -79,71 +77,71 @@ const d = class d extends p {
|
|
79
77
|
?required=${this.required}
|
80
78
|
.indeterminate=${this.indeterminate}
|
81
79
|
aria-invalid=${!!this._invalid}
|
82
|
-
name=${
|
80
|
+
name=${E(this.name)}
|
83
81
|
type="checkbox"
|
84
82
|
value=${this.value}
|
85
83
|
/>
|
86
84
|
${this._renderIcon("check")} ${this._renderIcon("removeMinus")}
|
87
85
|
<div id="label">
|
88
86
|
<slot>${this.label}</slot>
|
89
|
-
${this.required ?
|
87
|
+
${this.required ? b(m(this, o).term("required")) : I}
|
90
88
|
</div>
|
91
89
|
</label>
|
92
90
|
`;
|
93
91
|
}
|
94
92
|
};
|
95
|
-
|
96
|
-
let e =
|
97
|
-
|
93
|
+
o = new WeakMap(), p.styles = [k, w];
|
94
|
+
let e = p;
|
95
|
+
a([
|
98
96
|
r({ type: Boolean })
|
99
97
|
], e.prototype, "debug", 2);
|
100
|
-
|
98
|
+
a([
|
101
99
|
r({ type: Boolean, reflect: !0 })
|
102
|
-
], e.prototype, "checked",
|
103
|
-
|
100
|
+
], e.prototype, "checked", 2);
|
101
|
+
a([
|
104
102
|
r({ type: Boolean, attribute: "custom-invalid", reflect: !0 })
|
105
103
|
], e.prototype, "customInvalid", 2);
|
106
|
-
|
104
|
+
a([
|
107
105
|
r({ type: Boolean, reflect: !0 })
|
108
106
|
], e.prototype, "indeterminate", 2);
|
109
|
-
|
107
|
+
a([
|
110
108
|
r()
|
111
109
|
], e.prototype, "label", 2);
|
112
|
-
|
110
|
+
a([
|
111
|
+
r({ type: String })
|
112
|
+
], e.prototype, "lang", 2);
|
113
|
+
a([
|
113
114
|
r()
|
114
115
|
], e.prototype, "name", 2);
|
115
|
-
|
116
|
-
r({ attribute: "required-label" })
|
117
|
-
], e.prototype, "requiredLabel", 2);
|
118
|
-
i([
|
116
|
+
a([
|
119
117
|
r({ reflect: !0 })
|
120
118
|
], e.prototype, "severity", 2);
|
121
|
-
|
119
|
+
a([
|
122
120
|
r({ type: Boolean, attribute: "show-valid" })
|
123
121
|
], e.prototype, "showValid", 2);
|
124
|
-
|
122
|
+
a([
|
125
123
|
r({ reflect: !0 })
|
126
124
|
], e.prototype, "size", 2);
|
127
|
-
|
125
|
+
a([
|
128
126
|
r()
|
129
127
|
], e.prototype, "value", 2);
|
130
|
-
|
131
|
-
|
128
|
+
a([
|
129
|
+
V()
|
132
130
|
], e.prototype, "_invalid", 2);
|
133
|
-
|
134
|
-
|
131
|
+
a([
|
132
|
+
C("input")
|
135
133
|
], e.prototype, "$input", 2);
|
136
|
-
|
137
|
-
|
138
|
-
], e.prototype, "
|
139
|
-
|
140
|
-
|
134
|
+
a([
|
135
|
+
n("checked")
|
136
|
+
], e.prototype, "_handleCheckedChange", 1);
|
137
|
+
a([
|
138
|
+
n("_invalid")
|
141
139
|
], e.prototype, "handleInvalidChange", 1);
|
142
|
-
|
143
|
-
|
140
|
+
a([
|
141
|
+
n("_invalid", { afterUpdate: !0 })
|
144
142
|
], e.prototype, "handleDebugInvalid", 1);
|
145
|
-
|
146
|
-
|
143
|
+
a([
|
144
|
+
n("customInvalid")
|
147
145
|
], e.prototype, "handleCustomInvalidChange", 1);
|
148
146
|
export {
|
149
147
|
e as SkfCheckbox
|
@@ -43,7 +43,7 @@ const i = [
|
|
43
43
|
}
|
44
44
|
|
45
45
|
&:is(:checked:not(:disabled), :indeterminate:not(:disabled)) {
|
46
|
-
--_skf-checkbox-bg-color: var(--skf-bg-color-
|
46
|
+
--_skf-checkbox-bg-color: var(--skf-bg-color-emphasized);
|
47
47
|
--_skf-checkbox-border-color: transparent;
|
48
48
|
}
|
49
49
|
|
@@ -1,12 +1,17 @@
|
|
1
1
|
import { SkfElement } from '../../internal/components/skf-element.js';
|
2
2
|
import { Temporal } from '@js-temporal/polyfill';
|
3
|
+
import { type Language } from '../../utilities/localize.js';
|
3
4
|
import { type CSSResultGroup } from 'lit';
|
4
5
|
interface DateParts {
|
5
6
|
year?: number;
|
6
7
|
month?: number;
|
7
8
|
day?: number;
|
8
9
|
}
|
9
|
-
|
10
|
+
/**
|
11
|
+
* @tagname skf-datepicker-calendar
|
12
|
+
*/
|
13
|
+
export declare class SkfDatepickerCalendar extends SkfElement {
|
14
|
+
#private;
|
10
15
|
static styles: CSSResultGroup;
|
11
16
|
/** @internal */
|
12
17
|
_secondCalendarOffset: number;
|
@@ -18,6 +23,8 @@ export declare class SkfDatePickerCalendar extends SkfElement {
|
|
18
23
|
* A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.
|
19
24
|
*/
|
20
25
|
invalidDates?: string;
|
26
|
+
/** Sets the internal language of the component */
|
27
|
+
lang: Language;
|
21
28
|
locale: string;
|
22
29
|
range: boolean;
|
23
30
|
/**
|