@sbb-esta/lyne-elements-dev 5.12.0-dev.1793097642 → 5.12.0-dev.1793113585
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/core/styles/_theme.scss +0 -1
- package/core.js +13 -13
- package/custom-elements.json +178 -30
- package/development/core/i18n/i18n.d.ts +1 -0
- package/development/core/overlay/position.d.ts +1 -1
- package/development/core.js +7 -1
- package/development/option.pure.js +2 -2
- package/development/select/select-trigger.component.d.ts +29 -0
- package/development/select/select.component.d.ts +27 -7
- package/development/select.js +2 -1
- package/development/select.pure.d.ts +1 -0
- package/development/select.pure.js +136 -62
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/lean-off-brand-theme.css +0 -8
- package/lean-safety-theme.css +0 -8
- package/lean-theme.css +0 -8
- package/off-brand-theme.css +0 -8
- package/option.pure.js +2 -2
- package/package.json +2 -2
- package/safety-theme.css +0 -8
- package/select/_select.global.scss +0 -14
- package/select.js +1 -1
- package/select.pure.js +15 -23
- package/standard-theme.css +0 -8
package/custom-elements.json
CHANGED
|
@@ -5930,6 +5930,14 @@
|
|
|
5930
5930
|
},
|
|
5931
5931
|
"default": "{ de: 'Auswahl erforderlich.', en: 'Selection required.', fr: 'Sélection requise.', it: 'Selezione necessaria.', }"
|
|
5932
5932
|
},
|
|
5933
|
+
{
|
|
5934
|
+
"kind": "variable",
|
|
5935
|
+
"name": "i18nMultipleSelectionPossible",
|
|
5936
|
+
"type": {
|
|
5937
|
+
"text": "Record<string, string>"
|
|
5938
|
+
},
|
|
5939
|
+
"default": "{ de: 'Mehrfachauswahl möglich', en: 'Multiple selection possible', fr: 'Sélection multiple possible', it: 'Selezione multipla possibile', }"
|
|
5940
|
+
},
|
|
5933
5941
|
{
|
|
5934
5942
|
"kind": "variable",
|
|
5935
5943
|
"name": "i18nInputRequired",
|
|
@@ -6822,6 +6830,14 @@
|
|
|
6822
6830
|
"module": "core/i18n/i18n.js"
|
|
6823
6831
|
}
|
|
6824
6832
|
},
|
|
6833
|
+
{
|
|
6834
|
+
"kind": "js",
|
|
6835
|
+
"name": "i18nMultipleSelectionPossible",
|
|
6836
|
+
"declaration": {
|
|
6837
|
+
"name": "i18nMultipleSelectionPossible",
|
|
6838
|
+
"module": "core/i18n/i18n.js"
|
|
6839
|
+
}
|
|
6840
|
+
},
|
|
6825
6841
|
{
|
|
6826
6842
|
"kind": "js",
|
|
6827
6843
|
"name": "i18nInputRequired",
|
|
@@ -30349,7 +30365,7 @@
|
|
|
30349
30365
|
{
|
|
30350
30366
|
"name": "element",
|
|
30351
30367
|
"type": {
|
|
30352
|
-
"text": "HTMLElement | null"
|
|
30368
|
+
"text": "HTMLElement | null | undefined"
|
|
30353
30369
|
}
|
|
30354
30370
|
},
|
|
30355
30371
|
{
|
|
@@ -50816,6 +50832,22 @@
|
|
|
50816
50832
|
"module": "core/base-elements/action-base-element.js"
|
|
50817
50833
|
}
|
|
50818
50834
|
},
|
|
50835
|
+
{
|
|
50836
|
+
"kind": "field",
|
|
50837
|
+
"name": "negative",
|
|
50838
|
+
"type": {
|
|
50839
|
+
"text": "boolean"
|
|
50840
|
+
},
|
|
50841
|
+
"privacy": "public",
|
|
50842
|
+
"default": "false",
|
|
50843
|
+
"description": "Negative coloring variant flag.",
|
|
50844
|
+
"attribute": "negative",
|
|
50845
|
+
"reflects": true,
|
|
50846
|
+
"inheritedFrom": {
|
|
50847
|
+
"name": "SbbNegativeMixin",
|
|
50848
|
+
"module": "core/mixins/negative-mixin.js"
|
|
50849
|
+
}
|
|
50850
|
+
},
|
|
50819
50851
|
{
|
|
50820
50852
|
"kind": "field",
|
|
50821
50853
|
"name": "elementDependencies",
|
|
@@ -51459,6 +51491,19 @@
|
|
|
51459
51491
|
"module": "link/common/block-link-common.js"
|
|
51460
51492
|
}
|
|
51461
51493
|
},
|
|
51494
|
+
{
|
|
51495
|
+
"name": "negative",
|
|
51496
|
+
"type": {
|
|
51497
|
+
"text": "boolean"
|
|
51498
|
+
},
|
|
51499
|
+
"default": "false",
|
|
51500
|
+
"description": "Negative coloring variant flag.",
|
|
51501
|
+
"fieldName": "negative",
|
|
51502
|
+
"inheritedFrom": {
|
|
51503
|
+
"name": "SbbNegativeMixin",
|
|
51504
|
+
"module": "core/mixins/negative-mixin.js"
|
|
51505
|
+
}
|
|
51506
|
+
},
|
|
51462
51507
|
{
|
|
51463
51508
|
"name": "icon-name",
|
|
51464
51509
|
"type": {
|
|
@@ -51673,6 +51718,22 @@
|
|
|
51673
51718
|
"module": "core/base-elements/action-base-element.js"
|
|
51674
51719
|
}
|
|
51675
51720
|
},
|
|
51721
|
+
{
|
|
51722
|
+
"kind": "field",
|
|
51723
|
+
"name": "negative",
|
|
51724
|
+
"type": {
|
|
51725
|
+
"text": "boolean"
|
|
51726
|
+
},
|
|
51727
|
+
"privacy": "public",
|
|
51728
|
+
"default": "false",
|
|
51729
|
+
"description": "Negative coloring variant flag.",
|
|
51730
|
+
"attribute": "negative",
|
|
51731
|
+
"reflects": true,
|
|
51732
|
+
"inheritedFrom": {
|
|
51733
|
+
"name": "SbbNegativeMixin",
|
|
51734
|
+
"module": "core/mixins/negative-mixin.js"
|
|
51735
|
+
}
|
|
51736
|
+
},
|
|
51676
51737
|
{
|
|
51677
51738
|
"kind": "field",
|
|
51678
51739
|
"name": "elementDependencies",
|
|
@@ -52632,6 +52693,19 @@
|
|
|
52632
52693
|
"module": "link/common/block-link-common.js"
|
|
52633
52694
|
}
|
|
52634
52695
|
},
|
|
52696
|
+
{
|
|
52697
|
+
"name": "negative",
|
|
52698
|
+
"type": {
|
|
52699
|
+
"text": "boolean"
|
|
52700
|
+
},
|
|
52701
|
+
"default": "false",
|
|
52702
|
+
"description": "Negative coloring variant flag.",
|
|
52703
|
+
"fieldName": "negative",
|
|
52704
|
+
"inheritedFrom": {
|
|
52705
|
+
"name": "SbbNegativeMixin",
|
|
52706
|
+
"module": "core/mixins/negative-mixin.js"
|
|
52707
|
+
}
|
|
52708
|
+
},
|
|
52635
52709
|
{
|
|
52636
52710
|
"name": "icon-name",
|
|
52637
52711
|
"type": {
|
|
@@ -52844,6 +52918,22 @@
|
|
|
52844
52918
|
"module": "core/base-elements/action-base-element.js"
|
|
52845
52919
|
}
|
|
52846
52920
|
},
|
|
52921
|
+
{
|
|
52922
|
+
"kind": "field",
|
|
52923
|
+
"name": "negative",
|
|
52924
|
+
"type": {
|
|
52925
|
+
"text": "boolean"
|
|
52926
|
+
},
|
|
52927
|
+
"privacy": "public",
|
|
52928
|
+
"default": "false",
|
|
52929
|
+
"description": "Negative coloring variant flag.",
|
|
52930
|
+
"attribute": "negative",
|
|
52931
|
+
"reflects": true,
|
|
52932
|
+
"inheritedFrom": {
|
|
52933
|
+
"name": "SbbNegativeMixin",
|
|
52934
|
+
"module": "core/mixins/negative-mixin.js"
|
|
52935
|
+
}
|
|
52936
|
+
},
|
|
52847
52937
|
{
|
|
52848
52938
|
"kind": "field",
|
|
52849
52939
|
"name": "elementDependencies",
|
|
@@ -53323,6 +53413,19 @@
|
|
|
53323
53413
|
"module": "link/common/block-link-common.js"
|
|
53324
53414
|
}
|
|
53325
53415
|
},
|
|
53416
|
+
{
|
|
53417
|
+
"name": "negative",
|
|
53418
|
+
"type": {
|
|
53419
|
+
"text": "boolean"
|
|
53420
|
+
},
|
|
53421
|
+
"default": "false",
|
|
53422
|
+
"description": "Negative coloring variant flag.",
|
|
53423
|
+
"fieldName": "negative",
|
|
53424
|
+
"inheritedFrom": {
|
|
53425
|
+
"name": "SbbNegativeMixin",
|
|
53426
|
+
"module": "core/mixins/negative-mixin.js"
|
|
53427
|
+
}
|
|
53428
|
+
},
|
|
53326
53429
|
{
|
|
53327
53430
|
"name": "icon-name",
|
|
53328
53431
|
"type": {
|
|
@@ -63419,6 +63522,12 @@
|
|
|
63419
63522
|
}
|
|
63420
63523
|
]
|
|
63421
63524
|
},
|
|
63525
|
+
{
|
|
63526
|
+
"kind": "javascript-module",
|
|
63527
|
+
"path": "select/select-trigger.component.js",
|
|
63528
|
+
"declarations": [],
|
|
63529
|
+
"exports": []
|
|
63530
|
+
},
|
|
63422
63531
|
{
|
|
63423
63532
|
"kind": "javascript-module",
|
|
63424
63533
|
"path": "select/select.component.js",
|
|
@@ -63467,9 +63576,9 @@
|
|
|
63467
63576
|
},
|
|
63468
63577
|
{
|
|
63469
63578
|
"kind": "field",
|
|
63470
|
-
"name": "
|
|
63579
|
+
"name": "elementDependencies",
|
|
63471
63580
|
"type": {
|
|
63472
|
-
"text": "
|
|
63581
|
+
"text": "SbbElementType[]"
|
|
63473
63582
|
},
|
|
63474
63583
|
"privacy": "public",
|
|
63475
63584
|
"static": true,
|
|
@@ -63477,7 +63586,7 @@
|
|
|
63477
63586
|
"name": "SbbElement",
|
|
63478
63587
|
"module": "core/base-elements/element.js"
|
|
63479
63588
|
},
|
|
63480
|
-
"
|
|
63589
|
+
"default": "[SbbSelectTriggerElement]"
|
|
63481
63590
|
},
|
|
63482
63591
|
{
|
|
63483
63592
|
"kind": "field",
|
|
@@ -63609,7 +63718,7 @@
|
|
|
63609
63718
|
"kind": "field",
|
|
63610
63719
|
"name": "_overlay",
|
|
63611
63720
|
"type": {
|
|
63612
|
-
"text": "HTMLElement"
|
|
63721
|
+
"text": "HTMLElement | undefined"
|
|
63613
63722
|
},
|
|
63614
63723
|
"privacy": "private"
|
|
63615
63724
|
},
|
|
@@ -63626,10 +63735,9 @@
|
|
|
63626
63735
|
"kind": "field",
|
|
63627
63736
|
"name": "_triggerElement",
|
|
63628
63737
|
"type": {
|
|
63629
|
-
"text": "
|
|
63738
|
+
"text": "SbbSelectTriggerElement<T> | undefined"
|
|
63630
63739
|
},
|
|
63631
|
-
"privacy": "private"
|
|
63632
|
-
"default": "null"
|
|
63740
|
+
"privacy": "private"
|
|
63633
63741
|
},
|
|
63634
63742
|
{
|
|
63635
63743
|
"kind": "field",
|
|
@@ -63645,12 +63753,6 @@
|
|
|
63645
63753
|
"privacy": "private",
|
|
63646
63754
|
"default": "new SbbEscapableOverlayController(this)"
|
|
63647
63755
|
},
|
|
63648
|
-
{
|
|
63649
|
-
"kind": "field",
|
|
63650
|
-
"name": "_overlayId",
|
|
63651
|
-
"privacy": "private",
|
|
63652
|
-
"default": "`sbb-select-${++nextId}`"
|
|
63653
|
-
},
|
|
63654
63756
|
{
|
|
63655
63757
|
"kind": "field",
|
|
63656
63758
|
"name": "_activeItemIndex",
|
|
@@ -63710,6 +63812,15 @@
|
|
|
63710
63812
|
"privacy": "private",
|
|
63711
63813
|
"default": "false"
|
|
63712
63814
|
},
|
|
63815
|
+
{
|
|
63816
|
+
"kind": "field",
|
|
63817
|
+
"name": "_restoreFocusOnClose",
|
|
63818
|
+
"type": {
|
|
63819
|
+
"text": "boolean"
|
|
63820
|
+
},
|
|
63821
|
+
"privacy": "private",
|
|
63822
|
+
"default": "false"
|
|
63823
|
+
},
|
|
63713
63824
|
{
|
|
63714
63825
|
"kind": "field",
|
|
63715
63826
|
"name": "options",
|
|
@@ -63760,6 +63871,23 @@
|
|
|
63760
63871
|
"module": "core/base-elements/open-close-base-element.js"
|
|
63761
63872
|
}
|
|
63762
63873
|
},
|
|
63874
|
+
{
|
|
63875
|
+
"kind": "method",
|
|
63876
|
+
"name": "_close",
|
|
63877
|
+
"privacy": "private",
|
|
63878
|
+
"return": {
|
|
63879
|
+
"type": {
|
|
63880
|
+
"text": "void"
|
|
63881
|
+
}
|
|
63882
|
+
},
|
|
63883
|
+
"parameters": [
|
|
63884
|
+
{
|
|
63885
|
+
"name": "restoreFocus",
|
|
63886
|
+
"default": "false",
|
|
63887
|
+
"description": "Whether the focus should be returned to the trigger, even if it's not within the select\n(e.g. when an option was selected by assistive technologies without receiving focus)."
|
|
63888
|
+
}
|
|
63889
|
+
]
|
|
63890
|
+
},
|
|
63763
63891
|
{
|
|
63764
63892
|
"kind": "method",
|
|
63765
63893
|
"name": "_isZeroAnimationDuration",
|
|
@@ -64019,6 +64147,17 @@
|
|
|
64019
64147
|
}
|
|
64020
64148
|
}
|
|
64021
64149
|
},
|
|
64150
|
+
{
|
|
64151
|
+
"kind": "method",
|
|
64152
|
+
"name": "_isFocusWithin",
|
|
64153
|
+
"privacy": "private",
|
|
64154
|
+
"return": {
|
|
64155
|
+
"type": {
|
|
64156
|
+
"text": "boolean"
|
|
64157
|
+
}
|
|
64158
|
+
},
|
|
64159
|
+
"description": "Whether the focus is still within the select (trigger, panel or an option).\nIn this case (e.g. closing by selection or Escape), the focus should be restored to the trigger.\nIf the focus is somewhere else (e.g. moved away by Tab, by clicking another control or an empty area,\nor the select was closed programmatically), the focus must not be moved."
|
|
64160
|
+
},
|
|
64022
64161
|
{
|
|
64023
64162
|
"kind": "method",
|
|
64024
64163
|
"name": "_onOptionSelected",
|
|
@@ -64224,16 +64363,12 @@
|
|
|
64224
64363
|
"type": {
|
|
64225
64364
|
"text": "SbbOptionElement<T> | null"
|
|
64226
64365
|
}
|
|
64227
|
-
},
|
|
64228
|
-
{
|
|
64229
|
-
"name": "setActiveDescendant",
|
|
64230
|
-
"default": "true"
|
|
64231
64366
|
}
|
|
64232
64367
|
]
|
|
64233
64368
|
},
|
|
64234
64369
|
{
|
|
64235
64370
|
"kind": "method",
|
|
64236
|
-
"name": "
|
|
64371
|
+
"name": "_onFocusIn",
|
|
64237
64372
|
"privacy": "private",
|
|
64238
64373
|
"return": {
|
|
64239
64374
|
"type": {
|
|
@@ -64242,18 +64377,13 @@
|
|
|
64242
64377
|
},
|
|
64243
64378
|
"parameters": [
|
|
64244
64379
|
{
|
|
64245
|
-
"name": "
|
|
64246
|
-
"type": {
|
|
64247
|
-
"text": "SbbOptionElement<T>"
|
|
64248
|
-
}
|
|
64249
|
-
},
|
|
64250
|
-
{
|
|
64251
|
-
"name": "lastActiveOption",
|
|
64380
|
+
"name": "event",
|
|
64252
64381
|
"type": {
|
|
64253
|
-
"text": "
|
|
64382
|
+
"text": "FocusEvent"
|
|
64254
64383
|
}
|
|
64255
64384
|
}
|
|
64256
|
-
]
|
|
64385
|
+
],
|
|
64386
|
+
"description": "Synchronizes the active index when an option receives focus (e.g. by pointer).\nMoving the focus must never change the selection."
|
|
64257
64387
|
},
|
|
64258
64388
|
{
|
|
64259
64389
|
"kind": "method",
|
|
@@ -64295,6 +64425,16 @@
|
|
|
64295
64425
|
}
|
|
64296
64426
|
}
|
|
64297
64427
|
},
|
|
64428
|
+
{
|
|
64429
|
+
"kind": "method",
|
|
64430
|
+
"name": "_handleSlotchange",
|
|
64431
|
+
"privacy": "private",
|
|
64432
|
+
"return": {
|
|
64433
|
+
"type": {
|
|
64434
|
+
"text": "void"
|
|
64435
|
+
}
|
|
64436
|
+
}
|
|
64437
|
+
},
|
|
64298
64438
|
{
|
|
64299
64439
|
"kind": "method",
|
|
64300
64440
|
"name": "_updateValueOptionState",
|
|
@@ -64929,9 +65069,9 @@
|
|
|
64929
65069
|
},
|
|
64930
65070
|
{
|
|
64931
65071
|
"kind": "field",
|
|
64932
|
-
"name": "
|
|
65072
|
+
"name": "role",
|
|
64933
65073
|
"type": {
|
|
64934
|
-
"text": "
|
|
65074
|
+
"text": "ElementInternals['role'] | undefined"
|
|
64935
65075
|
},
|
|
64936
65076
|
"privacy": "public",
|
|
64937
65077
|
"static": true,
|
|
@@ -65413,6 +65553,14 @@
|
|
|
65413
65553
|
"name": "*",
|
|
65414
65554
|
"module": "select/select.component.js"
|
|
65415
65555
|
}
|
|
65556
|
+
},
|
|
65557
|
+
{
|
|
65558
|
+
"kind": "js",
|
|
65559
|
+
"name": "*",
|
|
65560
|
+
"declaration": {
|
|
65561
|
+
"name": "*",
|
|
65562
|
+
"module": "select/select-trigger.component.js"
|
|
65563
|
+
}
|
|
65416
65564
|
}
|
|
65417
65565
|
]
|
|
65418
65566
|
},
|
|
@@ -85,6 +85,7 @@ export declare const i18nPaginatorSelected: Record<string, string>;
|
|
|
85
85
|
export declare const i18nPaginatorOf: Record<string, string>;
|
|
86
86
|
export declare const i18nCheckboxRequired: Record<string, string>;
|
|
87
87
|
export declare const i18nSelectionRequired: Record<string, string>;
|
|
88
|
+
export declare const i18nMultipleSelectionPossible: Record<string, string>;
|
|
88
89
|
export declare const i18nInputRequired: Record<string, string>;
|
|
89
90
|
export declare const i18nDateInvalid: Record<string, string>;
|
|
90
91
|
export declare const i18nDateMin: (min: string) => Record<string, string>;
|
|
@@ -16,7 +16,7 @@ export declare function getElementRectangle(el: HTMLElement): ElementRectangle;
|
|
|
16
16
|
/**
|
|
17
17
|
* Determines whether an event is fired on a specific element.
|
|
18
18
|
*/
|
|
19
|
-
export declare function isEventOnElement(element: HTMLElement | null, event: MouseEvent | PointerEvent): boolean;
|
|
19
|
+
export declare function isEventOnElement(element: HTMLElement | null | undefined, event: MouseEvent | PointerEvent): boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Determines the position of an element relative to a trigger element by evaluating
|
|
22
22
|
* the optimal position based on the available space.
|
package/development/core.js
CHANGED
|
@@ -2347,6 +2347,12 @@ const i18nSelectionRequired = {
|
|
|
2347
2347
|
fr: "Sélection requise.",
|
|
2348
2348
|
it: "Selezione necessaria."
|
|
2349
2349
|
};
|
|
2350
|
+
const i18nMultipleSelectionPossible = {
|
|
2351
|
+
de: "Mehrfachauswahl möglich",
|
|
2352
|
+
en: "Multiple selection possible",
|
|
2353
|
+
fr: "Sélection multiple possible",
|
|
2354
|
+
it: "Selezione multipla possibile"
|
|
2355
|
+
};
|
|
2350
2356
|
const i18nInputRequired = {
|
|
2351
2357
|
de: "Eingabe erforderlich.",
|
|
2352
2358
|
en: "Input required.",
|
|
@@ -6316,4 +6322,4 @@ function removeAriaComboBoxAttributes(trigger) {
|
|
|
6316
6322
|
trigger.removeAttribute("aria-expanded");
|
|
6317
6323
|
}
|
|
6318
6324
|
|
|
6319
|
-
export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SEPARATORLESS_FORMAT_DATE, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollController, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDownload, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nLogo125Anniversary, i18nLogo125AnniversaryYears, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nNonAccessible, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
|
|
6325
|
+
export { DateAdapter, FORMAT_DATE, FRIDAY, ISO8601_FORMAT_DATE, IS_FOCUSABLE_QUERY, InteractivityChecker, IsFocusableConfig, MONDAY, NativeDateAdapter, SATURDAY, SEPARATORLESS_FORMAT_DATE, SUNDAY, SbbActionBaseElement, SbbAnimationCompleteMixin, SbbButtonBaseElement, SbbButtonLikeBaseElement, SbbDarkModeController, SbbDisabledInteractiveMixin, SbbDisabledMixin, SbbDisabledTabIndexActionMixin, SbbElement, SbbEscapableOverlayController, SbbFocusTrapController, SbbFocusVisibleWithinController, SbbFormAssociatedCheckboxMixin, SbbFormAssociatedInputMixin, SbbFormAssociatedMixin, SbbFormAssociatedRadioButtonMixin, SbbIdReferenceController, SbbInertController, SbbLanguageController, SbbLinkBaseElement, SbbLiveAnnouncer, SbbMediaMatcherController, SbbMediaQueryBreakpointLargeAndAbove, SbbMediaQueryBreakpointLargeAndBelow, SbbMediaQueryBreakpointSmallAndAbove, SbbMediaQueryBreakpointSmallAndBelow, SbbMediaQueryBreakpointUltraAndAbove, SbbMediaQueryBreakpointZeroAndAbove, SbbMediaQueryDarkMode, SbbMediaQueryForcedColors, SbbMediaQueryHover, SbbMediaQueryPointerCoarse, SbbNamedSlotListMixin, SbbNegativeMixin, SbbOpenCloseBaseElement, SbbOverlayOutsidePointerEventListener, SbbOverlayPositionController, SbbPanelMixin, SbbPropertyWatcherController, SbbReadonlyMixin, SbbRequiredMixin, SbbScrollController, SbbScrollHandler, SbbSelectionGroupBaseElement, SbbSelectionPanelMixin, SbbSlottedChangeEvent, SbbUpdateSchedulerMixin, THURSDAY, TUESDAY, TemporalDateAdapter, WEDNESDAY, appendAriaElements, buttonResetStyles, containsPierceShadowDom, defaultDateAdapter, forceType, forwardEvent, getElementPosition, getElementPositionHorizontal, getElementRectangle, getEventTarget, getNextElementIndex, getOverride, handleDistinctChange, hostScrollbarStyles, i18nAdditionalWagonInformationHeading, i18nAnd, i18nArrival, i18nBlockedPassage, i18nBreadcrumbEllipsisButtonLabel, i18nCalendarDateSelection, i18nCalendarWeekNumber, i18nCarouselArrowsNavigationHint, i18nCarouselItemAriaLabel, i18nCheckboxRequired, i18nChipDelete, i18nChipGroupInputDescription, i18nClass, i18nClearInput, i18nCloseAlert, i18nCloseDialog, i18nCloseNavigation, i18nCloseNotification, i18nClosePopover, i18nCloseSidebar, i18nClosedCompartmentLabel, i18nCollapsed, i18nConnectionFrom, i18nConnectionRoundtrip, i18nConnectionTo, i18nCouchetteWagonLabel, i18nDateChangedTo, i18nDateInvalid, i18nDateMax, i18nDateMin, i18nDatePickerPlaceholder, i18nDeparture, i18nDialog, i18nDirection, i18nDownload, i18nDurationDay, i18nDurationHour, i18nDurationMinute, i18nExpanded, i18nFileSelectorButtonLabel, i18nFileSelectorButtonLabelMultiple, i18nFileSelectorCurrentlySelected, i18nFileSelectorDeleteFile, i18nFileSelectorSubtitleLabel, i18nFileSelectorSubtitleLabelMultiple, i18nFlipCard, i18nFromPlatform, i18nGoBack, i18nInputRequired, i18nItemsPerPage, i18nLocomotiveLabel, i18nLogo125Anniversary, i18nLogo125AnniversaryYears, i18nMapContainerButtonLabel, i18nMeansOfTransport, i18nMultipleSelectionPossible, i18nNew, i18nNextDay, i18nNextMonth, i18nNextPage, i18nNextSlide, i18nNextYear, i18nNextYearRange, i18nNonAccessible, i18nOccupancy, i18nPage, i18nPaginatorOf, i18nPaginatorSelected, i18nPreviousDay, i18nPreviousMonth, i18nPreviousPage, i18nPreviousSlide, i18nPreviousYear, i18nPreviousYearRange, i18nRealTimeInfo, i18nRemainingCharacters, i18nRestaurantWagonLabel, i18nReverseCard, i18nSector, i18nSectorShort, i18nSelectNextDay, i18nSelectPreviousDay, i18nSelectionRequired, i18nShowCalendar, i18nSleepingWagonLabel, i18nSlide, i18nSupersaver, i18nTargetOpensInNewWindow, i18nTimeInputChange, i18nTimeInvalid, i18nTimeMax, i18nTimeMaxLength, i18nTimetableFormSwapButtonLabel, i18nToday, i18nTrain, i18nTrains, i18nTransferProcedure, i18nTransferProcedures, i18nTravelhints, i18nTripDuration, i18nTripQuayChange, i18nWagonLabel, i18nWagonLabelNumber, i18nWagonsLabel, i18nWalkingDistanceArrival, i18nWalkingDistanceDeparture, i18nYearMonthSelection, idReference, interactivityChecker, isAndroid, isArrowKeyOrPageKeysPressed, isArrowKeyPressed, isBlink, isChromium, isEdge, isEventOnElement, isEventPrevented, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, isFirefox, isIOS, isMacOS, isNextArrowKeyPressed, isNextjs, isPreviousArrowKeyPressed, isSafari, isTrident, isWebkit, isZeroAnimationDuration, listResetStyles, mergeConfig, omitEmptyConverter, pageScrollDisabled, plainDate, plainDateConverter, popoverResetStyles, preventScrollOnSpacebarPress, queueDomContentLoaded, radioButtonRegistry, readConfig, removeAriaComboBoxAttributes, removeAriaElements, removeAriaOverlayTriggerProperties, sbbInputModalityDetector, sbbLiveAnnouncer, sbbOverlayOutsidePointerEventListener, screenReaderOnlyStyles, scrollbarStyles, setAriaComboBoxAttributes, setAriaOverlayTriggerProperties, setOrRemoveAttribute, setOverlayPosition, ɵstateController };
|
|
@@ -513,7 +513,7 @@ let SbbOptionBaseElement = (() => {
|
|
|
513
513
|
super.requestUpdate(name, oldValue, options);
|
|
514
514
|
if (name === "disabled" || name === "disabledFromGroup") {
|
|
515
515
|
this.toggleState("disabled", this.disabled || this.disabledFromGroup);
|
|
516
|
-
setOrRemoveAttribute(this, "tabindex", isAndroid && !this.disabled && !this.disabledFromGroup ? 0 : null);
|
|
516
|
+
if (!this.closest?.("sbb-select")) setOrRemoveAttribute(this, "tabindex", isAndroid && !this.disabled && !this.disabledFromGroup ? 0 : null);
|
|
517
517
|
this.updateAriaDisabled();
|
|
518
518
|
}
|
|
519
519
|
}
|
|
@@ -598,7 +598,7 @@ let SbbOptionBaseElement = (() => {
|
|
|
598
598
|
})();
|
|
599
599
|
|
|
600
600
|
// src/elements/option/option/option.scss?inline
|
|
601
|
-
var option_default = ":host {\n --sbb-focus-outline-offset: var(--sbb-option-focus-outline-offset);\n display: block;\n background-color: var(--sbb-option-background-color);\n font-size: var(--sbb-option-font-size);\n letter-spacing: var(--sbb-letter-spacing-text);\n}\n\n:host(:is(:state(negative),[state--negative])) {\n --sbb-option-color: var(--sbb-color-3-negative);\n --sbb-option-icon-color: var(--sbb-color-5);\n --sbb-option-background-color-hover: var(--sbb-color-midnight);\n --sbb-option-background-color-active: var(--sbb-background-color-4-negative);\n --sbb-option-disabled-border-color: var(--sbb-border-color-5);\n --sbb-option-disabled-background-color: var(--sbb-background-color-3-negative);\n --sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);\n}\n\n:host(:is(:state(size-s),[state--size-s])) {\n --sbb-option-min-height: var(--sbb-size-element-xxs);\n --sbb-option-focus-outline-offset: calc(-1 * var(--sbb-spacing-fixed-1x));\n --sbb-option-focus-outline-inset: 0 var(--sbb-spacing-fixed-1x);\n}\n\n:host(:is(:state(size-m),[state--size-m])) {\n --sbb-option-min-height: var(--sbb-size-element-s);\n --sbb-option-focus-outline-offset: inherit;\n --sbb-option-focus-outline-inset: var(--sbb-spacing-fixed-1x);\n}\n\n@media (any-hover: hover) {\n :host(:hover:not(:is(:state(disabled),[state--disabled]))) {\n --sbb-option-background-color: var(--sbb-option-background-color-hover);\n }\n}\n\n:host(:active:not(:is(:state(disabled),[state--disabled]))) {\n --sbb-option-background-color: var(--sbb-option-background-color-active);\n}\n\n:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot {\n display: none;\n}\n\n:host(:is(:state(disabled),[state--disabled])) {\n --sbb-option-cursor: var(--sbb-cursor-default);\n}\n@media (forced-colors: active) {\n :host(:is(:state(disabled),[state--disabled])) {\n --sbb-option-color: GrayText;\n }\n}\n\n:host(:is(:state(variant-select),[state--variant-select])) {\n --sbb-option-column-gap: var(--sbb-spacing-fixed-2x);\n --sbb-option-justify-content: space-between;\n}\n\n:host(:is(:state(variant-select),[state--variant-select]):is(:state(multiple),[state--multiple])) {\n --sbb-option-justify-content: start;\n}\n\n:host(:is(:state(active),[state--active])) {\n --sbb-option-focus-outline-display: block;\n}\n\n:host(:not(:is(:is(:state(disabled),[state--disabled])))) .sbb-option__label--highlight {\n font-weight: bold;\n}\n@media (forced-colors: active) {\n :host(:not(:is(:is(:state(disabled),[state--disabled])))) .sbb-option__label--highlight {\n color: Highlight;\n }\n}\n\n.sbb-option {\n position: relative;\n display: flex;\n min-height: var(--sbb-option-min-height);\n align-items: center;\n column-gap: var(--sbb-option-column-gap);\n padding-inline: var(--sbb-option-padding-inline);\n justify-content: var(--sbb-option-justify-content);\n color: var(--sbb-option-color);\n cursor: var(--sbb-option-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-text-fill-color: var(--sbb-option-color);\n}\n.sbb-option::after {\n content: \"\";\n display: var(--sbb-option-focus-outline-display, none);\n position: absolute;\n inset: var(--sbb-option-focus-outline-inset);\n pointer-events: none;\n border: var(--sbb-focus-outline-width) solid var(--sbb-focus-outline-color);\n border-radius: var(--sbb-option-border-radius);\n}\n:host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option {\n position: relative;\n z-index: 0;\n}\n:host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option::before {\n content: \"\";\n display: var(--sbb-option-disabled-display, block);\n position: absolute;\n inset: var(--sbb-option-disabled-inset);\n border: var(--sbb-border-width-1x) dashed var(--sbb-option-disabled-border-color);\n border-radius: var(--sbb-option-disabled-border-radius);\n background-color: var(--sbb-option-disabled-background-color);\n z-index: -1;\n}\n@media (forced-colors: active) {\n :host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option::before {\n border-color: GrayText;\n }\n}\n\n.sbb-option__icon {\n display: flex;\n min-width: var(--sbb-size-icon-ui-small);\n min-height: var(--sbb-size-icon-ui-small);\n color: var(--sbb-option-icon-color);\n}\n:host(:not(:is(:state(slotted-icon),[state--slotted-icon]), :is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon {\n display: var(--sbb-option-icon-container-display, none);\n}\n\n.sbb-option__label {\n text-overflow: var(--sbb-option-text-overflow);\n overflow: var(--sbb-option-overflow);\n white-space: var(--sbb-option-white-space, initial);\n}\n";
|
|
601
|
+
var option_default = ":host {\n --sbb-focus-outline-offset: var(--sbb-option-focus-outline-offset);\n display: block;\n background-color: var(--sbb-option-background-color);\n font-size: var(--sbb-option-font-size);\n letter-spacing: var(--sbb-letter-spacing-text);\n outline: none !important;\n}\n\n:host(:is(:state(negative),[state--negative])) {\n --sbb-option-color: var(--sbb-color-3-negative);\n --sbb-option-icon-color: var(--sbb-color-5);\n --sbb-option-background-color-hover: var(--sbb-color-midnight);\n --sbb-option-background-color-active: var(--sbb-background-color-4-negative);\n --sbb-option-disabled-border-color: var(--sbb-border-color-5);\n --sbb-option-disabled-background-color: var(--sbb-background-color-3-negative);\n --sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);\n}\n\n:host(:is(:state(size-s),[state--size-s])) {\n --sbb-option-min-height: var(--sbb-size-element-xxs);\n --sbb-option-focus-outline-offset: calc(-1 * var(--sbb-spacing-fixed-1x));\n --sbb-option-focus-outline-inset: 0 var(--sbb-spacing-fixed-1x);\n}\n\n:host(:is(:state(size-m),[state--size-m])) {\n --sbb-option-min-height: var(--sbb-size-element-s);\n --sbb-option-focus-outline-offset: inherit;\n --sbb-option-focus-outline-inset: var(--sbb-spacing-fixed-1x);\n}\n\n@media (any-hover: hover) {\n :host(:hover:not(:is(:state(disabled),[state--disabled]))) {\n --sbb-option-background-color: var(--sbb-option-background-color-hover);\n }\n}\n\n:host(:active:not(:is(:state(disabled),[state--disabled]))) {\n --sbb-option-background-color: var(--sbb-option-background-color-active);\n}\n\n:host(:not(:is(:state(disable-highlight),[state--disable-highlight]))) .sbb-option__label slot {\n display: none;\n}\n\n:host(:is(:state(disabled),[state--disabled])) {\n --sbb-option-cursor: var(--sbb-cursor-default);\n}\n@media (forced-colors: active) {\n :host(:is(:state(disabled),[state--disabled])) {\n --sbb-option-color: GrayText;\n }\n}\n\n:host(:is(:state(variant-select),[state--variant-select])) {\n --sbb-option-column-gap: var(--sbb-spacing-fixed-2x);\n --sbb-option-justify-content: space-between;\n}\n\n:host(:is(:state(variant-select),[state--variant-select]):is(:state(multiple),[state--multiple])) {\n --sbb-option-justify-content: start;\n}\n\n:host(:is(:state(active),[state--active])) {\n --sbb-option-focus-outline-display: block;\n}\n\n:host(:not(:is(:is(:state(disabled),[state--disabled])))) .sbb-option__label--highlight {\n font-weight: bold;\n}\n@media (forced-colors: active) {\n :host(:not(:is(:is(:state(disabled),[state--disabled])))) .sbb-option__label--highlight {\n color: Highlight;\n }\n}\n\n.sbb-option {\n position: relative;\n display: flex;\n min-height: var(--sbb-option-min-height);\n align-items: center;\n column-gap: var(--sbb-option-column-gap);\n padding-inline: var(--sbb-option-padding-inline);\n justify-content: var(--sbb-option-justify-content);\n color: var(--sbb-option-color);\n cursor: var(--sbb-option-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-text-fill-color: var(--sbb-option-color);\n}\n.sbb-option::after {\n content: \"\";\n display: var(--sbb-option-focus-outline-display, none);\n position: absolute;\n inset: var(--sbb-option-focus-outline-inset);\n pointer-events: none;\n border: var(--sbb-focus-outline-width) solid var(--sbb-focus-outline-color);\n border-radius: var(--sbb-option-border-radius);\n}\n:host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option {\n position: relative;\n z-index: 0;\n}\n:host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option::before {\n content: \"\";\n display: var(--sbb-option-disabled-display, block);\n position: absolute;\n inset: var(--sbb-option-disabled-inset);\n border: var(--sbb-border-width-1x) dashed var(--sbb-option-disabled-border-color);\n border-radius: var(--sbb-option-disabled-border-radius);\n background-color: var(--sbb-option-disabled-background-color);\n z-index: -1;\n}\n@media (forced-colors: active) {\n :host(:is(:state(disabled),[state--disabled]):not(:is(:state(multiple),[state--multiple]))) .sbb-option::before {\n border-color: GrayText;\n }\n}\n\n.sbb-option__icon {\n display: flex;\n min-width: var(--sbb-size-icon-ui-small);\n min-height: var(--sbb-size-icon-ui-small);\n color: var(--sbb-option-icon-color);\n}\n:host(:not(:is(:state(slotted-icon),[state--slotted-icon]), :is(:state(has-icon-name),[state--has-icon-name]))) .sbb-option__icon {\n display: var(--sbb-option-icon-container-display, none);\n}\n\n.sbb-option__label {\n text-overflow: var(--sbb-option-text-overflow);\n overflow: var(--sbb-option-overflow);\n white-space: var(--sbb-option-white-space, initial);\n}\n";
|
|
602
602
|
|
|
603
603
|
// src/elements/option/option/option.component.ts
|
|
604
604
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type CSSResultGroup, type TemplateResult } from 'lit';
|
|
2
|
+
import { SbbElement } from '../core.ts';
|
|
3
|
+
import type { SbbSelectElement } from './select.component.ts';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Internal component used as the select trigger.
|
|
7
|
+
*
|
|
8
|
+
* A dedicated component is required to leverage ElementInternals to associate
|
|
9
|
+
* elements across Shadow DOM boundaries.
|
|
10
|
+
*
|
|
11
|
+
* @slot - Use the unnamed slot to add content
|
|
12
|
+
*/
|
|
13
|
+
export declare class SbbSelectTriggerElement<T = string> extends SbbElement {
|
|
14
|
+
static readonly elementName: string;
|
|
15
|
+
static readonly role = "combobox";
|
|
16
|
+
static styles: CSSResultGroup;
|
|
17
|
+
set select(select: SbbSelectElement<T> | null);
|
|
18
|
+
get select(): SbbSelectElement<T> | null;
|
|
19
|
+
private _select;
|
|
20
|
+
private _selectPropertyWatcher;
|
|
21
|
+
constructor();
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
protected render(): TemplateResult;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'sbb-select-trigger': SbbSelectTriggerElement;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CSSResultGroup, type PropertyDeclaration, type PropertyValues, type TemplateResult } from 'lit';
|
|
2
|
-
import { type FormRestoreReason, type FormRestoreState, SbbOpenCloseBaseElement } from '../core.ts';
|
|
2
|
+
import { type FormRestoreReason, type FormRestoreState, type SbbElementType, SbbOpenCloseBaseElement } from '../core.ts';
|
|
3
3
|
import { type SbbOptionElement } from '../option.pure.ts';
|
|
4
|
+
import { SbbSelectTriggerElement } from './select-trigger.component.ts';
|
|
4
5
|
declare const SbbSelectElement_base: import("../core.ts").AbstractConstructor<import("../core.ts").SbbUpdateSchedulerMixinType> & import("../core.ts").AbstractConstructor<import("../core.ts").SbbDisabledMixinType> & import("../core.ts").AbstractConstructor<import("../core.ts").SbbNegativeMixinType> & import("../core.ts").AbstractConstructor<import("../core.ts").SbbRequiredMixinType> & import("../core.ts").AbstractConstructor<import("../core.ts").SbbReadonlyMixinType> & import("../core.ts").AbstractConstructor<import("../core.ts").SbbFormAssociatedMixinType> & typeof SbbOpenCloseBaseElement;
|
|
5
6
|
/**
|
|
6
7
|
* It displays a panel with selectable options.
|
|
@@ -16,8 +17,8 @@ declare const SbbSelectElement_base: import("../core.ts").AbstractConstructor<im
|
|
|
16
17
|
*/
|
|
17
18
|
export declare class SbbSelectElement<T = string> extends SbbSelectElement_base {
|
|
18
19
|
static readonly elementName: string;
|
|
19
|
-
static readonly role: string | null;
|
|
20
20
|
static styles: CSSResultGroup;
|
|
21
|
+
static elementDependencies: SbbElementType[];
|
|
21
22
|
static readonly events: {
|
|
22
23
|
readonly change: "change";
|
|
23
24
|
readonly input: "input";
|
|
@@ -27,6 +28,7 @@ export declare class SbbSelectElement<T = string> extends SbbSelectElement_base
|
|
|
27
28
|
readonly beforeclose: "beforeclose";
|
|
28
29
|
readonly close: "close";
|
|
29
30
|
};
|
|
31
|
+
static get observedAttributes(): string[];
|
|
30
32
|
/** The placeholder used if no value has been selected. */
|
|
31
33
|
accessor placeholder: string;
|
|
32
34
|
/** Whether the select allows for multiple selection. */
|
|
@@ -51,12 +53,11 @@ export declare class SbbSelectElement<T = string> extends SbbSelectElement_base
|
|
|
51
53
|
/** The value displayed by the component. */
|
|
52
54
|
private accessor _displayValue;
|
|
53
55
|
private _resizeObserver;
|
|
54
|
-
private _overlay
|
|
56
|
+
private _overlay?;
|
|
55
57
|
private _originElement;
|
|
56
|
-
private _triggerElement
|
|
58
|
+
private _triggerElement?;
|
|
57
59
|
private _openPanelEventsController?;
|
|
58
60
|
private _escapableOverlayController;
|
|
59
|
-
private _overlayId;
|
|
60
61
|
private _activeItemIndex;
|
|
61
62
|
private _searchTimeout?;
|
|
62
63
|
private _searchString;
|
|
@@ -64,19 +65,26 @@ export declare class SbbSelectElement<T = string> extends SbbSelectElement_base
|
|
|
64
65
|
private _isPointerDownEventOnMenu;
|
|
65
66
|
private _languageController;
|
|
66
67
|
private _isValueManuallyAssigned;
|
|
68
|
+
private _restoreFocusOnClose;
|
|
67
69
|
/**
|
|
68
70
|
* The 'combobox' input element
|
|
69
71
|
* @internal
|
|
70
72
|
*/
|
|
71
|
-
get inputElement():
|
|
73
|
+
get inputElement(): SbbSelectTriggerElement<T> | null;
|
|
72
74
|
/** Returns all SbbOptionElements from this sbb-select instance. */
|
|
73
75
|
get options(): SbbOptionElement<T>[];
|
|
74
76
|
constructor();
|
|
77
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
75
78
|
private _syncAriaLabels;
|
|
76
79
|
/** Opens the selection panel. */
|
|
77
80
|
open(): void;
|
|
78
81
|
/** Closes the selection panel. */
|
|
79
82
|
close(): void;
|
|
83
|
+
/**
|
|
84
|
+
* @param restoreFocus Whether the focus should be returned to the trigger, even if it's not within the select
|
|
85
|
+
* (e.g. when an option was selected by assistive technologies without receiving focus).
|
|
86
|
+
*/
|
|
87
|
+
private _close;
|
|
80
88
|
private _isZeroAnimationDuration;
|
|
81
89
|
/** Gets the current displayed value. */
|
|
82
90
|
getDisplayValue(): string;
|
|
@@ -137,6 +145,13 @@ export declare class SbbSelectElement<T = string> extends SbbSelectElement_base
|
|
|
137
145
|
private _onAnimationEnd;
|
|
138
146
|
private _handleOpening;
|
|
139
147
|
private _handleClosing;
|
|
148
|
+
/**
|
|
149
|
+
* Whether the focus is still within the select (trigger, panel or an option).
|
|
150
|
+
* In this case (e.g. closing by selection or Escape), the focus should be restored to the trigger.
|
|
151
|
+
* If the focus is somewhere else (e.g. moved away by Tab, by clicking another control or an empty area,
|
|
152
|
+
* or the select was closed programmatically), the focus must not be moved.
|
|
153
|
+
*/
|
|
154
|
+
private _isFocusWithin;
|
|
140
155
|
/** When an option is selected, updates the displayValue; it also closes the select if not `multiple`. */
|
|
141
156
|
private _onOptionSelected;
|
|
142
157
|
/** When an option is unselected in `multiple`, removes it from value and updates displayValue. */
|
|
@@ -151,12 +166,17 @@ export declare class SbbSelectElement<T = string> extends SbbSelectElement_base
|
|
|
151
166
|
private _selectByKeyboard;
|
|
152
167
|
private _setNextActiveOption;
|
|
153
168
|
private _setActiveElement;
|
|
154
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Synchronizes the active index when an option receives focus (e.g. by pointer).
|
|
171
|
+
* Moving the focus must never change the selection.
|
|
172
|
+
*/
|
|
173
|
+
private _onFocusIn;
|
|
155
174
|
private _resetActiveElement;
|
|
156
175
|
private _pointerDownListener;
|
|
157
176
|
private _closeOnBackdropClick;
|
|
158
177
|
private _updateOptionsFromValue;
|
|
159
178
|
private _updateValueFromOptions;
|
|
179
|
+
private _handleSlotchange;
|
|
160
180
|
private _updateValueOptionState;
|
|
161
181
|
private _getSelected;
|
|
162
182
|
private _toggleOpening;
|
package/development/select.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { SbbSelectElement } from "./select.pure.js";
|
|
1
|
+
import { SbbSelectElement, SbbSelectTriggerElement } from "./select.pure.js";
|
|
2
2
|
|
|
3
3
|
export * from "./select.pure.js"
|
|
4
4
|
|
|
5
5
|
// src/elements/select.ts
|
|
6
6
|
/** @entrypoint */
|
|
7
7
|
SbbSelectElement.define();
|
|
8
|
+
SbbSelectTriggerElement.define();
|