@sbb-esta/lyne-elements 4.0.1 → 4.0.3

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 (27) hide show
  1. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  2. package/autocomplete/autocomplete-base-element.js +6 -5
  3. package/autocomplete/autocomplete.component.d.ts.map +1 -1
  4. package/autocomplete/autocomplete.component.js +8 -9
  5. package/calendar/calendar.component.d.ts +3 -0
  6. package/calendar/calendar.component.d.ts.map +1 -1
  7. package/calendar/calendar.component.js +89 -86
  8. package/core/styles/core.scss +7 -9
  9. package/core/styles/mixins/link.scss +4 -7
  10. package/core/styles/mixins/lists.scss +3 -3
  11. package/core/styles/mixins/pearl-chain-bullet.scss +3 -8
  12. package/core/styles/mixins/scrollbar.scss +1 -0
  13. package/core/styles/mixins/table.scss +15 -17
  14. package/custom-elements.json +1022 -1003
  15. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  16. package/development/autocomplete/autocomplete-base-element.js +7 -6
  17. package/development/autocomplete/autocomplete.component.d.ts.map +1 -1
  18. package/development/autocomplete/autocomplete.component.js +13 -15
  19. package/development/calendar/calendar.component.d.ts +3 -0
  20. package/development/calendar/calendar.component.d.ts.map +1 -1
  21. package/development/calendar/calendar.component.js +44 -35
  22. package/development/notification/notification.component.js +9 -11
  23. package/development/option/option/option-base-element.js +2 -2
  24. package/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
  25. package/notification/notification.component.js +1 -1
  26. package/option/option/option-base-element.js +1 -1
  27. package/package.json +1 -1
@@ -5014,6 +5014,15 @@
5014
5014
  "text": "boolean"
5015
5015
  }
5016
5016
  },
5017
+ {
5018
+ "kind": "field",
5019
+ "name": "_wideInternal",
5020
+ "type": {
5021
+ "text": "boolean"
5022
+ },
5023
+ "privacy": "private",
5024
+ "default": "false"
5025
+ },
5017
5026
  {
5018
5027
  "kind": "field",
5019
5028
  "name": "_calendarView",
@@ -5162,6 +5171,16 @@
5162
5171
  "default": "false",
5163
5172
  "description": "Whether the focus should be reset on focusCell."
5164
5173
  },
5174
+ {
5175
+ "kind": "field",
5176
+ "name": "_containingFocus",
5177
+ "type": {
5178
+ "text": "boolean"
5179
+ },
5180
+ "privacy": "private",
5181
+ "default": "false",
5182
+ "description": "Whether an element inside the calendar is currently focused."
5183
+ },
5165
5184
  {
5166
5185
  "kind": "field",
5167
5186
  "name": "_initialized",
@@ -5842,7 +5861,7 @@
5842
5861
  "privacy": "private",
5843
5862
  "return": {
5844
5863
  "type": {
5845
- "text": "HTMLButtonElement"
5864
+ "text": "HTMLButtonElement | null"
5846
5865
  }
5847
5866
  },
5848
5867
  "description": "Get the element in the calendar to assign focus."
@@ -76498,79 +76517,6 @@
76498
76517
  }
76499
76518
  ]
76500
76519
  },
76501
- {
76502
- "kind": "javascript-module",
76503
- "path": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js",
76504
- "declarations": [
76505
- {
76506
- "kind": "class",
76507
- "description": "This is the parent component to one or two `<sbb-icon-sidebar>`s and one `<sbb-icon-sidebar-content>` element.",
76508
- "name": "SbbIconSidebarContainerElement",
76509
- "slots": [
76510
- {
76511
- "description": "Use the unnamed slot to add `sbb-sidebar` and `sbb-sidebar-content` elements.",
76512
- "name": ""
76513
- }
76514
- ],
76515
- "members": [
76516
- {
76517
- "kind": "field",
76518
- "name": "sidebars",
76519
- "type": {
76520
- "text": "SbbIconSidebarElement[]"
76521
- },
76522
- "privacy": "public",
76523
- "description": "The icon-sidebar children.",
76524
- "readonly": true
76525
- },
76526
- {
76527
- "kind": "field",
76528
- "name": "start",
76529
- "type": {
76530
- "text": "SbbIconSidebarElement | null"
76531
- },
76532
- "privacy": "public",
76533
- "description": "The icon-sidebar child at the start position.",
76534
- "readonly": true
76535
- },
76536
- {
76537
- "kind": "field",
76538
- "name": "end",
76539
- "type": {
76540
- "text": "SbbIconSidebarElement | null"
76541
- },
76542
- "privacy": "public",
76543
- "description": "The icon-sidebar child at the end position.",
76544
- "readonly": true
76545
- }
76546
- ],
76547
- "superclass": {
76548
- "name": "LitElement",
76549
- "package": "lit"
76550
- },
76551
- "tagName": "sbb-icon-sidebar-container",
76552
- "customElement": true
76553
- }
76554
- ],
76555
- "exports": [
76556
- {
76557
- "kind": "js",
76558
- "name": "SbbIconSidebarContainerElement",
76559
- "declaration": {
76560
- "name": "SbbIconSidebarContainerElement",
76561
- "module": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js"
76562
- }
76563
- },
76564
- {
76565
- "kind": "custom-element-definition",
76566
- "name": "sbb-icon-sidebar-container",
76567
- "declaration": {
76568
- "name": "SbbIconSidebarContainerElement",
76569
- "module": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js"
76570
- }
76571
- }
76572
- ]
76573
- },
76574
76520
  {
76575
76521
  "kind": "javascript-module",
76576
76522
  "path": "icon-sidebar/icon-sidebar-button/icon-sidebar-button.component.js",
@@ -77312,6 +77258,79 @@
77312
77258
  }
77313
77259
  ]
77314
77260
  },
77261
+ {
77262
+ "kind": "javascript-module",
77263
+ "path": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js",
77264
+ "declarations": [
77265
+ {
77266
+ "kind": "class",
77267
+ "description": "This is the parent component to one or two `<sbb-icon-sidebar>`s and one `<sbb-icon-sidebar-content>` element.",
77268
+ "name": "SbbIconSidebarContainerElement",
77269
+ "slots": [
77270
+ {
77271
+ "description": "Use the unnamed slot to add `sbb-sidebar` and `sbb-sidebar-content` elements.",
77272
+ "name": ""
77273
+ }
77274
+ ],
77275
+ "members": [
77276
+ {
77277
+ "kind": "field",
77278
+ "name": "sidebars",
77279
+ "type": {
77280
+ "text": "SbbIconSidebarElement[]"
77281
+ },
77282
+ "privacy": "public",
77283
+ "description": "The icon-sidebar children.",
77284
+ "readonly": true
77285
+ },
77286
+ {
77287
+ "kind": "field",
77288
+ "name": "start",
77289
+ "type": {
77290
+ "text": "SbbIconSidebarElement | null"
77291
+ },
77292
+ "privacy": "public",
77293
+ "description": "The icon-sidebar child at the start position.",
77294
+ "readonly": true
77295
+ },
77296
+ {
77297
+ "kind": "field",
77298
+ "name": "end",
77299
+ "type": {
77300
+ "text": "SbbIconSidebarElement | null"
77301
+ },
77302
+ "privacy": "public",
77303
+ "description": "The icon-sidebar child at the end position.",
77304
+ "readonly": true
77305
+ }
77306
+ ],
77307
+ "superclass": {
77308
+ "name": "LitElement",
77309
+ "package": "lit"
77310
+ },
77311
+ "tagName": "sbb-icon-sidebar-container",
77312
+ "customElement": true
77313
+ }
77314
+ ],
77315
+ "exports": [
77316
+ {
77317
+ "kind": "js",
77318
+ "name": "SbbIconSidebarContainerElement",
77319
+ "declaration": {
77320
+ "name": "SbbIconSidebarContainerElement",
77321
+ "module": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js"
77322
+ }
77323
+ },
77324
+ {
77325
+ "kind": "custom-element-definition",
77326
+ "name": "sbb-icon-sidebar-container",
77327
+ "declaration": {
77328
+ "name": "SbbIconSidebarContainerElement",
77329
+ "module": "icon-sidebar/icon-sidebar-container/icon-sidebar-container.component.js"
77330
+ }
77331
+ }
77332
+ ]
77333
+ },
77315
77334
  {
77316
77335
  "kind": "javascript-module",
77317
77336
  "path": "icon-sidebar/icon-sidebar-content/icon-sidebar-content.component.js",
@@ -105551,84 +105570,89 @@
105551
105570
  },
105552
105571
  {
105553
105572
  "kind": "javascript-module",
105554
- "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
105573
+ "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
105555
105574
  "declarations": [
105556
105575
  {
105557
105576
  "kind": "class",
105558
- "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
105559
- "name": "SbbTimetableFormFieldElement",
105577
+ "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.",
105578
+ "name": "SbbTimetableFormSwapButtonElement",
105560
105579
  "members": [
105561
105580
  {
105562
105581
  "kind": "field",
105563
- "name": "_routeIcon",
105564
- "type": {
105565
- "text": "boolean"
105566
- },
105582
+ "name": "_languageController",
105567
105583
  "privacy": "private",
105568
- "default": "false"
105584
+ "default": "new SbbLanguageController(this)"
105569
105585
  },
105570
105586
  {
105571
- "kind": "field",
105572
- "name": "borderless",
105573
- "type": {
105574
- "text": "boolean"
105587
+ "kind": "method",
105588
+ "name": "_invertFieldValues",
105589
+ "privacy": "private",
105590
+ "return": {
105591
+ "type": {
105592
+ "text": "void"
105593
+ }
105594
+ },
105595
+ "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
105596
+ },
105597
+ {
105598
+ "kind": "method",
105599
+ "name": "renderIconName",
105600
+ "privacy": "protected",
105601
+ "return": {
105602
+ "type": {
105603
+ "text": "string"
105604
+ }
105575
105605
  },
105576
- "privacy": "public",
105577
- "default": "true",
105578
- "description": "Whether to display the form field without a border.",
105579
- "attribute": "borderless",
105580
- "reflects": true,
105581
105606
  "inheritedFrom": {
105582
- "name": "SbbFormFieldElement",
105583
- "module": "form-field/form-field/form-field.component.js"
105607
+ "name": "SbbIconNameMixin",
105608
+ "module": "icon/icon-name-mixin.js"
105584
105609
  }
105585
105610
  },
105586
105611
  {
105587
105612
  "kind": "field",
105588
- "name": "floatingLabel",
105613
+ "name": "size",
105589
105614
  "type": {
105590
- "text": "boolean"
105615
+ "text": "SbbButtonSize"
105591
105616
  },
105592
105617
  "privacy": "public",
105593
- "default": "true",
105594
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
105595
- "attribute": "floating-label",
105618
+ "description": "Size variant, either l, m or s.",
105619
+ "default": "'l' / 's' (lean)",
105620
+ "attribute": "size",
105596
105621
  "reflects": true,
105597
105622
  "inheritedFrom": {
105598
- "name": "SbbFormFieldElement",
105599
- "module": "form-field/form-field/form-field.component.js"
105623
+ "name": "SbbButtonCommonElementMixin",
105624
+ "module": "button/common/button-common.js"
105600
105625
  }
105601
105626
  },
105602
105627
  {
105603
105628
  "kind": "field",
105604
- "name": "width",
105629
+ "name": "loading",
105605
105630
  "type": {
105606
- "text": "string"
105631
+ "text": "boolean"
105607
105632
  },
105608
105633
  "privacy": "public",
105609
- "default": "'collapse'",
105610
- "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.",
105611
- "attribute": "width",
105634
+ "default": "false",
105635
+ "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.",
105636
+ "attribute": "loading",
105612
105637
  "reflects": true,
105613
105638
  "inheritedFrom": {
105614
- "name": "SbbFormFieldElement",
105615
- "module": "form-field/form-field/form-field.component.js"
105639
+ "name": "SbbButtonCommonElementMixin",
105640
+ "module": "button/common/button-common.js"
105616
105641
  }
105617
105642
  },
105618
105643
  {
105619
- "kind": "field",
105620
- "name": "size",
105621
- "type": {
105622
- "text": "string"
105644
+ "kind": "method",
105645
+ "name": "renderTemplate",
105646
+ "privacy": "protected",
105647
+ "return": {
105648
+ "type": {
105649
+ "text": "TemplateResult"
105650
+ }
105623
105651
  },
105624
- "privacy": "public",
105625
- "description": "Size variant, either l, m or s.",
105626
- "default": "'l'",
105627
- "attribute": "size",
105628
- "reflects": true,
105652
+ "description": "Override this method to render the component template.",
105629
105653
  "inheritedFrom": {
105630
- "name": "SbbFormFieldElement",
105631
- "module": "form-field/form-field/form-field.component.js"
105654
+ "name": "SbbActionBaseElement",
105655
+ "module": "core/base-elements/action-base-element.js"
105632
105656
  }
105633
105657
  },
105634
105658
  {
@@ -105643,458 +105667,523 @@
105643
105667
  "attribute": "negative",
105644
105668
  "reflects": true,
105645
105669
  "inheritedFrom": {
105646
- "name": "SbbFormFieldElement",
105647
- "module": "form-field/form-field/form-field.component.js"
105670
+ "name": "SbbNegativeMixin",
105671
+ "module": "core/mixins/negative-mixin.js"
105672
+ }
105673
+ },
105674
+ {
105675
+ "kind": "field",
105676
+ "name": "iconName",
105677
+ "type": {
105678
+ "text": "string"
105679
+ },
105680
+ "privacy": "public",
105681
+ "default": "''",
105682
+ "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.",
105683
+ "attribute": "icon-name",
105684
+ "inheritedFrom": {
105685
+ "name": "SbbIconNameMixin",
105686
+ "module": "icon/icon-name-mixin.js"
105648
105687
  }
105649
105688
  },
105650
105689
  {
105651
105690
  "kind": "method",
105652
- "name": "toggleState",
105691
+ "name": "renderIconSlot",
105653
105692
  "privacy": "protected",
105654
105693
  "return": {
105655
105694
  "type": {
105656
- "text": "void"
105695
+ "text": "TemplateResult"
105657
105696
  }
105658
105697
  },
105659
105698
  "parameters": [
105660
105699
  {
105661
- "name": "value",
105662
- "type": {
105663
- "text": "string"
105664
- }
105665
- },
105666
- {
105667
- "name": "force",
105700
+ "name": "classname",
105668
105701
  "optional": true,
105669
105702
  "type": {
105670
- "text": "boolean"
105703
+ "text": "string"
105671
105704
  }
105672
105705
  }
105673
105706
  ],
105674
105707
  "inheritedFrom": {
105675
- "name": "SbbFormFieldElement",
105676
- "module": "form-field/form-field/form-field.component.js"
105708
+ "name": "SbbIconNameMixin",
105709
+ "module": "icon/icon-name-mixin.js"
105677
105710
  }
105678
105711
  },
105679
105712
  {
105680
- "kind": "field",
105681
- "name": "_hydrationRequired",
105682
- "type": {
105683
- "text": "boolean"
105684
- },
105713
+ "kind": "method",
105714
+ "name": "_renderIconName",
105685
105715
  "privacy": "private",
105686
- "default": "!!this.shadowRoot",
105716
+ "return": {
105717
+ "type": {
105718
+ "text": "string"
105719
+ }
105720
+ },
105687
105721
  "inheritedFrom": {
105688
- "name": "SbbFormFieldElement",
105689
- "module": "form-field/form-field/form-field.component.js"
105722
+ "name": "SbbIconNameMixin",
105723
+ "module": "icon/icon-name-mixin.js"
105690
105724
  }
105691
105725
  },
105692
105726
  {
105693
105727
  "kind": "field",
105694
- "name": "_hydrationComplete",
105695
- "privacy": "private",
105696
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
105728
+ "name": "disabledInteractive",
105729
+ "type": {
105730
+ "text": "boolean"
105731
+ },
105732
+ "privacy": "public",
105733
+ "default": "false",
105734
+ "description": "Whether the button should be aria-disabled but stay interactive.",
105735
+ "attribute": "disabled-interactive",
105736
+ "reflects": true,
105697
105737
  "inheritedFrom": {
105698
- "name": "SbbFormFieldElement",
105699
- "module": "form-field/form-field/form-field.component.js"
105738
+ "name": "SbbDisabledInteractiveMixin",
105739
+ "module": "core/mixins/disabled-mixin.js"
105700
105740
  }
105701
105741
  },
105702
105742
  {
105703
105743
  "kind": "field",
105704
- "name": "_resolveHydration",
105744
+ "name": "disabled",
105745
+ "privacy": "public",
105746
+ "description": "Whether the component is disabled.",
105747
+ "default": "false",
105705
105748
  "type": {
105706
- "text": "(hydrationRequired: boolean) => void"
105749
+ "text": "boolean"
105707
105750
  },
105708
- "privacy": "private",
105751
+ "attribute": "disabled",
105752
+ "reflects": true,
105709
105753
  "inheritedFrom": {
105710
- "name": "SbbFormFieldElement",
105711
- "module": "form-field/form-field/form-field.component.js"
105754
+ "name": "SbbDisabledMixin",
105755
+ "module": "core/mixins/disabled-mixin.js"
105712
105756
  }
105713
105757
  },
105714
105758
  {
105715
105759
  "kind": "field",
105716
- "name": "hydrationRequired",
105760
+ "name": "#disabled",
105761
+ "privacy": "private",
105717
105762
  "type": {
105718
105763
  "text": "boolean"
105719
105764
  },
105720
- "privacy": "protected",
105721
- "description": "Returns whether hydration is required and not completed.",
105722
- "readonly": true,
105765
+ "default": "false",
105723
105766
  "inheritedFrom": {
105724
- "name": "SbbFormFieldElement",
105725
- "module": "form-field/form-field/form-field.component.js"
105726
- },
105727
- "default": "!!this.shadowRoot"
105767
+ "name": "SbbDisabledMixin",
105768
+ "module": "core/mixins/disabled-mixin.js"
105769
+ }
105728
105770
  },
105729
105771
  {
105730
- "kind": "field",
105731
- "name": "_excludedFocusElements",
105732
- "type": {
105733
- "text": "array"
105772
+ "kind": "method",
105773
+ "name": "isDisabledExternally",
105774
+ "privacy": "protected",
105775
+ "return": {
105776
+ "type": {
105777
+ "text": "boolean"
105778
+ }
105734
105779
  },
105735
- "privacy": "private",
105736
- "readonly": true,
105737
- "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
105780
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
105738
105781
  "inheritedFrom": {
105739
- "name": "SbbFormFieldElement",
105740
- "module": "form-field/form-field/form-field.component.js"
105782
+ "name": "SbbDisabledMixin",
105783
+ "module": "core/mixins/disabled-mixin.js"
105741
105784
  }
105742
105785
  },
105743
105786
  {
105744
105787
  "kind": "field",
105745
- "name": "_floatingLabelSupportedInputElements",
105788
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
105746
105789
  "type": {
105747
105790
  "text": "array"
105748
105791
  },
105749
105792
  "privacy": "private",
105750
105793
  "readonly": true,
105751
- "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
105794
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
105752
105795
  "inheritedFrom": {
105753
- "name": "SbbFormFieldElement",
105754
- "module": "form-field/form-field/form-field.component.js"
105796
+ "name": "SbbButtonBaseElement",
105797
+ "module": "core/base-elements/button-base-element.js"
105755
105798
  }
105756
105799
  },
105757
105800
  {
105758
105801
  "kind": "field",
105759
- "name": "_floatingLabelSupportedInputTypes",
105802
+ "name": "value",
105760
105803
  "type": {
105761
- "text": "array"
105804
+ "text": "string"
105762
105805
  },
105763
- "privacy": "private",
105764
- "readonly": true,
105765
- "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
105806
+ "privacy": "public",
105766
105807
  "inheritedFrom": {
105767
- "name": "SbbFormFieldElement",
105768
- "module": "form-field/form-field/form-field.component.js"
105769
- }
105808
+ "name": "SbbButtonBaseElement",
105809
+ "module": "core/base-elements/button-base-element.js"
105810
+ },
105811
+ "default": "''",
105812
+ "description": "Value of the form element.",
105813
+ "attribute": "value"
105770
105814
  },
105771
105815
  {
105772
105816
  "kind": "field",
105773
- "name": "errorSpace",
105817
+ "name": "type",
105818
+ "privacy": "public",
105819
+ "description": "The type attribute to use for the button.",
105820
+ "default": "'button'",
105774
105821
  "type": {
105775
- "text": "'none' | 'reserve'"
105822
+ "text": "SbbButtonType"
105776
105823
  },
105777
- "privacy": "public",
105778
- "default": "'none'",
105779
- "description": "Whether to reserve space for an error message.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
105780
- "attribute": "error-space",
105781
- "reflects": true,
105824
+ "attribute": "type",
105782
105825
  "inheritedFrom": {
105783
- "name": "SbbFormFieldElement",
105784
- "module": "form-field/form-field/form-field.component.js"
105826
+ "name": "SbbButtonBaseElement",
105827
+ "module": "core/base-elements/button-base-element.js"
105785
105828
  }
105786
105829
  },
105787
105830
  {
105788
105831
  "kind": "field",
105789
- "name": "optional",
105832
+ "name": "form",
105790
105833
  "type": {
105791
- "text": "boolean"
105834
+ "text": "HTMLFormElement | null"
105792
105835
  },
105793
105836
  "privacy": "public",
105794
- "default": "false",
105795
- "description": "Indicates whether the input is optional.",
105796
- "attribute": "optional",
105837
+ "description": "The `<form>` element to associate the button with.",
105797
105838
  "inheritedFrom": {
105798
- "name": "SbbFormFieldElement",
105799
- "module": "form-field/form-field/form-field.component.js"
105800
- }
105839
+ "name": "SbbButtonBaseElement",
105840
+ "module": "core/base-elements/button-base-element.js"
105841
+ },
105842
+ "attribute": "form"
105801
105843
  },
105802
105844
  {
105803
105845
  "kind": "field",
105804
- "name": "hiddenLabel",
105846
+ "name": "_formId",
105805
105847
  "type": {
105806
- "text": "boolean"
105848
+ "text": "string"
105807
105849
  },
105808
- "privacy": "public",
105809
- "default": "false",
105810
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
105811
- "attribute": "hidden-label",
105812
- "reflects": true,
105850
+ "privacy": "private",
105851
+ "default": "''",
105813
105852
  "inheritedFrom": {
105814
- "name": "SbbFormFieldElement",
105815
- "module": "form-field/form-field/form-field.component.js"
105853
+ "name": "SbbButtonBaseElement",
105854
+ "module": "core/base-elements/button-base-element.js"
105816
105855
  }
105817
105856
  },
105818
105857
  {
105819
105858
  "kind": "field",
105820
- "name": "_errorElements",
105821
- "type": {
105822
- "text": "Element[]"
105823
- },
105859
+ "name": "_handleButtonClick",
105824
105860
  "privacy": "private",
105825
- "default": "[]",
105826
- "description": "It is used internally to get the `error` slot.",
105827
105861
  "inheritedFrom": {
105828
- "name": "SbbFormFieldElement",
105829
- "module": "form-field/form-field/form-field.component.js"
105862
+ "name": "SbbButtonBaseElement",
105863
+ "module": "core/base-elements/button-base-element.js"
105830
105864
  }
105831
105865
  },
105832
105866
  {
105833
- "kind": "field",
105834
- "name": "_input",
105835
- "type": {
105836
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
105837
- },
105867
+ "kind": "method",
105868
+ "name": "_requestSubmit",
105838
105869
  "privacy": "private",
105839
- "default": "null",
105840
- "description": "Reference to the slotted input element.",
105870
+ "return": {
105871
+ "type": {
105872
+ "text": "void"
105873
+ }
105874
+ },
105875
+ "parameters": [
105876
+ {
105877
+ "name": "form",
105878
+ "type": {
105879
+ "text": "HTMLFormElement"
105880
+ }
105881
+ }
105882
+ ],
105841
105883
  "inheritedFrom": {
105842
- "name": "SbbFormFieldElement",
105843
- "module": "form-field/form-field/form-field.component.js"
105884
+ "name": "SbbButtonBaseElement",
105885
+ "module": "core/base-elements/button-base-element.js"
105844
105886
  }
105845
105887
  },
105846
105888
  {
105847
105889
  "kind": "field",
105848
- "name": "_label",
105849
- "type": {
105850
- "text": "HTMLLabelElement"
105851
- },
105890
+ "name": "_formKeyDown",
105852
105891
  "privacy": "private",
105853
- "description": "Reference to the slotted label elements.",
105854
105892
  "inheritedFrom": {
105855
- "name": "SbbFormFieldElement",
105856
- "module": "form-field/form-field/form-field.component.js"
105893
+ "name": "SbbButtonBaseElement",
105894
+ "module": "core/base-elements/button-base-element.js"
105857
105895
  }
105858
105896
  },
105859
105897
  {
105860
105898
  "kind": "field",
105861
- "name": "inputElement",
105899
+ "name": "formAssociated",
105862
105900
  "type": {
105863
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
105901
+ "text": "boolean"
105864
105902
  },
105865
105903
  "privacy": "public",
105866
- "description": "Returns the input element.",
105867
- "readonly": true,
105904
+ "static": true,
105905
+ "default": "true",
105868
105906
  "inheritedFrom": {
105869
- "name": "SbbFormFieldElement",
105870
- "module": "form-field/form-field/form-field.component.js"
105907
+ "name": "SbbFormAssociatedMixin",
105908
+ "module": "core/mixins/form-associated-mixin.js"
105871
105909
  }
105872
105910
  },
105873
105911
  {
105874
105912
  "kind": "field",
105875
- "name": "_language",
105876
- "privacy": "private",
105877
- "default": "new SbbLanguageController(this)",
105878
- "inheritedFrom": {
105879
- "name": "SbbFormFieldElement",
105880
- "module": "form-field/form-field/form-field.component.js"
105881
- }
105913
+ "name": "name",
105914
+ "privacy": "public",
105915
+ "description": "Name of the form element. Will be read from name attribute.",
105916
+ "type": {
105917
+ "text": "string"
105918
+ },
105919
+ "attribute": "name",
105920
+ "inheritedFrom": {
105921
+ "name": "SbbFormAssociatedMixin",
105922
+ "module": "core/mixins/form-associated-mixin.js"
105923
+ }
105882
105924
  },
105883
105925
  {
105884
105926
  "kind": "field",
105885
- "name": "_formFieldAttributeObserver",
105886
- "privacy": "private",
105887
- "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
105927
+ "name": "validity",
105928
+ "type": {
105929
+ "text": "ValidityState"
105930
+ },
105931
+ "privacy": "public",
105932
+ "description": "Returns the ValidityState object for this element.",
105933
+ "readonly": true,
105888
105934
  "inheritedFrom": {
105889
- "name": "SbbFormFieldElement",
105890
- "module": "form-field/form-field/form-field.component.js"
105935
+ "name": "SbbFormAssociatedMixin",
105936
+ "module": "core/mixins/form-associated-mixin.js"
105891
105937
  }
105892
105938
  },
105893
105939
  {
105894
105940
  "kind": "field",
105895
- "name": "_inputFormAbortController",
105896
- "privacy": "private",
105897
- "default": "new AbortController()",
105941
+ "name": "validationMessage",
105942
+ "type": {
105943
+ "text": "string"
105944
+ },
105945
+ "privacy": "public",
105946
+ "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.",
105947
+ "readonly": true,
105898
105948
  "inheritedFrom": {
105899
- "name": "SbbFormFieldElement",
105900
- "module": "form-field/form-field/form-field.component.js"
105949
+ "name": "SbbFormAssociatedMixin",
105950
+ "module": "core/mixins/form-associated-mixin.js"
105901
105951
  }
105902
105952
  },
105903
105953
  {
105904
105954
  "kind": "field",
105905
- "name": "_control",
105955
+ "name": "willValidate",
105906
105956
  "type": {
105907
- "text": "SbbFormFieldElementControl | null"
105957
+ "text": "boolean"
105908
105958
  },
105909
- "privacy": "private",
105910
- "default": "null",
105959
+ "privacy": "public",
105960
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
105961
+ "readonly": true,
105911
105962
  "inheritedFrom": {
105912
- "name": "SbbFormFieldElement",
105913
- "module": "form-field/form-field/form-field.component.js"
105963
+ "name": "SbbFormAssociatedMixin",
105964
+ "module": "core/mixins/form-associated-mixin.js"
105914
105965
  }
105915
105966
  },
105916
105967
  {
105917
- "kind": "method",
105918
- "name": "_handleWrapperClick",
105968
+ "kind": "field",
105969
+ "name": "_validityStates",
105919
105970
  "privacy": "private",
105920
- "return": {
105921
- "type": {
105922
- "text": "void"
105923
- }
105971
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
105972
+ "inheritedFrom": {
105973
+ "name": "SbbFormAssociatedMixin",
105974
+ "module": "core/mixins/form-associated-mixin.js"
105975
+ }
105976
+ },
105977
+ {
105978
+ "kind": "field",
105979
+ "name": "formDisabled",
105980
+ "type": {
105981
+ "text": "boolean"
105924
105982
  },
105925
- "parameters": [
105926
- {
105927
- "name": "event",
105928
- "type": {
105929
- "text": "MouseEvent"
105930
- }
105931
- }
105932
- ],
105983
+ "privacy": "protected",
105984
+ "default": "false",
105985
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
105933
105986
  "inheritedFrom": {
105934
- "name": "SbbFormFieldElement",
105935
- "module": "form-field/form-field/form-field.component.js"
105987
+ "name": "SbbFormAssociatedMixin",
105988
+ "module": "core/mixins/form-associated-mixin.js"
105936
105989
  }
105937
105990
  },
105938
105991
  {
105939
105992
  "kind": "method",
105940
- "name": "_isElementFocusExcluded",
105941
- "privacy": "private",
105993
+ "name": "checkValidity",
105994
+ "privacy": "public",
105942
105995
  "return": {
105943
105996
  "type": {
105944
105997
  "text": "boolean"
105945
105998
  }
105946
105999
  },
105947
- "parameters": [
105948
- {
105949
- "name": "event",
105950
- "type": {
105951
- "text": "Event"
105952
- }
105953
- }
105954
- ],
106000
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
105955
106001
  "inheritedFrom": {
105956
- "name": "SbbFormFieldElement",
105957
- "module": "form-field/form-field/form-field.component.js"
106002
+ "name": "SbbFormAssociatedMixin",
106003
+ "module": "core/mixins/form-associated-mixin.js"
105958
106004
  }
105959
106005
  },
105960
106006
  {
105961
106007
  "kind": "method",
105962
- "name": "_onSlotLabelChange",
105963
- "privacy": "private",
106008
+ "name": "reportValidity",
106009
+ "privacy": "public",
105964
106010
  "return": {
105965
106011
  "type": {
105966
- "text": "void"
106012
+ "text": "boolean"
105967
106013
  }
105968
106014
  },
106015
+ "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.",
105969
106016
  "inheritedFrom": {
105970
- "name": "SbbFormFieldElement",
105971
- "module": "form-field/form-field/form-field.component.js"
106017
+ "name": "SbbFormAssociatedMixin",
106018
+ "module": "core/mixins/form-associated-mixin.js"
105972
106019
  }
105973
106020
  },
105974
106021
  {
105975
106022
  "kind": "method",
105976
- "name": "_onSlotInputChange",
105977
- "privacy": "private",
106023
+ "name": "setCustomValidity",
106024
+ "privacy": "public",
105978
106025
  "return": {
105979
106026
  "type": {
105980
106027
  "text": "void"
105981
106028
  }
105982
106029
  },
105983
- "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
106030
+ "parameters": [
106031
+ {
106032
+ "name": "message",
106033
+ "type": {
106034
+ "text": "string"
106035
+ }
106036
+ }
106037
+ ],
106038
+ "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.",
105984
106039
  "inheritedFrom": {
105985
- "name": "SbbFormFieldElement",
105986
- "module": "form-field/form-field/form-field.component.js"
106040
+ "name": "SbbFormAssociatedMixin",
106041
+ "module": "core/mixins/form-associated-mixin.js"
105987
106042
  }
105988
106043
  },
105989
106044
  {
105990
106045
  "kind": "method",
105991
- "name": "_assignSlots",
106046
+ "name": "_hasDisabledAncestor",
105992
106047
  "privacy": "private",
105993
106048
  "return": {
105994
106049
  "type": {
105995
- "text": "void"
106050
+ "text": "boolean"
105996
106051
  }
105997
106052
  },
105998
106053
  "inheritedFrom": {
105999
- "name": "SbbFormFieldElement",
106000
- "module": "form-field/form-field/form-field.component.js"
106054
+ "name": "SbbFormAssociatedMixin",
106055
+ "module": "core/mixins/form-associated-mixin.js"
106001
106056
  }
106002
106057
  },
106003
106058
  {
106004
106059
  "kind": "method",
106005
- "name": "_connectInputElement",
106006
- "privacy": "private",
106060
+ "name": "updateFormValue",
106061
+ "privacy": "protected",
106007
106062
  "return": {
106008
106063
  "type": {
106009
- "text": "'changed' | 'no-input' | 'unchanged'"
106064
+ "text": "void"
106010
106065
  }
106011
106066
  },
106067
+ "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",
106012
106068
  "inheritedFrom": {
106013
- "name": "SbbFormFieldElement",
106014
- "module": "form-field/form-field/form-field.component.js"
106069
+ "name": "SbbFormAssociatedMixin",
106070
+ "module": "core/mixins/form-associated-mixin.js"
106015
106071
  }
106016
106072
  },
106017
106073
  {
106018
106074
  "kind": "method",
106019
- "name": "_syncLabelInputReferences",
106020
- "privacy": "private",
106075
+ "name": "formState",
106076
+ "privacy": "protected",
106021
106077
  "return": {
106022
106078
  "type": {
106023
- "text": "void"
106079
+ "text": "FormRestoreState"
106024
106080
  }
106025
106081
  },
106026
106082
  "inheritedFrom": {
106027
- "name": "SbbFormFieldElement",
106028
- "module": "form-field/form-field/form-field.component.js"
106083
+ "name": "SbbFormAssociatedMixin",
106084
+ "module": "core/mixins/form-associated-mixin.js"
106029
106085
  }
106030
106086
  },
106031
106087
  {
106032
106088
  "kind": "method",
106033
- "name": "_isInputElement",
106034
- "privacy": "private",
106089
+ "name": "setValidityFlag",
106090
+ "privacy": "protected",
106035
106091
  "return": {
106036
106092
  "type": {
106037
- "text": "boolean"
106093
+ "text": "void"
106038
106094
  }
106039
106095
  },
106040
106096
  "parameters": [
106041
106097
  {
106042
- "name": "input",
106098
+ "name": "flag",
106043
106099
  "type": {
106044
- "text": "Element"
106100
+ "text": "T"
106101
+ }
106102
+ },
106103
+ {
106104
+ "name": "message",
106105
+ "type": {
106106
+ "text": "string"
106107
+ }
106108
+ },
106109
+ {
106110
+ "name": "flagValue",
106111
+ "optional": true,
106112
+ "type": {
106113
+ "text": "ValidityStateFlags[T]"
106045
106114
  }
106046
106115
  }
106047
106116
  ],
106117
+ "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).",
106048
106118
  "inheritedFrom": {
106049
- "name": "SbbFormFieldElement",
106050
- "module": "form-field/form-field/form-field.component.js"
106119
+ "name": "SbbFormAssociatedMixin",
106120
+ "module": "core/mixins/form-associated-mixin.js"
106051
106121
  }
106052
106122
  },
106053
106123
  {
106054
106124
  "kind": "method",
106055
- "name": "_readInputState",
106056
- "privacy": "private",
106125
+ "name": "removeValidityFlag",
106126
+ "privacy": "protected",
106057
106127
  "return": {
106058
106128
  "type": {
106059
106129
  "text": "void"
106060
106130
  }
106061
106131
  },
106132
+ "parameters": [
106133
+ {
106134
+ "name": "flag",
106135
+ "type": {
106136
+ "text": "T"
106137
+ }
106138
+ }
106139
+ ],
106140
+ "description": "Removes the validity state flag entry and updates validity state.",
106062
106141
  "inheritedFrom": {
106063
- "name": "SbbFormFieldElement",
106064
- "module": "form-field/form-field/form-field.component.js"
106142
+ "name": "SbbFormAssociatedMixin",
106143
+ "module": "core/mixins/form-associated-mixin.js"
106065
106144
  }
106066
106145
  },
106067
106146
  {
106068
106147
  "kind": "method",
106069
- "name": "_registerInputFormListener",
106070
- "privacy": "private",
106148
+ "name": "validate",
106149
+ "privacy": "protected",
106071
106150
  "return": {
106072
106151
  "type": {
106073
106152
  "text": "void"
106074
106153
  }
106075
106154
  },
106155
+ "description": "To be called whenever the current element needs to be validated.",
106076
106156
  "inheritedFrom": {
106077
- "name": "SbbFormFieldElement",
106078
- "module": "form-field/form-field/form-field.component.js"
106157
+ "name": "SbbFormAssociatedMixin",
106158
+ "module": "core/mixins/form-associated-mixin.js"
106079
106159
  }
106080
106160
  },
106081
106161
  {
106082
106162
  "kind": "method",
106083
- "name": "_patchInputValue",
106084
- "privacy": "private",
106163
+ "name": "shouldValidate",
106164
+ "privacy": "protected",
106085
106165
  "return": {
106086
106166
  "type": {
106087
- "text": "void"
106167
+ "text": "boolean"
106088
106168
  }
106089
106169
  },
106170
+ "parameters": [
106171
+ {
106172
+ "name": "name",
106173
+ "type": {
106174
+ "text": "PropertyKey | undefined"
106175
+ }
106176
+ }
106177
+ ],
106178
+ "description": "Whether validation should be run on a property change with the given name.",
106090
106179
  "inheritedFrom": {
106091
- "name": "SbbFormFieldElement",
106092
- "module": "form-field/form-field/form-field.component.js"
106180
+ "name": "SbbFormAssociatedMixin",
106181
+ "module": "core/mixins/form-associated-mixin.js"
106093
106182
  }
106094
106183
  },
106095
106184
  {
106096
106185
  "kind": "method",
106097
- "name": "_unpatchInputValue",
106186
+ "name": "_setInternalValidity",
106098
106187
  "privacy": "private",
106099
106188
  "return": {
106100
106189
  "type": {
@@ -106102,317 +106191,307 @@
106102
106191
  }
106103
106192
  },
106104
106193
  "inheritedFrom": {
106105
- "name": "SbbFormFieldElement",
106106
- "module": "form-field/form-field/form-field.component.js"
106194
+ "name": "SbbFormAssociatedMixin",
106195
+ "module": "core/mixins/form-associated-mixin.js"
106107
106196
  }
106108
106197
  },
106109
106198
  {
106110
- "kind": "method",
106111
- "name": "_checkAndUpdateInputEmpty",
106112
- "privacy": "private",
106113
- "return": {
106114
- "type": {
106115
- "text": "void"
106116
- }
106199
+ "kind": "field",
106200
+ "name": "role",
106201
+ "type": {
106202
+ "text": "ElementInternals['role']"
106117
106203
  },
106204
+ "privacy": "public",
106205
+ "static": true,
106206
+ "readonly": true,
106207
+ "default": "'button'",
106118
106208
  "inheritedFrom": {
106119
- "name": "SbbFormFieldElement",
106120
- "module": "form-field/form-field/form-field.component.js"
106209
+ "name": "SbbButtonLikeBaseElement",
106210
+ "module": "core/base-elements/button-base-element.js"
106121
106211
  }
106122
106212
  },
106123
106213
  {
106124
- "kind": "method",
106125
- "name": "_isInputEmpty",
106214
+ "kind": "field",
106215
+ "name": "_preventScrollOnSpaceKeydown",
106126
106216
  "privacy": "private",
106127
- "return": {
106128
- "type": {
106129
- "text": "boolean"
106217
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
106218
+ "parameters": [
106219
+ {
106220
+ "description": "The origin event.",
106221
+ "name": "event"
106130
106222
  }
106131
- },
106223
+ ],
106132
106224
  "inheritedFrom": {
106133
- "name": "SbbFormFieldElement",
106134
- "module": "form-field/form-field/form-field.component.js"
106225
+ "name": "SbbButtonLikeBaseElement",
106226
+ "module": "core/base-elements/button-base-element.js"
106135
106227
  }
106136
106228
  },
106137
106229
  {
106138
- "kind": "method",
106139
- "name": "_isInputValueEmpty",
106230
+ "kind": "field",
106231
+ "name": "_removeActiveMarker",
106140
106232
  "privacy": "private",
106141
- "return": {
106142
- "type": {
106143
- "text": "boolean"
106144
- }
106145
- },
106146
106233
  "inheritedFrom": {
106147
- "name": "SbbFormFieldElement",
106148
- "module": "form-field/form-field/form-field.component.js"
106234
+ "name": "SbbButtonLikeBaseElement",
106235
+ "module": "core/base-elements/button-base-element.js"
106149
106236
  }
106150
106237
  },
106151
106238
  {
106152
- "kind": "method",
106153
- "name": "_onSlotErrorChange",
106239
+ "kind": "field",
106240
+ "name": "_dispatchClickEventOnSpaceKeyup",
106154
106241
  "privacy": "private",
106155
- "return": {
106156
- "type": {
106157
- "text": "void"
106158
- }
106159
- },
106242
+ "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.",
106160
106243
  "parameters": [
106161
106244
  {
106162
- "name": "event",
106163
- "type": {
106164
- "text": "Event"
106165
- }
106245
+ "description": "The origin event.",
106246
+ "name": "event"
106166
106247
  }
106167
106248
  ],
106168
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
106169
106249
  "inheritedFrom": {
106170
- "name": "SbbFormFieldElement",
106171
- "module": "form-field/form-field/form-field.component.js"
106250
+ "name": "SbbButtonLikeBaseElement",
106251
+ "module": "core/base-elements/button-base-element.js"
106172
106252
  }
106173
106253
  },
106174
106254
  {
106175
- "kind": "method",
106176
- "name": "_assignErrorMessageElements",
106255
+ "kind": "field",
106256
+ "name": "_dispatchClickEvent",
106177
106257
  "privacy": "private",
106178
- "return": {
106179
- "type": {
106180
- "text": "void"
106181
- }
106182
- },
106183
106258
  "inheritedFrom": {
106184
- "name": "SbbFormFieldElement",
106185
- "module": "form-field/form-field/form-field.component.js"
106259
+ "name": "SbbButtonLikeBaseElement",
106260
+ "module": "core/base-elements/button-base-element.js"
106186
106261
  }
106187
106262
  },
106188
106263
  {
106189
106264
  "kind": "method",
106190
- "name": "reset",
106191
- "privacy": "public",
106265
+ "name": "toggleState",
106266
+ "privacy": "protected",
106192
106267
  "return": {
106193
106268
  "type": {
106194
106269
  "text": "void"
106195
106270
  }
106196
106271
  },
106197
- "description": "Manually reset the form field. Currently, this only resets the floating label.",
106272
+ "parameters": [
106273
+ {
106274
+ "name": "value",
106275
+ "type": {
106276
+ "text": "string"
106277
+ }
106278
+ },
106279
+ {
106280
+ "name": "force",
106281
+ "optional": true,
106282
+ "type": {
106283
+ "text": "boolean"
106284
+ }
106285
+ }
106286
+ ],
106198
106287
  "inheritedFrom": {
106199
- "name": "SbbFormFieldElement",
106200
- "module": "form-field/form-field/form-field.component.js"
106288
+ "name": "SbbActionBaseElement",
106289
+ "module": "core/base-elements/action-base-element.js"
106201
106290
  }
106202
106291
  },
106203
106292
  {
106204
- "kind": "method",
106205
- "name": "clear",
106206
- "privacy": "public",
106207
- "return": {
106208
- "type": {
106209
- "text": "void"
106210
- }
106293
+ "kind": "field",
106294
+ "name": "maybeDisabled",
106295
+ "type": {
106296
+ "text": "boolean | undefined"
106211
106297
  },
106212
- "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
106298
+ "privacy": "protected",
106299
+ "readonly": true,
106213
106300
  "inheritedFrom": {
106214
- "name": "SbbFormFieldElement",
106215
- "module": "form-field/form-field/form-field.component.js"
106301
+ "name": "SbbActionBaseElement",
106302
+ "module": "core/base-elements/action-base-element.js"
106216
106303
  }
106217
106304
  },
106218
106305
  {
106219
- "kind": "method",
106220
- "name": "_syncNegative",
106221
- "privacy": "private",
106222
- "return": {
106223
- "type": {
106224
- "text": "void"
106225
- }
106306
+ "kind": "field",
106307
+ "name": "maybeDisabledInteractive",
106308
+ "type": {
106309
+ "text": "boolean | undefined"
106226
106310
  },
106311
+ "privacy": "protected",
106312
+ "readonly": true,
106227
106313
  "inheritedFrom": {
106228
- "name": "SbbFormFieldElement",
106229
- "module": "form-field/form-field/form-field.component.js"
106314
+ "name": "SbbActionBaseElement",
106315
+ "module": "core/base-elements/action-base-element.js"
106230
106316
  }
106231
106317
  },
106232
106318
  {
106233
106319
  "kind": "method",
106234
- "name": "_syncSize",
106235
- "privacy": "private",
106320
+ "name": "setupBaseEventHandlers",
106321
+ "privacy": "protected",
106236
106322
  "return": {
106237
106323
  "type": {
106238
106324
  "text": "void"
106239
106325
  }
106240
106326
  },
106241
106327
  "inheritedFrom": {
106242
- "name": "SbbFormFieldElement",
106243
- "module": "form-field/form-field/form-field.component.js"
106328
+ "name": "SbbActionBaseElement",
106329
+ "module": "core/base-elements/action-base-element.js"
106244
106330
  }
106245
106331
  }
106246
106332
  ],
106247
106333
  "superclass": {
106248
- "name": "SbbFormFieldElement",
106249
- "module": "form-field/form-field.js"
106334
+ "name": "SbbSecondaryButtonElement",
106335
+ "module": "button/secondary-button.js"
106250
106336
  },
106251
- "tagName": "sbb-timetable-form-field",
106337
+ "tagName": "sbb-timetable-form-swap-button",
106252
106338
  "customElement": true,
106253
106339
  "attributes": [
106254
106340
  {
106255
- "name": "negative",
106341
+ "name": "size",
106256
106342
  "type": {
106257
- "text": "boolean"
106343
+ "text": "SbbButtonSize"
106258
106344
  },
106259
- "default": "false",
106260
- "description": "Negative coloring variant flag.",
106261
- "fieldName": "negative",
106345
+ "description": "Size variant, either l, m or s.",
106346
+ "default": "'l' / 's' (lean)",
106347
+ "fieldName": "size",
106262
106348
  "inheritedFrom": {
106263
- "name": "SbbFormFieldElement",
106264
- "module": "form-field/form-field/form-field.component.js"
106349
+ "name": "SbbButtonCommonElementMixin",
106350
+ "module": "button/common/button-common.js"
106265
106351
  }
106266
106352
  },
106267
106353
  {
106268
- "name": "error-space",
106354
+ "name": "loading",
106269
106355
  "type": {
106270
- "text": "'none' | 'reserve'"
106356
+ "text": "boolean"
106271
106357
  },
106272
- "default": "'none'",
106273
- "description": "Whether to reserve space for an error message.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
106274
- "fieldName": "errorSpace",
106358
+ "default": "false",
106359
+ "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.",
106360
+ "fieldName": "loading",
106275
106361
  "inheritedFrom": {
106276
- "name": "SbbFormFieldElement",
106277
- "module": "form-field/form-field/form-field.component.js"
106362
+ "name": "SbbButtonCommonElementMixin",
106363
+ "module": "button/common/button-common.js"
106278
106364
  }
106279
106365
  },
106280
106366
  {
106281
- "name": "optional",
106367
+ "name": "negative",
106282
106368
  "type": {
106283
106369
  "text": "boolean"
106284
106370
  },
106285
106371
  "default": "false",
106286
- "description": "Indicates whether the input is optional.",
106287
- "fieldName": "optional",
106372
+ "description": "Negative coloring variant flag.",
106373
+ "fieldName": "negative",
106288
106374
  "inheritedFrom": {
106289
- "name": "SbbFormFieldElement",
106290
- "module": "form-field/form-field/form-field.component.js"
106375
+ "name": "SbbNegativeMixin",
106376
+ "module": "core/mixins/negative-mixin.js"
106291
106377
  }
106292
106378
  },
106293
106379
  {
106294
- "name": "size",
106380
+ "name": "icon-name",
106295
106381
  "type": {
106296
- "text": "'l' | 'm' | 's'"
106382
+ "text": "string"
106297
106383
  },
106298
- "description": "Size variant, either l, m or s.",
106299
- "default": "'m' / 's' (lean)",
106300
- "fieldName": "size",
106384
+ "default": "''",
106385
+ "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.",
106386
+ "fieldName": "iconName",
106301
106387
  "inheritedFrom": {
106302
- "name": "SbbFormFieldElement",
106303
- "module": "form-field/form-field/form-field.component.js"
106388
+ "name": "SbbIconNameMixin",
106389
+ "module": "icon/icon-name-mixin.js"
106304
106390
  }
106305
106391
  },
106306
106392
  {
106307
- "name": "borderless",
106393
+ "name": "disabled-interactive",
106308
106394
  "type": {
106309
106395
  "text": "boolean"
106310
106396
  },
106311
106397
  "default": "false",
106312
- "description": "Whether to display the form field without a border.",
106313
- "fieldName": "borderless",
106398
+ "description": "Whether the button should be aria-disabled but stay interactive.",
106399
+ "fieldName": "disabledInteractive",
106314
106400
  "inheritedFrom": {
106315
- "name": "SbbFormFieldElement",
106316
- "module": "form-field/form-field/form-field.component.js"
106401
+ "name": "SbbDisabledInteractiveMixin",
106402
+ "module": "core/mixins/disabled-mixin.js"
106317
106403
  }
106318
106404
  },
106319
106405
  {
106320
- "name": "width",
106406
+ "name": "disabled",
106407
+ "description": "Whether the component is disabled.",
106408
+ "default": "false",
106321
106409
  "type": {
106322
- "text": "'default' | 'collapse'"
106410
+ "text": "boolean"
106323
106411
  },
106324
- "default": "'default'",
106325
- "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.",
106326
- "fieldName": "width",
106412
+ "fieldName": "disabled",
106327
106413
  "inheritedFrom": {
106328
- "name": "SbbFormFieldElement",
106329
- "module": "form-field/form-field/form-field.component.js"
106414
+ "name": "SbbDisabledMixin",
106415
+ "module": "core/mixins/disabled-mixin.js"
106330
106416
  }
106331
106417
  },
106332
106418
  {
106333
- "name": "hidden-label",
106419
+ "name": "value",
106334
106420
  "type": {
106335
- "text": "boolean"
106421
+ "text": "string"
106336
106422
  },
106337
- "default": "false",
106338
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
106339
- "fieldName": "hiddenLabel",
106423
+ "default": "''",
106424
+ "description": "Value of the form element.",
106425
+ "fieldName": "value",
106340
106426
  "inheritedFrom": {
106341
- "name": "SbbFormFieldElement",
106342
- "module": "form-field/form-field/form-field.component.js"
106427
+ "name": "SbbButtonBaseElement",
106428
+ "module": "core/base-elements/button-base-element.js"
106343
106429
  }
106344
106430
  },
106345
106431
  {
106346
- "name": "floating-label",
106432
+ "name": "type",
106433
+ "description": "The type attribute to use for the button.",
106434
+ "default": "'button'",
106347
106435
  "type": {
106348
- "text": "boolean"
106436
+ "text": "SbbButtonType"
106349
106437
  },
106350
- "default": "false",
106351
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
106352
- "fieldName": "floatingLabel",
106353
- "inheritedFrom": {
106354
- "name": "SbbFormFieldElement",
106355
- "module": "form-field/form-field/form-field.component.js"
106356
- }
106357
- }
106358
- ],
106359
- "slots": [
106360
- {
106361
- "description": "Use this slot to render an input/select or a supported non-native element.",
106362
- "name": "",
106438
+ "fieldName": "type",
106363
106439
  "inheritedFrom": {
106364
- "name": "SbbFormFieldElement",
106365
- "module": "form-field/form-field/form-field.component.js"
106440
+ "name": "SbbButtonBaseElement",
106441
+ "module": "core/base-elements/button-base-element.js"
106366
106442
  }
106367
106443
  },
106368
106444
  {
106369
- "description": "Use this slot to render a label.",
106370
- "name": "label",
106445
+ "name": "form",
106446
+ "description": "The `<form>` element to associate the button with.",
106447
+ "type": {
106448
+ "text": "HTMLFormElement | null"
106449
+ },
106450
+ "fieldName": "form",
106371
106451
  "inheritedFrom": {
106372
- "name": "SbbFormFieldElement",
106373
- "module": "form-field/form-field/form-field.component.js"
106452
+ "name": "SbbButtonBaseElement",
106453
+ "module": "core/base-elements/button-base-element.js"
106374
106454
  }
106375
106455
  },
106376
106456
  {
106377
- "description": "Use this slot to render an icon on the left side of the input.",
106378
- "name": "prefix",
106457
+ "name": "name",
106458
+ "description": "Name of the form element. Will be read from name attribute.",
106459
+ "type": {
106460
+ "text": "string"
106461
+ },
106462
+ "fieldName": "name",
106379
106463
  "inheritedFrom": {
106380
- "name": "SbbFormFieldElement",
106381
- "module": "form-field/form-field/form-field.component.js"
106464
+ "name": "SbbFormAssociatedMixin",
106465
+ "module": "core/mixins/form-associated-mixin.js"
106382
106466
  }
106383
- },
106467
+ }
106468
+ ],
106469
+ "slots": [
106384
106470
  {
106385
- "description": "Use this slot to render an icon on the right side of the input.",
106386
- "name": "suffix",
106471
+ "description": "Use the unnamed slot to add content to the secondary-button.",
106472
+ "name": "",
106387
106473
  "inheritedFrom": {
106388
- "name": "SbbFormFieldElement",
106389
- "module": "form-field/form-field/form-field.component.js"
106474
+ "name": "SbbSecondaryButtonElement",
106475
+ "module": "button/secondary-button/secondary-button.component.js"
106390
106476
  }
106391
106477
  },
106392
106478
  {
106393
- "description": "Use this slot to render an error.",
106394
- "name": "error",
106479
+ "description": "Slot used to display the icon, if one is set.",
106480
+ "name": "icon",
106395
106481
  "inheritedFrom": {
106396
- "name": "SbbFormFieldElement",
106397
- "module": "form-field/form-field/form-field.component.js"
106482
+ "name": "SbbSecondaryButtonElement",
106483
+ "module": "button/secondary-button/secondary-button.component.js"
106398
106484
  }
106399
106485
  }
106400
106486
  ],
106401
106487
  "cssProperties": [
106402
106488
  {
106403
- "description": "To override the focus outline offset,",
106404
- "name": "--sbb-form-field-outline-offset",
106405
- "inheritedFrom": {
106406
- "name": "SbbFormFieldElement",
106407
- "module": "form-field/form-field/form-field.component.js"
106408
- }
106409
- },
106410
- {
106411
- "description": "To override the z-index of the focus underline effect,",
106412
- "name": "--sbb-form-field-focus-underline-z-index",
106489
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
106490
+ "name": "--sbb-button-loading-delay",
106491
+ "default": "300ms",
106413
106492
  "inheritedFrom": {
106414
- "name": "SbbFormFieldElement",
106415
- "module": "form-field/form-field/form-field.component.js"
106493
+ "name": "SbbSecondaryButtonElement",
106494
+ "module": "button/secondary-button/secondary-button.component.js"
106416
106495
  }
106417
106496
  }
106418
106497
  ]
@@ -106421,107 +106500,102 @@
106421
106500
  "exports": [
106422
106501
  {
106423
106502
  "kind": "js",
106424
- "name": "SbbTimetableFormFieldElement",
106503
+ "name": "SbbTimetableFormSwapButtonElement",
106425
106504
  "declaration": {
106426
- "name": "SbbTimetableFormFieldElement",
106427
- "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
106505
+ "name": "SbbTimetableFormSwapButtonElement",
106506
+ "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
106428
106507
  }
106429
106508
  },
106430
106509
  {
106431
106510
  "kind": "custom-element-definition",
106432
- "name": "sbb-timetable-form-field",
106511
+ "name": "sbb-timetable-form-swap-button",
106433
106512
  "declaration": {
106434
- "name": "SbbTimetableFormFieldElement",
106435
- "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
106513
+ "name": "SbbTimetableFormSwapButtonElement",
106514
+ "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
106436
106515
  }
106437
106516
  }
106438
106517
  ]
106439
106518
  },
106440
106519
  {
106441
106520
  "kind": "javascript-module",
106442
- "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
106521
+ "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
106443
106522
  "declarations": [
106444
106523
  {
106445
106524
  "kind": "class",
106446
- "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.",
106447
- "name": "SbbTimetableFormSwapButtonElement",
106525
+ "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
106526
+ "name": "SbbTimetableFormFieldElement",
106448
106527
  "members": [
106449
106528
  {
106450
106529
  "kind": "field",
106451
- "name": "_languageController",
106452
- "privacy": "private",
106453
- "default": "new SbbLanguageController(this)"
106454
- },
106455
- {
106456
- "kind": "method",
106457
- "name": "_invertFieldValues",
106458
- "privacy": "private",
106459
- "return": {
106460
- "type": {
106461
- "text": "void"
106462
- }
106530
+ "name": "_routeIcon",
106531
+ "type": {
106532
+ "text": "boolean"
106463
106533
  },
106464
- "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
106534
+ "privacy": "private",
106535
+ "default": "false"
106465
106536
  },
106466
106537
  {
106467
- "kind": "method",
106468
- "name": "renderIconName",
106469
- "privacy": "protected",
106470
- "return": {
106471
- "type": {
106472
- "text": "string"
106473
- }
106538
+ "kind": "field",
106539
+ "name": "borderless",
106540
+ "type": {
106541
+ "text": "boolean"
106474
106542
  },
106543
+ "privacy": "public",
106544
+ "default": "true",
106545
+ "description": "Whether to display the form field without a border.",
106546
+ "attribute": "borderless",
106547
+ "reflects": true,
106475
106548
  "inheritedFrom": {
106476
- "name": "SbbIconNameMixin",
106477
- "module": "icon/icon-name-mixin.js"
106549
+ "name": "SbbFormFieldElement",
106550
+ "module": "form-field/form-field/form-field.component.js"
106478
106551
  }
106479
106552
  },
106480
106553
  {
106481
106554
  "kind": "field",
106482
- "name": "size",
106555
+ "name": "floatingLabel",
106483
106556
  "type": {
106484
- "text": "SbbButtonSize"
106557
+ "text": "boolean"
106485
106558
  },
106486
106559
  "privacy": "public",
106487
- "description": "Size variant, either l, m or s.",
106488
- "default": "'l' / 's' (lean)",
106489
- "attribute": "size",
106560
+ "default": "true",
106561
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
106562
+ "attribute": "floating-label",
106490
106563
  "reflects": true,
106491
106564
  "inheritedFrom": {
106492
- "name": "SbbButtonCommonElementMixin",
106493
- "module": "button/common/button-common.js"
106565
+ "name": "SbbFormFieldElement",
106566
+ "module": "form-field/form-field/form-field.component.js"
106494
106567
  }
106495
106568
  },
106496
106569
  {
106497
106570
  "kind": "field",
106498
- "name": "loading",
106571
+ "name": "width",
106499
106572
  "type": {
106500
- "text": "boolean"
106573
+ "text": "string"
106501
106574
  },
106502
106575
  "privacy": "public",
106503
- "default": "false",
106504
- "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.",
106505
- "attribute": "loading",
106576
+ "default": "'collapse'",
106577
+ "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.",
106578
+ "attribute": "width",
106506
106579
  "reflects": true,
106507
106580
  "inheritedFrom": {
106508
- "name": "SbbButtonCommonElementMixin",
106509
- "module": "button/common/button-common.js"
106581
+ "name": "SbbFormFieldElement",
106582
+ "module": "form-field/form-field/form-field.component.js"
106510
106583
  }
106511
106584
  },
106512
106585
  {
106513
- "kind": "method",
106514
- "name": "renderTemplate",
106515
- "privacy": "protected",
106516
- "return": {
106517
- "type": {
106518
- "text": "TemplateResult"
106519
- }
106586
+ "kind": "field",
106587
+ "name": "size",
106588
+ "type": {
106589
+ "text": "string"
106520
106590
  },
106521
- "description": "Override this method to render the component template.",
106591
+ "privacy": "public",
106592
+ "description": "Size variant, either l, m or s.",
106593
+ "default": "'l'",
106594
+ "attribute": "size",
106595
+ "reflects": true,
106522
106596
  "inheritedFrom": {
106523
- "name": "SbbActionBaseElement",
106524
- "module": "core/base-elements/action-base-element.js"
106597
+ "name": "SbbFormFieldElement",
106598
+ "module": "form-field/form-field/form-field.component.js"
106525
106599
  }
106526
106600
  },
106527
106601
  {
@@ -106536,523 +106610,458 @@
106536
106610
  "attribute": "negative",
106537
106611
  "reflects": true,
106538
106612
  "inheritedFrom": {
106539
- "name": "SbbNegativeMixin",
106540
- "module": "core/mixins/negative-mixin.js"
106541
- }
106542
- },
106543
- {
106544
- "kind": "field",
106545
- "name": "iconName",
106546
- "type": {
106547
- "text": "string"
106548
- },
106549
- "privacy": "public",
106550
- "default": "''",
106551
- "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.",
106552
- "attribute": "icon-name",
106553
- "inheritedFrom": {
106554
- "name": "SbbIconNameMixin",
106555
- "module": "icon/icon-name-mixin.js"
106613
+ "name": "SbbFormFieldElement",
106614
+ "module": "form-field/form-field/form-field.component.js"
106556
106615
  }
106557
106616
  },
106558
106617
  {
106559
106618
  "kind": "method",
106560
- "name": "renderIconSlot",
106619
+ "name": "toggleState",
106561
106620
  "privacy": "protected",
106562
106621
  "return": {
106563
106622
  "type": {
106564
- "text": "TemplateResult"
106623
+ "text": "void"
106565
106624
  }
106566
106625
  },
106567
106626
  "parameters": [
106568
106627
  {
106569
- "name": "classname",
106570
- "optional": true,
106628
+ "name": "value",
106571
106629
  "type": {
106572
106630
  "text": "string"
106573
106631
  }
106632
+ },
106633
+ {
106634
+ "name": "force",
106635
+ "optional": true,
106636
+ "type": {
106637
+ "text": "boolean"
106638
+ }
106574
106639
  }
106575
106640
  ],
106576
106641
  "inheritedFrom": {
106577
- "name": "SbbIconNameMixin",
106578
- "module": "icon/icon-name-mixin.js"
106642
+ "name": "SbbFormFieldElement",
106643
+ "module": "form-field/form-field/form-field.component.js"
106579
106644
  }
106580
106645
  },
106581
106646
  {
106582
- "kind": "method",
106583
- "name": "_renderIconName",
106584
- "privacy": "private",
106585
- "return": {
106586
- "type": {
106587
- "text": "string"
106588
- }
106647
+ "kind": "field",
106648
+ "name": "_hydrationRequired",
106649
+ "type": {
106650
+ "text": "boolean"
106589
106651
  },
106652
+ "privacy": "private",
106653
+ "default": "!!this.shadowRoot",
106590
106654
  "inheritedFrom": {
106591
- "name": "SbbIconNameMixin",
106592
- "module": "icon/icon-name-mixin.js"
106655
+ "name": "SbbFormFieldElement",
106656
+ "module": "form-field/form-field/form-field.component.js"
106593
106657
  }
106594
106658
  },
106595
106659
  {
106596
106660
  "kind": "field",
106597
- "name": "disabledInteractive",
106598
- "type": {
106599
- "text": "boolean"
106600
- },
106601
- "privacy": "public",
106602
- "default": "false",
106603
- "description": "Whether the button should be aria-disabled but stay interactive.",
106604
- "attribute": "disabled-interactive",
106605
- "reflects": true,
106661
+ "name": "_hydrationComplete",
106662
+ "privacy": "private",
106663
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
106606
106664
  "inheritedFrom": {
106607
- "name": "SbbDisabledInteractiveMixin",
106608
- "module": "core/mixins/disabled-mixin.js"
106665
+ "name": "SbbFormFieldElement",
106666
+ "module": "form-field/form-field/form-field.component.js"
106609
106667
  }
106610
106668
  },
106611
106669
  {
106612
106670
  "kind": "field",
106613
- "name": "disabled",
106614
- "privacy": "public",
106615
- "description": "Whether the component is disabled.",
106616
- "default": "false",
106671
+ "name": "_resolveHydration",
106617
106672
  "type": {
106618
- "text": "boolean"
106673
+ "text": "(hydrationRequired: boolean) => void"
106619
106674
  },
106620
- "attribute": "disabled",
106621
- "reflects": true,
106675
+ "privacy": "private",
106622
106676
  "inheritedFrom": {
106623
- "name": "SbbDisabledMixin",
106624
- "module": "core/mixins/disabled-mixin.js"
106677
+ "name": "SbbFormFieldElement",
106678
+ "module": "form-field/form-field/form-field.component.js"
106625
106679
  }
106626
106680
  },
106627
106681
  {
106628
106682
  "kind": "field",
106629
- "name": "#disabled",
106630
- "privacy": "private",
106683
+ "name": "hydrationRequired",
106631
106684
  "type": {
106632
106685
  "text": "boolean"
106633
106686
  },
106634
- "default": "false",
106635
- "inheritedFrom": {
106636
- "name": "SbbDisabledMixin",
106637
- "module": "core/mixins/disabled-mixin.js"
106638
- }
106639
- },
106640
- {
106641
- "kind": "method",
106642
- "name": "isDisabledExternally",
106643
106687
  "privacy": "protected",
106644
- "return": {
106645
- "type": {
106646
- "text": "boolean"
106647
- }
106648
- },
106649
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
106688
+ "description": "Returns whether hydration is required and not completed.",
106689
+ "readonly": true,
106650
106690
  "inheritedFrom": {
106651
- "name": "SbbDisabledMixin",
106652
- "module": "core/mixins/disabled-mixin.js"
106653
- }
106691
+ "name": "SbbFormFieldElement",
106692
+ "module": "form-field/form-field/form-field.component.js"
106693
+ },
106694
+ "default": "!!this.shadowRoot"
106654
106695
  },
106655
106696
  {
106656
106697
  "kind": "field",
106657
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
106698
+ "name": "_excludedFocusElements",
106658
106699
  "type": {
106659
106700
  "text": "array"
106660
106701
  },
106661
106702
  "privacy": "private",
106662
106703
  "readonly": true,
106663
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
106704
+ "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
106664
106705
  "inheritedFrom": {
106665
- "name": "SbbButtonBaseElement",
106666
- "module": "core/base-elements/button-base-element.js"
106706
+ "name": "SbbFormFieldElement",
106707
+ "module": "form-field/form-field/form-field.component.js"
106667
106708
  }
106668
106709
  },
106669
106710
  {
106670
106711
  "kind": "field",
106671
- "name": "value",
106712
+ "name": "_floatingLabelSupportedInputElements",
106672
106713
  "type": {
106673
- "text": "string"
106714
+ "text": "array"
106674
106715
  },
106675
- "privacy": "public",
106716
+ "privacy": "private",
106717
+ "readonly": true,
106718
+ "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
106676
106719
  "inheritedFrom": {
106677
- "name": "SbbButtonBaseElement",
106678
- "module": "core/base-elements/button-base-element.js"
106679
- },
106680
- "default": "''",
106681
- "description": "Value of the form element.",
106682
- "attribute": "value"
106720
+ "name": "SbbFormFieldElement",
106721
+ "module": "form-field/form-field/form-field.component.js"
106722
+ }
106683
106723
  },
106684
106724
  {
106685
106725
  "kind": "field",
106686
- "name": "type",
106687
- "privacy": "public",
106688
- "description": "The type attribute to use for the button.",
106689
- "default": "'button'",
106726
+ "name": "_floatingLabelSupportedInputTypes",
106690
106727
  "type": {
106691
- "text": "SbbButtonType"
106728
+ "text": "array"
106692
106729
  },
106693
- "attribute": "type",
106730
+ "privacy": "private",
106731
+ "readonly": true,
106732
+ "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
106694
106733
  "inheritedFrom": {
106695
- "name": "SbbButtonBaseElement",
106696
- "module": "core/base-elements/button-base-element.js"
106734
+ "name": "SbbFormFieldElement",
106735
+ "module": "form-field/form-field/form-field.component.js"
106697
106736
  }
106698
106737
  },
106699
106738
  {
106700
106739
  "kind": "field",
106701
- "name": "form",
106740
+ "name": "errorSpace",
106702
106741
  "type": {
106703
- "text": "HTMLFormElement | null"
106742
+ "text": "'none' | 'reserve'"
106704
106743
  },
106705
106744
  "privacy": "public",
106706
- "description": "The `<form>` element to associate the button with.",
106745
+ "default": "'none'",
106746
+ "description": "Whether to reserve space for an error message.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
106747
+ "attribute": "error-space",
106748
+ "reflects": true,
106707
106749
  "inheritedFrom": {
106708
- "name": "SbbButtonBaseElement",
106709
- "module": "core/base-elements/button-base-element.js"
106710
- },
106711
- "attribute": "form"
106750
+ "name": "SbbFormFieldElement",
106751
+ "module": "form-field/form-field/form-field.component.js"
106752
+ }
106712
106753
  },
106713
106754
  {
106714
106755
  "kind": "field",
106715
- "name": "_formId",
106756
+ "name": "optional",
106716
106757
  "type": {
106717
- "text": "string"
106758
+ "text": "boolean"
106718
106759
  },
106719
- "privacy": "private",
106720
- "default": "''",
106760
+ "privacy": "public",
106761
+ "default": "false",
106762
+ "description": "Indicates whether the input is optional.",
106763
+ "attribute": "optional",
106721
106764
  "inheritedFrom": {
106722
- "name": "SbbButtonBaseElement",
106723
- "module": "core/base-elements/button-base-element.js"
106765
+ "name": "SbbFormFieldElement",
106766
+ "module": "form-field/form-field/form-field.component.js"
106724
106767
  }
106725
106768
  },
106726
106769
  {
106727
106770
  "kind": "field",
106728
- "name": "_handleButtonClick",
106729
- "privacy": "private",
106730
- "inheritedFrom": {
106731
- "name": "SbbButtonBaseElement",
106732
- "module": "core/base-elements/button-base-element.js"
106733
- }
106734
- },
106735
- {
106736
- "kind": "method",
106737
- "name": "_requestSubmit",
106738
- "privacy": "private",
106739
- "return": {
106740
- "type": {
106741
- "text": "void"
106742
- }
106771
+ "name": "hiddenLabel",
106772
+ "type": {
106773
+ "text": "boolean"
106743
106774
  },
106744
- "parameters": [
106745
- {
106746
- "name": "form",
106747
- "type": {
106748
- "text": "HTMLFormElement"
106749
- }
106750
- }
106751
- ],
106775
+ "privacy": "public",
106776
+ "default": "false",
106777
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
106778
+ "attribute": "hidden-label",
106779
+ "reflects": true,
106752
106780
  "inheritedFrom": {
106753
- "name": "SbbButtonBaseElement",
106754
- "module": "core/base-elements/button-base-element.js"
106781
+ "name": "SbbFormFieldElement",
106782
+ "module": "form-field/form-field/form-field.component.js"
106755
106783
  }
106756
106784
  },
106757
106785
  {
106758
106786
  "kind": "field",
106759
- "name": "_formKeyDown",
106787
+ "name": "_errorElements",
106788
+ "type": {
106789
+ "text": "Element[]"
106790
+ },
106760
106791
  "privacy": "private",
106792
+ "default": "[]",
106793
+ "description": "It is used internally to get the `error` slot.",
106761
106794
  "inheritedFrom": {
106762
- "name": "SbbButtonBaseElement",
106763
- "module": "core/base-elements/button-base-element.js"
106795
+ "name": "SbbFormFieldElement",
106796
+ "module": "form-field/form-field/form-field.component.js"
106764
106797
  }
106765
106798
  },
106766
106799
  {
106767
106800
  "kind": "field",
106768
- "name": "formAssociated",
106801
+ "name": "_input",
106769
106802
  "type": {
106770
- "text": "boolean"
106803
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
106771
106804
  },
106772
- "privacy": "public",
106773
- "static": true,
106774
- "default": "true",
106805
+ "privacy": "private",
106806
+ "default": "null",
106807
+ "description": "Reference to the slotted input element.",
106775
106808
  "inheritedFrom": {
106776
- "name": "SbbFormAssociatedMixin",
106777
- "module": "core/mixins/form-associated-mixin.js"
106809
+ "name": "SbbFormFieldElement",
106810
+ "module": "form-field/form-field/form-field.component.js"
106778
106811
  }
106779
106812
  },
106780
106813
  {
106781
106814
  "kind": "field",
106782
- "name": "name",
106783
- "privacy": "public",
106784
- "description": "Name of the form element. Will be read from name attribute.",
106815
+ "name": "_label",
106785
106816
  "type": {
106786
- "text": "string"
106817
+ "text": "HTMLLabelElement"
106787
106818
  },
106788
- "attribute": "name",
106819
+ "privacy": "private",
106820
+ "description": "Reference to the slotted label elements.",
106789
106821
  "inheritedFrom": {
106790
- "name": "SbbFormAssociatedMixin",
106791
- "module": "core/mixins/form-associated-mixin.js"
106822
+ "name": "SbbFormFieldElement",
106823
+ "module": "form-field/form-field/form-field.component.js"
106792
106824
  }
106793
106825
  },
106794
106826
  {
106795
106827
  "kind": "field",
106796
- "name": "validity",
106828
+ "name": "inputElement",
106797
106829
  "type": {
106798
- "text": "ValidityState"
106830
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
106799
106831
  },
106800
106832
  "privacy": "public",
106801
- "description": "Returns the ValidityState object for this element.",
106833
+ "description": "Returns the input element.",
106802
106834
  "readonly": true,
106803
106835
  "inheritedFrom": {
106804
- "name": "SbbFormAssociatedMixin",
106805
- "module": "core/mixins/form-associated-mixin.js"
106836
+ "name": "SbbFormFieldElement",
106837
+ "module": "form-field/form-field/form-field.component.js"
106806
106838
  }
106807
106839
  },
106808
106840
  {
106809
106841
  "kind": "field",
106810
- "name": "validationMessage",
106811
- "type": {
106812
- "text": "string"
106813
- },
106814
- "privacy": "public",
106815
- "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.",
106816
- "readonly": true,
106842
+ "name": "_language",
106843
+ "privacy": "private",
106844
+ "default": "new SbbLanguageController(this)",
106817
106845
  "inheritedFrom": {
106818
- "name": "SbbFormAssociatedMixin",
106819
- "module": "core/mixins/form-associated-mixin.js"
106846
+ "name": "SbbFormFieldElement",
106847
+ "module": "form-field/form-field/form-field.component.js"
106820
106848
  }
106821
106849
  },
106822
106850
  {
106823
106851
  "kind": "field",
106824
- "name": "willValidate",
106825
- "type": {
106826
- "text": "boolean"
106827
- },
106828
- "privacy": "public",
106829
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
106830
- "readonly": true,
106852
+ "name": "_formFieldAttributeObserver",
106853
+ "privacy": "private",
106854
+ "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
106831
106855
  "inheritedFrom": {
106832
- "name": "SbbFormAssociatedMixin",
106833
- "module": "core/mixins/form-associated-mixin.js"
106856
+ "name": "SbbFormFieldElement",
106857
+ "module": "form-field/form-field/form-field.component.js"
106834
106858
  }
106835
106859
  },
106836
106860
  {
106837
106861
  "kind": "field",
106838
- "name": "_validityStates",
106862
+ "name": "_inputFormAbortController",
106839
106863
  "privacy": "private",
106840
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
106864
+ "default": "new AbortController()",
106841
106865
  "inheritedFrom": {
106842
- "name": "SbbFormAssociatedMixin",
106843
- "module": "core/mixins/form-associated-mixin.js"
106866
+ "name": "SbbFormFieldElement",
106867
+ "module": "form-field/form-field/form-field.component.js"
106844
106868
  }
106845
106869
  },
106846
106870
  {
106847
106871
  "kind": "field",
106848
- "name": "formDisabled",
106872
+ "name": "_control",
106849
106873
  "type": {
106850
- "text": "boolean"
106874
+ "text": "SbbFormFieldElementControl | null"
106851
106875
  },
106852
- "privacy": "protected",
106853
- "default": "false",
106854
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
106876
+ "privacy": "private",
106877
+ "default": "null",
106878
+ "inheritedFrom": {
106879
+ "name": "SbbFormFieldElement",
106880
+ "module": "form-field/form-field/form-field.component.js"
106881
+ }
106882
+ },
106883
+ {
106884
+ "kind": "method",
106885
+ "name": "_handleWrapperClick",
106886
+ "privacy": "private",
106887
+ "return": {
106888
+ "type": {
106889
+ "text": "void"
106890
+ }
106891
+ },
106892
+ "parameters": [
106893
+ {
106894
+ "name": "event",
106895
+ "type": {
106896
+ "text": "MouseEvent"
106897
+ }
106898
+ }
106899
+ ],
106855
106900
  "inheritedFrom": {
106856
- "name": "SbbFormAssociatedMixin",
106857
- "module": "core/mixins/form-associated-mixin.js"
106901
+ "name": "SbbFormFieldElement",
106902
+ "module": "form-field/form-field/form-field.component.js"
106858
106903
  }
106859
106904
  },
106860
106905
  {
106861
106906
  "kind": "method",
106862
- "name": "checkValidity",
106863
- "privacy": "public",
106907
+ "name": "_isElementFocusExcluded",
106908
+ "privacy": "private",
106864
106909
  "return": {
106865
106910
  "type": {
106866
106911
  "text": "boolean"
106867
106912
  }
106868
106913
  },
106869
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
106914
+ "parameters": [
106915
+ {
106916
+ "name": "event",
106917
+ "type": {
106918
+ "text": "Event"
106919
+ }
106920
+ }
106921
+ ],
106870
106922
  "inheritedFrom": {
106871
- "name": "SbbFormAssociatedMixin",
106872
- "module": "core/mixins/form-associated-mixin.js"
106923
+ "name": "SbbFormFieldElement",
106924
+ "module": "form-field/form-field/form-field.component.js"
106873
106925
  }
106874
106926
  },
106875
106927
  {
106876
106928
  "kind": "method",
106877
- "name": "reportValidity",
106878
- "privacy": "public",
106929
+ "name": "_onSlotLabelChange",
106930
+ "privacy": "private",
106879
106931
  "return": {
106880
106932
  "type": {
106881
- "text": "boolean"
106933
+ "text": "void"
106882
106934
  }
106883
106935
  },
106884
- "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.",
106885
106936
  "inheritedFrom": {
106886
- "name": "SbbFormAssociatedMixin",
106887
- "module": "core/mixins/form-associated-mixin.js"
106937
+ "name": "SbbFormFieldElement",
106938
+ "module": "form-field/form-field/form-field.component.js"
106888
106939
  }
106889
106940
  },
106890
106941
  {
106891
106942
  "kind": "method",
106892
- "name": "setCustomValidity",
106893
- "privacy": "public",
106943
+ "name": "_onSlotInputChange",
106944
+ "privacy": "private",
106894
106945
  "return": {
106895
106946
  "type": {
106896
106947
  "text": "void"
106897
106948
  }
106898
106949
  },
106899
- "parameters": [
106900
- {
106901
- "name": "message",
106902
- "type": {
106903
- "text": "string"
106904
- }
106905
- }
106906
- ],
106907
- "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.",
106950
+ "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
106908
106951
  "inheritedFrom": {
106909
- "name": "SbbFormAssociatedMixin",
106910
- "module": "core/mixins/form-associated-mixin.js"
106952
+ "name": "SbbFormFieldElement",
106953
+ "module": "form-field/form-field/form-field.component.js"
106911
106954
  }
106912
106955
  },
106913
106956
  {
106914
106957
  "kind": "method",
106915
- "name": "_hasDisabledAncestor",
106958
+ "name": "_assignSlots",
106916
106959
  "privacy": "private",
106917
106960
  "return": {
106918
106961
  "type": {
106919
- "text": "boolean"
106962
+ "text": "void"
106920
106963
  }
106921
106964
  },
106922
106965
  "inheritedFrom": {
106923
- "name": "SbbFormAssociatedMixin",
106924
- "module": "core/mixins/form-associated-mixin.js"
106966
+ "name": "SbbFormFieldElement",
106967
+ "module": "form-field/form-field/form-field.component.js"
106925
106968
  }
106926
106969
  },
106927
106970
  {
106928
106971
  "kind": "method",
106929
- "name": "updateFormValue",
106930
- "privacy": "protected",
106972
+ "name": "_connectInputElement",
106973
+ "privacy": "private",
106931
106974
  "return": {
106932
106975
  "type": {
106933
- "text": "void"
106976
+ "text": "'changed' | 'no-input' | 'unchanged'"
106934
106977
  }
106935
106978
  },
106936
- "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",
106937
106979
  "inheritedFrom": {
106938
- "name": "SbbFormAssociatedMixin",
106939
- "module": "core/mixins/form-associated-mixin.js"
106980
+ "name": "SbbFormFieldElement",
106981
+ "module": "form-field/form-field/form-field.component.js"
106940
106982
  }
106941
106983
  },
106942
106984
  {
106943
106985
  "kind": "method",
106944
- "name": "formState",
106945
- "privacy": "protected",
106986
+ "name": "_syncLabelInputReferences",
106987
+ "privacy": "private",
106946
106988
  "return": {
106947
106989
  "type": {
106948
- "text": "FormRestoreState"
106990
+ "text": "void"
106949
106991
  }
106950
106992
  },
106951
106993
  "inheritedFrom": {
106952
- "name": "SbbFormAssociatedMixin",
106953
- "module": "core/mixins/form-associated-mixin.js"
106994
+ "name": "SbbFormFieldElement",
106995
+ "module": "form-field/form-field/form-field.component.js"
106954
106996
  }
106955
106997
  },
106956
106998
  {
106957
106999
  "kind": "method",
106958
- "name": "setValidityFlag",
106959
- "privacy": "protected",
107000
+ "name": "_isInputElement",
107001
+ "privacy": "private",
106960
107002
  "return": {
106961
107003
  "type": {
106962
- "text": "void"
107004
+ "text": "boolean"
106963
107005
  }
106964
107006
  },
106965
107007
  "parameters": [
106966
107008
  {
106967
- "name": "flag",
106968
- "type": {
106969
- "text": "T"
106970
- }
106971
- },
106972
- {
106973
- "name": "message",
106974
- "type": {
106975
- "text": "string"
106976
- }
106977
- },
106978
- {
106979
- "name": "flagValue",
106980
- "optional": true,
107009
+ "name": "input",
106981
107010
  "type": {
106982
- "text": "ValidityStateFlags[T]"
107011
+ "text": "Element"
106983
107012
  }
106984
107013
  }
106985
107014
  ],
106986
- "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).",
106987
107015
  "inheritedFrom": {
106988
- "name": "SbbFormAssociatedMixin",
106989
- "module": "core/mixins/form-associated-mixin.js"
107016
+ "name": "SbbFormFieldElement",
107017
+ "module": "form-field/form-field/form-field.component.js"
106990
107018
  }
106991
107019
  },
106992
107020
  {
106993
107021
  "kind": "method",
106994
- "name": "removeValidityFlag",
106995
- "privacy": "protected",
107022
+ "name": "_readInputState",
107023
+ "privacy": "private",
106996
107024
  "return": {
106997
107025
  "type": {
106998
107026
  "text": "void"
106999
107027
  }
107000
107028
  },
107001
- "parameters": [
107002
- {
107003
- "name": "flag",
107004
- "type": {
107005
- "text": "T"
107006
- }
107007
- }
107008
- ],
107009
- "description": "Removes the validity state flag entry and updates validity state.",
107010
107029
  "inheritedFrom": {
107011
- "name": "SbbFormAssociatedMixin",
107012
- "module": "core/mixins/form-associated-mixin.js"
107030
+ "name": "SbbFormFieldElement",
107031
+ "module": "form-field/form-field/form-field.component.js"
107013
107032
  }
107014
107033
  },
107015
107034
  {
107016
107035
  "kind": "method",
107017
- "name": "validate",
107018
- "privacy": "protected",
107036
+ "name": "_registerInputFormListener",
107037
+ "privacy": "private",
107019
107038
  "return": {
107020
107039
  "type": {
107021
107040
  "text": "void"
107022
107041
  }
107023
107042
  },
107024
- "description": "To be called whenever the current element needs to be validated.",
107025
107043
  "inheritedFrom": {
107026
- "name": "SbbFormAssociatedMixin",
107027
- "module": "core/mixins/form-associated-mixin.js"
107044
+ "name": "SbbFormFieldElement",
107045
+ "module": "form-field/form-field/form-field.component.js"
107028
107046
  }
107029
107047
  },
107030
107048
  {
107031
107049
  "kind": "method",
107032
- "name": "shouldValidate",
107033
- "privacy": "protected",
107050
+ "name": "_patchInputValue",
107051
+ "privacy": "private",
107034
107052
  "return": {
107035
107053
  "type": {
107036
- "text": "boolean"
107054
+ "text": "void"
107037
107055
  }
107038
107056
  },
107039
- "parameters": [
107040
- {
107041
- "name": "name",
107042
- "type": {
107043
- "text": "PropertyKey | undefined"
107044
- }
107045
- }
107046
- ],
107047
- "description": "Whether validation should be run on a property change with the given name.",
107048
107057
  "inheritedFrom": {
107049
- "name": "SbbFormAssociatedMixin",
107050
- "module": "core/mixins/form-associated-mixin.js"
107058
+ "name": "SbbFormFieldElement",
107059
+ "module": "form-field/form-field/form-field.component.js"
107051
107060
  }
107052
107061
  },
107053
107062
  {
107054
107063
  "kind": "method",
107055
- "name": "_setInternalValidity",
107064
+ "name": "_unpatchInputValue",
107056
107065
  "privacy": "private",
107057
107066
  "return": {
107058
107067
  "type": {
@@ -107060,307 +107069,317 @@
107060
107069
  }
107061
107070
  },
107062
107071
  "inheritedFrom": {
107063
- "name": "SbbFormAssociatedMixin",
107064
- "module": "core/mixins/form-associated-mixin.js"
107072
+ "name": "SbbFormFieldElement",
107073
+ "module": "form-field/form-field/form-field.component.js"
107065
107074
  }
107066
107075
  },
107067
107076
  {
107068
- "kind": "field",
107069
- "name": "role",
107070
- "type": {
107071
- "text": "ElementInternals['role']"
107077
+ "kind": "method",
107078
+ "name": "_checkAndUpdateInputEmpty",
107079
+ "privacy": "private",
107080
+ "return": {
107081
+ "type": {
107082
+ "text": "void"
107083
+ }
107072
107084
  },
107073
- "privacy": "public",
107074
- "static": true,
107075
- "readonly": true,
107076
- "default": "'button'",
107077
107085
  "inheritedFrom": {
107078
- "name": "SbbButtonLikeBaseElement",
107079
- "module": "core/base-elements/button-base-element.js"
107086
+ "name": "SbbFormFieldElement",
107087
+ "module": "form-field/form-field/form-field.component.js"
107080
107088
  }
107081
107089
  },
107082
107090
  {
107083
- "kind": "field",
107084
- "name": "_preventScrollOnSpaceKeydown",
107091
+ "kind": "method",
107092
+ "name": "_isInputEmpty",
107085
107093
  "privacy": "private",
107086
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
107087
- "parameters": [
107088
- {
107089
- "description": "The origin event.",
107090
- "name": "event"
107094
+ "return": {
107095
+ "type": {
107096
+ "text": "boolean"
107091
107097
  }
107092
- ],
107098
+ },
107093
107099
  "inheritedFrom": {
107094
- "name": "SbbButtonLikeBaseElement",
107095
- "module": "core/base-elements/button-base-element.js"
107100
+ "name": "SbbFormFieldElement",
107101
+ "module": "form-field/form-field/form-field.component.js"
107096
107102
  }
107097
107103
  },
107098
107104
  {
107099
- "kind": "field",
107100
- "name": "_removeActiveMarker",
107105
+ "kind": "method",
107106
+ "name": "_isInputValueEmpty",
107101
107107
  "privacy": "private",
107108
+ "return": {
107109
+ "type": {
107110
+ "text": "boolean"
107111
+ }
107112
+ },
107102
107113
  "inheritedFrom": {
107103
- "name": "SbbButtonLikeBaseElement",
107104
- "module": "core/base-elements/button-base-element.js"
107114
+ "name": "SbbFormFieldElement",
107115
+ "module": "form-field/form-field/form-field.component.js"
107105
107116
  }
107106
107117
  },
107107
107118
  {
107108
- "kind": "field",
107109
- "name": "_dispatchClickEventOnSpaceKeyup",
107119
+ "kind": "method",
107120
+ "name": "_onSlotErrorChange",
107110
107121
  "privacy": "private",
107111
- "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.",
107122
+ "return": {
107123
+ "type": {
107124
+ "text": "void"
107125
+ }
107126
+ },
107112
107127
  "parameters": [
107113
107128
  {
107114
- "description": "The origin event.",
107115
- "name": "event"
107129
+ "name": "event",
107130
+ "type": {
107131
+ "text": "Event"
107132
+ }
107116
107133
  }
107117
107134
  ],
107135
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
107118
107136
  "inheritedFrom": {
107119
- "name": "SbbButtonLikeBaseElement",
107120
- "module": "core/base-elements/button-base-element.js"
107137
+ "name": "SbbFormFieldElement",
107138
+ "module": "form-field/form-field/form-field.component.js"
107121
107139
  }
107122
107140
  },
107123
107141
  {
107124
- "kind": "field",
107125
- "name": "_dispatchClickEvent",
107142
+ "kind": "method",
107143
+ "name": "_assignErrorMessageElements",
107126
107144
  "privacy": "private",
107145
+ "return": {
107146
+ "type": {
107147
+ "text": "void"
107148
+ }
107149
+ },
107127
107150
  "inheritedFrom": {
107128
- "name": "SbbButtonLikeBaseElement",
107129
- "module": "core/base-elements/button-base-element.js"
107151
+ "name": "SbbFormFieldElement",
107152
+ "module": "form-field/form-field/form-field.component.js"
107130
107153
  }
107131
107154
  },
107132
107155
  {
107133
107156
  "kind": "method",
107134
- "name": "toggleState",
107135
- "privacy": "protected",
107157
+ "name": "reset",
107158
+ "privacy": "public",
107136
107159
  "return": {
107137
107160
  "type": {
107138
107161
  "text": "void"
107139
107162
  }
107140
107163
  },
107141
- "parameters": [
107142
- {
107143
- "name": "value",
107144
- "type": {
107145
- "text": "string"
107146
- }
107147
- },
107148
- {
107149
- "name": "force",
107150
- "optional": true,
107151
- "type": {
107152
- "text": "boolean"
107153
- }
107154
- }
107155
- ],
107164
+ "description": "Manually reset the form field. Currently, this only resets the floating label.",
107156
107165
  "inheritedFrom": {
107157
- "name": "SbbActionBaseElement",
107158
- "module": "core/base-elements/action-base-element.js"
107166
+ "name": "SbbFormFieldElement",
107167
+ "module": "form-field/form-field/form-field.component.js"
107159
107168
  }
107160
107169
  },
107161
107170
  {
107162
- "kind": "field",
107163
- "name": "maybeDisabled",
107164
- "type": {
107165
- "text": "boolean | undefined"
107171
+ "kind": "method",
107172
+ "name": "clear",
107173
+ "privacy": "public",
107174
+ "return": {
107175
+ "type": {
107176
+ "text": "void"
107177
+ }
107166
107178
  },
107167
- "privacy": "protected",
107168
- "readonly": true,
107179
+ "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
107169
107180
  "inheritedFrom": {
107170
- "name": "SbbActionBaseElement",
107171
- "module": "core/base-elements/action-base-element.js"
107181
+ "name": "SbbFormFieldElement",
107182
+ "module": "form-field/form-field/form-field.component.js"
107172
107183
  }
107173
107184
  },
107174
107185
  {
107175
- "kind": "field",
107176
- "name": "maybeDisabledInteractive",
107177
- "type": {
107178
- "text": "boolean | undefined"
107186
+ "kind": "method",
107187
+ "name": "_syncNegative",
107188
+ "privacy": "private",
107189
+ "return": {
107190
+ "type": {
107191
+ "text": "void"
107192
+ }
107179
107193
  },
107180
- "privacy": "protected",
107181
- "readonly": true,
107182
107194
  "inheritedFrom": {
107183
- "name": "SbbActionBaseElement",
107184
- "module": "core/base-elements/action-base-element.js"
107195
+ "name": "SbbFormFieldElement",
107196
+ "module": "form-field/form-field/form-field.component.js"
107185
107197
  }
107186
107198
  },
107187
107199
  {
107188
107200
  "kind": "method",
107189
- "name": "setupBaseEventHandlers",
107190
- "privacy": "protected",
107201
+ "name": "_syncSize",
107202
+ "privacy": "private",
107191
107203
  "return": {
107192
107204
  "type": {
107193
107205
  "text": "void"
107194
107206
  }
107195
107207
  },
107196
107208
  "inheritedFrom": {
107197
- "name": "SbbActionBaseElement",
107198
- "module": "core/base-elements/action-base-element.js"
107209
+ "name": "SbbFormFieldElement",
107210
+ "module": "form-field/form-field/form-field.component.js"
107199
107211
  }
107200
107212
  }
107201
107213
  ],
107202
107214
  "superclass": {
107203
- "name": "SbbSecondaryButtonElement",
107204
- "module": "button/secondary-button.js"
107215
+ "name": "SbbFormFieldElement",
107216
+ "module": "form-field/form-field.js"
107205
107217
  },
107206
- "tagName": "sbb-timetable-form-swap-button",
107218
+ "tagName": "sbb-timetable-form-field",
107207
107219
  "customElement": true,
107208
107220
  "attributes": [
107209
107221
  {
107210
- "name": "size",
107222
+ "name": "negative",
107211
107223
  "type": {
107212
- "text": "SbbButtonSize"
107224
+ "text": "boolean"
107213
107225
  },
107214
- "description": "Size variant, either l, m or s.",
107215
- "default": "'l' / 's' (lean)",
107216
- "fieldName": "size",
107226
+ "default": "false",
107227
+ "description": "Negative coloring variant flag.",
107228
+ "fieldName": "negative",
107217
107229
  "inheritedFrom": {
107218
- "name": "SbbButtonCommonElementMixin",
107219
- "module": "button/common/button-common.js"
107230
+ "name": "SbbFormFieldElement",
107231
+ "module": "form-field/form-field/form-field.component.js"
107220
107232
  }
107221
107233
  },
107222
107234
  {
107223
- "name": "loading",
107235
+ "name": "error-space",
107224
107236
  "type": {
107225
- "text": "boolean"
107237
+ "text": "'none' | 'reserve'"
107226
107238
  },
107227
- "default": "false",
107228
- "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.",
107229
- "fieldName": "loading",
107239
+ "default": "'none'",
107240
+ "description": "Whether to reserve space for an error message.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
107241
+ "fieldName": "errorSpace",
107230
107242
  "inheritedFrom": {
107231
- "name": "SbbButtonCommonElementMixin",
107232
- "module": "button/common/button-common.js"
107243
+ "name": "SbbFormFieldElement",
107244
+ "module": "form-field/form-field/form-field.component.js"
107233
107245
  }
107234
107246
  },
107235
107247
  {
107236
- "name": "negative",
107248
+ "name": "optional",
107237
107249
  "type": {
107238
107250
  "text": "boolean"
107239
107251
  },
107240
107252
  "default": "false",
107241
- "description": "Negative coloring variant flag.",
107242
- "fieldName": "negative",
107253
+ "description": "Indicates whether the input is optional.",
107254
+ "fieldName": "optional",
107243
107255
  "inheritedFrom": {
107244
- "name": "SbbNegativeMixin",
107245
- "module": "core/mixins/negative-mixin.js"
107256
+ "name": "SbbFormFieldElement",
107257
+ "module": "form-field/form-field/form-field.component.js"
107246
107258
  }
107247
107259
  },
107248
107260
  {
107249
- "name": "icon-name",
107261
+ "name": "size",
107250
107262
  "type": {
107251
- "text": "string"
107263
+ "text": "'l' | 'm' | 's'"
107252
107264
  },
107253
- "default": "''",
107254
- "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.",
107255
- "fieldName": "iconName",
107265
+ "description": "Size variant, either l, m or s.",
107266
+ "default": "'m' / 's' (lean)",
107267
+ "fieldName": "size",
107256
107268
  "inheritedFrom": {
107257
- "name": "SbbIconNameMixin",
107258
- "module": "icon/icon-name-mixin.js"
107269
+ "name": "SbbFormFieldElement",
107270
+ "module": "form-field/form-field/form-field.component.js"
107259
107271
  }
107260
107272
  },
107261
107273
  {
107262
- "name": "disabled-interactive",
107274
+ "name": "borderless",
107263
107275
  "type": {
107264
107276
  "text": "boolean"
107265
107277
  },
107266
107278
  "default": "false",
107267
- "description": "Whether the button should be aria-disabled but stay interactive.",
107268
- "fieldName": "disabledInteractive",
107279
+ "description": "Whether to display the form field without a border.",
107280
+ "fieldName": "borderless",
107269
107281
  "inheritedFrom": {
107270
- "name": "SbbDisabledInteractiveMixin",
107271
- "module": "core/mixins/disabled-mixin.js"
107282
+ "name": "SbbFormFieldElement",
107283
+ "module": "form-field/form-field/form-field.component.js"
107272
107284
  }
107273
107285
  },
107274
107286
  {
107275
- "name": "disabled",
107276
- "description": "Whether the component is disabled.",
107277
- "default": "false",
107287
+ "name": "width",
107278
107288
  "type": {
107279
- "text": "boolean"
107289
+ "text": "'default' | 'collapse'"
107280
107290
  },
107281
- "fieldName": "disabled",
107291
+ "default": "'default'",
107292
+ "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.",
107293
+ "fieldName": "width",
107282
107294
  "inheritedFrom": {
107283
- "name": "SbbDisabledMixin",
107284
- "module": "core/mixins/disabled-mixin.js"
107295
+ "name": "SbbFormFieldElement",
107296
+ "module": "form-field/form-field/form-field.component.js"
107285
107297
  }
107286
107298
  },
107287
107299
  {
107288
- "name": "value",
107300
+ "name": "hidden-label",
107289
107301
  "type": {
107290
- "text": "string"
107302
+ "text": "boolean"
107291
107303
  },
107292
- "default": "''",
107293
- "description": "Value of the form element.",
107294
- "fieldName": "value",
107304
+ "default": "false",
107305
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
107306
+ "fieldName": "hiddenLabel",
107295
107307
  "inheritedFrom": {
107296
- "name": "SbbButtonBaseElement",
107297
- "module": "core/base-elements/button-base-element.js"
107308
+ "name": "SbbFormFieldElement",
107309
+ "module": "form-field/form-field/form-field.component.js"
107298
107310
  }
107299
107311
  },
107300
107312
  {
107301
- "name": "type",
107302
- "description": "The type attribute to use for the button.",
107303
- "default": "'button'",
107313
+ "name": "floating-label",
107304
107314
  "type": {
107305
- "text": "SbbButtonType"
107315
+ "text": "boolean"
107306
107316
  },
107307
- "fieldName": "type",
107317
+ "default": "false",
107318
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
107319
+ "fieldName": "floatingLabel",
107308
107320
  "inheritedFrom": {
107309
- "name": "SbbButtonBaseElement",
107310
- "module": "core/base-elements/button-base-element.js"
107321
+ "name": "SbbFormFieldElement",
107322
+ "module": "form-field/form-field/form-field.component.js"
107323
+ }
107324
+ }
107325
+ ],
107326
+ "slots": [
107327
+ {
107328
+ "description": "Use this slot to render an input/select or a supported non-native element.",
107329
+ "name": "",
107330
+ "inheritedFrom": {
107331
+ "name": "SbbFormFieldElement",
107332
+ "module": "form-field/form-field/form-field.component.js"
107311
107333
  }
107312
107334
  },
107313
107335
  {
107314
- "name": "form",
107315
- "description": "The `<form>` element to associate the button with.",
107316
- "type": {
107317
- "text": "HTMLFormElement | null"
107318
- },
107319
- "fieldName": "form",
107336
+ "description": "Use this slot to render a label.",
107337
+ "name": "label",
107320
107338
  "inheritedFrom": {
107321
- "name": "SbbButtonBaseElement",
107322
- "module": "core/base-elements/button-base-element.js"
107339
+ "name": "SbbFormFieldElement",
107340
+ "module": "form-field/form-field/form-field.component.js"
107323
107341
  }
107324
107342
  },
107325
107343
  {
107326
- "name": "name",
107327
- "description": "Name of the form element. Will be read from name attribute.",
107328
- "type": {
107329
- "text": "string"
107330
- },
107331
- "fieldName": "name",
107344
+ "description": "Use this slot to render an icon on the left side of the input.",
107345
+ "name": "prefix",
107332
107346
  "inheritedFrom": {
107333
- "name": "SbbFormAssociatedMixin",
107334
- "module": "core/mixins/form-associated-mixin.js"
107347
+ "name": "SbbFormFieldElement",
107348
+ "module": "form-field/form-field/form-field.component.js"
107335
107349
  }
107336
- }
107337
- ],
107338
- "slots": [
107350
+ },
107339
107351
  {
107340
- "description": "Use the unnamed slot to add content to the secondary-button.",
107341
- "name": "",
107352
+ "description": "Use this slot to render an icon on the right side of the input.",
107353
+ "name": "suffix",
107342
107354
  "inheritedFrom": {
107343
- "name": "SbbSecondaryButtonElement",
107344
- "module": "button/secondary-button/secondary-button.component.js"
107355
+ "name": "SbbFormFieldElement",
107356
+ "module": "form-field/form-field/form-field.component.js"
107345
107357
  }
107346
107358
  },
107347
107359
  {
107348
- "description": "Slot used to display the icon, if one is set.",
107349
- "name": "icon",
107360
+ "description": "Use this slot to render an error.",
107361
+ "name": "error",
107350
107362
  "inheritedFrom": {
107351
- "name": "SbbSecondaryButtonElement",
107352
- "module": "button/secondary-button/secondary-button.component.js"
107363
+ "name": "SbbFormFieldElement",
107364
+ "module": "form-field/form-field/form-field.component.js"
107353
107365
  }
107354
107366
  }
107355
107367
  ],
107356
107368
  "cssProperties": [
107357
107369
  {
107358
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
107359
- "name": "--sbb-button-loading-delay",
107360
- "default": "300ms",
107370
+ "description": "To override the focus outline offset,",
107371
+ "name": "--sbb-form-field-outline-offset",
107361
107372
  "inheritedFrom": {
107362
- "name": "SbbSecondaryButtonElement",
107363
- "module": "button/secondary-button/secondary-button.component.js"
107373
+ "name": "SbbFormFieldElement",
107374
+ "module": "form-field/form-field/form-field.component.js"
107375
+ }
107376
+ },
107377
+ {
107378
+ "description": "To override the z-index of the focus underline effect,",
107379
+ "name": "--sbb-form-field-focus-underline-z-index",
107380
+ "inheritedFrom": {
107381
+ "name": "SbbFormFieldElement",
107382
+ "module": "form-field/form-field/form-field.component.js"
107364
107383
  }
107365
107384
  }
107366
107385
  ]
@@ -107369,18 +107388,18 @@
107369
107388
  "exports": [
107370
107389
  {
107371
107390
  "kind": "js",
107372
- "name": "SbbTimetableFormSwapButtonElement",
107391
+ "name": "SbbTimetableFormFieldElement",
107373
107392
  "declaration": {
107374
- "name": "SbbTimetableFormSwapButtonElement",
107375
- "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
107393
+ "name": "SbbTimetableFormFieldElement",
107394
+ "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
107376
107395
  }
107377
107396
  },
107378
107397
  {
107379
107398
  "kind": "custom-element-definition",
107380
- "name": "sbb-timetable-form-swap-button",
107399
+ "name": "sbb-timetable-form-field",
107381
107400
  "declaration": {
107382
- "name": "SbbTimetableFormSwapButtonElement",
107383
- "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
107401
+ "name": "SbbTimetableFormFieldElement",
107402
+ "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
107384
107403
  }
107385
107404
  }
107386
107405
  ]