@sbb-esta/lyne-elements-dev 4.9.0-dev.1774354777 → 4.9.0-dev.1774426040

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.
@@ -194,6 +194,9 @@ $theme: 'standard' !default;
194
194
  @use '../../signet/signet.global' as signet with (
195
195
  $theme: $theme
196
196
  );
197
+ @use '../../slider/slider.global' as slider with (
198
+ $theme: $theme
199
+ );
197
200
  @use '../../status/status.global' as status with (
198
201
  $theme: $theme
199
202
  );
@@ -273,6 +276,7 @@ $theme: 'standard' !default;
273
276
  @include selection-action-panel.base;
274
277
  @include selection-expansion-panel.base;
275
278
  @include signet.base;
279
+ @include slider.base;
276
280
  @include status.base;
277
281
  @include tab-group-common.base;
278
282
  @include tab-label-common.base;
@@ -292,6 +296,7 @@ $theme: 'standard' !default;
292
296
  @include visual-checkbox.base-forced-colors;
293
297
  @include radio-button-common.base-forced-colors;
294
298
  @include signet.base-forced-colors;
299
+ @include slider.base-forced-colors;
295
300
  }
296
301
 
297
302
  // Train formation
@@ -4,6 +4,7 @@
4
4
  // Notes:
5
5
  // We cannot use `border-collapse` because in sticky variants it gets visually broken.
6
6
  // Therefore, we have to build the grid avoiding double borders.
7
+ // TODO: remove with next major release
7
8
  @mixin table {
8
9
  @include table--m;
9
10
  @include table--striped;
@@ -23,49 +24,46 @@
23
24
  caption-side: bottom;
24
25
  color: var(--sbb-table-color);
25
26
  table-layout: auto;
27
+ text-align: left;
26
28
 
27
- thead {
28
- & > tr {
29
- @include table-header-row;
29
+ th {
30
+ @include table-header-cell;
31
+ }
30
32
 
31
- &:first-of-type > th {
32
- border-block-start: var(--sbb-table-border);
33
- }
33
+ td {
34
+ @include table-data-cell;
35
+ }
34
36
 
35
- & > th {
36
- @include table-header-cell;
37
+ :is(th, td) {
38
+ &.sbb-table-group-with-next {
39
+ border-inline-end: none;
40
+ }
37
41
 
38
- &:first-of-type {
39
- border-inline-start: var(--sbb-table-border);
40
- }
41
- }
42
+ &:first-child {
43
+ border-inline-start: var(--sbb-table-border);
42
44
  }
43
45
  }
44
46
 
45
- tbody {
46
- & > tr {
47
- & > td {
48
- @include table-data-cell;
49
-
50
- &:first-of-type {
51
- border-inline-start: var(--sbb-table-border);
52
- }
53
- }
47
+ // In Angular the CDK table always adds a thead even if there are no headers.
48
+ // Due to this fact we have to also insert `tr` in the `:has()` selector.
49
+ &:has(thead tr) thead,
50
+ &:not(:has(thead tr)) tbody {
51
+ tr:first-of-type > :is(th, td) {
52
+ border-block-start: var(--sbb-table-border);
54
53
  }
55
54
  }
56
55
 
57
- caption {
58
- @include table-caption;
56
+ // Avoid borders between header rows (design specification).
57
+ thead > tr:has(+ tr) > :is(th, td) {
58
+ border-block-end: none;
59
59
  }
60
60
 
61
- // If there is no thead, add a top border to the first tbody row
62
- // In Angular the CDK table always adds a thead even if there are no headers.
63
- // Due to this fact we have to also insert `tr` in the `:has()` selector.
64
- &:not(:has(thead tr)) tbody > tr:first-of-type > td {
65
- border-block-start: var(--sbb-table-border);
61
+ caption {
62
+ @include table-caption;
66
63
  }
67
64
  }
68
65
 
66
+ // TODO: remove with next major release
69
67
  @mixin table-header-row {
70
68
  // If there is more than one header row, only the last one has the bottom border
71
69
  &:last-of-type > th {
@@ -73,17 +71,19 @@
73
71
  }
74
72
  }
75
73
 
74
+ // TODO: remove with next major release
76
75
  @mixin table-header-cell {
77
76
  font-size: var(--sbb-table-header-cell-font-size);
78
77
  letter-spacing: var(--sbb-typo-letter-spacing-text);
79
78
  font-weight: bold;
80
79
  background-color: var(--sbb-table-background-color);
80
+ border-block-end: var(--sbb-table-border);
81
81
  border-inline-end: var(--sbb-table-border);
82
82
  padding-block: var(--sbb-table-header-padding-block);
83
83
  padding-inline: var(--sbb-table-header-padding-inline);
84
- text-align: left;
85
84
  }
86
85
 
86
+ // TODO: remove with next major release
87
87
  @mixin table-data-cell {
88
88
  font-size: var(--sbb-table-data-cell-font-size);
89
89
  letter-spacing: var(--sbb-typo-letter-spacing-text);
@@ -94,6 +94,7 @@
94
94
  padding-inline: var(--sbb-table-cell-padding-inline);
95
95
  }
96
96
 
97
+ // TODO: remove with next major release
97
98
  @mixin table-caption {
98
99
  // Workaround for storybook. It crashes if 'light-dark' is used as a 'var' fallback
99
100
  --sbb-table-caption-color-fallback: light-dark(var(--sbb-color-granite), var(--sbb-color-cement));
@@ -107,26 +108,31 @@
107
108
  text-align: left;
108
109
  }
109
110
 
111
+ // TODO: remove and inline with next major release
110
112
  @mixin table-filter {
111
113
  padding-block-start: 0 !important;
112
114
  }
113
115
 
116
+ // TODO: remove with next major release
114
117
  @mixin table--striped {
115
118
  tbody tr:nth-child(odd) :is(th, td) {
116
119
  @include table-row--striped;
117
120
  }
118
121
  }
119
122
 
123
+ // TODO: remove with next major release
120
124
  @mixin table--unstriped {
121
125
  tbody tr:nth-child(odd) :is(th, td) {
122
126
  background-color: var(--sbb-table-background-color);
123
127
  }
124
128
  }
125
129
 
130
+ // TODO: remove with next major release
126
131
  @mixin table-row--striped {
127
132
  background-color: var(--sbb-table-row-striped-color);
128
133
  }
129
134
 
135
+ // TODO: remove with next major release
130
136
  @mixin table--negative {
131
137
  --sbb-table-border-color: var(--sbb-color-anthracite);
132
138
  --sbb-table-background-color: var(--sbb-background-color-1-negative);
@@ -135,6 +141,7 @@
135
141
  --sbb-table-caption-color: var(--sbb-color-cement);
136
142
  }
137
143
 
144
+ // TODO: remove with next major release
138
145
  @mixin table--m {
139
146
  --sbb-table-header-cell-font-size: var(--sbb-text-font-size-xs);
140
147
  --sbb-table-data-cell-font-size: var(--sbb-text-font-size-s);
@@ -144,6 +151,7 @@
144
151
  --sbb-table-cell-padding-inline: var(--sbb-spacing-fixed-4x);
145
152
  }
146
153
 
154
+ // TODO: remove with next major release
147
155
  @mixin table--s {
148
156
  --sbb-table-header-cell-font-size: var(--sbb-text-font-size-xs);
149
157
  --sbb-table-data-cell-font-size: var(--sbb-text-font-size-xs);
@@ -153,6 +161,7 @@
153
161
  --sbb-table-cell-padding-inline: var(--sbb-spacing-fixed-2x);
154
162
  }
155
163
 
164
+ // TODO: remove with next major release
156
165
  @mixin table--xs {
157
166
  --sbb-table-header-cell-font-size: var(--sbb-text-font-size-xs);
158
167
  --sbb-table-data-cell-font-size: var(--sbb-text-font-size-xs);
@@ -162,6 +171,7 @@
162
171
  --sbb-table-cell-padding-inline: var(--sbb-spacing-fixed-1x);
163
172
  }
164
173
 
174
+ // TODO: remove with next major release
165
175
  @mixin table--theme-iron {
166
176
  --sbb-table-cell-color: var(--sbb-color-4);
167
177
 
@@ -170,6 +180,7 @@
170
180
  }
171
181
  }
172
182
 
183
+ // TODO: remove with next major release
173
184
  @mixin table--theme-iron-negative {
174
185
  --sbb-table-cell-color: var(--sbb-color-cloud);
175
186
  }
@@ -40,10 +40,12 @@ sbb-table-wrapper[negative] .sbb-table,
40
40
  }
41
41
  }
42
42
 
43
+ // @deprecated
43
44
  .sbb-table-header-row {
44
45
  @include table.table-header-row;
45
46
  }
46
47
 
48
+ // @deprecated
47
49
  .sbb-table-header-cell {
48
50
  @include table.table-header-cell;
49
51
  }
@@ -52,10 +54,12 @@ sbb-table-wrapper[negative] .sbb-table,
52
54
  @include table.table-row--striped;
53
55
  }
54
56
 
57
+ // @deprecated
55
58
  .sbb-table-data-cell {
56
59
  @include table.table-data-cell;
57
60
  }
58
61
 
62
+ // @deprecated
59
63
  .sbb-table-caption {
60
64
  @include table.table-caption;
61
65
  }
@@ -120,3 +124,29 @@ sbb-table-wrapper[negative] .sbb-table,
120
124
  html.sbb-lean .sbb-table:not(.sbb-table-xs, .sbb-table-m) {
121
125
  @include table.table--s;
122
126
  }
127
+
128
+ .sbb-table-align-start {
129
+ text-align: start;
130
+ }
131
+
132
+ .sbb-table-align-center {
133
+ text-align: center;
134
+ }
135
+
136
+ .sbb-table-align-end {
137
+ text-align: end;
138
+ }
139
+
140
+ .sbb-table-align-justify {
141
+ text-align: justify;
142
+ }
143
+
144
+ // Backwards compatibility for sbb-angular
145
+ .sbb-table-align-left {
146
+ text-align: left;
147
+ }
148
+
149
+ // Backwards compatibility for sbb-angular
150
+ .sbb-table-align-right {
151
+ text-align: right;
152
+ }
package/core.css CHANGED
@@ -1632,6 +1632,27 @@ slot[name=error]::slotted(*) {
1632
1632
  --sbb-signet-panel-color: var(--sbb-color-brand);
1633
1633
  --sbb-signet-icon-color: var(--sbb-color-white);
1634
1634
  --sbb-signet-aspect-ratio: 2 / 1;
1635
+ --sbb-slider-line-height: 0.25rem;
1636
+ --sbb-slider-knob-size: 1.75rem;
1637
+ --sbb-slider-knob-size-active: 1.9375rem;
1638
+ --sbb-slider-knob-border-size: 0.1875rem;
1639
+ --sbb-slider-knob-border-style: solid;
1640
+ --sbb-slider-knob-color: var(--sbb-background-color-1);
1641
+ --sbb-slider-knob-border-color: var(--sbb-color-primary);
1642
+ --sbb-slider-icon-color: var(--sbb-color-1);
1643
+ --sbb-slider-selected-line-disabled-color: var(--sbb-color-smoke);
1644
+ --sbb-slider-selected-line-disabled-color: light-dark(
1645
+ var(--sbb-color-smoke),
1646
+ var(--sbb-color-cement)
1647
+ );
1648
+ --sbb-slider-line-color: var(--sbb-border-color-5);
1649
+ --sbb-slider-selected-line-color: var(--sbb-color-primary);
1650
+ --sbb-slider-line-disabled-color: var(--sbb-color-graphite);
1651
+ --sbb-slider-line-disabled-color: light-dark(var(--sbb-color-graphite), var(--sbb-color-granite));
1652
+ --sbb-slider-width: 25rem;
1653
+ --sbb-slider-min-width: 9.375rem;
1654
+ --sbb-slider-gap: var(--sbb-spacing-fixed-2x);
1655
+ --sbb-slider-padding-block: 0.125rem;
1635
1656
  --sbb-status-color: var(--sbb-color-4);
1636
1657
  --sbb-status-gap: var(--sbb-spacing-fixed-1x);
1637
1658
  --sbb-status-font-size: var(--sbb-text-font-size-s);
@@ -1709,6 +1730,8 @@ slot[name=error]::slotted(*) {
1709
1730
  --sbb-signet-background-color: ButtonText !important;
1710
1731
  --sbb-signet-panel-color: ButtonText !important;
1711
1732
  --sbb-signet-icon-color: Canvas !important;
1733
+ --sbb-slider-selected-line-color: Highlight;
1734
+ --sbb-slider-line-color: CanvasText;
1712
1735
  }
1713
1736
  }
1714
1737
  :root {
@@ -80748,12 +80748,12 @@
80748
80748
  },
80749
80749
  {
80750
80750
  "kind": "javascript-module",
80751
- "path": "datepicker/datepicker-previous-day/datepicker-previous-day.component.js",
80751
+ "path": "datepicker/datepicker-next-day/datepicker-next-day.component.js",
80752
80752
  "declarations": [
80753
80753
  {
80754
80754
  "kind": "class",
80755
- "description": "Combined with a `sbb-datepicker`, it can be used to move the date back.",
80756
- "name": "SbbDatepickerPreviousDayElement",
80755
+ "description": "Combined with a `sbb-datepicker`, it can be used to move the date ahead.",
80756
+ "name": "SbbDatepickerNextDayElement",
80757
80757
  "members": [
80758
80758
  {
80759
80759
  "kind": "field",
@@ -80768,7 +80768,7 @@
80768
80768
  "name": "SbbElement",
80769
80769
  "module": "core/base-elements/element.js"
80770
80770
  },
80771
- "default": "'sbb-datepicker-previous-day'"
80771
+ "default": "'sbb-datepicker-next-day'"
80772
80772
  },
80773
80773
  {
80774
80774
  "kind": "field",
@@ -80781,7 +80781,7 @@
80781
80781
  "name": "SbbDatepickerButtonBase",
80782
80782
  "module": "datepicker/common/datepicker-button.js"
80783
80783
  },
80784
- "default": "'chevron-small-left-small'"
80784
+ "default": "'chevron-small-right-small'"
80785
80785
  },
80786
80786
  {
80787
80787
  "kind": "field",
@@ -80790,7 +80790,7 @@
80790
80790
  "text": "Record<string, string>"
80791
80791
  },
80792
80792
  "privacy": "protected",
80793
- "default": "i18nPreviousDay",
80793
+ "default": "i18nNextDay",
80794
80794
  "inheritedFrom": {
80795
80795
  "name": "SbbDatepickerButton",
80796
80796
  "module": "datepicker/common/datepicker-button.js"
@@ -80803,7 +80803,7 @@
80803
80803
  "text": "(_currentDate: string) => Record<string, string>"
80804
80804
  },
80805
80805
  "privacy": "protected",
80806
- "default": "i18nSelectPreviousDay",
80806
+ "default": "i18nSelectNextDay",
80807
80807
  "inheritedFrom": {
80808
80808
  "name": "SbbDatepickerButton",
80809
80809
  "module": "datepicker/common/datepicker-button.js"
@@ -80833,7 +80833,7 @@
80833
80833
  },
80834
80834
  {
80835
80835
  "kind": "method",
80836
- "name": "_isBeforeMinDate",
80836
+ "name": "_isAfterMaxDate",
80837
80837
  "privacy": "private",
80838
80838
  "return": {
80839
80839
  "type": {
@@ -81693,7 +81693,7 @@
81693
81693
  "name": "SbbDatepickerButton",
81694
81694
  "module": "datepicker/common/datepicker-button.js"
81695
81695
  },
81696
- "tagName": "sbb-datepicker-previous-day",
81696
+ "tagName": "sbb-datepicker-next-day",
81697
81697
  "customElement": true,
81698
81698
  "classGenerics": "T = Date",
81699
81699
  "attributes": [
@@ -81779,22 +81779,22 @@
81779
81779
  "exports": [
81780
81780
  {
81781
81781
  "kind": "js",
81782
- "name": "SbbDatepickerPreviousDayElement",
81782
+ "name": "SbbDatepickerNextDayElement",
81783
81783
  "declaration": {
81784
- "name": "SbbDatepickerPreviousDayElement",
81785
- "module": "datepicker/datepicker-previous-day/datepicker-previous-day.component.js"
81784
+ "name": "SbbDatepickerNextDayElement",
81785
+ "module": "datepicker/datepicker-next-day/datepicker-next-day.component.js"
81786
81786
  }
81787
81787
  }
81788
81788
  ]
81789
81789
  },
81790
81790
  {
81791
81791
  "kind": "javascript-module",
81792
- "path": "datepicker/datepicker-next-day/datepicker-next-day.component.js",
81792
+ "path": "datepicker/datepicker-previous-day/datepicker-previous-day.component.js",
81793
81793
  "declarations": [
81794
81794
  {
81795
81795
  "kind": "class",
81796
- "description": "Combined with a `sbb-datepicker`, it can be used to move the date ahead.",
81797
- "name": "SbbDatepickerNextDayElement",
81796
+ "description": "Combined with a `sbb-datepicker`, it can be used to move the date back.",
81797
+ "name": "SbbDatepickerPreviousDayElement",
81798
81798
  "members": [
81799
81799
  {
81800
81800
  "kind": "field",
@@ -81809,7 +81809,7 @@
81809
81809
  "name": "SbbElement",
81810
81810
  "module": "core/base-elements/element.js"
81811
81811
  },
81812
- "default": "'sbb-datepicker-next-day'"
81812
+ "default": "'sbb-datepicker-previous-day'"
81813
81813
  },
81814
81814
  {
81815
81815
  "kind": "field",
@@ -81822,7 +81822,7 @@
81822
81822
  "name": "SbbDatepickerButtonBase",
81823
81823
  "module": "datepicker/common/datepicker-button.js"
81824
81824
  },
81825
- "default": "'chevron-small-right-small'"
81825
+ "default": "'chevron-small-left-small'"
81826
81826
  },
81827
81827
  {
81828
81828
  "kind": "field",
@@ -81831,7 +81831,7 @@
81831
81831
  "text": "Record<string, string>"
81832
81832
  },
81833
81833
  "privacy": "protected",
81834
- "default": "i18nNextDay",
81834
+ "default": "i18nPreviousDay",
81835
81835
  "inheritedFrom": {
81836
81836
  "name": "SbbDatepickerButton",
81837
81837
  "module": "datepicker/common/datepicker-button.js"
@@ -81844,7 +81844,7 @@
81844
81844
  "text": "(_currentDate: string) => Record<string, string>"
81845
81845
  },
81846
81846
  "privacy": "protected",
81847
- "default": "i18nSelectNextDay",
81847
+ "default": "i18nSelectPreviousDay",
81848
81848
  "inheritedFrom": {
81849
81849
  "name": "SbbDatepickerButton",
81850
81850
  "module": "datepicker/common/datepicker-button.js"
@@ -81874,7 +81874,7 @@
81874
81874
  },
81875
81875
  {
81876
81876
  "kind": "method",
81877
- "name": "_isAfterMaxDate",
81877
+ "name": "_isBeforeMinDate",
81878
81878
  "privacy": "private",
81879
81879
  "return": {
81880
81880
  "type": {
@@ -82734,7 +82734,7 @@
82734
82734
  "name": "SbbDatepickerButton",
82735
82735
  "module": "datepicker/common/datepicker-button.js"
82736
82736
  },
82737
- "tagName": "sbb-datepicker-next-day",
82737
+ "tagName": "sbb-datepicker-previous-day",
82738
82738
  "customElement": true,
82739
82739
  "classGenerics": "T = Date",
82740
82740
  "attributes": [
@@ -82820,10 +82820,10 @@
82820
82820
  "exports": [
82821
82821
  {
82822
82822
  "kind": "js",
82823
- "name": "SbbDatepickerNextDayElement",
82823
+ "name": "SbbDatepickerPreviousDayElement",
82824
82824
  "declaration": {
82825
- "name": "SbbDatepickerNextDayElement",
82826
- "module": "datepicker/datepicker-next-day/datepicker-next-day.component.js"
82825
+ "name": "SbbDatepickerPreviousDayElement",
82826
+ "module": "datepicker/datepicker-previous-day/datepicker-previous-day.component.js"
82827
82827
  }
82828
82828
  }
82829
82829
  ]
@@ -1,2 +1,2 @@
1
- import { t as SbbSliderElement } from "../slider.component-w_WtVNx-.js";
1
+ import { t as SbbSliderElement } from "../slider.component-QzF7A8Yl.js";
2
2
  export { SbbSliderElement };