@sbb-esta/lyne-elements 2.3.0 → 2.4.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/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid.js +0 -1
- package/autocomplete.js +28 -28
- package/button/common/button-common.d.ts.map +1 -1
- package/calendar/calendar.d.ts +55 -11
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +374 -224
- package/card/common/card-action-common.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +1 -1
- package/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/core/controllers/escapable-overlay-controller.d.ts +11 -0
- package/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
- package/core/controllers.d.ts +1 -0
- package/core/controllers.d.ts.map +1 -1
- package/core/controllers.js +73 -47
- package/core/datetime/date-adapter.d.ts +4 -2
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +51 -43
- package/core/decorators/date-converter.d.ts +8 -0
- package/core/decorators/date-converter.d.ts.map +1 -0
- package/core/decorators/date-only-type.d.ts +8 -0
- package/core/decorators/date-only-type.d.ts.map +1 -0
- package/core/decorators/get-override.d.ts.map +1 -1
- package/core/decorators/handle-distinct-change.d.ts.map +1 -1
- package/core/decorators/host-attributes.d.ts.map +1 -1
- package/core/decorators/slot-state.d.ts.map +1 -1
- package/core/decorators.d.ts +2 -0
- package/core/decorators.d.ts.map +1 -1
- package/core/decorators.js +52 -31
- package/core/dom/input-element.d.ts +1 -1
- package/core/dom/input-element.d.ts.map +1 -1
- package/core/dom.js +5 -5
- package/core/eventing/throttle.d.ts.map +1 -1
- package/core/i18n/i18n.d.ts +4 -0
- package/core/i18n/i18n.d.ts.map +1 -1
- package/core/i18n.js +87 -63
- package/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-input-mixin.d.ts +25 -0
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
- package/core/mixins/form-associated-mixin.d.ts +13 -0
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/core/mixins/hydration-mixin.d.ts.map +1 -1
- package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/core/mixins/negative-mixin.d.ts.map +1 -1
- package/core/mixins/panel-mixin.d.ts.map +1 -1
- package/core/mixins/required-mixin.d.ts.map +1 -1
- package/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
- package/core/mixins.d.ts +1 -0
- package/core/mixins.d.ts.map +1 -1
- package/core/mixins.js +518 -333
- package/core/styles/core.scss +3 -1
- package/core/testing/mocha-extensions.d.ts.map +1 -1
- package/core/testing/wait-for-render.d.ts.map +1 -1
- package/core.css +2 -2
- package/custom-elements.json +18176 -14267
- package/date-input/date-input.d.ts +67 -0
- package/date-input/date-input.d.ts.map +1 -0
- package/date-input.d.ts +2 -0
- package/date-input.d.ts.map +1 -0
- package/date-input.js +149 -0
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +49 -45
- package/datepicker/datepicker/datepicker.d.ts +16 -6
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +41 -38
- package/datepicker/datepicker.js +94 -76
- package/development/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid.js +1 -2
- package/development/autocomplete.js +9 -4
- package/development/button/common/button-common.d.ts.map +1 -1
- package/development/calendar/calendar.d.ts +55 -11
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +301 -87
- package/development/card/common/card-action-common.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +2 -2
- package/development/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/development/core/controllers/escapable-overlay-controller.d.ts +11 -0
- package/development/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
- package/development/core/controllers.d.ts +1 -0
- package/development/core/controllers.d.ts.map +1 -1
- package/development/core/controllers.js +36 -1
- package/development/core/datetime/date-adapter.d.ts +4 -2
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +14 -2
- package/development/core/decorators/date-converter.d.ts +8 -0
- package/development/core/decorators/date-converter.d.ts.map +1 -0
- package/development/core/decorators/date-only-type.d.ts +8 -0
- package/development/core/decorators/date-only-type.d.ts.map +1 -0
- package/development/core/decorators/get-override.d.ts.map +1 -1
- package/development/core/decorators/handle-distinct-change.d.ts.map +1 -1
- package/development/core/decorators/host-attributes.d.ts.map +1 -1
- package/development/core/decorators/slot-state.d.ts.map +1 -1
- package/development/core/decorators.d.ts +2 -0
- package/development/core/decorators.d.ts.map +1 -1
- package/development/core/decorators.js +23 -2
- package/development/core/dom/input-element.d.ts +1 -1
- package/development/core/dom/input-element.d.ts.map +1 -1
- package/development/core/dom.js +3 -3
- package/development/core/eventing/throttle.d.ts.map +1 -1
- package/development/core/i18n/i18n.d.ts +4 -0
- package/development/core/i18n/i18n.d.ts.map +1 -1
- package/development/core/i18n.js +29 -1
- package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-input-mixin.d.ts +25 -0
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
- package/development/core/mixins/form-associated-mixin.d.ts +13 -0
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/development/core/mixins/hydration-mixin.d.ts.map +1 -1
- package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/development/core/mixins/negative-mixin.d.ts.map +1 -1
- package/development/core/mixins/panel-mixin.d.ts.map +1 -1
- package/development/core/mixins/required-mixin.d.ts.map +1 -1
- package/development/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
- package/development/core/mixins.d.ts +1 -0
- package/development/core/mixins.d.ts.map +1 -1
- package/development/core/mixins.js +379 -88
- package/development/core/testing/mocha-extensions.d.ts.map +1 -1
- package/development/core/testing/wait-for-render.d.ts.map +1 -1
- package/development/date-input/date-input.d.ts +67 -0
- package/development/date-input/date-input.d.ts.map +1 -0
- package/development/date-input.d.ts +2 -0
- package/development/date-input.d.ts.map +1 -0
- package/development/date-input.js +259 -0
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +11 -2
- package/development/datepicker/datepicker/datepicker.d.ts +16 -6
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +12 -3
- package/development/datepicker/datepicker.js +65 -39
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog.js +3 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel.js +2 -2
- package/development/file-selector/common/file-selector-common.d.ts.map +1 -1
- package/development/form-field/form-field/form-field.d.ts +1 -1
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field.js +19 -13
- package/development/header/common/header-action-common.d.ts.map +1 -1
- package/development/icon/icon-name-mixin.d.ts.map +1 -1
- package/development/icon/icon-request.d.ts.map +1 -1
- package/development/icon/icon-validate.d.ts.map +1 -1
- package/development/link/common/block-link-common.d.ts.map +1 -1
- package/development/link/common/inline-link-common.d.ts.map +1 -1
- package/development/link/common/link-common.d.ts.map +1 -1
- package/development/menu/common/menu-action-common.d.ts.map +1 -1
- package/development/menu/menu/menu.d.ts +1 -1
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +5 -15
- package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/development/navigation/navigation/navigation.d.ts +1 -3
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation.js +8 -21
- package/development/overlay/overlay-base-element.d.ts +2 -2
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +6 -13
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/popover/popover/popover.d.ts +1 -1
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +5 -15
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +2 -2
- package/development/select/select.d.ts +3 -1
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +12 -8
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +2 -2
- package/development/stepper/step/step.d.ts +0 -2
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step.js +1 -16
- package/development/stepper/stepper/stepper.d.ts +11 -0
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +30 -3
- package/development/tag/tag/tag.d.ts +11 -0
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group/tag-group.d.ts +1 -1
- package/development/tag/tag-group/tag-group.d.ts.map +1 -1
- package/development/tag/tag-group.js +9 -3
- package/development/tag/tag.js +37 -10
- package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog.js +2 -2
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel.js +1 -1
- package/file-selector/common/file-selector-common.d.ts.map +1 -1
- package/form-field/form-field/form-field.d.ts +1 -1
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field.js +30 -24
- package/header/common/header-action-common.d.ts.map +1 -1
- package/icon/icon-name-mixin.d.ts.map +1 -1
- package/icon/icon-request.d.ts.map +1 -1
- package/icon/icon-validate.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/link/common/block-link-common.d.ts.map +1 -1
- package/link/common/inline-link-common.d.ts.map +1 -1
- package/link/common/link-common.d.ts.map +1 -1
- package/menu/common/menu-action-common.d.ts.map +1 -1
- package/menu/menu/menu.d.ts +1 -1
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +25 -34
- package/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/navigation/navigation/navigation.d.ts +1 -3
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation.js +45 -54
- package/overlay/overlay-base-element.d.ts +2 -2
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +57 -63
- package/package.json +6 -1
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/popover/popover/popover.d.ts +1 -1
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +101 -110
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +1 -1
- package/select/select.d.ts +3 -1
- package/select/select.d.ts.map +1 -1
- package/select.js +39 -37
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +1 -1
- package/standard-theme.css +2 -2
- package/stepper/step/step.d.ts +0 -2
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step.js +24 -36
- package/stepper/stepper/stepper.d.ts +11 -0
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +59 -41
- package/tag/tag/tag.d.ts +11 -0
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag-group/tag-group.d.ts +1 -1
- package/tag/tag-group/tag-group.d.ts.map +1 -1
- package/tag/tag-group.js +32 -29
- package/tag/tag.js +60 -41
- package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
package/core/mixins.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var F = (d) => {
|
|
2
|
+
throw TypeError(d);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { property as
|
|
8
|
-
import { forceType as
|
|
9
|
-
import { defaultConverter as
|
|
10
|
-
import { SbbLanguageController as
|
|
11
|
-
import { preventScrollOnSpacebarPress as
|
|
12
|
-
import { i18nCheckboxRequired as
|
|
13
|
-
import { isWebkit as
|
|
14
|
-
import { interactivityChecker as
|
|
4
|
+
var L = (d, v, c) => v.has(d) || F("Cannot " + c);
|
|
5
|
+
var C = (d, v, c) => (L(d, v, "read from private field"), c ? c.call(d) : v.get(d)), E = (d, v, c) => v.has(d) ? F("Cannot add the same private member more than once") : v instanceof WeakSet ? v.add(d) : v.set(d, c), S = (d, v, c, o) => (L(d, v, "write to private field"), o ? o.call(d, c) : v.set(d, c), c);
|
|
6
|
+
import { __esDecorate as y, __runInitializers as _ } from "tslib";
|
|
7
|
+
import { property as k, state as N, eventOptions as G } from "lit/decorators.js";
|
|
8
|
+
import { forceType as I, getOverride as H, hostAttributes as K } from "./decorators.js";
|
|
9
|
+
import { defaultConverter as z, isServer as M, html as R, nothing as O, css as W } from "lit";
|
|
10
|
+
import { SbbLanguageController as B, SbbConnectedAbortController as X } from "./controllers.js";
|
|
11
|
+
import { preventScrollOnSpacebarPress as J, EventEmitter as Q } from "./eventing.js";
|
|
12
|
+
import { i18nCheckboxRequired as Y, i18nInputRequired as Z, i18nSelectionRequired as ee } from "./i18n.js";
|
|
13
|
+
import { isWebkit as P, isFirefox as te } from "./dom.js";
|
|
14
|
+
import { sbbInputModalityDetector as se, interactivityChecker as ae, isArrowKeyPressed as ie, getNextElementIndex as re } from "./a11y.js";
|
|
15
15
|
import "../screen-reader-only.js";
|
|
16
|
-
const
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
return
|
|
16
|
+
const A = (d) => (() => {
|
|
17
|
+
var b, t;
|
|
18
|
+
let c = d, o, m = [], l = [];
|
|
19
|
+
return t = class extends c {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments);
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
E(this, b, _(this, m, !1));
|
|
23
|
+
_(this, l);
|
|
24
24
|
}
|
|
25
25
|
/** Whether the component is disabled. */
|
|
26
26
|
get disabled() {
|
|
27
|
-
return
|
|
27
|
+
return C(this, b);
|
|
28
28
|
}
|
|
29
|
-
set disabled(
|
|
30
|
-
|
|
29
|
+
set disabled(e) {
|
|
30
|
+
S(this, b, e);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Will be used as 'or' check to the current disabled state.
|
|
@@ -36,42 +36,42 @@ const M = (c) => (() => {
|
|
|
36
36
|
isDisabledExternally() {
|
|
37
37
|
return !1;
|
|
38
38
|
}
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
-
o = [
|
|
42
|
-
s.disabled =
|
|
43
|
-
} }, metadata:
|
|
44
|
-
})(),
|
|
45
|
-
})(),
|
|
46
|
-
var
|
|
47
|
-
let
|
|
48
|
-
return
|
|
39
|
+
}, b = new WeakMap(), (() => {
|
|
40
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
41
|
+
o = [I(), k({ reflect: !0, type: Boolean }), H((s, a) => a || s.isDisabledExternally())], y(t, null, o, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, get: (s) => s.disabled, set: (s, a) => {
|
|
42
|
+
s.disabled = a;
|
|
43
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
44
|
+
})(), t;
|
|
45
|
+
})(), ne = (d) => (() => {
|
|
46
|
+
var b, t;
|
|
47
|
+
let c = d, o, m = [], l = [];
|
|
48
|
+
return t = class extends c {
|
|
49
49
|
constructor() {
|
|
50
50
|
super(...arguments);
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
E(this, b, _(this, m, !1));
|
|
52
|
+
_(this, l);
|
|
53
53
|
}
|
|
54
54
|
/** Whether the button should be aria-disabled but stay interactive. */
|
|
55
55
|
get disabledInteractive() {
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
set disabledInteractive(
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
const
|
|
63
|
-
o = [
|
|
64
|
-
s.disabledInteractive =
|
|
65
|
-
} }, metadata:
|
|
66
|
-
})(),
|
|
67
|
-
})(),
|
|
68
|
-
class
|
|
56
|
+
return C(this, b);
|
|
57
|
+
}
|
|
58
|
+
set disabledInteractive(e) {
|
|
59
|
+
S(this, b, e);
|
|
60
|
+
}
|
|
61
|
+
}, b = new WeakMap(), (() => {
|
|
62
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
63
|
+
o = [I(), k({ attribute: "disabled-interactive", type: Boolean, reflect: !0 })], y(t, null, o, { kind: "accessor", name: "disabledInteractive", static: !1, private: !1, access: { has: (s) => "disabledInteractive" in s, get: (s) => s.disabledInteractive, set: (s, a) => {
|
|
64
|
+
s.disabledInteractive = a;
|
|
65
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
66
|
+
})(), t;
|
|
67
|
+
})(), _e = (d) => {
|
|
68
|
+
class v extends ne(A(d)) {
|
|
69
69
|
willUpdate(o) {
|
|
70
70
|
super.willUpdate(o), o.has("disabledInteractive") && (this.internals.ariaDisabled = this.disabledInteractive ? "true" : null), o.has("disabled") && (this.disabled ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
return
|
|
74
|
-
},
|
|
73
|
+
return v;
|
|
74
|
+
}, $ = {
|
|
75
75
|
badInput: !1,
|
|
76
76
|
customError: !1,
|
|
77
77
|
patternMismatch: !1,
|
|
@@ -82,15 +82,31 @@ const M = (c) => (() => {
|
|
|
82
82
|
tooShort: !1,
|
|
83
83
|
typeMismatch: !1,
|
|
84
84
|
valueMissing: !1
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
};
|
|
86
|
+
if (typeof ValidityState > "u") {
|
|
87
|
+
const d = class {
|
|
88
|
+
get valid() {
|
|
89
|
+
return !0;
|
|
90
|
+
}
|
|
91
|
+
constructor() {
|
|
92
|
+
throw new TypeError("Illegal constructor");
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
Object.entries($).forEach(([v, c]) => Object.assign(d.prototype, {
|
|
96
|
+
get [v]() {
|
|
97
|
+
return c;
|
|
98
|
+
}
|
|
99
|
+
})), globalThis.ValidityState = d;
|
|
100
|
+
}
|
|
101
|
+
const V = (d) => (() => {
|
|
102
|
+
var u, e;
|
|
103
|
+
let c = d, o = [], m, l, b, t = [], r = [];
|
|
104
|
+
return e = class extends c {
|
|
105
|
+
constructor(...i) {
|
|
106
|
+
var n;
|
|
107
|
+
super(...i);
|
|
108
|
+
E(this, u);
|
|
109
|
+
this._value = (_(this, o), null), this.internals = this.attachInternals(), this._validityStates = /* @__PURE__ */ new Map(), S(this, u, _(this, t, !1)), _(this, r), (n = this.addEventListener) == null || n.call(this, "invalid", (p) => p.preventDefault());
|
|
94
110
|
}
|
|
95
111
|
/**
|
|
96
112
|
* Returns the form owner of this element.
|
|
@@ -104,8 +120,8 @@ const M = (c) => (() => {
|
|
|
104
120
|
* @description Developer note: In this case updating the attribute must be synchronous.
|
|
105
121
|
* Due to this it is implemented as a getter/setter and the attributeChangedCallback() handles the diff check.
|
|
106
122
|
*/
|
|
107
|
-
set name(
|
|
108
|
-
this.setAttribute("name", `${
|
|
123
|
+
set name(i) {
|
|
124
|
+
this.setAttribute("name", `${i}`), this.updateFormValue();
|
|
109
125
|
}
|
|
110
126
|
get name() {
|
|
111
127
|
return this.getAttribute("name") ?? "";
|
|
@@ -115,8 +131,8 @@ const M = (c) => (() => {
|
|
|
115
131
|
return this.localName;
|
|
116
132
|
}
|
|
117
133
|
/** Value of the form element. */
|
|
118
|
-
set value(
|
|
119
|
-
this._value =
|
|
134
|
+
set value(i) {
|
|
135
|
+
this._value = i, this.updateFormValue();
|
|
120
136
|
}
|
|
121
137
|
get value() {
|
|
122
138
|
return this._value;
|
|
@@ -148,13 +164,13 @@ const M = (c) => (() => {
|
|
|
148
164
|
}
|
|
149
165
|
/** Whenever a surrounding form or fieldset is changing its disabled state. */
|
|
150
166
|
get formDisabled() {
|
|
151
|
-
return
|
|
167
|
+
return C(this, u);
|
|
152
168
|
}
|
|
153
|
-
set formDisabled(
|
|
154
|
-
|
|
169
|
+
set formDisabled(i) {
|
|
170
|
+
S(this, u, i);
|
|
155
171
|
}
|
|
156
|
-
attributeChangedCallback(
|
|
157
|
-
(
|
|
172
|
+
attributeChangedCallback(i, n, p) {
|
|
173
|
+
(i !== "name" || n !== p) && super.attributeChangedCallback(i, n, p);
|
|
158
174
|
}
|
|
159
175
|
/**
|
|
160
176
|
* Returns true if this element has no validity problems; false otherwise.
|
|
@@ -175,8 +191,8 @@ const M = (c) => (() => {
|
|
|
175
191
|
* Sets the custom validity message for this element. Use the empty string
|
|
176
192
|
* to indicate that the element does not have a custom validity error.
|
|
177
193
|
*/
|
|
178
|
-
setCustomValidity(
|
|
179
|
-
|
|
194
|
+
setCustomValidity(i) {
|
|
195
|
+
i ? this.setValidityFlag("customError", i) : this.removeValidityFlag("customError");
|
|
180
196
|
}
|
|
181
197
|
/**
|
|
182
198
|
* Is called whenever a surrounding form / fieldset changes disabled state.
|
|
@@ -184,11 +200,17 @@ const M = (c) => (() => {
|
|
|
184
200
|
*
|
|
185
201
|
* @internal
|
|
186
202
|
*/
|
|
187
|
-
formDisabledCallback(
|
|
203
|
+
formDisabledCallback(i) {
|
|
188
204
|
Promise.resolve().then(() => {
|
|
189
|
-
this.formDisabled =
|
|
205
|
+
this.formDisabled = i;
|
|
190
206
|
});
|
|
191
207
|
}
|
|
208
|
+
requestUpdate(i, n, p) {
|
|
209
|
+
super.requestUpdate(i, n, p), this.hasUpdated && this.shouldValidate(i) && this.validate();
|
|
210
|
+
}
|
|
211
|
+
firstUpdated(i) {
|
|
212
|
+
super.firstUpdated(i), this.validate();
|
|
213
|
+
}
|
|
192
214
|
/**
|
|
193
215
|
* Marks this element as suffering from the constraint indicated by the
|
|
194
216
|
* flag argument and associates the given message to it.
|
|
@@ -196,8 +218,7 @@ const M = (c) => (() => {
|
|
|
196
218
|
* consumers are always displayed before internal messages and internal
|
|
197
219
|
* messages are displayed in the order they were added.
|
|
198
220
|
* To set/define custom validity state flags, you need to extend the
|
|
199
|
-
* ValidityState prototype and
|
|
200
|
-
* ValidityStateFlags interface.
|
|
221
|
+
* ValidityState prototype (and the CustomValidityState interface).
|
|
201
222
|
*
|
|
202
223
|
* @example
|
|
203
224
|
*
|
|
@@ -209,66 +230,70 @@ const M = (c) => (() => {
|
|
|
209
230
|
* });
|
|
210
231
|
*
|
|
211
232
|
* declare global {
|
|
212
|
-
* interface
|
|
233
|
+
* interface CustomValidityState {
|
|
213
234
|
* myError: boolean;
|
|
214
235
|
* }
|
|
215
|
-
* interface ValidityState {
|
|
216
|
-
* myError?: boolean;
|
|
217
|
-
* }
|
|
218
236
|
* }
|
|
219
237
|
*/
|
|
220
|
-
setValidityFlag(
|
|
221
|
-
|
|
238
|
+
setValidityFlag(i, n, p) {
|
|
239
|
+
p ?? (p = !0);
|
|
240
|
+
const x = this._validityStates.get(i);
|
|
241
|
+
(!x || x.message !== n || x.flagValue !== p) && (this._validityStates.set(i, { flagValue: p, message: n }), this._setInternalValidity());
|
|
222
242
|
}
|
|
223
|
-
|
|
224
|
-
|
|
243
|
+
/** Removes the validity state flag entry and updates validity state. */
|
|
244
|
+
removeValidityFlag(i) {
|
|
245
|
+
this._validityStates.has(i) && (this._validityStates.delete(i), this._setInternalValidity());
|
|
246
|
+
}
|
|
247
|
+
/** To be called whenever the current element needs to be validated. */
|
|
248
|
+
validate() {
|
|
249
|
+
}
|
|
250
|
+
/** Whether validation should be run on a property change with the given name. */
|
|
251
|
+
shouldValidate(i) {
|
|
252
|
+
return !i;
|
|
225
253
|
}
|
|
226
254
|
_setInternalValidity() {
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
this.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
var r;
|
|
258
|
-
let u = c, o = [], p;
|
|
259
|
-
return r = class extends u {
|
|
255
|
+
var x;
|
|
256
|
+
let i = (x = this._validityStates.get("customError")) == null ? void 0 : x.message;
|
|
257
|
+
const n = {};
|
|
258
|
+
this._validityStates.forEach(({ flagValue: f, message: g }, h) => {
|
|
259
|
+
n[h] = f, i || (i = g);
|
|
260
|
+
});
|
|
261
|
+
const p = Object.keys(ValidityState.prototype).filter((f) => !(f in $) && f !== "valid");
|
|
262
|
+
for (const f of p) {
|
|
263
|
+
const g = f in n ? n[f] : !1;
|
|
264
|
+
Object.defineProperty(this.internals.validity, f, { value: g, configurable: !0 }), g && (n.customError = !0);
|
|
265
|
+
}
|
|
266
|
+
this.internals.setValidity(n, i), P && Object.defineProperty(this.internals.validity, "customError", {
|
|
267
|
+
value: this._validityStates.has("customError") || !!n.customError,
|
|
268
|
+
configurable: !0
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}, u = new WeakMap(), (() => {
|
|
272
|
+
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
273
|
+
m = [k()], l = [k()], b = [N()], y(e, null, m, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (n) => "name" in n, set: (n, p) => {
|
|
274
|
+
n.name = p;
|
|
275
|
+
} }, metadata: i }, null, o), y(e, null, l, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (n) => "value" in n, set: (n, p) => {
|
|
276
|
+
n.value = p;
|
|
277
|
+
} }, metadata: i }, null, o), y(e, null, b, { kind: "accessor", name: "formDisabled", static: !1, private: !1, access: { has: (n) => "formDisabled" in n, get: (n) => n.formDisabled, set: (n, p) => {
|
|
278
|
+
n.formDisabled = p;
|
|
279
|
+
} }, metadata: i }, t, r), i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
280
|
+
})(), e.formAssociated = !0, e;
|
|
281
|
+
})(), D = (d) => (() => {
|
|
282
|
+
var l;
|
|
283
|
+
let c = d, o = [], m;
|
|
284
|
+
return l = class extends c {
|
|
260
285
|
constructor() {
|
|
261
|
-
super(...arguments), this._required = (
|
|
286
|
+
super(...arguments), this._required = (_(this, o), !1);
|
|
262
287
|
}
|
|
263
288
|
/** Whether the component is required. */
|
|
264
|
-
set required(
|
|
265
|
-
this._required = !!
|
|
289
|
+
set required(t) {
|
|
290
|
+
this._required = !!t;
|
|
266
291
|
}
|
|
267
292
|
get required() {
|
|
268
293
|
return this._required || this.isRequiredExternally();
|
|
269
294
|
}
|
|
270
|
-
willUpdate(
|
|
271
|
-
super.willUpdate(
|
|
295
|
+
willUpdate(t) {
|
|
296
|
+
super.willUpdate(t), t.has("required") && (this.internals.ariaRequired = `${this.required}`);
|
|
272
297
|
}
|
|
273
298
|
/**
|
|
274
299
|
* Will be used as 'or' check to the current required state.
|
|
@@ -278,21 +303,21 @@ const M = (c) => (() => {
|
|
|
278
303
|
return !1;
|
|
279
304
|
}
|
|
280
305
|
}, (() => {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
} }, metadata:
|
|
285
|
-
})(),
|
|
286
|
-
})(),
|
|
287
|
-
var
|
|
288
|
-
let
|
|
306
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
307
|
+
m = [k({ reflect: !0, type: Boolean })], y(l, null, m, { kind: "setter", name: "required", static: !1, private: !1, access: { has: (r) => "required" in r, set: (r, u) => {
|
|
308
|
+
r.required = u;
|
|
309
|
+
} }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
310
|
+
})(), l;
|
|
311
|
+
})(), Se = (d) => (() => {
|
|
312
|
+
var u;
|
|
313
|
+
let c = [K({
|
|
289
314
|
tabindex: "0"
|
|
290
|
-
})], o,
|
|
291
|
-
return
|
|
315
|
+
})], o, m = [], l, b = A(D(V(d))), t = [], r;
|
|
316
|
+
return u = class extends b {
|
|
292
317
|
/** Whether the checkbox is checked. */
|
|
293
318
|
set checked(s) {
|
|
294
|
-
const
|
|
295
|
-
|
|
319
|
+
const a = typeof s == "object" ? s.attribute : !1;
|
|
320
|
+
a && (s = s.value), this.hasUpdated && !a && (this._attributeMutationBlocked = !0), this._checked = !!s, this.updateFormValue();
|
|
296
321
|
}
|
|
297
322
|
get checked() {
|
|
298
323
|
return this._checked;
|
|
@@ -305,16 +330,16 @@ const M = (c) => (() => {
|
|
|
305
330
|
return "checkbox";
|
|
306
331
|
}
|
|
307
332
|
constructor() {
|
|
308
|
-
var s,
|
|
309
|
-
super(), this._attributeMutationBlocked = (
|
|
310
|
-
|
|
333
|
+
var s, a, i;
|
|
334
|
+
super(), this._attributeMutationBlocked = (_(this, t), !1), this._languageController = new B(this), this._checked = !1, this._handleKeyboardInteraction = (n) => {
|
|
335
|
+
n.key === " " && this._handleUserInteraction();
|
|
311
336
|
}, this._handleUserInteraction = () => {
|
|
312
|
-
var
|
|
313
|
-
this.disabled || ((
|
|
314
|
-
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (
|
|
337
|
+
var n;
|
|
338
|
+
this.disabled || ((n = this.withUserInteraction) == null || n.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
339
|
+
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown", J), (i = this.addEventListener) == null || i.call(this, "keyup", this._handleKeyboardInteraction);
|
|
315
340
|
}
|
|
316
|
-
attributeChangedCallback(s,
|
|
317
|
-
(s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s,
|
|
341
|
+
attributeChangedCallback(s, a, i) {
|
|
342
|
+
(s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s, a, i);
|
|
318
343
|
}
|
|
319
344
|
/**
|
|
320
345
|
* Is called whenever the form is being reset.
|
|
@@ -326,59 +351,217 @@ const M = (c) => (() => {
|
|
|
326
351
|
}
|
|
327
352
|
/**
|
|
328
353
|
* Called when the browser is trying to restore element’s state to state in which case
|
|
329
|
-
* reason is
|
|
330
|
-
* user in which case reason is
|
|
331
|
-
* In the case of
|
|
354
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
355
|
+
* user in which case reason is "autocomplete".
|
|
356
|
+
* In the case of "restore", state is a string, File, or FormData object
|
|
332
357
|
* previously set as the second argument to setFormValue.
|
|
333
358
|
*
|
|
334
359
|
* @internal
|
|
335
360
|
*/
|
|
336
|
-
formStateRestoreCallback(s,
|
|
361
|
+
formStateRestoreCallback(s, a) {
|
|
337
362
|
s && (this.checked = s === "true");
|
|
338
363
|
}
|
|
339
|
-
requestUpdate(s, l, a) {
|
|
340
|
-
super.requestUpdate(s, l, a), this.hasUpdated && (s === "checked" || s === "required" || !s) && this._setValidity();
|
|
341
|
-
}
|
|
342
|
-
firstUpdated(s) {
|
|
343
|
-
super.firstUpdated(s), this._setValidity();
|
|
344
|
-
}
|
|
345
364
|
updateFormValue() {
|
|
346
365
|
this.checked ? this.internals.setFormValue(this.value, `${this.checked}`) : this.internals.setFormValue(null);
|
|
347
366
|
}
|
|
348
|
-
|
|
349
|
-
|
|
367
|
+
shouldValidate(s) {
|
|
368
|
+
return super.shouldValidate(s) || s === "checked" || s === "required";
|
|
369
|
+
}
|
|
370
|
+
validate() {
|
|
371
|
+
super.validate(), this.required && !this.checked ? this.setValidityFlag("valueMissing", Y[this._languageController.current]) : this.removeValidityFlag("valueMissing");
|
|
350
372
|
}
|
|
351
|
-
},
|
|
352
|
-
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
353
|
-
|
|
373
|
+
}, l = u, (() => {
|
|
374
|
+
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(b[Symbol.metadata] ?? null) : void 0;
|
|
375
|
+
r = [k({
|
|
354
376
|
type: Boolean,
|
|
355
377
|
converter: {
|
|
356
|
-
...
|
|
378
|
+
...z,
|
|
357
379
|
// We need to pass information to the setter so that we know it was called by attribute change.
|
|
358
|
-
fromAttribute: (
|
|
359
|
-
var
|
|
360
|
-
return { value: (
|
|
380
|
+
fromAttribute: (a, i) => {
|
|
381
|
+
var p, x;
|
|
382
|
+
return { value: (x = (p = z).fromAttribute) == null ? void 0 : x.call(p, a, i), attribute: !0 };
|
|
361
383
|
}
|
|
362
384
|
}
|
|
363
|
-
})],
|
|
364
|
-
|
|
365
|
-
} }, metadata: s }, null,
|
|
366
|
-
})(),
|
|
367
|
-
})(),
|
|
385
|
+
})], y(u, null, r, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (a) => "checked" in a, set: (a, i) => {
|
|
386
|
+
a.checked = i;
|
|
387
|
+
} }, metadata: s }, null, t), y(null, o = { value: l }, c, { kind: "class", name: l.name, metadata: s }, null, m), l = o.value, s && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), _(l, m);
|
|
388
|
+
})(), l;
|
|
389
|
+
})(), ke = (d) => (() => {
|
|
368
390
|
var r;
|
|
369
|
-
let
|
|
370
|
-
return r = class extends
|
|
391
|
+
let c = D(V(d)), o = [], m, l, b, t;
|
|
392
|
+
return r = class extends c {
|
|
393
|
+
/**
|
|
394
|
+
* Form type of element.
|
|
395
|
+
* @default 'text'
|
|
396
|
+
*/
|
|
397
|
+
get type() {
|
|
398
|
+
return "text";
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* The text value of the input element.
|
|
402
|
+
*/
|
|
403
|
+
set value(e) {
|
|
404
|
+
super.value = this._cleanText(e), this.hasUpdated && (this.innerHTML = super.value);
|
|
405
|
+
}
|
|
406
|
+
get value() {
|
|
407
|
+
return super.value ?? "";
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Whether the component is readonly.
|
|
411
|
+
* @attr readonly
|
|
412
|
+
* @default false
|
|
413
|
+
*/
|
|
414
|
+
set readOnly(e) {
|
|
415
|
+
this.toggleAttribute("readonly", !!e), this.internals.ariaReadOnly = e ? "true" : null, this._updateContenteditable();
|
|
416
|
+
}
|
|
417
|
+
get readOnly() {
|
|
418
|
+
return this.hasAttribute("readonly");
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Whether the component is disabled.
|
|
422
|
+
* @attr disabled
|
|
423
|
+
* @default false
|
|
424
|
+
*/
|
|
425
|
+
set disabled(e) {
|
|
426
|
+
this.toggleAttribute("disabled", !!e), this.internals.ariaDisabled = e ? "true" : null, this._updateContenteditable();
|
|
427
|
+
}
|
|
428
|
+
get disabled() {
|
|
429
|
+
return this.hasAttribute("disabled");
|
|
430
|
+
}
|
|
431
|
+
set placeholder(e) {
|
|
432
|
+
e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder"), this.internals.ariaPlaceholder = e || null;
|
|
433
|
+
}
|
|
434
|
+
get placeholder() {
|
|
435
|
+
return this.getAttribute("placeholder") ?? "";
|
|
436
|
+
}
|
|
437
|
+
constructor() {
|
|
438
|
+
var e, s, a, i, n, p, x;
|
|
439
|
+
super(), this._interacted = (_(this, o), !1), this._shouldEmitChange = !1, this._shouldTriggerSubmit = !1, this.language = new B(this), this.internals.role = "textbox", (e = this.addEventListener) == null || e.call(this, "input", () => {
|
|
440
|
+
super.value = this._cleanText(this.textContent ?? ""), this._interacted = !0, this._shouldEmitChange = !0;
|
|
441
|
+
}, { capture: !0 }), (s = this.addEventListener) == null || s.call(this, "change", () => this._shouldEmitChange = !1, { capture: !0 }), (a = this.addEventListener) == null || a.call(this, "keydown", (f) => {
|
|
442
|
+
var g;
|
|
443
|
+
if ((f.key === "Enter" || f.key === `
|
|
444
|
+
`) && f.isTrusted)
|
|
445
|
+
f.preventDefault(), f.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", f));
|
|
446
|
+
else if (P && this.value && (f.key === "Backspace" || f.key === "Delete") && f.isTrusted) {
|
|
447
|
+
if (f.preventDefault(), f.stopImmediatePropagation(), !this.dispatchEvent(new KeyboardEvent("keydown", f)))
|
|
448
|
+
return;
|
|
449
|
+
const h = (g = window.getSelection()) == null ? void 0 : g.getRangeAt(0);
|
|
450
|
+
if (!h)
|
|
451
|
+
return;
|
|
452
|
+
h.startOffset !== h.endOffset ? (h.deleteContents(), this._dispatchInputEvent()) : f.key === "Backspace" && h.startOffset > 0 ? (h.setStart(h.startContainer, h.startOffset - 1), h.deleteContents(), this._dispatchInputEvent()) : f.key === "Delete" && h.endOffset < this.value.length && (h.setEnd(h.endContainer, h.endOffset + 1), h.deleteContents(), this._dispatchInputEvent());
|
|
453
|
+
}
|
|
454
|
+
}, { capture: !0 }), (i = this.addEventListener) == null || i.call(this, "keyup", (f) => {
|
|
455
|
+
var g;
|
|
456
|
+
(f.key === "Enter" || f.key === `
|
|
457
|
+
`) && (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, (g = this.form) == null || g.requestSubmit()));
|
|
458
|
+
}, { capture: !0 }), (n = this.addEventListener) == null || n.call(this, "paste", (f) => {
|
|
459
|
+
var w, q;
|
|
460
|
+
f.preventDefault();
|
|
461
|
+
const g = this._cleanText(((w = f.clipboardData) == null ? void 0 : w.getData("text/plain")) ?? ""), h = (q = window.getSelection()) == null ? void 0 : q.getRangeAt(0);
|
|
462
|
+
!h || !g || (h.deleteContents(), h.insertNode(document.createTextNode(g)), h.setStart(h.endContainer, h.endOffset), this._dispatchInputEvent());
|
|
463
|
+
}), (p = this.addEventListener) == null || p.call(this, "focus", () => {
|
|
464
|
+
var f;
|
|
465
|
+
se.mostRecentModality === "keyboard" && ((f = window.getSelection()) == null || f.selectAllChildren(this));
|
|
466
|
+
}), (x = this.addEventListener) == null || x.call(this, "blur", () => {
|
|
467
|
+
var f;
|
|
468
|
+
(f = window.getSelection()) == null || f.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
|
|
469
|
+
}, { capture: !0 });
|
|
470
|
+
}
|
|
471
|
+
connectedCallback() {
|
|
472
|
+
super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.innerHTML = this.value;
|
|
473
|
+
}
|
|
474
|
+
focus(e) {
|
|
475
|
+
if (super.focus(e), !M && !this.disabled && !this.readOnly && this.value) {
|
|
476
|
+
const s = window.getSelection();
|
|
477
|
+
if (!s)
|
|
478
|
+
return;
|
|
479
|
+
let a = s.rangeCount > 0 ? s.getRangeAt(0) : null;
|
|
480
|
+
if (a && a.startOffset !== 0)
|
|
481
|
+
return;
|
|
482
|
+
a = document.createRange(), a.setStart(this.firstChild, this.textContent.length), a.collapse(!0), s.removeAllRanges(), s.addRange(a);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
attributeChangedCallback(e, s, a) {
|
|
486
|
+
(e !== "value" || !this._interacted) && super.attributeChangedCallback(e, s, a);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Is called whenever the form is being reset.
|
|
490
|
+
*
|
|
491
|
+
* @internal
|
|
492
|
+
*/
|
|
493
|
+
formResetCallback() {
|
|
494
|
+
this._interacted = !1, this.value = this.getAttribute("value") ?? "";
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Called when the browser is trying to restore element’s state to state in which case
|
|
498
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
499
|
+
* user in which case reason is "autocomplete".
|
|
500
|
+
* In the case of "restore", state is a string, File, or FormData object
|
|
501
|
+
* previously set as the second argument to setFormValue.
|
|
502
|
+
*
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
formStateRestoreCallback(e, s) {
|
|
506
|
+
e && typeof e == "string" && (this.value = e);
|
|
507
|
+
}
|
|
508
|
+
updateFormValue() {
|
|
509
|
+
this.internals.setFormValue(this.value, this.value);
|
|
510
|
+
}
|
|
511
|
+
shouldValidate(e) {
|
|
512
|
+
return super.shouldValidate(e) || e === "value" || e === "required";
|
|
513
|
+
}
|
|
514
|
+
validate() {
|
|
515
|
+
super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", Z[this.language.current]) : this.removeValidityFlag("valueMissing");
|
|
516
|
+
}
|
|
517
|
+
_cleanText(e) {
|
|
518
|
+
return `${e}`.replace(/[\n\r]+/g, "");
|
|
519
|
+
}
|
|
520
|
+
_dispatchInputEvent() {
|
|
521
|
+
this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }));
|
|
522
|
+
}
|
|
523
|
+
_cleanChildren() {
|
|
524
|
+
if (this.childElementCount)
|
|
525
|
+
for (const e of this.children)
|
|
526
|
+
e.remove();
|
|
527
|
+
}
|
|
528
|
+
_updateContenteditable() {
|
|
529
|
+
if (!M && this.isConnected) {
|
|
530
|
+
const e = this.disabled || this.readOnly ? "false" : te ? "true" : "plaintext-only";
|
|
531
|
+
this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
_emitChangeIfNecessary() {
|
|
535
|
+
this._shouldEmitChange && (this._shouldEmitChange = !1, this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
536
|
+
}
|
|
537
|
+
render() {
|
|
538
|
+
return R`<slot @slotchange=${this._cleanChildren}></slot>`;
|
|
539
|
+
}
|
|
540
|
+
}, (() => {
|
|
541
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
542
|
+
m = [k({ type: Boolean })], l = [k({ type: Boolean })], b = [k({ attribute: !1 })], t = [G({ passive: !0 })], y(r, null, m, { kind: "setter", name: "readOnly", static: !1, private: !1, access: { has: (s) => "readOnly" in s, set: (s, a) => {
|
|
543
|
+
s.readOnly = a;
|
|
544
|
+
} }, metadata: e }, null, o), y(r, null, l, { kind: "setter", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, set: (s, a) => {
|
|
545
|
+
s.disabled = a;
|
|
546
|
+
} }, metadata: e }, null, o), y(r, null, b, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (s) => "placeholder" in s, set: (s, a) => {
|
|
547
|
+
s.placeholder = a;
|
|
548
|
+
} }, metadata: e }, null, o), y(r, null, t, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (s) => "_cleanChildren" in s, get: (s) => s._cleanChildren }, metadata: e }, null, o), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
549
|
+
})(), r;
|
|
550
|
+
})(), T = /* @__PURE__ */ new WeakMap(), xe = (d) => (() => {
|
|
551
|
+
var l;
|
|
552
|
+
let c = A(D(V(d))), o = [], m;
|
|
553
|
+
return l = class extends c {
|
|
371
554
|
/**
|
|
372
555
|
* Whether the radio button is checked.
|
|
373
556
|
*/
|
|
374
|
-
set checked(
|
|
375
|
-
this._checked = !!
|
|
557
|
+
set checked(t) {
|
|
558
|
+
this._checked = !!t, this.toggleAttribute("data-checked", this.checked), this.internals.ariaChecked = this.checked.toString(), this.updateFormValue(), this._synchronizeGroupState();
|
|
376
559
|
}
|
|
377
560
|
get checked() {
|
|
378
561
|
return this._checked;
|
|
379
562
|
}
|
|
380
|
-
set name(
|
|
381
|
-
super.name =
|
|
563
|
+
set name(t) {
|
|
564
|
+
super.name = t, this._disconnectFromRegistry(), this._connectToRegistry(), this._synchronizeGroupState();
|
|
382
565
|
}
|
|
383
566
|
get name() {
|
|
384
567
|
return super.name;
|
|
@@ -391,8 +574,8 @@ const M = (c) => (() => {
|
|
|
391
574
|
return "radio";
|
|
392
575
|
}
|
|
393
576
|
constructor() {
|
|
394
|
-
var
|
|
395
|
-
super(), this._checked = (
|
|
577
|
+
var t;
|
|
578
|
+
super(), this._checked = (_(this, o), !1), this.abort = new X(this), this._didLoad = !1, this._languageController = new B(this), this.internals.role = "radio", (t = this.addEventListener) == null || t.call(this, "keydown", (r) => this._handleArrowKeyDown(r));
|
|
396
579
|
}
|
|
397
580
|
connectedCallback() {
|
|
398
581
|
super.connectedCallback(), this._connectToRegistry(), this._synchronizeGroupState();
|
|
@@ -409,21 +592,18 @@ const M = (c) => (() => {
|
|
|
409
592
|
}
|
|
410
593
|
/**
|
|
411
594
|
* Called when the browser is trying to restore element’s state to state in which case
|
|
412
|
-
* reason is
|
|
413
|
-
* user in which case reason is
|
|
595
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
596
|
+
* user in which case reason is "autocomplete".
|
|
414
597
|
* @internal
|
|
415
598
|
*/
|
|
416
|
-
formStateRestoreCallback(
|
|
417
|
-
|
|
418
|
-
}
|
|
419
|
-
requestUpdate(e, i, n) {
|
|
420
|
-
super.requestUpdate(e, i, n), this.hasUpdated && (e === "checked" || e === "required" || !e) && this._setValidity();
|
|
599
|
+
formStateRestoreCallback(t, r) {
|
|
600
|
+
t && (this.checked = t === this.value);
|
|
421
601
|
}
|
|
422
|
-
willUpdate(
|
|
423
|
-
super.willUpdate(
|
|
602
|
+
willUpdate(t) {
|
|
603
|
+
super.willUpdate(t), t.has("disabled") && this.updateFocusableRadios();
|
|
424
604
|
}
|
|
425
|
-
firstUpdated(
|
|
426
|
-
super.firstUpdated(
|
|
605
|
+
firstUpdated(t) {
|
|
606
|
+
super.firstUpdated(t), this._didLoad = !0, this.updateFocusableRadios();
|
|
427
607
|
}
|
|
428
608
|
/**
|
|
429
609
|
* Called on `value` change
|
|
@@ -432,6 +612,21 @@ const M = (c) => (() => {
|
|
|
432
612
|
updateFormValue() {
|
|
433
613
|
this.checked ? this.internals.setFormValue(this.value, this.value) : this.internals.setFormValue(null);
|
|
434
614
|
}
|
|
615
|
+
shouldValidate(t) {
|
|
616
|
+
return super.shouldValidate(t) || t === "checked" || t === "required";
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Sets the validity of all associated radio buttons.
|
|
620
|
+
* If any radio button is required, all associated are required as well.
|
|
621
|
+
*/
|
|
622
|
+
validate() {
|
|
623
|
+
if (super.validate(), !this.associatedRadioButtons)
|
|
624
|
+
return;
|
|
625
|
+
let t = !1, r = !1;
|
|
626
|
+
for (const u of this.associatedRadioButtons)
|
|
627
|
+
t || (t = u.required), r || (r = u.checked);
|
|
628
|
+
t && !r ? this.associatedRadioButtons.forEach((u) => u.setValidityFlag("valueMissing", ee[this._languageController.current])) : this.associatedRadioButtons.forEach((u) => u.removeValidityFlag("valueMissing"));
|
|
629
|
+
}
|
|
435
630
|
/**
|
|
436
631
|
* Only a single radio should be focusable in the group. Defined as:
|
|
437
632
|
* - the checked radio;
|
|
@@ -440,11 +635,11 @@ const M = (c) => (() => {
|
|
|
440
635
|
updateFocusableRadios() {
|
|
441
636
|
if (!this._didLoad)
|
|
442
637
|
return;
|
|
443
|
-
const
|
|
444
|
-
|
|
638
|
+
const t = this._interactableGroupedRadios(), r = t.findIndex((e) => e.checked && !e.disabled && !e.formDisabled), u = r !== -1 ? r : t.findIndex((e) => !e.disabled && !e.formDisabled);
|
|
639
|
+
u !== -1 && (t[u].tabIndex = 0, t.splice(u, 1)), t.forEach((e) => e.removeAttribute("tabindex"));
|
|
445
640
|
}
|
|
446
|
-
async navigateByKeyboard(
|
|
447
|
-
|
|
641
|
+
async navigateByKeyboard(t) {
|
|
642
|
+
t.checked = !0, this.emitChangeEvents(), await t.updateComplete, t.focus();
|
|
448
643
|
}
|
|
449
644
|
emitChangeEvents() {
|
|
450
645
|
this.dispatchEvent(new InputEvent("input", { bubbles: !0, cancelable: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
@@ -456,61 +651,49 @@ const M = (c) => (() => {
|
|
|
456
651
|
* Add `this` to the radioButton registry
|
|
457
652
|
*/
|
|
458
653
|
_connectToRegistry() {
|
|
459
|
-
if (!this.name ||
|
|
654
|
+
if (!this.name || M)
|
|
460
655
|
return;
|
|
461
|
-
const
|
|
462
|
-
this._radioButtonGroupsMap =
|
|
463
|
-
const
|
|
656
|
+
const t = this.form ?? this.getRootNode();
|
|
657
|
+
this._radioButtonGroupsMap = T.get(t), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), T.set(t, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
|
|
658
|
+
const r = Array.from(this.associatedRadioButtons);
|
|
464
659
|
this.associatedRadioButtons.clear();
|
|
465
|
-
const
|
|
466
|
-
|
|
660
|
+
const u = r.findIndex((e) => this.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
661
|
+
u !== -1 ? r.splice(u, 0, this) : r.push(this), r.forEach((e) => this.associatedRadioButtons.add(e)), this.validate();
|
|
467
662
|
}
|
|
468
663
|
/**
|
|
469
664
|
* Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map
|
|
470
665
|
*/
|
|
471
666
|
_disconnectFromRegistry() {
|
|
472
|
-
var
|
|
473
|
-
(
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Sets the validity of all associated radio buttons.
|
|
477
|
-
* If any radio button is required, all associated are required as well.
|
|
478
|
-
*/
|
|
479
|
-
_setValidity() {
|
|
480
|
-
if (!this.associatedRadioButtons)
|
|
481
|
-
return;
|
|
482
|
-
let e = !1, i = !1;
|
|
483
|
-
for (const n of this.associatedRadioButtons)
|
|
484
|
-
e || (e = n.required), i || (i = n.checked);
|
|
485
|
-
e && !i ? this.associatedRadioButtons.forEach((n) => n.setValidityFlag("valueMissing", X[this._languageController.current])) : this.associatedRadioButtons.forEach((n) => n.removeValidityFlag("valueMissing"));
|
|
667
|
+
var t, r, u;
|
|
668
|
+
(t = this.associatedRadioButtons) == null || t.delete(this), ((r = this.associatedRadioButtons) == null ? void 0 : r.size) === 0 ? (u = this._radioButtonGroupsMap) == null || u.delete(this.name) : this.validate(), this.associatedRadioButtons = void 0, this._radioButtonGroupsMap = void 0;
|
|
486
669
|
}
|
|
487
670
|
/**
|
|
488
671
|
* Return a list of 'interactable' grouped radios, ordered in DOM order
|
|
489
672
|
*/
|
|
490
673
|
_interactableGroupedRadios() {
|
|
491
|
-
return Array.from(this.associatedRadioButtons ?? []).filter((
|
|
674
|
+
return Array.from(this.associatedRadioButtons ?? []).filter((t) => ae.isVisible(t));
|
|
492
675
|
}
|
|
493
676
|
/**
|
|
494
677
|
* Deselect other radio of the same group
|
|
495
678
|
*/
|
|
496
679
|
_deselectGroupedRadios() {
|
|
497
|
-
Array.from(this.associatedRadioButtons ?? []).filter((
|
|
680
|
+
Array.from(this.associatedRadioButtons ?? []).filter((t) => t !== this).forEach((t) => t.checked = !1);
|
|
498
681
|
}
|
|
499
|
-
async _handleArrowKeyDown(
|
|
500
|
-
if (!
|
|
682
|
+
async _handleArrowKeyDown(t) {
|
|
683
|
+
if (!ie(t))
|
|
501
684
|
return;
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
await this.navigateByKeyboard(
|
|
685
|
+
t.preventDefault();
|
|
686
|
+
const r = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), u = r.indexOf(this), e = re(t, u, r.length);
|
|
687
|
+
await this.navigateByKeyboard(r[e]);
|
|
505
688
|
}
|
|
506
689
|
}, (() => {
|
|
507
|
-
const
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
} }, metadata:
|
|
511
|
-
})(),
|
|
512
|
-
})(),
|
|
513
|
-
class
|
|
690
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
691
|
+
m = [k({ type: Boolean })], y(l, null, m, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (r) => "checked" in r, set: (r, u) => {
|
|
692
|
+
r.checked = u;
|
|
693
|
+
} }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
694
|
+
})(), l;
|
|
695
|
+
})(), le = (d) => {
|
|
696
|
+
class v extends d {
|
|
514
697
|
/**
|
|
515
698
|
* Returns a Promise that resolves when the element has completed hydration.
|
|
516
699
|
* The Promise value is a boolean that is `true` if the element required hydration
|
|
@@ -527,15 +710,15 @@ const M = (c) => (() => {
|
|
|
527
710
|
return this._hydrationRequired;
|
|
528
711
|
}
|
|
529
712
|
constructor(...o) {
|
|
530
|
-
var
|
|
531
|
-
if (super(...o), this._hydrationComplete = new Promise((
|
|
713
|
+
var m;
|
|
714
|
+
if (super(...o), this._hydrationComplete = new Promise((l) => this._resolveHydration = l), this._hydrationRequired = !!this.shadowRoot, !this._hydrationRequired)
|
|
532
715
|
this._resolveHydration(!1);
|
|
533
716
|
else {
|
|
534
|
-
const
|
|
535
|
-
this._hydrationRequired &&
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
-
|
|
717
|
+
const l = (r) => {
|
|
718
|
+
this._hydrationRequired && r.stopImmediatePropagation();
|
|
719
|
+
}, b = { capture: !0 }, t = (m = this.shadowRoot) == null ? void 0 : m.querySelectorAll("slot");
|
|
720
|
+
t != null && t.length && (t.forEach((r) => r.addEventListener("slotchange", l, b)), this.hydrationComplete.then(() => t.forEach((r) => {
|
|
721
|
+
r.removeEventListener("slotchange", l, b), r.assignedNodes().length && r.dispatchEvent(new Event("slotchange", { bubbles: !0 }));
|
|
539
722
|
})));
|
|
540
723
|
}
|
|
541
724
|
}
|
|
@@ -543,17 +726,17 @@ const M = (c) => (() => {
|
|
|
543
726
|
super.update(o), this._hydrationRequired && (this._hydrationRequired = !1, this._resolveHydration(!0));
|
|
544
727
|
}
|
|
545
728
|
}
|
|
546
|
-
return
|
|
547
|
-
},
|
|
548
|
-
var
|
|
549
|
-
let
|
|
550
|
-
return
|
|
729
|
+
return v;
|
|
730
|
+
}, U = "data-ssr-child-count", j = "li", Ce = (d) => (() => {
|
|
731
|
+
var b, t;
|
|
732
|
+
let c = le(d), o, m = [], l = [];
|
|
733
|
+
return t = class extends c {
|
|
551
734
|
constructor() {
|
|
552
735
|
super(...arguments);
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
const
|
|
556
|
-
|
|
736
|
+
E(this, b);
|
|
737
|
+
S(this, b, _(this, m, [])), this._handleSlotchange = (_(this, l), () => {
|
|
738
|
+
const e = Array.from(this.children ?? []).filter((s) => this.listChildLocalNames.includes(s.localName));
|
|
739
|
+
e.length === this.listChildren.length && this.listChildren.every((s, a) => e[a] === s) || (this.listChildren.filter((s) => !e.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((s, a) => s.setAttribute("slot", `${j}-${a}`)), this.removeAttribute(U));
|
|
557
740
|
});
|
|
558
741
|
}
|
|
559
742
|
/**
|
|
@@ -562,18 +745,18 @@ const M = (c) => (() => {
|
|
|
562
745
|
* to the child elements.
|
|
563
746
|
*/
|
|
564
747
|
get listChildren() {
|
|
565
|
-
return
|
|
748
|
+
return C(this, b);
|
|
566
749
|
}
|
|
567
|
-
set listChildren(
|
|
568
|
-
|
|
750
|
+
set listChildren(e) {
|
|
751
|
+
S(this, b, e);
|
|
569
752
|
}
|
|
570
753
|
connectedCallback() {
|
|
571
|
-
var
|
|
572
|
-
super.connectedCallback(), (
|
|
754
|
+
var e;
|
|
755
|
+
super.connectedCallback(), (e = this.shadowRoot) == null || e.addEventListener("slotchange", this._handleSlotchange, { passive: !0 });
|
|
573
756
|
}
|
|
574
757
|
disconnectedCallback() {
|
|
575
|
-
var
|
|
576
|
-
super.disconnectedCallback(), (
|
|
758
|
+
var e;
|
|
759
|
+
super.disconnectedCallback(), (e = this.shadowRoot) == null || e.removeEventListener("slotchange", this._handleSlotchange);
|
|
577
760
|
}
|
|
578
761
|
/**
|
|
579
762
|
* Renders list and list slots for slotted children or a number of list slots
|
|
@@ -584,24 +767,24 @@ const M = (c) => (() => {
|
|
|
584
767
|
* framework wrapper (like e.g. React). This allows to provide the number of
|
|
585
768
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
586
769
|
*/
|
|
587
|
-
renderList(
|
|
588
|
-
const
|
|
589
|
-
return
|
|
770
|
+
renderList(e = {}, s = {}) {
|
|
771
|
+
const a = this.listSlotEntries(s);
|
|
772
|
+
return a.length >= 2 ? R`
|
|
590
773
|
<ul
|
|
591
|
-
class=${
|
|
592
|
-
aria-label=${
|
|
593
|
-
aria-labelledby=${
|
|
774
|
+
class=${e.class || this.localName}
|
|
775
|
+
aria-label=${e.ariaLabel || O}
|
|
776
|
+
aria-labelledby=${e.ariaLabelledby || O}
|
|
594
777
|
>
|
|
595
|
-
${
|
|
596
|
-
<li aria-hidden=${
|
|
597
|
-
<slot name=${
|
|
778
|
+
${a.map((i) => R`
|
|
779
|
+
<li aria-hidden=${i.ariaHidden || O}>
|
|
780
|
+
<slot name=${i.name}></slot>
|
|
598
781
|
</li>
|
|
599
782
|
`)}
|
|
600
783
|
</ul>
|
|
601
784
|
${this.renderHiddenSlot()}
|
|
602
|
-
` :
|
|
603
|
-
<span class=${
|
|
604
|
-
<span><slot name=${
|
|
785
|
+
` : a.length === 1 ? R`<sbb-screen-reader-only>${e.ariaLabel}</sbb-screen-reader-only>
|
|
786
|
+
<span class=${e.class || this.localName}>
|
|
787
|
+
<span><slot name=${a[0].name}></slot></span>
|
|
605
788
|
</span>
|
|
606
789
|
${this.renderHiddenSlot()} ` : this.renderHiddenSlot();
|
|
607
790
|
}
|
|
@@ -614,12 +797,12 @@ const M = (c) => (() => {
|
|
|
614
797
|
* framework wrapper (like e.g. React). This allows to provide the number of
|
|
615
798
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
616
799
|
*/
|
|
617
|
-
listSlotEntries(
|
|
618
|
-
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(
|
|
619
|
-
var
|
|
800
|
+
listSlotEntries(e) {
|
|
801
|
+
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(U) ?? 0) })).map((a, i) => {
|
|
802
|
+
var n;
|
|
620
803
|
return {
|
|
621
|
-
name: `${
|
|
622
|
-
ariaHidden: ((
|
|
804
|
+
name: `${j}-${i}`,
|
|
805
|
+
ariaHidden: ((n = e == null ? void 0 : e.localNameVisualOnly) == null ? void 0 : n.includes(a.localName)) ?? !1
|
|
623
806
|
};
|
|
624
807
|
});
|
|
625
808
|
}
|
|
@@ -629,85 +812,86 @@ const M = (c) => (() => {
|
|
|
629
812
|
* the slotchange event, which can be used to assign it to the appropriate named slot.
|
|
630
813
|
*/
|
|
631
814
|
renderHiddenSlot() {
|
|
632
|
-
return
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
const
|
|
636
|
-
o = [
|
|
637
|
-
s.listChildren =
|
|
638
|
-
} }, metadata:
|
|
639
|
-
})(),
|
|
640
|
-
})(),
|
|
641
|
-
var
|
|
642
|
-
let
|
|
643
|
-
return
|
|
815
|
+
return R`<span hidden><slot></slot></span>`;
|
|
816
|
+
}
|
|
817
|
+
}, b = new WeakMap(), (() => {
|
|
818
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
819
|
+
o = [N()], y(t, null, o, { kind: "accessor", name: "listChildren", static: !1, private: !1, access: { has: (s) => "listChildren" in s, get: (s) => s.listChildren, set: (s, a) => {
|
|
820
|
+
s.listChildren = a;
|
|
821
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
822
|
+
})(), t;
|
|
823
|
+
})(), Ee = (d) => (() => {
|
|
824
|
+
var b, t;
|
|
825
|
+
let c = d, o, m = [], l = [];
|
|
826
|
+
return t = class extends c {
|
|
644
827
|
constructor() {
|
|
645
828
|
super(...arguments);
|
|
646
|
-
|
|
647
|
-
|
|
829
|
+
E(this, b, _(this, m, !1));
|
|
830
|
+
_(this, l);
|
|
648
831
|
}
|
|
649
832
|
/** Negative coloring variant flag. */
|
|
650
833
|
get negative() {
|
|
651
|
-
return
|
|
652
|
-
}
|
|
653
|
-
set negative(
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
const
|
|
658
|
-
o = [
|
|
659
|
-
s.negative =
|
|
660
|
-
} }, metadata:
|
|
661
|
-
})(),
|
|
662
|
-
})(),
|
|
663
|
-
var
|
|
664
|
-
let
|
|
665
|
-
return
|
|
834
|
+
return C(this, b);
|
|
835
|
+
}
|
|
836
|
+
set negative(e) {
|
|
837
|
+
S(this, b, e);
|
|
838
|
+
}
|
|
839
|
+
}, b = new WeakMap(), (() => {
|
|
840
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
841
|
+
o = [I(), k({ reflect: !0, type: Boolean })], y(t, null, o, { kind: "accessor", name: "negative", static: !1, private: !1, access: { has: (s) => "negative" in s, get: (s) => s.negative, set: (s, a) => {
|
|
842
|
+
s.negative = a;
|
|
843
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
844
|
+
})(), t;
|
|
845
|
+
})(), we = (d) => (() => {
|
|
846
|
+
var a, i, n, p;
|
|
847
|
+
let c = d, o, m = [], l = [], b, t = [], r = [], u, e = [], s = [];
|
|
848
|
+
return p = class extends c {
|
|
666
849
|
constructor() {
|
|
667
850
|
super(...arguments);
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
851
|
+
E(this, a);
|
|
852
|
+
E(this, i);
|
|
853
|
+
E(this, n);
|
|
854
|
+
S(this, a, _(this, m, "white")), S(this, i, (_(this, l), _(this, t, !1))), S(this, n, (_(this, r), _(this, e, ""))), this._panelConnected = (_(this, s), new Q(this, p.events.panelConnected, { bubbles: !0 }));
|
|
672
855
|
}
|
|
673
856
|
/** The background color of the panel. */
|
|
674
857
|
get color() {
|
|
675
|
-
return
|
|
858
|
+
return C(this, a);
|
|
676
859
|
}
|
|
677
|
-
set color(
|
|
678
|
-
|
|
860
|
+
set color(g) {
|
|
861
|
+
S(this, a, g);
|
|
679
862
|
}
|
|
680
863
|
/** Whether the unselected panel has a border. */
|
|
681
864
|
get borderless() {
|
|
682
|
-
return
|
|
865
|
+
return C(this, i);
|
|
683
866
|
}
|
|
684
|
-
set borderless(
|
|
685
|
-
|
|
867
|
+
set borderless(g) {
|
|
868
|
+
S(this, i, g);
|
|
686
869
|
}
|
|
687
870
|
/** @internal used for accessibility label when in expansion panel */
|
|
688
871
|
get expansionState() {
|
|
689
|
-
return
|
|
872
|
+
return C(this, n);
|
|
690
873
|
}
|
|
691
|
-
set expansionState(
|
|
692
|
-
|
|
874
|
+
set expansionState(g) {
|
|
875
|
+
S(this, n, g);
|
|
693
876
|
}
|
|
694
877
|
connectedCallback() {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
878
|
+
var g, h;
|
|
879
|
+
super.connectedCallback(), this._panelConnected.emit(), (h = (g = this.closest) == null ? void 0 : g.call(this, "sbb-radio-button-group, sbb-checkbox-group")) == null || h.toggleAttribute("data-has-panel", !0);
|
|
880
|
+
}
|
|
881
|
+
}, a = new WeakMap(), i = new WeakMap(), n = new WeakMap(), (() => {
|
|
882
|
+
const g = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
883
|
+
o = [k({ reflect: !0 })], b = [I(), k({ reflect: !0, type: Boolean })], u = [I(), k()], y(p, null, o, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (h) => "color" in h, get: (h) => h.color, set: (h, w) => {
|
|
884
|
+
h.color = w;
|
|
885
|
+
} }, metadata: g }, m, l), y(p, null, b, { kind: "accessor", name: "borderless", static: !1, private: !1, access: { has: (h) => "borderless" in h, get: (h) => h.borderless, set: (h, w) => {
|
|
886
|
+
h.borderless = w;
|
|
887
|
+
} }, metadata: g }, t, r), y(p, null, u, { kind: "accessor", name: "expansionState", static: !1, private: !1, access: { has: (h) => "expansionState" in h, get: (h) => h.expansionState, set: (h, w) => {
|
|
888
|
+
h.expansionState = w;
|
|
889
|
+
} }, metadata: g }, e, s), g && Object.defineProperty(p, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: g });
|
|
890
|
+
})(), p.events = {
|
|
707
891
|
panelConnected: "panelConnected"
|
|
708
|
-
},
|
|
709
|
-
})(),
|
|
710
|
-
class
|
|
892
|
+
}, p;
|
|
893
|
+
})(), Re = (d) => {
|
|
894
|
+
class v extends d {
|
|
711
895
|
constructor() {
|
|
712
896
|
super(...arguments), this._updatePromise = Promise.resolve(), this._updateResolve = () => {
|
|
713
897
|
};
|
|
@@ -723,21 +907,22 @@ const M = (c) => (() => {
|
|
|
723
907
|
return await this._updatePromise, o;
|
|
724
908
|
}
|
|
725
909
|
}
|
|
726
|
-
return
|
|
727
|
-
},
|
|
910
|
+
return v;
|
|
911
|
+
}, Ie = W`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
|
|
728
912
|
export {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
913
|
+
ne as SbbDisabledInteractiveMixin,
|
|
914
|
+
A as SbbDisabledMixin,
|
|
915
|
+
_e as SbbDisabledTabIndexActionMixin,
|
|
916
|
+
Se as SbbFormAssociatedCheckboxMixin,
|
|
917
|
+
ke as SbbFormAssociatedInputMixin,
|
|
918
|
+
V as SbbFormAssociatedMixin,
|
|
919
|
+
xe as SbbFormAssociatedRadioButtonMixin,
|
|
920
|
+
le as SbbHydrationMixin,
|
|
921
|
+
Ce as SbbNamedSlotListMixin,
|
|
922
|
+
Ee as SbbNegativeMixin,
|
|
923
|
+
we as SbbPanelMixin,
|
|
924
|
+
D as SbbRequiredMixin,
|
|
925
|
+
Re as SbbUpdateSchedulerMixin,
|
|
926
|
+
Ie as panelCommonStyle,
|
|
927
|
+
T as radioButtonRegistry
|
|
743
928
|
};
|