@sbb-esta/lyne-elements-dev 4.12.1-dev.1777997554 → 4.12.1-dev.1778029146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/custom-elements.json +1169 -1169
  2. package/package.json +2 -2
@@ -129271,12 +129271,12 @@
129271
129271
  },
129272
129272
  {
129273
129273
  "kind": "javascript-module",
129274
- "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
129274
+ "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
129275
129275
  "declarations": [
129276
129276
  {
129277
129277
  "kind": "class",
129278
- "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
129279
- "name": "SbbTimetableFormFieldElement",
129278
+ "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.",
129279
+ "name": "SbbTimetableFormSwapButtonElement",
129280
129280
  "members": [
129281
129281
  {
129282
129282
  "kind": "field",
@@ -129287,83 +129287,88 @@
129287
129287
  "privacy": "public",
129288
129288
  "static": true,
129289
129289
  "readonly": true,
129290
- "default": "'sbb-timetable-form-field'",
129291
129290
  "inheritedFrom": {
129292
129291
  "name": "SbbElement",
129293
129292
  "module": "core/base-elements/element.js"
129294
- }
129293
+ },
129294
+ "default": "'sbb-timetable-form-swap-button'"
129295
129295
  },
129296
129296
  {
129297
129297
  "kind": "field",
129298
- "name": "_routeIcon",
129299
- "type": {
129300
- "text": "boolean"
129301
- },
129298
+ "name": "_languageController",
129302
129299
  "privacy": "private",
129303
- "default": "false"
129300
+ "default": "new SbbLanguageController(this)"
129304
129301
  },
129305
129302
  {
129306
- "kind": "field",
129307
- "name": "borderless",
129308
- "type": {
129309
- "text": "boolean"
129303
+ "kind": "method",
129304
+ "name": "_invertFieldValues",
129305
+ "privacy": "private",
129306
+ "return": {
129307
+ "type": {
129308
+ "text": "void"
129309
+ }
129310
+ },
129311
+ "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
129312
+ },
129313
+ {
129314
+ "kind": "method",
129315
+ "name": "renderIconName",
129316
+ "privacy": "protected",
129317
+ "return": {
129318
+ "type": {
129319
+ "text": "string"
129320
+ }
129310
129321
  },
129311
- "privacy": "public",
129312
- "default": "true",
129313
- "description": "Whether to display the form field without a border.",
129314
- "attribute": "borderless",
129315
- "reflects": true,
129316
129322
  "inheritedFrom": {
129317
- "name": "SbbFormFieldElement",
129318
- "module": "form-field/form-field/form-field.component.js"
129323
+ "name": "SbbIconNameMixin",
129324
+ "module": "icon/icon-name-mixin.js"
129319
129325
  }
129320
129326
  },
129321
129327
  {
129322
129328
  "kind": "field",
129323
- "name": "floatingLabel",
129329
+ "name": "size",
129324
129330
  "type": {
129325
- "text": "boolean"
129331
+ "text": "SbbButtonSize"
129326
129332
  },
129327
129333
  "privacy": "public",
129328
- "default": "true",
129329
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
129330
- "attribute": "floating-label",
129334
+ "description": "Size variant, either l, m or s.",
129335
+ "default": "'l' / 's' (lean)",
129336
+ "attribute": "size",
129331
129337
  "reflects": true,
129332
129338
  "inheritedFrom": {
129333
- "name": "SbbFormFieldElement",
129334
- "module": "form-field/form-field/form-field.component.js"
129339
+ "name": "SbbButtonCommonElementMixin",
129340
+ "module": "button/common/button-common.js"
129335
129341
  }
129336
129342
  },
129337
129343
  {
129338
129344
  "kind": "field",
129339
- "name": "width",
129345
+ "name": "loading",
129340
129346
  "type": {
129341
- "text": "string"
129347
+ "text": "boolean"
129342
129348
  },
129343
129349
  "privacy": "public",
129344
- "default": "'collapse'",
129345
- "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.",
129346
- "attribute": "width",
129350
+ "default": "false",
129351
+ "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.",
129352
+ "attribute": "loading",
129347
129353
  "reflects": true,
129348
129354
  "inheritedFrom": {
129349
- "name": "SbbFormFieldElement",
129350
- "module": "form-field/form-field/form-field.component.js"
129355
+ "name": "SbbButtonCommonElementMixin",
129356
+ "module": "button/common/button-common.js"
129351
129357
  }
129352
129358
  },
129353
129359
  {
129354
- "kind": "field",
129355
- "name": "size",
129356
- "type": {
129357
- "text": "string"
129360
+ "kind": "method",
129361
+ "name": "renderTemplate",
129362
+ "privacy": "protected",
129363
+ "return": {
129364
+ "type": {
129365
+ "text": "TemplateResult"
129366
+ }
129358
129367
  },
129359
- "privacy": "public",
129360
- "description": "Size variant, either l, m or s.",
129361
- "default": "'l'",
129362
- "attribute": "size",
129363
- "reflects": true,
129368
+ "description": "Override this method to render the component template.",
129364
129369
  "inheritedFrom": {
129365
- "name": "SbbFormFieldElement",
129366
- "module": "form-field/form-field/form-field.component.js"
129370
+ "name": "SbbActionBaseElement",
129371
+ "module": "core/base-elements/action-base-element.js"
129367
129372
  }
129368
129373
  },
129369
129374
  {
@@ -129384,584 +129389,631 @@
129384
129389
  },
129385
129390
  {
129386
129391
  "kind": "field",
129387
- "name": "_excludedFocusElements",
129392
+ "name": "iconName",
129388
129393
  "type": {
129389
- "text": "array"
129394
+ "text": "string"
129390
129395
  },
129391
- "privacy": "private",
129392
- "readonly": true,
129393
- "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
129396
+ "privacy": "public",
129397
+ "default": "''",
129398
+ "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.",
129399
+ "attribute": "icon-name",
129394
129400
  "inheritedFrom": {
129395
- "name": "SbbFormFieldElement",
129396
- "module": "form-field/form-field/form-field.component.js"
129401
+ "name": "SbbIconNameMixin",
129402
+ "module": "icon/icon-name-mixin.js"
129397
129403
  }
129398
129404
  },
129399
129405
  {
129400
- "kind": "field",
129401
- "name": "_floatingLabelSupportedInputElements",
129402
- "type": {
129403
- "text": "array"
129406
+ "kind": "method",
129407
+ "name": "renderIconSlot",
129408
+ "privacy": "protected",
129409
+ "return": {
129410
+ "type": {
129411
+ "text": "TemplateResult"
129412
+ }
129404
129413
  },
129405
- "privacy": "private",
129406
- "readonly": true,
129407
- "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
129414
+ "parameters": [
129415
+ {
129416
+ "name": "classname",
129417
+ "optional": true,
129418
+ "type": {
129419
+ "text": "string"
129420
+ }
129421
+ }
129422
+ ],
129408
129423
  "inheritedFrom": {
129409
- "name": "SbbFormFieldElement",
129410
- "module": "form-field/form-field/form-field.component.js"
129424
+ "name": "SbbIconNameMixin",
129425
+ "module": "icon/icon-name-mixin.js"
129411
129426
  }
129412
129427
  },
129413
129428
  {
129414
- "kind": "field",
129415
- "name": "_floatingLabelSupportedInputTypes",
129416
- "type": {
129417
- "text": "array"
129418
- },
129429
+ "kind": "method",
129430
+ "name": "_renderIconName",
129419
129431
  "privacy": "private",
129420
- "readonly": true,
129421
- "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
129432
+ "return": {
129433
+ "type": {
129434
+ "text": "string"
129435
+ }
129436
+ },
129422
129437
  "inheritedFrom": {
129423
- "name": "SbbFormFieldElement",
129424
- "module": "form-field/form-field/form-field.component.js"
129438
+ "name": "SbbIconNameMixin",
129439
+ "module": "icon/icon-name-mixin.js"
129425
129440
  }
129426
129441
  },
129427
129442
  {
129428
129443
  "kind": "field",
129429
- "name": "errorSpace",
129444
+ "name": "disabledInteractive",
129430
129445
  "type": {
129431
- "text": "'none' | 'reserve'"
129446
+ "text": "boolean"
129432
129447
  },
129433
129448
  "privacy": "public",
129434
- "default": "'none'",
129435
- "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
129436
- "attribute": "error-space",
129449
+ "default": "false",
129450
+ "description": "Whether the button should be aria-disabled but stay interactive.",
129451
+ "attribute": "disabled-interactive",
129437
129452
  "reflects": true,
129438
129453
  "inheritedFrom": {
129439
- "name": "SbbFormFieldElement",
129440
- "module": "form-field/form-field/form-field.component.js"
129454
+ "name": "SbbDisabledInteractiveMixin",
129455
+ "module": "core/mixins/disabled-mixin.js"
129441
129456
  }
129442
129457
  },
129443
129458
  {
129444
129459
  "kind": "field",
129445
- "name": "optional",
129460
+ "name": "disabled",
129461
+ "privacy": "public",
129462
+ "description": "Whether the component is disabled.",
129463
+ "default": "false",
129446
129464
  "type": {
129447
129465
  "text": "boolean"
129448
129466
  },
129449
- "privacy": "public",
129450
- "default": "false",
129451
- "description": "Indicates whether the input is optional.",
129452
- "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
129453
- "attribute": "optional",
129467
+ "attribute": "disabled",
129468
+ "reflects": true,
129454
129469
  "inheritedFrom": {
129455
- "name": "SbbFormFieldElement",
129456
- "module": "form-field/form-field/form-field.component.js"
129470
+ "name": "SbbDisabledMixin",
129471
+ "module": "core/mixins/disabled-mixin.js"
129457
129472
  }
129458
129473
  },
129459
129474
  {
129460
129475
  "kind": "field",
129461
- "name": "hiddenLabel",
129476
+ "name": "#disabled",
129477
+ "privacy": "private",
129462
129478
  "type": {
129463
129479
  "text": "boolean"
129464
129480
  },
129465
- "privacy": "public",
129466
129481
  "default": "false",
129467
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
129468
- "attribute": "hidden-label",
129469
- "reflects": true,
129470
129482
  "inheritedFrom": {
129471
- "name": "SbbFormFieldElement",
129472
- "module": "form-field/form-field/form-field.component.js"
129483
+ "name": "SbbDisabledMixin",
129484
+ "module": "core/mixins/disabled-mixin.js"
129473
129485
  }
129474
129486
  },
129475
129487
  {
129476
- "kind": "field",
129477
- "name": "_errorElements",
129478
- "type": {
129479
- "text": "Element[]"
129488
+ "kind": "method",
129489
+ "name": "isDisabledExternally",
129490
+ "privacy": "protected",
129491
+ "return": {
129492
+ "type": {
129493
+ "text": "boolean"
129494
+ }
129480
129495
  },
129481
- "privacy": "private",
129482
- "default": "[]",
129483
- "description": "It is used internally to get the `error` slot.",
129496
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
129484
129497
  "inheritedFrom": {
129485
- "name": "SbbFormFieldElement",
129486
- "module": "form-field/form-field/form-field.component.js"
129498
+ "name": "SbbDisabledMixin",
129499
+ "module": "core/mixins/disabled-mixin.js"
129487
129500
  }
129488
129501
  },
129489
129502
  {
129490
129503
  "kind": "field",
129491
- "name": "_hintElements",
129504
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
129492
129505
  "type": {
129493
- "text": "Element[]"
129506
+ "text": "array"
129494
129507
  },
129495
129508
  "privacy": "private",
129496
- "default": "[]",
129497
- "description": "It is used internally to get the `hint` slot.",
129509
+ "readonly": true,
129510
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
129498
129511
  "inheritedFrom": {
129499
- "name": "SbbFormFieldElement",
129500
- "module": "form-field/form-field/form-field.component.js"
129512
+ "name": "SbbButtonBaseElement",
129513
+ "module": "core/base-elements/button-base-element.js"
129501
129514
  }
129502
129515
  },
129503
129516
  {
129504
129517
  "kind": "field",
129505
- "name": "_input",
129518
+ "name": "value",
129506
129519
  "type": {
129507
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129520
+ "text": "string"
129508
129521
  },
129509
- "privacy": "private",
129510
- "default": "null",
129511
- "description": "Reference to the slotted input element.",
129522
+ "privacy": "public",
129512
129523
  "inheritedFrom": {
129513
- "name": "SbbFormFieldElement",
129514
- "module": "form-field/form-field/form-field.component.js"
129515
- }
129524
+ "name": "SbbButtonBaseElement",
129525
+ "module": "core/base-elements/button-base-element.js"
129526
+ },
129527
+ "default": "''",
129528
+ "description": "Value of the form element.",
129529
+ "attribute": "value"
129516
129530
  },
129517
129531
  {
129518
129532
  "kind": "field",
129519
- "name": "_label",
129533
+ "name": "type",
129534
+ "privacy": "public",
129535
+ "description": "The type attribute to use for the button.",
129536
+ "default": "'button'",
129520
129537
  "type": {
129521
- "text": "HTMLLabelElement"
129538
+ "text": "SbbButtonType"
129522
129539
  },
129523
- "privacy": "private",
129524
- "description": "Reference to the slotted label elements.",
129540
+ "attribute": "type",
129525
129541
  "inheritedFrom": {
129526
- "name": "SbbFormFieldElement",
129527
- "module": "form-field/form-field/form-field.component.js"
129542
+ "name": "SbbButtonBaseElement",
129543
+ "module": "core/base-elements/button-base-element.js"
129528
129544
  }
129529
129545
  },
129530
129546
  {
129531
129547
  "kind": "field",
129532
- "name": "inputElement",
129548
+ "name": "form",
129533
129549
  "type": {
129534
- "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
129550
+ "text": "HTMLFormElement | null"
129535
129551
  },
129536
129552
  "privacy": "public",
129537
- "description": "Returns the input element.",
129538
- "readonly": true,
129553
+ "description": "The `<form>` element to associate the button with.",
129539
129554
  "inheritedFrom": {
129540
- "name": "SbbFormFieldElement",
129541
- "module": "form-field/form-field/form-field.component.js"
129542
- }
129555
+ "name": "SbbButtonBaseElement",
129556
+ "module": "core/base-elements/button-base-element.js"
129557
+ },
129558
+ "attribute": "form"
129543
129559
  },
129544
129560
  {
129545
129561
  "kind": "field",
129546
- "name": "label",
129562
+ "name": "_formId",
129547
129563
  "type": {
129548
- "text": "HTMLLabelElement | null"
129564
+ "text": "string"
129549
129565
  },
129550
- "privacy": "public",
129551
- "description": "Reference to the slotted label.",
129552
- "readonly": true,
129566
+ "privacy": "private",
129567
+ "default": "''",
129553
129568
  "inheritedFrom": {
129554
- "name": "SbbFormFieldElement",
129555
- "module": "form-field/form-field/form-field.component.js"
129569
+ "name": "SbbButtonBaseElement",
129570
+ "module": "core/base-elements/button-base-element.js"
129556
129571
  }
129557
129572
  },
129558
129573
  {
129559
129574
  "kind": "field",
129560
- "name": "_language",
129575
+ "name": "_handleButtonClick",
129561
129576
  "privacy": "private",
129562
- "default": "new SbbLanguageController(this)",
129563
129577
  "inheritedFrom": {
129564
- "name": "SbbFormFieldElement",
129565
- "module": "form-field/form-field/form-field.component.js"
129578
+ "name": "SbbButtonBaseElement",
129579
+ "module": "core/base-elements/button-base-element.js"
129566
129580
  }
129567
129581
  },
129568
129582
  {
129569
- "kind": "field",
129570
- "name": "_formFieldAttributeObserver",
129583
+ "kind": "method",
129584
+ "name": "_requestSubmit",
129571
129585
  "privacy": "private",
129572
- "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
129586
+ "return": {
129587
+ "type": {
129588
+ "text": "void"
129589
+ }
129590
+ },
129591
+ "parameters": [
129592
+ {
129593
+ "name": "form",
129594
+ "type": {
129595
+ "text": "HTMLFormElement"
129596
+ }
129597
+ }
129598
+ ],
129573
129599
  "inheritedFrom": {
129574
- "name": "SbbFormFieldElement",
129575
- "module": "form-field/form-field/form-field.component.js"
129600
+ "name": "SbbButtonBaseElement",
129601
+ "module": "core/base-elements/button-base-element.js"
129576
129602
  }
129577
129603
  },
129578
129604
  {
129579
129605
  "kind": "field",
129580
- "name": "_inputFormAbortController",
129606
+ "name": "_formKeyDown",
129581
129607
  "privacy": "private",
129582
- "default": "new AbortController()",
129583
129608
  "inheritedFrom": {
129584
- "name": "SbbFormFieldElement",
129585
- "module": "form-field/form-field/form-field.component.js"
129609
+ "name": "SbbButtonBaseElement",
129610
+ "module": "core/base-elements/button-base-element.js"
129586
129611
  }
129587
129612
  },
129588
129613
  {
129589
129614
  "kind": "field",
129590
- "name": "_control",
129615
+ "name": "formAssociated",
129591
129616
  "type": {
129592
- "text": "SbbFormFieldElementControl | null"
129617
+ "text": "boolean"
129593
129618
  },
129594
- "privacy": "private",
129595
- "default": "null",
129619
+ "privacy": "public",
129620
+ "static": true,
129621
+ "default": "true",
129596
129622
  "inheritedFrom": {
129597
- "name": "SbbFormFieldElement",
129598
- "module": "form-field/form-field/form-field.component.js"
129623
+ "name": "SbbFormAssociatedMixin",
129624
+ "module": "core/mixins/form-associated-mixin.js"
129599
129625
  }
129600
129626
  },
129601
129627
  {
129602
129628
  "kind": "field",
129603
- "name": "_previousType",
129629
+ "name": "name",
129630
+ "privacy": "public",
129631
+ "description": "Name of the form element. Will be read from name attribute.",
129604
129632
  "type": {
129605
- "text": "string | null"
129633
+ "text": "string"
129606
129634
  },
129607
- "privacy": "private",
129608
- "default": "null",
129635
+ "attribute": "name",
129609
129636
  "inheritedFrom": {
129610
- "name": "SbbFormFieldElement",
129611
- "module": "form-field/form-field/form-field.component.js"
129637
+ "name": "SbbFormAssociatedMixin",
129638
+ "module": "core/mixins/form-associated-mixin.js"
129612
129639
  }
129613
129640
  },
129614
129641
  {
129615
- "kind": "method",
129616
- "name": "_handleWrapperClick",
129617
- "privacy": "private",
129618
- "return": {
129619
- "type": {
129620
- "text": "void"
129621
- }
129642
+ "kind": "field",
129643
+ "name": "validity",
129644
+ "type": {
129645
+ "text": "ValidityState"
129622
129646
  },
129623
- "parameters": [
129624
- {
129625
- "name": "event",
129626
- "type": {
129627
- "text": "MouseEvent"
129628
- }
129629
- }
129630
- ],
129647
+ "privacy": "public",
129648
+ "description": "Returns the ValidityState object for this element.",
129649
+ "readonly": true,
129631
129650
  "inheritedFrom": {
129632
- "name": "SbbFormFieldElement",
129633
- "module": "form-field/form-field/form-field.component.js"
129651
+ "name": "SbbFormAssociatedMixin",
129652
+ "module": "core/mixins/form-associated-mixin.js"
129634
129653
  }
129635
129654
  },
129636
129655
  {
129637
- "kind": "method",
129638
- "name": "_isElementFocusExcluded",
129639
- "privacy": "private",
129640
- "return": {
129641
- "type": {
129642
- "text": "boolean"
129643
- }
129656
+ "kind": "field",
129657
+ "name": "validationMessage",
129658
+ "type": {
129659
+ "text": "string"
129644
129660
  },
129645
- "parameters": [
129646
- {
129647
- "name": "event",
129648
- "type": {
129649
- "text": "Event"
129650
- }
129651
- }
129652
- ],
129661
+ "privacy": "public",
129662
+ "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.",
129663
+ "readonly": true,
129653
129664
  "inheritedFrom": {
129654
- "name": "SbbFormFieldElement",
129655
- "module": "form-field/form-field/form-field.component.js"
129665
+ "name": "SbbFormAssociatedMixin",
129666
+ "module": "core/mixins/form-associated-mixin.js"
129656
129667
  }
129657
129668
  },
129658
129669
  {
129659
- "kind": "method",
129660
- "name": "_onSlotLabelChange",
129661
- "privacy": "private",
129662
- "return": {
129663
- "type": {
129664
- "text": "void"
129665
- }
129670
+ "kind": "field",
129671
+ "name": "willValidate",
129672
+ "type": {
129673
+ "text": "boolean"
129666
129674
  },
129675
+ "privacy": "public",
129676
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
129677
+ "readonly": true,
129667
129678
  "inheritedFrom": {
129668
- "name": "SbbFormFieldElement",
129669
- "module": "form-field/form-field/form-field.component.js"
129679
+ "name": "SbbFormAssociatedMixin",
129680
+ "module": "core/mixins/form-associated-mixin.js"
129670
129681
  }
129671
129682
  },
129672
129683
  {
129673
- "kind": "method",
129674
- "name": "_onSlotInputChange",
129684
+ "kind": "field",
129685
+ "name": "_validityStates",
129675
129686
  "privacy": "private",
129676
- "return": {
129677
- "type": {
129678
- "text": "void"
129679
- }
129680
- },
129681
- "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
129687
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
129682
129688
  "inheritedFrom": {
129683
- "name": "SbbFormFieldElement",
129684
- "module": "form-field/form-field/form-field.component.js"
129689
+ "name": "SbbFormAssociatedMixin",
129690
+ "module": "core/mixins/form-associated-mixin.js"
129685
129691
  }
129686
129692
  },
129687
129693
  {
129688
- "kind": "method",
129689
- "name": "_assignSlots",
129690
- "privacy": "private",
129691
- "return": {
129692
- "type": {
129693
- "text": "void"
129694
- }
129694
+ "kind": "field",
129695
+ "name": "formDisabled",
129696
+ "type": {
129697
+ "text": "boolean"
129695
129698
  },
129699
+ "privacy": "protected",
129700
+ "default": "false",
129701
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
129696
129702
  "inheritedFrom": {
129697
- "name": "SbbFormFieldElement",
129698
- "module": "form-field/form-field/form-field.component.js"
129703
+ "name": "SbbFormAssociatedMixin",
129704
+ "module": "core/mixins/form-associated-mixin.js"
129699
129705
  }
129700
129706
  },
129701
129707
  {
129702
129708
  "kind": "method",
129703
- "name": "_connectInputElement",
129704
- "privacy": "private",
129709
+ "name": "checkValidity",
129710
+ "privacy": "public",
129705
129711
  "return": {
129706
129712
  "type": {
129707
- "text": "'changed' | 'no-input' | 'unchanged'"
129713
+ "text": "boolean"
129708
129714
  }
129709
129715
  },
129716
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
129710
129717
  "inheritedFrom": {
129711
- "name": "SbbFormFieldElement",
129712
- "module": "form-field/form-field/form-field.component.js"
129718
+ "name": "SbbFormAssociatedMixin",
129719
+ "module": "core/mixins/form-associated-mixin.js"
129713
129720
  }
129714
129721
  },
129715
129722
  {
129716
129723
  "kind": "method",
129717
- "name": "_syncLabelInputReferences",
129718
- "privacy": "private",
129724
+ "name": "reportValidity",
129725
+ "privacy": "public",
129719
129726
  "return": {
129720
129727
  "type": {
129721
- "text": "void"
129728
+ "text": "boolean"
129722
129729
  }
129723
129730
  },
129731
+ "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.",
129724
129732
  "inheritedFrom": {
129725
- "name": "SbbFormFieldElement",
129726
- "module": "form-field/form-field/form-field.component.js"
129733
+ "name": "SbbFormAssociatedMixin",
129734
+ "module": "core/mixins/form-associated-mixin.js"
129727
129735
  }
129728
129736
  },
129729
129737
  {
129730
129738
  "kind": "method",
129731
- "name": "_isInputElement",
129732
- "privacy": "private",
129739
+ "name": "setCustomValidity",
129740
+ "privacy": "public",
129733
129741
  "return": {
129734
129742
  "type": {
129735
- "text": "boolean"
129743
+ "text": "void"
129736
129744
  }
129737
129745
  },
129738
129746
  "parameters": [
129739
129747
  {
129740
- "name": "input",
129748
+ "name": "message",
129741
129749
  "type": {
129742
- "text": "Element"
129750
+ "text": "string"
129743
129751
  }
129744
129752
  }
129745
129753
  ],
129754
+ "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.",
129746
129755
  "inheritedFrom": {
129747
- "name": "SbbFormFieldElement",
129748
- "module": "form-field/form-field/form-field.component.js"
129756
+ "name": "SbbFormAssociatedMixin",
129757
+ "module": "core/mixins/form-associated-mixin.js"
129749
129758
  }
129750
129759
  },
129751
129760
  {
129752
129761
  "kind": "method",
129753
- "name": "_readInputState",
129762
+ "name": "_hasDisabledAncestor",
129754
129763
  "privacy": "private",
129755
129764
  "return": {
129756
129765
  "type": {
129757
- "text": "void"
129766
+ "text": "boolean"
129758
129767
  }
129759
129768
  },
129760
129769
  "inheritedFrom": {
129761
- "name": "SbbFormFieldElement",
129762
- "module": "form-field/form-field/form-field.component.js"
129770
+ "name": "SbbFormAssociatedMixin",
129771
+ "module": "core/mixins/form-associated-mixin.js"
129763
129772
  }
129764
129773
  },
129765
129774
  {
129766
129775
  "kind": "method",
129767
- "name": "_registerInputFormListener",
129768
- "privacy": "private",
129776
+ "name": "updateFormValue",
129777
+ "privacy": "protected",
129769
129778
  "return": {
129770
129779
  "type": {
129771
129780
  "text": "void"
129772
129781
  }
129773
129782
  },
129783
+ "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",
129774
129784
  "inheritedFrom": {
129775
- "name": "SbbFormFieldElement",
129776
- "module": "form-field/form-field/form-field.component.js"
129785
+ "name": "SbbFormAssociatedMixin",
129786
+ "module": "core/mixins/form-associated-mixin.js"
129777
129787
  }
129778
129788
  },
129779
129789
  {
129780
129790
  "kind": "method",
129781
- "name": "_patchInputValue",
129782
- "privacy": "private",
129791
+ "name": "formState",
129792
+ "privacy": "protected",
129783
129793
  "return": {
129784
129794
  "type": {
129785
- "text": "void"
129795
+ "text": "FormRestoreState"
129786
129796
  }
129787
129797
  },
129788
129798
  "inheritedFrom": {
129789
- "name": "SbbFormFieldElement",
129790
- "module": "form-field/form-field/form-field.component.js"
129799
+ "name": "SbbFormAssociatedMixin",
129800
+ "module": "core/mixins/form-associated-mixin.js"
129791
129801
  }
129792
129802
  },
129793
129803
  {
129794
129804
  "kind": "method",
129795
- "name": "_unpatchInputValue",
129796
- "privacy": "private",
129805
+ "name": "setValidityFlag",
129806
+ "privacy": "protected",
129797
129807
  "return": {
129798
129808
  "type": {
129799
129809
  "text": "void"
129800
129810
  }
129801
129811
  },
129812
+ "parameters": [
129813
+ {
129814
+ "name": "flag",
129815
+ "type": {
129816
+ "text": "T"
129817
+ }
129818
+ },
129819
+ {
129820
+ "name": "message",
129821
+ "type": {
129822
+ "text": "string"
129823
+ }
129824
+ },
129825
+ {
129826
+ "name": "flagValue",
129827
+ "optional": true,
129828
+ "type": {
129829
+ "text": "ValidityStateFlags[T]"
129830
+ }
129831
+ }
129832
+ ],
129833
+ "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).",
129802
129834
  "inheritedFrom": {
129803
- "name": "SbbFormFieldElement",
129804
- "module": "form-field/form-field/form-field.component.js"
129835
+ "name": "SbbFormAssociatedMixin",
129836
+ "module": "core/mixins/form-associated-mixin.js"
129805
129837
  }
129806
129838
  },
129807
129839
  {
129808
129840
  "kind": "method",
129809
- "name": "_checkAndUpdateInputEmpty",
129810
- "privacy": "private",
129841
+ "name": "removeValidityFlag",
129842
+ "privacy": "protected",
129811
129843
  "return": {
129812
129844
  "type": {
129813
129845
  "text": "void"
129814
129846
  }
129815
129847
  },
129816
- "inheritedFrom": {
129817
- "name": "SbbFormFieldElement",
129818
- "module": "form-field/form-field/form-field.component.js"
129819
- }
129820
- },
129821
- {
129822
- "kind": "method",
129823
- "name": "_isInputEmpty",
129824
- "privacy": "private",
129825
- "return": {
129826
- "type": {
129827
- "text": "boolean"
129848
+ "parameters": [
129849
+ {
129850
+ "name": "flag",
129851
+ "type": {
129852
+ "text": "T"
129853
+ }
129828
129854
  }
129829
- },
129855
+ ],
129856
+ "description": "Removes the validity state flag entry and updates validity state.",
129830
129857
  "inheritedFrom": {
129831
- "name": "SbbFormFieldElement",
129832
- "module": "form-field/form-field/form-field.component.js"
129858
+ "name": "SbbFormAssociatedMixin",
129859
+ "module": "core/mixins/form-associated-mixin.js"
129833
129860
  }
129834
129861
  },
129835
129862
  {
129836
129863
  "kind": "method",
129837
- "name": "_isInputValueEmpty",
129838
- "privacy": "private",
129864
+ "name": "validate",
129865
+ "privacy": "protected",
129839
129866
  "return": {
129840
129867
  "type": {
129841
- "text": "boolean"
129868
+ "text": "void"
129842
129869
  }
129843
129870
  },
129871
+ "description": "To be called whenever the current element needs to be validated.",
129844
129872
  "inheritedFrom": {
129845
- "name": "SbbFormFieldElement",
129846
- "module": "form-field/form-field/form-field.component.js"
129873
+ "name": "SbbFormAssociatedMixin",
129874
+ "module": "core/mixins/form-associated-mixin.js"
129847
129875
  }
129848
129876
  },
129849
129877
  {
129850
129878
  "kind": "method",
129851
- "name": "_onSlotErrorChange",
129852
- "privacy": "private",
129879
+ "name": "shouldValidate",
129880
+ "privacy": "protected",
129853
129881
  "return": {
129854
129882
  "type": {
129855
- "text": "void"
129883
+ "text": "boolean"
129856
129884
  }
129857
129885
  },
129858
129886
  "parameters": [
129859
129887
  {
129860
- "name": "event",
129888
+ "name": "name",
129861
129889
  "type": {
129862
- "text": "Event"
129890
+ "text": "PropertyKey | undefined"
129863
129891
  }
129864
129892
  }
129865
129893
  ],
129866
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
129894
+ "description": "Whether validation should be run on a property change with the given name.",
129867
129895
  "inheritedFrom": {
129868
- "name": "SbbFormFieldElement",
129869
- "module": "form-field/form-field/form-field.component.js"
129896
+ "name": "SbbFormAssociatedMixin",
129897
+ "module": "core/mixins/form-associated-mixin.js"
129870
129898
  }
129871
129899
  },
129872
129900
  {
129873
129901
  "kind": "method",
129874
- "name": "_onSlotHintChange",
129902
+ "name": "_setInternalValidity",
129875
129903
  "privacy": "private",
129876
129904
  "return": {
129877
129905
  "type": {
129878
129906
  "text": "void"
129879
129907
  }
129880
129908
  },
129909
+ "inheritedFrom": {
129910
+ "name": "SbbFormAssociatedMixin",
129911
+ "module": "core/mixins/form-associated-mixin.js"
129912
+ }
129913
+ },
129914
+ {
129915
+ "kind": "field",
129916
+ "name": "role",
129917
+ "type": {
129918
+ "text": "ElementInternals['role']"
129919
+ },
129920
+ "privacy": "public",
129921
+ "static": true,
129922
+ "readonly": true,
129923
+ "default": "'button'",
129924
+ "inheritedFrom": {
129925
+ "name": "SbbButtonLikeBaseElement",
129926
+ "module": "core/base-elements/button-base-element.js"
129927
+ }
129928
+ },
129929
+ {
129930
+ "kind": "field",
129931
+ "name": "_preventScrollOnSpaceKeydown",
129932
+ "privacy": "private",
129933
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
129881
129934
  "parameters": [
129882
129935
  {
129883
- "name": "event",
129884
- "type": {
129885
- "text": "Event"
129886
- }
129936
+ "description": "The origin event.",
129937
+ "name": "event"
129887
129938
  }
129888
129939
  ],
129889
- "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
129890
129940
  "inheritedFrom": {
129891
- "name": "SbbFormFieldElement",
129892
- "module": "form-field/form-field/form-field.component.js"
129941
+ "name": "SbbButtonLikeBaseElement",
129942
+ "module": "core/base-elements/button-base-element.js"
129893
129943
  }
129894
129944
  },
129895
129945
  {
129896
- "kind": "method",
129897
- "name": "_assignAriaDescribedByElements",
129946
+ "kind": "field",
129947
+ "name": "_removeActiveMarker",
129898
129948
  "privacy": "private",
129899
- "return": {
129900
- "type": {
129901
- "text": "void"
129902
- }
129903
- },
129904
129949
  "inheritedFrom": {
129905
- "name": "SbbFormFieldElement",
129906
- "module": "form-field/form-field/form-field.component.js"
129950
+ "name": "SbbButtonLikeBaseElement",
129951
+ "module": "core/base-elements/button-base-element.js"
129907
129952
  }
129908
129953
  },
129909
129954
  {
129910
- "kind": "method",
129911
- "name": "reset",
129912
- "privacy": "public",
129913
- "return": {
129914
- "type": {
129915
- "text": "void"
129955
+ "kind": "field",
129956
+ "name": "_dispatchClickEventOnSpaceKeyup",
129957
+ "privacy": "private",
129958
+ "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.",
129959
+ "parameters": [
129960
+ {
129961
+ "description": "The origin event.",
129962
+ "name": "event"
129916
129963
  }
129917
- },
129918
- "description": "Manually reset the form field. Currently, this only resets the floating label.",
129964
+ ],
129919
129965
  "inheritedFrom": {
129920
- "name": "SbbFormFieldElement",
129921
- "module": "form-field/form-field/form-field.component.js"
129966
+ "name": "SbbButtonLikeBaseElement",
129967
+ "module": "core/base-elements/button-base-element.js"
129922
129968
  }
129923
129969
  },
129924
129970
  {
129925
- "kind": "method",
129926
- "name": "clear",
129927
- "privacy": "public",
129928
- "return": {
129929
- "type": {
129930
- "text": "void"
129931
- }
129971
+ "kind": "field",
129972
+ "name": "_dispatchClickEvent",
129973
+ "privacy": "private",
129974
+ "inheritedFrom": {
129975
+ "name": "SbbButtonLikeBaseElement",
129976
+ "module": "core/base-elements/button-base-element.js"
129977
+ }
129978
+ },
129979
+ {
129980
+ "kind": "field",
129981
+ "name": "maybeDisabled",
129982
+ "type": {
129983
+ "text": "boolean | undefined"
129932
129984
  },
129933
- "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
129985
+ "privacy": "protected",
129986
+ "readonly": true,
129934
129987
  "inheritedFrom": {
129935
- "name": "SbbFormFieldElement",
129936
- "module": "form-field/form-field/form-field.component.js"
129988
+ "name": "SbbActionBaseElement",
129989
+ "module": "core/base-elements/action-base-element.js"
129937
129990
  }
129938
129991
  },
129939
129992
  {
129940
- "kind": "method",
129941
- "name": "_syncNegative",
129942
- "privacy": "private",
129943
- "return": {
129944
- "type": {
129945
- "text": "void"
129946
- }
129993
+ "kind": "field",
129994
+ "name": "maybeDisabledInteractive",
129995
+ "type": {
129996
+ "text": "boolean | undefined"
129947
129997
  },
129998
+ "privacy": "protected",
129999
+ "readonly": true,
129948
130000
  "inheritedFrom": {
129949
- "name": "SbbFormFieldElement",
129950
- "module": "form-field/form-field/form-field.component.js"
130001
+ "name": "SbbActionBaseElement",
130002
+ "module": "core/base-elements/action-base-element.js"
129951
130003
  }
129952
130004
  },
129953
130005
  {
129954
130006
  "kind": "method",
129955
- "name": "_syncSize",
129956
- "privacy": "private",
130007
+ "name": "setupBaseEventHandlers",
130008
+ "privacy": "protected",
129957
130009
  "return": {
129958
130010
  "type": {
129959
130011
  "text": "void"
129960
130012
  }
129961
130013
  },
129962
130014
  "inheritedFrom": {
129963
- "name": "SbbFormFieldElement",
129964
- "module": "form-field/form-field/form-field.component.js"
130015
+ "name": "SbbActionBaseElement",
130016
+ "module": "core/base-elements/action-base-element.js"
129965
130017
  }
129966
130018
  },
129967
130019
  {
@@ -130070,184 +130122,184 @@
130070
130122
  }
130071
130123
  }
130072
130124
  ],
130125
+ "events": [
130126
+ {
130127
+ "type": {
130128
+ "text": "Event"
130129
+ },
130130
+ "description": "The change event is fired on the associated inputs when the user modifies the element's value. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.",
130131
+ "name": "change"
130132
+ },
130133
+ {
130134
+ "type": {
130135
+ "text": "InputEvent"
130136
+ },
130137
+ "description": "The input event fires on the associated inputs when the value has been changed as a direct result of a user action.",
130138
+ "name": "input"
130139
+ }
130140
+ ],
130073
130141
  "superclass": {
130074
- "name": "SbbFormFieldElement",
130075
- "module": "form-field.pure.js"
130142
+ "name": "SbbSecondaryButtonElement",
130143
+ "module": "button.pure.js"
130076
130144
  },
130077
- "tagName": "sbb-timetable-form-field",
130145
+ "tagName": "sbb-timetable-form-swap-button",
130078
130146
  "customElement": true,
130079
130147
  "attributes": [
130080
130148
  {
130081
- "name": "negative",
130149
+ "name": "size",
130082
130150
  "type": {
130083
- "text": "boolean"
130151
+ "text": "SbbButtonSize"
130084
130152
  },
130085
- "default": "false",
130086
- "description": "Negative coloring variant flag.",
130087
- "fieldName": "negative",
130153
+ "description": "Size variant, either l, m or s.",
130154
+ "default": "'l' / 's' (lean)",
130155
+ "fieldName": "size",
130088
130156
  "inheritedFrom": {
130089
- "name": "SbbNegativeMixin",
130090
- "module": "core/mixins/negative-mixin.js"
130157
+ "name": "SbbButtonCommonElementMixin",
130158
+ "module": "button/common/button-common.js"
130091
130159
  }
130092
130160
  },
130093
130161
  {
130094
- "name": "error-space",
130162
+ "name": "loading",
130095
130163
  "type": {
130096
- "text": "'none' | 'reserve'"
130164
+ "text": "boolean"
130097
130165
  },
130098
- "default": "'none'",
130099
- "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
130100
- "fieldName": "errorSpace",
130166
+ "default": "false",
130167
+ "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.",
130168
+ "fieldName": "loading",
130101
130169
  "inheritedFrom": {
130102
- "name": "SbbFormFieldElement",
130103
- "module": "form-field/form-field/form-field.component.js"
130170
+ "name": "SbbButtonCommonElementMixin",
130171
+ "module": "button/common/button-common.js"
130104
130172
  }
130105
130173
  },
130106
130174
  {
130107
- "name": "optional",
130175
+ "name": "negative",
130108
130176
  "type": {
130109
130177
  "text": "boolean"
130110
130178
  },
130111
130179
  "default": "false",
130112
- "description": "Indicates whether the input is optional.",
130113
- "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
130114
- "fieldName": "optional",
130180
+ "description": "Negative coloring variant flag.",
130181
+ "fieldName": "negative",
130115
130182
  "inheritedFrom": {
130116
- "name": "SbbFormFieldElement",
130117
- "module": "form-field/form-field/form-field.component.js"
130183
+ "name": "SbbNegativeMixin",
130184
+ "module": "core/mixins/negative-mixin.js"
130118
130185
  }
130119
130186
  },
130120
130187
  {
130121
- "name": "size",
130188
+ "name": "icon-name",
130122
130189
  "type": {
130123
- "text": "'l' | 'm' | 's'"
130190
+ "text": "string"
130124
130191
  },
130125
- "description": "Size variant, either l, m or s.",
130126
- "default": "'m' / 's' (lean)",
130127
- "fieldName": "size",
130192
+ "default": "''",
130193
+ "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.",
130194
+ "fieldName": "iconName",
130128
130195
  "inheritedFrom": {
130129
- "name": "SbbFormFieldElement",
130130
- "module": "form-field/form-field/form-field.component.js"
130196
+ "name": "SbbIconNameMixin",
130197
+ "module": "icon/icon-name-mixin.js"
130131
130198
  }
130132
130199
  },
130133
130200
  {
130134
- "name": "borderless",
130201
+ "name": "disabled-interactive",
130135
130202
  "type": {
130136
130203
  "text": "boolean"
130137
130204
  },
130138
130205
  "default": "false",
130139
- "description": "Whether to display the form field without a border.",
130140
- "fieldName": "borderless",
130206
+ "description": "Whether the button should be aria-disabled but stay interactive.",
130207
+ "fieldName": "disabledInteractive",
130141
130208
  "inheritedFrom": {
130142
- "name": "SbbFormFieldElement",
130143
- "module": "form-field/form-field/form-field.component.js"
130209
+ "name": "SbbDisabledInteractiveMixin",
130210
+ "module": "core/mixins/disabled-mixin.js"
130144
130211
  }
130145
130212
  },
130146
130213
  {
130147
- "name": "width",
130214
+ "name": "disabled",
130215
+ "description": "Whether the component is disabled.",
130216
+ "default": "false",
130148
130217
  "type": {
130149
- "text": "'default' | 'collapse'"
130218
+ "text": "boolean"
130150
130219
  },
130151
- "default": "'default'",
130152
- "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.",
130153
- "fieldName": "width",
130220
+ "fieldName": "disabled",
130154
130221
  "inheritedFrom": {
130155
- "name": "SbbFormFieldElement",
130156
- "module": "form-field/form-field/form-field.component.js"
130222
+ "name": "SbbDisabledMixin",
130223
+ "module": "core/mixins/disabled-mixin.js"
130157
130224
  }
130158
130225
  },
130159
130226
  {
130160
- "name": "hidden-label",
130227
+ "name": "value",
130161
130228
  "type": {
130162
- "text": "boolean"
130229
+ "text": "string"
130163
130230
  },
130164
- "default": "false",
130165
- "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130166
- "fieldName": "hiddenLabel",
130231
+ "default": "''",
130232
+ "description": "Value of the form element.",
130233
+ "fieldName": "value",
130167
130234
  "inheritedFrom": {
130168
- "name": "SbbFormFieldElement",
130169
- "module": "form-field/form-field/form-field.component.js"
130235
+ "name": "SbbButtonBaseElement",
130236
+ "module": "core/base-elements/button-base-element.js"
130170
130237
  }
130171
130238
  },
130172
130239
  {
130173
- "name": "floating-label",
130240
+ "name": "type",
130241
+ "description": "The type attribute to use for the button.",
130242
+ "default": "'button'",
130174
130243
  "type": {
130175
- "text": "boolean"
130244
+ "text": "SbbButtonType"
130176
130245
  },
130177
- "default": "false",
130178
- "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
130179
- "fieldName": "floatingLabel",
130180
- "inheritedFrom": {
130181
- "name": "SbbFormFieldElement",
130182
- "module": "form-field/form-field/form-field.component.js"
130183
- }
130184
- }
130185
- ],
130186
- "slots": [
130187
- {
130188
- "description": "Use this slot to render an input/select or a supported non-native element.",
130189
- "name": "",
130190
- "inheritedFrom": {
130191
- "name": "SbbFormFieldElement",
130192
- "module": "form-field/form-field/form-field.component.js"
130193
- }
130194
- },
130195
- {
130196
- "description": "Use this slot to render a label.",
130197
- "name": "label",
130246
+ "fieldName": "type",
130198
130247
  "inheritedFrom": {
130199
- "name": "SbbFormFieldElement",
130200
- "module": "form-field/form-field/form-field.component.js"
130248
+ "name": "SbbButtonBaseElement",
130249
+ "module": "core/base-elements/button-base-element.js"
130201
130250
  }
130202
130251
  },
130203
130252
  {
130204
- "description": "Use this slot to render an icon on the left side of the input.",
130205
- "name": "prefix",
130253
+ "name": "form",
130254
+ "description": "The `<form>` element to associate the button with.",
130255
+ "type": {
130256
+ "text": "HTMLFormElement | null"
130257
+ },
130258
+ "fieldName": "form",
130206
130259
  "inheritedFrom": {
130207
- "name": "SbbFormFieldElement",
130208
- "module": "form-field/form-field/form-field.component.js"
130260
+ "name": "SbbButtonBaseElement",
130261
+ "module": "core/base-elements/button-base-element.js"
130209
130262
  }
130210
130263
  },
130211
130264
  {
130212
- "description": "Use this slot to render an icon on the right side of the input.",
130213
- "name": "suffix",
130265
+ "name": "name",
130266
+ "description": "Name of the form element. Will be read from name attribute.",
130267
+ "type": {
130268
+ "text": "string"
130269
+ },
130270
+ "fieldName": "name",
130214
130271
  "inheritedFrom": {
130215
- "name": "SbbFormFieldElement",
130216
- "module": "form-field/form-field/form-field.component.js"
130272
+ "name": "SbbFormAssociatedMixin",
130273
+ "module": "core/mixins/form-associated-mixin.js"
130217
130274
  }
130218
- },
130275
+ }
130276
+ ],
130277
+ "slots": [
130219
130278
  {
130220
- "description": "Use this slot to render an error.",
130221
- "name": "error",
130279
+ "description": "Use the unnamed slot to add content to the secondary-button.",
130280
+ "name": "",
130222
130281
  "inheritedFrom": {
130223
- "name": "SbbFormFieldElement",
130224
- "module": "form-field/form-field/form-field.component.js"
130282
+ "name": "SbbSecondaryButtonElement",
130283
+ "module": "button/secondary-button/secondary-button.component.js"
130225
130284
  }
130226
130285
  },
130227
130286
  {
130228
- "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
130229
- "name": "hint",
130287
+ "description": "Slot used to display the icon, if one is set.",
130288
+ "name": "icon",
130230
130289
  "inheritedFrom": {
130231
- "name": "SbbFormFieldElement",
130232
- "module": "form-field/form-field/form-field.component.js"
130290
+ "name": "SbbSecondaryButtonElement",
130291
+ "module": "button/secondary-button/secondary-button.component.js"
130233
130292
  }
130234
130293
  }
130235
130294
  ],
130236
130295
  "cssProperties": [
130237
130296
  {
130238
- "description": "To override the focus outline offset,",
130239
- "name": "--sbb-form-field-outline-offset",
130240
- "inheritedFrom": {
130241
- "name": "SbbFormFieldElement",
130242
- "module": "form-field/form-field/form-field.component.js"
130243
- }
130244
- },
130245
- {
130246
- "description": "To override the z-index of the focus underline effect,",
130247
- "name": "--sbb-form-field-focus-underline-z-index",
130297
+ "description": "The delay before the loading animation starts, when setting the button into loading state.",
130298
+ "name": "--sbb-button-loading-delay",
130299
+ "default": "300ms",
130248
130300
  "inheritedFrom": {
130249
- "name": "SbbFormFieldElement",
130250
- "module": "form-field/form-field/form-field.component.js"
130301
+ "name": "SbbSecondaryButtonElement",
130302
+ "module": "button/secondary-button/secondary-button.component.js"
130251
130303
  }
130252
130304
  }
130253
130305
  ]
@@ -130256,22 +130308,22 @@
130256
130308
  "exports": [
130257
130309
  {
130258
130310
  "kind": "js",
130259
- "name": "SbbTimetableFormFieldElement",
130311
+ "name": "SbbTimetableFormSwapButtonElement",
130260
130312
  "declaration": {
130261
- "name": "SbbTimetableFormFieldElement",
130262
- "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
130313
+ "name": "SbbTimetableFormSwapButtonElement",
130314
+ "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
130263
130315
  }
130264
130316
  }
130265
130317
  ]
130266
130318
  },
130267
130319
  {
130268
130320
  "kind": "javascript-module",
130269
- "path": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js",
130321
+ "path": "timetable-form/timetable-form-field/timetable-form-field.component.js",
130270
130322
  "declarations": [
130271
130323
  {
130272
130324
  "kind": "class",
130273
- "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.",
130274
- "name": "SbbTimetableFormSwapButtonElement",
130325
+ "description": "Extends the `sbb-form-field`. Meant to be used inside a `sbb-timetable-form`.",
130326
+ "name": "SbbTimetableFormFieldElement",
130275
130327
  "members": [
130276
130328
  {
130277
130329
  "kind": "field",
@@ -130282,88 +130334,83 @@
130282
130334
  "privacy": "public",
130283
130335
  "static": true,
130284
130336
  "readonly": true,
130337
+ "default": "'sbb-timetable-form-field'",
130285
130338
  "inheritedFrom": {
130286
130339
  "name": "SbbElement",
130287
130340
  "module": "core/base-elements/element.js"
130288
- },
130289
- "default": "'sbb-timetable-form-swap-button'"
130341
+ }
130290
130342
  },
130291
130343
  {
130292
130344
  "kind": "field",
130293
- "name": "_languageController",
130345
+ "name": "_routeIcon",
130346
+ "type": {
130347
+ "text": "boolean"
130348
+ },
130294
130349
  "privacy": "private",
130295
- "default": "new SbbLanguageController(this)"
130350
+ "default": "false"
130296
130351
  },
130297
130352
  {
130298
- "kind": "method",
130299
- "name": "_invertFieldValues",
130300
- "privacy": "private",
130301
- "return": {
130302
- "type": {
130303
- "text": "void"
130304
- }
130353
+ "kind": "field",
130354
+ "name": "borderless",
130355
+ "type": {
130356
+ "text": "boolean"
130305
130357
  },
130306
- "description": "Search for `sbb-timetable-form-field` inputs, invert their values and dispatch the respective input and change events"
130358
+ "privacy": "public",
130359
+ "default": "true",
130360
+ "description": "Whether to display the form field without a border.",
130361
+ "attribute": "borderless",
130362
+ "reflects": true,
130363
+ "inheritedFrom": {
130364
+ "name": "SbbFormFieldElement",
130365
+ "module": "form-field/form-field/form-field.component.js"
130366
+ }
130307
130367
  },
130308
130368
  {
130309
- "kind": "method",
130310
- "name": "renderIconName",
130311
- "privacy": "protected",
130312
- "return": {
130313
- "type": {
130314
- "text": "string"
130315
- }
130369
+ "kind": "field",
130370
+ "name": "floatingLabel",
130371
+ "type": {
130372
+ "text": "boolean"
130316
130373
  },
130374
+ "privacy": "public",
130375
+ "default": "true",
130376
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
130377
+ "attribute": "floating-label",
130378
+ "reflects": true,
130317
130379
  "inheritedFrom": {
130318
- "name": "SbbIconNameMixin",
130319
- "module": "icon/icon-name-mixin.js"
130380
+ "name": "SbbFormFieldElement",
130381
+ "module": "form-field/form-field/form-field.component.js"
130320
130382
  }
130321
130383
  },
130322
130384
  {
130323
130385
  "kind": "field",
130324
- "name": "size",
130386
+ "name": "width",
130325
130387
  "type": {
130326
- "text": "SbbButtonSize"
130388
+ "text": "string"
130327
130389
  },
130328
130390
  "privacy": "public",
130329
- "description": "Size variant, either l, m or s.",
130330
- "default": "'l' / 's' (lean)",
130331
- "attribute": "size",
130391
+ "default": "'collapse'",
130392
+ "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.",
130393
+ "attribute": "width",
130332
130394
  "reflects": true,
130333
130395
  "inheritedFrom": {
130334
- "name": "SbbButtonCommonElementMixin",
130335
- "module": "button/common/button-common.js"
130396
+ "name": "SbbFormFieldElement",
130397
+ "module": "form-field/form-field/form-field.component.js"
130336
130398
  }
130337
130399
  },
130338
130400
  {
130339
130401
  "kind": "field",
130340
- "name": "loading",
130402
+ "name": "size",
130341
130403
  "type": {
130342
- "text": "boolean"
130404
+ "text": "string"
130343
130405
  },
130344
130406
  "privacy": "public",
130345
- "default": "false",
130346
- "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.",
130347
- "attribute": "loading",
130407
+ "description": "Size variant, either l, m or s.",
130408
+ "default": "'l'",
130409
+ "attribute": "size",
130348
130410
  "reflects": true,
130349
130411
  "inheritedFrom": {
130350
- "name": "SbbButtonCommonElementMixin",
130351
- "module": "button/common/button-common.js"
130352
- }
130353
- },
130354
- {
130355
- "kind": "method",
130356
- "name": "renderTemplate",
130357
- "privacy": "protected",
130358
- "return": {
130359
- "type": {
130360
- "text": "TemplateResult"
130361
- }
130362
- },
130363
- "description": "Override this method to render the component template.",
130364
- "inheritedFrom": {
130365
- "name": "SbbActionBaseElement",
130366
- "module": "core/base-elements/action-base-element.js"
130412
+ "name": "SbbFormFieldElement",
130413
+ "module": "form-field/form-field/form-field.component.js"
130367
130414
  }
130368
130415
  },
130369
130416
  {
@@ -130384,517 +130431,429 @@
130384
130431
  },
130385
130432
  {
130386
130433
  "kind": "field",
130387
- "name": "iconName",
130434
+ "name": "_excludedFocusElements",
130388
130435
  "type": {
130389
- "text": "string"
130436
+ "text": "array"
130390
130437
  },
130391
- "privacy": "public",
130392
- "default": "''",
130393
- "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.",
130394
- "attribute": "icon-name",
130438
+ "privacy": "private",
130439
+ "readonly": true,
130440
+ "default": "['button', 'sbb-popover', 'sbb-option', 'sbb-chip']",
130395
130441
  "inheritedFrom": {
130396
- "name": "SbbIconNameMixin",
130397
- "module": "icon/icon-name-mixin.js"
130442
+ "name": "SbbFormFieldElement",
130443
+ "module": "form-field/form-field/form-field.component.js"
130398
130444
  }
130399
130445
  },
130400
130446
  {
130401
- "kind": "method",
130402
- "name": "renderIconSlot",
130403
- "privacy": "protected",
130404
- "return": {
130405
- "type": {
130406
- "text": "TemplateResult"
130407
- }
130447
+ "kind": "field",
130448
+ "name": "_floatingLabelSupportedInputElements",
130449
+ "type": {
130450
+ "text": "array"
130408
130451
  },
130409
- "parameters": [
130410
- {
130411
- "name": "classname",
130412
- "optional": true,
130413
- "type": {
130414
- "text": "string"
130415
- }
130416
- }
130417
- ],
130452
+ "privacy": "private",
130453
+ "readonly": true,
130454
+ "default": "[ 'input', 'select', 'textarea', 'sbb-select', ]",
130418
130455
  "inheritedFrom": {
130419
- "name": "SbbIconNameMixin",
130420
- "module": "icon/icon-name-mixin.js"
130456
+ "name": "SbbFormFieldElement",
130457
+ "module": "form-field/form-field/form-field.component.js"
130421
130458
  }
130422
130459
  },
130423
130460
  {
130424
- "kind": "method",
130425
- "name": "_renderIconName",
130426
- "privacy": "private",
130427
- "return": {
130428
- "type": {
130429
- "text": "string"
130430
- }
130461
+ "kind": "field",
130462
+ "name": "_floatingLabelSupportedInputTypes",
130463
+ "type": {
130464
+ "text": "array"
130431
130465
  },
130466
+ "privacy": "private",
130467
+ "readonly": true,
130468
+ "default": "[ 'email', 'number', 'password', 'search', 'tel', 'text', 'url', ]",
130432
130469
  "inheritedFrom": {
130433
- "name": "SbbIconNameMixin",
130434
- "module": "icon/icon-name-mixin.js"
130470
+ "name": "SbbFormFieldElement",
130471
+ "module": "form-field/form-field/form-field.component.js"
130435
130472
  }
130436
130473
  },
130437
130474
  {
130438
130475
  "kind": "field",
130439
- "name": "disabledInteractive",
130476
+ "name": "errorSpace",
130440
130477
  "type": {
130441
- "text": "boolean"
130478
+ "text": "'none' | 'reserve'"
130442
130479
  },
130443
130480
  "privacy": "public",
130444
- "default": "false",
130445
- "description": "Whether the button should be aria-disabled but stay interactive.",
130446
- "attribute": "disabled-interactive",
130481
+ "default": "'none'",
130482
+ "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
130483
+ "attribute": "error-space",
130447
130484
  "reflects": true,
130448
130485
  "inheritedFrom": {
130449
- "name": "SbbDisabledInteractiveMixin",
130450
- "module": "core/mixins/disabled-mixin.js"
130486
+ "name": "SbbFormFieldElement",
130487
+ "module": "form-field/form-field/form-field.component.js"
130451
130488
  }
130452
130489
  },
130453
130490
  {
130454
130491
  "kind": "field",
130455
- "name": "disabled",
130456
- "privacy": "public",
130457
- "description": "Whether the component is disabled.",
130458
- "default": "false",
130492
+ "name": "optional",
130459
130493
  "type": {
130460
130494
  "text": "boolean"
130461
130495
  },
130462
- "attribute": "disabled",
130463
- "reflects": true,
130496
+ "privacy": "public",
130497
+ "default": "false",
130498
+ "description": "Indicates whether the input is optional.",
130499
+ "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
130500
+ "attribute": "optional",
130464
130501
  "inheritedFrom": {
130465
- "name": "SbbDisabledMixin",
130466
- "module": "core/mixins/disabled-mixin.js"
130502
+ "name": "SbbFormFieldElement",
130503
+ "module": "form-field/form-field/form-field.component.js"
130467
130504
  }
130468
130505
  },
130469
130506
  {
130470
130507
  "kind": "field",
130471
- "name": "#disabled",
130472
- "privacy": "private",
130508
+ "name": "hiddenLabel",
130473
130509
  "type": {
130474
130510
  "text": "boolean"
130475
130511
  },
130512
+ "privacy": "public",
130476
130513
  "default": "false",
130514
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
130515
+ "attribute": "hidden-label",
130516
+ "reflects": true,
130477
130517
  "inheritedFrom": {
130478
- "name": "SbbDisabledMixin",
130479
- "module": "core/mixins/disabled-mixin.js"
130480
- }
130481
- },
130482
- {
130483
- "kind": "method",
130484
- "name": "isDisabledExternally",
130485
- "privacy": "protected",
130486
- "return": {
130487
- "type": {
130488
- "text": "boolean"
130489
- }
130490
- },
130491
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
130492
- "inheritedFrom": {
130493
- "name": "SbbDisabledMixin",
130494
- "module": "core/mixins/disabled-mixin.js"
130518
+ "name": "SbbFormFieldElement",
130519
+ "module": "form-field/form-field/form-field.component.js"
130495
130520
  }
130496
130521
  },
130497
130522
  {
130498
130523
  "kind": "field",
130499
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
130524
+ "name": "_errorElements",
130500
130525
  "type": {
130501
- "text": "array"
130526
+ "text": "Element[]"
130502
130527
  },
130503
130528
  "privacy": "private",
130504
- "readonly": true,
130505
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
130529
+ "default": "[]",
130530
+ "description": "It is used internally to get the `error` slot.",
130506
130531
  "inheritedFrom": {
130507
- "name": "SbbButtonBaseElement",
130508
- "module": "core/base-elements/button-base-element.js"
130532
+ "name": "SbbFormFieldElement",
130533
+ "module": "form-field/form-field/form-field.component.js"
130509
130534
  }
130510
130535
  },
130511
130536
  {
130512
130537
  "kind": "field",
130513
- "name": "value",
130514
- "type": {
130515
- "text": "string"
130516
- },
130517
- "privacy": "public",
130518
- "inheritedFrom": {
130519
- "name": "SbbButtonBaseElement",
130520
- "module": "core/base-elements/button-base-element.js"
130521
- },
130522
- "default": "''",
130523
- "description": "Value of the form element.",
130524
- "attribute": "value"
130525
- },
130526
- {
130527
- "kind": "field",
130528
- "name": "type",
130529
- "privacy": "public",
130530
- "description": "The type attribute to use for the button.",
130531
- "default": "'button'",
130538
+ "name": "_hintElements",
130532
130539
  "type": {
130533
- "text": "SbbButtonType"
130540
+ "text": "Element[]"
130534
130541
  },
130535
- "attribute": "type",
130542
+ "privacy": "private",
130543
+ "default": "[]",
130544
+ "description": "It is used internally to get the `hint` slot.",
130536
130545
  "inheritedFrom": {
130537
- "name": "SbbButtonBaseElement",
130538
- "module": "core/base-elements/button-base-element.js"
130546
+ "name": "SbbFormFieldElement",
130547
+ "module": "form-field/form-field/form-field.component.js"
130539
130548
  }
130540
130549
  },
130541
130550
  {
130542
130551
  "kind": "field",
130543
- "name": "form",
130544
- "type": {
130545
- "text": "HTMLFormElement | null"
130546
- },
130547
- "privacy": "public",
130548
- "description": "The `<form>` element to associate the button with.",
130549
- "inheritedFrom": {
130550
- "name": "SbbButtonBaseElement",
130551
- "module": "core/base-elements/button-base-element.js"
130552
- },
130553
- "attribute": "form"
130554
- },
130555
- {
130556
- "kind": "field",
130557
- "name": "_formId",
130552
+ "name": "_input",
130558
130553
  "type": {
130559
- "text": "string"
130554
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130560
130555
  },
130561
130556
  "privacy": "private",
130562
- "default": "''",
130557
+ "default": "null",
130558
+ "description": "Reference to the slotted input element.",
130563
130559
  "inheritedFrom": {
130564
- "name": "SbbButtonBaseElement",
130565
- "module": "core/base-elements/button-base-element.js"
130560
+ "name": "SbbFormFieldElement",
130561
+ "module": "form-field/form-field/form-field.component.js"
130566
130562
  }
130567
130563
  },
130568
130564
  {
130569
130565
  "kind": "field",
130570
- "name": "_handleButtonClick",
130571
- "privacy": "private",
130572
- "inheritedFrom": {
130573
- "name": "SbbButtonBaseElement",
130574
- "module": "core/base-elements/button-base-element.js"
130575
- }
130576
- },
130577
- {
130578
- "kind": "method",
130579
- "name": "_requestSubmit",
130580
- "privacy": "private",
130581
- "return": {
130582
- "type": {
130583
- "text": "void"
130584
- }
130566
+ "name": "_label",
130567
+ "type": {
130568
+ "text": "HTMLLabelElement"
130585
130569
  },
130586
- "parameters": [
130587
- {
130588
- "name": "form",
130589
- "type": {
130590
- "text": "HTMLFormElement"
130591
- }
130592
- }
130593
- ],
130594
- "inheritedFrom": {
130595
- "name": "SbbButtonBaseElement",
130596
- "module": "core/base-elements/button-base-element.js"
130597
- }
130598
- },
130599
- {
130600
- "kind": "field",
130601
- "name": "_formKeyDown",
130602
130570
  "privacy": "private",
130571
+ "description": "Reference to the slotted label elements.",
130603
130572
  "inheritedFrom": {
130604
- "name": "SbbButtonBaseElement",
130605
- "module": "core/base-elements/button-base-element.js"
130573
+ "name": "SbbFormFieldElement",
130574
+ "module": "form-field/form-field/form-field.component.js"
130606
130575
  }
130607
130576
  },
130608
130577
  {
130609
130578
  "kind": "field",
130610
- "name": "formAssociated",
130579
+ "name": "inputElement",
130611
130580
  "type": {
130612
- "text": "boolean"
130581
+ "text": "HTMLInputElement | HTMLSelectElement | HTMLElement | null"
130613
130582
  },
130614
130583
  "privacy": "public",
130615
- "static": true,
130616
- "default": "true",
130584
+ "description": "Returns the input element.",
130585
+ "readonly": true,
130617
130586
  "inheritedFrom": {
130618
- "name": "SbbFormAssociatedMixin",
130619
- "module": "core/mixins/form-associated-mixin.js"
130587
+ "name": "SbbFormFieldElement",
130588
+ "module": "form-field/form-field/form-field.component.js"
130620
130589
  }
130621
130590
  },
130622
130591
  {
130623
130592
  "kind": "field",
130624
- "name": "name",
130625
- "privacy": "public",
130626
- "description": "Name of the form element. Will be read from name attribute.",
130593
+ "name": "label",
130627
130594
  "type": {
130628
- "text": "string"
130595
+ "text": "HTMLLabelElement | null"
130629
130596
  },
130630
- "attribute": "name",
130597
+ "privacy": "public",
130598
+ "description": "Reference to the slotted label.",
130599
+ "readonly": true,
130631
130600
  "inheritedFrom": {
130632
- "name": "SbbFormAssociatedMixin",
130633
- "module": "core/mixins/form-associated-mixin.js"
130601
+ "name": "SbbFormFieldElement",
130602
+ "module": "form-field/form-field/form-field.component.js"
130634
130603
  }
130635
130604
  },
130636
130605
  {
130637
130606
  "kind": "field",
130638
- "name": "validity",
130639
- "type": {
130640
- "text": "ValidityState"
130641
- },
130642
- "privacy": "public",
130643
- "description": "Returns the ValidityState object for this element.",
130644
- "readonly": true,
130607
+ "name": "_language",
130608
+ "privacy": "private",
130609
+ "default": "new SbbLanguageController(this)",
130645
130610
  "inheritedFrom": {
130646
- "name": "SbbFormAssociatedMixin",
130647
- "module": "core/mixins/form-associated-mixin.js"
130611
+ "name": "SbbFormFieldElement",
130612
+ "module": "form-field/form-field/form-field.component.js"
130648
130613
  }
130649
130614
  },
130650
130615
  {
130651
130616
  "kind": "field",
130652
- "name": "validationMessage",
130653
- "type": {
130654
- "text": "string"
130655
- },
130656
- "privacy": "public",
130657
- "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.",
130658
- "readonly": true,
130659
- "inheritedFrom": {
130660
- "name": "SbbFormAssociatedMixin",
130661
- "module": "core/mixins/form-associated-mixin.js"
130617
+ "name": "_formFieldAttributeObserver",
130618
+ "privacy": "private",
130619
+ "description": "Listens to the changes on `readonly` and `disabled` attributes of `<input>`.",
130620
+ "inheritedFrom": {
130621
+ "name": "SbbFormFieldElement",
130622
+ "module": "form-field/form-field/form-field.component.js"
130662
130623
  }
130663
130624
  },
130664
130625
  {
130665
130626
  "kind": "field",
130666
- "name": "willValidate",
130667
- "type": {
130668
- "text": "boolean"
130669
- },
130670
- "privacy": "public",
130671
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130672
- "readonly": true,
130627
+ "name": "_inputFormAbortController",
130628
+ "privacy": "private",
130629
+ "default": "new AbortController()",
130673
130630
  "inheritedFrom": {
130674
- "name": "SbbFormAssociatedMixin",
130675
- "module": "core/mixins/form-associated-mixin.js"
130631
+ "name": "SbbFormFieldElement",
130632
+ "module": "form-field/form-field/form-field.component.js"
130676
130633
  }
130677
130634
  },
130678
130635
  {
130679
130636
  "kind": "field",
130680
- "name": "_validityStates",
130637
+ "name": "_control",
130638
+ "type": {
130639
+ "text": "SbbFormFieldElementControl | null"
130640
+ },
130681
130641
  "privacy": "private",
130682
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130642
+ "default": "null",
130683
130643
  "inheritedFrom": {
130684
- "name": "SbbFormAssociatedMixin",
130685
- "module": "core/mixins/form-associated-mixin.js"
130644
+ "name": "SbbFormFieldElement",
130645
+ "module": "form-field/form-field/form-field.component.js"
130686
130646
  }
130687
130647
  },
130688
130648
  {
130689
130649
  "kind": "field",
130690
- "name": "formDisabled",
130650
+ "name": "_previousType",
130691
130651
  "type": {
130692
- "text": "boolean"
130652
+ "text": "string | null"
130693
130653
  },
130694
- "privacy": "protected",
130695
- "default": "false",
130696
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130654
+ "privacy": "private",
130655
+ "default": "null",
130697
130656
  "inheritedFrom": {
130698
- "name": "SbbFormAssociatedMixin",
130699
- "module": "core/mixins/form-associated-mixin.js"
130657
+ "name": "SbbFormFieldElement",
130658
+ "module": "form-field/form-field/form-field.component.js"
130700
130659
  }
130701
130660
  },
130702
130661
  {
130703
130662
  "kind": "method",
130704
- "name": "checkValidity",
130705
- "privacy": "public",
130663
+ "name": "_handleWrapperClick",
130664
+ "privacy": "private",
130706
130665
  "return": {
130707
130666
  "type": {
130708
- "text": "boolean"
130667
+ "text": "void"
130709
130668
  }
130710
130669
  },
130711
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130670
+ "parameters": [
130671
+ {
130672
+ "name": "event",
130673
+ "type": {
130674
+ "text": "MouseEvent"
130675
+ }
130676
+ }
130677
+ ],
130712
130678
  "inheritedFrom": {
130713
- "name": "SbbFormAssociatedMixin",
130714
- "module": "core/mixins/form-associated-mixin.js"
130679
+ "name": "SbbFormFieldElement",
130680
+ "module": "form-field/form-field/form-field.component.js"
130715
130681
  }
130716
130682
  },
130717
130683
  {
130718
130684
  "kind": "method",
130719
- "name": "reportValidity",
130720
- "privacy": "public",
130685
+ "name": "_isElementFocusExcluded",
130686
+ "privacy": "private",
130721
130687
  "return": {
130722
130688
  "type": {
130723
130689
  "text": "boolean"
130724
130690
  }
130725
130691
  },
130726
- "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.",
130692
+ "parameters": [
130693
+ {
130694
+ "name": "event",
130695
+ "type": {
130696
+ "text": "Event"
130697
+ }
130698
+ }
130699
+ ],
130727
130700
  "inheritedFrom": {
130728
- "name": "SbbFormAssociatedMixin",
130729
- "module": "core/mixins/form-associated-mixin.js"
130701
+ "name": "SbbFormFieldElement",
130702
+ "module": "form-field/form-field/form-field.component.js"
130730
130703
  }
130731
130704
  },
130732
130705
  {
130733
130706
  "kind": "method",
130734
- "name": "setCustomValidity",
130735
- "privacy": "public",
130707
+ "name": "_onSlotLabelChange",
130708
+ "privacy": "private",
130736
130709
  "return": {
130737
130710
  "type": {
130738
130711
  "text": "void"
130739
130712
  }
130740
130713
  },
130741
- "parameters": [
130742
- {
130743
- "name": "message",
130744
- "type": {
130745
- "text": "string"
130746
- }
130747
- }
130748
- ],
130749
- "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.",
130750
130714
  "inheritedFrom": {
130751
- "name": "SbbFormAssociatedMixin",
130752
- "module": "core/mixins/form-associated-mixin.js"
130715
+ "name": "SbbFormFieldElement",
130716
+ "module": "form-field/form-field/form-field.component.js"
130753
130717
  }
130754
130718
  },
130755
130719
  {
130756
130720
  "kind": "method",
130757
- "name": "_hasDisabledAncestor",
130721
+ "name": "_onSlotInputChange",
130758
130722
  "privacy": "private",
130759
130723
  "return": {
130760
130724
  "type": {
130761
- "text": "boolean"
130725
+ "text": "void"
130762
130726
  }
130763
130727
  },
130728
+ "description": "It is used internally to assign the attributes of `<input>` to `_id` and `_input` and to observe the native readonly and disabled attributes.",
130764
130729
  "inheritedFrom": {
130765
- "name": "SbbFormAssociatedMixin",
130766
- "module": "core/mixins/form-associated-mixin.js"
130730
+ "name": "SbbFormFieldElement",
130731
+ "module": "form-field/form-field/form-field.component.js"
130767
130732
  }
130768
130733
  },
130769
130734
  {
130770
130735
  "kind": "method",
130771
- "name": "updateFormValue",
130772
- "privacy": "protected",
130736
+ "name": "_assignSlots",
130737
+ "privacy": "private",
130773
130738
  "return": {
130774
130739
  "type": {
130775
130740
  "text": "void"
130776
130741
  }
130777
130742
  },
130778
- "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",
130779
130743
  "inheritedFrom": {
130780
- "name": "SbbFormAssociatedMixin",
130781
- "module": "core/mixins/form-associated-mixin.js"
130744
+ "name": "SbbFormFieldElement",
130745
+ "module": "form-field/form-field/form-field.component.js"
130782
130746
  }
130783
130747
  },
130784
130748
  {
130785
130749
  "kind": "method",
130786
- "name": "formState",
130787
- "privacy": "protected",
130750
+ "name": "_connectInputElement",
130751
+ "privacy": "private",
130788
130752
  "return": {
130789
130753
  "type": {
130790
- "text": "FormRestoreState"
130754
+ "text": "'changed' | 'no-input' | 'unchanged'"
130791
130755
  }
130792
130756
  },
130793
130757
  "inheritedFrom": {
130794
- "name": "SbbFormAssociatedMixin",
130795
- "module": "core/mixins/form-associated-mixin.js"
130758
+ "name": "SbbFormFieldElement",
130759
+ "module": "form-field/form-field/form-field.component.js"
130796
130760
  }
130797
130761
  },
130798
130762
  {
130799
130763
  "kind": "method",
130800
- "name": "setValidityFlag",
130801
- "privacy": "protected",
130764
+ "name": "_syncLabelInputReferences",
130765
+ "privacy": "private",
130802
130766
  "return": {
130803
130767
  "type": {
130804
130768
  "text": "void"
130805
130769
  }
130806
130770
  },
130771
+ "inheritedFrom": {
130772
+ "name": "SbbFormFieldElement",
130773
+ "module": "form-field/form-field/form-field.component.js"
130774
+ }
130775
+ },
130776
+ {
130777
+ "kind": "method",
130778
+ "name": "_isInputElement",
130779
+ "privacy": "private",
130780
+ "return": {
130781
+ "type": {
130782
+ "text": "boolean"
130783
+ }
130784
+ },
130807
130785
  "parameters": [
130808
130786
  {
130809
- "name": "flag",
130810
- "type": {
130811
- "text": "T"
130812
- }
130813
- },
130814
- {
130815
- "name": "message",
130816
- "type": {
130817
- "text": "string"
130818
- }
130819
- },
130820
- {
130821
- "name": "flagValue",
130822
- "optional": true,
130787
+ "name": "input",
130823
130788
  "type": {
130824
- "text": "ValidityStateFlags[T]"
130789
+ "text": "Element"
130825
130790
  }
130826
130791
  }
130827
130792
  ],
130828
- "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).",
130829
130793
  "inheritedFrom": {
130830
- "name": "SbbFormAssociatedMixin",
130831
- "module": "core/mixins/form-associated-mixin.js"
130794
+ "name": "SbbFormFieldElement",
130795
+ "module": "form-field/form-field/form-field.component.js"
130832
130796
  }
130833
130797
  },
130834
130798
  {
130835
130799
  "kind": "method",
130836
- "name": "removeValidityFlag",
130837
- "privacy": "protected",
130800
+ "name": "_readInputState",
130801
+ "privacy": "private",
130838
130802
  "return": {
130839
130803
  "type": {
130840
130804
  "text": "void"
130841
130805
  }
130842
130806
  },
130843
- "parameters": [
130844
- {
130845
- "name": "flag",
130846
- "type": {
130847
- "text": "T"
130848
- }
130849
- }
130850
- ],
130851
- "description": "Removes the validity state flag entry and updates validity state.",
130852
130807
  "inheritedFrom": {
130853
- "name": "SbbFormAssociatedMixin",
130854
- "module": "core/mixins/form-associated-mixin.js"
130808
+ "name": "SbbFormFieldElement",
130809
+ "module": "form-field/form-field/form-field.component.js"
130855
130810
  }
130856
130811
  },
130857
130812
  {
130858
130813
  "kind": "method",
130859
- "name": "validate",
130860
- "privacy": "protected",
130814
+ "name": "_registerInputFormListener",
130815
+ "privacy": "private",
130861
130816
  "return": {
130862
130817
  "type": {
130863
130818
  "text": "void"
130864
130819
  }
130865
130820
  },
130866
- "description": "To be called whenever the current element needs to be validated.",
130867
130821
  "inheritedFrom": {
130868
- "name": "SbbFormAssociatedMixin",
130869
- "module": "core/mixins/form-associated-mixin.js"
130822
+ "name": "SbbFormFieldElement",
130823
+ "module": "form-field/form-field/form-field.component.js"
130870
130824
  }
130871
130825
  },
130872
130826
  {
130873
130827
  "kind": "method",
130874
- "name": "shouldValidate",
130875
- "privacy": "protected",
130828
+ "name": "_patchInputValue",
130829
+ "privacy": "private",
130876
130830
  "return": {
130877
130831
  "type": {
130878
- "text": "boolean"
130832
+ "text": "void"
130879
130833
  }
130880
130834
  },
130881
- "parameters": [
130882
- {
130883
- "name": "name",
130884
- "type": {
130885
- "text": "PropertyKey | undefined"
130886
- }
130835
+ "inheritedFrom": {
130836
+ "name": "SbbFormFieldElement",
130837
+ "module": "form-field/form-field/form-field.component.js"
130838
+ }
130839
+ },
130840
+ {
130841
+ "kind": "method",
130842
+ "name": "_unpatchInputValue",
130843
+ "privacy": "private",
130844
+ "return": {
130845
+ "type": {
130846
+ "text": "void"
130887
130847
  }
130888
- ],
130889
- "description": "Whether validation should be run on a property change with the given name.",
130848
+ },
130890
130849
  "inheritedFrom": {
130891
- "name": "SbbFormAssociatedMixin",
130892
- "module": "core/mixins/form-associated-mixin.js"
130850
+ "name": "SbbFormFieldElement",
130851
+ "module": "form-field/form-field/form-field.component.js"
130893
130852
  }
130894
130853
  },
130895
130854
  {
130896
130855
  "kind": "method",
130897
- "name": "_setInternalValidity",
130856
+ "name": "_checkAndUpdateInputEmpty",
130898
130857
  "privacy": "private",
130899
130858
  "return": {
130900
130859
  "type": {
@@ -130902,113 +130861,154 @@
130902
130861
  }
130903
130862
  },
130904
130863
  "inheritedFrom": {
130905
- "name": "SbbFormAssociatedMixin",
130906
- "module": "core/mixins/form-associated-mixin.js"
130864
+ "name": "SbbFormFieldElement",
130865
+ "module": "form-field/form-field/form-field.component.js"
130907
130866
  }
130908
130867
  },
130909
130868
  {
130910
- "kind": "field",
130911
- "name": "role",
130912
- "type": {
130913
- "text": "ElementInternals['role']"
130869
+ "kind": "method",
130870
+ "name": "_isInputEmpty",
130871
+ "privacy": "private",
130872
+ "return": {
130873
+ "type": {
130874
+ "text": "boolean"
130875
+ }
130914
130876
  },
130915
- "privacy": "public",
130916
- "static": true,
130917
- "readonly": true,
130918
- "default": "'button'",
130919
130877
  "inheritedFrom": {
130920
- "name": "SbbButtonLikeBaseElement",
130921
- "module": "core/base-elements/button-base-element.js"
130878
+ "name": "SbbFormFieldElement",
130879
+ "module": "form-field/form-field/form-field.component.js"
130880
+ }
130881
+ },
130882
+ {
130883
+ "kind": "method",
130884
+ "name": "_isInputValueEmpty",
130885
+ "privacy": "private",
130886
+ "return": {
130887
+ "type": {
130888
+ "text": "boolean"
130889
+ }
130890
+ },
130891
+ "inheritedFrom": {
130892
+ "name": "SbbFormFieldElement",
130893
+ "module": "form-field/form-field/form-field.component.js"
130922
130894
  }
130923
130895
  },
130924
130896
  {
130925
- "kind": "field",
130926
- "name": "_preventScrollOnSpaceKeydown",
130897
+ "kind": "method",
130898
+ "name": "_onSlotErrorChange",
130927
130899
  "privacy": "private",
130928
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
130900
+ "return": {
130901
+ "type": {
130902
+ "text": "void"
130903
+ }
130904
+ },
130929
130905
  "parameters": [
130930
130906
  {
130931
- "description": "The origin event.",
130932
- "name": "event"
130907
+ "name": "event",
130908
+ "type": {
130909
+ "text": "Event"
130910
+ }
130933
130911
  }
130934
130912
  ],
130913
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-error> instances.",
130935
130914
  "inheritedFrom": {
130936
- "name": "SbbButtonLikeBaseElement",
130937
- "module": "core/base-elements/button-base-element.js"
130915
+ "name": "SbbFormFieldElement",
130916
+ "module": "form-field/form-field/form-field.component.js"
130938
130917
  }
130939
130918
  },
130940
130919
  {
130941
- "kind": "field",
130942
- "name": "_removeActiveMarker",
130920
+ "kind": "method",
130921
+ "name": "_onSlotHintChange",
130943
130922
  "privacy": "private",
130923
+ "return": {
130924
+ "type": {
130925
+ "text": "void"
130926
+ }
130927
+ },
130928
+ "parameters": [
130929
+ {
130930
+ "name": "event",
130931
+ "type": {
130932
+ "text": "Event"
130933
+ }
130934
+ }
130935
+ ],
130936
+ "description": "It is used internally to set the aria-describedby attribute for the slotted input referencing available <sbb-hint> instances.",
130944
130937
  "inheritedFrom": {
130945
- "name": "SbbButtonLikeBaseElement",
130946
- "module": "core/base-elements/button-base-element.js"
130938
+ "name": "SbbFormFieldElement",
130939
+ "module": "form-field/form-field/form-field.component.js"
130947
130940
  }
130948
130941
  },
130949
130942
  {
130950
- "kind": "field",
130951
- "name": "_dispatchClickEventOnSpaceKeyup",
130943
+ "kind": "method",
130944
+ "name": "_assignAriaDescribedByElements",
130952
130945
  "privacy": "private",
130953
- "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.",
130954
- "parameters": [
130955
- {
130956
- "description": "The origin event.",
130957
- "name": "event"
130946
+ "return": {
130947
+ "type": {
130948
+ "text": "void"
130958
130949
  }
130959
- ],
130950
+ },
130960
130951
  "inheritedFrom": {
130961
- "name": "SbbButtonLikeBaseElement",
130962
- "module": "core/base-elements/button-base-element.js"
130952
+ "name": "SbbFormFieldElement",
130953
+ "module": "form-field/form-field/form-field.component.js"
130963
130954
  }
130964
130955
  },
130965
130956
  {
130966
- "kind": "field",
130967
- "name": "_dispatchClickEvent",
130968
- "privacy": "private",
130957
+ "kind": "method",
130958
+ "name": "reset",
130959
+ "privacy": "public",
130960
+ "return": {
130961
+ "type": {
130962
+ "text": "void"
130963
+ }
130964
+ },
130965
+ "description": "Manually reset the form field. Currently, this only resets the floating label.",
130969
130966
  "inheritedFrom": {
130970
- "name": "SbbButtonLikeBaseElement",
130971
- "module": "core/base-elements/button-base-element.js"
130967
+ "name": "SbbFormFieldElement",
130968
+ "module": "form-field/form-field/form-field.component.js"
130972
130969
  }
130973
130970
  },
130974
130971
  {
130975
- "kind": "field",
130976
- "name": "maybeDisabled",
130977
- "type": {
130978
- "text": "boolean | undefined"
130972
+ "kind": "method",
130973
+ "name": "clear",
130974
+ "privacy": "public",
130975
+ "return": {
130976
+ "type": {
130977
+ "text": "void"
130978
+ }
130979
130979
  },
130980
- "privacy": "protected",
130981
- "readonly": true,
130980
+ "description": "Manually clears the input value. It only works for inputs, selects are not supported.",
130982
130981
  "inheritedFrom": {
130983
- "name": "SbbActionBaseElement",
130984
- "module": "core/base-elements/action-base-element.js"
130982
+ "name": "SbbFormFieldElement",
130983
+ "module": "form-field/form-field/form-field.component.js"
130985
130984
  }
130986
130985
  },
130987
130986
  {
130988
- "kind": "field",
130989
- "name": "maybeDisabledInteractive",
130990
- "type": {
130991
- "text": "boolean | undefined"
130987
+ "kind": "method",
130988
+ "name": "_syncNegative",
130989
+ "privacy": "private",
130990
+ "return": {
130991
+ "type": {
130992
+ "text": "void"
130993
+ }
130992
130994
  },
130993
- "privacy": "protected",
130994
- "readonly": true,
130995
130995
  "inheritedFrom": {
130996
- "name": "SbbActionBaseElement",
130997
- "module": "core/base-elements/action-base-element.js"
130996
+ "name": "SbbFormFieldElement",
130997
+ "module": "form-field/form-field/form-field.component.js"
130998
130998
  }
130999
130999
  },
131000
131000
  {
131001
131001
  "kind": "method",
131002
- "name": "setupBaseEventHandlers",
131003
- "privacy": "protected",
131002
+ "name": "_syncSize",
131003
+ "privacy": "private",
131004
131004
  "return": {
131005
131005
  "type": {
131006
131006
  "text": "void"
131007
131007
  }
131008
131008
  },
131009
131009
  "inheritedFrom": {
131010
- "name": "SbbActionBaseElement",
131011
- "module": "core/base-elements/action-base-element.js"
131010
+ "name": "SbbFormFieldElement",
131011
+ "module": "form-field/form-field/form-field.component.js"
131012
131012
  }
131013
131013
  },
131014
131014
  {
@@ -131117,184 +131117,184 @@
131117
131117
  }
131118
131118
  }
131119
131119
  ],
131120
- "events": [
131121
- {
131122
- "type": {
131123
- "text": "Event"
131124
- },
131125
- "description": "The change event is fired on the associated inputs when the user modifies the element's value. Unlike the input event, the change event is not necessarily fired for each alteration to an element's value.",
131126
- "name": "change"
131127
- },
131128
- {
131129
- "type": {
131130
- "text": "InputEvent"
131131
- },
131132
- "description": "The input event fires on the associated inputs when the value has been changed as a direct result of a user action.",
131133
- "name": "input"
131134
- }
131135
- ],
131136
131120
  "superclass": {
131137
- "name": "SbbSecondaryButtonElement",
131138
- "module": "button.pure.js"
131121
+ "name": "SbbFormFieldElement",
131122
+ "module": "form-field.pure.js"
131139
131123
  },
131140
- "tagName": "sbb-timetable-form-swap-button",
131124
+ "tagName": "sbb-timetable-form-field",
131141
131125
  "customElement": true,
131142
131126
  "attributes": [
131143
131127
  {
131144
- "name": "size",
131128
+ "name": "negative",
131145
131129
  "type": {
131146
- "text": "SbbButtonSize"
131130
+ "text": "boolean"
131147
131131
  },
131148
- "description": "Size variant, either l, m or s.",
131149
- "default": "'l' / 's' (lean)",
131150
- "fieldName": "size",
131132
+ "default": "false",
131133
+ "description": "Negative coloring variant flag.",
131134
+ "fieldName": "negative",
131151
131135
  "inheritedFrom": {
131152
- "name": "SbbButtonCommonElementMixin",
131153
- "module": "button/common/button-common.js"
131136
+ "name": "SbbNegativeMixin",
131137
+ "module": "core/mixins/negative-mixin.js"
131154
131138
  }
131155
131139
  },
131156
131140
  {
131157
- "name": "loading",
131141
+ "name": "error-space",
131158
131142
  "type": {
131159
- "text": "boolean"
131143
+ "text": "'none' | 'reserve'"
131160
131144
  },
131161
- "default": "false",
131162
- "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.",
131163
- "fieldName": "loading",
131145
+ "default": "'none'",
131146
+ "description": "Whether to reserve space for an error message, hint or text-counter.\n`none` does not reserve any space.\n`reserve` does reserve one row for an error message.",
131147
+ "fieldName": "errorSpace",
131164
131148
  "inheritedFrom": {
131165
- "name": "SbbButtonCommonElementMixin",
131166
- "module": "button/common/button-common.js"
131149
+ "name": "SbbFormFieldElement",
131150
+ "module": "form-field/form-field/form-field.component.js"
131167
131151
  }
131168
131152
  },
131169
131153
  {
131170
- "name": "negative",
131154
+ "name": "optional",
131171
131155
  "type": {
131172
131156
  "text": "boolean"
131173
131157
  },
131174
131158
  "default": "false",
131175
- "description": "Negative coloring variant flag.",
131176
- "fieldName": "negative",
131159
+ "description": "Indicates whether the input is optional.",
131160
+ "deprecated": "Set the (optional) label text manually. Will be removed with next major version.",
131161
+ "fieldName": "optional",
131177
131162
  "inheritedFrom": {
131178
- "name": "SbbNegativeMixin",
131179
- "module": "core/mixins/negative-mixin.js"
131163
+ "name": "SbbFormFieldElement",
131164
+ "module": "form-field/form-field/form-field.component.js"
131180
131165
  }
131181
131166
  },
131182
131167
  {
131183
- "name": "icon-name",
131168
+ "name": "size",
131184
131169
  "type": {
131185
- "text": "string"
131170
+ "text": "'l' | 'm' | 's'"
131186
131171
  },
131187
- "default": "''",
131188
- "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.",
131189
- "fieldName": "iconName",
131172
+ "description": "Size variant, either l, m or s.",
131173
+ "default": "'m' / 's' (lean)",
131174
+ "fieldName": "size",
131190
131175
  "inheritedFrom": {
131191
- "name": "SbbIconNameMixin",
131192
- "module": "icon/icon-name-mixin.js"
131176
+ "name": "SbbFormFieldElement",
131177
+ "module": "form-field/form-field/form-field.component.js"
131193
131178
  }
131194
131179
  },
131195
131180
  {
131196
- "name": "disabled-interactive",
131181
+ "name": "borderless",
131197
131182
  "type": {
131198
131183
  "text": "boolean"
131199
131184
  },
131200
131185
  "default": "false",
131201
- "description": "Whether the button should be aria-disabled but stay interactive.",
131202
- "fieldName": "disabledInteractive",
131186
+ "description": "Whether to display the form field without a border.",
131187
+ "fieldName": "borderless",
131203
131188
  "inheritedFrom": {
131204
- "name": "SbbDisabledInteractiveMixin",
131205
- "module": "core/mixins/disabled-mixin.js"
131189
+ "name": "SbbFormFieldElement",
131190
+ "module": "form-field/form-field/form-field.component.js"
131206
131191
  }
131207
131192
  },
131208
131193
  {
131209
- "name": "disabled",
131210
- "description": "Whether the component is disabled.",
131211
- "default": "false",
131194
+ "name": "width",
131195
+ "type": {
131196
+ "text": "'default' | 'collapse'"
131197
+ },
131198
+ "default": "'default'",
131199
+ "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.",
131200
+ "fieldName": "width",
131201
+ "inheritedFrom": {
131202
+ "name": "SbbFormFieldElement",
131203
+ "module": "form-field/form-field/form-field.component.js"
131204
+ }
131205
+ },
131206
+ {
131207
+ "name": "hidden-label",
131212
131208
  "type": {
131213
131209
  "text": "boolean"
131214
131210
  },
131215
- "fieldName": "disabled",
131211
+ "default": "false",
131212
+ "description": "Whether to visually hide the label. If hidden, screen readers will still read it.",
131213
+ "fieldName": "hiddenLabel",
131216
131214
  "inheritedFrom": {
131217
- "name": "SbbDisabledMixin",
131218
- "module": "core/mixins/disabled-mixin.js"
131215
+ "name": "SbbFormFieldElement",
131216
+ "module": "form-field/form-field/form-field.component.js"
131219
131217
  }
131220
131218
  },
131221
131219
  {
131222
- "name": "value",
131220
+ "name": "floating-label",
131223
131221
  "type": {
131224
- "text": "string"
131222
+ "text": "boolean"
131225
131223
  },
131226
- "default": "''",
131227
- "description": "Value of the form element.",
131228
- "fieldName": "value",
131224
+ "default": "false",
131225
+ "description": "Whether the label should float. If activated, the placeholder of the input is hidden.",
131226
+ "fieldName": "floatingLabel",
131229
131227
  "inheritedFrom": {
131230
- "name": "SbbButtonBaseElement",
131231
- "module": "core/base-elements/button-base-element.js"
131228
+ "name": "SbbFormFieldElement",
131229
+ "module": "form-field/form-field/form-field.component.js"
131230
+ }
131231
+ }
131232
+ ],
131233
+ "slots": [
131234
+ {
131235
+ "description": "Use this slot to render an input/select or a supported non-native element.",
131236
+ "name": "",
131237
+ "inheritedFrom": {
131238
+ "name": "SbbFormFieldElement",
131239
+ "module": "form-field/form-field/form-field.component.js"
131232
131240
  }
131233
131241
  },
131234
131242
  {
131235
- "name": "type",
131236
- "description": "The type attribute to use for the button.",
131237
- "default": "'button'",
131238
- "type": {
131239
- "text": "SbbButtonType"
131240
- },
131241
- "fieldName": "type",
131243
+ "description": "Use this slot to render a label.",
131244
+ "name": "label",
131242
131245
  "inheritedFrom": {
131243
- "name": "SbbButtonBaseElement",
131244
- "module": "core/base-elements/button-base-element.js"
131246
+ "name": "SbbFormFieldElement",
131247
+ "module": "form-field/form-field/form-field.component.js"
131245
131248
  }
131246
131249
  },
131247
131250
  {
131248
- "name": "form",
131249
- "description": "The `<form>` element to associate the button with.",
131250
- "type": {
131251
- "text": "HTMLFormElement | null"
131252
- },
131253
- "fieldName": "form",
131251
+ "description": "Use this slot to render an icon on the left side of the input.",
131252
+ "name": "prefix",
131254
131253
  "inheritedFrom": {
131255
- "name": "SbbButtonBaseElement",
131256
- "module": "core/base-elements/button-base-element.js"
131254
+ "name": "SbbFormFieldElement",
131255
+ "module": "form-field/form-field/form-field.component.js"
131257
131256
  }
131258
131257
  },
131259
131258
  {
131260
- "name": "name",
131261
- "description": "Name of the form element. Will be read from name attribute.",
131262
- "type": {
131263
- "text": "string"
131264
- },
131265
- "fieldName": "name",
131259
+ "description": "Use this slot to render an icon on the right side of the input.",
131260
+ "name": "suffix",
131266
131261
  "inheritedFrom": {
131267
- "name": "SbbFormAssociatedMixin",
131268
- "module": "core/mixins/form-associated-mixin.js"
131262
+ "name": "SbbFormFieldElement",
131263
+ "module": "form-field/form-field/form-field.component.js"
131269
131264
  }
131270
- }
131271
- ],
131272
- "slots": [
131265
+ },
131273
131266
  {
131274
- "description": "Use the unnamed slot to add content to the secondary-button.",
131275
- "name": "",
131267
+ "description": "Use this slot to render an error.",
131268
+ "name": "error",
131276
131269
  "inheritedFrom": {
131277
- "name": "SbbSecondaryButtonElement",
131278
- "module": "button/secondary-button/secondary-button.component.js"
131270
+ "name": "SbbFormFieldElement",
131271
+ "module": "form-field/form-field/form-field.component.js"
131279
131272
  }
131280
131273
  },
131281
131274
  {
131282
- "description": "Slot used to display the icon, if one is set.",
131283
- "name": "icon",
131275
+ "description": "Use this slot to render an `<sbb-hint>` or an `<sbb-form-field-text-counter>` element.",
131276
+ "name": "hint",
131284
131277
  "inheritedFrom": {
131285
- "name": "SbbSecondaryButtonElement",
131286
- "module": "button/secondary-button/secondary-button.component.js"
131278
+ "name": "SbbFormFieldElement",
131279
+ "module": "form-field/form-field/form-field.component.js"
131287
131280
  }
131288
131281
  }
131289
131282
  ],
131290
131283
  "cssProperties": [
131291
131284
  {
131292
- "description": "The delay before the loading animation starts, when setting the button into loading state.",
131293
- "name": "--sbb-button-loading-delay",
131294
- "default": "300ms",
131285
+ "description": "To override the focus outline offset,",
131286
+ "name": "--sbb-form-field-outline-offset",
131295
131287
  "inheritedFrom": {
131296
- "name": "SbbSecondaryButtonElement",
131297
- "module": "button/secondary-button/secondary-button.component.js"
131288
+ "name": "SbbFormFieldElement",
131289
+ "module": "form-field/form-field/form-field.component.js"
131290
+ }
131291
+ },
131292
+ {
131293
+ "description": "To override the z-index of the focus underline effect,",
131294
+ "name": "--sbb-form-field-focus-underline-z-index",
131295
+ "inheritedFrom": {
131296
+ "name": "SbbFormFieldElement",
131297
+ "module": "form-field/form-field/form-field.component.js"
131298
131298
  }
131299
131299
  }
131300
131300
  ]
@@ -131303,10 +131303,10 @@
131303
131303
  "exports": [
131304
131304
  {
131305
131305
  "kind": "js",
131306
- "name": "SbbTimetableFormSwapButtonElement",
131306
+ "name": "SbbTimetableFormFieldElement",
131307
131307
  "declaration": {
131308
- "name": "SbbTimetableFormSwapButtonElement",
131309
- "module": "timetable-form/timetable-form-swap-button/timetable-form-swap-button.component.js"
131308
+ "name": "SbbTimetableFormFieldElement",
131309
+ "module": "timetable-form/timetable-form-field/timetable-form-field.component.js"
131310
131310
  }
131311
131311
  }
131312
131312
  ]
@@ -132706,18 +132706,220 @@
132706
132706
  }
132707
132707
  },
132708
132708
  {
132709
- "kind": "method",
132710
- "name": "renderHiddenSlot",
132711
- "privacy": "protected",
132712
- "return": {
132713
- "type": {
132714
- "text": "TemplateResult"
132715
- }
132709
+ "kind": "method",
132710
+ "name": "renderHiddenSlot",
132711
+ "privacy": "protected",
132712
+ "return": {
132713
+ "type": {
132714
+ "text": "TemplateResult"
132715
+ }
132716
+ },
132717
+ "description": "Returns a hidden slot, which is intended as the children change detection.\nWhen an element without a slot attribute is slotted to the element, it triggers\nthe slotchange event, which can be used to assign it to the appropriate named slot.",
132718
+ "inheritedFrom": {
132719
+ "name": "SbbNamedSlotListMixin",
132720
+ "module": "core/mixins/named-slot-list-mixin.js"
132721
+ }
132722
+ },
132723
+ {
132724
+ "kind": "field",
132725
+ "name": "_hydrationRequired",
132726
+ "type": {
132727
+ "text": "boolean"
132728
+ },
132729
+ "privacy": "private",
132730
+ "default": "!!this.shadowRoot",
132731
+ "inheritedFrom": {
132732
+ "name": "SbbElement",
132733
+ "module": "core/base-elements/element.js"
132734
+ }
132735
+ },
132736
+ {
132737
+ "kind": "field",
132738
+ "name": "_hydrationComplete",
132739
+ "privacy": "private",
132740
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
132741
+ "inheritedFrom": {
132742
+ "name": "SbbElement",
132743
+ "module": "core/base-elements/element.js"
132744
+ }
132745
+ },
132746
+ {
132747
+ "kind": "field",
132748
+ "name": "_resolveHydration",
132749
+ "type": {
132750
+ "text": "(hydrationRequired: boolean) => void"
132751
+ },
132752
+ "privacy": "private",
132753
+ "inheritedFrom": {
132754
+ "name": "SbbElement",
132755
+ "module": "core/base-elements/element.js"
132756
+ }
132757
+ },
132758
+ {
132759
+ "kind": "field",
132760
+ "name": "hydrationRequired",
132761
+ "type": {
132762
+ "text": "boolean"
132763
+ },
132764
+ "privacy": "protected",
132765
+ "description": "Returns whether hydration is required and not completed.",
132766
+ "readonly": true,
132767
+ "inheritedFrom": {
132768
+ "name": "SbbElement",
132769
+ "module": "core/base-elements/element.js"
132770
+ },
132771
+ "default": "!!this.shadowRoot"
132772
+ },
132773
+ {
132774
+ "kind": "method",
132775
+ "name": "toggleState",
132776
+ "privacy": "protected",
132777
+ "return": {
132778
+ "type": {
132779
+ "text": "void"
132780
+ }
132781
+ },
132782
+ "parameters": [
132783
+ {
132784
+ "name": "value",
132785
+ "type": {
132786
+ "text": "string"
132787
+ }
132788
+ },
132789
+ {
132790
+ "name": "force",
132791
+ "optional": true,
132792
+ "type": {
132793
+ "text": "boolean"
132794
+ }
132795
+ }
132796
+ ],
132797
+ "inheritedFrom": {
132798
+ "name": "SbbElement",
132799
+ "module": "core/base-elements/element.js"
132800
+ }
132801
+ },
132802
+ {
132803
+ "kind": "field",
132804
+ "name": "['_$sbbElement$']",
132805
+ "type": {
132806
+ "text": "boolean"
132807
+ },
132808
+ "privacy": "public",
132809
+ "static": true,
132810
+ "default": "true",
132811
+ "inheritedFrom": {
132812
+ "name": "SbbElement",
132813
+ "module": "core/base-elements/element.js"
132814
+ }
132815
+ },
132816
+ {
132817
+ "kind": "field",
132818
+ "name": "_controllers",
132819
+ "type": {
132820
+ "text": "Set<SbbReactiveController> | undefined"
132821
+ },
132822
+ "privacy": "private",
132823
+ "inheritedFrom": {
132824
+ "name": "SbbElement",
132825
+ "module": "core/base-elements/element.js"
132826
+ }
132827
+ }
132828
+ ],
132829
+ "attributes": [
132830
+ {
132831
+ "name": "direction-label",
132832
+ "type": {
132833
+ "text": "string"
132834
+ },
132835
+ "default": "''",
132836
+ "description": "General label for \"driving direction\".",
132837
+ "fieldName": "directionLabel"
132838
+ },
132839
+ {
132840
+ "name": "direction-label-level",
132841
+ "type": {
132842
+ "text": "SbbTitleLevel"
132843
+ },
132844
+ "default": "'6'",
132845
+ "description": "Heading level of the direction label, used for screen readers.",
132846
+ "fieldName": "directionLabelLevel"
132847
+ },
132848
+ {
132849
+ "name": "station",
132850
+ "type": {
132851
+ "text": "string"
132852
+ },
132853
+ "default": "''",
132854
+ "description": "Label for the destination station of the train.",
132855
+ "fieldName": "station"
132856
+ },
132857
+ {
132858
+ "name": "accessibility-label",
132859
+ "type": {
132860
+ "text": "string"
132861
+ },
132862
+ "default": "''",
132863
+ "description": "Accessibility label for additional information regarding the leaving direction of the train.",
132864
+ "fieldName": "accessibilityLabel"
132865
+ },
132866
+ {
132867
+ "name": "direction",
132868
+ "type": {
132869
+ "text": "'left' | 'right'"
132870
+ },
132871
+ "default": "'left'",
132872
+ "description": "Controls the direction indicator to show the arrow left or right. Default is left.",
132873
+ "fieldName": "direction"
132874
+ }
132875
+ ],
132876
+ "mixins": [
132877
+ {
132878
+ "name": "SbbNamedSlotListMixin",
132879
+ "module": "core/mixins.js"
132880
+ }
132881
+ ],
132882
+ "superclass": {
132883
+ "name": "SbbElement",
132884
+ "module": "core/base-elements.js"
132885
+ },
132886
+ "tagName": "sbb-train",
132887
+ "customElement": true
132888
+ }
132889
+ ],
132890
+ "exports": [
132891
+ {
132892
+ "kind": "js",
132893
+ "name": "SbbTrainElement",
132894
+ "declaration": {
132895
+ "name": "SbbTrainElement",
132896
+ "module": "train/train/train.component.js"
132897
+ }
132898
+ }
132899
+ ]
132900
+ },
132901
+ {
132902
+ "kind": "javascript-module",
132903
+ "path": "train/train-blocked-passage/train-blocked-passage.component.js",
132904
+ "declarations": [
132905
+ {
132906
+ "kind": "class",
132907
+ "description": "It visually displays a blocked passage between train wagons.",
132908
+ "name": "SbbTrainBlockedPassageElement",
132909
+ "members": [
132910
+ {
132911
+ "kind": "field",
132912
+ "name": "elementName",
132913
+ "type": {
132914
+ "text": "string"
132716
132915
  },
132717
- "description": "Returns a hidden slot, which is intended as the children change detection.\nWhen an element without a slot attribute is slotted to the element, it triggers\nthe slotchange event, which can be used to assign it to the appropriate named slot.",
132916
+ "privacy": "public",
132917
+ "static": true,
132918
+ "readonly": true,
132919
+ "default": "'sbb-train-blocked-passage'",
132718
132920
  "inheritedFrom": {
132719
- "name": "SbbNamedSlotListMixin",
132720
- "module": "core/mixins/named-slot-list-mixin.js"
132921
+ "name": "SbbElement",
132922
+ "module": "core/base-elements/element.js"
132721
132923
  }
132722
132924
  },
132723
132925
  {
@@ -132826,74 +133028,21 @@
132826
133028
  }
132827
133029
  }
132828
133030
  ],
132829
- "attributes": [
132830
- {
132831
- "name": "direction-label",
132832
- "type": {
132833
- "text": "string"
132834
- },
132835
- "default": "''",
132836
- "description": "General label for \"driving direction\".",
132837
- "fieldName": "directionLabel"
132838
- },
132839
- {
132840
- "name": "direction-label-level",
132841
- "type": {
132842
- "text": "SbbTitleLevel"
132843
- },
132844
- "default": "'6'",
132845
- "description": "Heading level of the direction label, used for screen readers.",
132846
- "fieldName": "directionLabelLevel"
132847
- },
132848
- {
132849
- "name": "station",
132850
- "type": {
132851
- "text": "string"
132852
- },
132853
- "default": "''",
132854
- "description": "Label for the destination station of the train.",
132855
- "fieldName": "station"
132856
- },
132857
- {
132858
- "name": "accessibility-label",
132859
- "type": {
132860
- "text": "string"
132861
- },
132862
- "default": "''",
132863
- "description": "Accessibility label for additional information regarding the leaving direction of the train.",
132864
- "fieldName": "accessibilityLabel"
132865
- },
132866
- {
132867
- "name": "direction",
132868
- "type": {
132869
- "text": "'left' | 'right'"
132870
- },
132871
- "default": "'left'",
132872
- "description": "Controls the direction indicator to show the arrow left or right. Default is left.",
132873
- "fieldName": "direction"
132874
- }
132875
- ],
132876
- "mixins": [
132877
- {
132878
- "name": "SbbNamedSlotListMixin",
132879
- "module": "core/mixins.js"
132880
- }
132881
- ],
132882
133031
  "superclass": {
132883
133032
  "name": "SbbElement",
132884
133033
  "module": "core/base-elements.js"
132885
133034
  },
132886
- "tagName": "sbb-train",
133035
+ "tagName": "sbb-train-blocked-passage",
132887
133036
  "customElement": true
132888
133037
  }
132889
133038
  ],
132890
133039
  "exports": [
132891
133040
  {
132892
133041
  "kind": "js",
132893
- "name": "SbbTrainElement",
133042
+ "name": "SbbTrainBlockedPassageElement",
132894
133043
  "declaration": {
132895
- "name": "SbbTrainElement",
132896
- "module": "train/train/train.component.js"
133044
+ "name": "SbbTrainBlockedPassageElement",
133045
+ "module": "train/train-blocked-passage/train-blocked-passage.component.js"
132897
133046
  }
132898
133047
  }
132899
133048
  ]
@@ -133230,155 +133379,6 @@
133230
133379
  }
133231
133380
  ]
133232
133381
  },
133233
- {
133234
- "kind": "javascript-module",
133235
- "path": "train/train-blocked-passage/train-blocked-passage.component.js",
133236
- "declarations": [
133237
- {
133238
- "kind": "class",
133239
- "description": "It visually displays a blocked passage between train wagons.",
133240
- "name": "SbbTrainBlockedPassageElement",
133241
- "members": [
133242
- {
133243
- "kind": "field",
133244
- "name": "elementName",
133245
- "type": {
133246
- "text": "string"
133247
- },
133248
- "privacy": "public",
133249
- "static": true,
133250
- "readonly": true,
133251
- "default": "'sbb-train-blocked-passage'",
133252
- "inheritedFrom": {
133253
- "name": "SbbElement",
133254
- "module": "core/base-elements/element.js"
133255
- }
133256
- },
133257
- {
133258
- "kind": "field",
133259
- "name": "_hydrationRequired",
133260
- "type": {
133261
- "text": "boolean"
133262
- },
133263
- "privacy": "private",
133264
- "default": "!!this.shadowRoot",
133265
- "inheritedFrom": {
133266
- "name": "SbbElement",
133267
- "module": "core/base-elements/element.js"
133268
- }
133269
- },
133270
- {
133271
- "kind": "field",
133272
- "name": "_hydrationComplete",
133273
- "privacy": "private",
133274
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
133275
- "inheritedFrom": {
133276
- "name": "SbbElement",
133277
- "module": "core/base-elements/element.js"
133278
- }
133279
- },
133280
- {
133281
- "kind": "field",
133282
- "name": "_resolveHydration",
133283
- "type": {
133284
- "text": "(hydrationRequired: boolean) => void"
133285
- },
133286
- "privacy": "private",
133287
- "inheritedFrom": {
133288
- "name": "SbbElement",
133289
- "module": "core/base-elements/element.js"
133290
- }
133291
- },
133292
- {
133293
- "kind": "field",
133294
- "name": "hydrationRequired",
133295
- "type": {
133296
- "text": "boolean"
133297
- },
133298
- "privacy": "protected",
133299
- "description": "Returns whether hydration is required and not completed.",
133300
- "readonly": true,
133301
- "inheritedFrom": {
133302
- "name": "SbbElement",
133303
- "module": "core/base-elements/element.js"
133304
- },
133305
- "default": "!!this.shadowRoot"
133306
- },
133307
- {
133308
- "kind": "method",
133309
- "name": "toggleState",
133310
- "privacy": "protected",
133311
- "return": {
133312
- "type": {
133313
- "text": "void"
133314
- }
133315
- },
133316
- "parameters": [
133317
- {
133318
- "name": "value",
133319
- "type": {
133320
- "text": "string"
133321
- }
133322
- },
133323
- {
133324
- "name": "force",
133325
- "optional": true,
133326
- "type": {
133327
- "text": "boolean"
133328
- }
133329
- }
133330
- ],
133331
- "inheritedFrom": {
133332
- "name": "SbbElement",
133333
- "module": "core/base-elements/element.js"
133334
- }
133335
- },
133336
- {
133337
- "kind": "field",
133338
- "name": "['_$sbbElement$']",
133339
- "type": {
133340
- "text": "boolean"
133341
- },
133342
- "privacy": "public",
133343
- "static": true,
133344
- "default": "true",
133345
- "inheritedFrom": {
133346
- "name": "SbbElement",
133347
- "module": "core/base-elements/element.js"
133348
- }
133349
- },
133350
- {
133351
- "kind": "field",
133352
- "name": "_controllers",
133353
- "type": {
133354
- "text": "Set<SbbReactiveController> | undefined"
133355
- },
133356
- "privacy": "private",
133357
- "inheritedFrom": {
133358
- "name": "SbbElement",
133359
- "module": "core/base-elements/element.js"
133360
- }
133361
- }
133362
- ],
133363
- "superclass": {
133364
- "name": "SbbElement",
133365
- "module": "core/base-elements.js"
133366
- },
133367
- "tagName": "sbb-train-blocked-passage",
133368
- "customElement": true
133369
- }
133370
- ],
133371
- "exports": [
133372
- {
133373
- "kind": "js",
133374
- "name": "SbbTrainBlockedPassageElement",
133375
- "declaration": {
133376
- "name": "SbbTrainBlockedPassageElement",
133377
- "module": "train/train-blocked-passage/train-blocked-passage.component.js"
133378
- }
133379
- }
133380
- ]
133381
- },
133382
133382
  {
133383
133383
  "kind": "javascript-module",
133384
133384
  "path": "train/train-wagon/train-wagon.component.js",