@sbb-esta/lyne-elements-dev 4.8.1-dev.1774266605 → 4.8.1-dev.1774268349

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 +561 -561
  2. package/package.json +2 -2
@@ -130114,16 +130114,20 @@
130114
130114
  },
130115
130115
  {
130116
130116
  "kind": "javascript-module",
130117
- "path": "toggle/toggle/toggle.component.js",
130117
+ "path": "toggle/toggle-option/toggle-option.component.js",
130118
130118
  "declarations": [
130119
130119
  {
130120
130120
  "kind": "class",
130121
- "description": "It can be used as a container for two `sbb-toggle-option`, acting as a toggle button.",
130122
- "name": "SbbToggleElement",
130121
+ "description": "It displays a toggle option within a `sbb-toggle`.",
130122
+ "name": "SbbToggleOptionElement",
130123
130123
  "slots": [
130124
130124
  {
130125
- "description": "Use the unnamed slot to add `<sbb-toggle-option>` elements to the toggle.",
130125
+ "description": "Use the unnamed slot to add content to the label of the toggle option.",
130126
130126
  "name": ""
130127
+ },
130128
+ {
130129
+ "description": "Slot used to render the `sbb-icon`.",
130130
+ "name": "icon"
130127
130131
  }
130128
130132
  ],
130129
130133
  "members": [
@@ -130136,7 +130140,7 @@
130136
130140
  "privacy": "public",
130137
130141
  "static": true,
130138
130142
  "readonly": true,
130139
- "default": "'sbb-toggle'",
130143
+ "default": "'sbb-toggle-option'",
130140
130144
  "inheritedFrom": {
130141
130145
  "name": "SbbElement",
130142
130146
  "module": "core/base-elements/element.js"
@@ -130151,41 +130155,18 @@
130151
130155
  "privacy": "public",
130152
130156
  "static": true,
130153
130157
  "readonly": true,
130154
- "default": "'radiogroup'"
130155
- },
130156
- {
130157
- "kind": "field",
130158
- "name": "events",
130159
- "privacy": "public",
130160
- "static": true,
130161
- "readonly": true,
130162
- "default": "{ change: 'change', }",
130163
- "type": {
130164
- "text": "{\n change: 'change',\n }"
130165
- }
130158
+ "default": "'radio'"
130166
130159
  },
130167
130160
  {
130168
130161
  "kind": "field",
130169
- "name": "even",
130162
+ "name": "checked",
130170
130163
  "type": {
130171
130164
  "text": "boolean"
130172
130165
  },
130173
130166
  "privacy": "public",
130174
130167
  "default": "false",
130175
- "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
130176
- "attribute": "even",
130177
- "reflects": true
130178
- },
130179
- {
130180
- "kind": "field",
130181
- "name": "size",
130182
- "type": {
130183
- "text": "'s' | 'm'"
130184
- },
130185
- "privacy": "public",
130186
- "description": "Size variant, either m or s.",
130187
- "default": "'m' / 's' (lean)",
130188
- "attribute": "size",
130168
+ "description": "Whether the toggle-option is checked.",
130169
+ "attribute": "checked",
130189
130170
  "reflects": true
130190
130171
  },
130191
130172
  {
@@ -130195,53 +130176,22 @@
130195
130176
  "text": "(T = string) | null"
130196
130177
  },
130197
130178
  "privacy": "public",
130198
- "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
130199
- "attribute": "value",
130200
- "inheritedFrom": {
130201
- "name": "SbbFormAssociatedMixin",
130202
- "module": "core/mixins/form-associated-mixin.js"
130203
- }
130179
+ "default": "null",
130180
+ "description": "Value of toggle-option.",
130181
+ "attribute": "value"
130204
130182
  },
130205
130183
  {
130206
130184
  "kind": "field",
130207
- "name": "_fallbackValue",
130185
+ "name": "_toggle",
130208
130186
  "type": {
130209
- "text": "T | null"
130187
+ "text": "SbbToggleElement | null"
130210
130188
  },
130211
130189
  "privacy": "private",
130212
130190
  "default": "null"
130213
130191
  },
130214
- {
130215
- "kind": "field",
130216
- "name": "options",
130217
- "type": {
130218
- "text": "SbbToggleOptionElement<T>[]"
130219
- },
130220
- "privacy": "public",
130221
- "description": "The child instances of sbb-toggle-option as an array.",
130222
- "readonly": true
130223
- },
130224
- {
130225
- "kind": "method",
130226
- "name": "_readFormData",
130227
- "privacy": "private",
130228
- "return": {
130229
- "type": {
130230
- "text": "Promise<T>"
130231
- }
130232
- },
130233
- "parameters": [
130234
- {
130235
- "name": "formData",
130236
- "type": {
130237
- "text": "FormData"
130238
- }
130239
- }
130240
- ]
130241
- },
130242
130192
  {
130243
130193
  "kind": "method",
130244
- "name": "_updateToggle",
130194
+ "name": "_uncheckOtherOptions",
130245
130195
  "privacy": "private",
130246
130196
  "return": {
130247
130197
  "type": {
@@ -130251,25 +130201,7 @@
130251
130201
  },
130252
130202
  {
130253
130203
  "kind": "method",
130254
- "name": "_valueChanged",
130255
- "privacy": "private",
130256
- "return": {
130257
- "type": {
130258
- "text": "void"
130259
- }
130260
- },
130261
- "parameters": [
130262
- {
130263
- "name": "value",
130264
- "type": {
130265
- "text": "T | null"
130266
- }
130267
- }
130268
- ]
130269
- },
130270
- {
130271
- "kind": "method",
130272
- "name": "_updateDisabled",
130204
+ "name": "_handleDisabledChange",
130273
130205
  "privacy": "private",
130274
130206
  "return": {
130275
130207
  "type": {
@@ -130285,44 +130217,17 @@
130285
130217
  "type": {
130286
130218
  "text": "void"
130287
130219
  }
130288
- },
130289
- "description": "Called on user interaction (click or keyboard)"
130290
- },
130291
- {
130292
- "kind": "method",
130293
- "name": "_handleKeyDown",
130294
- "privacy": "private",
130295
- "return": {
130296
- "type": {
130297
- "text": "void"
130298
- }
130299
- },
130300
- "parameters": [
130301
- {
130302
- "name": "evt",
130303
- "type": {
130304
- "text": "KeyboardEvent"
130305
- }
130306
- }
130307
- ]
130220
+ }
130308
130221
  },
130309
130222
  {
130310
130223
  "kind": "method",
130311
- "name": "_selectAndFocusOption",
130224
+ "name": "_verifyTabindex",
130312
130225
  "privacy": "private",
130313
130226
  "return": {
130314
130227
  "type": {
130315
130228
  "text": "void"
130316
130229
  }
130317
- },
130318
- "parameters": [
130319
- {
130320
- "name": "option",
130321
- "type": {
130322
- "text": "SbbToggleOptionElement<T> | undefined"
130323
- }
130324
- }
130325
- ]
130230
+ }
130326
130231
  },
130327
130232
  {
130328
130233
  "kind": "field",
@@ -130370,248 +130275,393 @@
130370
130275
  },
130371
130276
  {
130372
130277
  "kind": "field",
130373
- "name": "formAssociated",
130278
+ "name": "iconName",
130374
130279
  "type": {
130375
- "text": "boolean"
130280
+ "text": "string"
130376
130281
  },
130377
130282
  "privacy": "public",
130378
- "static": true,
130379
- "default": "true",
130283
+ "default": "''",
130284
+ "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.",
130285
+ "attribute": "icon-name",
130380
130286
  "inheritedFrom": {
130381
- "name": "SbbFormAssociatedMixin",
130382
- "module": "core/mixins/form-associated-mixin.js"
130287
+ "name": "SbbIconNameMixin",
130288
+ "module": "icon/icon-name-mixin.js"
130383
130289
  }
130384
130290
  },
130385
130291
  {
130386
- "kind": "field",
130387
- "name": "form",
130388
- "type": {
130389
- "text": "HTMLFormElement | null"
130292
+ "kind": "method",
130293
+ "name": "renderIconSlot",
130294
+ "privacy": "protected",
130295
+ "return": {
130296
+ "type": {
130297
+ "text": "TemplateResult"
130298
+ }
130390
130299
  },
130391
- "privacy": "public",
130392
- "description": "Returns the form owner of this element.",
130393
- "readonly": true,
130300
+ "parameters": [
130301
+ {
130302
+ "name": "classname",
130303
+ "optional": true,
130304
+ "type": {
130305
+ "text": "string"
130306
+ }
130307
+ }
130308
+ ],
130394
130309
  "inheritedFrom": {
130395
- "name": "SbbFormAssociatedMixin",
130396
- "module": "core/mixins/form-associated-mixin.js"
130310
+ "name": "SbbIconNameMixin",
130311
+ "module": "icon/icon-name-mixin.js"
130397
130312
  }
130398
130313
  },
130399
130314
  {
130400
- "kind": "field",
130401
- "name": "name",
130402
- "privacy": "public",
130403
- "description": "Name of the form element. Will be read from name attribute.",
130404
- "type": {
130405
- "text": "string"
130315
+ "kind": "method",
130316
+ "name": "renderIconName",
130317
+ "privacy": "protected",
130318
+ "return": {
130319
+ "type": {
130320
+ "text": "string"
130321
+ }
130406
130322
  },
130407
- "attribute": "name",
130408
130323
  "inheritedFrom": {
130409
- "name": "SbbFormAssociatedMixin",
130410
- "module": "core/mixins/form-associated-mixin.js"
130324
+ "name": "SbbIconNameMixin",
130325
+ "module": "icon/icon-name-mixin.js"
130411
130326
  }
130412
130327
  },
130413
130328
  {
130414
- "kind": "field",
130415
- "name": "validity",
130416
- "type": {
130417
- "text": "ValidityState"
130329
+ "kind": "method",
130330
+ "name": "_renderIconName",
130331
+ "privacy": "private",
130332
+ "return": {
130333
+ "type": {
130334
+ "text": "string"
130335
+ }
130418
130336
  },
130419
- "privacy": "public",
130420
- "description": "Returns the ValidityState object for this element.",
130421
- "readonly": true,
130422
130337
  "inheritedFrom": {
130423
- "name": "SbbFormAssociatedMixin",
130424
- "module": "core/mixins/form-associated-mixin.js"
130338
+ "name": "SbbIconNameMixin",
130339
+ "module": "icon/icon-name-mixin.js"
130425
130340
  }
130426
130341
  },
130427
130342
  {
130428
130343
  "kind": "field",
130429
- "name": "validationMessage",
130344
+ "name": "_hydrationRequired",
130430
130345
  "type": {
130431
- "text": "string"
130346
+ "text": "boolean"
130432
130347
  },
130433
- "privacy": "public",
130434
- "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.",
130435
- "readonly": true,
130348
+ "privacy": "private",
130349
+ "default": "!!this.shadowRoot",
130436
130350
  "inheritedFrom": {
130437
- "name": "SbbFormAssociatedMixin",
130438
- "module": "core/mixins/form-associated-mixin.js"
130351
+ "name": "SbbElement",
130352
+ "module": "core/base-elements/element.js"
130439
130353
  }
130440
130354
  },
130441
130355
  {
130442
130356
  "kind": "field",
130443
- "name": "willValidate",
130444
- "type": {
130445
- "text": "boolean"
130446
- },
130447
- "privacy": "public",
130448
- "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130449
- "readonly": true,
130357
+ "name": "_hydrationComplete",
130358
+ "privacy": "private",
130359
+ "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
130450
130360
  "inheritedFrom": {
130451
- "name": "SbbFormAssociatedMixin",
130452
- "module": "core/mixins/form-associated-mixin.js"
130361
+ "name": "SbbElement",
130362
+ "module": "core/base-elements/element.js"
130453
130363
  }
130454
130364
  },
130455
130365
  {
130456
130366
  "kind": "field",
130457
- "name": "_validityStates",
130367
+ "name": "_resolveHydration",
130368
+ "type": {
130369
+ "text": "(hydrationRequired: boolean) => void"
130370
+ },
130458
130371
  "privacy": "private",
130459
- "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130460
130372
  "inheritedFrom": {
130461
- "name": "SbbFormAssociatedMixin",
130462
- "module": "core/mixins/form-associated-mixin.js"
130373
+ "name": "SbbElement",
130374
+ "module": "core/base-elements/element.js"
130463
130375
  }
130464
130376
  },
130465
130377
  {
130466
130378
  "kind": "field",
130467
- "name": "formDisabled",
130379
+ "name": "hydrationRequired",
130468
130380
  "type": {
130469
130381
  "text": "boolean"
130470
130382
  },
130471
130383
  "privacy": "protected",
130472
- "default": "false",
130473
- "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130384
+ "description": "Returns whether hydration is required and not completed.",
130385
+ "readonly": true,
130474
130386
  "inheritedFrom": {
130475
- "name": "SbbFormAssociatedMixin",
130476
- "module": "core/mixins/form-associated-mixin.js"
130477
- }
130387
+ "name": "SbbElement",
130388
+ "module": "core/base-elements/element.js"
130389
+ },
130390
+ "default": "!!this.shadowRoot"
130478
130391
  },
130479
130392
  {
130480
130393
  "kind": "method",
130481
- "name": "checkValidity",
130482
- "privacy": "public",
130394
+ "name": "toggleState",
130395
+ "privacy": "protected",
130483
130396
  "return": {
130484
130397
  "type": {
130485
- "text": "boolean"
130398
+ "text": "void"
130486
130399
  }
130487
130400
  },
130488
- "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130401
+ "parameters": [
130402
+ {
130403
+ "name": "value",
130404
+ "type": {
130405
+ "text": "string"
130406
+ }
130407
+ },
130408
+ {
130409
+ "name": "force",
130410
+ "optional": true,
130411
+ "type": {
130412
+ "text": "boolean"
130413
+ }
130414
+ }
130415
+ ],
130489
130416
  "inheritedFrom": {
130490
- "name": "SbbFormAssociatedMixin",
130491
- "module": "core/mixins/form-associated-mixin.js"
130417
+ "name": "SbbElement",
130418
+ "module": "core/base-elements/element.js"
130492
130419
  }
130493
130420
  },
130494
130421
  {
130495
- "kind": "method",
130496
- "name": "reportValidity",
130422
+ "kind": "field",
130423
+ "name": "['_$sbbElement$']",
130424
+ "type": {
130425
+ "text": "boolean"
130426
+ },
130497
130427
  "privacy": "public",
130498
- "return": {
130499
- "type": {
130500
- "text": "boolean"
130501
- }
130428
+ "static": true,
130429
+ "default": "true",
130430
+ "inheritedFrom": {
130431
+ "name": "SbbElement",
130432
+ "module": "core/base-elements/element.js"
130433
+ }
130434
+ },
130435
+ {
130436
+ "kind": "field",
130437
+ "name": "_controllers",
130438
+ "type": {
130439
+ "text": "Set<SbbReactiveController> | undefined"
130502
130440
  },
130503
- "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.",
130441
+ "privacy": "private",
130504
130442
  "inheritedFrom": {
130505
- "name": "SbbFormAssociatedMixin",
130506
- "module": "core/mixins/form-associated-mixin.js"
130443
+ "name": "SbbElement",
130444
+ "module": "core/base-elements/element.js"
130507
130445
  }
130446
+ }
130447
+ ],
130448
+ "attributes": [
130449
+ {
130450
+ "name": "checked",
130451
+ "type": {
130452
+ "text": "boolean"
130453
+ },
130454
+ "default": "false",
130455
+ "description": "Whether the toggle-option is checked.",
130456
+ "fieldName": "checked"
130508
130457
  },
130509
130458
  {
130510
- "kind": "method",
130511
- "name": "setCustomValidity",
130512
- "privacy": "public",
130513
- "return": {
130514
- "type": {
130515
- "text": "void"
130516
- }
130459
+ "name": "value",
130460
+ "type": {
130461
+ "text": "T | null"
130517
130462
  },
130518
- "parameters": [
130519
- {
130520
- "name": "message",
130521
- "type": {
130522
- "text": "string"
130523
- }
130524
- }
130525
- ],
130526
- "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.",
130463
+ "default": "null",
130464
+ "description": "Value of toggle-option.",
130465
+ "fieldName": "value"
130466
+ },
130467
+ {
130468
+ "name": "disabled",
130469
+ "description": "Whether the component is disabled.",
130470
+ "default": "false",
130471
+ "type": {
130472
+ "text": "boolean"
130473
+ },
130474
+ "fieldName": "disabled",
130527
130475
  "inheritedFrom": {
130528
- "name": "SbbFormAssociatedMixin",
130529
- "module": "core/mixins/form-associated-mixin.js"
130476
+ "name": "SbbDisabledMixin",
130477
+ "module": "core/mixins/disabled-mixin.js"
130530
130478
  }
130531
130479
  },
130532
130480
  {
130533
- "kind": "method",
130534
- "name": "_hasDisabledAncestor",
130535
- "privacy": "private",
130536
- "return": {
130537
- "type": {
130538
- "text": "boolean"
130539
- }
130481
+ "name": "icon-name",
130482
+ "type": {
130483
+ "text": "string"
130540
130484
  },
130485
+ "default": "''",
130486
+ "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.",
130487
+ "fieldName": "iconName",
130541
130488
  "inheritedFrom": {
130542
- "name": "SbbFormAssociatedMixin",
130543
- "module": "core/mixins/form-associated-mixin.js"
130489
+ "name": "SbbIconNameMixin",
130490
+ "module": "icon/icon-name-mixin.js"
130544
130491
  }
130492
+ }
130493
+ ],
130494
+ "mixins": [
130495
+ {
130496
+ "name": "SbbDisabledMixin",
130497
+ "module": "core/mixins.js"
130545
130498
  },
130546
130499
  {
130547
- "kind": "method",
130548
- "name": "updateFormValue",
130549
- "privacy": "protected",
130550
- "return": {
130551
- "type": {
130552
- "text": "void"
130553
- }
130500
+ "name": "SbbIconNameMixin",
130501
+ "module": "icon.js"
130502
+ }
130503
+ ],
130504
+ "superclass": {
130505
+ "name": "SbbElement",
130506
+ "module": "core/base-elements.js"
130507
+ },
130508
+ "tagName": "sbb-toggle-option",
130509
+ "customElement": true,
130510
+ "classGenerics": "T = string"
130511
+ }
130512
+ ],
130513
+ "exports": [
130514
+ {
130515
+ "kind": "js",
130516
+ "name": "SbbToggleOptionElement",
130517
+ "declaration": {
130518
+ "name": "SbbToggleOptionElement",
130519
+ "module": "toggle/toggle-option/toggle-option.component.js"
130520
+ }
130521
+ }
130522
+ ]
130523
+ },
130524
+ {
130525
+ "kind": "javascript-module",
130526
+ "path": "toggle/toggle/toggle.component.js",
130527
+ "declarations": [
130528
+ {
130529
+ "kind": "class",
130530
+ "description": "It can be used as a container for two `sbb-toggle-option`, acting as a toggle button.",
130531
+ "name": "SbbToggleElement",
130532
+ "slots": [
130533
+ {
130534
+ "description": "Use the unnamed slot to add `<sbb-toggle-option>` elements to the toggle.",
130535
+ "name": ""
130536
+ }
130537
+ ],
130538
+ "members": [
130539
+ {
130540
+ "kind": "field",
130541
+ "name": "elementName",
130542
+ "type": {
130543
+ "text": "string"
130554
130544
  },
130555
- "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",
130545
+ "privacy": "public",
130546
+ "static": true,
130547
+ "readonly": true,
130548
+ "default": "'sbb-toggle'",
130556
130549
  "inheritedFrom": {
130557
- "name": "SbbFormAssociatedMixin",
130558
- "module": "core/mixins/form-associated-mixin.js"
130550
+ "name": "SbbElement",
130551
+ "module": "core/base-elements/element.js"
130559
130552
  }
130560
130553
  },
130561
130554
  {
130562
- "kind": "method",
130563
- "name": "formState",
130564
- "privacy": "protected",
130565
- "return": {
130566
- "type": {
130567
- "text": "FormRestoreState"
130568
- }
130555
+ "kind": "field",
130556
+ "name": "role",
130557
+ "type": {
130558
+ "text": "string"
130569
130559
  },
130560
+ "privacy": "public",
130561
+ "static": true,
130562
+ "readonly": true,
130563
+ "default": "'radiogroup'"
130564
+ },
130565
+ {
130566
+ "kind": "field",
130567
+ "name": "events",
130568
+ "privacy": "public",
130569
+ "static": true,
130570
+ "readonly": true,
130571
+ "default": "{ change: 'change', }",
130572
+ "type": {
130573
+ "text": "{\n change: 'change',\n }"
130574
+ }
130575
+ },
130576
+ {
130577
+ "kind": "field",
130578
+ "name": "even",
130579
+ "type": {
130580
+ "text": "boolean"
130581
+ },
130582
+ "privacy": "public",
130583
+ "default": "false",
130584
+ "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
130585
+ "attribute": "even",
130586
+ "reflects": true
130587
+ },
130588
+ {
130589
+ "kind": "field",
130590
+ "name": "size",
130591
+ "type": {
130592
+ "text": "'s' | 'm'"
130593
+ },
130594
+ "privacy": "public",
130595
+ "description": "Size variant, either m or s.",
130596
+ "default": "'m' / 's' (lean)",
130597
+ "attribute": "size",
130598
+ "reflects": true
130599
+ },
130600
+ {
130601
+ "kind": "field",
130602
+ "name": "value",
130603
+ "type": {
130604
+ "text": "(T = string) | null"
130605
+ },
130606
+ "privacy": "public",
130607
+ "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
130608
+ "attribute": "value",
130570
130609
  "inheritedFrom": {
130571
130610
  "name": "SbbFormAssociatedMixin",
130572
130611
  "module": "core/mixins/form-associated-mixin.js"
130573
130612
  }
130574
130613
  },
130614
+ {
130615
+ "kind": "field",
130616
+ "name": "_fallbackValue",
130617
+ "type": {
130618
+ "text": "T | null"
130619
+ },
130620
+ "privacy": "private",
130621
+ "default": "null"
130622
+ },
130623
+ {
130624
+ "kind": "field",
130625
+ "name": "options",
130626
+ "type": {
130627
+ "text": "SbbToggleOptionElement<T>[]"
130628
+ },
130629
+ "privacy": "public",
130630
+ "description": "The child instances of sbb-toggle-option as an array.",
130631
+ "readonly": true
130632
+ },
130575
130633
  {
130576
130634
  "kind": "method",
130577
- "name": "setValidityFlag",
130578
- "privacy": "protected",
130635
+ "name": "_readFormData",
130636
+ "privacy": "private",
130579
130637
  "return": {
130580
130638
  "type": {
130581
- "text": "void"
130639
+ "text": "Promise<T>"
130582
130640
  }
130583
130641
  },
130584
130642
  "parameters": [
130585
130643
  {
130586
- "name": "flag",
130587
- "type": {
130588
- "text": "T"
130589
- }
130590
- },
130591
- {
130592
- "name": "message",
130593
- "type": {
130594
- "text": "string"
130595
- }
130596
- },
130597
- {
130598
- "name": "flagValue",
130599
- "optional": true,
130644
+ "name": "formData",
130600
130645
  "type": {
130601
- "text": "ValidityStateFlags[T]"
130646
+ "text": "FormData"
130602
130647
  }
130603
130648
  }
130604
- ],
130605
- "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).",
130606
- "inheritedFrom": {
130607
- "name": "SbbFormAssociatedMixin",
130608
- "module": "core/mixins/form-associated-mixin.js"
130649
+ ]
130650
+ },
130651
+ {
130652
+ "kind": "method",
130653
+ "name": "_updateToggle",
130654
+ "privacy": "private",
130655
+ "return": {
130656
+ "type": {
130657
+ "text": "void"
130658
+ }
130609
130659
  }
130610
130660
  },
130611
130661
  {
130612
130662
  "kind": "method",
130613
- "name": "removeValidityFlag",
130614
- "privacy": "protected",
130663
+ "name": "_valueChanged",
130664
+ "privacy": "private",
130615
130665
  "return": {
130616
130666
  "type": {
130617
130667
  "text": "void"
@@ -130619,152 +130669,117 @@
130619
130669
  },
130620
130670
  "parameters": [
130621
130671
  {
130622
- "name": "flag",
130672
+ "name": "value",
130623
130673
  "type": {
130624
- "text": "T"
130674
+ "text": "T | null"
130625
130675
  }
130626
130676
  }
130627
- ],
130628
- "description": "Removes the validity state flag entry and updates validity state.",
130629
- "inheritedFrom": {
130630
- "name": "SbbFormAssociatedMixin",
130631
- "module": "core/mixins/form-associated-mixin.js"
130677
+ ]
130678
+ },
130679
+ {
130680
+ "kind": "method",
130681
+ "name": "_updateDisabled",
130682
+ "privacy": "private",
130683
+ "return": {
130684
+ "type": {
130685
+ "text": "void"
130686
+ }
130632
130687
  }
130633
130688
  },
130634
130689
  {
130635
130690
  "kind": "method",
130636
- "name": "validate",
130637
- "privacy": "protected",
130691
+ "name": "_handleInput",
130692
+ "privacy": "private",
130638
130693
  "return": {
130639
130694
  "type": {
130640
130695
  "text": "void"
130641
130696
  }
130642
130697
  },
130643
- "description": "To be called whenever the current element needs to be validated.",
130644
- "inheritedFrom": {
130645
- "name": "SbbFormAssociatedMixin",
130646
- "module": "core/mixins/form-associated-mixin.js"
130647
- }
130698
+ "description": "Called on user interaction (click or keyboard)"
130648
130699
  },
130649
130700
  {
130650
130701
  "kind": "method",
130651
- "name": "shouldValidate",
130652
- "privacy": "protected",
130702
+ "name": "_handleKeyDown",
130703
+ "privacy": "private",
130653
130704
  "return": {
130654
130705
  "type": {
130655
- "text": "boolean"
130706
+ "text": "void"
130656
130707
  }
130657
130708
  },
130658
130709
  "parameters": [
130659
130710
  {
130660
- "name": "name",
130711
+ "name": "evt",
130661
130712
  "type": {
130662
- "text": "PropertyKey | undefined"
130713
+ "text": "KeyboardEvent"
130663
130714
  }
130664
130715
  }
130665
- ],
130666
- "description": "Whether validation should be run on a property change with the given name.",
130667
- "inheritedFrom": {
130668
- "name": "SbbFormAssociatedMixin",
130669
- "module": "core/mixins/form-associated-mixin.js"
130670
- }
130716
+ ]
130671
130717
  },
130672
130718
  {
130673
130719
  "kind": "method",
130674
- "name": "_setInternalValidity",
130720
+ "name": "_selectAndFocusOption",
130675
130721
  "privacy": "private",
130676
130722
  "return": {
130677
130723
  "type": {
130678
130724
  "text": "void"
130679
130725
  }
130680
130726
  },
130681
- "inheritedFrom": {
130682
- "name": "SbbFormAssociatedMixin",
130683
- "module": "core/mixins/form-associated-mixin.js"
130684
- }
130727
+ "parameters": [
130728
+ {
130729
+ "name": "option",
130730
+ "type": {
130731
+ "text": "SbbToggleOptionElement<T> | undefined"
130732
+ }
130733
+ }
130734
+ ]
130685
130735
  },
130686
130736
  {
130687
130737
  "kind": "field",
130688
- "name": "_hydrationRequired",
130738
+ "name": "disabled",
130739
+ "privacy": "public",
130740
+ "description": "Whether the component is disabled.",
130741
+ "default": "false",
130689
130742
  "type": {
130690
130743
  "text": "boolean"
130691
130744
  },
130692
- "privacy": "private",
130693
- "default": "!!this.shadowRoot",
130694
- "inheritedFrom": {
130695
- "name": "SbbElement",
130696
- "module": "core/base-elements/element.js"
130697
- }
130698
- },
130699
- {
130700
- "kind": "field",
130701
- "name": "_hydrationComplete",
130702
- "privacy": "private",
130703
- "default": "new Promise<boolean>( (resolve) => (this._resolveHydration = resolve), )",
130745
+ "attribute": "disabled",
130746
+ "reflects": true,
130704
130747
  "inheritedFrom": {
130705
- "name": "SbbElement",
130706
- "module": "core/base-elements/element.js"
130748
+ "name": "SbbDisabledMixin",
130749
+ "module": "core/mixins/disabled-mixin.js"
130707
130750
  }
130708
130751
  },
130709
130752
  {
130710
130753
  "kind": "field",
130711
- "name": "_resolveHydration",
130712
- "type": {
130713
- "text": "(hydrationRequired: boolean) => void"
130714
- },
130754
+ "name": "#disabled",
130715
130755
  "privacy": "private",
130716
- "inheritedFrom": {
130717
- "name": "SbbElement",
130718
- "module": "core/base-elements/element.js"
130719
- }
130720
- },
130721
- {
130722
- "kind": "field",
130723
- "name": "hydrationRequired",
130724
130756
  "type": {
130725
130757
  "text": "boolean"
130726
130758
  },
130727
- "privacy": "protected",
130728
- "description": "Returns whether hydration is required and not completed.",
130729
- "readonly": true,
130759
+ "default": "false",
130730
130760
  "inheritedFrom": {
130731
- "name": "SbbElement",
130732
- "module": "core/base-elements/element.js"
130733
- },
130734
- "default": "!!this.shadowRoot"
130761
+ "name": "SbbDisabledMixin",
130762
+ "module": "core/mixins/disabled-mixin.js"
130763
+ }
130735
130764
  },
130736
130765
  {
130737
130766
  "kind": "method",
130738
- "name": "toggleState",
130767
+ "name": "isDisabledExternally",
130739
130768
  "privacy": "protected",
130740
130769
  "return": {
130741
130770
  "type": {
130742
- "text": "void"
130771
+ "text": "boolean"
130743
130772
  }
130744
130773
  },
130745
- "parameters": [
130746
- {
130747
- "name": "value",
130748
- "type": {
130749
- "text": "string"
130750
- }
130751
- },
130752
- {
130753
- "name": "force",
130754
- "optional": true,
130755
- "type": {
130756
- "text": "boolean"
130757
- }
130758
- }
130759
- ],
130774
+ "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
130760
130775
  "inheritedFrom": {
130761
- "name": "SbbElement",
130762
- "module": "core/base-elements/element.js"
130776
+ "name": "SbbDisabledMixin",
130777
+ "module": "core/mixins/disabled-mixin.js"
130763
130778
  }
130764
130779
  },
130765
130780
  {
130766
130781
  "kind": "field",
130767
- "name": "['_$sbbElement$']",
130782
+ "name": "formAssociated",
130768
130783
  "type": {
130769
130784
  "text": "boolean"
130770
130785
  },
@@ -130772,340 +130787,309 @@
130772
130787
  "static": true,
130773
130788
  "default": "true",
130774
130789
  "inheritedFrom": {
130775
- "name": "SbbElement",
130776
- "module": "core/base-elements/element.js"
130790
+ "name": "SbbFormAssociatedMixin",
130791
+ "module": "core/mixins/form-associated-mixin.js"
130777
130792
  }
130778
130793
  },
130779
130794
  {
130780
130795
  "kind": "field",
130781
- "name": "_controllers",
130782
- "type": {
130783
- "text": "Set<SbbReactiveController> | undefined"
130784
- },
130785
- "privacy": "private",
130786
- "inheritedFrom": {
130787
- "name": "SbbElement",
130788
- "module": "core/base-elements/element.js"
130789
- }
130790
- }
130791
- ],
130792
- "events": [
130793
- {
130794
- "name": "change",
130795
- "type": {
130796
- "text": "Event"
130797
- },
130798
- "description": "The change event is fired when the user modifies the element's value.\nUnlike the input event, the change event is not necessarily fired\nfor each alteration to an element's value."
130799
- }
130800
- ],
130801
- "attributes": [
130802
- {
130803
- "name": "even",
130804
- "type": {
130805
- "text": "boolean"
130806
- },
130807
- "default": "false",
130808
- "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
130809
- "fieldName": "even"
130810
- },
130811
- {
130812
- "name": "size",
130813
- "type": {
130814
- "text": "'s' | 'm'"
130815
- },
130816
- "description": "Size variant, either m or s.",
130817
- "default": "'m' / 's' (lean)",
130818
- "fieldName": "size"
130819
- },
130820
- {
130821
- "name": "value",
130822
- "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
130823
- "type": {
130824
- "text": "T | null"
130825
- },
130826
- "fieldName": "value"
130827
- },
130828
- {
130829
- "name": "disabled",
130830
- "description": "Whether the component is disabled.",
130831
- "default": "false",
130796
+ "name": "form",
130832
130797
  "type": {
130833
- "text": "boolean"
130798
+ "text": "HTMLFormElement | null"
130834
130799
  },
130835
- "fieldName": "disabled",
130800
+ "privacy": "public",
130801
+ "description": "Returns the form owner of this element.",
130802
+ "readonly": true,
130836
130803
  "inheritedFrom": {
130837
- "name": "SbbDisabledMixin",
130838
- "module": "core/mixins/disabled-mixin.js"
130804
+ "name": "SbbFormAssociatedMixin",
130805
+ "module": "core/mixins/form-associated-mixin.js"
130839
130806
  }
130840
130807
  },
130841
130808
  {
130809
+ "kind": "field",
130842
130810
  "name": "name",
130811
+ "privacy": "public",
130843
130812
  "description": "Name of the form element. Will be read from name attribute.",
130844
130813
  "type": {
130845
130814
  "text": "string"
130846
130815
  },
130847
- "fieldName": "name",
130816
+ "attribute": "name",
130848
130817
  "inheritedFrom": {
130849
130818
  "name": "SbbFormAssociatedMixin",
130850
130819
  "module": "core/mixins/form-associated-mixin.js"
130851
130820
  }
130852
- }
130853
- ],
130854
- "mixins": [
130855
- {
130856
- "name": "SbbDisabledMixin",
130857
- "module": "core/mixins.js"
130858
- },
130859
- {
130860
- "name": "SbbFormAssociatedMixin",
130861
- "module": "core/mixins.js"
130862
- }
130863
- ],
130864
- "superclass": {
130865
- "name": "SbbElement",
130866
- "module": "core/base-elements.js"
130867
- },
130868
- "tagName": "sbb-toggle",
130869
- "customElement": true,
130870
- "classGenerics": "T = string"
130871
- }
130872
- ],
130873
- "exports": [
130874
- {
130875
- "kind": "js",
130876
- "name": "SbbToggleElement",
130877
- "declaration": {
130878
- "name": "SbbToggleElement",
130879
- "module": "toggle/toggle/toggle.component.js"
130880
- }
130881
- }
130882
- ]
130883
- },
130884
- {
130885
- "kind": "javascript-module",
130886
- "path": "toggle/toggle-option/toggle-option.component.js",
130887
- "declarations": [
130888
- {
130889
- "kind": "class",
130890
- "description": "It displays a toggle option within a `sbb-toggle`.",
130891
- "name": "SbbToggleOptionElement",
130892
- "slots": [
130893
- {
130894
- "description": "Use the unnamed slot to add content to the label of the toggle option.",
130895
- "name": ""
130896
130821
  },
130897
- {
130898
- "description": "Slot used to render the `sbb-icon`.",
130899
- "name": "icon"
130900
- }
130901
- ],
130902
- "members": [
130903
130822
  {
130904
130823
  "kind": "field",
130905
- "name": "elementName",
130824
+ "name": "validity",
130906
130825
  "type": {
130907
- "text": "string"
130826
+ "text": "ValidityState"
130908
130827
  },
130909
130828
  "privacy": "public",
130910
- "static": true,
130829
+ "description": "Returns the ValidityState object for this element.",
130911
130830
  "readonly": true,
130912
- "default": "'sbb-toggle-option'",
130913
130831
  "inheritedFrom": {
130914
- "name": "SbbElement",
130915
- "module": "core/base-elements/element.js"
130832
+ "name": "SbbFormAssociatedMixin",
130833
+ "module": "core/mixins/form-associated-mixin.js"
130916
130834
  }
130917
130835
  },
130918
130836
  {
130919
130837
  "kind": "field",
130920
- "name": "role",
130838
+ "name": "validationMessage",
130921
130839
  "type": {
130922
130840
  "text": "string"
130923
130841
  },
130924
130842
  "privacy": "public",
130925
- "static": true,
130843
+ "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.",
130926
130844
  "readonly": true,
130927
- "default": "'radio'"
130845
+ "inheritedFrom": {
130846
+ "name": "SbbFormAssociatedMixin",
130847
+ "module": "core/mixins/form-associated-mixin.js"
130848
+ }
130928
130849
  },
130929
130850
  {
130930
130851
  "kind": "field",
130931
- "name": "checked",
130852
+ "name": "willValidate",
130932
130853
  "type": {
130933
130854
  "text": "boolean"
130934
130855
  },
130935
130856
  "privacy": "public",
130936
- "default": "false",
130937
- "description": "Whether the toggle-option is checked.",
130938
- "attribute": "checked",
130939
- "reflects": true
130940
- },
130941
- {
130942
- "kind": "field",
130943
- "name": "value",
130944
- "type": {
130945
- "text": "(T = string) | null"
130946
- },
130947
- "privacy": "public",
130948
- "default": "null",
130949
- "description": "Value of toggle-option.",
130950
- "attribute": "value"
130857
+ "description": "Returns true if this element will be validated\nwhen the form is submitted; false otherwise.",
130858
+ "readonly": true,
130859
+ "inheritedFrom": {
130860
+ "name": "SbbFormAssociatedMixin",
130861
+ "module": "core/mixins/form-associated-mixin.js"
130862
+ }
130951
130863
  },
130952
130864
  {
130953
130865
  "kind": "field",
130954
- "name": "_toggle",
130866
+ "name": "_validityStates",
130867
+ "privacy": "private",
130868
+ "default": "new Map< keyof ValidityStateFlags, { flagValue: unknown; message: string } >()",
130869
+ "inheritedFrom": {
130870
+ "name": "SbbFormAssociatedMixin",
130871
+ "module": "core/mixins/form-associated-mixin.js"
130872
+ }
130873
+ },
130874
+ {
130875
+ "kind": "field",
130876
+ "name": "formDisabled",
130955
130877
  "type": {
130956
- "text": "SbbToggleElement | null"
130878
+ "text": "boolean"
130957
130879
  },
130958
- "privacy": "private",
130959
- "default": "null"
130880
+ "privacy": "protected",
130881
+ "default": "false",
130882
+ "description": "Whenever a surrounding form or fieldset is changing its disabled state.",
130883
+ "inheritedFrom": {
130884
+ "name": "SbbFormAssociatedMixin",
130885
+ "module": "core/mixins/form-associated-mixin.js"
130886
+ }
130960
130887
  },
130961
130888
  {
130962
130889
  "kind": "method",
130963
- "name": "_uncheckOtherOptions",
130964
- "privacy": "private",
130890
+ "name": "checkValidity",
130891
+ "privacy": "public",
130965
130892
  "return": {
130966
130893
  "type": {
130967
- "text": "void"
130894
+ "text": "boolean"
130968
130895
  }
130896
+ },
130897
+ "description": "Returns true if this element has no validity problems; false otherwise.\nFires an invalid event at the element in the latter case.",
130898
+ "inheritedFrom": {
130899
+ "name": "SbbFormAssociatedMixin",
130900
+ "module": "core/mixins/form-associated-mixin.js"
130969
130901
  }
130970
130902
  },
130971
130903
  {
130972
130904
  "kind": "method",
130973
- "name": "_handleDisabledChange",
130974
- "privacy": "private",
130905
+ "name": "reportValidity",
130906
+ "privacy": "public",
130975
130907
  "return": {
130976
130908
  "type": {
130977
- "text": "void"
130909
+ "text": "boolean"
130978
130910
  }
130911
+ },
130912
+ "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.",
130913
+ "inheritedFrom": {
130914
+ "name": "SbbFormAssociatedMixin",
130915
+ "module": "core/mixins/form-associated-mixin.js"
130979
130916
  }
130980
130917
  },
130981
130918
  {
130982
130919
  "kind": "method",
130983
- "name": "_handleInput",
130984
- "privacy": "private",
130920
+ "name": "setCustomValidity",
130921
+ "privacy": "public",
130985
130922
  "return": {
130986
130923
  "type": {
130987
130924
  "text": "void"
130988
130925
  }
130926
+ },
130927
+ "parameters": [
130928
+ {
130929
+ "name": "message",
130930
+ "type": {
130931
+ "text": "string"
130932
+ }
130933
+ }
130934
+ ],
130935
+ "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.",
130936
+ "inheritedFrom": {
130937
+ "name": "SbbFormAssociatedMixin",
130938
+ "module": "core/mixins/form-associated-mixin.js"
130989
130939
  }
130990
130940
  },
130991
130941
  {
130992
130942
  "kind": "method",
130993
- "name": "_verifyTabindex",
130943
+ "name": "_hasDisabledAncestor",
130994
130944
  "privacy": "private",
130995
130945
  "return": {
130996
130946
  "type": {
130997
- "text": "void"
130947
+ "text": "boolean"
130998
130948
  }
130999
- }
131000
- },
131001
- {
131002
- "kind": "field",
131003
- "name": "disabled",
131004
- "privacy": "public",
131005
- "description": "Whether the component is disabled.",
131006
- "default": "false",
131007
- "type": {
131008
- "text": "boolean"
131009
130949
  },
131010
- "attribute": "disabled",
131011
- "reflects": true,
131012
130950
  "inheritedFrom": {
131013
- "name": "SbbDisabledMixin",
131014
- "module": "core/mixins/disabled-mixin.js"
130951
+ "name": "SbbFormAssociatedMixin",
130952
+ "module": "core/mixins/form-associated-mixin.js"
131015
130953
  }
131016
130954
  },
131017
130955
  {
131018
- "kind": "field",
131019
- "name": "#disabled",
131020
- "privacy": "private",
131021
- "type": {
131022
- "text": "boolean"
130956
+ "kind": "method",
130957
+ "name": "updateFormValue",
130958
+ "privacy": "protected",
130959
+ "return": {
130960
+ "type": {
130961
+ "text": "void"
130962
+ }
131023
130963
  },
131024
- "default": "false",
130964
+ "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",
131025
130965
  "inheritedFrom": {
131026
- "name": "SbbDisabledMixin",
131027
- "module": "core/mixins/disabled-mixin.js"
130966
+ "name": "SbbFormAssociatedMixin",
130967
+ "module": "core/mixins/form-associated-mixin.js"
131028
130968
  }
131029
130969
  },
131030
130970
  {
131031
130971
  "kind": "method",
131032
- "name": "isDisabledExternally",
130972
+ "name": "formState",
131033
130973
  "privacy": "protected",
131034
130974
  "return": {
131035
130975
  "type": {
131036
- "text": "boolean"
130976
+ "text": "FormRestoreState"
131037
130977
  }
131038
130978
  },
131039
- "description": "Will be used as 'or' check to the current disabled state.\nCan e.g. be used to read disabled state of a group.",
131040
130979
  "inheritedFrom": {
131041
- "name": "SbbDisabledMixin",
131042
- "module": "core/mixins/disabled-mixin.js"
130980
+ "name": "SbbFormAssociatedMixin",
130981
+ "module": "core/mixins/form-associated-mixin.js"
131043
130982
  }
131044
130983
  },
131045
130984
  {
131046
- "kind": "field",
131047
- "name": "iconName",
131048
- "type": {
131049
- "text": "string"
130985
+ "kind": "method",
130986
+ "name": "setValidityFlag",
130987
+ "privacy": "protected",
130988
+ "return": {
130989
+ "type": {
130990
+ "text": "void"
130991
+ }
131050
130992
  },
131051
- "privacy": "public",
131052
- "default": "''",
131053
- "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.",
131054
- "attribute": "icon-name",
130993
+ "parameters": [
130994
+ {
130995
+ "name": "flag",
130996
+ "type": {
130997
+ "text": "T"
130998
+ }
130999
+ },
131000
+ {
131001
+ "name": "message",
131002
+ "type": {
131003
+ "text": "string"
131004
+ }
131005
+ },
131006
+ {
131007
+ "name": "flagValue",
131008
+ "optional": true,
131009
+ "type": {
131010
+ "text": "ValidityStateFlags[T]"
131011
+ }
131012
+ }
131013
+ ],
131014
+ "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).",
131055
131015
  "inheritedFrom": {
131056
- "name": "SbbIconNameMixin",
131057
- "module": "icon/icon-name-mixin.js"
131016
+ "name": "SbbFormAssociatedMixin",
131017
+ "module": "core/mixins/form-associated-mixin.js"
131058
131018
  }
131059
131019
  },
131060
131020
  {
131061
131021
  "kind": "method",
131062
- "name": "renderIconSlot",
131022
+ "name": "removeValidityFlag",
131063
131023
  "privacy": "protected",
131064
131024
  "return": {
131065
131025
  "type": {
131066
- "text": "TemplateResult"
131026
+ "text": "void"
131067
131027
  }
131068
131028
  },
131069
131029
  "parameters": [
131070
131030
  {
131071
- "name": "classname",
131072
- "optional": true,
131031
+ "name": "flag",
131073
131032
  "type": {
131074
- "text": "string"
131033
+ "text": "T"
131075
131034
  }
131076
131035
  }
131077
131036
  ],
131037
+ "description": "Removes the validity state flag entry and updates validity state.",
131078
131038
  "inheritedFrom": {
131079
- "name": "SbbIconNameMixin",
131080
- "module": "icon/icon-name-mixin.js"
131039
+ "name": "SbbFormAssociatedMixin",
131040
+ "module": "core/mixins/form-associated-mixin.js"
131081
131041
  }
131082
131042
  },
131083
131043
  {
131084
131044
  "kind": "method",
131085
- "name": "renderIconName",
131045
+ "name": "validate",
131086
131046
  "privacy": "protected",
131087
131047
  "return": {
131088
131048
  "type": {
131089
- "text": "string"
131049
+ "text": "void"
131090
131050
  }
131091
131051
  },
131052
+ "description": "To be called whenever the current element needs to be validated.",
131092
131053
  "inheritedFrom": {
131093
- "name": "SbbIconNameMixin",
131094
- "module": "icon/icon-name-mixin.js"
131054
+ "name": "SbbFormAssociatedMixin",
131055
+ "module": "core/mixins/form-associated-mixin.js"
131095
131056
  }
131096
131057
  },
131097
131058
  {
131098
131059
  "kind": "method",
131099
- "name": "_renderIconName",
131060
+ "name": "shouldValidate",
131061
+ "privacy": "protected",
131062
+ "return": {
131063
+ "type": {
131064
+ "text": "boolean"
131065
+ }
131066
+ },
131067
+ "parameters": [
131068
+ {
131069
+ "name": "name",
131070
+ "type": {
131071
+ "text": "PropertyKey | undefined"
131072
+ }
131073
+ }
131074
+ ],
131075
+ "description": "Whether validation should be run on a property change with the given name.",
131076
+ "inheritedFrom": {
131077
+ "name": "SbbFormAssociatedMixin",
131078
+ "module": "core/mixins/form-associated-mixin.js"
131079
+ }
131080
+ },
131081
+ {
131082
+ "kind": "method",
131083
+ "name": "_setInternalValidity",
131100
131084
  "privacy": "private",
131101
131085
  "return": {
131102
131086
  "type": {
131103
- "text": "string"
131087
+ "text": "void"
131104
131088
  }
131105
131089
  },
131106
131090
  "inheritedFrom": {
131107
- "name": "SbbIconNameMixin",
131108
- "module": "icon/icon-name-mixin.js"
131091
+ "name": "SbbFormAssociatedMixin",
131092
+ "module": "core/mixins/form-associated-mixin.js"
131109
131093
  }
131110
131094
  },
131111
131095
  {
@@ -131214,23 +131198,40 @@
131214
131198
  }
131215
131199
  }
131216
131200
  ],
131201
+ "events": [
131202
+ {
131203
+ "name": "change",
131204
+ "type": {
131205
+ "text": "Event"
131206
+ },
131207
+ "description": "The change event is fired when the user modifies the element's value.\nUnlike the input event, the change event is not necessarily fired\nfor each alteration to an element's value."
131208
+ }
131209
+ ],
131217
131210
  "attributes": [
131218
131211
  {
131219
- "name": "checked",
131212
+ "name": "even",
131220
131213
  "type": {
131221
131214
  "text": "boolean"
131222
131215
  },
131223
131216
  "default": "false",
131224
- "description": "Whether the toggle-option is checked.",
131225
- "fieldName": "checked"
131217
+ "description": "If true, set the width of the component fixed; if false,\nthe width is dynamic based on the label of the sbb-toggle-option.",
131218
+ "fieldName": "even"
131219
+ },
131220
+ {
131221
+ "name": "size",
131222
+ "type": {
131223
+ "text": "'s' | 'm'"
131224
+ },
131225
+ "description": "Size variant, either m or s.",
131226
+ "default": "'m' / 's' (lean)",
131227
+ "fieldName": "size"
131226
131228
  },
131227
131229
  {
131228
131230
  "name": "value",
131231
+ "description": "The value of the toggle. It needs to be mutable since it is updated whenever\na new option is selected (see the `onToggleOptionSelect()` method).",
131229
131232
  "type": {
131230
131233
  "text": "T | null"
131231
131234
  },
131232
- "default": "null",
131233
- "description": "Value of toggle-option.",
131234
131235
  "fieldName": "value"
131235
131236
  },
131236
131237
  {
@@ -131247,16 +131248,15 @@
131247
131248
  }
131248
131249
  },
131249
131250
  {
131250
- "name": "icon-name",
131251
+ "name": "name",
131252
+ "description": "Name of the form element. Will be read from name attribute.",
131251
131253
  "type": {
131252
131254
  "text": "string"
131253
131255
  },
131254
- "default": "''",
131255
- "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.",
131256
- "fieldName": "iconName",
131256
+ "fieldName": "name",
131257
131257
  "inheritedFrom": {
131258
- "name": "SbbIconNameMixin",
131259
- "module": "icon/icon-name-mixin.js"
131258
+ "name": "SbbFormAssociatedMixin",
131259
+ "module": "core/mixins/form-associated-mixin.js"
131260
131260
  }
131261
131261
  }
131262
131262
  ],
@@ -131266,15 +131266,15 @@
131266
131266
  "module": "core/mixins.js"
131267
131267
  },
131268
131268
  {
131269
- "name": "SbbIconNameMixin",
131270
- "module": "icon.js"
131269
+ "name": "SbbFormAssociatedMixin",
131270
+ "module": "core/mixins.js"
131271
131271
  }
131272
131272
  ],
131273
131273
  "superclass": {
131274
131274
  "name": "SbbElement",
131275
131275
  "module": "core/base-elements.js"
131276
131276
  },
131277
- "tagName": "sbb-toggle-option",
131277
+ "tagName": "sbb-toggle",
131278
131278
  "customElement": true,
131279
131279
  "classGenerics": "T = string"
131280
131280
  }
@@ -131282,10 +131282,10 @@
131282
131282
  "exports": [
131283
131283
  {
131284
131284
  "kind": "js",
131285
- "name": "SbbToggleOptionElement",
131285
+ "name": "SbbToggleElement",
131286
131286
  "declaration": {
131287
- "name": "SbbToggleOptionElement",
131288
- "module": "toggle/toggle-option/toggle-option.component.js"
131287
+ "name": "SbbToggleElement",
131288
+ "module": "toggle/toggle/toggle.component.js"
131289
131289
  }
131290
131290
  }
131291
131291
  ]