@sbb-esta/lyne-elements-dev 4.13.0-dev.1779093785 → 4.13.0-dev.1779094053

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.
Files changed (2) hide show
  1. package/custom-elements.json +1196 -1196
  2. package/package.json +3 -3
@@ -124081,6 +124081,261 @@
124081
124081
  }
124082
124082
  ]
124083
124083
  },
124084
+ {
124085
+ "kind": "javascript-module",
124086
+ "path": "table/table-wrapper/table-wrapper.component.js",
124087
+ "declarations": [
124088
+ {
124089
+ "kind": "class",
124090
+ "description": "Wraps a table to enhance its functionality.",
124091
+ "name": "SbbTableWrapperElement",
124092
+ "slots": [
124093
+ {
124094
+ "description": "Use the unnamed slot to add the table.",
124095
+ "name": ""
124096
+ }
124097
+ ],
124098
+ "members": [
124099
+ {
124100
+ "kind": "field",
124101
+ "name": "elementName",
124102
+ "type": {
124103
+ "text": "string"
124104
+ },
124105
+ "privacy": "public",
124106
+ "static": true,
124107
+ "readonly": true,
124108
+ "default": "'sbb-table-wrapper'",
124109
+ "inheritedFrom": {
124110
+ "name": "SbbElement",
124111
+ "module": "core/base-elements/element.js"
124112
+ }
124113
+ },
124114
+ {
124115
+ "kind": "field",
124116
+ "name": "role",
124117
+ "type": {
124118
+ "text": "string"
124119
+ },
124120
+ "privacy": "public",
124121
+ "static": true,
124122
+ "readonly": true,
124123
+ "default": "'section'"
124124
+ },
124125
+ {
124126
+ "kind": "field",
124127
+ "name": "focusable",
124128
+ "type": {
124129
+ "text": "boolean"
124130
+ },
124131
+ "privacy": "public",
124132
+ "default": "false",
124133
+ "description": "Whether the table wrapper is focusable.",
124134
+ "attribute": "focusable",
124135
+ "reflects": true
124136
+ },
124137
+ {
124138
+ "kind": "method",
124139
+ "name": "_updateScrollbarClass",
124140
+ "privacy": "private",
124141
+ "return": {
124142
+ "type": {
124143
+ "text": "void"
124144
+ }
124145
+ }
124146
+ },
124147
+ {
124148
+ "kind": "method",
124149
+ "name": "_checkHorizontalScrollbarOffset",
124150
+ "privacy": "private",
124151
+ "return": {
124152
+ "type": {
124153
+ "text": "void"
124154
+ }
124155
+ },
124156
+ "description": "Calculates whether the table is horizontally scrolled and adds the\ncorresponding class `sbb-table-wrapper-offset-${none | left | right | both}`"
124157
+ },
124158
+ {
124159
+ "kind": "method",
124160
+ "name": "_calculateScrollOffset",
124161
+ "privacy": "private",
124162
+ "return": {
124163
+ "type": {
124164
+ "text": "'none' | 'left' | 'right' | 'both'"
124165
+ }
124166
+ }
124167
+ },
124168
+ {
124169
+ "kind": "field",
124170
+ "name": "negative",
124171
+ "type": {
124172
+ "text": "boolean"
124173
+ },
124174
+ "privacy": "public",
124175
+ "default": "false",
124176
+ "description": "Negative coloring variant flag.",
124177
+ "attribute": "negative",
124178
+ "reflects": true,
124179
+ "inheritedFrom": {
124180
+ "name": "SbbNegativeMixin",
124181
+ "module": "core/mixins/negative-mixin.js"
124182
+ }
124183
+ },
124184
+ {
124185
+ "kind": "field",
124186
+ "name": "_hydrationRequired",
124187
+ "type": {
124188
+ "text": "boolean"
124189
+ },
124190
+ "privacy": "private",
124191
+ "default": "!!this.shadowRoot",
124192
+ "inheritedFrom": {
124193
+ "name": "SbbElement",
124194
+ "module": "core/base-elements/element.js"
124195
+ }
124196
+ },
124197
+ {
124198
+ "kind": "field",
124199
+ "name": "_hydrationComplete",
124200
+ "privacy": "private",
124201
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
124202
+ "inheritedFrom": {
124203
+ "name": "SbbElement",
124204
+ "module": "core/base-elements/element.js"
124205
+ }
124206
+ },
124207
+ {
124208
+ "kind": "field",
124209
+ "name": "_resolveHydration",
124210
+ "type": {
124211
+ "text": "(hydrationRequired: boolean) => void"
124212
+ },
124213
+ "privacy": "private",
124214
+ "inheritedFrom": {
124215
+ "name": "SbbElement",
124216
+ "module": "core/base-elements/element.js"
124217
+ }
124218
+ },
124219
+ {
124220
+ "kind": "field",
124221
+ "name": "hydrationRequired",
124222
+ "type": {
124223
+ "text": "boolean"
124224
+ },
124225
+ "privacy": "protected",
124226
+ "description": "Returns whether hydration is required and not completed.",
124227
+ "readonly": true,
124228
+ "inheritedFrom": {
124229
+ "name": "SbbElement",
124230
+ "module": "core/base-elements/element.js"
124231
+ },
124232
+ "default": "!!this.shadowRoot"
124233
+ },
124234
+ {
124235
+ "kind": "method",
124236
+ "name": "toggleState",
124237
+ "privacy": "protected",
124238
+ "return": {
124239
+ "type": {
124240
+ "text": "void"
124241
+ }
124242
+ },
124243
+ "parameters": [
124244
+ {
124245
+ "name": "value",
124246
+ "type": {
124247
+ "text": "string"
124248
+ }
124249
+ },
124250
+ {
124251
+ "name": "force",
124252
+ "optional": true,
124253
+ "type": {
124254
+ "text": "boolean"
124255
+ }
124256
+ }
124257
+ ],
124258
+ "inheritedFrom": {
124259
+ "name": "SbbElement",
124260
+ "module": "core/base-elements/element.js"
124261
+ }
124262
+ },
124263
+ {
124264
+ "kind": "field",
124265
+ "name": "['_$sbbElement$']",
124266
+ "type": {
124267
+ "text": "boolean"
124268
+ },
124269
+ "privacy": "public",
124270
+ "static": true,
124271
+ "default": "true",
124272
+ "inheritedFrom": {
124273
+ "name": "SbbElement",
124274
+ "module": "core/base-elements/element.js"
124275
+ }
124276
+ },
124277
+ {
124278
+ "kind": "field",
124279
+ "name": "_controllers",
124280
+ "type": {
124281
+ "text": "Set<SbbReactiveController> | undefined"
124282
+ },
124283
+ "privacy": "private",
124284
+ "inheritedFrom": {
124285
+ "name": "SbbElement",
124286
+ "module": "core/base-elements/element.js"
124287
+ }
124288
+ }
124289
+ ],
124290
+ "attributes": [
124291
+ {
124292
+ "name": "focusable",
124293
+ "type": {
124294
+ "text": "boolean"
124295
+ },
124296
+ "default": "false",
124297
+ "description": "Whether the table wrapper is focusable.",
124298
+ "fieldName": "focusable"
124299
+ },
124300
+ {
124301
+ "name": "negative",
124302
+ "type": {
124303
+ "text": "boolean"
124304
+ },
124305
+ "default": "false",
124306
+ "description": "Negative coloring variant flag.",
124307
+ "fieldName": "negative",
124308
+ "inheritedFrom": {
124309
+ "name": "SbbNegativeMixin",
124310
+ "module": "core/mixins/negative-mixin.js"
124311
+ }
124312
+ }
124313
+ ],
124314
+ "mixins": [
124315
+ {
124316
+ "name": "SbbNegativeMixin",
124317
+ "module": "core/mixins.js"
124318
+ }
124319
+ ],
124320
+ "superclass": {
124321
+ "name": "SbbElement",
124322
+ "module": "core/base-elements.js"
124323
+ },
124324
+ "tagName": "sbb-table-wrapper",
124325
+ "customElement": true
124326
+ }
124327
+ ],
124328
+ "exports": [
124329
+ {
124330
+ "kind": "js",
124331
+ "name": "SbbTableWrapperElement",
124332
+ "declaration": {
124333
+ "name": "SbbTableWrapperElement",
124334
+ "module": "table/table-wrapper/table-wrapper.component.js"
124335
+ }
124336
+ }
124337
+ ]
124338
+ },
124084
124339
  {
124085
124340
  "kind": "javascript-module",
124086
124341
  "path": "stepper/stepper/stepper.component.js",
@@ -124712,261 +124967,6 @@
124712
124967
  }
124713
124968
  ]
124714
124969
  },
124715
- {
124716
- "kind": "javascript-module",
124717
- "path": "table/table-wrapper/table-wrapper.component.js",
124718
- "declarations": [
124719
- {
124720
- "kind": "class",
124721
- "description": "Wraps a table to enhance its functionality.",
124722
- "name": "SbbTableWrapperElement",
124723
- "slots": [
124724
- {
124725
- "description": "Use the unnamed slot to add the table.",
124726
- "name": ""
124727
- }
124728
- ],
124729
- "members": [
124730
- {
124731
- "kind": "field",
124732
- "name": "elementName",
124733
- "type": {
124734
- "text": "string"
124735
- },
124736
- "privacy": "public",
124737
- "static": true,
124738
- "readonly": true,
124739
- "default": "'sbb-table-wrapper'",
124740
- "inheritedFrom": {
124741
- "name": "SbbElement",
124742
- "module": "core/base-elements/element.js"
124743
- }
124744
- },
124745
- {
124746
- "kind": "field",
124747
- "name": "role",
124748
- "type": {
124749
- "text": "string"
124750
- },
124751
- "privacy": "public",
124752
- "static": true,
124753
- "readonly": true,
124754
- "default": "'section'"
124755
- },
124756
- {
124757
- "kind": "field",
124758
- "name": "focusable",
124759
- "type": {
124760
- "text": "boolean"
124761
- },
124762
- "privacy": "public",
124763
- "default": "false",
124764
- "description": "Whether the table wrapper is focusable.",
124765
- "attribute": "focusable",
124766
- "reflects": true
124767
- },
124768
- {
124769
- "kind": "method",
124770
- "name": "_updateScrollbarClass",
124771
- "privacy": "private",
124772
- "return": {
124773
- "type": {
124774
- "text": "void"
124775
- }
124776
- }
124777
- },
124778
- {
124779
- "kind": "method",
124780
- "name": "_checkHorizontalScrollbarOffset",
124781
- "privacy": "private",
124782
- "return": {
124783
- "type": {
124784
- "text": "void"
124785
- }
124786
- },
124787
- "description": "Calculates whether the table is horizontally scrolled and adds the\ncorresponding class `sbb-table-wrapper-offset-${none | left | right | both}`"
124788
- },
124789
- {
124790
- "kind": "method",
124791
- "name": "_calculateScrollOffset",
124792
- "privacy": "private",
124793
- "return": {
124794
- "type": {
124795
- "text": "'none' | 'left' | 'right' | 'both'"
124796
- }
124797
- }
124798
- },
124799
- {
124800
- "kind": "field",
124801
- "name": "negative",
124802
- "type": {
124803
- "text": "boolean"
124804
- },
124805
- "privacy": "public",
124806
- "default": "false",
124807
- "description": "Negative coloring variant flag.",
124808
- "attribute": "negative",
124809
- "reflects": true,
124810
- "inheritedFrom": {
124811
- "name": "SbbNegativeMixin",
124812
- "module": "core/mixins/negative-mixin.js"
124813
- }
124814
- },
124815
- {
124816
- "kind": "field",
124817
- "name": "_hydrationRequired",
124818
- "type": {
124819
- "text": "boolean"
124820
- },
124821
- "privacy": "private",
124822
- "default": "!!this.shadowRoot",
124823
- "inheritedFrom": {
124824
- "name": "SbbElement",
124825
- "module": "core/base-elements/element.js"
124826
- }
124827
- },
124828
- {
124829
- "kind": "field",
124830
- "name": "_hydrationComplete",
124831
- "privacy": "private",
124832
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
124833
- "inheritedFrom": {
124834
- "name": "SbbElement",
124835
- "module": "core/base-elements/element.js"
124836
- }
124837
- },
124838
- {
124839
- "kind": "field",
124840
- "name": "_resolveHydration",
124841
- "type": {
124842
- "text": "(hydrationRequired: boolean) => void"
124843
- },
124844
- "privacy": "private",
124845
- "inheritedFrom": {
124846
- "name": "SbbElement",
124847
- "module": "core/base-elements/element.js"
124848
- }
124849
- },
124850
- {
124851
- "kind": "field",
124852
- "name": "hydrationRequired",
124853
- "type": {
124854
- "text": "boolean"
124855
- },
124856
- "privacy": "protected",
124857
- "description": "Returns whether hydration is required and not completed.",
124858
- "readonly": true,
124859
- "inheritedFrom": {
124860
- "name": "SbbElement",
124861
- "module": "core/base-elements/element.js"
124862
- },
124863
- "default": "!!this.shadowRoot"
124864
- },
124865
- {
124866
- "kind": "method",
124867
- "name": "toggleState",
124868
- "privacy": "protected",
124869
- "return": {
124870
- "type": {
124871
- "text": "void"
124872
- }
124873
- },
124874
- "parameters": [
124875
- {
124876
- "name": "value",
124877
- "type": {
124878
- "text": "string"
124879
- }
124880
- },
124881
- {
124882
- "name": "force",
124883
- "optional": true,
124884
- "type": {
124885
- "text": "boolean"
124886
- }
124887
- }
124888
- ],
124889
- "inheritedFrom": {
124890
- "name": "SbbElement",
124891
- "module": "core/base-elements/element.js"
124892
- }
124893
- },
124894
- {
124895
- "kind": "field",
124896
- "name": "['_$sbbElement$']",
124897
- "type": {
124898
- "text": "boolean"
124899
- },
124900
- "privacy": "public",
124901
- "static": true,
124902
- "default": "true",
124903
- "inheritedFrom": {
124904
- "name": "SbbElement",
124905
- "module": "core/base-elements/element.js"
124906
- }
124907
- },
124908
- {
124909
- "kind": "field",
124910
- "name": "_controllers",
124911
- "type": {
124912
- "text": "Set<SbbReactiveController> | undefined"
124913
- },
124914
- "privacy": "private",
124915
- "inheritedFrom": {
124916
- "name": "SbbElement",
124917
- "module": "core/base-elements/element.js"
124918
- }
124919
- }
124920
- ],
124921
- "attributes": [
124922
- {
124923
- "name": "focusable",
124924
- "type": {
124925
- "text": "boolean"
124926
- },
124927
- "default": "false",
124928
- "description": "Whether the table wrapper is focusable.",
124929
- "fieldName": "focusable"
124930
- },
124931
- {
124932
- "name": "negative",
124933
- "type": {
124934
- "text": "boolean"
124935
- },
124936
- "default": "false",
124937
- "description": "Negative coloring variant flag.",
124938
- "fieldName": "negative",
124939
- "inheritedFrom": {
124940
- "name": "SbbNegativeMixin",
124941
- "module": "core/mixins/negative-mixin.js"
124942
- }
124943
- }
124944
- ],
124945
- "mixins": [
124946
- {
124947
- "name": "SbbNegativeMixin",
124948
- "module": "core/mixins.js"
124949
- }
124950
- ],
124951
- "superclass": {
124952
- "name": "SbbElement",
124953
- "module": "core/base-elements.js"
124954
- },
124955
- "tagName": "sbb-table-wrapper",
124956
- "customElement": true
124957
- }
124958
- ],
124959
- "exports": [
124960
- {
124961
- "kind": "js",
124962
- "name": "SbbTableWrapperElement",
124963
- "declaration": {
124964
- "name": "SbbTableWrapperElement",
124965
- "module": "table/table-wrapper/table-wrapper.component.js"
124966
- }
124967
- }
124968
- ]
124969
- },
124970
124970
  {
124971
124971
  "kind": "javascript-module",
124972
124972
  "path": "tabs/common/styles.js",
@@ -129278,12 +129278,12 @@
129278
129278
  },
129279
129279
  {
129280
129280
  "kind": "javascript-module",
129281
- "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
129281
+ "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
129282
129282
  "declarations": [
129283
129283
  {
129284
129284
  "kind": "class",
129285
- "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
129286
- "name": "SbbTimetableFormFieldElement",
129285
+ "description": "An extension of `sbb-secondary-button` to be used inside the `sbb-timetable-form`.\nWhen placed between two `sbb-timetable-form-field`, the 'click' swaps the value of the sibling inputs.",
129286
+ "name": "SbbTimetableFormSwapButtonElement",
129287
129287
  "members": [
129288
129288
  {
129289
129289
  "kind": "field",
@@ -129294,83 +129294,88 @@
129294
129294
  "privacy": "public",
129295
129295
  "static": true,
129296
129296
  "readonly": true,
129297
- "default": "'sbb-timetable-form-field'",
129298
129297
  "inheritedFrom": {
129299
129298
  "name": "SbbElement",
129300
129299
  "module": "core/base-elements/element.js"
129301
- }
129300
+ },
129301
+ "default": "'sbb-timetable-form-swap-button'"
129302
129302
  },
129303
129303
  {
129304
129304
  "kind": "field",
129305
- "name": "_routeIcon",
129306
- "type": {
129307
- "text": "boolean"
129308
- },
129305
+ "name": "_languageController",
129309
129306
  "privacy": "private",
129310
- "default": "false"
129307
+ "default": "new SbbLanguageController(this)"
129311
129308
  },
129312
129309
  {
129313
- "kind": "field",
129314
- "name": "borderless",
129315
- "type": {
129316
- "text": "boolean"
129310
+ "kind": "method",
129311
+ "name": "_invertFieldValues",
129312
+ "privacy": "private",
129313
+ "return": {
129314
+ "type": {
129315
+ "text": "void"
129316
+ }
129317
+ },
129318
+ "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
129319
+ },
129320
+ {
129321
+ "kind": "method",
129322
+ "name": "renderIconName",
129323
+ "privacy": "protected",
129324
+ "return": {
129325
+ "type": {
129326
+ "text": "string"
129327
+ }
129317
129328
  },
129318
- "privacy": "public",
129319
- "default": "true",
129320
- "description": "Whether to display the form field without a border.",
129321
- "attribute": "borderless",
129322
- "reflects": true,
129323
129329
  "inheritedFrom": {
129324
- "name": "SbbFormFieldElement",
129325
- "module": "form-field/form-field/form-field.component.js"
129330
+ "name": "SbbIconNameMixin",
129331
+ "module": "icon/icon-name-mixin.js"
129326
129332
  }
129327
129333
  },
129328
129334
  {
129329
129335
  "kind": "field",
129330
- "name": "floatingLabel",
129336
+ "name": "size",
129331
129337
  "type": {
129332
- "text": "boolean"
129338
+ "text": "SbbButtonSize"
129333
129339
  },
129334
129340
  "privacy": "public",
129335
- "default": "true",
129336
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
129337
- "attribute": "floating-label",
129341
+ "description": "Size variant, either l, m or s.",
129342
+ "default": "'l' / 's' (lean)",
129343
+ "attribute": "size",
129338
129344
  "reflects": true,
129339
129345
  "inheritedFrom": {
129340
- "name": "SbbFormFieldElement",
129341
- "module": "form-field/form-field/form-field.component.js"
129346
+ "name": "SbbButtonCommonElementMixin",
129347
+ "module": "button/common/button-common.js"
129342
129348
  }
129343
129349
  },
129344
129350
  {
129345
129351
  "kind": "field",
129346
- "name": "width",
129352
+ "name": "loading",
129347
129353
  "type": {
129348
- "text": "string"
129354
+ "text": "boolean"
129349
129355
  },
129350
129356
  "privacy": "public",
129351
- "default": "'collapse'",
129352
- "description": "Defines the width of the component:\n- `default`: the component has defined width and min-width;\n- `collapse`: the component adapts itself to its inner input content.",
129353
- "attribute": "width",
129357
+ "default": "false",
129358
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
129359
+ "attribute": "loading",
129354
129360
  "reflects": true,
129355
129361
  "inheritedFrom": {
129356
- "name": "SbbFormFieldElement",
129357
- "module": "form-field/form-field/form-field.component.js"
129362
+ "name": "SbbButtonCommonElementMixin",
129363
+ "module": "button/common/button-common.js"
129358
129364
  }
129359
129365
  },
129360
129366
  {
129361
- "kind": "field",
129362
- "name": "size",
129363
- "type": {
129364
- "text": "string"
129367
+ "kind": "method",
129368
+ "name": "renderTemplate",
129369
+ "privacy": "protected",
129370
+ "return": {
129371
+ "type": {
129372
+ "text": "TemplateResult"
129373
+ }
129365
129374
  },
129366
- "privacy": "public",
129367
- "description": "Size variant, either l, m or s.",
129368
- "default": "'l'",
129369
- "attribute": "size",
129370
- "reflects": true,
129375
+ "description": "Override this method to render the component template.",
129371
129376
  "inheritedFrom": {
129372
- "name": "SbbFormFieldElement",
129373
- "module": "form-field/form-field/form-field.component.js"
129377
+ "name": "SbbActionBaseElement",
129378
+ "module": "core/base-elements/action-base-element.js"
129374
129379
  }
129375
129380
  },
129376
129381
  {
@@ -129391,584 +129396,631 @@
129391
129396
  },
129392
129397
  {
129393
129398
  "kind": "field",
129394
- "name": "_excludedFocusElements",
129399
+ "name": "iconName",
129395
129400
  "type": {
129396
- "text": "array"
129401
+ "text": "string"
129397
129402
  },
129398
- "privacy": "private",
129399
- "readonly": true,
129400
- "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
129403
+ "privacy": "public",
129404
+ "default": "''",
129405
+ "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
129406
+ "attribute": "icon-name",
129401
129407
  "inheritedFrom": {
129402
- "name": "SbbFormFieldElement",
129403
- "module": "form-field/form-field/form-field.component.js"
129408
+ "name": "SbbIconNameMixin",
129409
+ "module": "icon/icon-name-mixin.js"
129404
129410
  }
129405
129411
  },
129406
129412
  {
129407
- "kind": "field",
129408
- "name": "_floatingLabelSupportedInputElements",
129409
- "type": {
129410
- "text": "array"
129413
+ "kind": "method",
129414
+ "name": "renderIconSlot",
129415
+ "privacy": "protected",
129416
+ "return": {
129417
+ "type": {
129418
+ "text": "TemplateResult"
129419
+ }
129411
129420
  },
129412
- "privacy": "private",
129413
- "readonly": true,
129414
- "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
129421
+ "parameters": [
129422
+ {
129423
+ "name": "classname",
129424
+ "optional": true,
129425
+ "type": {
129426
+ "text": "string"
129427
+ }
129428
+ }
129429
+ ],
129415
129430
  "inheritedFrom": {
129416
- "name": "SbbFormFieldElement",
129417
- "module": "form-field/form-field/form-field.component.js"
129431
+ "name": "SbbIconNameMixin",
129432
+ "module": "icon/icon-name-mixin.js"
129418
129433
  }
129419
129434
  },
129420
129435
  {
129421
- "kind": "field",
129422
- "name": "_floatingLabelSupportedInputTypes",
129423
- "type": {
129424
- "text": "array"
129425
- },
129436
+ "kind": "method",
129437
+ "name": "_renderIconName",
129426
129438
  "privacy": "private",
129427
- "readonly": true,
129428
- "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
129439
+ "return": {
129440
+ "type": {
129441
+ "text": "string"
129442
+ }
129443
+ },
129429
129444
  "inheritedFrom": {
129430
- "name": "SbbFormFieldElement",
129431
- "module": "form-field/form-field/form-field.component.js"
129445
+ "name": "SbbIconNameMixin",
129446
+ "module": "icon/icon-name-mixin.js"
129432
129447
  }
129433
129448
  },
129434
129449
  {
129435
129450
  "kind": "field",
129436
- "name": "errorSpace",
129451
+ "name": "disabledInteractive",
129437
129452
  "type": {
129438
- "text": "'none' | 'reserve'"
129453
+ "text": "boolean"
129439
129454
  },
129440
129455
  "privacy": "public",
129441
- "default": "'none'",
129442
- "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
129443
- "attribute": "error-space",
129456
+ "default": "false",
129457
+ "description": "Whether the button should be aria-disabled but stay interactive.",
129458
+ "attribute": "disabled-interactive",
129444
129459
  "reflects": true,
129445
129460
  "inheritedFrom": {
129446
- "name": "SbbFormFieldElement",
129447
- "module": "form-field/form-field/form-field.component.js"
129461
+ "name": "SbbDisabledInteractiveMixin",
129462
+ "module": "core/mixins/disabled-mixin.js"
129448
129463
  }
129449
129464
  },
129450
129465
  {
129451
129466
  "kind": "field",
129452
- "name": "optional",
129467
+ "name": "disabled",
129468
+ "privacy": "public",
129469
+ "description": "Whether the component is disabled.",
129470
+ "default": "false",
129453
129471
  "type": {
129454
129472
  "text": "boolean"
129455
129473
  },
129456
- "privacy": "public",
129457
- "default": "false",
129458
- "description": "Indicates whether the input is optional.",
129459
- "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
129460
- "attribute": "optional",
129474
+ "attribute": "disabled",
129475
+ "reflects": true,
129461
129476
  "inheritedFrom": {
129462
- "name": "SbbFormFieldElement",
129463
- "module": "form-field/form-field/form-field.component.js"
129477
+ "name": "SbbDisabledMixin",
129478
+ "module": "core/mixins/disabled-mixin.js"
129464
129479
  }
129465
129480
  },
129466
129481
  {
129467
129482
  "kind": "field",
129468
- "name": "hiddenLabel",
129483
+ "name": "#disabled",
129484
+ "privacy": "private",
129469
129485
  "type": {
129470
129486
  "text": "boolean"
129471
129487
  },
129472
- "privacy": "public",
129473
129488
  "default": "false",
129474
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
129475
- "attribute": "hidden-label",
129476
- "reflects": true,
129477
129489
  "inheritedFrom": {
129478
- "name": "SbbFormFieldElement",
129479
- "module": "form-field/form-field/form-field.component.js"
129490
+ "name": "SbbDisabledMixin",
129491
+ "module": "core/mixins/disabled-mixin.js"
129480
129492
  }
129481
129493
  },
129482
129494
  {
129483
- "kind": "field",
129484
- "name": "_errorElements",
129485
- "type": {
129486
- "text": "Element[]"
129495
+ "kind": "method",
129496
+ "name": "isDisabledExternally",
129497
+ "privacy": "protected",
129498
+ "return": {
129499
+ "type": {
129500
+ "text": "boolean"
129501
+ }
129487
129502
  },
129488
- "privacy": "private",
129489
- "default": "[]",
129490
- "description": "It is used internally to get the `error` slot.",
129503
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
129491
129504
  "inheritedFrom": {
129492
- "name": "SbbFormFieldElement",
129493
- "module": "form-field/form-field/form-field.component.js"
129505
+ "name": "SbbDisabledMixin",
129506
+ "module": "core/mixins/disabled-mixin.js"
129494
129507
  }
129495
129508
  },
129496
129509
  {
129497
129510
  "kind": "field",
129498
- "name": "_hintElements",
129511
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
129499
129512
  "type": {
129500
- "text": "Element[]"
129513
+ "text": "array"
129501
129514
  },
129502
129515
  "privacy": "private",
129503
- "default": "[]",
129504
- "description": "It is used internally to get the `hint` slot.",
129516
+ "readonly": true,
129517
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
129505
129518
  "inheritedFrom": {
129506
- "name": "SbbFormFieldElement",
129507
- "module": "form-field/form-field/form-field.component.js"
129519
+ "name": "SbbButtonBaseElement",
129520
+ "module": "core/base-elements/button-base-element.js"
129508
129521
  }
129509
129522
  },
129510
129523
  {
129511
129524
  "kind": "field",
129512
- "name": "_input",
129525
+ "name": "value",
129513
129526
  "type": {
129514
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129527
+ "text": "string"
129515
129528
  },
129516
- "privacy": "private",
129517
- "default": "null",
129518
- "description": "Reference to the slotted input element.",
129529
+ "privacy": "public",
129519
129530
  "inheritedFrom": {
129520
- "name": "SbbFormFieldElement",
129521
- "module": "form-field/form-field/form-field.component.js"
129522
- }
129531
+ "name": "SbbButtonBaseElement",
129532
+ "module": "core/base-elements/button-base-element.js"
129533
+ },
129534
+ "default": "''",
129535
+ "description": "Value of the form element.",
129536
+ "attribute": "value"
129523
129537
  },
129524
129538
  {
129525
129539
  "kind": "field",
129526
- "name": "_label",
129540
+ "name": "type",
129541
+ "privacy": "public",
129542
+ "description": "The type attribute to use for the button.",
129543
+ "default": "'button'",
129527
129544
  "type": {
129528
- "text": "HTMLLabelElement"
129545
+ "text": "SbbButtonType"
129529
129546
  },
129530
- "privacy": "private",
129531
- "description": "Reference to the slotted label elements.",
129547
+ "attribute": "type",
129532
129548
  "inheritedFrom": {
129533
- "name": "SbbFormFieldElement",
129534
- "module": "form-field/form-field/form-field.component.js"
129549
+ "name": "SbbButtonBaseElement",
129550
+ "module": "core/base-elements/button-base-element.js"
129535
129551
  }
129536
129552
  },
129537
129553
  {
129538
129554
  "kind": "field",
129539
- "name": "inputElement",
129555
+ "name": "form",
129540
129556
  "type": {
129541
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129557
+ "text": "HTMLFormElement | null"
129542
129558
  },
129543
129559
  "privacy": "public",
129544
- "description": "Returns the input element.",
129545
- "readonly": true,
129560
+ "description": "The `<form>` element to associate the button with.",
129546
129561
  "inheritedFrom": {
129547
- "name": "SbbFormFieldElement",
129548
- "module": "form-field/form-field/form-field.component.js"
129549
- }
129562
+ "name": "SbbButtonBaseElement",
129563
+ "module": "core/base-elements/button-base-element.js"
129564
+ },
129565
+ "attribute": "form"
129550
129566
  },
129551
129567
  {
129552
129568
  "kind": "field",
129553
- "name": "label",
129569
+ "name": "_formId",
129554
129570
  "type": {
129555
- "text": "HTMLLabelElement | null"
129571
+ "text": "string"
129556
129572
  },
129557
- "privacy": "public",
129558
- "description": "Reference to the slotted label.",
129559
- "readonly": true,
129573
+ "privacy": "private",
129574
+ "default": "''",
129560
129575
  "inheritedFrom": {
129561
- "name": "SbbFormFieldElement",
129562
- "module": "form-field/form-field/form-field.component.js"
129576
+ "name": "SbbButtonBaseElement",
129577
+ "module": "core/base-elements/button-base-element.js"
129563
129578
  }
129564
129579
  },
129565
129580
  {
129566
129581
  "kind": "field",
129567
- "name": "_language",
129582
+ "name": "_handleButtonClick",
129568
129583
  "privacy": "private",
129569
- "default": "new SbbLanguageController(this)",
129570
129584
  "inheritedFrom": {
129571
- "name": "SbbFormFieldElement",
129572
- "module": "form-field/form-field/form-field.component.js"
129585
+ "name": "SbbButtonBaseElement",
129586
+ "module": "core/base-elements/button-base-element.js"
129573
129587
  }
129574
129588
  },
129575
129589
  {
129576
- "kind": "field",
129577
- "name": "_formFieldAttributeObserver",
129590
+ "kind": "method",
129591
+ "name": "_requestSubmit",
129578
129592
  "privacy": "private",
129579
- "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
129593
+ "return": {
129594
+ "type": {
129595
+ "text": "void"
129596
+ }
129597
+ },
129598
+ "parameters": [
129599
+ {
129600
+ "name": "form",
129601
+ "type": {
129602
+ "text": "HTMLFormElement"
129603
+ }
129604
+ }
129605
+ ],
129580
129606
  "inheritedFrom": {
129581
- "name": "SbbFormFieldElement",
129582
- "module": "form-field/form-field/form-field.component.js"
129607
+ "name": "SbbButtonBaseElement",
129608
+ "module": "core/base-elements/button-base-element.js"
129583
129609
  }
129584
129610
  },
129585
129611
  {
129586
129612
  "kind": "field",
129587
- "name": "_inputFormAbortController",
129613
+ "name": "_formKeyDown",
129588
129614
  "privacy": "private",
129589
- "default": "new AbortController()",
129590
129615
  "inheritedFrom": {
129591
- "name": "SbbFormFieldElement",
129592
- "module": "form-field/form-field/form-field.component.js"
129616
+ "name": "SbbButtonBaseElement",
129617
+ "module": "core/base-elements/button-base-element.js"
129593
129618
  }
129594
129619
  },
129595
129620
  {
129596
129621
  "kind": "field",
129597
- "name": "_control",
129622
+ "name": "formAssociated",
129598
129623
  "type": {
129599
- "text": "SbbFormFieldElementControl | null"
129624
+ "text": "boolean"
129600
129625
  },
129601
- "privacy": "private",
129602
- "default": "null",
129626
+ "privacy": "public",
129627
+ "static": true,
129628
+ "default": "true",
129603
129629
  "inheritedFrom": {
129604
- "name": "SbbFormFieldElement",
129605
- "module": "form-field/form-field/form-field.component.js"
129630
+ "name": "SbbFormAssociatedMixin",
129631
+ "module": "core/mixins/form-associated-mixin.js"
129606
129632
  }
129607
129633
  },
129608
129634
  {
129609
129635
  "kind": "field",
129610
- "name": "_previousType",
129636
+ "name": "name",
129637
+ "privacy": "public",
129638
+ "description": "Name of the form element. Will be read from name attribute.",
129611
129639
  "type": {
129612
- "text": "string | null"
129640
+ "text": "string"
129613
129641
  },
129614
- "privacy": "private",
129615
- "default": "null",
129642
+ "attribute": "name",
129616
129643
  "inheritedFrom": {
129617
- "name": "SbbFormFieldElement",
129618
- "module": "form-field/form-field/form-field.component.js"
129644
+ "name": "SbbFormAssociatedMixin",
129645
+ "module": "core/mixins/form-associated-mixin.js"
129619
129646
  }
129620
129647
  },
129621
129648
  {
129622
- "kind": "method",
129623
- "name": "_handleWrapperClick",
129624
- "privacy": "private",
129625
- "return": {
129626
- "type": {
129627
- "text": "void"
129628
- }
129649
+ "kind": "field",
129650
+ "name": "validity",
129651
+ "type": {
129652
+ "text": "ValidityState"
129629
129653
  },
129630
- "parameters": [
129631
- {
129632
- "name": "event",
129633
- "type": {
129634
- "text": "MouseEvent"
129635
- }
129636
- }
129637
- ],
129654
+ "privacy": "public",
129655
+ "description": "Returns the ValidityState object for this element.",
129656
+ "readonly": true,
129638
129657
  "inheritedFrom": {
129639
- "name": "SbbFormFieldElement",
129640
- "module": "form-field/form-field/form-field.component.js"
129658
+ "name": "SbbFormAssociatedMixin",
129659
+ "module": "core/mixins/form-associated-mixin.js"
129641
129660
  }
129642
129661
  },
129643
129662
  {
129644
- "kind": "method",
129645
- "name": "_isElementFocusExcluded",
129646
- "privacy": "private",
129647
- "return": {
129648
- "type": {
129649
- "text": "boolean"
129650
- }
129663
+ "kind": "field",
129664
+ "name": "validationMessage",
129665
+ "type": {
129666
+ "text": "string"
129651
129667
  },
129652
- "parameters": [
129653
- {
129654
- "name": "event",
129655
- "type": {
129656
- "text": "Event"
129657
- }
129658
- }
129659
- ],
129668
+ "privacy": "public",
129669
+ "description": "Returns the current error message, if available, which corresponds\nto the current validation state.\nPlease note that only one message is returned at a time (e.g. if\nmultiple validity states are invalid, only the chronologically first one\nis returned until it is fixed, at which point the next message might be\nreturned, if it is still applicable). Also, a custom validity message\n(see below) has precedence over native validation messages.",
129670
+ "readonly": true,
129660
129671
  "inheritedFrom": {
129661
- "name": "SbbFormFieldElement",
129662
- "module": "form-field/form-field/form-field.component.js"
129672
+ "name": "SbbFormAssociatedMixin",
129673
+ "module": "core/mixins/form-associated-mixin.js"
129663
129674
  }
129664
129675
  },
129665
129676
  {
129666
- "kind": "method",
129667
- "name": "_onSlotLabelChange",
129668
- "privacy": "private",
129669
- "return": {
129670
- "type": {
129671
- "text": "void"
129672
- }
129677
+ "kind": "field",
129678
+ "name": "willValidate",
129679
+ "type": {
129680
+ "text": "boolean"
129673
129681
  },
129682
+ "privacy": "public",
129683
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
129684
+ "readonly": true,
129674
129685
  "inheritedFrom": {
129675
- "name": "SbbFormFieldElement",
129676
- "module": "form-field/form-field/form-field.component.js"
129686
+ "name": "SbbFormAssociatedMixin",
129687
+ "module": "core/mixins/form-associated-mixin.js"
129677
129688
  }
129678
129689
  },
129679
129690
  {
129680
- "kind": "method",
129681
- "name": "_onSlotInputChange",
129691
+ "kind": "field",
129692
+ "name": "_validityStates",
129682
129693
  "privacy": "private",
129683
- "return": {
129684
- "type": {
129685
- "text": "void"
129686
- }
129687
- },
129688
- "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
129694
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
129689
129695
  "inheritedFrom": {
129690
- "name": "SbbFormFieldElement",
129691
- "module": "form-field/form-field/form-field.component.js"
129696
+ "name": "SbbFormAssociatedMixin",
129697
+ "module": "core/mixins/form-associated-mixin.js"
129692
129698
  }
129693
129699
  },
129694
129700
  {
129695
- "kind": "method",
129696
- "name": "_assignSlots",
129697
- "privacy": "private",
129698
- "return": {
129699
- "type": {
129700
- "text": "void"
129701
- }
129701
+ "kind": "field",
129702
+ "name": "formDisabled",
129703
+ "type": {
129704
+ "text": "boolean"
129702
129705
  },
129706
+ "privacy": "protected",
129707
+ "default": "false",
129708
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
129703
129709
  "inheritedFrom": {
129704
- "name": "SbbFormFieldElement",
129705
- "module": "form-field/form-field/form-field.component.js"
129710
+ "name": "SbbFormAssociatedMixin",
129711
+ "module": "core/mixins/form-associated-mixin.js"
129706
129712
  }
129707
129713
  },
129708
129714
  {
129709
129715
  "kind": "method",
129710
- "name": "_connectInputElement",
129711
- "privacy": "private",
129716
+ "name": "checkValidity",
129717
+ "privacy": "public",
129712
129718
  "return": {
129713
129719
  "type": {
129714
- "text": "'changed' | 'no-input' | 'unchanged'"
129720
+ "text": "boolean"
129715
129721
  }
129716
129722
  },
129723
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
129717
129724
  "inheritedFrom": {
129718
- "name": "SbbFormFieldElement",
129719
- "module": "form-field/form-field/form-field.component.js"
129725
+ "name": "SbbFormAssociatedMixin",
129726
+ "module": "core/mixins/form-associated-mixin.js"
129720
129727
  }
129721
129728
  },
129722
129729
  {
129723
129730
  "kind": "method",
129724
- "name": "_syncLabelInputReferences",
129725
- "privacy": "private",
129731
+ "name": "reportValidity",
129732
+ "privacy": "public",
129726
129733
  "return": {
129727
129734
  "type": {
129728
- "text": "void"
129735
+ "text": "boolean"
129729
129736
  }
129730
129737
  },
129738
+ "description": "Returns true if this element has no validity problems; otherwise,\nreturns false, fires an invalid event at the element,\nand (if the event isn't canceled) reports the problem to the user.",
129731
129739
  "inheritedFrom": {
129732
- "name": "SbbFormFieldElement",
129733
- "module": "form-field/form-field/form-field.component.js"
129740
+ "name": "SbbFormAssociatedMixin",
129741
+ "module": "core/mixins/form-associated-mixin.js"
129734
129742
  }
129735
129743
  },
129736
129744
  {
129737
129745
  "kind": "method",
129738
- "name": "_isInputElement",
129739
- "privacy": "private",
129746
+ "name": "setCustomValidity",
129747
+ "privacy": "public",
129740
129748
  "return": {
129741
129749
  "type": {
129742
- "text": "boolean"
129750
+ "text": "void"
129743
129751
  }
129744
129752
  },
129745
129753
  "parameters": [
129746
129754
  {
129747
- "name": "input",
129755
+ "name": "message",
129748
129756
  "type": {
129749
- "text": "Element"
129757
+ "text": "string"
129750
129758
  }
129751
129759
  }
129752
129760
  ],
129761
+ "description": "Sets the custom validity message for this element. Use the empty string\nto indicate that the element does not have a custom validity error.",
129753
129762
  "inheritedFrom": {
129754
- "name": "SbbFormFieldElement",
129755
- "module": "form-field/form-field/form-field.component.js"
129763
+ "name": "SbbFormAssociatedMixin",
129764
+ "module": "core/mixins/form-associated-mixin.js"
129756
129765
  }
129757
129766
  },
129758
129767
  {
129759
129768
  "kind": "method",
129760
- "name": "_readInputState",
129769
+ "name": "_hasDisabledAncestor",
129761
129770
  "privacy": "private",
129762
129771
  "return": {
129763
129772
  "type": {
129764
- "text": "void"
129773
+ "text": "boolean"
129765
129774
  }
129766
129775
  },
129767
129776
  "inheritedFrom": {
129768
- "name": "SbbFormFieldElement",
129769
- "module": "form-field/form-field/form-field.component.js"
129777
+ "name": "SbbFormAssociatedMixin",
129778
+ "module": "core/mixins/form-associated-mixin.js"
129770
129779
  }
129771
129780
  },
129772
129781
  {
129773
129782
  "kind": "method",
129774
- "name": "_registerInputFormListener",
129775
- "privacy": "private",
129783
+ "name": "updateFormValue",
129784
+ "privacy": "protected",
129776
129785
  "return": {
129777
129786
  "type": {
129778
129787
  "text": "void"
129779
129788
  }
129780
129789
  },
129790
+ "description": "Should be called when form value is changed.\nAdapts and sets the formValue in the supported format (string | FormData | File | null)\nhttps://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue",
129781
129791
  "inheritedFrom": {
129782
- "name": "SbbFormFieldElement",
129783
- "module": "form-field/form-field/form-field.component.js"
129792
+ "name": "SbbFormAssociatedMixin",
129793
+ "module": "core/mixins/form-associated-mixin.js"
129784
129794
  }
129785
129795
  },
129786
129796
  {
129787
129797
  "kind": "method",
129788
- "name": "_patchInputValue",
129789
- "privacy": "private",
129798
+ "name": "formState",
129799
+ "privacy": "protected",
129790
129800
  "return": {
129791
129801
  "type": {
129792
- "text": "void"
129802
+ "text": "FormRestoreState"
129793
129803
  }
129794
129804
  },
129795
129805
  "inheritedFrom": {
129796
- "name": "SbbFormFieldElement",
129797
- "module": "form-field/form-field/form-field.component.js"
129806
+ "name": "SbbFormAssociatedMixin",
129807
+ "module": "core/mixins/form-associated-mixin.js"
129798
129808
  }
129799
129809
  },
129800
129810
  {
129801
129811
  "kind": "method",
129802
- "name": "_unpatchInputValue",
129803
- "privacy": "private",
129812
+ "name": "setValidityFlag",
129813
+ "privacy": "protected",
129804
129814
  "return": {
129805
129815
  "type": {
129806
129816
  "text": "void"
129807
129817
  }
129808
129818
  },
129819
+ "parameters": [
129820
+ {
129821
+ "name": "flag",
129822
+ "type": {
129823
+ "text": "T"
129824
+ }
129825
+ },
129826
+ {
129827
+ "name": "message",
129828
+ "type": {
129829
+ "text": "string"
129830
+ }
129831
+ },
129832
+ {
129833
+ "name": "flagValue",
129834
+ "optional": true,
129835
+ "type": {
129836
+ "text": "ValidityStateFlags[T]"
129837
+ }
129838
+ }
129839
+ ],
129840
+ "description": "Marks this element as suffering from the constraint indicated by the\nflag argument and associates the given message to it.\nNote that only one message is displayed at a time and custom messages by\nconsumers are always displayed before internal messages and internal\nmessages are displayed in the order they were added.\nTo set/define custom validity state flags, you need to extend the\nValidityState prototype (and the CustomValidityState interface).",
129809
129841
  "inheritedFrom": {
129810
- "name": "SbbFormFieldElement",
129811
- "module": "form-field/form-field/form-field.component.js"
129842
+ "name": "SbbFormAssociatedMixin",
129843
+ "module": "core/mixins/form-associated-mixin.js"
129812
129844
  }
129813
129845
  },
129814
129846
  {
129815
129847
  "kind": "method",
129816
- "name": "_checkAndUpdateInputEmpty",
129817
- "privacy": "private",
129848
+ "name": "removeValidityFlag",
129849
+ "privacy": "protected",
129818
129850
  "return": {
129819
129851
  "type": {
129820
129852
  "text": "void"
129821
129853
  }
129822
129854
  },
129823
- "inheritedFrom": {
129824
- "name": "SbbFormFieldElement",
129825
- "module": "form-field/form-field/form-field.component.js"
129826
- }
129827
- },
129828
- {
129829
- "kind": "method",
129830
- "name": "_isInputEmpty",
129831
- "privacy": "private",
129832
- "return": {
129833
- "type": {
129834
- "text": "boolean"
129855
+ "parameters": [
129856
+ {
129857
+ "name": "flag",
129858
+ "type": {
129859
+ "text": "T"
129860
+ }
129835
129861
  }
129836
- },
129862
+ ],
129863
+ "description": "Removes the validity state flag entry and updates validity state.",
129837
129864
  "inheritedFrom": {
129838
- "name": "SbbFormFieldElement",
129839
- "module": "form-field/form-field/form-field.component.js"
129865
+ "name": "SbbFormAssociatedMixin",
129866
+ "module": "core/mixins/form-associated-mixin.js"
129840
129867
  }
129841
129868
  },
129842
129869
  {
129843
129870
  "kind": "method",
129844
- "name": "_isInputValueEmpty",
129845
- "privacy": "private",
129871
+ "name": "validate",
129872
+ "privacy": "protected",
129846
129873
  "return": {
129847
129874
  "type": {
129848
- "text": "boolean"
129875
+ "text": "void"
129849
129876
  }
129850
129877
  },
129878
+ "description": "To be called whenever the current element needs to be validated.",
129851
129879
  "inheritedFrom": {
129852
- "name": "SbbFormFieldElement",
129853
- "module": "form-field/form-field/form-field.component.js"
129880
+ "name": "SbbFormAssociatedMixin",
129881
+ "module": "core/mixins/form-associated-mixin.js"
129854
129882
  }
129855
129883
  },
129856
129884
  {
129857
129885
  "kind": "method",
129858
- "name": "_onSlotErrorChange",
129859
- "privacy": "private",
129886
+ "name": "shouldValidate",
129887
+ "privacy": "protected",
129860
129888
  "return": {
129861
129889
  "type": {
129862
- "text": "void"
129890
+ "text": "boolean"
129863
129891
  }
129864
129892
  },
129865
129893
  "parameters": [
129866
129894
  {
129867
- "name": "event",
129895
+ "name": "name",
129868
129896
  "type": {
129869
- "text": "Event"
129897
+ "text": "PropertyKey | undefined"
129870
129898
  }
129871
129899
  }
129872
129900
  ],
129873
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
129901
+ "description": "Whether validation should be run on a property change with the given name.",
129874
129902
  "inheritedFrom": {
129875
- "name": "SbbFormFieldElement",
129876
- "module": "form-field/form-field/form-field.component.js"
129903
+ "name": "SbbFormAssociatedMixin",
129904
+ "module": "core/mixins/form-associated-mixin.js"
129877
129905
  }
129878
129906
  },
129879
129907
  {
129880
129908
  "kind": "method",
129881
- "name": "_onSlotHintChange",
129909
+ "name": "_setInternalValidity",
129882
129910
  "privacy": "private",
129883
129911
  "return": {
129884
129912
  "type": {
129885
129913
  "text": "void"
129886
129914
  }
129887
129915
  },
129916
+ "inheritedFrom": {
129917
+ "name": "SbbFormAssociatedMixin",
129918
+ "module": "core/mixins/form-associated-mixin.js"
129919
+ }
129920
+ },
129921
+ {
129922
+ "kind": "field",
129923
+ "name": "role",
129924
+ "type": {
129925
+ "text": "ElementInternals['role']"
129926
+ },
129927
+ "privacy": "public",
129928
+ "static": true,
129929
+ "readonly": true,
129930
+ "default": "'button'",
129931
+ "inheritedFrom": {
129932
+ "name": "SbbButtonLikeBaseElement",
129933
+ "module": "core/base-elements/button-base-element.js"
129934
+ }
129935
+ },
129936
+ {
129937
+ "kind": "field",
129938
+ "name": "_preventScrollOnSpaceKeydown",
129939
+ "privacy": "private",
129940
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
129888
129941
  "parameters": [
129889
129942
  {
129890
- "name": "event",
129891
- "type": {
129892
- "text": "Event"
129893
- }
129943
+ "description": "The origin event.",
129944
+ "name": "event"
129894
129945
  }
129895
129946
  ],
129896
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
129897
129947
  "inheritedFrom": {
129898
- "name": "SbbFormFieldElement",
129899
- "module": "form-field/form-field/form-field.component.js"
129948
+ "name": "SbbButtonLikeBaseElement",
129949
+ "module": "core/base-elements/button-base-element.js"
129900
129950
  }
129901
129951
  },
129902
129952
  {
129903
- "kind": "method",
129904
- "name": "_assignAriaDescribedByElements",
129953
+ "kind": "field",
129954
+ "name": "_removeActiveMarker",
129905
129955
  "privacy": "private",
129906
- "return": {
129907
- "type": {
129908
- "text": "void"
129909
- }
129910
- },
129911
129956
  "inheritedFrom": {
129912
- "name": "SbbFormFieldElement",
129913
- "module": "form-field/form-field/form-field.component.js"
129957
+ "name": "SbbButtonLikeBaseElement",
129958
+ "module": "core/base-elements/button-base-element.js"
129914
129959
  }
129915
129960
  },
129916
129961
  {
129917
- "kind": "method",
129918
- "name": "reset",
129919
- "privacy": "public",
129920
- "return": {
129921
- "type": {
129922
- "text": "void"
129962
+ "kind": "field",
129963
+ "name": "_dispatchClickEventOnSpaceKeyup",
129964
+ "privacy": "private",
129965
+ "description": "Dispatches a 'click' PointerEvent if the original keyboard event is a 'Space' press.\nAs verified with the native button, when 'Space' is pressed, a 'click' event is dispatched\nafter the 'keyup' event.",
129966
+ "parameters": [
129967
+ {
129968
+ "description": "The origin event.",
129969
+ "name": "event"
129923
129970
  }
129924
- },
129925
- "description": "Manually reset the form field. Currently, this only resets the floating label.",
129971
+ ],
129926
129972
  "inheritedFrom": {
129927
- "name": "SbbFormFieldElement",
129928
- "module": "form-field/form-field/form-field.component.js"
129973
+ "name": "SbbButtonLikeBaseElement",
129974
+ "module": "core/base-elements/button-base-element.js"
129929
129975
  }
129930
129976
  },
129931
129977
  {
129932
- "kind": "method",
129933
- "name": "clear",
129934
- "privacy": "public",
129935
- "return": {
129936
- "type": {
129937
- "text": "void"
129938
- }
129978
+ "kind": "field",
129979
+ "name": "_dispatchClickEvent",
129980
+ "privacy": "private",
129981
+ "inheritedFrom": {
129982
+ "name": "SbbButtonLikeBaseElement",
129983
+ "module": "core/base-elements/button-base-element.js"
129984
+ }
129985
+ },
129986
+ {
129987
+ "kind": "field",
129988
+ "name": "maybeDisabled",
129989
+ "type": {
129990
+ "text": "boolean | undefined"
129939
129991
  },
129940
- "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
129992
+ "privacy": "protected",
129993
+ "readonly": true,
129941
129994
  "inheritedFrom": {
129942
- "name": "SbbFormFieldElement",
129943
- "module": "form-field/form-field/form-field.component.js"
129995
+ "name": "SbbActionBaseElement",
129996
+ "module": "core/base-elements/action-base-element.js"
129944
129997
  }
129945
129998
  },
129946
129999
  {
129947
- "kind": "method",
129948
- "name": "_syncNegative",
129949
- "privacy": "private",
129950
- "return": {
129951
- "type": {
129952
- "text": "void"
129953
- }
130000
+ "kind": "field",
130001
+ "name": "maybeDisabledInteractive",
130002
+ "type": {
130003
+ "text": "boolean | undefined"
129954
130004
  },
130005
+ "privacy": "protected",
130006
+ "readonly": true,
129955
130007
  "inheritedFrom": {
129956
- "name": "SbbFormFieldElement",
129957
- "module": "form-field/form-field/form-field.component.js"
130008
+ "name": "SbbActionBaseElement",
130009
+ "module": "core/base-elements/action-base-element.js"
129958
130010
  }
129959
130011
  },
129960
130012
  {
129961
130013
  "kind": "method",
129962
- "name": "_syncSize",
129963
- "privacy": "private",
130014
+ "name": "setupBaseEventHandlers",
130015
+ "privacy": "protected",
129964
130016
  "return": {
129965
130017
  "type": {
129966
130018
  "text": "void"
129967
130019
  }
129968
130020
  },
129969
130021
  "inheritedFrom": {
129970
- "name": "SbbFormFieldElement",
129971
- "module": "form-field/form-field/form-field.component.js"
130022
+ "name": "SbbActionBaseElement",
130023
+ "module": "core/base-elements/action-base-element.js"
129972
130024
  }
129973
130025
  },
129974
130026
  {
@@ -130077,184 +130129,184 @@
130077
130129
  }
130078
130130
  }
130079
130131
  ],
130132
+ "events": [
130133
+ {
130134
+ "type": {
130135
+ "text": "Event"
130136
+ },
130137
+ "description": "The change event is fired on the associated inputs when the user modifies the element's value. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.",
130138
+ "name": "change"
130139
+ },
130140
+ {
130141
+ "type": {
130142
+ "text": "InputEvent"
130143
+ },
130144
+ "description": "The input event fires on the associated inputs when the value has been changed as a direct result of a user action.",
130145
+ "name": "input"
130146
+ }
130147
+ ],
130080
130148
  "superclass": {
130081
- "name": "SbbFormFieldElement",
130082
- "module": "form-field.pure.js"
130149
+ "name": "SbbSecondaryButtonElement",
130150
+ "module": "button.pure.js"
130083
130151
  },
130084
- "tagName": "sbb-timetable-form-field",
130152
+ "tagName": "sbb-timetable-form-swap-button",
130085
130153
  "customElement": true,
130086
130154
  "attributes": [
130087
130155
  {
130088
- "name": "negative",
130156
+ "name": "size",
130089
130157
  "type": {
130090
- "text": "boolean"
130158
+ "text": "SbbButtonSize"
130091
130159
  },
130092
- "default": "false",
130093
- "description": "Negative coloring variant flag.",
130094
- "fieldName": "negative",
130160
+ "description": "Size variant, either l, m or s.",
130161
+ "default": "'l' / 's' (lean)",
130162
+ "fieldName": "size",
130095
130163
  "inheritedFrom": {
130096
- "name": "SbbNegativeMixin",
130097
- "module": "core/mixins/negative-mixin.js"
130164
+ "name": "SbbButtonCommonElementMixin",
130165
+ "module": "button/common/button-common.js"
130098
130166
  }
130099
130167
  },
130100
130168
  {
130101
- "name": "error-space",
130169
+ "name": "loading",
130102
130170
  "type": {
130103
- "text": "'none' | 'reserve'"
130171
+ "text": "boolean"
130104
130172
  },
130105
- "default": "'none'",
130106
- "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
130107
- "fieldName": "errorSpace",
130108
- "inheritedFrom": {
130109
- "name": "SbbFormFieldElement",
130110
- "module": "form-field/form-field/form-field.component.js"
130173
+ "default": "false",
130174
+ "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
130175
+ "fieldName": "loading",
130176
+ "inheritedFrom": {
130177
+ "name": "SbbButtonCommonElementMixin",
130178
+ "module": "button/common/button-common.js"
130111
130179
  }
130112
130180
  },
130113
130181
  {
130114
- "name": "optional",
130182
+ "name": "negative",
130115
130183
  "type": {
130116
130184
  "text": "boolean"
130117
130185
  },
130118
130186
  "default": "false",
130119
- "description": "Indicates whether the input is optional.",
130120
- "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
130121
- "fieldName": "optional",
130187
+ "description": "Negative coloring variant flag.",
130188
+ "fieldName": "negative",
130122
130189
  "inheritedFrom": {
130123
- "name": "SbbFormFieldElement",
130124
- "module": "form-field/form-field/form-field.component.js"
130190
+ "name": "SbbNegativeMixin",
130191
+ "module": "core/mixins/negative-mixin.js"
130125
130192
  }
130126
130193
  },
130127
130194
  {
130128
- "name": "size",
130195
+ "name": "icon-name",
130129
130196
  "type": {
130130
- "text": "'l' | 'm' | 's'"
130197
+ "text": "string"
130131
130198
  },
130132
- "description": "Size variant, either l, m or s.",
130133
- "default": "'m' / 's' (lean)",
130134
- "fieldName": "size",
130199
+ "default": "''",
130200
+ "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
130201
+ "fieldName": "iconName",
130135
130202
  "inheritedFrom": {
130136
- "name": "SbbFormFieldElement",
130137
- "module": "form-field/form-field/form-field.component.js"
130203
+ "name": "SbbIconNameMixin",
130204
+ "module": "icon/icon-name-mixin.js"
130138
130205
  }
130139
130206
  },
130140
130207
  {
130141
- "name": "borderless",
130208
+ "name": "disabled-interactive",
130142
130209
  "type": {
130143
130210
  "text": "boolean"
130144
130211
  },
130145
130212
  "default": "false",
130146
- "description": "Whether to display the form field without a border.",
130147
- "fieldName": "borderless",
130213
+ "description": "Whether the button should be aria-disabled but stay interactive.",
130214
+ "fieldName": "disabledInteractive",
130148
130215
  "inheritedFrom": {
130149
- "name": "SbbFormFieldElement",
130150
- "module": "form-field/form-field/form-field.component.js"
130216
+ "name": "SbbDisabledInteractiveMixin",
130217
+ "module": "core/mixins/disabled-mixin.js"
130151
130218
  }
130152
130219
  },
130153
130220
  {
130154
- "name": "width",
130221
+ "name": "disabled",
130222
+ "description": "Whether the component is disabled.",
130223
+ "default": "false",
130155
130224
  "type": {
130156
- "text": "'default' | 'collapse'"
130225
+ "text": "boolean"
130157
130226
  },
130158
- "default": "'default'",
130159
- "description": "Defines the width of the component:\n- `default`: the component has defined width and min-width;\n- `collapse`: the component adapts itself to its inner input content.",
130160
- "fieldName": "width",
130227
+ "fieldName": "disabled",
130161
130228
  "inheritedFrom": {
130162
- "name": "SbbFormFieldElement",
130163
- "module": "form-field/form-field/form-field.component.js"
130229
+ "name": "SbbDisabledMixin",
130230
+ "module": "core/mixins/disabled-mixin.js"
130164
130231
  }
130165
130232
  },
130166
130233
  {
130167
- "name": "hidden-label",
130234
+ "name": "value",
130168
130235
  "type": {
130169
- "text": "boolean"
130236
+ "text": "string"
130170
130237
  },
130171
- "default": "false",
130172
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130173
- "fieldName": "hiddenLabel",
130238
+ "default": "''",
130239
+ "description": "Value of the form element.",
130240
+ "fieldName": "value",
130174
130241
  "inheritedFrom": {
130175
- "name": "SbbFormFieldElement",
130176
- "module": "form-field/form-field/form-field.component.js"
130242
+ "name": "SbbButtonBaseElement",
130243
+ "module": "core/base-elements/button-base-element.js"
130177
130244
  }
130178
130245
  },
130179
130246
  {
130180
- "name": "floating-label",
130247
+ "name": "type",
130248
+ "description": "The type attribute to use for the button.",
130249
+ "default": "'button'",
130181
130250
  "type": {
130182
- "text": "boolean"
130251
+ "text": "SbbButtonType"
130183
130252
  },
130184
- "default": "false",
130185
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
130186
- "fieldName": "floatingLabel",
130187
- "inheritedFrom": {
130188
- "name": "SbbFormFieldElement",
130189
- "module": "form-field/form-field/form-field.component.js"
130190
- }
130191
- }
130192
- ],
130193
- "slots": [
130194
- {
130195
- "description": "Use this slot to render an input/select or a supported non-native element.",
130196
- "name": "",
130197
- "inheritedFrom": {
130198
- "name": "SbbFormFieldElement",
130199
- "module": "form-field/form-field/form-field.component.js"
130200
- }
130201
- },
130202
- {
130203
- "description": "Use this slot to render a label.",
130204
- "name": "label",
130253
+ "fieldName": "type",
130205
130254
  "inheritedFrom": {
130206
- "name": "SbbFormFieldElement",
130207
- "module": "form-field/form-field/form-field.component.js"
130255
+ "name": "SbbButtonBaseElement",
130256
+ "module": "core/base-elements/button-base-element.js"
130208
130257
  }
130209
130258
  },
130210
130259
  {
130211
- "description": "Use this slot to render an icon on the left side of the input.",
130212
- "name": "prefix",
130260
+ "name": "form",
130261
+ "description": "The `<form>` element to associate the button with.",
130262
+ "type": {
130263
+ "text": "HTMLFormElement | null"
130264
+ },
130265
+ "fieldName": "form",
130213
130266
  "inheritedFrom": {
130214
- "name": "SbbFormFieldElement",
130215
- "module": "form-field/form-field/form-field.component.js"
130267
+ "name": "SbbButtonBaseElement",
130268
+ "module": "core/base-elements/button-base-element.js"
130216
130269
  }
130217
130270
  },
130218
130271
  {
130219
- "description": "Use this slot to render an icon on the right side of the input.",
130220
- "name": "suffix",
130272
+ "name": "name",
130273
+ "description": "Name of the form element. Will be read from name attribute.",
130274
+ "type": {
130275
+ "text": "string"
130276
+ },
130277
+ "fieldName": "name",
130221
130278
  "inheritedFrom": {
130222
- "name": "SbbFormFieldElement",
130223
- "module": "form-field/form-field/form-field.component.js"
130279
+ "name": "SbbFormAssociatedMixin",
130280
+ "module": "core/mixins/form-associated-mixin.js"
130224
130281
  }
130225
- },
130282
+ }
130283
+ ],
130284
+ "slots": [
130226
130285
  {
130227
- "description": "Use this slot to render an error.",
130228
- "name": "error",
130286
+ "description": "Use the unnamed slot to add content to the secondary-button.",
130287
+ "name": "",
130229
130288
  "inheritedFrom": {
130230
- "name": "SbbFormFieldElement",
130231
- "module": "form-field/form-field/form-field.component.js"
130289
+ "name": "SbbSecondaryButtonElement",
130290
+ "module": "button/secondary-button/secondary-button.component.js"
130232
130291
  }
130233
130292
  },
130234
130293
  {
130235
- "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
130236
- "name": "hint",
130294
+ "description": "Slot used to display the icon, if one is set.",
130295
+ "name": "icon",
130237
130296
  "inheritedFrom": {
130238
- "name": "SbbFormFieldElement",
130239
- "module": "form-field/form-field/form-field.component.js"
130297
+ "name": "SbbSecondaryButtonElement",
130298
+ "module": "button/secondary-button/secondary-button.component.js"
130240
130299
  }
130241
130300
  }
130242
130301
  ],
130243
130302
  "cssProperties": [
130244
130303
  {
130245
- "description": "To override the focus outline offset,",
130246
- "name": "--sbb-form-field-outline-offset",
130247
- "inheritedFrom": {
130248
- "name": "SbbFormFieldElement",
130249
- "module": "form-field/form-field/form-field.component.js"
130250
- }
130251
- },
130252
- {
130253
- "description": "To override the z-index of the focus underline effect,",
130254
- "name": "--sbb-form-field-focus-underline-z-index",
130304
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
130305
+ "name": "--sbb-button-loading-delay",
130306
+ "default": "300ms",
130255
130307
  "inheritedFrom": {
130256
- "name": "SbbFormFieldElement",
130257
- "module": "form-field/form-field/form-field.component.js"
130308
+ "name": "SbbSecondaryButtonElement",
130309
+ "module": "button/secondary-button/secondary-button.component.js"
130258
130310
  }
130259
130311
  }
130260
130312
  ]
@@ -130263,22 +130315,22 @@
130263
130315
  "exports": [
130264
130316
  {
130265
130317
  "kind": "js",
130266
- "name": "SbbTimetableFormFieldElement",
130318
+ "name": "SbbTimetableFormSwapButtonElement",
130267
130319
  "declaration": {
130268
- "name": "SbbTimetableFormFieldElement",
130269
- "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
130320
+ "name": "SbbTimetableFormSwapButtonElement",
130321
+ "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
130270
130322
  }
130271
130323
  }
130272
130324
  ]
130273
130325
  },
130274
130326
  {
130275
130327
  "kind": "javascript-module",
130276
- "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
130328
+ "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
130277
130329
  "declarations": [
130278
130330
  {
130279
130331
  "kind": "class",
130280
- "description": "An extension of `sbb-secondary-button` to be used inside the `sbb-timetable-form`.\nWhen placed between two `sbb-timetable-form-field`, the 'click' swaps the value of the sibling inputs.",
130281
- "name": "SbbTimetableFormSwapButtonElement",
130332
+ "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
130333
+ "name": "SbbTimetableFormFieldElement",
130282
130334
  "members": [
130283
130335
  {
130284
130336
  "kind": "field",
@@ -130289,88 +130341,83 @@
130289
130341
  "privacy": "public",
130290
130342
  "static": true,
130291
130343
  "readonly": true,
130344
+ "default": "'sbb-timetable-form-field'",
130292
130345
  "inheritedFrom": {
130293
130346
  "name": "SbbElement",
130294
130347
  "module": "core/base-elements/element.js"
130295
- },
130296
- "default": "'sbb-timetable-form-swap-button'"
130348
+ }
130297
130349
  },
130298
130350
  {
130299
130351
  "kind": "field",
130300
- "name": "_languageController",
130352
+ "name": "_routeIcon",
130353
+ "type": {
130354
+ "text": "boolean"
130355
+ },
130301
130356
  "privacy": "private",
130302
- "default": "new SbbLanguageController(this)"
130357
+ "default": "false"
130303
130358
  },
130304
130359
  {
130305
- "kind": "method",
130306
- "name": "_invertFieldValues",
130307
- "privacy": "private",
130308
- "return": {
130309
- "type": {
130310
- "text": "void"
130311
- }
130360
+ "kind": "field",
130361
+ "name": "borderless",
130362
+ "type": {
130363
+ "text": "boolean"
130312
130364
  },
130313
- "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
130365
+ "privacy": "public",
130366
+ "default": "true",
130367
+ "description": "Whether to display the form field without a border.",
130368
+ "attribute": "borderless",
130369
+ "reflects": true,
130370
+ "inheritedFrom": {
130371
+ "name": "SbbFormFieldElement",
130372
+ "module": "form-field/form-field/form-field.component.js"
130373
+ }
130314
130374
  },
130315
130375
  {
130316
- "kind": "method",
130317
- "name": "renderIconName",
130318
- "privacy": "protected",
130319
- "return": {
130320
- "type": {
130321
- "text": "string"
130322
- }
130376
+ "kind": "field",
130377
+ "name": "floatingLabel",
130378
+ "type": {
130379
+ "text": "boolean"
130323
130380
  },
130381
+ "privacy": "public",
130382
+ "default": "true",
130383
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
130384
+ "attribute": "floating-label",
130385
+ "reflects": true,
130324
130386
  "inheritedFrom": {
130325
- "name": "SbbIconNameMixin",
130326
- "module": "icon/icon-name-mixin.js"
130387
+ "name": "SbbFormFieldElement",
130388
+ "module": "form-field/form-field/form-field.component.js"
130327
130389
  }
130328
130390
  },
130329
130391
  {
130330
130392
  "kind": "field",
130331
- "name": "size",
130393
+ "name": "width",
130332
130394
  "type": {
130333
- "text": "SbbButtonSize"
130395
+ "text": "string"
130334
130396
  },
130335
130397
  "privacy": "public",
130336
- "description": "Size variant, either l, m or s.",
130337
- "default": "'l' / 's' (lean)",
130338
- "attribute": "size",
130398
+ "default": "'collapse'",
130399
+ "description": "Defines the width of the component:\n- `default`: the component has defined width and min-width;\n- `collapse`: the component adapts itself to its inner input content.",
130400
+ "attribute": "width",
130339
130401
  "reflects": true,
130340
130402
  "inheritedFrom": {
130341
- "name": "SbbButtonCommonElementMixin",
130342
- "module": "button/common/button-common.js"
130403
+ "name": "SbbFormFieldElement",
130404
+ "module": "form-field/form-field/form-field.component.js"
130343
130405
  }
130344
130406
  },
130345
130407
  {
130346
130408
  "kind": "field",
130347
- "name": "loading",
130409
+ "name": "size",
130348
130410
  "type": {
130349
- "text": "boolean"
130411
+ "text": "string"
130350
130412
  },
130351
130413
  "privacy": "public",
130352
- "default": "false",
130353
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
130354
- "attribute": "loading",
130414
+ "description": "Size variant, either l, m or s.",
130415
+ "default": "'l'",
130416
+ "attribute": "size",
130355
130417
  "reflects": true,
130356
130418
  "inheritedFrom": {
130357
- "name": "SbbButtonCommonElementMixin",
130358
- "module": "button/common/button-common.js"
130359
- }
130360
- },
130361
- {
130362
- "kind": "method",
130363
- "name": "renderTemplate",
130364
- "privacy": "protected",
130365
- "return": {
130366
- "type": {
130367
- "text": "TemplateResult"
130368
- }
130369
- },
130370
- "description": "Override this method to render the component template.",
130371
- "inheritedFrom": {
130372
- "name": "SbbActionBaseElement",
130373
- "module": "core/base-elements/action-base-element.js"
130419
+ "name": "SbbFormFieldElement",
130420
+ "module": "form-field/form-field/form-field.component.js"
130374
130421
  }
130375
130422
  },
130376
130423
  {
@@ -130391,631 +130438,584 @@
130391
130438
  },
130392
130439
  {
130393
130440
  "kind": "field",
130394
- "name": "iconName",
130441
+ "name": "_excludedFocusElements",
130395
130442
  "type": {
130396
- "text": "string"
130443
+ "text": "array"
130397
130444
  },
130398
- "privacy": "public",
130399
- "default": "''",
130400
- "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
130401
- "attribute": "icon-name",
130445
+ "privacy": "private",
130446
+ "readonly": true,
130447
+ "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
130402
130448
  "inheritedFrom": {
130403
- "name": "SbbIconNameMixin",
130404
- "module": "icon/icon-name-mixin.js"
130449
+ "name": "SbbFormFieldElement",
130450
+ "module": "form-field/form-field/form-field.component.js"
130405
130451
  }
130406
130452
  },
130407
130453
  {
130408
- "kind": "method",
130409
- "name": "renderIconSlot",
130410
- "privacy": "protected",
130411
- "return": {
130412
- "type": {
130413
- "text": "TemplateResult"
130414
- }
130454
+ "kind": "field",
130455
+ "name": "_floatingLabelSupportedInputElements",
130456
+ "type": {
130457
+ "text": "array"
130415
130458
  },
130416
- "parameters": [
130417
- {
130418
- "name": "classname",
130419
- "optional": true,
130420
- "type": {
130421
- "text": "string"
130422
- }
130423
- }
130424
- ],
130459
+ "privacy": "private",
130460
+ "readonly": true,
130461
+ "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
130425
130462
  "inheritedFrom": {
130426
- "name": "SbbIconNameMixin",
130427
- "module": "icon/icon-name-mixin.js"
130463
+ "name": "SbbFormFieldElement",
130464
+ "module": "form-field/form-field/form-field.component.js"
130428
130465
  }
130429
130466
  },
130430
130467
  {
130431
- "kind": "method",
130432
- "name": "_renderIconName",
130433
- "privacy": "private",
130434
- "return": {
130435
- "type": {
130436
- "text": "string"
130437
- }
130468
+ "kind": "field",
130469
+ "name": "_floatingLabelSupportedInputTypes",
130470
+ "type": {
130471
+ "text": "array"
130438
130472
  },
130473
+ "privacy": "private",
130474
+ "readonly": true,
130475
+ "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
130439
130476
  "inheritedFrom": {
130440
- "name": "SbbIconNameMixin",
130441
- "module": "icon/icon-name-mixin.js"
130477
+ "name": "SbbFormFieldElement",
130478
+ "module": "form-field/form-field/form-field.component.js"
130442
130479
  }
130443
130480
  },
130444
130481
  {
130445
130482
  "kind": "field",
130446
- "name": "disabledInteractive",
130483
+ "name": "errorSpace",
130447
130484
  "type": {
130448
- "text": "boolean"
130485
+ "text": "'none' | 'reserve'"
130449
130486
  },
130450
130487
  "privacy": "public",
130451
- "default": "false",
130452
- "description": "Whether the button should be aria-disabled but stay interactive.",
130453
- "attribute": "disabled-interactive",
130488
+ "default": "'none'",
130489
+ "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
130490
+ "attribute": "error-space",
130454
130491
  "reflects": true,
130455
130492
  "inheritedFrom": {
130456
- "name": "SbbDisabledInteractiveMixin",
130457
- "module": "core/mixins/disabled-mixin.js"
130493
+ "name": "SbbFormFieldElement",
130494
+ "module": "form-field/form-field/form-field.component.js"
130458
130495
  }
130459
130496
  },
130460
130497
  {
130461
130498
  "kind": "field",
130462
- "name": "disabled",
130463
- "privacy": "public",
130464
- "description": "Whether the component is disabled.",
130465
- "default": "false",
130499
+ "name": "optional",
130466
130500
  "type": {
130467
130501
  "text": "boolean"
130468
130502
  },
130469
- "attribute": "disabled",
130470
- "reflects": true,
130503
+ "privacy": "public",
130504
+ "default": "false",
130505
+ "description": "Indicates whether the input is optional.",
130506
+ "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
130507
+ "attribute": "optional",
130471
130508
  "inheritedFrom": {
130472
- "name": "SbbDisabledMixin",
130473
- "module": "core/mixins/disabled-mixin.js"
130509
+ "name": "SbbFormFieldElement",
130510
+ "module": "form-field/form-field/form-field.component.js"
130474
130511
  }
130475
130512
  },
130476
130513
  {
130477
130514
  "kind": "field",
130478
- "name": "#disabled",
130479
- "privacy": "private",
130515
+ "name": "hiddenLabel",
130480
130516
  "type": {
130481
130517
  "text": "boolean"
130482
130518
  },
130519
+ "privacy": "public",
130483
130520
  "default": "false",
130521
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130522
+ "attribute": "hidden-label",
130523
+ "reflects": true,
130484
130524
  "inheritedFrom": {
130485
- "name": "SbbDisabledMixin",
130486
- "module": "core/mixins/disabled-mixin.js"
130525
+ "name": "SbbFormFieldElement",
130526
+ "module": "form-field/form-field/form-field.component.js"
130487
130527
  }
130488
130528
  },
130489
130529
  {
130490
- "kind": "method",
130491
- "name": "isDisabledExternally",
130492
- "privacy": "protected",
130493
- "return": {
130494
- "type": {
130495
- "text": "boolean"
130496
- }
130530
+ "kind": "field",
130531
+ "name": "_errorElements",
130532
+ "type": {
130533
+ "text": "Element[]"
130497
130534
  },
130498
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
130535
+ "privacy": "private",
130536
+ "default": "[]",
130537
+ "description": "It is used internally to get the `error` slot.",
130499
130538
  "inheritedFrom": {
130500
- "name": "SbbDisabledMixin",
130501
- "module": "core/mixins/disabled-mixin.js"
130539
+ "name": "SbbFormFieldElement",
130540
+ "module": "form-field/form-field/form-field.component.js"
130502
130541
  }
130503
130542
  },
130504
130543
  {
130505
130544
  "kind": "field",
130506
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
130545
+ "name": "_hintElements",
130507
130546
  "type": {
130508
- "text": "array"
130547
+ "text": "Element[]"
130509
130548
  },
130510
130549
  "privacy": "private",
130511
- "readonly": true,
130512
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
130550
+ "default": "[]",
130551
+ "description": "It is used internally to get the `hint` slot.",
130513
130552
  "inheritedFrom": {
130514
- "name": "SbbButtonBaseElement",
130515
- "module": "core/base-elements/button-base-element.js"
130553
+ "name": "SbbFormFieldElement",
130554
+ "module": "form-field/form-field/form-field.component.js"
130516
130555
  }
130517
130556
  },
130518
130557
  {
130519
130558
  "kind": "field",
130520
- "name": "value",
130559
+ "name": "_input",
130521
130560
  "type": {
130522
- "text": "string"
130561
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130523
130562
  },
130524
- "privacy": "public",
130563
+ "privacy": "private",
130564
+ "default": "null",
130565
+ "description": "Reference to the slotted input element.",
130525
130566
  "inheritedFrom": {
130526
- "name": "SbbButtonBaseElement",
130527
- "module": "core/base-elements/button-base-element.js"
130528
- },
130529
- "default": "''",
130530
- "description": "Value of the form element.",
130531
- "attribute": "value"
130567
+ "name": "SbbFormFieldElement",
130568
+ "module": "form-field/form-field/form-field.component.js"
130569
+ }
130532
130570
  },
130533
130571
  {
130534
130572
  "kind": "field",
130535
- "name": "type",
130536
- "privacy": "public",
130537
- "description": "The type attribute to use for the button.",
130538
- "default": "'button'",
130573
+ "name": "_label",
130539
130574
  "type": {
130540
- "text": "SbbButtonType"
130575
+ "text": "HTMLLabelElement"
130541
130576
  },
130542
- "attribute": "type",
130577
+ "privacy": "private",
130578
+ "description": "Reference to the slotted label elements.",
130543
130579
  "inheritedFrom": {
130544
- "name": "SbbButtonBaseElement",
130545
- "module": "core/base-elements/button-base-element.js"
130580
+ "name": "SbbFormFieldElement",
130581
+ "module": "form-field/form-field/form-field.component.js"
130546
130582
  }
130547
130583
  },
130548
130584
  {
130549
130585
  "kind": "field",
130550
- "name": "form",
130586
+ "name": "inputElement",
130551
130587
  "type": {
130552
- "text": "HTMLFormElement | null"
130588
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130553
130589
  },
130554
130590
  "privacy": "public",
130555
- "description": "The `<form>` element to associate the button with.",
130591
+ "description": "Returns the input element.",
130592
+ "readonly": true,
130556
130593
  "inheritedFrom": {
130557
- "name": "SbbButtonBaseElement",
130558
- "module": "core/base-elements/button-base-element.js"
130559
- },
130560
- "attribute": "form"
130594
+ "name": "SbbFormFieldElement",
130595
+ "module": "form-field/form-field/form-field.component.js"
130596
+ }
130561
130597
  },
130562
130598
  {
130563
130599
  "kind": "field",
130564
- "name": "_formId",
130600
+ "name": "label",
130565
130601
  "type": {
130566
- "text": "string"
130602
+ "text": "HTMLLabelElement | null"
130567
130603
  },
130568
- "privacy": "private",
130569
- "default": "''",
130604
+ "privacy": "public",
130605
+ "description": "Reference to the slotted label.",
130606
+ "readonly": true,
130570
130607
  "inheritedFrom": {
130571
- "name": "SbbButtonBaseElement",
130572
- "module": "core/base-elements/button-base-element.js"
130608
+ "name": "SbbFormFieldElement",
130609
+ "module": "form-field/form-field/form-field.component.js"
130573
130610
  }
130574
130611
  },
130575
130612
  {
130576
130613
  "kind": "field",
130577
- "name": "_handleButtonClick",
130614
+ "name": "_language",
130578
130615
  "privacy": "private",
130616
+ "default": "new SbbLanguageController(this)",
130579
130617
  "inheritedFrom": {
130580
- "name": "SbbButtonBaseElement",
130581
- "module": "core/base-elements/button-base-element.js"
130618
+ "name": "SbbFormFieldElement",
130619
+ "module": "form-field/form-field/form-field.component.js"
130582
130620
  }
130583
130621
  },
130584
130622
  {
130585
- "kind": "method",
130586
- "name": "_requestSubmit",
130623
+ "kind": "field",
130624
+ "name": "_formFieldAttributeObserver",
130587
130625
  "privacy": "private",
130588
- "return": {
130589
- "type": {
130590
- "text": "void"
130591
- }
130592
- },
130593
- "parameters": [
130594
- {
130595
- "name": "form",
130596
- "type": {
130597
- "text": "HTMLFormElement"
130598
- }
130599
- }
130600
- ],
130626
+ "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
130601
130627
  "inheritedFrom": {
130602
- "name": "SbbButtonBaseElement",
130603
- "module": "core/base-elements/button-base-element.js"
130628
+ "name": "SbbFormFieldElement",
130629
+ "module": "form-field/form-field/form-field.component.js"
130604
130630
  }
130605
130631
  },
130606
130632
  {
130607
130633
  "kind": "field",
130608
- "name": "_formKeyDown",
130634
+ "name": "_inputFormAbortController",
130609
130635
  "privacy": "private",
130636
+ "default": "new AbortController()",
130610
130637
  "inheritedFrom": {
130611
- "name": "SbbButtonBaseElement",
130612
- "module": "core/base-elements/button-base-element.js"
130638
+ "name": "SbbFormFieldElement",
130639
+ "module": "form-field/form-field/form-field.component.js"
130613
130640
  }
130614
130641
  },
130615
130642
  {
130616
130643
  "kind": "field",
130617
- "name": "formAssociated",
130644
+ "name": "_control",
130618
130645
  "type": {
130619
- "text": "boolean"
130646
+ "text": "SbbFormFieldElementControl | null"
130620
130647
  },
130621
- "privacy": "public",
130622
- "static": true,
130623
- "default": "true",
130648
+ "privacy": "private",
130649
+ "default": "null",
130624
130650
  "inheritedFrom": {
130625
- "name": "SbbFormAssociatedMixin",
130626
- "module": "core/mixins/form-associated-mixin.js"
130651
+ "name": "SbbFormFieldElement",
130652
+ "module": "form-field/form-field/form-field.component.js"
130627
130653
  }
130628
130654
  },
130629
130655
  {
130630
130656
  "kind": "field",
130631
- "name": "name",
130632
- "privacy": "public",
130633
- "description": "Name of the form element. Will be read from name attribute.",
130657
+ "name": "_previousType",
130634
130658
  "type": {
130635
- "text": "string"
130659
+ "text": "string | null"
130636
130660
  },
130637
- "attribute": "name",
130661
+ "privacy": "private",
130662
+ "default": "null",
130638
130663
  "inheritedFrom": {
130639
- "name": "SbbFormAssociatedMixin",
130640
- "module": "core/mixins/form-associated-mixin.js"
130664
+ "name": "SbbFormFieldElement",
130665
+ "module": "form-field/form-field/form-field.component.js"
130641
130666
  }
130642
130667
  },
130643
130668
  {
130644
- "kind": "field",
130645
- "name": "validity",
130646
- "type": {
130647
- "text": "ValidityState"
130669
+ "kind": "method",
130670
+ "name": "_handleWrapperClick",
130671
+ "privacy": "private",
130672
+ "return": {
130673
+ "type": {
130674
+ "text": "void"
130675
+ }
130648
130676
  },
130649
- "privacy": "public",
130650
- "description": "Returns the ValidityState object for this element.",
130651
- "readonly": true,
130677
+ "parameters": [
130678
+ {
130679
+ "name": "event",
130680
+ "type": {
130681
+ "text": "MouseEvent"
130682
+ }
130683
+ }
130684
+ ],
130652
130685
  "inheritedFrom": {
130653
- "name": "SbbFormAssociatedMixin",
130654
- "module": "core/mixins/form-associated-mixin.js"
130686
+ "name": "SbbFormFieldElement",
130687
+ "module": "form-field/form-field/form-field.component.js"
130655
130688
  }
130656
130689
  },
130657
130690
  {
130658
- "kind": "field",
130659
- "name": "validationMessage",
130660
- "type": {
130661
- "text": "string"
130691
+ "kind": "method",
130692
+ "name": "_isElementFocusExcluded",
130693
+ "privacy": "private",
130694
+ "return": {
130695
+ "type": {
130696
+ "text": "boolean"
130697
+ }
130662
130698
  },
130663
- "privacy": "public",
130664
- "description": "Returns the current error message, if available, which corresponds\nto the current validation state.\nPlease note that only one message is returned at a time (e.g. if\nmultiple validity states are invalid, only the chronologically first one\nis returned until it is fixed, at which point the next message might be\nreturned, if it is still applicable). Also, a custom validity message\n(see below) has precedence over native validation messages.",
130665
- "readonly": true,
130699
+ "parameters": [
130700
+ {
130701
+ "name": "event",
130702
+ "type": {
130703
+ "text": "Event"
130704
+ }
130705
+ }
130706
+ ],
130666
130707
  "inheritedFrom": {
130667
- "name": "SbbFormAssociatedMixin",
130668
- "module": "core/mixins/form-associated-mixin.js"
130708
+ "name": "SbbFormFieldElement",
130709
+ "module": "form-field/form-field/form-field.component.js"
130669
130710
  }
130670
130711
  },
130671
130712
  {
130672
- "kind": "field",
130673
- "name": "willValidate",
130674
- "type": {
130675
- "text": "boolean"
130713
+ "kind": "method",
130714
+ "name": "_onSlotLabelChange",
130715
+ "privacy": "private",
130716
+ "return": {
130717
+ "type": {
130718
+ "text": "void"
130719
+ }
130676
130720
  },
130677
- "privacy": "public",
130678
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130679
- "readonly": true,
130680
130721
  "inheritedFrom": {
130681
- "name": "SbbFormAssociatedMixin",
130682
- "module": "core/mixins/form-associated-mixin.js"
130722
+ "name": "SbbFormFieldElement",
130723
+ "module": "form-field/form-field/form-field.component.js"
130683
130724
  }
130684
130725
  },
130685
130726
  {
130686
- "kind": "field",
130687
- "name": "_validityStates",
130727
+ "kind": "method",
130728
+ "name": "_onSlotInputChange",
130688
130729
  "privacy": "private",
130689
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130730
+ "return": {
130731
+ "type": {
130732
+ "text": "void"
130733
+ }
130734
+ },
130735
+ "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
130690
130736
  "inheritedFrom": {
130691
- "name": "SbbFormAssociatedMixin",
130692
- "module": "core/mixins/form-associated-mixin.js"
130737
+ "name": "SbbFormFieldElement",
130738
+ "module": "form-field/form-field/form-field.component.js"
130693
130739
  }
130694
130740
  },
130695
130741
  {
130696
- "kind": "field",
130697
- "name": "formDisabled",
130698
- "type": {
130699
- "text": "boolean"
130742
+ "kind": "method",
130743
+ "name": "_assignSlots",
130744
+ "privacy": "private",
130745
+ "return": {
130746
+ "type": {
130747
+ "text": "void"
130748
+ }
130700
130749
  },
130701
- "privacy": "protected",
130702
- "default": "false",
130703
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130704
130750
  "inheritedFrom": {
130705
- "name": "SbbFormAssociatedMixin",
130706
- "module": "core/mixins/form-associated-mixin.js"
130751
+ "name": "SbbFormFieldElement",
130752
+ "module": "form-field/form-field/form-field.component.js"
130707
130753
  }
130708
130754
  },
130709
130755
  {
130710
130756
  "kind": "method",
130711
- "name": "checkValidity",
130712
- "privacy": "public",
130757
+ "name": "_connectInputElement",
130758
+ "privacy": "private",
130713
130759
  "return": {
130714
130760
  "type": {
130715
- "text": "boolean"
130761
+ "text": "'changed' | 'no-input' | 'unchanged'"
130716
130762
  }
130717
130763
  },
130718
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130719
130764
  "inheritedFrom": {
130720
- "name": "SbbFormAssociatedMixin",
130721
- "module": "core/mixins/form-associated-mixin.js"
130765
+ "name": "SbbFormFieldElement",
130766
+ "module": "form-field/form-field/form-field.component.js"
130722
130767
  }
130723
130768
  },
130724
130769
  {
130725
130770
  "kind": "method",
130726
- "name": "reportValidity",
130727
- "privacy": "public",
130771
+ "name": "_syncLabelInputReferences",
130772
+ "privacy": "private",
130728
130773
  "return": {
130729
130774
  "type": {
130730
- "text": "boolean"
130775
+ "text": "void"
130731
130776
  }
130732
130777
  },
130733
- "description": "Returns true if this element has no validity problems; otherwise,\nreturns false, fires an invalid event at the element,\nand (if the event isn't canceled) reports the problem to the user.",
130734
130778
  "inheritedFrom": {
130735
- "name": "SbbFormAssociatedMixin",
130736
- "module": "core/mixins/form-associated-mixin.js"
130779
+ "name": "SbbFormFieldElement",
130780
+ "module": "form-field/form-field/form-field.component.js"
130737
130781
  }
130738
130782
  },
130739
130783
  {
130740
130784
  "kind": "method",
130741
- "name": "setCustomValidity",
130742
- "privacy": "public",
130785
+ "name": "_isInputElement",
130786
+ "privacy": "private",
130743
130787
  "return": {
130744
130788
  "type": {
130745
- "text": "void"
130789
+ "text": "boolean"
130746
130790
  }
130747
130791
  },
130748
130792
  "parameters": [
130749
130793
  {
130750
- "name": "message",
130794
+ "name": "input",
130751
130795
  "type": {
130752
- "text": "string"
130796
+ "text": "Element"
130753
130797
  }
130754
130798
  }
130755
130799
  ],
130756
- "description": "Sets the custom validity message for this element. Use the empty string\nto indicate that the element does not have a custom validity error.",
130757
130800
  "inheritedFrom": {
130758
- "name": "SbbFormAssociatedMixin",
130759
- "module": "core/mixins/form-associated-mixin.js"
130801
+ "name": "SbbFormFieldElement",
130802
+ "module": "form-field/form-field/form-field.component.js"
130760
130803
  }
130761
130804
  },
130762
130805
  {
130763
130806
  "kind": "method",
130764
- "name": "_hasDisabledAncestor",
130807
+ "name": "_readInputState",
130765
130808
  "privacy": "private",
130766
130809
  "return": {
130767
130810
  "type": {
130768
- "text": "boolean"
130811
+ "text": "void"
130769
130812
  }
130770
130813
  },
130771
130814
  "inheritedFrom": {
130772
- "name": "SbbFormAssociatedMixin",
130773
- "module": "core/mixins/form-associated-mixin.js"
130815
+ "name": "SbbFormFieldElement",
130816
+ "module": "form-field/form-field/form-field.component.js"
130774
130817
  }
130775
130818
  },
130776
130819
  {
130777
130820
  "kind": "method",
130778
- "name": "updateFormValue",
130779
- "privacy": "protected",
130821
+ "name": "_registerInputFormListener",
130822
+ "privacy": "private",
130780
130823
  "return": {
130781
130824
  "type": {
130782
130825
  "text": "void"
130783
130826
  }
130784
130827
  },
130785
- "description": "Should be called when form value is changed.\nAdapts and sets the formValue in the supported format (string | FormData | File | null)\nhttps://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/setFormValue",
130786
130828
  "inheritedFrom": {
130787
- "name": "SbbFormAssociatedMixin",
130788
- "module": "core/mixins/form-associated-mixin.js"
130829
+ "name": "SbbFormFieldElement",
130830
+ "module": "form-field/form-field/form-field.component.js"
130789
130831
  }
130790
130832
  },
130791
130833
  {
130792
130834
  "kind": "method",
130793
- "name": "formState",
130794
- "privacy": "protected",
130835
+ "name": "_patchInputValue",
130836
+ "privacy": "private",
130795
130837
  "return": {
130796
130838
  "type": {
130797
- "text": "FormRestoreState"
130839
+ "text": "void"
130798
130840
  }
130799
130841
  },
130800
130842
  "inheritedFrom": {
130801
- "name": "SbbFormAssociatedMixin",
130802
- "module": "core/mixins/form-associated-mixin.js"
130843
+ "name": "SbbFormFieldElement",
130844
+ "module": "form-field/form-field/form-field.component.js"
130803
130845
  }
130804
130846
  },
130805
130847
  {
130806
130848
  "kind": "method",
130807
- "name": "setValidityFlag",
130808
- "privacy": "protected",
130849
+ "name": "_unpatchInputValue",
130850
+ "privacy": "private",
130809
130851
  "return": {
130810
130852
  "type": {
130811
130853
  "text": "void"
130812
130854
  }
130813
130855
  },
130814
- "parameters": [
130815
- {
130816
- "name": "flag",
130817
- "type": {
130818
- "text": "T"
130819
- }
130820
- },
130821
- {
130822
- "name": "message",
130823
- "type": {
130824
- "text": "string"
130825
- }
130826
- },
130827
- {
130828
- "name": "flagValue",
130829
- "optional": true,
130830
- "type": {
130831
- "text": "ValidityStateFlags[T]"
130832
- }
130833
- }
130834
- ],
130835
- "description": "Marks this element as suffering from the constraint indicated by the\nflag argument and associates the given message to it.\nNote that only one message is displayed at a time and custom messages by\nconsumers are always displayed before internal messages and internal\nmessages are displayed in the order they were added.\nTo set/define custom validity state flags, you need to extend the\nValidityState prototype (and the CustomValidityState interface).",
130836
130856
  "inheritedFrom": {
130837
- "name": "SbbFormAssociatedMixin",
130838
- "module": "core/mixins/form-associated-mixin.js"
130857
+ "name": "SbbFormFieldElement",
130858
+ "module": "form-field/form-field/form-field.component.js"
130839
130859
  }
130840
130860
  },
130841
130861
  {
130842
130862
  "kind": "method",
130843
- "name": "removeValidityFlag",
130844
- "privacy": "protected",
130863
+ "name": "_checkAndUpdateInputEmpty",
130864
+ "privacy": "private",
130845
130865
  "return": {
130846
130866
  "type": {
130847
130867
  "text": "void"
130848
130868
  }
130849
130869
  },
130850
- "parameters": [
130851
- {
130852
- "name": "flag",
130853
- "type": {
130854
- "text": "T"
130855
- }
130856
- }
130857
- ],
130858
- "description": "Removes the validity state flag entry and updates validity state.",
130859
130870
  "inheritedFrom": {
130860
- "name": "SbbFormAssociatedMixin",
130861
- "module": "core/mixins/form-associated-mixin.js"
130871
+ "name": "SbbFormFieldElement",
130872
+ "module": "form-field/form-field/form-field.component.js"
130862
130873
  }
130863
130874
  },
130864
130875
  {
130865
130876
  "kind": "method",
130866
- "name": "validate",
130867
- "privacy": "protected",
130877
+ "name": "_isInputEmpty",
130878
+ "privacy": "private",
130868
130879
  "return": {
130869
130880
  "type": {
130870
- "text": "void"
130881
+ "text": "boolean"
130871
130882
  }
130872
130883
  },
130873
- "description": "To be called whenever the current element needs to be validated.",
130874
130884
  "inheritedFrom": {
130875
- "name": "SbbFormAssociatedMixin",
130876
- "module": "core/mixins/form-associated-mixin.js"
130885
+ "name": "SbbFormFieldElement",
130886
+ "module": "form-field/form-field/form-field.component.js"
130877
130887
  }
130878
130888
  },
130879
130889
  {
130880
130890
  "kind": "method",
130881
- "name": "shouldValidate",
130882
- "privacy": "protected",
130891
+ "name": "_isInputValueEmpty",
130892
+ "privacy": "private",
130883
130893
  "return": {
130884
130894
  "type": {
130885
130895
  "text": "boolean"
130886
130896
  }
130887
130897
  },
130898
+ "inheritedFrom": {
130899
+ "name": "SbbFormFieldElement",
130900
+ "module": "form-field/form-field/form-field.component.js"
130901
+ }
130902
+ },
130903
+ {
130904
+ "kind": "method",
130905
+ "name": "_onSlotErrorChange",
130906
+ "privacy": "private",
130907
+ "return": {
130908
+ "type": {
130909
+ "text": "void"
130910
+ }
130911
+ },
130888
130912
  "parameters": [
130889
130913
  {
130890
- "name": "name",
130914
+ "name": "event",
130891
130915
  "type": {
130892
- "text": "PropertyKey | undefined"
130916
+ "text": "Event"
130893
130917
  }
130894
130918
  }
130895
130919
  ],
130896
- "description": "Whether validation should be run on a property change with the given name.",
130920
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
130897
130921
  "inheritedFrom": {
130898
- "name": "SbbFormAssociatedMixin",
130899
- "module": "core/mixins/form-associated-mixin.js"
130922
+ "name": "SbbFormFieldElement",
130923
+ "module": "form-field/form-field/form-field.component.js"
130900
130924
  }
130901
130925
  },
130902
130926
  {
130903
130927
  "kind": "method",
130904
- "name": "_setInternalValidity",
130928
+ "name": "_onSlotHintChange",
130905
130929
  "privacy": "private",
130906
130930
  "return": {
130907
130931
  "type": {
130908
130932
  "text": "void"
130909
130933
  }
130910
130934
  },
130911
- "inheritedFrom": {
130912
- "name": "SbbFormAssociatedMixin",
130913
- "module": "core/mixins/form-associated-mixin.js"
130914
- }
130915
- },
130916
- {
130917
- "kind": "field",
130918
- "name": "role",
130919
- "type": {
130920
- "text": "ElementInternals['role']"
130921
- },
130922
- "privacy": "public",
130923
- "static": true,
130924
- "readonly": true,
130925
- "default": "'button'",
130926
- "inheritedFrom": {
130927
- "name": "SbbButtonLikeBaseElement",
130928
- "module": "core/base-elements/button-base-element.js"
130929
- }
130930
- },
130931
- {
130932
- "kind": "field",
130933
- "name": "_preventScrollOnSpaceKeydown",
130934
- "privacy": "private",
130935
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
130936
130935
  "parameters": [
130937
130936
  {
130938
- "description": "The origin event.",
130939
- "name": "event"
130937
+ "name": "event",
130938
+ "type": {
130939
+ "text": "Event"
130940
+ }
130940
130941
  }
130941
130942
  ],
130943
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
130942
130944
  "inheritedFrom": {
130943
- "name": "SbbButtonLikeBaseElement",
130944
- "module": "core/base-elements/button-base-element.js"
130945
- }
130946
- },
130947
- {
130948
- "kind": "field",
130949
- "name": "_removeActiveMarker",
130950
- "privacy": "private",
130951
- "inheritedFrom": {
130952
- "name": "SbbButtonLikeBaseElement",
130953
- "module": "core/base-elements/button-base-element.js"
130945
+ "name": "SbbFormFieldElement",
130946
+ "module": "form-field/form-field/form-field.component.js"
130954
130947
  }
130955
130948
  },
130956
130949
  {
130957
- "kind": "field",
130958
- "name": "_dispatchClickEventOnSpaceKeyup",
130950
+ "kind": "method",
130951
+ "name": "_assignAriaDescribedByElements",
130959
130952
  "privacy": "private",
130960
- "description": "Dispatches a 'click' PointerEvent if the original keyboard event is a 'Space' press.\nAs verified with the native button, when 'Space' is pressed, a 'click' event is dispatched\nafter the 'keyup' event.",
130961
- "parameters": [
130962
- {
130963
- "description": "The origin event.",
130964
- "name": "event"
130953
+ "return": {
130954
+ "type": {
130955
+ "text": "void"
130965
130956
  }
130966
- ],
130957
+ },
130967
130958
  "inheritedFrom": {
130968
- "name": "SbbButtonLikeBaseElement",
130969
- "module": "core/base-elements/button-base-element.js"
130959
+ "name": "SbbFormFieldElement",
130960
+ "module": "form-field/form-field/form-field.component.js"
130970
130961
  }
130971
130962
  },
130972
130963
  {
130973
- "kind": "field",
130974
- "name": "_dispatchClickEvent",
130975
- "privacy": "private",
130976
- "inheritedFrom": {
130977
- "name": "SbbButtonLikeBaseElement",
130978
- "module": "core/base-elements/button-base-element.js"
130964
+ "kind": "method",
130965
+ "name": "reset",
130966
+ "privacy": "public",
130967
+ "return": {
130968
+ "type": {
130969
+ "text": "void"
130970
+ }
130971
+ },
130972
+ "description": "Manually reset the form field. Currently, this only resets the floating label.",
130973
+ "inheritedFrom": {
130974
+ "name": "SbbFormFieldElement",
130975
+ "module": "form-field/form-field/form-field.component.js"
130979
130976
  }
130980
130977
  },
130981
130978
  {
130982
- "kind": "field",
130983
- "name": "maybeDisabled",
130984
- "type": {
130985
- "text": "boolean | undefined"
130979
+ "kind": "method",
130980
+ "name": "clear",
130981
+ "privacy": "public",
130982
+ "return": {
130983
+ "type": {
130984
+ "text": "void"
130985
+ }
130986
130986
  },
130987
- "privacy": "protected",
130988
- "readonly": true,
130987
+ "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
130989
130988
  "inheritedFrom": {
130990
- "name": "SbbActionBaseElement",
130991
- "module": "core/base-elements/action-base-element.js"
130989
+ "name": "SbbFormFieldElement",
130990
+ "module": "form-field/form-field/form-field.component.js"
130992
130991
  }
130993
130992
  },
130994
130993
  {
130995
- "kind": "field",
130996
- "name": "maybeDisabledInteractive",
130997
- "type": {
130998
- "text": "boolean | undefined"
130994
+ "kind": "method",
130995
+ "name": "_syncNegative",
130996
+ "privacy": "private",
130997
+ "return": {
130998
+ "type": {
130999
+ "text": "void"
131000
+ }
130999
131001
  },
131000
- "privacy": "protected",
131001
- "readonly": true,
131002
131002
  "inheritedFrom": {
131003
- "name": "SbbActionBaseElement",
131004
- "module": "core/base-elements/action-base-element.js"
131003
+ "name": "SbbFormFieldElement",
131004
+ "module": "form-field/form-field/form-field.component.js"
131005
131005
  }
131006
131006
  },
131007
131007
  {
131008
131008
  "kind": "method",
131009
- "name": "setupBaseEventHandlers",
131010
- "privacy": "protected",
131009
+ "name": "_syncSize",
131010
+ "privacy": "private",
131011
131011
  "return": {
131012
131012
  "type": {
131013
131013
  "text": "void"
131014
131014
  }
131015
131015
  },
131016
131016
  "inheritedFrom": {
131017
- "name": "SbbActionBaseElement",
131018
- "module": "core/base-elements/action-base-element.js"
131017
+ "name": "SbbFormFieldElement",
131018
+ "module": "form-field/form-field/form-field.component.js"
131019
131019
  }
131020
131020
  },
131021
131021
  {
@@ -131124,55 +131124,13 @@
131124
131124
  }
131125
131125
  }
131126
131126
  ],
131127
- "events": [
131128
- {
131129
- "type": {
131130
- "text": "Event"
131131
- },
131132
- "description": "The change event is fired on the associated inputs when the user modifies the element's value. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.",
131133
- "name": "change"
131134
- },
131135
- {
131136
- "type": {
131137
- "text": "InputEvent"
131138
- },
131139
- "description": "The input event fires on the associated inputs when the value has been changed as a direct result of a user action.",
131140
- "name": "input"
131141
- }
131142
- ],
131143
131127
  "superclass": {
131144
- "name": "SbbSecondaryButtonElement",
131145
- "module": "button.pure.js"
131128
+ "name": "SbbFormFieldElement",
131129
+ "module": "form-field.pure.js"
131146
131130
  },
131147
- "tagName": "sbb-timetable-form-swap-button",
131131
+ "tagName": "sbb-timetable-form-field",
131148
131132
  "customElement": true,
131149
131133
  "attributes": [
131150
- {
131151
- "name": "size",
131152
- "type": {
131153
- "text": "SbbButtonSize"
131154
- },
131155
- "description": "Size variant, either l, m or s.",
131156
- "default": "'l' / 's' (lean)",
131157
- "fieldName": "size",
131158
- "inheritedFrom": {
131159
- "name": "SbbButtonCommonElementMixin",
131160
- "module": "button/common/button-common.js"
131161
- }
131162
- },
131163
- {
131164
- "name": "loading",
131165
- "type": {
131166
- "text": "boolean"
131167
- },
131168
- "default": "false",
131169
- "description": "Whether the button indicates a loading state.\nThe animation kicks in after a delay of 300ms, configurable with --sbb-button-loading-delay CSS variable.",
131170
- "fieldName": "loading",
131171
- "inheritedFrom": {
131172
- "name": "SbbButtonCommonElementMixin",
131173
- "module": "button/common/button-common.js"
131174
- }
131175
- },
131176
131134
  {
131177
131135
  "name": "negative",
131178
131136
  "type": {
@@ -131187,121 +131145,163 @@
131187
131145
  }
131188
131146
  },
131189
131147
  {
131190
- "name": "icon-name",
131148
+ "name": "error-space",
131191
131149
  "type": {
131192
- "text": "string"
131150
+ "text": "'none' | 'reserve'"
131193
131151
  },
131194
- "default": "''",
131195
- "description": "The icon name we want to use, choose from the small icon variants\nfrom the ui-icons category from here\nhttps://icons.app.sbb.ch.",
131196
- "fieldName": "iconName",
131152
+ "default": "'none'",
131153
+ "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
131154
+ "fieldName": "errorSpace",
131197
131155
  "inheritedFrom": {
131198
- "name": "SbbIconNameMixin",
131199
- "module": "icon/icon-name-mixin.js"
131156
+ "name": "SbbFormFieldElement",
131157
+ "module": "form-field/form-field/form-field.component.js"
131200
131158
  }
131201
131159
  },
131202
131160
  {
131203
- "name": "disabled-interactive",
131161
+ "name": "optional",
131204
131162
  "type": {
131205
131163
  "text": "boolean"
131206
131164
  },
131207
131165
  "default": "false",
131208
- "description": "Whether the button should be aria-disabled but stay interactive.",
131209
- "fieldName": "disabledInteractive",
131166
+ "description": "Indicates whether the input is optional.",
131167
+ "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
131168
+ "fieldName": "optional",
131210
131169
  "inheritedFrom": {
131211
- "name": "SbbDisabledInteractiveMixin",
131212
- "module": "core/mixins/disabled-mixin.js"
131170
+ "name": "SbbFormFieldElement",
131171
+ "module": "form-field/form-field/form-field.component.js"
131213
131172
  }
131214
131173
  },
131215
131174
  {
131216
- "name": "disabled",
131217
- "description": "Whether the component is disabled.",
131218
- "default": "false",
131175
+ "name": "size",
131219
131176
  "type": {
131220
- "text": "boolean"
131177
+ "text": "'l' | 'm' | 's'"
131221
131178
  },
131222
- "fieldName": "disabled",
131179
+ "description": "Size variant, either l, m or s.",
131180
+ "default": "'m' / 's' (lean)",
131181
+ "fieldName": "size",
131223
131182
  "inheritedFrom": {
131224
- "name": "SbbDisabledMixin",
131225
- "module": "core/mixins/disabled-mixin.js"
131183
+ "name": "SbbFormFieldElement",
131184
+ "module": "form-field/form-field/form-field.component.js"
131226
131185
  }
131227
131186
  },
131228
131187
  {
131229
- "name": "value",
131188
+ "name": "borderless",
131230
131189
  "type": {
131231
- "text": "string"
131190
+ "text": "boolean"
131232
131191
  },
131233
- "default": "''",
131234
- "description": "Value of the form element.",
131235
- "fieldName": "value",
131192
+ "default": "false",
131193
+ "description": "Whether to display the form field without a border.",
131194
+ "fieldName": "borderless",
131236
131195
  "inheritedFrom": {
131237
- "name": "SbbButtonBaseElement",
131238
- "module": "core/base-elements/button-base-element.js"
131196
+ "name": "SbbFormFieldElement",
131197
+ "module": "form-field/form-field/form-field.component.js"
131239
131198
  }
131240
131199
  },
131241
131200
  {
131242
- "name": "type",
131243
- "description": "The type attribute to use for the button.",
131244
- "default": "'button'",
131201
+ "name": "width",
131245
131202
  "type": {
131246
- "text": "SbbButtonType"
131203
+ "text": "'default' | 'collapse'"
131247
131204
  },
131248
- "fieldName": "type",
131205
+ "default": "'default'",
131206
+ "description": "Defines the width of the component:\n- `default`: the component has defined width and min-width;\n- `collapse`: the component adapts itself to its inner input content.",
131207
+ "fieldName": "width",
131249
131208
  "inheritedFrom": {
131250
- "name": "SbbButtonBaseElement",
131251
- "module": "core/base-elements/button-base-element.js"
131209
+ "name": "SbbFormFieldElement",
131210
+ "module": "form-field/form-field/form-field.component.js"
131252
131211
  }
131253
131212
  },
131254
131213
  {
131255
- "name": "form",
131256
- "description": "The `<form>` element to associate the button with.",
131214
+ "name": "hidden-label",
131257
131215
  "type": {
131258
- "text": "HTMLFormElement | null"
131216
+ "text": "boolean"
131259
131217
  },
131260
- "fieldName": "form",
131218
+ "default": "false",
131219
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
131220
+ "fieldName": "hiddenLabel",
131261
131221
  "inheritedFrom": {
131262
- "name": "SbbButtonBaseElement",
131263
- "module": "core/base-elements/button-base-element.js"
131222
+ "name": "SbbFormFieldElement",
131223
+ "module": "form-field/form-field/form-field.component.js"
131264
131224
  }
131265
131225
  },
131266
131226
  {
131267
- "name": "name",
131268
- "description": "Name of the form element. Will be read from name attribute.",
131227
+ "name": "floating-label",
131269
131228
  "type": {
131270
- "text": "string"
131229
+ "text": "boolean"
131271
131230
  },
131272
- "fieldName": "name",
131231
+ "default": "false",
131232
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
131233
+ "fieldName": "floatingLabel",
131273
131234
  "inheritedFrom": {
131274
- "name": "SbbFormAssociatedMixin",
131275
- "module": "core/mixins/form-associated-mixin.js"
131235
+ "name": "SbbFormFieldElement",
131236
+ "module": "form-field/form-field/form-field.component.js"
131276
131237
  }
131277
131238
  }
131278
131239
  ],
131279
131240
  "slots": [
131280
131241
  {
131281
- "description": "Use the unnamed slot to add content to the secondary-button.",
131242
+ "description": "Use this slot to render an input/select or a supported non-native element.",
131282
131243
  "name": "",
131283
131244
  "inheritedFrom": {
131284
- "name": "SbbSecondaryButtonElement",
131285
- "module": "button/secondary-button/secondary-button.component.js"
131245
+ "name": "SbbFormFieldElement",
131246
+ "module": "form-field/form-field/form-field.component.js"
131286
131247
  }
131287
131248
  },
131288
131249
  {
131289
- "description": "Slot used to display the icon, if one is set.",
131290
- "name": "icon",
131250
+ "description": "Use this slot to render a label.",
131251
+ "name": "label",
131291
131252
  "inheritedFrom": {
131292
- "name": "SbbSecondaryButtonElement",
131293
- "module": "button/secondary-button/secondary-button.component.js"
131253
+ "name": "SbbFormFieldElement",
131254
+ "module": "form-field/form-field/form-field.component.js"
131255
+ }
131256
+ },
131257
+ {
131258
+ "description": "Use this slot to render an icon on the left side of the input.",
131259
+ "name": "prefix",
131260
+ "inheritedFrom": {
131261
+ "name": "SbbFormFieldElement",
131262
+ "module": "form-field/form-field/form-field.component.js"
131263
+ }
131264
+ },
131265
+ {
131266
+ "description": "Use this slot to render an icon on the right side of the input.",
131267
+ "name": "suffix",
131268
+ "inheritedFrom": {
131269
+ "name": "SbbFormFieldElement",
131270
+ "module": "form-field/form-field/form-field.component.js"
131271
+ }
131272
+ },
131273
+ {
131274
+ "description": "Use this slot to render an error.",
131275
+ "name": "error",
131276
+ "inheritedFrom": {
131277
+ "name": "SbbFormFieldElement",
131278
+ "module": "form-field/form-field/form-field.component.js"
131279
+ }
131280
+ },
131281
+ {
131282
+ "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
131283
+ "name": "hint",
131284
+ "inheritedFrom": {
131285
+ "name": "SbbFormFieldElement",
131286
+ "module": "form-field/form-field/form-field.component.js"
131294
131287
  }
131295
131288
  }
131296
131289
  ],
131297
131290
  "cssProperties": [
131298
131291
  {
131299
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
131300
- "name": "--sbb-button-loading-delay",
131301
- "default": "300ms",
131292
+ "description": "To override the focus outline offset,",
131293
+ "name": "--sbb-form-field-outline-offset",
131302
131294
  "inheritedFrom": {
131303
- "name": "SbbSecondaryButtonElement",
131304
- "module": "button/secondary-button/secondary-button.component.js"
131295
+ "name": "SbbFormFieldElement",
131296
+ "module": "form-field/form-field/form-field.component.js"
131297
+ }
131298
+ },
131299
+ {
131300
+ "description": "To override the z-index of the focus underline effect,",
131301
+ "name": "--sbb-form-field-focus-underline-z-index",
131302
+ "inheritedFrom": {
131303
+ "name": "SbbFormFieldElement",
131304
+ "module": "form-field/form-field/form-field.component.js"
131305
131305
  }
131306
131306
  }
131307
131307
  ]
@@ -131310,10 +131310,10 @@
131310
131310
  "exports": [
131311
131311
  {
131312
131312
  "kind": "js",
131313
- "name": "SbbTimetableFormSwapButtonElement",
131313
+ "name": "SbbTimetableFormFieldElement",
131314
131314
  "declaration": {
131315
- "name": "SbbTimetableFormSwapButtonElement",
131316
- "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
131315
+ "name": "SbbTimetableFormFieldElement",
131316
+ "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
131317
131317
  }
131318
131318
  }
131319
131319
  ]