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

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 +1206 -1206
  2. package/package.json +2 -2
@@ -124081,261 +124081,6 @@
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
- },
124339
124084
  {
124340
124085
  "kind": "javascript-module",
124341
124086
  "path": "stepper/stepper/stepper.component.js",
@@ -124969,7 +124714,262 @@
124969
124714
  },
124970
124715
  {
124971
124716
  "kind": "javascript-module",
124972
- "path": "tabs/common/styles.js",
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
+ {
124971
+ "kind": "javascript-module",
124972
+ "path": "tabs/common/styles.js",
124973
124973
  "declarations": [
124974
124974
  {
124975
124975
  "kind": "variable",
@@ -129278,12 +129278,12 @@
129278
129278
  },
129279
129279
  {
129280
129280
  "kind": "javascript-module",
129281
- "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
129281
+ "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
129282
129282
  "declarations": [
129283
129283
  {
129284
129284
  "kind": "class",
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",
129285
+ "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
129286
+ "name": "SbbTimetableFormFieldElement",
129287
129287
  "members": [
129288
129288
  {
129289
129289
  "kind": "field",
@@ -129294,88 +129294,83 @@
129294
129294
  "privacy": "public",
129295
129295
  "static": true,
129296
129296
  "readonly": true,
129297
+ "default": "'sbb-timetable-form-field'",
129297
129298
  "inheritedFrom": {
129298
129299
  "name": "SbbElement",
129299
129300
  "module": "core/base-elements/element.js"
129300
- },
129301
- "default": "'sbb-timetable-form-swap-button'"
129301
+ }
129302
129302
  },
129303
129303
  {
129304
129304
  "kind": "field",
129305
- "name": "_languageController",
129306
- "privacy": "private",
129307
- "default": "new SbbLanguageController(this)"
129308
- },
129309
- {
129310
- "kind": "method",
129311
- "name": "_invertFieldValues",
129312
- "privacy": "private",
129313
- "return": {
129314
- "type": {
129315
- "text": "void"
129316
- }
129305
+ "name": "_routeIcon",
129306
+ "type": {
129307
+ "text": "boolean"
129317
129308
  },
129318
- "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
129309
+ "privacy": "private",
129310
+ "default": "false"
129319
129311
  },
129320
129312
  {
129321
- "kind": "method",
129322
- "name": "renderIconName",
129323
- "privacy": "protected",
129324
- "return": {
129325
- "type": {
129326
- "text": "string"
129327
- }
129313
+ "kind": "field",
129314
+ "name": "borderless",
129315
+ "type": {
129316
+ "text": "boolean"
129328
129317
  },
129318
+ "privacy": "public",
129319
+ "default": "true",
129320
+ "description": "Whether to display the form field without a border.",
129321
+ "attribute": "borderless",
129322
+ "reflects": true,
129329
129323
  "inheritedFrom": {
129330
- "name": "SbbIconNameMixin",
129331
- "module": "icon/icon-name-mixin.js"
129324
+ "name": "SbbFormFieldElement",
129325
+ "module": "form-field/form-field/form-field.component.js"
129332
129326
  }
129333
129327
  },
129334
129328
  {
129335
129329
  "kind": "field",
129336
- "name": "size",
129330
+ "name": "floatingLabel",
129337
129331
  "type": {
129338
- "text": "SbbButtonSize"
129332
+ "text": "boolean"
129339
129333
  },
129340
129334
  "privacy": "public",
129341
- "description": "Size variant, either l, m or s.",
129342
- "default": "'l' / 's' (lean)",
129343
- "attribute": "size",
129335
+ "default": "true",
129336
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
129337
+ "attribute": "floating-label",
129344
129338
  "reflects": true,
129345
129339
  "inheritedFrom": {
129346
- "name": "SbbButtonCommonElementMixin",
129347
- "module": "button/common/button-common.js"
129340
+ "name": "SbbFormFieldElement",
129341
+ "module": "form-field/form-field/form-field.component.js"
129348
129342
  }
129349
129343
  },
129350
129344
  {
129351
129345
  "kind": "field",
129352
- "name": "loading",
129346
+ "name": "width",
129353
129347
  "type": {
129354
- "text": "boolean"
129348
+ "text": "string"
129355
129349
  },
129356
129350
  "privacy": "public",
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",
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",
129360
129354
  "reflects": true,
129361
129355
  "inheritedFrom": {
129362
- "name": "SbbButtonCommonElementMixin",
129363
- "module": "button/common/button-common.js"
129356
+ "name": "SbbFormFieldElement",
129357
+ "module": "form-field/form-field/form-field.component.js"
129364
129358
  }
129365
129359
  },
129366
129360
  {
129367
- "kind": "method",
129368
- "name": "renderTemplate",
129369
- "privacy": "protected",
129370
- "return": {
129371
- "type": {
129372
- "text": "TemplateResult"
129373
- }
129361
+ "kind": "field",
129362
+ "name": "size",
129363
+ "type": {
129364
+ "text": "string"
129374
129365
  },
129375
- "description": "Override this method to render the component template.",
129366
+ "privacy": "public",
129367
+ "description": "Size variant, either l, m or s.",
129368
+ "default": "'l'",
129369
+ "attribute": "size",
129370
+ "reflects": true,
129376
129371
  "inheritedFrom": {
129377
- "name": "SbbActionBaseElement",
129378
- "module": "core/base-elements/action-base-element.js"
129372
+ "name": "SbbFormFieldElement",
129373
+ "module": "form-field/form-field/form-field.component.js"
129379
129374
  }
129380
129375
  },
129381
129376
  {
@@ -129396,631 +129391,584 @@
129396
129391
  },
129397
129392
  {
129398
129393
  "kind": "field",
129399
- "name": "iconName",
129394
+ "name": "_excludedFocusElements",
129400
129395
  "type": {
129401
- "text": "string"
129396
+ "text": "array"
129402
129397
  },
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",
129398
+ "privacy": "private",
129399
+ "readonly": true,
129400
+ "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
129407
129401
  "inheritedFrom": {
129408
- "name": "SbbIconNameMixin",
129409
- "module": "icon/icon-name-mixin.js"
129402
+ "name": "SbbFormFieldElement",
129403
+ "module": "form-field/form-field/form-field.component.js"
129410
129404
  }
129411
129405
  },
129412
129406
  {
129413
- "kind": "method",
129414
- "name": "renderIconSlot",
129415
- "privacy": "protected",
129416
- "return": {
129417
- "type": {
129418
- "text": "TemplateResult"
129419
- }
129407
+ "kind": "field",
129408
+ "name": "_floatingLabelSupportedInputElements",
129409
+ "type": {
129410
+ "text": "array"
129420
129411
  },
129421
- "parameters": [
129422
- {
129423
- "name": "classname",
129424
- "optional": true,
129425
- "type": {
129426
- "text": "string"
129427
- }
129428
- }
129429
- ],
129412
+ "privacy": "private",
129413
+ "readonly": true,
129414
+ "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
129430
129415
  "inheritedFrom": {
129431
- "name": "SbbIconNameMixin",
129432
- "module": "icon/icon-name-mixin.js"
129416
+ "name": "SbbFormFieldElement",
129417
+ "module": "form-field/form-field/form-field.component.js"
129433
129418
  }
129434
129419
  },
129435
129420
  {
129436
- "kind": "method",
129437
- "name": "_renderIconName",
129438
- "privacy": "private",
129439
- "return": {
129440
- "type": {
129441
- "text": "string"
129442
- }
129421
+ "kind": "field",
129422
+ "name": "_floatingLabelSupportedInputTypes",
129423
+ "type": {
129424
+ "text": "array"
129443
129425
  },
129426
+ "privacy": "private",
129427
+ "readonly": true,
129428
+ "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
129444
129429
  "inheritedFrom": {
129445
- "name": "SbbIconNameMixin",
129446
- "module": "icon/icon-name-mixin.js"
129430
+ "name": "SbbFormFieldElement",
129431
+ "module": "form-field/form-field/form-field.component.js"
129447
129432
  }
129448
129433
  },
129449
129434
  {
129450
129435
  "kind": "field",
129451
- "name": "disabledInteractive",
129436
+ "name": "errorSpace",
129452
129437
  "type": {
129453
- "text": "boolean"
129438
+ "text": "'none' | 'reserve'"
129454
129439
  },
129455
129440
  "privacy": "public",
129456
- "default": "false",
129457
- "description": "Whether the button should be aria-disabled but stay interactive.",
129458
- "attribute": "disabled-interactive",
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",
129459
129444
  "reflects": true,
129460
129445
  "inheritedFrom": {
129461
- "name": "SbbDisabledInteractiveMixin",
129462
- "module": "core/mixins/disabled-mixin.js"
129446
+ "name": "SbbFormFieldElement",
129447
+ "module": "form-field/form-field/form-field.component.js"
129463
129448
  }
129464
129449
  },
129465
129450
  {
129466
129451
  "kind": "field",
129467
- "name": "disabled",
129468
- "privacy": "public",
129469
- "description": "Whether the component is disabled.",
129470
- "default": "false",
129452
+ "name": "optional",
129471
129453
  "type": {
129472
129454
  "text": "boolean"
129473
129455
  },
129474
- "attribute": "disabled",
129475
- "reflects": true,
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",
129476
129461
  "inheritedFrom": {
129477
- "name": "SbbDisabledMixin",
129478
- "module": "core/mixins/disabled-mixin.js"
129462
+ "name": "SbbFormFieldElement",
129463
+ "module": "form-field/form-field/form-field.component.js"
129479
129464
  }
129480
129465
  },
129481
129466
  {
129482
129467
  "kind": "field",
129483
- "name": "#disabled",
129484
- "privacy": "private",
129468
+ "name": "hiddenLabel",
129485
129469
  "type": {
129486
129470
  "text": "boolean"
129487
129471
  },
129472
+ "privacy": "public",
129488
129473
  "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,
129489
129477
  "inheritedFrom": {
129490
- "name": "SbbDisabledMixin",
129491
- "module": "core/mixins/disabled-mixin.js"
129478
+ "name": "SbbFormFieldElement",
129479
+ "module": "form-field/form-field/form-field.component.js"
129492
129480
  }
129493
129481
  },
129494
129482
  {
129495
- "kind": "method",
129496
- "name": "isDisabledExternally",
129497
- "privacy": "protected",
129498
- "return": {
129499
- "type": {
129500
- "text": "boolean"
129501
- }
129483
+ "kind": "field",
129484
+ "name": "_errorElements",
129485
+ "type": {
129486
+ "text": "Element[]"
129502
129487
  },
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.",
129488
+ "privacy": "private",
129489
+ "default": "[]",
129490
+ "description": "It is used internally to get the `error` slot.",
129504
129491
  "inheritedFrom": {
129505
- "name": "SbbDisabledMixin",
129506
- "module": "core/mixins/disabled-mixin.js"
129492
+ "name": "SbbFormFieldElement",
129493
+ "module": "form-field/form-field/form-field.component.js"
129507
129494
  }
129508
129495
  },
129509
129496
  {
129510
129497
  "kind": "field",
129511
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
129498
+ "name": "_hintElements",
129512
129499
  "type": {
129513
- "text": "array"
129500
+ "text": "Element[]"
129514
129501
  },
129515
129502
  "privacy": "private",
129516
- "readonly": true,
129517
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
129503
+ "default": "[]",
129504
+ "description": "It is used internally to get the `hint` slot.",
129518
129505
  "inheritedFrom": {
129519
- "name": "SbbButtonBaseElement",
129520
- "module": "core/base-elements/button-base-element.js"
129506
+ "name": "SbbFormFieldElement",
129507
+ "module": "form-field/form-field/form-field.component.js"
129521
129508
  }
129522
129509
  },
129523
129510
  {
129524
129511
  "kind": "field",
129525
- "name": "value",
129512
+ "name": "_input",
129526
129513
  "type": {
129527
- "text": "string"
129514
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129528
129515
  },
129529
- "privacy": "public",
129516
+ "privacy": "private",
129517
+ "default": "null",
129518
+ "description": "Reference to the slotted input element.",
129530
129519
  "inheritedFrom": {
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"
129520
+ "name": "SbbFormFieldElement",
129521
+ "module": "form-field/form-field/form-field.component.js"
129522
+ }
129537
129523
  },
129538
129524
  {
129539
129525
  "kind": "field",
129540
- "name": "type",
129541
- "privacy": "public",
129542
- "description": "The type attribute to use for the button.",
129543
- "default": "'button'",
129526
+ "name": "_label",
129544
129527
  "type": {
129545
- "text": "SbbButtonType"
129528
+ "text": "HTMLLabelElement"
129546
129529
  },
129547
- "attribute": "type",
129530
+ "privacy": "private",
129531
+ "description": "Reference to the slotted label elements.",
129548
129532
  "inheritedFrom": {
129549
- "name": "SbbButtonBaseElement",
129550
- "module": "core/base-elements/button-base-element.js"
129533
+ "name": "SbbFormFieldElement",
129534
+ "module": "form-field/form-field/form-field.component.js"
129551
129535
  }
129552
129536
  },
129553
129537
  {
129554
129538
  "kind": "field",
129555
- "name": "form",
129539
+ "name": "inputElement",
129556
129540
  "type": {
129557
- "text": "HTMLFormElement | null"
129541
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129558
129542
  },
129559
129543
  "privacy": "public",
129560
- "description": "The `<form>` element to associate the button with.",
129544
+ "description": "Returns the input element.",
129545
+ "readonly": true,
129561
129546
  "inheritedFrom": {
129562
- "name": "SbbButtonBaseElement",
129563
- "module": "core/base-elements/button-base-element.js"
129564
- },
129565
- "attribute": "form"
129547
+ "name": "SbbFormFieldElement",
129548
+ "module": "form-field/form-field/form-field.component.js"
129549
+ }
129566
129550
  },
129567
129551
  {
129568
129552
  "kind": "field",
129569
- "name": "_formId",
129553
+ "name": "label",
129570
129554
  "type": {
129571
- "text": "string"
129555
+ "text": "HTMLLabelElement | null"
129572
129556
  },
129573
- "privacy": "private",
129574
- "default": "''",
129557
+ "privacy": "public",
129558
+ "description": "Reference to the slotted label.",
129559
+ "readonly": true,
129575
129560
  "inheritedFrom": {
129576
- "name": "SbbButtonBaseElement",
129577
- "module": "core/base-elements/button-base-element.js"
129561
+ "name": "SbbFormFieldElement",
129562
+ "module": "form-field/form-field/form-field.component.js"
129578
129563
  }
129579
129564
  },
129580
129565
  {
129581
129566
  "kind": "field",
129582
- "name": "_handleButtonClick",
129567
+ "name": "_language",
129583
129568
  "privacy": "private",
129569
+ "default": "new SbbLanguageController(this)",
129584
129570
  "inheritedFrom": {
129585
- "name": "SbbButtonBaseElement",
129586
- "module": "core/base-elements/button-base-element.js"
129571
+ "name": "SbbFormFieldElement",
129572
+ "module": "form-field/form-field/form-field.component.js"
129587
129573
  }
129588
129574
  },
129589
129575
  {
129590
- "kind": "method",
129591
- "name": "_requestSubmit",
129576
+ "kind": "field",
129577
+ "name": "_formFieldAttributeObserver",
129592
129578
  "privacy": "private",
129593
- "return": {
129594
- "type": {
129595
- "text": "void"
129596
- }
129597
- },
129598
- "parameters": [
129599
- {
129600
- "name": "form",
129601
- "type": {
129602
- "text": "HTMLFormElement"
129603
- }
129604
- }
129605
- ],
129579
+ "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
129606
129580
  "inheritedFrom": {
129607
- "name": "SbbButtonBaseElement",
129608
- "module": "core/base-elements/button-base-element.js"
129581
+ "name": "SbbFormFieldElement",
129582
+ "module": "form-field/form-field/form-field.component.js"
129609
129583
  }
129610
129584
  },
129611
129585
  {
129612
129586
  "kind": "field",
129613
- "name": "_formKeyDown",
129587
+ "name": "_inputFormAbortController",
129614
129588
  "privacy": "private",
129589
+ "default": "new AbortController()",
129615
129590
  "inheritedFrom": {
129616
- "name": "SbbButtonBaseElement",
129617
- "module": "core/base-elements/button-base-element.js"
129591
+ "name": "SbbFormFieldElement",
129592
+ "module": "form-field/form-field/form-field.component.js"
129618
129593
  }
129619
129594
  },
129620
129595
  {
129621
129596
  "kind": "field",
129622
- "name": "formAssociated",
129597
+ "name": "_control",
129623
129598
  "type": {
129624
- "text": "boolean"
129599
+ "text": "SbbFormFieldElementControl | null"
129625
129600
  },
129626
- "privacy": "public",
129627
- "static": true,
129628
- "default": "true",
129601
+ "privacy": "private",
129602
+ "default": "null",
129629
129603
  "inheritedFrom": {
129630
- "name": "SbbFormAssociatedMixin",
129631
- "module": "core/mixins/form-associated-mixin.js"
129604
+ "name": "SbbFormFieldElement",
129605
+ "module": "form-field/form-field/form-field.component.js"
129632
129606
  }
129633
129607
  },
129634
129608
  {
129635
129609
  "kind": "field",
129636
- "name": "name",
129637
- "privacy": "public",
129638
- "description": "Name of the form element. Will be read from name attribute.",
129610
+ "name": "_previousType",
129639
129611
  "type": {
129640
- "text": "string"
129612
+ "text": "string | null"
129641
129613
  },
129642
- "attribute": "name",
129614
+ "privacy": "private",
129615
+ "default": "null",
129643
129616
  "inheritedFrom": {
129644
- "name": "SbbFormAssociatedMixin",
129645
- "module": "core/mixins/form-associated-mixin.js"
129617
+ "name": "SbbFormFieldElement",
129618
+ "module": "form-field/form-field/form-field.component.js"
129646
129619
  }
129647
129620
  },
129648
129621
  {
129649
- "kind": "field",
129650
- "name": "validity",
129651
- "type": {
129652
- "text": "ValidityState"
129622
+ "kind": "method",
129623
+ "name": "_handleWrapperClick",
129624
+ "privacy": "private",
129625
+ "return": {
129626
+ "type": {
129627
+ "text": "void"
129628
+ }
129653
129629
  },
129654
- "privacy": "public",
129655
- "description": "Returns the ValidityState object for this element.",
129656
- "readonly": true,
129630
+ "parameters": [
129631
+ {
129632
+ "name": "event",
129633
+ "type": {
129634
+ "text": "MouseEvent"
129635
+ }
129636
+ }
129637
+ ],
129657
129638
  "inheritedFrom": {
129658
- "name": "SbbFormAssociatedMixin",
129659
- "module": "core/mixins/form-associated-mixin.js"
129639
+ "name": "SbbFormFieldElement",
129640
+ "module": "form-field/form-field/form-field.component.js"
129660
129641
  }
129661
129642
  },
129662
129643
  {
129663
- "kind": "field",
129664
- "name": "validationMessage",
129665
- "type": {
129666
- "text": "string"
129644
+ "kind": "method",
129645
+ "name": "_isElementFocusExcluded",
129646
+ "privacy": "private",
129647
+ "return": {
129648
+ "type": {
129649
+ "text": "boolean"
129650
+ }
129667
129651
  },
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,
129652
+ "parameters": [
129653
+ {
129654
+ "name": "event",
129655
+ "type": {
129656
+ "text": "Event"
129657
+ }
129658
+ }
129659
+ ],
129671
129660
  "inheritedFrom": {
129672
- "name": "SbbFormAssociatedMixin",
129673
- "module": "core/mixins/form-associated-mixin.js"
129661
+ "name": "SbbFormFieldElement",
129662
+ "module": "form-field/form-field/form-field.component.js"
129674
129663
  }
129675
129664
  },
129676
129665
  {
129677
- "kind": "field",
129678
- "name": "willValidate",
129679
- "type": {
129680
- "text": "boolean"
129666
+ "kind": "method",
129667
+ "name": "_onSlotLabelChange",
129668
+ "privacy": "private",
129669
+ "return": {
129670
+ "type": {
129671
+ "text": "void"
129672
+ }
129681
129673
  },
129682
- "privacy": "public",
129683
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
129684
- "readonly": true,
129685
129674
  "inheritedFrom": {
129686
- "name": "SbbFormAssociatedMixin",
129687
- "module": "core/mixins/form-associated-mixin.js"
129675
+ "name": "SbbFormFieldElement",
129676
+ "module": "form-field/form-field/form-field.component.js"
129688
129677
  }
129689
129678
  },
129690
129679
  {
129691
- "kind": "field",
129692
- "name": "_validityStates",
129680
+ "kind": "method",
129681
+ "name": "_onSlotInputChange",
129693
129682
  "privacy": "private",
129694
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
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.",
129695
129689
  "inheritedFrom": {
129696
- "name": "SbbFormAssociatedMixin",
129697
- "module": "core/mixins/form-associated-mixin.js"
129690
+ "name": "SbbFormFieldElement",
129691
+ "module": "form-field/form-field/form-field.component.js"
129698
129692
  }
129699
129693
  },
129700
129694
  {
129701
- "kind": "field",
129702
- "name": "formDisabled",
129703
- "type": {
129704
- "text": "boolean"
129695
+ "kind": "method",
129696
+ "name": "_assignSlots",
129697
+ "privacy": "private",
129698
+ "return": {
129699
+ "type": {
129700
+ "text": "void"
129701
+ }
129705
129702
  },
129706
- "privacy": "protected",
129707
- "default": "false",
129708
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
129709
129703
  "inheritedFrom": {
129710
- "name": "SbbFormAssociatedMixin",
129711
- "module": "core/mixins/form-associated-mixin.js"
129704
+ "name": "SbbFormFieldElement",
129705
+ "module": "form-field/form-field/form-field.component.js"
129712
129706
  }
129713
129707
  },
129714
129708
  {
129715
129709
  "kind": "method",
129716
- "name": "checkValidity",
129717
- "privacy": "public",
129710
+ "name": "_connectInputElement",
129711
+ "privacy": "private",
129718
129712
  "return": {
129719
129713
  "type": {
129720
- "text": "boolean"
129714
+ "text": "'changed' | 'no-input' | 'unchanged'"
129721
129715
  }
129722
129716
  },
129723
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
129724
129717
  "inheritedFrom": {
129725
- "name": "SbbFormAssociatedMixin",
129726
- "module": "core/mixins/form-associated-mixin.js"
129718
+ "name": "SbbFormFieldElement",
129719
+ "module": "form-field/form-field/form-field.component.js"
129727
129720
  }
129728
129721
  },
129729
129722
  {
129730
129723
  "kind": "method",
129731
- "name": "reportValidity",
129732
- "privacy": "public",
129724
+ "name": "_syncLabelInputReferences",
129725
+ "privacy": "private",
129733
129726
  "return": {
129734
129727
  "type": {
129735
- "text": "boolean"
129728
+ "text": "void"
129736
129729
  }
129737
129730
  },
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.",
129739
129731
  "inheritedFrom": {
129740
- "name": "SbbFormAssociatedMixin",
129741
- "module": "core/mixins/form-associated-mixin.js"
129732
+ "name": "SbbFormFieldElement",
129733
+ "module": "form-field/form-field/form-field.component.js"
129742
129734
  }
129743
129735
  },
129744
129736
  {
129745
129737
  "kind": "method",
129746
- "name": "setCustomValidity",
129747
- "privacy": "public",
129738
+ "name": "_isInputElement",
129739
+ "privacy": "private",
129748
129740
  "return": {
129749
129741
  "type": {
129750
- "text": "void"
129742
+ "text": "boolean"
129751
129743
  }
129752
129744
  },
129753
129745
  "parameters": [
129754
129746
  {
129755
- "name": "message",
129747
+ "name": "input",
129756
129748
  "type": {
129757
- "text": "string"
129749
+ "text": "Element"
129758
129750
  }
129759
129751
  }
129760
129752
  ],
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.",
129762
129753
  "inheritedFrom": {
129763
- "name": "SbbFormAssociatedMixin",
129764
- "module": "core/mixins/form-associated-mixin.js"
129754
+ "name": "SbbFormFieldElement",
129755
+ "module": "form-field/form-field/form-field.component.js"
129765
129756
  }
129766
129757
  },
129767
129758
  {
129768
129759
  "kind": "method",
129769
- "name": "_hasDisabledAncestor",
129760
+ "name": "_readInputState",
129770
129761
  "privacy": "private",
129771
129762
  "return": {
129772
129763
  "type": {
129773
- "text": "boolean"
129764
+ "text": "void"
129774
129765
  }
129775
129766
  },
129776
129767
  "inheritedFrom": {
129777
- "name": "SbbFormAssociatedMixin",
129778
- "module": "core/mixins/form-associated-mixin.js"
129768
+ "name": "SbbFormFieldElement",
129769
+ "module": "form-field/form-field/form-field.component.js"
129779
129770
  }
129780
129771
  },
129781
129772
  {
129782
129773
  "kind": "method",
129783
- "name": "updateFormValue",
129784
- "privacy": "protected",
129774
+ "name": "_registerInputFormListener",
129775
+ "privacy": "private",
129785
129776
  "return": {
129786
129777
  "type": {
129787
129778
  "text": "void"
129788
129779
  }
129789
129780
  },
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",
129791
129781
  "inheritedFrom": {
129792
- "name": "SbbFormAssociatedMixin",
129793
- "module": "core/mixins/form-associated-mixin.js"
129782
+ "name": "SbbFormFieldElement",
129783
+ "module": "form-field/form-field/form-field.component.js"
129794
129784
  }
129795
129785
  },
129796
129786
  {
129797
129787
  "kind": "method",
129798
- "name": "formState",
129799
- "privacy": "protected",
129788
+ "name": "_patchInputValue",
129789
+ "privacy": "private",
129800
129790
  "return": {
129801
129791
  "type": {
129802
- "text": "FormRestoreState"
129792
+ "text": "void"
129803
129793
  }
129804
129794
  },
129805
129795
  "inheritedFrom": {
129806
- "name": "SbbFormAssociatedMixin",
129807
- "module": "core/mixins/form-associated-mixin.js"
129796
+ "name": "SbbFormFieldElement",
129797
+ "module": "form-field/form-field/form-field.component.js"
129808
129798
  }
129809
129799
  },
129810
129800
  {
129811
129801
  "kind": "method",
129812
- "name": "setValidityFlag",
129813
- "privacy": "protected",
129802
+ "name": "_unpatchInputValue",
129803
+ "privacy": "private",
129814
129804
  "return": {
129815
129805
  "type": {
129816
129806
  "text": "void"
129817
129807
  }
129818
129808
  },
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).",
129841
129809
  "inheritedFrom": {
129842
- "name": "SbbFormAssociatedMixin",
129843
- "module": "core/mixins/form-associated-mixin.js"
129810
+ "name": "SbbFormFieldElement",
129811
+ "module": "form-field/form-field/form-field.component.js"
129844
129812
  }
129845
129813
  },
129846
129814
  {
129847
129815
  "kind": "method",
129848
- "name": "removeValidityFlag",
129849
- "privacy": "protected",
129816
+ "name": "_checkAndUpdateInputEmpty",
129817
+ "privacy": "private",
129850
129818
  "return": {
129851
129819
  "type": {
129852
129820
  "text": "void"
129853
129821
  }
129854
129822
  },
129855
- "parameters": [
129856
- {
129857
- "name": "flag",
129858
- "type": {
129859
- "text": "T"
129860
- }
129861
- }
129862
- ],
129863
- "description": "Removes the validity state flag entry and updates validity state.",
129864
129823
  "inheritedFrom": {
129865
- "name": "SbbFormAssociatedMixin",
129866
- "module": "core/mixins/form-associated-mixin.js"
129824
+ "name": "SbbFormFieldElement",
129825
+ "module": "form-field/form-field/form-field.component.js"
129867
129826
  }
129868
129827
  },
129869
129828
  {
129870
129829
  "kind": "method",
129871
- "name": "validate",
129872
- "privacy": "protected",
129830
+ "name": "_isInputEmpty",
129831
+ "privacy": "private",
129873
129832
  "return": {
129874
129833
  "type": {
129875
- "text": "void"
129834
+ "text": "boolean"
129876
129835
  }
129877
129836
  },
129878
- "description": "To be called whenever the current element needs to be validated.",
129879
129837
  "inheritedFrom": {
129880
- "name": "SbbFormAssociatedMixin",
129881
- "module": "core/mixins/form-associated-mixin.js"
129838
+ "name": "SbbFormFieldElement",
129839
+ "module": "form-field/form-field/form-field.component.js"
129882
129840
  }
129883
129841
  },
129884
129842
  {
129885
129843
  "kind": "method",
129886
- "name": "shouldValidate",
129887
- "privacy": "protected",
129844
+ "name": "_isInputValueEmpty",
129845
+ "privacy": "private",
129888
129846
  "return": {
129889
129847
  "type": {
129890
129848
  "text": "boolean"
129891
129849
  }
129892
129850
  },
129851
+ "inheritedFrom": {
129852
+ "name": "SbbFormFieldElement",
129853
+ "module": "form-field/form-field/form-field.component.js"
129854
+ }
129855
+ },
129856
+ {
129857
+ "kind": "method",
129858
+ "name": "_onSlotErrorChange",
129859
+ "privacy": "private",
129860
+ "return": {
129861
+ "type": {
129862
+ "text": "void"
129863
+ }
129864
+ },
129893
129865
  "parameters": [
129894
129866
  {
129895
- "name": "name",
129867
+ "name": "event",
129896
129868
  "type": {
129897
- "text": "PropertyKey | undefined"
129869
+ "text": "Event"
129898
129870
  }
129899
129871
  }
129900
129872
  ],
129901
- "description": "Whether validation should be run on a property change with the given name.",
129873
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
129902
129874
  "inheritedFrom": {
129903
- "name": "SbbFormAssociatedMixin",
129904
- "module": "core/mixins/form-associated-mixin.js"
129875
+ "name": "SbbFormFieldElement",
129876
+ "module": "form-field/form-field/form-field.component.js"
129905
129877
  }
129906
129878
  },
129907
129879
  {
129908
129880
  "kind": "method",
129909
- "name": "_setInternalValidity",
129881
+ "name": "_onSlotHintChange",
129910
129882
  "privacy": "private",
129911
129883
  "return": {
129912
129884
  "type": {
129913
129885
  "text": "void"
129914
129886
  }
129915
129887
  },
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.",
129941
129888
  "parameters": [
129942
129889
  {
129943
- "description": "The origin event.",
129944
- "name": "event"
129890
+ "name": "event",
129891
+ "type": {
129892
+ "text": "Event"
129893
+ }
129945
129894
  }
129946
129895
  ],
129896
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
129947
129897
  "inheritedFrom": {
129948
- "name": "SbbButtonLikeBaseElement",
129949
- "module": "core/base-elements/button-base-element.js"
129950
- }
129951
- },
129952
- {
129953
- "kind": "field",
129954
- "name": "_removeActiveMarker",
129955
- "privacy": "private",
129956
- "inheritedFrom": {
129957
- "name": "SbbButtonLikeBaseElement",
129958
- "module": "core/base-elements/button-base-element.js"
129898
+ "name": "SbbFormFieldElement",
129899
+ "module": "form-field/form-field/form-field.component.js"
129959
129900
  }
129960
129901
  },
129961
129902
  {
129962
- "kind": "field",
129963
- "name": "_dispatchClickEventOnSpaceKeyup",
129903
+ "kind": "method",
129904
+ "name": "_assignAriaDescribedByElements",
129964
129905
  "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"
129906
+ "return": {
129907
+ "type": {
129908
+ "text": "void"
129970
129909
  }
129971
- ],
129910
+ },
129972
129911
  "inheritedFrom": {
129973
- "name": "SbbButtonLikeBaseElement",
129974
- "module": "core/base-elements/button-base-element.js"
129912
+ "name": "SbbFormFieldElement",
129913
+ "module": "form-field/form-field/form-field.component.js"
129975
129914
  }
129976
129915
  },
129977
129916
  {
129978
- "kind": "field",
129979
- "name": "_dispatchClickEvent",
129980
- "privacy": "private",
129917
+ "kind": "method",
129918
+ "name": "reset",
129919
+ "privacy": "public",
129920
+ "return": {
129921
+ "type": {
129922
+ "text": "void"
129923
+ }
129924
+ },
129925
+ "description": "Manually reset the form field. Currently, this only resets the floating label.",
129981
129926
  "inheritedFrom": {
129982
- "name": "SbbButtonLikeBaseElement",
129983
- "module": "core/base-elements/button-base-element.js"
129927
+ "name": "SbbFormFieldElement",
129928
+ "module": "form-field/form-field/form-field.component.js"
129984
129929
  }
129985
129930
  },
129986
129931
  {
129987
- "kind": "field",
129988
- "name": "maybeDisabled",
129989
- "type": {
129990
- "text": "boolean | undefined"
129932
+ "kind": "method",
129933
+ "name": "clear",
129934
+ "privacy": "public",
129935
+ "return": {
129936
+ "type": {
129937
+ "text": "void"
129938
+ }
129991
129939
  },
129992
- "privacy": "protected",
129993
- "readonly": true,
129940
+ "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
129994
129941
  "inheritedFrom": {
129995
- "name": "SbbActionBaseElement",
129996
- "module": "core/base-elements/action-base-element.js"
129942
+ "name": "SbbFormFieldElement",
129943
+ "module": "form-field/form-field/form-field.component.js"
129997
129944
  }
129998
129945
  },
129999
129946
  {
130000
- "kind": "field",
130001
- "name": "maybeDisabledInteractive",
130002
- "type": {
130003
- "text": "boolean | undefined"
129947
+ "kind": "method",
129948
+ "name": "_syncNegative",
129949
+ "privacy": "private",
129950
+ "return": {
129951
+ "type": {
129952
+ "text": "void"
129953
+ }
130004
129954
  },
130005
- "privacy": "protected",
130006
- "readonly": true,
130007
129955
  "inheritedFrom": {
130008
- "name": "SbbActionBaseElement",
130009
- "module": "core/base-elements/action-base-element.js"
129956
+ "name": "SbbFormFieldElement",
129957
+ "module": "form-field/form-field/form-field.component.js"
130010
129958
  }
130011
129959
  },
130012
129960
  {
130013
129961
  "kind": "method",
130014
- "name": "setupBaseEventHandlers",
130015
- "privacy": "protected",
129962
+ "name": "_syncSize",
129963
+ "privacy": "private",
130016
129964
  "return": {
130017
129965
  "type": {
130018
129966
  "text": "void"
130019
129967
  }
130020
129968
  },
130021
129969
  "inheritedFrom": {
130022
- "name": "SbbActionBaseElement",
130023
- "module": "core/base-elements/action-base-element.js"
129970
+ "name": "SbbFormFieldElement",
129971
+ "module": "form-field/form-field/form-field.component.js"
130024
129972
  }
130025
129973
  },
130026
129974
  {
@@ -130129,184 +130077,184 @@
130129
130077
  }
130130
130078
  }
130131
130079
  ],
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
- ],
130148
130080
  "superclass": {
130149
- "name": "SbbSecondaryButtonElement",
130150
- "module": "button.pure.js"
130081
+ "name": "SbbFormFieldElement",
130082
+ "module": "form-field.pure.js"
130151
130083
  },
130152
- "tagName": "sbb-timetable-form-swap-button",
130084
+ "tagName": "sbb-timetable-form-field",
130153
130085
  "customElement": true,
130154
130086
  "attributes": [
130155
130087
  {
130156
- "name": "size",
130088
+ "name": "negative",
130157
130089
  "type": {
130158
- "text": "SbbButtonSize"
130090
+ "text": "boolean"
130159
130091
  },
130160
- "description": "Size variant, either l, m or s.",
130161
- "default": "'l' / 's' (lean)",
130162
- "fieldName": "size",
130092
+ "default": "false",
130093
+ "description": "Negative coloring variant flag.",
130094
+ "fieldName": "negative",
130163
130095
  "inheritedFrom": {
130164
- "name": "SbbButtonCommonElementMixin",
130165
- "module": "button/common/button-common.js"
130096
+ "name": "SbbNegativeMixin",
130097
+ "module": "core/mixins/negative-mixin.js"
130166
130098
  }
130167
130099
  },
130168
130100
  {
130169
- "name": "loading",
130101
+ "name": "error-space",
130170
130102
  "type": {
130171
- "text": "boolean"
130103
+ "text": "'none' | 'reserve'"
130172
130104
  },
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",
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",
130176
130108
  "inheritedFrom": {
130177
- "name": "SbbButtonCommonElementMixin",
130178
- "module": "button/common/button-common.js"
130109
+ "name": "SbbFormFieldElement",
130110
+ "module": "form-field/form-field/form-field.component.js"
130179
130111
  }
130180
130112
  },
130181
130113
  {
130182
- "name": "negative",
130114
+ "name": "optional",
130183
130115
  "type": {
130184
130116
  "text": "boolean"
130185
130117
  },
130186
130118
  "default": "false",
130187
- "description": "Negative coloring variant flag.",
130188
- "fieldName": "negative",
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",
130189
130122
  "inheritedFrom": {
130190
- "name": "SbbNegativeMixin",
130191
- "module": "core/mixins/negative-mixin.js"
130123
+ "name": "SbbFormFieldElement",
130124
+ "module": "form-field/form-field/form-field.component.js"
130192
130125
  }
130193
130126
  },
130194
130127
  {
130195
- "name": "icon-name",
130128
+ "name": "size",
130196
130129
  "type": {
130197
- "text": "string"
130130
+ "text": "'l' | 'm' | 's'"
130198
130131
  },
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",
130132
+ "description": "Size variant, either l, m or s.",
130133
+ "default": "'m' / 's' (lean)",
130134
+ "fieldName": "size",
130202
130135
  "inheritedFrom": {
130203
- "name": "SbbIconNameMixin",
130204
- "module": "icon/icon-name-mixin.js"
130136
+ "name": "SbbFormFieldElement",
130137
+ "module": "form-field/form-field/form-field.component.js"
130205
130138
  }
130206
130139
  },
130207
130140
  {
130208
- "name": "disabled-interactive",
130141
+ "name": "borderless",
130209
130142
  "type": {
130210
130143
  "text": "boolean"
130211
130144
  },
130212
130145
  "default": "false",
130213
- "description": "Whether the button should be aria-disabled but stay interactive.",
130214
- "fieldName": "disabledInteractive",
130146
+ "description": "Whether to display the form field without a border.",
130147
+ "fieldName": "borderless",
130215
130148
  "inheritedFrom": {
130216
- "name": "SbbDisabledInteractiveMixin",
130217
- "module": "core/mixins/disabled-mixin.js"
130149
+ "name": "SbbFormFieldElement",
130150
+ "module": "form-field/form-field/form-field.component.js"
130218
130151
  }
130219
130152
  },
130220
130153
  {
130221
- "name": "disabled",
130222
- "description": "Whether the component is disabled.",
130223
- "default": "false",
130154
+ "name": "width",
130224
130155
  "type": {
130225
- "text": "boolean"
130156
+ "text": "'default' | 'collapse'"
130226
130157
  },
130227
- "fieldName": "disabled",
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",
130228
130161
  "inheritedFrom": {
130229
- "name": "SbbDisabledMixin",
130230
- "module": "core/mixins/disabled-mixin.js"
130162
+ "name": "SbbFormFieldElement",
130163
+ "module": "form-field/form-field/form-field.component.js"
130231
130164
  }
130232
130165
  },
130233
130166
  {
130234
- "name": "value",
130167
+ "name": "hidden-label",
130235
130168
  "type": {
130236
- "text": "string"
130169
+ "text": "boolean"
130237
130170
  },
130238
- "default": "''",
130239
- "description": "Value of the form element.",
130240
- "fieldName": "value",
130171
+ "default": "false",
130172
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130173
+ "fieldName": "hiddenLabel",
130241
130174
  "inheritedFrom": {
130242
- "name": "SbbButtonBaseElement",
130243
- "module": "core/base-elements/button-base-element.js"
130175
+ "name": "SbbFormFieldElement",
130176
+ "module": "form-field/form-field/form-field.component.js"
130244
130177
  }
130245
130178
  },
130246
130179
  {
130247
- "name": "type",
130248
- "description": "The type attribute to use for the button.",
130249
- "default": "'button'",
130180
+ "name": "floating-label",
130250
130181
  "type": {
130251
- "text": "SbbButtonType"
130182
+ "text": "boolean"
130252
130183
  },
130253
- "fieldName": "type",
130184
+ "default": "false",
130185
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
130186
+ "fieldName": "floatingLabel",
130254
130187
  "inheritedFrom": {
130255
- "name": "SbbButtonBaseElement",
130256
- "module": "core/base-elements/button-base-element.js"
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"
130257
130200
  }
130258
130201
  },
130259
130202
  {
130260
- "name": "form",
130261
- "description": "The `<form>` element to associate the button with.",
130262
- "type": {
130263
- "text": "HTMLFormElement | null"
130264
- },
130265
- "fieldName": "form",
130203
+ "description": "Use this slot to render a label.",
130204
+ "name": "label",
130266
130205
  "inheritedFrom": {
130267
- "name": "SbbButtonBaseElement",
130268
- "module": "core/base-elements/button-base-element.js"
130206
+ "name": "SbbFormFieldElement",
130207
+ "module": "form-field/form-field/form-field.component.js"
130269
130208
  }
130270
130209
  },
130271
130210
  {
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",
130211
+ "description": "Use this slot to render an icon on the left side of the input.",
130212
+ "name": "prefix",
130278
130213
  "inheritedFrom": {
130279
- "name": "SbbFormAssociatedMixin",
130280
- "module": "core/mixins/form-associated-mixin.js"
130214
+ "name": "SbbFormFieldElement",
130215
+ "module": "form-field/form-field/form-field.component.js"
130281
130216
  }
130282
- }
130283
- ],
130284
- "slots": [
130217
+ },
130285
130218
  {
130286
- "description": "Use the unnamed slot to add content to the secondary-button.",
130287
- "name": "",
130219
+ "description": "Use this slot to render an icon on the right side of the input.",
130220
+ "name": "suffix",
130288
130221
  "inheritedFrom": {
130289
- "name": "SbbSecondaryButtonElement",
130290
- "module": "button/secondary-button/secondary-button.component.js"
130222
+ "name": "SbbFormFieldElement",
130223
+ "module": "form-field/form-field/form-field.component.js"
130291
130224
  }
130292
130225
  },
130293
130226
  {
130294
- "description": "Slot used to display the icon, if one is set.",
130295
- "name": "icon",
130227
+ "description": "Use this slot to render an error.",
130228
+ "name": "error",
130296
130229
  "inheritedFrom": {
130297
- "name": "SbbSecondaryButtonElement",
130298
- "module": "button/secondary-button/secondary-button.component.js"
130230
+ "name": "SbbFormFieldElement",
130231
+ "module": "form-field/form-field/form-field.component.js"
130232
+ }
130233
+ },
130234
+ {
130235
+ "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
130236
+ "name": "hint",
130237
+ "inheritedFrom": {
130238
+ "name": "SbbFormFieldElement",
130239
+ "module": "form-field/form-field/form-field.component.js"
130299
130240
  }
130300
130241
  }
130301
130242
  ],
130302
130243
  "cssProperties": [
130303
130244
  {
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",
130245
+ "description": "To override the focus outline offset,",
130246
+ "name": "--sbb-form-field-outline-offset",
130307
130247
  "inheritedFrom": {
130308
- "name": "SbbSecondaryButtonElement",
130309
- "module": "button/secondary-button/secondary-button.component.js"
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",
130255
+ "inheritedFrom": {
130256
+ "name": "SbbFormFieldElement",
130257
+ "module": "form-field/form-field/form-field.component.js"
130310
130258
  }
130311
130259
  }
130312
130260
  ]
@@ -130315,22 +130263,22 @@
130315
130263
  "exports": [
130316
130264
  {
130317
130265
  "kind": "js",
130318
- "name": "SbbTimetableFormSwapButtonElement",
130266
+ "name": "SbbTimetableFormFieldElement",
130319
130267
  "declaration": {
130320
- "name": "SbbTimetableFormSwapButtonElement",
130321
- "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
130268
+ "name": "SbbTimetableFormFieldElement",
130269
+ "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
130322
130270
  }
130323
130271
  }
130324
130272
  ]
130325
130273
  },
130326
130274
  {
130327
130275
  "kind": "javascript-module",
130328
- "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
130276
+ "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
130329
130277
  "declarations": [
130330
130278
  {
130331
130279
  "kind": "class",
130332
- "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
130333
- "name": "SbbTimetableFormFieldElement",
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",
130334
130282
  "members": [
130335
130283
  {
130336
130284
  "kind": "field",
@@ -130341,681 +130289,733 @@
130341
130289
  "privacy": "public",
130342
130290
  "static": true,
130343
130291
  "readonly": true,
130344
- "default": "'sbb-timetable-form-field'",
130345
130292
  "inheritedFrom": {
130346
130293
  "name": "SbbElement",
130347
130294
  "module": "core/base-elements/element.js"
130348
- }
130349
- },
130350
- {
130351
- "kind": "field",
130352
- "name": "_routeIcon",
130353
- "type": {
130354
- "text": "boolean"
130355
130295
  },
130356
- "privacy": "private",
130357
- "default": "false"
130296
+ "default": "'sbb-timetable-form-swap-button'"
130358
130297
  },
130359
130298
  {
130360
130299
  "kind": "field",
130361
- "name": "borderless",
130362
- "type": {
130363
- "text": "boolean"
130364
- },
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
- }
130300
+ "name": "_languageController",
130301
+ "privacy": "private",
130302
+ "default": "new SbbLanguageController(this)"
130374
130303
  },
130375
130304
  {
130376
- "kind": "field",
130377
- "name": "floatingLabel",
130378
- "type": {
130379
- "text": "boolean"
130305
+ "kind": "method",
130306
+ "name": "_invertFieldValues",
130307
+ "privacy": "private",
130308
+ "return": {
130309
+ "type": {
130310
+ "text": "void"
130311
+ }
130380
130312
  },
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,
130386
- "inheritedFrom": {
130387
- "name": "SbbFormFieldElement",
130388
- "module": "form-field/form-field/form-field.component.js"
130389
- }
130313
+ "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
130390
130314
  },
130391
130315
  {
130392
- "kind": "field",
130393
- "name": "width",
130394
- "type": {
130395
- "text": "string"
130316
+ "kind": "method",
130317
+ "name": "renderIconName",
130318
+ "privacy": "protected",
130319
+ "return": {
130320
+ "type": {
130321
+ "text": "string"
130322
+ }
130396
130323
  },
130397
- "privacy": "public",
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",
130401
- "reflects": true,
130402
130324
  "inheritedFrom": {
130403
- "name": "SbbFormFieldElement",
130404
- "module": "form-field/form-field/form-field.component.js"
130325
+ "name": "SbbIconNameMixin",
130326
+ "module": "icon/icon-name-mixin.js"
130405
130327
  }
130406
130328
  },
130407
130329
  {
130408
130330
  "kind": "field",
130409
130331
  "name": "size",
130410
130332
  "type": {
130411
- "text": "string"
130333
+ "text": "SbbButtonSize"
130412
130334
  },
130413
130335
  "privacy": "public",
130414
130336
  "description": "Size variant, either l, m or s.",
130415
- "default": "'l'",
130337
+ "default": "'l' / 's' (lean)",
130416
130338
  "attribute": "size",
130417
130339
  "reflects": true,
130418
130340
  "inheritedFrom": {
130419
- "name": "SbbFormFieldElement",
130420
- "module": "form-field/form-field/form-field.component.js"
130341
+ "name": "SbbButtonCommonElementMixin",
130342
+ "module": "button/common/button-common.js"
130421
130343
  }
130422
130344
  },
130423
130345
  {
130424
130346
  "kind": "field",
130425
- "name": "negative",
130347
+ "name": "loading",
130426
130348
  "type": {
130427
130349
  "text": "boolean"
130428
130350
  },
130429
130351
  "privacy": "public",
130430
130352
  "default": "false",
130431
- "description": "Negative coloring variant flag.",
130432
- "attribute": "negative",
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",
130433
130355
  "reflects": true,
130434
130356
  "inheritedFrom": {
130435
- "name": "SbbNegativeMixin",
130436
- "module": "core/mixins/negative-mixin.js"
130357
+ "name": "SbbButtonCommonElementMixin",
130358
+ "module": "button/common/button-common.js"
130437
130359
  }
130438
130360
  },
130439
130361
  {
130440
- "kind": "field",
130441
- "name": "_excludedFocusElements",
130442
- "type": {
130443
- "text": "array"
130362
+ "kind": "method",
130363
+ "name": "renderTemplate",
130364
+ "privacy": "protected",
130365
+ "return": {
130366
+ "type": {
130367
+ "text": "TemplateResult"
130368
+ }
130444
130369
  },
130445
- "privacy": "private",
130446
- "readonly": true,
130447
- "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
130370
+ "description": "Override this method to render the component template.",
130448
130371
  "inheritedFrom": {
130449
- "name": "SbbFormFieldElement",
130450
- "module": "form-field/form-field/form-field.component.js"
130372
+ "name": "SbbActionBaseElement",
130373
+ "module": "core/base-elements/action-base-element.js"
130451
130374
  }
130452
130375
  },
130453
130376
  {
130454
130377
  "kind": "field",
130455
- "name": "_floatingLabelSupportedInputElements",
130378
+ "name": "negative",
130456
130379
  "type": {
130457
- "text": "array"
130380
+ "text": "boolean"
130458
130381
  },
130459
- "privacy": "private",
130460
- "readonly": true,
130461
- "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
130382
+ "privacy": "public",
130383
+ "default": "false",
130384
+ "description": "Negative coloring variant flag.",
130385
+ "attribute": "negative",
130386
+ "reflects": true,
130462
130387
  "inheritedFrom": {
130463
- "name": "SbbFormFieldElement",
130464
- "module": "form-field/form-field/form-field.component.js"
130388
+ "name": "SbbNegativeMixin",
130389
+ "module": "core/mixins/negative-mixin.js"
130465
130390
  }
130466
130391
  },
130467
130392
  {
130468
130393
  "kind": "field",
130469
- "name": "_floatingLabelSupportedInputTypes",
130394
+ "name": "iconName",
130470
130395
  "type": {
130471
- "text": "array"
130396
+ "text": "string"
130472
130397
  },
130473
- "privacy": "private",
130474
- "readonly": true,
130475
- "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
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",
130476
130402
  "inheritedFrom": {
130477
- "name": "SbbFormFieldElement",
130478
- "module": "form-field/form-field/form-field.component.js"
130403
+ "name": "SbbIconNameMixin",
130404
+ "module": "icon/icon-name-mixin.js"
130479
130405
  }
130480
130406
  },
130481
130407
  {
130482
- "kind": "field",
130483
- "name": "errorSpace",
130484
- "type": {
130485
- "text": "'none' | 'reserve'"
130408
+ "kind": "method",
130409
+ "name": "renderIconSlot",
130410
+ "privacy": "protected",
130411
+ "return": {
130412
+ "type": {
130413
+ "text": "TemplateResult"
130414
+ }
130486
130415
  },
130487
- "privacy": "public",
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",
130491
- "reflects": true,
130416
+ "parameters": [
130417
+ {
130418
+ "name": "classname",
130419
+ "optional": true,
130420
+ "type": {
130421
+ "text": "string"
130422
+ }
130423
+ }
130424
+ ],
130492
130425
  "inheritedFrom": {
130493
- "name": "SbbFormFieldElement",
130494
- "module": "form-field/form-field/form-field.component.js"
130426
+ "name": "SbbIconNameMixin",
130427
+ "module": "icon/icon-name-mixin.js"
130428
+ }
130429
+ },
130430
+ {
130431
+ "kind": "method",
130432
+ "name": "_renderIconName",
130433
+ "privacy": "private",
130434
+ "return": {
130435
+ "type": {
130436
+ "text": "string"
130437
+ }
130438
+ },
130439
+ "inheritedFrom": {
130440
+ "name": "SbbIconNameMixin",
130441
+ "module": "icon/icon-name-mixin.js"
130495
130442
  }
130496
130443
  },
130497
130444
  {
130498
130445
  "kind": "field",
130499
- "name": "optional",
130446
+ "name": "disabledInteractive",
130500
130447
  "type": {
130501
130448
  "text": "boolean"
130502
130449
  },
130503
130450
  "privacy": "public",
130504
130451
  "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",
130452
+ "description": "Whether the button should be aria-disabled but stay interactive.",
130453
+ "attribute": "disabled-interactive",
130454
+ "reflects": true,
130508
130455
  "inheritedFrom": {
130509
- "name": "SbbFormFieldElement",
130510
- "module": "form-field/form-field/form-field.component.js"
130456
+ "name": "SbbDisabledInteractiveMixin",
130457
+ "module": "core/mixins/disabled-mixin.js"
130511
130458
  }
130512
130459
  },
130513
130460
  {
130514
130461
  "kind": "field",
130515
- "name": "hiddenLabel",
130462
+ "name": "disabled",
130463
+ "privacy": "public",
130464
+ "description": "Whether the component is disabled.",
130465
+ "default": "false",
130516
130466
  "type": {
130517
130467
  "text": "boolean"
130518
130468
  },
130519
- "privacy": "public",
130520
- "default": "false",
130521
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130522
- "attribute": "hidden-label",
130469
+ "attribute": "disabled",
130523
130470
  "reflects": true,
130524
130471
  "inheritedFrom": {
130525
- "name": "SbbFormFieldElement",
130526
- "module": "form-field/form-field/form-field.component.js"
130472
+ "name": "SbbDisabledMixin",
130473
+ "module": "core/mixins/disabled-mixin.js"
130527
130474
  }
130528
130475
  },
130529
130476
  {
130530
130477
  "kind": "field",
130531
- "name": "_errorElements",
130478
+ "name": "#disabled",
130479
+ "privacy": "private",
130532
130480
  "type": {
130533
- "text": "Element[]"
130481
+ "text": "boolean"
130534
130482
  },
130535
- "privacy": "private",
130536
- "default": "[]",
130537
- "description": "It is used internally to get the `error` slot.",
130483
+ "default": "false",
130538
130484
  "inheritedFrom": {
130539
- "name": "SbbFormFieldElement",
130540
- "module": "form-field/form-field/form-field.component.js"
130485
+ "name": "SbbDisabledMixin",
130486
+ "module": "core/mixins/disabled-mixin.js"
130541
130487
  }
130542
130488
  },
130543
130489
  {
130544
- "kind": "field",
130545
- "name": "_hintElements",
130546
- "type": {
130547
- "text": "Element[]"
130490
+ "kind": "method",
130491
+ "name": "isDisabledExternally",
130492
+ "privacy": "protected",
130493
+ "return": {
130494
+ "type": {
130495
+ "text": "boolean"
130496
+ }
130548
130497
  },
130549
- "privacy": "private",
130550
- "default": "[]",
130551
- "description": "It is used internally to get the `hint` slot.",
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.",
130552
130499
  "inheritedFrom": {
130553
- "name": "SbbFormFieldElement",
130554
- "module": "form-field/form-field/form-field.component.js"
130500
+ "name": "SbbDisabledMixin",
130501
+ "module": "core/mixins/disabled-mixin.js"
130555
130502
  }
130556
130503
  },
130557
130504
  {
130558
130505
  "kind": "field",
130559
- "name": "_input",
130506
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
130560
130507
  "type": {
130561
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130508
+ "text": "array"
130562
130509
  },
130563
130510
  "privacy": "private",
130564
- "default": "null",
130565
- "description": "Reference to the slotted input element.",
130511
+ "readonly": true,
130512
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
130566
130513
  "inheritedFrom": {
130567
- "name": "SbbFormFieldElement",
130568
- "module": "form-field/form-field/form-field.component.js"
130514
+ "name": "SbbButtonBaseElement",
130515
+ "module": "core/base-elements/button-base-element.js"
130569
130516
  }
130570
130517
  },
130571
130518
  {
130572
130519
  "kind": "field",
130573
- "name": "_label",
130520
+ "name": "value",
130574
130521
  "type": {
130575
- "text": "HTMLLabelElement"
130522
+ "text": "string"
130576
130523
  },
130577
- "privacy": "private",
130578
- "description": "Reference to the slotted label elements.",
130524
+ "privacy": "public",
130579
130525
  "inheritedFrom": {
130580
- "name": "SbbFormFieldElement",
130581
- "module": "form-field/form-field/form-field.component.js"
130582
- }
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"
130583
130532
  },
130584
130533
  {
130585
130534
  "kind": "field",
130586
- "name": "inputElement",
130535
+ "name": "type",
130536
+ "privacy": "public",
130537
+ "description": "The type attribute to use for the button.",
130538
+ "default": "'button'",
130587
130539
  "type": {
130588
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130540
+ "text": "SbbButtonType"
130589
130541
  },
130590
- "privacy": "public",
130591
- "description": "Returns the input element.",
130592
- "readonly": true,
130542
+ "attribute": "type",
130593
130543
  "inheritedFrom": {
130594
- "name": "SbbFormFieldElement",
130595
- "module": "form-field/form-field/form-field.component.js"
130544
+ "name": "SbbButtonBaseElement",
130545
+ "module": "core/base-elements/button-base-element.js"
130596
130546
  }
130597
130547
  },
130598
130548
  {
130599
130549
  "kind": "field",
130600
- "name": "label",
130550
+ "name": "form",
130601
130551
  "type": {
130602
- "text": "HTMLLabelElement | null"
130552
+ "text": "HTMLFormElement | null"
130603
130553
  },
130604
130554
  "privacy": "public",
130605
- "description": "Reference to the slotted label.",
130606
- "readonly": true,
130555
+ "description": "The `<form>` element to associate the button with.",
130607
130556
  "inheritedFrom": {
130608
- "name": "SbbFormFieldElement",
130609
- "module": "form-field/form-field/form-field.component.js"
130610
- }
130557
+ "name": "SbbButtonBaseElement",
130558
+ "module": "core/base-elements/button-base-element.js"
130559
+ },
130560
+ "attribute": "form"
130611
130561
  },
130612
130562
  {
130613
130563
  "kind": "field",
130614
- "name": "_language",
130564
+ "name": "_formId",
130565
+ "type": {
130566
+ "text": "string"
130567
+ },
130615
130568
  "privacy": "private",
130616
- "default": "new SbbLanguageController(this)",
130569
+ "default": "''",
130617
130570
  "inheritedFrom": {
130618
- "name": "SbbFormFieldElement",
130619
- "module": "form-field/form-field/form-field.component.js"
130571
+ "name": "SbbButtonBaseElement",
130572
+ "module": "core/base-elements/button-base-element.js"
130620
130573
  }
130621
130574
  },
130622
130575
  {
130623
130576
  "kind": "field",
130624
- "name": "_formFieldAttributeObserver",
130577
+ "name": "_handleButtonClick",
130625
130578
  "privacy": "private",
130626
- "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
130627
130579
  "inheritedFrom": {
130628
- "name": "SbbFormFieldElement",
130629
- "module": "form-field/form-field/form-field.component.js"
130580
+ "name": "SbbButtonBaseElement",
130581
+ "module": "core/base-elements/button-base-element.js"
130630
130582
  }
130631
130583
  },
130632
130584
  {
130633
- "kind": "field",
130634
- "name": "_inputFormAbortController",
130585
+ "kind": "method",
130586
+ "name": "_requestSubmit",
130635
130587
  "privacy": "private",
130636
- "default": "new AbortController()",
130588
+ "return": {
130589
+ "type": {
130590
+ "text": "void"
130591
+ }
130592
+ },
130593
+ "parameters": [
130594
+ {
130595
+ "name": "form",
130596
+ "type": {
130597
+ "text": "HTMLFormElement"
130598
+ }
130599
+ }
130600
+ ],
130637
130601
  "inheritedFrom": {
130638
- "name": "SbbFormFieldElement",
130639
- "module": "form-field/form-field/form-field.component.js"
130602
+ "name": "SbbButtonBaseElement",
130603
+ "module": "core/base-elements/button-base-element.js"
130640
130604
  }
130641
130605
  },
130642
130606
  {
130643
130607
  "kind": "field",
130644
- "name": "_control",
130645
- "type": {
130646
- "text": "SbbFormFieldElementControl | null"
130647
- },
130608
+ "name": "_formKeyDown",
130648
130609
  "privacy": "private",
130649
- "default": "null",
130650
130610
  "inheritedFrom": {
130651
- "name": "SbbFormFieldElement",
130652
- "module": "form-field/form-field/form-field.component.js"
130611
+ "name": "SbbButtonBaseElement",
130612
+ "module": "core/base-elements/button-base-element.js"
130653
130613
  }
130654
130614
  },
130655
130615
  {
130656
130616
  "kind": "field",
130657
- "name": "_previousType",
130617
+ "name": "formAssociated",
130658
130618
  "type": {
130659
- "text": "string | null"
130619
+ "text": "boolean"
130660
130620
  },
130661
- "privacy": "private",
130662
- "default": "null",
130621
+ "privacy": "public",
130622
+ "static": true,
130623
+ "default": "true",
130663
130624
  "inheritedFrom": {
130664
- "name": "SbbFormFieldElement",
130665
- "module": "form-field/form-field/form-field.component.js"
130625
+ "name": "SbbFormAssociatedMixin",
130626
+ "module": "core/mixins/form-associated-mixin.js"
130666
130627
  }
130667
130628
  },
130668
130629
  {
130669
- "kind": "method",
130670
- "name": "_handleWrapperClick",
130671
- "privacy": "private",
130672
- "return": {
130673
- "type": {
130674
- "text": "void"
130675
- }
130630
+ "kind": "field",
130631
+ "name": "name",
130632
+ "privacy": "public",
130633
+ "description": "Name of the form element. Will be read from name attribute.",
130634
+ "type": {
130635
+ "text": "string"
130676
130636
  },
130677
- "parameters": [
130678
- {
130679
- "name": "event",
130680
- "type": {
130681
- "text": "MouseEvent"
130682
- }
130683
- }
130684
- ],
130637
+ "attribute": "name",
130685
130638
  "inheritedFrom": {
130686
- "name": "SbbFormFieldElement",
130687
- "module": "form-field/form-field/form-field.component.js"
130639
+ "name": "SbbFormAssociatedMixin",
130640
+ "module": "core/mixins/form-associated-mixin.js"
130688
130641
  }
130689
130642
  },
130690
130643
  {
130691
- "kind": "method",
130692
- "name": "_isElementFocusExcluded",
130693
- "privacy": "private",
130694
- "return": {
130695
- "type": {
130696
- "text": "boolean"
130697
- }
130644
+ "kind": "field",
130645
+ "name": "validity",
130646
+ "type": {
130647
+ "text": "ValidityState"
130698
130648
  },
130699
- "parameters": [
130700
- {
130701
- "name": "event",
130702
- "type": {
130703
- "text": "Event"
130704
- }
130705
- }
130706
- ],
130649
+ "privacy": "public",
130650
+ "description": "Returns the ValidityState object for this element.",
130651
+ "readonly": true,
130707
130652
  "inheritedFrom": {
130708
- "name": "SbbFormFieldElement",
130709
- "module": "form-field/form-field/form-field.component.js"
130653
+ "name": "SbbFormAssociatedMixin",
130654
+ "module": "core/mixins/form-associated-mixin.js"
130710
130655
  }
130711
130656
  },
130712
130657
  {
130713
- "kind": "method",
130714
- "name": "_onSlotLabelChange",
130715
- "privacy": "private",
130716
- "return": {
130717
- "type": {
130718
- "text": "void"
130719
- }
130658
+ "kind": "field",
130659
+ "name": "validationMessage",
130660
+ "type": {
130661
+ "text": "string"
130720
130662
  },
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,
130721
130666
  "inheritedFrom": {
130722
- "name": "SbbFormFieldElement",
130723
- "module": "form-field/form-field/form-field.component.js"
130667
+ "name": "SbbFormAssociatedMixin",
130668
+ "module": "core/mixins/form-associated-mixin.js"
130724
130669
  }
130725
130670
  },
130726
130671
  {
130727
- "kind": "method",
130728
- "name": "_onSlotInputChange",
130729
- "privacy": "private",
130730
- "return": {
130731
- "type": {
130732
- "text": "void"
130733
- }
130672
+ "kind": "field",
130673
+ "name": "willValidate",
130674
+ "type": {
130675
+ "text": "boolean"
130734
130676
  },
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.",
130677
+ "privacy": "public",
130678
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130679
+ "readonly": true,
130736
130680
  "inheritedFrom": {
130737
- "name": "SbbFormFieldElement",
130738
- "module": "form-field/form-field/form-field.component.js"
130681
+ "name": "SbbFormAssociatedMixin",
130682
+ "module": "core/mixins/form-associated-mixin.js"
130739
130683
  }
130740
130684
  },
130741
130685
  {
130742
- "kind": "method",
130743
- "name": "_assignSlots",
130686
+ "kind": "field",
130687
+ "name": "_validityStates",
130744
130688
  "privacy": "private",
130745
- "return": {
130746
- "type": {
130747
- "text": "void"
130748
- }
130689
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130690
+ "inheritedFrom": {
130691
+ "name": "SbbFormAssociatedMixin",
130692
+ "module": "core/mixins/form-associated-mixin.js"
130693
+ }
130694
+ },
130695
+ {
130696
+ "kind": "field",
130697
+ "name": "formDisabled",
130698
+ "type": {
130699
+ "text": "boolean"
130749
130700
  },
130701
+ "privacy": "protected",
130702
+ "default": "false",
130703
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130750
130704
  "inheritedFrom": {
130751
- "name": "SbbFormFieldElement",
130752
- "module": "form-field/form-field/form-field.component.js"
130705
+ "name": "SbbFormAssociatedMixin",
130706
+ "module": "core/mixins/form-associated-mixin.js"
130753
130707
  }
130754
130708
  },
130755
130709
  {
130756
130710
  "kind": "method",
130757
- "name": "_connectInputElement",
130758
- "privacy": "private",
130711
+ "name": "checkValidity",
130712
+ "privacy": "public",
130759
130713
  "return": {
130760
130714
  "type": {
130761
- "text": "'changed' | 'no-input' | 'unchanged'"
130715
+ "text": "boolean"
130762
130716
  }
130763
130717
  },
130718
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130764
130719
  "inheritedFrom": {
130765
- "name": "SbbFormFieldElement",
130766
- "module": "form-field/form-field/form-field.component.js"
130720
+ "name": "SbbFormAssociatedMixin",
130721
+ "module": "core/mixins/form-associated-mixin.js"
130767
130722
  }
130768
130723
  },
130769
130724
  {
130770
130725
  "kind": "method",
130771
- "name": "_syncLabelInputReferences",
130772
- "privacy": "private",
130726
+ "name": "reportValidity",
130727
+ "privacy": "public",
130773
130728
  "return": {
130774
130729
  "type": {
130775
- "text": "void"
130730
+ "text": "boolean"
130776
130731
  }
130777
130732
  },
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.",
130778
130734
  "inheritedFrom": {
130779
- "name": "SbbFormFieldElement",
130780
- "module": "form-field/form-field/form-field.component.js"
130735
+ "name": "SbbFormAssociatedMixin",
130736
+ "module": "core/mixins/form-associated-mixin.js"
130781
130737
  }
130782
130738
  },
130783
130739
  {
130784
130740
  "kind": "method",
130785
- "name": "_isInputElement",
130786
- "privacy": "private",
130741
+ "name": "setCustomValidity",
130742
+ "privacy": "public",
130787
130743
  "return": {
130788
130744
  "type": {
130789
- "text": "boolean"
130745
+ "text": "void"
130790
130746
  }
130791
130747
  },
130792
130748
  "parameters": [
130793
130749
  {
130794
- "name": "input",
130750
+ "name": "message",
130795
130751
  "type": {
130796
- "text": "Element"
130752
+ "text": "string"
130797
130753
  }
130798
130754
  }
130799
130755
  ],
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.",
130800
130757
  "inheritedFrom": {
130801
- "name": "SbbFormFieldElement",
130802
- "module": "form-field/form-field/form-field.component.js"
130758
+ "name": "SbbFormAssociatedMixin",
130759
+ "module": "core/mixins/form-associated-mixin.js"
130803
130760
  }
130804
130761
  },
130805
130762
  {
130806
130763
  "kind": "method",
130807
- "name": "_readInputState",
130764
+ "name": "_hasDisabledAncestor",
130808
130765
  "privacy": "private",
130809
130766
  "return": {
130810
130767
  "type": {
130811
- "text": "void"
130768
+ "text": "boolean"
130812
130769
  }
130813
130770
  },
130814
130771
  "inheritedFrom": {
130815
- "name": "SbbFormFieldElement",
130816
- "module": "form-field/form-field/form-field.component.js"
130772
+ "name": "SbbFormAssociatedMixin",
130773
+ "module": "core/mixins/form-associated-mixin.js"
130817
130774
  }
130818
130775
  },
130819
130776
  {
130820
130777
  "kind": "method",
130821
- "name": "_registerInputFormListener",
130822
- "privacy": "private",
130778
+ "name": "updateFormValue",
130779
+ "privacy": "protected",
130823
130780
  "return": {
130824
130781
  "type": {
130825
130782
  "text": "void"
130826
130783
  }
130827
130784
  },
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",
130828
130786
  "inheritedFrom": {
130829
- "name": "SbbFormFieldElement",
130830
- "module": "form-field/form-field/form-field.component.js"
130787
+ "name": "SbbFormAssociatedMixin",
130788
+ "module": "core/mixins/form-associated-mixin.js"
130831
130789
  }
130832
130790
  },
130833
130791
  {
130834
130792
  "kind": "method",
130835
- "name": "_patchInputValue",
130836
- "privacy": "private",
130793
+ "name": "formState",
130794
+ "privacy": "protected",
130837
130795
  "return": {
130838
130796
  "type": {
130839
- "text": "void"
130797
+ "text": "FormRestoreState"
130840
130798
  }
130841
130799
  },
130842
130800
  "inheritedFrom": {
130843
- "name": "SbbFormFieldElement",
130844
- "module": "form-field/form-field/form-field.component.js"
130801
+ "name": "SbbFormAssociatedMixin",
130802
+ "module": "core/mixins/form-associated-mixin.js"
130845
130803
  }
130846
130804
  },
130847
130805
  {
130848
130806
  "kind": "method",
130849
- "name": "_unpatchInputValue",
130850
- "privacy": "private",
130807
+ "name": "setValidityFlag",
130808
+ "privacy": "protected",
130851
130809
  "return": {
130852
130810
  "type": {
130853
130811
  "text": "void"
130854
130812
  }
130855
130813
  },
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).",
130856
130836
  "inheritedFrom": {
130857
- "name": "SbbFormFieldElement",
130858
- "module": "form-field/form-field/form-field.component.js"
130837
+ "name": "SbbFormAssociatedMixin",
130838
+ "module": "core/mixins/form-associated-mixin.js"
130859
130839
  }
130860
130840
  },
130861
130841
  {
130862
130842
  "kind": "method",
130863
- "name": "_checkAndUpdateInputEmpty",
130864
- "privacy": "private",
130843
+ "name": "removeValidityFlag",
130844
+ "privacy": "protected",
130865
130845
  "return": {
130866
130846
  "type": {
130867
130847
  "text": "void"
130868
130848
  }
130869
130849
  },
130870
- "inheritedFrom": {
130871
- "name": "SbbFormFieldElement",
130872
- "module": "form-field/form-field/form-field.component.js"
130873
- }
130874
- },
130875
- {
130876
- "kind": "method",
130877
- "name": "_isInputEmpty",
130878
- "privacy": "private",
130879
- "return": {
130880
- "type": {
130881
- "text": "boolean"
130850
+ "parameters": [
130851
+ {
130852
+ "name": "flag",
130853
+ "type": {
130854
+ "text": "T"
130855
+ }
130882
130856
  }
130883
- },
130857
+ ],
130858
+ "description": "Removes the validity state flag entry and updates validity state.",
130884
130859
  "inheritedFrom": {
130885
- "name": "SbbFormFieldElement",
130886
- "module": "form-field/form-field/form-field.component.js"
130860
+ "name": "SbbFormAssociatedMixin",
130861
+ "module": "core/mixins/form-associated-mixin.js"
130887
130862
  }
130888
130863
  },
130889
130864
  {
130890
130865
  "kind": "method",
130891
- "name": "_isInputValueEmpty",
130892
- "privacy": "private",
130866
+ "name": "validate",
130867
+ "privacy": "protected",
130893
130868
  "return": {
130894
130869
  "type": {
130895
- "text": "boolean"
130870
+ "text": "void"
130896
130871
  }
130897
130872
  },
130873
+ "description": "To be called whenever the current element needs to be validated.",
130898
130874
  "inheritedFrom": {
130899
- "name": "SbbFormFieldElement",
130900
- "module": "form-field/form-field/form-field.component.js"
130875
+ "name": "SbbFormAssociatedMixin",
130876
+ "module": "core/mixins/form-associated-mixin.js"
130901
130877
  }
130902
130878
  },
130903
130879
  {
130904
130880
  "kind": "method",
130905
- "name": "_onSlotErrorChange",
130906
- "privacy": "private",
130881
+ "name": "shouldValidate",
130882
+ "privacy": "protected",
130907
130883
  "return": {
130908
130884
  "type": {
130909
- "text": "void"
130885
+ "text": "boolean"
130910
130886
  }
130911
130887
  },
130912
130888
  "parameters": [
130913
130889
  {
130914
- "name": "event",
130890
+ "name": "name",
130915
130891
  "type": {
130916
- "text": "Event"
130892
+ "text": "PropertyKey | undefined"
130917
130893
  }
130918
130894
  }
130919
130895
  ],
130920
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
130896
+ "description": "Whether validation should be run on a property change with the given name.",
130921
130897
  "inheritedFrom": {
130922
- "name": "SbbFormFieldElement",
130923
- "module": "form-field/form-field/form-field.component.js"
130898
+ "name": "SbbFormAssociatedMixin",
130899
+ "module": "core/mixins/form-associated-mixin.js"
130924
130900
  }
130925
130901
  },
130926
130902
  {
130927
130903
  "kind": "method",
130928
- "name": "_onSlotHintChange",
130904
+ "name": "_setInternalValidity",
130929
130905
  "privacy": "private",
130930
130906
  "return": {
130931
130907
  "type": {
130932
130908
  "text": "void"
130933
130909
  }
130934
130910
  },
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.",
130935
130936
  "parameters": [
130936
130937
  {
130937
- "name": "event",
130938
- "type": {
130939
- "text": "Event"
130940
- }
130938
+ "description": "The origin event.",
130939
+ "name": "event"
130941
130940
  }
130942
130941
  ],
130943
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
130944
130942
  "inheritedFrom": {
130945
- "name": "SbbFormFieldElement",
130946
- "module": "form-field/form-field/form-field.component.js"
130943
+ "name": "SbbButtonLikeBaseElement",
130944
+ "module": "core/base-elements/button-base-element.js"
130947
130945
  }
130948
130946
  },
130949
130947
  {
130950
- "kind": "method",
130951
- "name": "_assignAriaDescribedByElements",
130948
+ "kind": "field",
130949
+ "name": "_removeActiveMarker",
130952
130950
  "privacy": "private",
130953
- "return": {
130954
- "type": {
130955
- "text": "void"
130956
- }
130957
- },
130958
130951
  "inheritedFrom": {
130959
- "name": "SbbFormFieldElement",
130960
- "module": "form-field/form-field/form-field.component.js"
130952
+ "name": "SbbButtonLikeBaseElement",
130953
+ "module": "core/base-elements/button-base-element.js"
130961
130954
  }
130962
130955
  },
130963
130956
  {
130964
- "kind": "method",
130965
- "name": "reset",
130966
- "privacy": "public",
130967
- "return": {
130968
- "type": {
130969
- "text": "void"
130957
+ "kind": "field",
130958
+ "name": "_dispatchClickEventOnSpaceKeyup",
130959
+ "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"
130970
130965
  }
130971
- },
130972
- "description": "Manually reset the form field. Currently, this only resets the floating label.",
130966
+ ],
130973
130967
  "inheritedFrom": {
130974
- "name": "SbbFormFieldElement",
130975
- "module": "form-field/form-field/form-field.component.js"
130968
+ "name": "SbbButtonLikeBaseElement",
130969
+ "module": "core/base-elements/button-base-element.js"
130970
+ }
130971
+ },
130972
+ {
130973
+ "kind": "field",
130974
+ "name": "_dispatchClickEvent",
130975
+ "privacy": "private",
130976
+ "inheritedFrom": {
130977
+ "name": "SbbButtonLikeBaseElement",
130978
+ "module": "core/base-elements/button-base-element.js"
130976
130979
  }
130977
130980
  },
130978
130981
  {
130979
- "kind": "method",
130980
- "name": "clear",
130981
- "privacy": "public",
130982
- "return": {
130983
- "type": {
130984
- "text": "void"
130985
- }
130982
+ "kind": "field",
130983
+ "name": "maybeDisabled",
130984
+ "type": {
130985
+ "text": "boolean | undefined"
130986
130986
  },
130987
- "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
130987
+ "privacy": "protected",
130988
+ "readonly": true,
130988
130989
  "inheritedFrom": {
130989
- "name": "SbbFormFieldElement",
130990
- "module": "form-field/form-field/form-field.component.js"
130990
+ "name": "SbbActionBaseElement",
130991
+ "module": "core/base-elements/action-base-element.js"
130991
130992
  }
130992
130993
  },
130993
130994
  {
130994
- "kind": "method",
130995
- "name": "_syncNegative",
130996
- "privacy": "private",
130997
- "return": {
130998
- "type": {
130999
- "text": "void"
131000
- }
130995
+ "kind": "field",
130996
+ "name": "maybeDisabledInteractive",
130997
+ "type": {
130998
+ "text": "boolean | undefined"
131001
130999
  },
131000
+ "privacy": "protected",
131001
+ "readonly": true,
131002
131002
  "inheritedFrom": {
131003
- "name": "SbbFormFieldElement",
131004
- "module": "form-field/form-field/form-field.component.js"
131003
+ "name": "SbbActionBaseElement",
131004
+ "module": "core/base-elements/action-base-element.js"
131005
131005
  }
131006
131006
  },
131007
131007
  {
131008
131008
  "kind": "method",
131009
- "name": "_syncSize",
131010
- "privacy": "private",
131009
+ "name": "setupBaseEventHandlers",
131010
+ "privacy": "protected",
131011
131011
  "return": {
131012
131012
  "type": {
131013
131013
  "text": "void"
131014
131014
  }
131015
131015
  },
131016
131016
  "inheritedFrom": {
131017
- "name": "SbbFormFieldElement",
131018
- "module": "form-field/form-field/form-field.component.js"
131017
+ "name": "SbbActionBaseElement",
131018
+ "module": "core/base-elements/action-base-element.js"
131019
131019
  }
131020
131020
  },
131021
131021
  {
@@ -131124,13 +131124,55 @@
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
+ ],
131127
131143
  "superclass": {
131128
- "name": "SbbFormFieldElement",
131129
- "module": "form-field.pure.js"
131144
+ "name": "SbbSecondaryButtonElement",
131145
+ "module": "button.pure.js"
131130
131146
  },
131131
- "tagName": "sbb-timetable-form-field",
131147
+ "tagName": "sbb-timetable-form-swap-button",
131132
131148
  "customElement": true,
131133
131149
  "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
+ },
131134
131176
  {
131135
131177
  "name": "negative",
131136
131178
  "type": {
@@ -131145,163 +131187,121 @@
131145
131187
  }
131146
131188
  },
131147
131189
  {
131148
- "name": "error-space",
131190
+ "name": "icon-name",
131149
131191
  "type": {
131150
- "text": "'none' | 'reserve'"
131192
+ "text": "string"
131151
131193
  },
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",
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",
131155
131197
  "inheritedFrom": {
131156
- "name": "SbbFormFieldElement",
131157
- "module": "form-field/form-field/form-field.component.js"
131198
+ "name": "SbbIconNameMixin",
131199
+ "module": "icon/icon-name-mixin.js"
131158
131200
  }
131159
131201
  },
131160
131202
  {
131161
- "name": "optional",
131203
+ "name": "disabled-interactive",
131162
131204
  "type": {
131163
131205
  "text": "boolean"
131164
131206
  },
131165
131207
  "default": "false",
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",
131208
+ "description": "Whether the button should be aria-disabled but stay interactive.",
131209
+ "fieldName": "disabledInteractive",
131169
131210
  "inheritedFrom": {
131170
- "name": "SbbFormFieldElement",
131171
- "module": "form-field/form-field/form-field.component.js"
131211
+ "name": "SbbDisabledInteractiveMixin",
131212
+ "module": "core/mixins/disabled-mixin.js"
131172
131213
  }
131173
131214
  },
131174
131215
  {
131175
- "name": "size",
131216
+ "name": "disabled",
131217
+ "description": "Whether the component is disabled.",
131218
+ "default": "false",
131176
131219
  "type": {
131177
- "text": "'l' | 'm' | 's'"
131220
+ "text": "boolean"
131178
131221
  },
131179
- "description": "Size variant, either l, m or s.",
131180
- "default": "'m' / 's' (lean)",
131181
- "fieldName": "size",
131222
+ "fieldName": "disabled",
131182
131223
  "inheritedFrom": {
131183
- "name": "SbbFormFieldElement",
131184
- "module": "form-field/form-field/form-field.component.js"
131224
+ "name": "SbbDisabledMixin",
131225
+ "module": "core/mixins/disabled-mixin.js"
131185
131226
  }
131186
131227
  },
131187
131228
  {
131188
- "name": "borderless",
131229
+ "name": "value",
131189
131230
  "type": {
131190
- "text": "boolean"
131231
+ "text": "string"
131191
131232
  },
131192
- "default": "false",
131193
- "description": "Whether to display the form field without a border.",
131194
- "fieldName": "borderless",
131233
+ "default": "''",
131234
+ "description": "Value of the form element.",
131235
+ "fieldName": "value",
131195
131236
  "inheritedFrom": {
131196
- "name": "SbbFormFieldElement",
131197
- "module": "form-field/form-field/form-field.component.js"
131237
+ "name": "SbbButtonBaseElement",
131238
+ "module": "core/base-elements/button-base-element.js"
131198
131239
  }
131199
131240
  },
131200
131241
  {
131201
- "name": "width",
131242
+ "name": "type",
131243
+ "description": "The type attribute to use for the button.",
131244
+ "default": "'button'",
131202
131245
  "type": {
131203
- "text": "'default' | 'collapse'"
131246
+ "text": "SbbButtonType"
131204
131247
  },
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",
131248
+ "fieldName": "type",
131208
131249
  "inheritedFrom": {
131209
- "name": "SbbFormFieldElement",
131210
- "module": "form-field/form-field/form-field.component.js"
131250
+ "name": "SbbButtonBaseElement",
131251
+ "module": "core/base-elements/button-base-element.js"
131211
131252
  }
131212
131253
  },
131213
131254
  {
131214
- "name": "hidden-label",
131255
+ "name": "form",
131256
+ "description": "The `<form>` element to associate the button with.",
131215
131257
  "type": {
131216
- "text": "boolean"
131258
+ "text": "HTMLFormElement | null"
131217
131259
  },
131218
- "default": "false",
131219
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
131220
- "fieldName": "hiddenLabel",
131260
+ "fieldName": "form",
131221
131261
  "inheritedFrom": {
131222
- "name": "SbbFormFieldElement",
131223
- "module": "form-field/form-field/form-field.component.js"
131262
+ "name": "SbbButtonBaseElement",
131263
+ "module": "core/base-elements/button-base-element.js"
131224
131264
  }
131225
131265
  },
131226
131266
  {
131227
- "name": "floating-label",
131267
+ "name": "name",
131268
+ "description": "Name of the form element. Will be read from name attribute.",
131228
131269
  "type": {
131229
- "text": "boolean"
131270
+ "text": "string"
131230
131271
  },
131231
- "default": "false",
131232
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
131233
- "fieldName": "floatingLabel",
131272
+ "fieldName": "name",
131234
131273
  "inheritedFrom": {
131235
- "name": "SbbFormFieldElement",
131236
- "module": "form-field/form-field/form-field.component.js"
131274
+ "name": "SbbFormAssociatedMixin",
131275
+ "module": "core/mixins/form-associated-mixin.js"
131237
131276
  }
131238
131277
  }
131239
131278
  ],
131240
131279
  "slots": [
131241
131280
  {
131242
- "description": "Use this slot to render an input/select or a supported non-native element.",
131281
+ "description": "Use the unnamed slot to add content to the secondary-button.",
131243
131282
  "name": "",
131244
131283
  "inheritedFrom": {
131245
- "name": "SbbFormFieldElement",
131246
- "module": "form-field/form-field/form-field.component.js"
131247
- }
131248
- },
131249
- {
131250
- "description": "Use this slot to render a label.",
131251
- "name": "label",
131252
- "inheritedFrom": {
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"
131284
+ "name": "SbbSecondaryButtonElement",
131285
+ "module": "button/secondary-button/secondary-button.component.js"
131279
131286
  }
131280
131287
  },
131281
131288
  {
131282
- "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
131283
- "name": "hint",
131289
+ "description": "Slot used to display the icon, if one is set.",
131290
+ "name": "icon",
131284
131291
  "inheritedFrom": {
131285
- "name": "SbbFormFieldElement",
131286
- "module": "form-field/form-field/form-field.component.js"
131292
+ "name": "SbbSecondaryButtonElement",
131293
+ "module": "button/secondary-button/secondary-button.component.js"
131287
131294
  }
131288
131295
  }
131289
131296
  ],
131290
131297
  "cssProperties": [
131291
131298
  {
131292
- "description": "To override the focus outline offset,",
131293
- "name": "--sbb-form-field-outline-offset",
131294
- "inheritedFrom": {
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",
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",
131302
131302
  "inheritedFrom": {
131303
- "name": "SbbFormFieldElement",
131304
- "module": "form-field/form-field/form-field.component.js"
131303
+ "name": "SbbSecondaryButtonElement",
131304
+ "module": "button/secondary-button/secondary-button.component.js"
131305
131305
  }
131306
131306
  }
131307
131307
  ]
@@ -131310,10 +131310,10 @@
131310
131310
  "exports": [
131311
131311
  {
131312
131312
  "kind": "js",
131313
- "name": "SbbTimetableFormFieldElement",
131313
+ "name": "SbbTimetableFormSwapButtonElement",
131314
131314
  "declaration": {
131315
- "name": "SbbTimetableFormFieldElement",
131316
- "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
131315
+ "name": "SbbTimetableFormSwapButtonElement",
131316
+ "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
131317
131317
  }
131318
131318
  }
131319
131319
  ]