@sbb-esta/lyne-elements-dev 5.8.0-dev.1788866364 → 5.8.0-dev.1788940504
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.
- package/core.js +5 -5
- package/custom-elements.json +312 -31
- package/development/core/base-elements/link-base-element.d.ts +5 -0
- package/development/core.js +13 -5
- package/development/download/download/download.component.d.ts +12 -10
- package/development/download.pure.js +30 -36
- package/development/form-field.pure.js +1 -1
- package/download/_download.global.scss +6 -0
- package/download.pure.js +9 -4
- package/form-field/_form-field.global.scss +1 -0
- package/form-field.pure.js +1 -1
- package/lean-off-brand-theme.css +4 -0
- package/lean-safety-theme.css +4 -0
- package/lean-theme.css +4 -0
- package/off-brand-theme.css +4 -0
- package/package.json +2 -2
- package/safety-theme.css +4 -0
- package/standard-theme.css +4 -0
package/custom-elements.json
CHANGED
|
@@ -7039,6 +7039,17 @@
|
|
|
7039
7039
|
"name": "_evaluateRelAttribute",
|
|
7040
7040
|
"privacy": "private"
|
|
7041
7041
|
},
|
|
7042
|
+
{
|
|
7043
|
+
"kind": "method",
|
|
7044
|
+
"name": "resolveTarget",
|
|
7045
|
+
"privacy": "protected",
|
|
7046
|
+
"return": {
|
|
7047
|
+
"type": {
|
|
7048
|
+
"text": "string"
|
|
7049
|
+
}
|
|
7050
|
+
},
|
|
7051
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set."
|
|
7052
|
+
},
|
|
7042
7053
|
{
|
|
7043
7054
|
"kind": "method",
|
|
7044
7055
|
"name": "renderLink",
|
|
@@ -41399,6 +41410,21 @@
|
|
|
41399
41410
|
"module": "core/base-elements/link-base-element.js"
|
|
41400
41411
|
}
|
|
41401
41412
|
},
|
|
41413
|
+
{
|
|
41414
|
+
"kind": "method",
|
|
41415
|
+
"name": "resolveTarget",
|
|
41416
|
+
"privacy": "protected",
|
|
41417
|
+
"return": {
|
|
41418
|
+
"type": {
|
|
41419
|
+
"text": "string"
|
|
41420
|
+
}
|
|
41421
|
+
},
|
|
41422
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
41423
|
+
"inheritedFrom": {
|
|
41424
|
+
"name": "SbbLinkBaseElement",
|
|
41425
|
+
"module": "core/base-elements/link-base-element.js"
|
|
41426
|
+
}
|
|
41427
|
+
},
|
|
41402
41428
|
{
|
|
41403
41429
|
"kind": "method",
|
|
41404
41430
|
"name": "renderLink",
|
|
@@ -43221,6 +43247,21 @@
|
|
|
43221
43247
|
"module": "core/base-elements/link-base-element.js"
|
|
43222
43248
|
}
|
|
43223
43249
|
},
|
|
43250
|
+
{
|
|
43251
|
+
"kind": "method",
|
|
43252
|
+
"name": "resolveTarget",
|
|
43253
|
+
"privacy": "protected",
|
|
43254
|
+
"return": {
|
|
43255
|
+
"type": {
|
|
43256
|
+
"text": "string"
|
|
43257
|
+
}
|
|
43258
|
+
},
|
|
43259
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
43260
|
+
"inheritedFrom": {
|
|
43261
|
+
"name": "SbbLinkBaseElement",
|
|
43262
|
+
"module": "core/base-elements/link-base-element.js"
|
|
43263
|
+
}
|
|
43264
|
+
},
|
|
43224
43265
|
{
|
|
43225
43266
|
"kind": "method",
|
|
43226
43267
|
"name": "renderLink",
|
|
@@ -44132,6 +44173,21 @@
|
|
|
44132
44173
|
"module": "core/base-elements/link-base-element.js"
|
|
44133
44174
|
}
|
|
44134
44175
|
},
|
|
44176
|
+
{
|
|
44177
|
+
"kind": "method",
|
|
44178
|
+
"name": "resolveTarget",
|
|
44179
|
+
"privacy": "protected",
|
|
44180
|
+
"return": {
|
|
44181
|
+
"type": {
|
|
44182
|
+
"text": "string"
|
|
44183
|
+
}
|
|
44184
|
+
},
|
|
44185
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
44186
|
+
"inheritedFrom": {
|
|
44187
|
+
"name": "SbbLinkBaseElement",
|
|
44188
|
+
"module": "core/base-elements/link-base-element.js"
|
|
44189
|
+
}
|
|
44190
|
+
},
|
|
44135
44191
|
{
|
|
44136
44192
|
"kind": "method",
|
|
44137
44193
|
"name": "renderLink",
|
|
@@ -45043,6 +45099,21 @@
|
|
|
45043
45099
|
"module": "core/base-elements/link-base-element.js"
|
|
45044
45100
|
}
|
|
45045
45101
|
},
|
|
45102
|
+
{
|
|
45103
|
+
"kind": "method",
|
|
45104
|
+
"name": "resolveTarget",
|
|
45105
|
+
"privacy": "protected",
|
|
45106
|
+
"return": {
|
|
45107
|
+
"type": {
|
|
45108
|
+
"text": "string"
|
|
45109
|
+
}
|
|
45110
|
+
},
|
|
45111
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
45112
|
+
"inheritedFrom": {
|
|
45113
|
+
"name": "SbbLinkBaseElement",
|
|
45114
|
+
"module": "core/base-elements/link-base-element.js"
|
|
45115
|
+
}
|
|
45116
|
+
},
|
|
45046
45117
|
{
|
|
45047
45118
|
"kind": "method",
|
|
45048
45119
|
"name": "renderLink",
|
|
@@ -45954,6 +46025,21 @@
|
|
|
45954
46025
|
"module": "core/base-elements/link-base-element.js"
|
|
45955
46026
|
}
|
|
45956
46027
|
},
|
|
46028
|
+
{
|
|
46029
|
+
"kind": "method",
|
|
46030
|
+
"name": "resolveTarget",
|
|
46031
|
+
"privacy": "protected",
|
|
46032
|
+
"return": {
|
|
46033
|
+
"type": {
|
|
46034
|
+
"text": "string"
|
|
46035
|
+
}
|
|
46036
|
+
},
|
|
46037
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
46038
|
+
"inheritedFrom": {
|
|
46039
|
+
"name": "SbbLinkBaseElement",
|
|
46040
|
+
"module": "core/base-elements/link-base-element.js"
|
|
46041
|
+
}
|
|
46042
|
+
},
|
|
45957
46043
|
{
|
|
45958
46044
|
"kind": "method",
|
|
45959
46045
|
"name": "renderLink",
|
|
@@ -50835,6 +50921,21 @@
|
|
|
50835
50921
|
"module": "core/base-elements/link-base-element.js"
|
|
50836
50922
|
}
|
|
50837
50923
|
},
|
|
50924
|
+
{
|
|
50925
|
+
"kind": "method",
|
|
50926
|
+
"name": "resolveTarget",
|
|
50927
|
+
"privacy": "protected",
|
|
50928
|
+
"return": {
|
|
50929
|
+
"type": {
|
|
50930
|
+
"text": "string"
|
|
50931
|
+
}
|
|
50932
|
+
},
|
|
50933
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
50934
|
+
"inheritedFrom": {
|
|
50935
|
+
"name": "SbbLinkBaseElement",
|
|
50936
|
+
"module": "core/base-elements/link-base-element.js"
|
|
50937
|
+
}
|
|
50938
|
+
},
|
|
50838
50939
|
{
|
|
50839
50940
|
"kind": "method",
|
|
50840
50941
|
"name": "renderLink",
|
|
@@ -53880,6 +53981,21 @@
|
|
|
53880
53981
|
"module": "core/base-elements/link-base-element.js"
|
|
53881
53982
|
}
|
|
53882
53983
|
},
|
|
53984
|
+
{
|
|
53985
|
+
"kind": "method",
|
|
53986
|
+
"name": "resolveTarget",
|
|
53987
|
+
"privacy": "protected",
|
|
53988
|
+
"return": {
|
|
53989
|
+
"type": {
|
|
53990
|
+
"text": "string"
|
|
53991
|
+
}
|
|
53992
|
+
},
|
|
53993
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
53994
|
+
"inheritedFrom": {
|
|
53995
|
+
"name": "SbbLinkBaseElement",
|
|
53996
|
+
"module": "core/base-elements/link-base-element.js"
|
|
53997
|
+
}
|
|
53998
|
+
},
|
|
53883
53999
|
{
|
|
53884
54000
|
"kind": "method",
|
|
53885
54001
|
"name": "renderLink",
|
|
@@ -69274,6 +69390,21 @@
|
|
|
69274
69390
|
"module": "core/base-elements/link-base-element.js"
|
|
69275
69391
|
}
|
|
69276
69392
|
},
|
|
69393
|
+
{
|
|
69394
|
+
"kind": "method",
|
|
69395
|
+
"name": "resolveTarget",
|
|
69396
|
+
"privacy": "protected",
|
|
69397
|
+
"return": {
|
|
69398
|
+
"type": {
|
|
69399
|
+
"text": "string"
|
|
69400
|
+
}
|
|
69401
|
+
},
|
|
69402
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
69403
|
+
"inheritedFrom": {
|
|
69404
|
+
"name": "SbbLinkBaseElement",
|
|
69405
|
+
"module": "core/base-elements/link-base-element.js"
|
|
69406
|
+
}
|
|
69407
|
+
},
|
|
69277
69408
|
{
|
|
69278
69409
|
"kind": "method",
|
|
69279
69410
|
"name": "renderLink",
|
|
@@ -81028,6 +81159,21 @@
|
|
|
81028
81159
|
"module": "core/base-elements/link-base-element.js"
|
|
81029
81160
|
}
|
|
81030
81161
|
},
|
|
81162
|
+
{
|
|
81163
|
+
"kind": "method",
|
|
81164
|
+
"name": "resolveTarget",
|
|
81165
|
+
"privacy": "protected",
|
|
81166
|
+
"return": {
|
|
81167
|
+
"type": {
|
|
81168
|
+
"text": "string"
|
|
81169
|
+
}
|
|
81170
|
+
},
|
|
81171
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
81172
|
+
"inheritedFrom": {
|
|
81173
|
+
"name": "SbbLinkBaseElement",
|
|
81174
|
+
"module": "core/base-elements/link-base-element.js"
|
|
81175
|
+
}
|
|
81176
|
+
},
|
|
81031
81177
|
{
|
|
81032
81178
|
"kind": "method",
|
|
81033
81179
|
"name": "renderLink",
|
|
@@ -107960,7 +108106,7 @@
|
|
|
107960
108106
|
"declarations": [
|
|
107961
108107
|
{
|
|
107962
108108
|
"kind": "class",
|
|
107963
|
-
"description": "It displays a downloadable document, styled as a card.\n\nInherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel
|
|
108109
|
+
"description": "It displays a downloadable document, styled as a card.\n\nInherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`,\n`download` and `accessibilityLabel`. Without the `download` attribute the\nreferenced document is opened inline in a new browser tab, unless a `target`\nis explicitly set.",
|
|
107964
108110
|
"name": "SbbDownloadElement",
|
|
107965
108111
|
"slots": [
|
|
107966
108112
|
{
|
|
@@ -108004,7 +108150,7 @@
|
|
|
108004
108150
|
"name": "SbbElement",
|
|
108005
108151
|
"module": "core/base-elements/element.js"
|
|
108006
108152
|
},
|
|
108007
|
-
"default": "[SbbSecondaryButtonStaticElement]"
|
|
108153
|
+
"default": "[ SbbDividerElement, SbbSecondaryButtonStaticElement, ]"
|
|
108008
108154
|
},
|
|
108009
108155
|
{
|
|
108010
108156
|
"kind": "field",
|
|
@@ -108029,22 +108175,6 @@
|
|
|
108029
108175
|
"description": "The label of the download. Defaults to the file name of the `href`.",
|
|
108030
108176
|
"attribute": "label"
|
|
108031
108177
|
},
|
|
108032
|
-
{
|
|
108033
|
-
"kind": "field",
|
|
108034
|
-
"name": "download",
|
|
108035
|
-
"type": {
|
|
108036
|
-
"text": "boolean"
|
|
108037
|
-
},
|
|
108038
|
-
"privacy": "public",
|
|
108039
|
-
"default": "true",
|
|
108040
|
-
"description": "The download behavior is always enabled and handled internally, therefore\nthis property cannot be disabled and is not reflected to the host element.",
|
|
108041
|
-
"attribute": "download",
|
|
108042
|
-
"reflects": true,
|
|
108043
|
-
"inheritedFrom": {
|
|
108044
|
-
"name": "SbbLinkBaseElement",
|
|
108045
|
-
"module": "core/base-elements/link-base-element.js"
|
|
108046
|
-
}
|
|
108047
|
-
},
|
|
108048
108178
|
{
|
|
108049
108179
|
"kind": "field",
|
|
108050
108180
|
"name": "fileName",
|
|
@@ -108086,6 +108216,21 @@
|
|
|
108086
108216
|
"module": "icon/icon-name-mixin.js"
|
|
108087
108217
|
}
|
|
108088
108218
|
},
|
|
108219
|
+
{
|
|
108220
|
+
"kind": "method",
|
|
108221
|
+
"name": "resolveTarget",
|
|
108222
|
+
"privacy": "protected",
|
|
108223
|
+
"return": {
|
|
108224
|
+
"type": {
|
|
108225
|
+
"text": "string"
|
|
108226
|
+
}
|
|
108227
|
+
},
|
|
108228
|
+
"description": "Documents which are not downloaded are shown inline, in which case they\nare opened in a new browser tab, unless a target is explicitly set.\nAn explicitly empty `target` attribute also counts as set, which allows\nto opt out of the new tab behavior.",
|
|
108229
|
+
"inheritedFrom": {
|
|
108230
|
+
"name": "SbbLinkBaseElement",
|
|
108231
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108232
|
+
}
|
|
108233
|
+
},
|
|
108089
108234
|
{
|
|
108090
108235
|
"kind": "method",
|
|
108091
108236
|
"name": "_updateDescribedByElements",
|
|
@@ -108221,6 +108366,22 @@
|
|
|
108221
108366
|
"module": "core/base-elements/link-base-element.js"
|
|
108222
108367
|
}
|
|
108223
108368
|
},
|
|
108369
|
+
{
|
|
108370
|
+
"kind": "field",
|
|
108371
|
+
"name": "download",
|
|
108372
|
+
"type": {
|
|
108373
|
+
"text": "boolean"
|
|
108374
|
+
},
|
|
108375
|
+
"privacy": "public",
|
|
108376
|
+
"default": "false",
|
|
108377
|
+
"description": "Whether the browser will show the download dialog on click.",
|
|
108378
|
+
"attribute": "download",
|
|
108379
|
+
"reflects": true,
|
|
108380
|
+
"inheritedFrom": {
|
|
108381
|
+
"name": "SbbLinkBaseElement",
|
|
108382
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108383
|
+
}
|
|
108384
|
+
},
|
|
108224
108385
|
{
|
|
108225
108386
|
"kind": "field",
|
|
108226
108387
|
"name": "accessibilityLabel",
|
|
@@ -108636,19 +108797,6 @@
|
|
|
108636
108797
|
"description": "The label of the download. Defaults to the file name of the `href`.",
|
|
108637
108798
|
"fieldName": "label"
|
|
108638
108799
|
},
|
|
108639
|
-
{
|
|
108640
|
-
"name": "download",
|
|
108641
|
-
"type": {
|
|
108642
|
-
"text": "boolean"
|
|
108643
|
-
},
|
|
108644
|
-
"default": "true",
|
|
108645
|
-
"description": "The download behavior is always enabled and handled internally, therefore\nthis property cannot be disabled and is not reflected to the host element.",
|
|
108646
|
-
"fieldName": "download",
|
|
108647
|
-
"inheritedFrom": {
|
|
108648
|
-
"name": "SbbLinkBaseElement",
|
|
108649
|
-
"module": "core/base-elements/link-base-element.js"
|
|
108650
|
-
}
|
|
108651
|
-
},
|
|
108652
108800
|
{
|
|
108653
108801
|
"name": "icon-name",
|
|
108654
108802
|
"type": {
|
|
@@ -108701,6 +108849,19 @@
|
|
|
108701
108849
|
"module": "core/base-elements/link-base-element.js"
|
|
108702
108850
|
}
|
|
108703
108851
|
},
|
|
108852
|
+
{
|
|
108853
|
+
"name": "download",
|
|
108854
|
+
"type": {
|
|
108855
|
+
"text": "boolean"
|
|
108856
|
+
},
|
|
108857
|
+
"default": "false",
|
|
108858
|
+
"description": "Whether the browser will show the download dialog on click.",
|
|
108859
|
+
"fieldName": "download",
|
|
108860
|
+
"inheritedFrom": {
|
|
108861
|
+
"name": "SbbLinkBaseElement",
|
|
108862
|
+
"module": "core/base-elements/link-base-element.js"
|
|
108863
|
+
}
|
|
108864
|
+
},
|
|
108704
108865
|
{
|
|
108705
108866
|
"name": "accessibility-label",
|
|
108706
108867
|
"type": {
|
|
@@ -119010,6 +119171,21 @@
|
|
|
119010
119171
|
"module": "core/base-elements/link-base-element.js"
|
|
119011
119172
|
}
|
|
119012
119173
|
},
|
|
119174
|
+
{
|
|
119175
|
+
"kind": "method",
|
|
119176
|
+
"name": "resolveTarget",
|
|
119177
|
+
"privacy": "protected",
|
|
119178
|
+
"return": {
|
|
119179
|
+
"type": {
|
|
119180
|
+
"text": "string"
|
|
119181
|
+
}
|
|
119182
|
+
},
|
|
119183
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
119184
|
+
"inheritedFrom": {
|
|
119185
|
+
"name": "SbbLinkBaseElement",
|
|
119186
|
+
"module": "core/base-elements/link-base-element.js"
|
|
119187
|
+
}
|
|
119188
|
+
},
|
|
119013
119189
|
{
|
|
119014
119190
|
"kind": "method",
|
|
119015
119191
|
"name": "renderLink",
|
|
@@ -122894,6 +123070,21 @@
|
|
|
122894
123070
|
"module": "core/base-elements/link-base-element.js"
|
|
122895
123071
|
}
|
|
122896
123072
|
},
|
|
123073
|
+
{
|
|
123074
|
+
"kind": "method",
|
|
123075
|
+
"name": "resolveTarget",
|
|
123076
|
+
"privacy": "protected",
|
|
123077
|
+
"return": {
|
|
123078
|
+
"type": {
|
|
123079
|
+
"text": "string"
|
|
123080
|
+
}
|
|
123081
|
+
},
|
|
123082
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
123083
|
+
"inheritedFrom": {
|
|
123084
|
+
"name": "SbbLinkBaseElement",
|
|
123085
|
+
"module": "core/base-elements/link-base-element.js"
|
|
123086
|
+
}
|
|
123087
|
+
},
|
|
122897
123088
|
{
|
|
122898
123089
|
"kind": "method",
|
|
122899
123090
|
"name": "renderLink",
|
|
@@ -130830,6 +131021,21 @@
|
|
|
130830
131021
|
"module": "core/base-elements/link-base-element.js"
|
|
130831
131022
|
}
|
|
130832
131023
|
},
|
|
131024
|
+
{
|
|
131025
|
+
"kind": "method",
|
|
131026
|
+
"name": "resolveTarget",
|
|
131027
|
+
"privacy": "protected",
|
|
131028
|
+
"return": {
|
|
131029
|
+
"type": {
|
|
131030
|
+
"text": "string"
|
|
131031
|
+
}
|
|
131032
|
+
},
|
|
131033
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
131034
|
+
"inheritedFrom": {
|
|
131035
|
+
"name": "SbbLinkBaseElement",
|
|
131036
|
+
"module": "core/base-elements/link-base-element.js"
|
|
131037
|
+
}
|
|
131038
|
+
},
|
|
130833
131039
|
{
|
|
130834
131040
|
"kind": "method",
|
|
130835
131041
|
"name": "renderLink",
|
|
@@ -136079,6 +136285,21 @@
|
|
|
136079
136285
|
"module": "core/base-elements/link-base-element.js"
|
|
136080
136286
|
}
|
|
136081
136287
|
},
|
|
136288
|
+
{
|
|
136289
|
+
"kind": "method",
|
|
136290
|
+
"name": "resolveTarget",
|
|
136291
|
+
"privacy": "protected",
|
|
136292
|
+
"return": {
|
|
136293
|
+
"type": {
|
|
136294
|
+
"text": "string"
|
|
136295
|
+
}
|
|
136296
|
+
},
|
|
136297
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
136298
|
+
"inheritedFrom": {
|
|
136299
|
+
"name": "SbbLinkBaseElement",
|
|
136300
|
+
"module": "core/base-elements/link-base-element.js"
|
|
136301
|
+
}
|
|
136302
|
+
},
|
|
136082
136303
|
{
|
|
136083
136304
|
"kind": "method",
|
|
136084
136305
|
"name": "renderLink",
|
|
@@ -155971,6 +156192,21 @@
|
|
|
155971
156192
|
"module": "core/base-elements/link-base-element.js"
|
|
155972
156193
|
}
|
|
155973
156194
|
},
|
|
156195
|
+
{
|
|
156196
|
+
"kind": "method",
|
|
156197
|
+
"name": "resolveTarget",
|
|
156198
|
+
"privacy": "protected",
|
|
156199
|
+
"return": {
|
|
156200
|
+
"type": {
|
|
156201
|
+
"text": "string"
|
|
156202
|
+
}
|
|
156203
|
+
},
|
|
156204
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
156205
|
+
"inheritedFrom": {
|
|
156206
|
+
"name": "SbbLinkBaseElement",
|
|
156207
|
+
"module": "core/base-elements/link-base-element.js"
|
|
156208
|
+
}
|
|
156209
|
+
},
|
|
155974
156210
|
{
|
|
155975
156211
|
"kind": "method",
|
|
155976
156212
|
"name": "renderLink",
|
|
@@ -157708,6 +157944,21 @@
|
|
|
157708
157944
|
"module": "core/base-elements/link-base-element.js"
|
|
157709
157945
|
}
|
|
157710
157946
|
},
|
|
157947
|
+
{
|
|
157948
|
+
"kind": "method",
|
|
157949
|
+
"name": "resolveTarget",
|
|
157950
|
+
"privacy": "protected",
|
|
157951
|
+
"return": {
|
|
157952
|
+
"type": {
|
|
157953
|
+
"text": "string"
|
|
157954
|
+
}
|
|
157955
|
+
},
|
|
157956
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
157957
|
+
"inheritedFrom": {
|
|
157958
|
+
"name": "SbbLinkBaseElement",
|
|
157959
|
+
"module": "core/base-elements/link-base-element.js"
|
|
157960
|
+
}
|
|
157961
|
+
},
|
|
157711
157962
|
{
|
|
157712
157963
|
"kind": "method",
|
|
157713
157964
|
"name": "renderLink",
|
|
@@ -159579,6 +159830,21 @@
|
|
|
159579
159830
|
"module": "core/base-elements/link-base-element.js"
|
|
159580
159831
|
}
|
|
159581
159832
|
},
|
|
159833
|
+
{
|
|
159834
|
+
"kind": "method",
|
|
159835
|
+
"name": "resolveTarget",
|
|
159836
|
+
"privacy": "protected",
|
|
159837
|
+
"return": {
|
|
159838
|
+
"type": {
|
|
159839
|
+
"text": "string"
|
|
159840
|
+
}
|
|
159841
|
+
},
|
|
159842
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
159843
|
+
"inheritedFrom": {
|
|
159844
|
+
"name": "SbbLinkBaseElement",
|
|
159845
|
+
"module": "core/base-elements/link-base-element.js"
|
|
159846
|
+
}
|
|
159847
|
+
},
|
|
159582
159848
|
{
|
|
159583
159849
|
"kind": "method",
|
|
159584
159850
|
"name": "renderLink",
|
|
@@ -173553,6 +173819,21 @@
|
|
|
173553
173819
|
"module": "core/base-elements/link-base-element.js"
|
|
173554
173820
|
}
|
|
173555
173821
|
},
|
|
173822
|
+
{
|
|
173823
|
+
"kind": "method",
|
|
173824
|
+
"name": "resolveTarget",
|
|
173825
|
+
"privacy": "protected",
|
|
173826
|
+
"return": {
|
|
173827
|
+
"type": {
|
|
173828
|
+
"text": "string"
|
|
173829
|
+
}
|
|
173830
|
+
},
|
|
173831
|
+
"description": "Resolves the target which is applied to the inner anchor element.\nSubclasses can override this to provide a fallback when no `target` is set.",
|
|
173832
|
+
"inheritedFrom": {
|
|
173833
|
+
"name": "SbbLinkBaseElement",
|
|
173834
|
+
"module": "core/base-elements/link-base-element.js"
|
|
173835
|
+
}
|
|
173836
|
+
},
|
|
173556
173837
|
{
|
|
173557
173838
|
"kind": "method",
|
|
173558
173839
|
"name": "renderLink",
|
|
@@ -25,6 +25,11 @@ export declare abstract class SbbLinkBaseElement extends SbbActionBaseElement {
|
|
|
25
25
|
/** @internal */
|
|
26
26
|
click(): void;
|
|
27
27
|
private _evaluateRelAttribute;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the target which is applied to the inner anchor element.
|
|
30
|
+
* Subclasses can override this to provide a fallback when no `target` is set.
|
|
31
|
+
*/
|
|
32
|
+
protected resolveTarget(): string;
|
|
28
33
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
29
34
|
protected render(): TemplateResult;
|
|
30
35
|
protected renderLink(renderContent: TemplateResult): TemplateResult;
|
package/development/core.js
CHANGED
|
@@ -2669,8 +2669,8 @@ let SbbLinkBaseElement = (() => {
|
|
|
2669
2669
|
this.#accessibilityCurrent_accessor_storage = (__runInitializers(this, _accessibilityLabel_extraInitializers), __runInitializers(this, _accessibilityCurrent_initializers, ""));
|
|
2670
2670
|
this.language = (__runInitializers(this, _accessibilityCurrent_extraInitializers), new SbbLanguageController(this));
|
|
2671
2671
|
this.anchorRole = null;
|
|
2672
|
-
this._evaluateRelAttribute = () => {
|
|
2673
|
-
return this.rel ? this.rel :
|
|
2672
|
+
this._evaluateRelAttribute = (target) => {
|
|
2673
|
+
return this.rel ? this.rel : target === "_blank" ? "external noopener nofollow" : nothing;
|
|
2674
2674
|
};
|
|
2675
2675
|
this.internals.states.add("link");
|
|
2676
2676
|
if (!isServer) this.setupBaseEventHandlers();
|
|
@@ -2687,19 +2687,27 @@ let SbbLinkBaseElement = (() => {
|
|
|
2687
2687
|
click() {
|
|
2688
2688
|
this.shadowRoot.querySelector("a")?.click();
|
|
2689
2689
|
}
|
|
2690
|
+
/**
|
|
2691
|
+
* Resolves the target which is applied to the inner anchor element.
|
|
2692
|
+
* Subclasses can override this to provide a fallback when no `target` is set.
|
|
2693
|
+
*/
|
|
2694
|
+
resolveTarget() {
|
|
2695
|
+
return this.target;
|
|
2696
|
+
}
|
|
2690
2697
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
2691
2698
|
render() {
|
|
2692
2699
|
return this.renderLink(this.renderTemplate());
|
|
2693
2700
|
}
|
|
2694
2701
|
renderLink(renderContent) {
|
|
2695
|
-
const
|
|
2702
|
+
const target = this.resolveTarget();
|
|
2703
|
+
const opensInNewWindow = !!this.href && target === "_blank";
|
|
2696
2704
|
return html`
|
|
2697
2705
|
<a
|
|
2698
2706
|
class="sbb-action-base ${this.localName}"
|
|
2699
2707
|
href=${this.href || nothing}
|
|
2700
2708
|
?download=${this.download}
|
|
2701
|
-
target=${
|
|
2702
|
-
rel=${this._evaluateRelAttribute()}
|
|
2709
|
+
target=${target || nothing}
|
|
2710
|
+
rel=${this._evaluateRelAttribute(target)}
|
|
2703
2711
|
role=${this.anchorRole || nothing}
|
|
2704
2712
|
aria-label=${this.accessibilityLabel || nothing}
|
|
2705
2713
|
aria-current=${this.accessibilityCurrent || nothing}
|
|
@@ -4,8 +4,10 @@ declare const SbbDownloadElement_base: import("../../core.ts").AbstractConstruct
|
|
|
4
4
|
/**
|
|
5
5
|
* It displays a downloadable document, styled as a card.
|
|
6
6
|
*
|
|
7
|
-
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel
|
|
8
|
-
* and `accessibilityLabel`.
|
|
7
|
+
* Inherits link properties from `SbbLinkBaseElement`: `href`, `target`, `rel`,
|
|
8
|
+
* `download` and `accessibilityLabel`. Without the `download` attribute the
|
|
9
|
+
* referenced document is opened inline in a new browser tab, unless a `target`
|
|
10
|
+
* is explicitly set.
|
|
9
11
|
*
|
|
10
12
|
* @slot - Use the unnamed slot to add custom content. Optional.
|
|
11
13
|
* @slot info - Slot used to render a `sbb-download-info`. A `sbb-download-info`
|
|
@@ -21,13 +23,6 @@ export declare class SbbDownloadElement extends SbbDownloadElement_base {
|
|
|
21
23
|
accessor color: 'white' | 'milk';
|
|
22
24
|
/** The label of the download. Defaults to the file name of the `href`. */
|
|
23
25
|
accessor label: string;
|
|
24
|
-
/**
|
|
25
|
-
* The download behavior is always enabled and handled internally, therefore
|
|
26
|
-
* this property cannot be disabled and is not reflected to the host element.
|
|
27
|
-
* @default true
|
|
28
|
-
*/
|
|
29
|
-
set download(_value: boolean);
|
|
30
|
-
get download(): boolean;
|
|
31
26
|
/** The file name extracted from the `href` (e.g. `report.pdf`). */
|
|
32
27
|
get fileName(): string;
|
|
33
28
|
/** The lower-cased file extension extracted from the `href` (e.g. `pdf`), if any. */
|
|
@@ -38,7 +33,14 @@ export declare class SbbDownloadElement extends SbbDownloadElement_base {
|
|
|
38
33
|
* set.
|
|
39
34
|
*/
|
|
40
35
|
protected renderIconName(): string;
|
|
41
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Documents which are not downloaded are shown inline, in which case they
|
|
38
|
+
* are opened in a new browser tab, unless a target is explicitly set.
|
|
39
|
+
* An explicitly empty `target` attribute also counts as set, which allows
|
|
40
|
+
* to opt out of the new tab behavior.
|
|
41
|
+
*/
|
|
42
|
+
protected resolveTarget(): string;
|
|
43
|
+
protected updated(changedProperties: PropertyValues<this>): void;
|
|
42
44
|
private _updateDescribedByElements;
|
|
43
45
|
private _downloadInfoElements;
|
|
44
46
|
protected renderTemplate(): TemplateResult;
|