@sbb-esta/lyne-elements-dev 5.0.0-next.2-dev.1777997480 → 5.0.0-next.2-dev.1778052073

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 +622 -622
  2. package/package.json +2 -2
@@ -115152,12 +115152,22 @@
115152
115152
  },
115153
115153
  {
115154
115154
  "kind": "javascript-module",
115155
- "path": "form-field/form-field-clear/form-field-clear.component.js",
115155
+ "path": "form-field/form-field-text-counter/form-field-text-counter.component.js",
115156
115156
  "declarations": [
115157
115157
  {
115158
115158
  "kind": "class",
115159
- "description": "Combined with `sbb-form-field`, it displays a button which clears the input value.",
115160
- "name": "SbbFormFieldClearElement",
115159
+ "description": "It displays the remaining characters count for input/textarea elements with a configured\nmaxlength property in the `sbb-form-field`.\nThe component automatically uses the form field's inputElement and displays the remaining character count.\nIf the input is disabled, readonly or an `sbb-error` is present, the output is suppressed.",
115160
+ "name": "SbbFormFieldTextCounterElement",
115161
+ "slots": [
115162
+ {
115163
+ "description": "Use the unnamed slot to display a custom description text after the counter.",
115164
+ "name": "",
115165
+ "inheritedFrom": {
115166
+ "name": "SbbHintElement",
115167
+ "module": "form-field/hint/hint.component.js"
115168
+ }
115169
+ }
115170
+ ],
115161
115171
  "members": [
115162
115172
  {
115163
115173
  "kind": "field",
@@ -115168,63 +115178,54 @@
115168
115178
  "privacy": "public",
115169
115179
  "static": true,
115170
115180
  "readonly": true,
115181
+ "default": "'sbb-form-field-text-counter'",
115171
115182
  "inheritedFrom": {
115172
115183
  "name": "SbbElement",
115173
115184
  "module": "core/base-elements/element.js"
115174
- },
115175
- "default": "'sbb-form-field-clear'"
115185
+ }
115176
115186
  },
115177
115187
  {
115178
115188
  "kind": "field",
115179
- "name": "elementDependencies",
115189
+ "name": "_remainingCharacters",
115180
115190
  "type": {
115181
- "text": "SbbElementType[]"
115182
- },
115183
- "privacy": "public",
115184
- "static": true,
115185
- "inheritedFrom": {
115186
- "name": "SbbElement",
115187
- "module": "core/base-elements/element.js"
115191
+ "text": "number"
115188
115192
  },
115189
- "default": "[SbbIconElement]"
115193
+ "privacy": "private",
115194
+ "default": "0"
115190
115195
  },
115191
115196
  {
115192
115197
  "kind": "field",
115193
- "name": "_formField",
115194
- "type": {
115195
- "text": "SbbFormFieldElement | null | undefined"
115196
- },
115197
- "privacy": "private"
115198
+ "name": "_language",
115199
+ "privacy": "private",
115200
+ "default": "new SbbLanguageController(this)"
115198
115201
  },
115199
115202
  {
115200
115203
  "kind": "field",
115201
- "name": "_language",
115204
+ "name": "_abortController",
115205
+ "type": {
115206
+ "text": "AbortController | null"
115207
+ },
115202
115208
  "privacy": "private",
115203
- "default": "new SbbLanguageController(this)"
115209
+ "default": "null"
115204
115210
  },
115205
115211
  {
115206
115212
  "kind": "method",
115207
- "name": "_handleClick",
115213
+ "name": "_onInputUpdate",
115208
115214
  "privacy": "private",
115209
115215
  "return": {
115210
115216
  "type": {
115211
- "text": "Promise<void>"
115217
+ "text": "void"
115212
115218
  }
115213
115219
  }
115214
115220
  },
115215
115221
  {
115216
115222
  "kind": "method",
115217
- "name": "renderTemplate",
115218
- "privacy": "protected",
115223
+ "name": "_infoText",
115224
+ "privacy": "private",
115219
115225
  "return": {
115220
115226
  "type": {
115221
- "text": "TemplateResult"
115227
+ "text": "string"
115222
115228
  }
115223
- },
115224
- "description": "Override this method to render the component template.",
115225
- "inheritedFrom": {
115226
- "name": "SbbActionBaseElement",
115227
- "module": "core/base-elements/action-base-element.js"
115228
115229
  }
115229
115230
  },
115230
115231
  {
@@ -115245,243 +115246,159 @@
115245
115246
  },
115246
115247
  {
115247
115248
  "kind": "field",
115248
- "name": "_elementsOnWhichEnterPressTriggersSubmit",
115249
+ "name": "formField",
115249
115250
  "type": {
115250
- "text": "array"
115251
+ "text": "SbbFormFieldElement | null"
115251
115252
  },
115252
- "privacy": "private",
115253
- "readonly": true,
115254
- "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
115253
+ "privacy": "protected",
115254
+ "default": "null",
115255
115255
  "inheritedFrom": {
115256
- "name": "SbbButtonBaseElement",
115257
- "module": "core/base-elements/button-base-element.js"
115256
+ "name": "SbbHintElement",
115257
+ "module": "form-field/hint/hint.component.js"
115258
115258
  }
115259
115259
  },
115260
115260
  {
115261
115261
  "kind": "field",
115262
- "name": "value",
115262
+ "name": "['_$sbbElement$']",
115263
115263
  "type": {
115264
- "text": "string"
115265
- },
115266
- "privacy": "public",
115267
- "inheritedFrom": {
115268
- "name": "SbbButtonBaseElement",
115269
- "module": "core/base-elements/button-base-element.js"
115264
+ "text": "boolean"
115270
115265
  },
115271
- "default": "''",
115272
- "description": "Value of the form element.",
115273
- "attribute": "value"
115274
- },
115275
- {
115276
- "kind": "field",
115277
- "name": "type",
115278
115266
  "privacy": "public",
115279
- "description": "The type attribute to use for the button.",
115280
- "default": "'button'",
115281
- "type": {
115282
- "text": "SbbButtonType"
115283
- },
115284
- "attribute": "type",
115267
+ "static": true,
115268
+ "default": "true",
115285
115269
  "inheritedFrom": {
115286
- "name": "SbbButtonBaseElement",
115287
- "module": "core/base-elements/button-base-element.js"
115270
+ "name": "SbbElement",
115271
+ "module": "core/base-elements/element.js"
115288
115272
  }
115289
115273
  },
115290
115274
  {
115291
115275
  "kind": "field",
115292
- "name": "form",
115276
+ "name": "elementDependencies",
115293
115277
  "type": {
115294
- "text": "HTMLFormElement | null"
115278
+ "text": "SbbElementType[] | undefined"
115295
115279
  },
115296
115280
  "privacy": "public",
115297
- "description": "The `<form>` element to associate the button with.",
115298
- "inheritedFrom": {
115299
- "name": "SbbButtonBaseElement",
115300
- "module": "core/base-elements/button-base-element.js"
115301
- },
115302
- "attribute": "form"
115303
- },
115304
- {
115305
- "kind": "field",
115306
- "name": "_formId",
115307
- "type": {
115308
- "text": "string"
115309
- },
115310
- "privacy": "private",
115311
- "default": "''",
115312
- "inheritedFrom": {
115313
- "name": "SbbButtonBaseElement",
115314
- "module": "core/base-elements/button-base-element.js"
115315
- }
115316
- },
115317
- {
115318
- "kind": "field",
115319
- "name": "_handleButtonClick",
115320
- "privacy": "private",
115321
- "inheritedFrom": {
115322
- "name": "SbbButtonBaseElement",
115323
- "module": "core/base-elements/button-base-element.js"
115324
- }
115325
- },
115326
- {
115327
- "kind": "method",
115328
- "name": "_requestSubmit",
115329
- "privacy": "private",
115330
- "return": {
115331
- "type": {
115332
- "text": "void"
115333
- }
115334
- },
115335
- "parameters": [
115336
- {
115337
- "name": "form",
115338
- "type": {
115339
- "text": "HTMLFormElement"
115340
- }
115341
- }
115342
- ],
115343
- "inheritedFrom": {
115344
- "name": "SbbButtonBaseElement",
115345
- "module": "core/base-elements/button-base-element.js"
115346
- }
115347
- },
115348
- {
115349
- "kind": "field",
115350
- "name": "_formKeyDown",
115351
- "privacy": "private",
115281
+ "static": true,
115352
115282
  "inheritedFrom": {
115353
- "name": "SbbButtonBaseElement",
115354
- "module": "core/base-elements/button-base-element.js"
115283
+ "name": "SbbElement",
115284
+ "module": "core/base-elements/element.js"
115355
115285
  }
115356
115286
  },
115357
115287
  {
115358
115288
  "kind": "field",
115359
- "name": "formAssociated",
115289
+ "name": "role",
115360
115290
  "type": {
115361
- "text": "boolean"
115291
+ "text": "ElementInternals['role'] | undefined"
115362
115292
  },
115363
115293
  "privacy": "public",
115364
115294
  "static": true,
115365
- "default": "true",
115366
115295
  "inheritedFrom": {
115367
- "name": "SbbFormAssociatedMixin",
115368
- "module": "core/mixins/form-associated-mixin.js"
115296
+ "name": "SbbElement",
115297
+ "module": "core/base-elements/element.js"
115369
115298
  }
115370
115299
  },
115371
115300
  {
115372
115301
  "kind": "field",
115373
- "name": "name",
115374
- "privacy": "public",
115375
- "description": "Name of the form element. Will be read from name attribute.",
115302
+ "name": "_controllers",
115376
115303
  "type": {
115377
- "text": "string"
115304
+ "text": "Set<SbbReactiveController> | undefined"
115378
115305
  },
115379
- "attribute": "name",
115306
+ "privacy": "private",
115380
115307
  "inheritedFrom": {
115381
- "name": "SbbFormAssociatedMixin",
115382
- "module": "core/mixins/form-associated-mixin.js"
115308
+ "name": "SbbElement",
115309
+ "module": "core/base-elements/element.js"
115383
115310
  }
115384
115311
  },
115385
115312
  {
115386
115313
  "kind": "field",
115387
- "name": "validity",
115314
+ "name": "_hydrationRequired",
115388
115315
  "type": {
115389
- "text": "ValidityState"
115316
+ "text": "boolean"
115390
115317
  },
115391
- "privacy": "public",
115392
- "description": "Returns the ValidityState object for this element.",
115393
- "readonly": true,
115318
+ "privacy": "private",
115319
+ "default": "!!this.shadowRoot",
115394
115320
  "inheritedFrom": {
115395
- "name": "SbbFormAssociatedMixin",
115396
- "module": "core/mixins/form-associated-mixin.js"
115321
+ "name": "SbbElement",
115322
+ "module": "core/base-elements/element.js"
115397
115323
  }
115398
115324
  },
115399
115325
  {
115400
115326
  "kind": "field",
115401
- "name": "validationMessage",
115402
- "type": {
115403
- "text": "string"
115404
- },
115405
- "privacy": "public",
115406
- "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.",
115407
- "readonly": true,
115327
+ "name": "_hydrationComplete",
115328
+ "privacy": "private",
115329
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
115408
115330
  "inheritedFrom": {
115409
- "name": "SbbFormAssociatedMixin",
115410
- "module": "core/mixins/form-associated-mixin.js"
115331
+ "name": "SbbElement",
115332
+ "module": "core/base-elements/element.js"
115411
115333
  }
115412
115334
  },
115413
115335
  {
115414
115336
  "kind": "field",
115415
- "name": "willValidate",
115337
+ "name": "_resolveHydration",
115416
115338
  "type": {
115417
- "text": "boolean"
115339
+ "text": "(hydrationRequired: boolean) => void"
115418
115340
  },
115419
- "privacy": "public",
115420
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
115421
- "readonly": true,
115341
+ "privacy": "private",
115422
115342
  "inheritedFrom": {
115423
- "name": "SbbFormAssociatedMixin",
115424
- "module": "core/mixins/form-associated-mixin.js"
115343
+ "name": "SbbElement",
115344
+ "module": "core/base-elements/element.js"
115425
115345
  }
115426
115346
  },
115427
115347
  {
115428
115348
  "kind": "field",
115429
- "name": "_validityStates",
115349
+ "name": "_textObserver",
115350
+ "type": {
115351
+ "text": "MutationObserver | undefined"
115352
+ },
115430
115353
  "privacy": "private",
115431
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
115432
115354
  "inheritedFrom": {
115433
- "name": "SbbFormAssociatedMixin",
115434
- "module": "core/mixins/form-associated-mixin.js"
115355
+ "name": "SbbElement",
115356
+ "module": "core/base-elements/element.js"
115435
115357
  }
115436
115358
  },
115437
115359
  {
115438
115360
  "kind": "field",
115439
- "name": "formDisabled",
115361
+ "name": "hydrationRequired",
115440
115362
  "type": {
115441
115363
  "text": "boolean"
115442
115364
  },
115443
115365
  "privacy": "protected",
115444
- "default": "false",
115445
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
115366
+ "description": "Returns whether hydration is required and not completed.",
115367
+ "readonly": true,
115446
115368
  "inheritedFrom": {
115447
- "name": "SbbFormAssociatedMixin",
115448
- "module": "core/mixins/form-associated-mixin.js"
115449
- }
115369
+ "name": "SbbElement",
115370
+ "module": "core/base-elements/element.js"
115371
+ },
115372
+ "default": "!!this.shadowRoot"
115450
115373
  },
115451
115374
  {
115452
115375
  "kind": "method",
115453
- "name": "checkValidity",
115454
- "privacy": "public",
115376
+ "name": "finalizeStyles",
115377
+ "privacy": "protected",
115378
+ "static": true,
115455
115379
  "return": {
115456
115380
  "type": {
115457
- "text": "boolean"
115381
+ "text": "CSSResultOrNative[]"
115458
115382
  }
115459
115383
  },
115460
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
115461
- "inheritedFrom": {
115462
- "name": "SbbFormAssociatedMixin",
115463
- "module": "core/mixins/form-associated-mixin.js"
115464
- }
115465
- },
115466
- {
115467
- "kind": "method",
115468
- "name": "reportValidity",
115469
- "privacy": "public",
115470
- "return": {
115471
- "type": {
115472
- "text": "boolean"
115384
+ "parameters": [
115385
+ {
115386
+ "name": "_styles",
115387
+ "type": {
115388
+ "text": "CSSResultGroup"
115389
+ }
115473
115390
  }
115474
- },
115475
- "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.",
115391
+ ],
115392
+ "description": "Collects `styles` from every class in the prototype chain (using `Object.hasOwn`)\nand merges them in top-down order. This means each class/mixin only needs to declare\nits **own** styles — there is no need to reference `super.styles`.\n\nLit's default behaviour already walks the chain, but fails for mixins where\n`super.styles` resolves to the wrong class. This override fixes that.",
115476
115393
  "inheritedFrom": {
115477
- "name": "SbbFormAssociatedMixin",
115478
- "module": "core/mixins/form-associated-mixin.js"
115394
+ "name": "SbbElement",
115395
+ "module": "core/base-elements/element.js"
115479
115396
  }
115480
115397
  },
115481
115398
  {
115482
115399
  "kind": "method",
115483
- "name": "setCustomValidity",
115484
- "privacy": "public",
115400
+ "name": "toggleState",
115401
+ "privacy": "protected",
115485
115402
  "return": {
115486
115403
  "type": {
115487
115404
  "text": "void"
@@ -115489,65 +115406,56 @@
115489
115406
  },
115490
115407
  "parameters": [
115491
115408
  {
115492
- "name": "message",
115409
+ "name": "value",
115493
115410
  "type": {
115494
115411
  "text": "string"
115495
115412
  }
115413
+ },
115414
+ {
115415
+ "name": "force",
115416
+ "optional": true,
115417
+ "type": {
115418
+ "text": "boolean"
115419
+ }
115496
115420
  }
115497
115421
  ],
115498
- "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.",
115499
115422
  "inheritedFrom": {
115500
- "name": "SbbFormAssociatedMixin",
115501
- "module": "core/mixins/form-associated-mixin.js"
115423
+ "name": "SbbElement",
115424
+ "module": "core/base-elements/element.js"
115502
115425
  }
115503
115426
  },
115504
115427
  {
115505
115428
  "kind": "method",
115506
- "name": "_hasDisabledAncestor",
115429
+ "name": "_slotchangeHandler",
115507
115430
  "privacy": "private",
115508
- "return": {
115509
- "type": {
115510
- "text": "boolean"
115511
- }
115512
- },
115513
- "inheritedFrom": {
115514
- "name": "SbbFormAssociatedMixin",
115515
- "module": "core/mixins/form-associated-mixin.js"
115516
- }
115517
- },
115518
- {
115519
- "kind": "method",
115520
- "name": "updateFormValue",
115521
- "privacy": "protected",
115522
115431
  "return": {
115523
115432
  "type": {
115524
115433
  "text": "void"
115525
115434
  }
115526
115435
  },
115527
- "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",
115528
- "inheritedFrom": {
115529
- "name": "SbbFormAssociatedMixin",
115530
- "module": "core/mixins/form-associated-mixin.js"
115531
- }
115532
- },
115533
- {
115534
- "kind": "method",
115535
- "name": "formState",
115536
- "privacy": "protected",
115537
- "return": {
115538
- "type": {
115539
- "text": "FormRestoreState"
115436
+ "parameters": [
115437
+ {
115438
+ "name": "event",
115439
+ "type": {
115440
+ "text": "Event"
115441
+ }
115442
+ },
115443
+ {
115444
+ "name": "slot",
115445
+ "type": {
115446
+ "text": "HTMLSlotElement"
115447
+ }
115540
115448
  }
115541
- },
115449
+ ],
115542
115450
  "inheritedFrom": {
115543
- "name": "SbbFormAssociatedMixin",
115544
- "module": "core/mixins/form-associated-mixin.js"
115451
+ "name": "SbbElement",
115452
+ "module": "core/base-elements/element.js"
115545
115453
  }
115546
115454
  },
115547
115455
  {
115548
115456
  "kind": "method",
115549
- "name": "setValidityFlag",
115550
- "privacy": "protected",
115457
+ "name": "_handleSlotChangeForSlottedState",
115458
+ "privacy": "private",
115551
115459
  "return": {
115552
115460
  "type": {
115553
115461
  "text": "void"
@@ -115555,35 +115463,21 @@
115555
115463
  },
115556
115464
  "parameters": [
115557
115465
  {
115558
- "name": "flag",
115559
- "type": {
115560
- "text": "T"
115561
- }
115562
- },
115563
- {
115564
- "name": "message",
115565
- "type": {
115566
- "text": "string"
115567
- }
115568
- },
115569
- {
115570
- "name": "flagValue",
115571
- "optional": true,
115466
+ "name": "slot",
115572
115467
  "type": {
115573
- "text": "ValidityStateFlags[T]"
115468
+ "text": "HTMLSlotElement"
115574
115469
  }
115575
115470
  }
115576
115471
  ],
115577
- "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).",
115578
115472
  "inheritedFrom": {
115579
- "name": "SbbFormAssociatedMixin",
115580
- "module": "core/mixins/form-associated-mixin.js"
115473
+ "name": "SbbElement",
115474
+ "module": "core/base-elements/element.js"
115581
115475
  }
115582
115476
  },
115583
115477
  {
115584
115478
  "kind": "method",
115585
- "name": "removeValidityFlag",
115586
- "privacy": "protected",
115479
+ "name": "_updateSlottedState",
115480
+ "privacy": "private",
115587
115481
  "return": {
115588
115482
  "type": {
115589
115483
  "text": "void"
@@ -115591,37 +115485,43 @@
115591
115485
  },
115592
115486
  "parameters": [
115593
115487
  {
115594
- "name": "flag",
115488
+ "name": "slot",
115595
115489
  "type": {
115596
- "text": "T"
115490
+ "text": "HTMLSlotElement"
115597
115491
  }
115598
115492
  }
115599
115493
  ],
115600
- "description": "Removes the validity state flag entry and updates validity state.",
115601
115494
  "inheritedFrom": {
115602
- "name": "SbbFormAssociatedMixin",
115603
- "module": "core/mixins/form-associated-mixin.js"
115495
+ "name": "SbbElement",
115496
+ "module": "core/base-elements/element.js"
115604
115497
  }
115605
115498
  },
115606
115499
  {
115607
115500
  "kind": "method",
115608
- "name": "validate",
115609
- "privacy": "protected",
115501
+ "name": "_observeTextNodesInSlot",
115502
+ "privacy": "private",
115610
115503
  "return": {
115611
115504
  "type": {
115612
115505
  "text": "void"
115613
115506
  }
115614
115507
  },
115615
- "description": "To be called whenever the current element needs to be validated.",
115508
+ "parameters": [
115509
+ {
115510
+ "name": "slot",
115511
+ "type": {
115512
+ "text": "HTMLSlotElement"
115513
+ }
115514
+ }
115515
+ ],
115616
115516
  "inheritedFrom": {
115617
- "name": "SbbFormAssociatedMixin",
115618
- "module": "core/mixins/form-associated-mixin.js"
115517
+ "name": "SbbElement",
115518
+ "module": "core/base-elements/element.js"
115619
115519
  }
115620
115520
  },
115621
115521
  {
115622
115522
  "kind": "method",
115623
- "name": "shouldValidate",
115624
- "privacy": "protected",
115523
+ "name": "_hasSlottedContent",
115524
+ "privacy": "private",
115625
115525
  "return": {
115626
115526
  "type": {
115627
115527
  "text": "boolean"
@@ -115629,140 +115529,259 @@
115629
115529
  },
115630
115530
  "parameters": [
115631
115531
  {
115632
- "name": "name",
115532
+ "name": "slot",
115633
115533
  "type": {
115634
- "text": "PropertyKey | undefined"
115534
+ "text": "HTMLSlotElement"
115635
115535
  }
115636
115536
  }
115637
115537
  ],
115638
- "description": "Whether validation should be run on a property change with the given name.",
115639
115538
  "inheritedFrom": {
115640
- "name": "SbbFormAssociatedMixin",
115641
- "module": "core/mixins/form-associated-mixin.js"
115539
+ "name": "SbbElement",
115540
+ "module": "core/base-elements/element.js"
115642
115541
  }
115643
- },
115542
+ }
115543
+ ],
115544
+ "superclass": {
115545
+ "name": "SbbHintElement",
115546
+ "module": "form-field/hint/hint.component.js"
115547
+ },
115548
+ "tagName": "sbb-form-field-text-counter",
115549
+ "customElement": true,
115550
+ "attributes": [
115644
115551
  {
115645
- "kind": "method",
115646
- "name": "_setInternalValidity",
115647
- "privacy": "private",
115648
- "return": {
115649
- "type": {
115650
- "text": "void"
115651
- }
115552
+ "name": "negative",
115553
+ "type": {
115554
+ "text": "boolean"
115652
115555
  },
115556
+ "default": "false",
115557
+ "description": "Negative coloring variant flag.",
115558
+ "fieldName": "negative",
115653
115559
  "inheritedFrom": {
115654
- "name": "SbbFormAssociatedMixin",
115655
- "module": "core/mixins/form-associated-mixin.js"
115560
+ "name": "SbbNegativeMixin",
115561
+ "module": "core/mixins/negative-mixin.js"
115656
115562
  }
115657
- },
115563
+ }
115564
+ ]
115565
+ }
115566
+ ],
115567
+ "exports": [
115568
+ {
115569
+ "kind": "js",
115570
+ "name": "SbbFormFieldTextCounterElement",
115571
+ "declaration": {
115572
+ "name": "SbbFormFieldTextCounterElement",
115573
+ "module": "form-field/form-field-text-counter/form-field-text-counter.component.js"
115574
+ }
115575
+ }
115576
+ ]
115577
+ },
115578
+ {
115579
+ "kind": "javascript-module",
115580
+ "path": "form-field/form-field-clear/form-field-clear.component.js",
115581
+ "declarations": [
115582
+ {
115583
+ "kind": "class",
115584
+ "description": "Combined with `sbb-form-field`, it displays a button which clears the input value.",
115585
+ "name": "SbbFormFieldClearElement",
115586
+ "members": [
115658
115587
  {
115659
115588
  "kind": "field",
115660
- "name": "role",
115589
+ "name": "elementName",
115661
115590
  "type": {
115662
- "text": "ElementInternals['role']"
115591
+ "text": "string"
115663
115592
  },
115664
115593
  "privacy": "public",
115665
115594
  "static": true,
115595
+ "readonly": true,
115666
115596
  "inheritedFrom": {
115667
115597
  "name": "SbbElement",
115668
115598
  "module": "core/base-elements/element.js"
115669
115599
  },
115670
- "readonly": true,
115671
- "default": "'button'"
115600
+ "default": "'sbb-form-field-clear'"
115672
115601
  },
115673
115602
  {
115674
115603
  "kind": "field",
115675
- "name": "_preventScrollOnSpaceKeydown",
115676
- "privacy": "private",
115677
- "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
115678
- "parameters": [
115679
- {
115680
- "description": "The origin event.",
115681
- "name": "event"
115682
- }
115683
- ],
115604
+ "name": "elementDependencies",
115605
+ "type": {
115606
+ "text": "SbbElementType[]"
115607
+ },
115608
+ "privacy": "public",
115609
+ "static": true,
115684
115610
  "inheritedFrom": {
115685
- "name": "SbbButtonLikeBaseElement",
115686
- "module": "core/base-elements/button-base-element.js"
115687
- }
115611
+ "name": "SbbElement",
115612
+ "module": "core/base-elements/element.js"
115613
+ },
115614
+ "default": "[SbbIconElement]"
115688
115615
  },
115689
115616
  {
115690
115617
  "kind": "field",
115691
- "name": "_removeActiveMarker",
115692
- "privacy": "private",
115693
- "inheritedFrom": {
115694
- "name": "SbbButtonLikeBaseElement",
115695
- "module": "core/base-elements/button-base-element.js"
115696
- }
115618
+ "name": "_formField",
115619
+ "type": {
115620
+ "text": "SbbFormFieldElement | null | undefined"
115621
+ },
115622
+ "privacy": "private"
115697
115623
  },
115698
115624
  {
115699
115625
  "kind": "field",
115700
- "name": "_dispatchClickEventOnSpaceKeyup",
115626
+ "name": "_language",
115701
115627
  "privacy": "private",
115702
- "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.",
115703
- "parameters": [
115704
- {
115705
- "description": "The origin event.",
115706
- "name": "event"
115628
+ "default": "new SbbLanguageController(this)"
115629
+ },
115630
+ {
115631
+ "kind": "method",
115632
+ "name": "_handleClick",
115633
+ "privacy": "private",
115634
+ "return": {
115635
+ "type": {
115636
+ "text": "Promise<void>"
115707
115637
  }
115708
- ],
115638
+ }
115639
+ },
115640
+ {
115641
+ "kind": "method",
115642
+ "name": "renderTemplate",
115643
+ "privacy": "protected",
115644
+ "return": {
115645
+ "type": {
115646
+ "text": "TemplateResult"
115647
+ }
115648
+ },
115649
+ "description": "Override this method to render the component template.",
115709
115650
  "inheritedFrom": {
115710
- "name": "SbbButtonLikeBaseElement",
115711
- "module": "core/base-elements/button-base-element.js"
115651
+ "name": "SbbActionBaseElement",
115652
+ "module": "core/base-elements/action-base-element.js"
115712
115653
  }
115713
115654
  },
115714
115655
  {
115715
115656
  "kind": "field",
115716
- "name": "_dispatchClickEvent",
115657
+ "name": "negative",
115658
+ "type": {
115659
+ "text": "boolean"
115660
+ },
115661
+ "privacy": "public",
115662
+ "default": "false",
115663
+ "description": "Negative coloring variant flag.",
115664
+ "attribute": "negative",
115665
+ "reflects": true,
115666
+ "inheritedFrom": {
115667
+ "name": "SbbNegativeMixin",
115668
+ "module": "core/mixins/negative-mixin.js"
115669
+ }
115670
+ },
115671
+ {
115672
+ "kind": "field",
115673
+ "name": "_elementsOnWhichEnterPressTriggersSubmit",
115674
+ "type": {
115675
+ "text": "array"
115676
+ },
115717
115677
  "privacy": "private",
115678
+ "readonly": true,
115679
+ "default": "[ 'input', 'sbb-date-input', 'sbb-time-input', ]",
115718
115680
  "inheritedFrom": {
115719
- "name": "SbbButtonLikeBaseElement",
115681
+ "name": "SbbButtonBaseElement",
115720
115682
  "module": "core/base-elements/button-base-element.js"
115721
115683
  }
115722
115684
  },
115723
115685
  {
115724
115686
  "kind": "field",
115725
- "name": "maybeDisabled",
115687
+ "name": "value",
115726
115688
  "type": {
115727
- "text": "boolean | undefined"
115689
+ "text": "string"
115728
115690
  },
115729
- "privacy": "protected",
115730
- "readonly": true,
115691
+ "privacy": "public",
115731
115692
  "inheritedFrom": {
115732
- "name": "SbbActionBaseElement",
115733
- "module": "core/base-elements/action-base-element.js"
115693
+ "name": "SbbButtonBaseElement",
115694
+ "module": "core/base-elements/button-base-element.js"
115695
+ },
115696
+ "default": "''",
115697
+ "description": "Value of the form element.",
115698
+ "attribute": "value"
115699
+ },
115700
+ {
115701
+ "kind": "field",
115702
+ "name": "type",
115703
+ "privacy": "public",
115704
+ "description": "The type attribute to use for the button.",
115705
+ "default": "'button'",
115706
+ "type": {
115707
+ "text": "SbbButtonType"
115708
+ },
115709
+ "attribute": "type",
115710
+ "inheritedFrom": {
115711
+ "name": "SbbButtonBaseElement",
115712
+ "module": "core/base-elements/button-base-element.js"
115734
115713
  }
115735
115714
  },
115736
115715
  {
115737
115716
  "kind": "field",
115738
- "name": "maybeDisabledInteractive",
115717
+ "name": "form",
115739
115718
  "type": {
115740
- "text": "boolean | undefined"
115719
+ "text": "HTMLFormElement | null"
115741
115720
  },
115742
- "privacy": "protected",
115743
- "readonly": true,
115721
+ "privacy": "public",
115722
+ "description": "The `<form>` element to associate the button with.",
115744
115723
  "inheritedFrom": {
115745
- "name": "SbbActionBaseElement",
115746
- "module": "core/base-elements/action-base-element.js"
115724
+ "name": "SbbButtonBaseElement",
115725
+ "module": "core/base-elements/button-base-element.js"
115726
+ },
115727
+ "attribute": "form"
115728
+ },
115729
+ {
115730
+ "kind": "field",
115731
+ "name": "_formId",
115732
+ "type": {
115733
+ "text": "string"
115734
+ },
115735
+ "privacy": "private",
115736
+ "default": "''",
115737
+ "inheritedFrom": {
115738
+ "name": "SbbButtonBaseElement",
115739
+ "module": "core/base-elements/button-base-element.js"
115740
+ }
115741
+ },
115742
+ {
115743
+ "kind": "field",
115744
+ "name": "_handleButtonClick",
115745
+ "privacy": "private",
115746
+ "inheritedFrom": {
115747
+ "name": "SbbButtonBaseElement",
115748
+ "module": "core/base-elements/button-base-element.js"
115747
115749
  }
115748
115750
  },
115749
115751
  {
115750
115752
  "kind": "method",
115751
- "name": "setupBaseEventHandlers",
115752
- "privacy": "protected",
115753
+ "name": "_requestSubmit",
115754
+ "privacy": "private",
115753
115755
  "return": {
115754
115756
  "type": {
115755
115757
  "text": "void"
115756
115758
  }
115757
115759
  },
115760
+ "parameters": [
115761
+ {
115762
+ "name": "form",
115763
+ "type": {
115764
+ "text": "HTMLFormElement"
115765
+ }
115766
+ }
115767
+ ],
115758
115768
  "inheritedFrom": {
115759
- "name": "SbbActionBaseElement",
115760
- "module": "core/base-elements/action-base-element.js"
115769
+ "name": "SbbButtonBaseElement",
115770
+ "module": "core/base-elements/button-base-element.js"
115761
115771
  }
115762
115772
  },
115763
115773
  {
115764
115774
  "kind": "field",
115765
- "name": "['_$sbbElement$']",
115775
+ "name": "_formKeyDown",
115776
+ "privacy": "private",
115777
+ "inheritedFrom": {
115778
+ "name": "SbbButtonBaseElement",
115779
+ "module": "core/base-elements/button-base-element.js"
115780
+ }
115781
+ },
115782
+ {
115783
+ "kind": "field",
115784
+ "name": "formAssociated",
115766
115785
  "type": {
115767
115786
  "text": "boolean"
115768
115787
  },
@@ -115770,112 +115789,124 @@
115770
115789
  "static": true,
115771
115790
  "default": "true",
115772
115791
  "inheritedFrom": {
115773
- "name": "SbbElement",
115774
- "module": "core/base-elements/element.js"
115792
+ "name": "SbbFormAssociatedMixin",
115793
+ "module": "core/mixins/form-associated-mixin.js"
115775
115794
  }
115776
115795
  },
115777
115796
  {
115778
115797
  "kind": "field",
115779
- "name": "_controllers",
115798
+ "name": "name",
115799
+ "privacy": "public",
115800
+ "description": "Name of the form element. Will be read from name attribute.",
115780
115801
  "type": {
115781
- "text": "Set<SbbReactiveController> | undefined"
115802
+ "text": "string"
115782
115803
  },
115783
- "privacy": "private",
115804
+ "attribute": "name",
115784
115805
  "inheritedFrom": {
115785
- "name": "SbbElement",
115786
- "module": "core/base-elements/element.js"
115806
+ "name": "SbbFormAssociatedMixin",
115807
+ "module": "core/mixins/form-associated-mixin.js"
115787
115808
  }
115788
115809
  },
115789
115810
  {
115790
115811
  "kind": "field",
115791
- "name": "_hydrationRequired",
115812
+ "name": "validity",
115792
115813
  "type": {
115793
- "text": "boolean"
115814
+ "text": "ValidityState"
115794
115815
  },
115795
- "privacy": "private",
115796
- "default": "!!this.shadowRoot",
115816
+ "privacy": "public",
115817
+ "description": "Returns the ValidityState object for this element.",
115818
+ "readonly": true,
115797
115819
  "inheritedFrom": {
115798
- "name": "SbbElement",
115799
- "module": "core/base-elements/element.js"
115820
+ "name": "SbbFormAssociatedMixin",
115821
+ "module": "core/mixins/form-associated-mixin.js"
115800
115822
  }
115801
115823
  },
115802
115824
  {
115803
115825
  "kind": "field",
115804
- "name": "_hydrationComplete",
115805
- "privacy": "private",
115806
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
115826
+ "name": "validationMessage",
115827
+ "type": {
115828
+ "text": "string"
115829
+ },
115830
+ "privacy": "public",
115831
+ "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.",
115832
+ "readonly": true,
115807
115833
  "inheritedFrom": {
115808
- "name": "SbbElement",
115809
- "module": "core/base-elements/element.js"
115834
+ "name": "SbbFormAssociatedMixin",
115835
+ "module": "core/mixins/form-associated-mixin.js"
115810
115836
  }
115811
115837
  },
115812
115838
  {
115813
115839
  "kind": "field",
115814
- "name": "_resolveHydration",
115840
+ "name": "willValidate",
115815
115841
  "type": {
115816
- "text": "(hydrationRequired: boolean) => void"
115842
+ "text": "boolean"
115817
115843
  },
115818
- "privacy": "private",
115844
+ "privacy": "public",
115845
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
115846
+ "readonly": true,
115819
115847
  "inheritedFrom": {
115820
- "name": "SbbElement",
115821
- "module": "core/base-elements/element.js"
115848
+ "name": "SbbFormAssociatedMixin",
115849
+ "module": "core/mixins/form-associated-mixin.js"
115822
115850
  }
115823
115851
  },
115824
115852
  {
115825
115853
  "kind": "field",
115826
- "name": "_textObserver",
115827
- "type": {
115828
- "text": "MutationObserver | undefined"
115829
- },
115854
+ "name": "_validityStates",
115830
115855
  "privacy": "private",
115856
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
115831
115857
  "inheritedFrom": {
115832
- "name": "SbbElement",
115833
- "module": "core/base-elements/element.js"
115858
+ "name": "SbbFormAssociatedMixin",
115859
+ "module": "core/mixins/form-associated-mixin.js"
115834
115860
  }
115835
115861
  },
115836
115862
  {
115837
115863
  "kind": "field",
115838
- "name": "hydrationRequired",
115864
+ "name": "formDisabled",
115839
115865
  "type": {
115840
115866
  "text": "boolean"
115841
115867
  },
115842
115868
  "privacy": "protected",
115843
- "description": "Returns whether hydration is required and not completed.",
115844
- "readonly": true,
115869
+ "default": "false",
115870
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
115845
115871
  "inheritedFrom": {
115846
- "name": "SbbElement",
115847
- "module": "core/base-elements/element.js"
115848
- },
115849
- "default": "!!this.shadowRoot"
115872
+ "name": "SbbFormAssociatedMixin",
115873
+ "module": "core/mixins/form-associated-mixin.js"
115874
+ }
115850
115875
  },
115851
115876
  {
115852
115877
  "kind": "method",
115853
- "name": "finalizeStyles",
115854
- "privacy": "protected",
115855
- "static": true,
115878
+ "name": "checkValidity",
115879
+ "privacy": "public",
115856
115880
  "return": {
115857
115881
  "type": {
115858
- "text": "CSSResultOrNative[]"
115882
+ "text": "boolean"
115859
115883
  }
115860
115884
  },
115861
- "parameters": [
115862
- {
115863
- "name": "_styles",
115864
- "type": {
115865
- "text": "CSSResultGroup"
115866
- }
115885
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
115886
+ "inheritedFrom": {
115887
+ "name": "SbbFormAssociatedMixin",
115888
+ "module": "core/mixins/form-associated-mixin.js"
115889
+ }
115890
+ },
115891
+ {
115892
+ "kind": "method",
115893
+ "name": "reportValidity",
115894
+ "privacy": "public",
115895
+ "return": {
115896
+ "type": {
115897
+ "text": "boolean"
115867
115898
  }
115868
- ],
115869
- "description": "Collects `styles` from every class in the prototype chain (using `Object.hasOwn`)\nand merges them in top-down order. This means each class/mixin only needs to declare\nits **own** styles — there is no need to reference `super.styles`.\n\nLit's default behaviour already walks the chain, but fails for mixins where\n`super.styles` resolves to the wrong class. This override fixes that.",
115899
+ },
115900
+ "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.",
115870
115901
  "inheritedFrom": {
115871
- "name": "SbbElement",
115872
- "module": "core/base-elements/element.js"
115902
+ "name": "SbbFormAssociatedMixin",
115903
+ "module": "core/mixins/form-associated-mixin.js"
115873
115904
  }
115874
115905
  },
115875
115906
  {
115876
115907
  "kind": "method",
115877
- "name": "toggleState",
115878
- "privacy": "protected",
115908
+ "name": "setCustomValidity",
115909
+ "privacy": "public",
115879
115910
  "return": {
115880
115911
  "type": {
115881
115912
  "text": "void"
@@ -115883,100 +115914,65 @@
115883
115914
  },
115884
115915
  "parameters": [
115885
115916
  {
115886
- "name": "value",
115917
+ "name": "message",
115887
115918
  "type": {
115888
115919
  "text": "string"
115889
115920
  }
115890
- },
115891
- {
115892
- "name": "force",
115893
- "optional": true,
115894
- "type": {
115895
- "text": "boolean"
115896
- }
115897
115921
  }
115898
115922
  ],
115923
+ "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.",
115899
115924
  "inheritedFrom": {
115900
- "name": "SbbElement",
115901
- "module": "core/base-elements/element.js"
115925
+ "name": "SbbFormAssociatedMixin",
115926
+ "module": "core/mixins/form-associated-mixin.js"
115902
115927
  }
115903
115928
  },
115904
115929
  {
115905
115930
  "kind": "method",
115906
- "name": "_slotchangeHandler",
115931
+ "name": "_hasDisabledAncestor",
115907
115932
  "privacy": "private",
115908
115933
  "return": {
115909
115934
  "type": {
115910
- "text": "void"
115935
+ "text": "boolean"
115911
115936
  }
115912
115937
  },
115913
- "parameters": [
115914
- {
115915
- "name": "event",
115916
- "type": {
115917
- "text": "Event"
115918
- }
115919
- },
115920
- {
115921
- "name": "slot",
115922
- "type": {
115923
- "text": "HTMLSlotElement"
115924
- }
115925
- }
115926
- ],
115927
115938
  "inheritedFrom": {
115928
- "name": "SbbElement",
115929
- "module": "core/base-elements/element.js"
115939
+ "name": "SbbFormAssociatedMixin",
115940
+ "module": "core/mixins/form-associated-mixin.js"
115930
115941
  }
115931
115942
  },
115932
115943
  {
115933
115944
  "kind": "method",
115934
- "name": "_handleSlotChangeForSlottedState",
115935
- "privacy": "private",
115945
+ "name": "updateFormValue",
115946
+ "privacy": "protected",
115936
115947
  "return": {
115937
115948
  "type": {
115938
115949
  "text": "void"
115939
115950
  }
115940
115951
  },
115941
- "parameters": [
115942
- {
115943
- "name": "slot",
115944
- "type": {
115945
- "text": "HTMLSlotElement"
115946
- }
115947
- }
115948
- ],
115952
+ "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",
115949
115953
  "inheritedFrom": {
115950
- "name": "SbbElement",
115951
- "module": "core/base-elements/element.js"
115954
+ "name": "SbbFormAssociatedMixin",
115955
+ "module": "core/mixins/form-associated-mixin.js"
115952
115956
  }
115953
115957
  },
115954
115958
  {
115955
115959
  "kind": "method",
115956
- "name": "_updateSlottedState",
115957
- "privacy": "private",
115960
+ "name": "formState",
115961
+ "privacy": "protected",
115958
115962
  "return": {
115959
115963
  "type": {
115960
- "text": "void"
115964
+ "text": "FormRestoreState"
115961
115965
  }
115962
115966
  },
115963
- "parameters": [
115964
- {
115965
- "name": "slot",
115966
- "type": {
115967
- "text": "HTMLSlotElement"
115968
- }
115969
- }
115970
- ],
115971
115967
  "inheritedFrom": {
115972
- "name": "SbbElement",
115973
- "module": "core/base-elements/element.js"
115968
+ "name": "SbbFormAssociatedMixin",
115969
+ "module": "core/mixins/form-associated-mixin.js"
115974
115970
  }
115975
115971
  },
115976
115972
  {
115977
115973
  "kind": "method",
115978
- "name": "_observeTextNodesInSlot",
115979
- "privacy": "private",
115974
+ "name": "setValidityFlag",
115975
+ "privacy": "protected",
115980
115976
  "return": {
115981
115977
  "type": {
115982
115978
  "text": "void"
@@ -115984,288 +115980,220 @@
115984
115980
  },
115985
115981
  "parameters": [
115986
115982
  {
115987
- "name": "slot",
115983
+ "name": "flag",
115988
115984
  "type": {
115989
- "text": "HTMLSlotElement"
115985
+ "text": "T"
115986
+ }
115987
+ },
115988
+ {
115989
+ "name": "message",
115990
+ "type": {
115991
+ "text": "string"
115992
+ }
115993
+ },
115994
+ {
115995
+ "name": "flagValue",
115996
+ "optional": true,
115997
+ "type": {
115998
+ "text": "ValidityStateFlags[T]"
115990
115999
  }
115991
116000
  }
115992
116001
  ],
116002
+ "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).",
115993
116003
  "inheritedFrom": {
115994
- "name": "SbbElement",
115995
- "module": "core/base-elements/element.js"
116004
+ "name": "SbbFormAssociatedMixin",
116005
+ "module": "core/mixins/form-associated-mixin.js"
115996
116006
  }
115997
116007
  },
115998
116008
  {
115999
116009
  "kind": "method",
116000
- "name": "_hasSlottedContent",
116001
- "privacy": "private",
116010
+ "name": "removeValidityFlag",
116011
+ "privacy": "protected",
116002
116012
  "return": {
116003
116013
  "type": {
116004
- "text": "boolean"
116014
+ "text": "void"
116005
116015
  }
116006
116016
  },
116007
116017
  "parameters": [
116008
116018
  {
116009
- "name": "slot",
116019
+ "name": "flag",
116010
116020
  "type": {
116011
- "text": "HTMLSlotElement"
116021
+ "text": "T"
116012
116022
  }
116013
116023
  }
116014
116024
  ],
116025
+ "description": "Removes the validity state flag entry and updates validity state.",
116015
116026
  "inheritedFrom": {
116016
- "name": "SbbElement",
116017
- "module": "core/base-elements/element.js"
116018
- }
116019
- }
116020
- ],
116021
- "events": [
116022
- {
116023
- "type": {
116024
- "text": "Event"
116025
- },
116026
- "description": "The change event is fired on the component's associated input 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.",
116027
- "name": "change"
116028
- },
116029
- {
116030
- "type": {
116031
- "text": "InputEvent"
116032
- },
116033
- "description": "The input event fires on the component's associated input when the value has been changed as a direct result of a user action.",
116034
- "name": "input"
116035
- }
116036
- ],
116037
- "mixins": [
116038
- {
116039
- "name": "SbbNegativeMixin",
116040
- "module": "core.js"
116041
- }
116042
- ],
116043
- "superclass": {
116044
- "name": "SbbButtonBaseElement",
116045
- "module": "core.js"
116046
- },
116047
- "tagName": "sbb-form-field-clear",
116048
- "customElement": true,
116049
- "attributes": [
116050
- {
116051
- "name": "negative",
116052
- "type": {
116053
- "text": "boolean"
116054
- },
116055
- "default": "false",
116056
- "description": "Negative coloring variant flag.",
116057
- "fieldName": "negative",
116058
- "inheritedFrom": {
116059
- "name": "SbbNegativeMixin",
116060
- "module": "core/mixins/negative-mixin.js"
116061
- }
116062
- },
116063
- {
116064
- "name": "value",
116065
- "type": {
116066
- "text": "string"
116067
- },
116068
- "default": "''",
116069
- "description": "Value of the form element.",
116070
- "fieldName": "value",
116071
- "inheritedFrom": {
116072
- "name": "SbbButtonBaseElement",
116073
- "module": "core/base-elements/button-base-element.js"
116027
+ "name": "SbbFormAssociatedMixin",
116028
+ "module": "core/mixins/form-associated-mixin.js"
116074
116029
  }
116075
116030
  },
116076
116031
  {
116077
- "name": "type",
116078
- "description": "The type attribute to use for the button.",
116079
- "default": "'button'",
116080
- "type": {
116081
- "text": "SbbButtonType"
116032
+ "kind": "method",
116033
+ "name": "validate",
116034
+ "privacy": "protected",
116035
+ "return": {
116036
+ "type": {
116037
+ "text": "void"
116038
+ }
116082
116039
  },
116083
- "fieldName": "type",
116040
+ "description": "To be called whenever the current element needs to be validated.",
116084
116041
  "inheritedFrom": {
116085
- "name": "SbbButtonBaseElement",
116086
- "module": "core/base-elements/button-base-element.js"
116042
+ "name": "SbbFormAssociatedMixin",
116043
+ "module": "core/mixins/form-associated-mixin.js"
116087
116044
  }
116088
116045
  },
116089
116046
  {
116090
- "name": "form",
116091
- "description": "The `<form>` element to associate the button with.",
116092
- "type": {
116093
- "text": "HTMLFormElement | null"
116047
+ "kind": "method",
116048
+ "name": "shouldValidate",
116049
+ "privacy": "protected",
116050
+ "return": {
116051
+ "type": {
116052
+ "text": "boolean"
116053
+ }
116094
116054
  },
116095
- "fieldName": "form",
116055
+ "parameters": [
116056
+ {
116057
+ "name": "name",
116058
+ "type": {
116059
+ "text": "PropertyKey | undefined"
116060
+ }
116061
+ }
116062
+ ],
116063
+ "description": "Whether validation should be run on a property change with the given name.",
116096
116064
  "inheritedFrom": {
116097
- "name": "SbbButtonBaseElement",
116098
- "module": "core/base-elements/button-base-element.js"
116065
+ "name": "SbbFormAssociatedMixin",
116066
+ "module": "core/mixins/form-associated-mixin.js"
116099
116067
  }
116100
116068
  },
116101
116069
  {
116102
- "name": "name",
116103
- "description": "Name of the form element. Will be read from name attribute.",
116104
- "type": {
116105
- "text": "string"
116070
+ "kind": "method",
116071
+ "name": "_setInternalValidity",
116072
+ "privacy": "private",
116073
+ "return": {
116074
+ "type": {
116075
+ "text": "void"
116076
+ }
116106
116077
  },
116107
- "fieldName": "name",
116108
116078
  "inheritedFrom": {
116109
116079
  "name": "SbbFormAssociatedMixin",
116110
116080
  "module": "core/mixins/form-associated-mixin.js"
116111
116081
  }
116112
- }
116113
- ]
116114
- }
116115
- ],
116116
- "exports": [
116117
- {
116118
- "kind": "js",
116119
- "name": "SbbFormFieldClearElement",
116120
- "declaration": {
116121
- "name": "SbbFormFieldClearElement",
116122
- "module": "form-field/form-field-clear/form-field-clear.component.js"
116123
- }
116124
- }
116125
- ]
116126
- },
116127
- {
116128
- "kind": "javascript-module",
116129
- "path": "form-field/form-field-text-counter/form-field-text-counter.component.js",
116130
- "declarations": [
116131
- {
116132
- "kind": "class",
116133
- "description": "It displays the remaining characters count for input/textarea elements with a configured\nmaxlength property in the `sbb-form-field`.\nThe component automatically uses the form field's inputElement and displays the remaining character count.\nIf the input is disabled, readonly or an `sbb-error` is present, the output is suppressed.",
116134
- "name": "SbbFormFieldTextCounterElement",
116135
- "slots": [
116136
- {
116137
- "description": "Use the unnamed slot to display a custom description text after the counter.",
116138
- "name": "",
116139
- "inheritedFrom": {
116140
- "name": "SbbHintElement",
116141
- "module": "form-field/hint/hint.component.js"
116142
- }
116143
- }
116144
- ],
116145
- "members": [
116082
+ },
116146
116083
  {
116147
116084
  "kind": "field",
116148
- "name": "elementName",
116085
+ "name": "role",
116149
116086
  "type": {
116150
- "text": "string"
116087
+ "text": "ElementInternals['role']"
116151
116088
  },
116152
116089
  "privacy": "public",
116153
116090
  "static": true,
116154
- "readonly": true,
116155
- "default": "'sbb-form-field-text-counter'",
116156
116091
  "inheritedFrom": {
116157
116092
  "name": "SbbElement",
116158
116093
  "module": "core/base-elements/element.js"
116159
- }
116160
- },
116161
- {
116162
- "kind": "field",
116163
- "name": "_remainingCharacters",
116164
- "type": {
116165
- "text": "number"
116166
116094
  },
116167
- "privacy": "private",
116168
- "default": "0"
116095
+ "readonly": true,
116096
+ "default": "'button'"
116169
116097
  },
116170
116098
  {
116171
116099
  "kind": "field",
116172
- "name": "_language",
116100
+ "name": "_preventScrollOnSpaceKeydown",
116173
116101
  "privacy": "private",
116174
- "default": "new SbbLanguageController(this)"
116102
+ "description": "Prevents scrolling from pressing Space, when the event target is an action element.\nAlso sets active state.",
116103
+ "parameters": [
116104
+ {
116105
+ "description": "The origin event.",
116106
+ "name": "event"
116107
+ }
116108
+ ],
116109
+ "inheritedFrom": {
116110
+ "name": "SbbButtonLikeBaseElement",
116111
+ "module": "core/base-elements/button-base-element.js"
116112
+ }
116175
116113
  },
116176
116114
  {
116177
116115
  "kind": "field",
116178
- "name": "_abortController",
116179
- "type": {
116180
- "text": "AbortController | null"
116181
- },
116182
- "privacy": "private",
116183
- "default": "null"
116184
- },
116185
- {
116186
- "kind": "method",
116187
- "name": "_onInputUpdate",
116116
+ "name": "_removeActiveMarker",
116188
116117
  "privacy": "private",
116189
- "return": {
116190
- "type": {
116191
- "text": "void"
116192
- }
116118
+ "inheritedFrom": {
116119
+ "name": "SbbButtonLikeBaseElement",
116120
+ "module": "core/base-elements/button-base-element.js"
116193
116121
  }
116194
116122
  },
116195
116123
  {
116196
- "kind": "method",
116197
- "name": "_infoText",
116124
+ "kind": "field",
116125
+ "name": "_dispatchClickEventOnSpaceKeyup",
116198
116126
  "privacy": "private",
116199
- "return": {
116200
- "type": {
116201
- "text": "string"
116127
+ "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.",
116128
+ "parameters": [
116129
+ {
116130
+ "description": "The origin event.",
116131
+ "name": "event"
116202
116132
  }
116133
+ ],
116134
+ "inheritedFrom": {
116135
+ "name": "SbbButtonLikeBaseElement",
116136
+ "module": "core/base-elements/button-base-element.js"
116203
116137
  }
116204
116138
  },
116205
116139
  {
116206
116140
  "kind": "field",
116207
- "name": "negative",
116208
- "type": {
116209
- "text": "boolean"
116210
- },
116211
- "privacy": "public",
116212
- "default": "false",
116213
- "description": "Negative coloring variant flag.",
116214
- "attribute": "negative",
116215
- "reflects": true,
116141
+ "name": "_dispatchClickEvent",
116142
+ "privacy": "private",
116216
116143
  "inheritedFrom": {
116217
- "name": "SbbNegativeMixin",
116218
- "module": "core/mixins/negative-mixin.js"
116144
+ "name": "SbbButtonLikeBaseElement",
116145
+ "module": "core/base-elements/button-base-element.js"
116219
116146
  }
116220
116147
  },
116221
116148
  {
116222
116149
  "kind": "field",
116223
- "name": "formField",
116150
+ "name": "maybeDisabled",
116224
116151
  "type": {
116225
- "text": "SbbFormFieldElement | null"
116152
+ "text": "boolean | undefined"
116226
116153
  },
116227
116154
  "privacy": "protected",
116228
- "default": "null",
116155
+ "readonly": true,
116229
116156
  "inheritedFrom": {
116230
- "name": "SbbHintElement",
116231
- "module": "form-field/hint/hint.component.js"
116157
+ "name": "SbbActionBaseElement",
116158
+ "module": "core/base-elements/action-base-element.js"
116232
116159
  }
116233
116160
  },
116234
116161
  {
116235
116162
  "kind": "field",
116236
- "name": "['_$sbbElement$']",
116163
+ "name": "maybeDisabledInteractive",
116237
116164
  "type": {
116238
- "text": "boolean"
116165
+ "text": "boolean | undefined"
116239
116166
  },
116240
- "privacy": "public",
116241
- "static": true,
116242
- "default": "true",
116167
+ "privacy": "protected",
116168
+ "readonly": true,
116243
116169
  "inheritedFrom": {
116244
- "name": "SbbElement",
116245
- "module": "core/base-elements/element.js"
116170
+ "name": "SbbActionBaseElement",
116171
+ "module": "core/base-elements/action-base-element.js"
116246
116172
  }
116247
116173
  },
116248
116174
  {
116249
- "kind": "field",
116250
- "name": "elementDependencies",
116251
- "type": {
116252
- "text": "SbbElementType[] | undefined"
116175
+ "kind": "method",
116176
+ "name": "setupBaseEventHandlers",
116177
+ "privacy": "protected",
116178
+ "return": {
116179
+ "type": {
116180
+ "text": "void"
116181
+ }
116253
116182
  },
116254
- "privacy": "public",
116255
- "static": true,
116256
116183
  "inheritedFrom": {
116257
- "name": "SbbElement",
116258
- "module": "core/base-elements/element.js"
116184
+ "name": "SbbActionBaseElement",
116185
+ "module": "core/base-elements/action-base-element.js"
116259
116186
  }
116260
116187
  },
116261
116188
  {
116262
116189
  "kind": "field",
116263
- "name": "role",
116190
+ "name": "['_$sbbElement$']",
116264
116191
  "type": {
116265
- "text": "ElementInternals['role'] | undefined"
116192
+ "text": "boolean"
116266
116193
  },
116267
116194
  "privacy": "public",
116268
116195
  "static": true,
116196
+ "default": "true",
116269
116197
  "inheritedFrom": {
116270
116198
  "name": "SbbElement",
116271
116199
  "module": "core/base-elements/element.js"
@@ -116515,11 +116443,33 @@
116515
116443
  }
116516
116444
  }
116517
116445
  ],
116446
+ "events": [
116447
+ {
116448
+ "type": {
116449
+ "text": "Event"
116450
+ },
116451
+ "description": "The change event is fired on the component's associated input 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.",
116452
+ "name": "change"
116453
+ },
116454
+ {
116455
+ "type": {
116456
+ "text": "InputEvent"
116457
+ },
116458
+ "description": "The input event fires on the component's associated input when the value has been changed as a direct result of a user action.",
116459
+ "name": "input"
116460
+ }
116461
+ ],
116462
+ "mixins": [
116463
+ {
116464
+ "name": "SbbNegativeMixin",
116465
+ "module": "core.js"
116466
+ }
116467
+ ],
116518
116468
  "superclass": {
116519
- "name": "SbbHintElement",
116520
- "module": "form-field/hint/hint.component.js"
116469
+ "name": "SbbButtonBaseElement",
116470
+ "module": "core.js"
116521
116471
  },
116522
- "tagName": "sbb-form-field-text-counter",
116472
+ "tagName": "sbb-form-field-clear",
116523
116473
  "customElement": true,
116524
116474
  "attributes": [
116525
116475
  {
@@ -116534,6 +116484,56 @@
116534
116484
  "name": "SbbNegativeMixin",
116535
116485
  "module": "core/mixins/negative-mixin.js"
116536
116486
  }
116487
+ },
116488
+ {
116489
+ "name": "value",
116490
+ "type": {
116491
+ "text": "string"
116492
+ },
116493
+ "default": "''",
116494
+ "description": "Value of the form element.",
116495
+ "fieldName": "value",
116496
+ "inheritedFrom": {
116497
+ "name": "SbbButtonBaseElement",
116498
+ "module": "core/base-elements/button-base-element.js"
116499
+ }
116500
+ },
116501
+ {
116502
+ "name": "type",
116503
+ "description": "The type attribute to use for the button.",
116504
+ "default": "'button'",
116505
+ "type": {
116506
+ "text": "SbbButtonType"
116507
+ },
116508
+ "fieldName": "type",
116509
+ "inheritedFrom": {
116510
+ "name": "SbbButtonBaseElement",
116511
+ "module": "core/base-elements/button-base-element.js"
116512
+ }
116513
+ },
116514
+ {
116515
+ "name": "form",
116516
+ "description": "The `<form>` element to associate the button with.",
116517
+ "type": {
116518
+ "text": "HTMLFormElement | null"
116519
+ },
116520
+ "fieldName": "form",
116521
+ "inheritedFrom": {
116522
+ "name": "SbbButtonBaseElement",
116523
+ "module": "core/base-elements/button-base-element.js"
116524
+ }
116525
+ },
116526
+ {
116527
+ "name": "name",
116528
+ "description": "Name of the form element. Will be read from name attribute.",
116529
+ "type": {
116530
+ "text": "string"
116531
+ },
116532
+ "fieldName": "name",
116533
+ "inheritedFrom": {
116534
+ "name": "SbbFormAssociatedMixin",
116535
+ "module": "core/mixins/form-associated-mixin.js"
116536
+ }
116537
116537
  }
116538
116538
  ]
116539
116539
  }
@@ -116541,10 +116541,10 @@
116541
116541
  "exports": [
116542
116542
  {
116543
116543
  "kind": "js",
116544
- "name": "SbbFormFieldTextCounterElement",
116544
+ "name": "SbbFormFieldClearElement",
116545
116545
  "declaration": {
116546
- "name": "SbbFormFieldTextCounterElement",
116547
- "module": "form-field/form-field-text-counter/form-field-text-counter.component.js"
116546
+ "name": "SbbFormFieldClearElement",
116547
+ "module": "form-field/form-field-clear/form-field-clear.component.js"
116548
116548
  }
116549
116549
  }
116550
116550
  ]