kmaterialize 2.3.3-1.0.12 → 2.3.3-1.0.13

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.
@@ -128,7 +128,13 @@
128
128
  }
129
129
 
130
130
  &:focus {
131
- background-color: $button-floating-background-focus;
131
+ // Was $button-floating-background-focus (--md-ref-palette-secondary80,
132
+ // a raw MD3 secondary tone) - it doesn't track a custom theme's
133
+ // primary/container colors the way :hover's color-mix above does, so
134
+ // it could show as a clashing color (e.g. blue) on a themed palette.
135
+ // Same formula as :hover, just mixed a bit stronger for the stronger
136
+ // state.
137
+ background-color: color-mix(in srgb, var(--md-sys-color-primary-container), var(--md-sys-color-on-primary-container) 24%);
132
138
  @extend .z-depth-1-half;
133
139
  }
134
140
 
@@ -114,7 +114,11 @@ input[type=range]::-moz-focus-inner {
114
114
 
115
115
  input[type=range]::-moz-range-thumb {
116
116
  @include range-thumb;
117
- margin-top: -5px;
117
+ // No margin-top here, unlike the -webkit-slider-thumb rule above:
118
+ // Firefox already vertically centers ::-moz-range-thumb on the track
119
+ // by default. Copying webkit's -5px correction (needed there because
120
+ // Chrome/Safari top-align the thumb by default) over-corrects in
121
+ // Firefox, pushing an already-centered thumb noticeably too high.
118
122
  }
119
123
 
120
124
  // hide the outline behind the border
@@ -109,6 +109,49 @@
109
109
  }
110
110
  }
111
111
 
112
+ /// Slider
113
+ ///////////////////////////////////////////////////////
114
+ ///
115
+
116
+ // A pill container for a range-field, matching .toolbar-track's look -
117
+ // also fixes two things a bare range-field has inside a .toolbar: the
118
+ // native track line is var(--md-sys-color-surface-variant), the exact
119
+ // same color as .toolbar's own background, so it's invisible without a
120
+ // container giving it something else to contrast against; and this also
121
+ // vertically centers any label text/icons placed next to it.
122
+ .toolbar-slider {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ gap: 8px;
126
+ height: 34px;
127
+ padding: 0 13px;
128
+ border-radius: 999px;
129
+ background-color: var(--md-sys-color-surface);
130
+ border: 1px solid var(--md-sys-color-outline-variant);
131
+
132
+ .range-field {
133
+ width: 120px;
134
+ margin-top: 18px;
135
+ }
136
+
137
+ // Material icons default to 24px, which crowds a 34px-tall pill and
138
+ // reads a lot heavier than adjacent 13-14px text labels - match the
139
+ // track item's scale instead.
140
+ i.material-icons {
141
+ font-size: 18px;
142
+ }
143
+
144
+ span {
145
+ line-height: 1;
146
+ // Measured against the actual track/thumb center: a "-"/"+" glyph's
147
+ // ink sits a few px below the middle of its own line box in this
148
+ // font, even though the box itself is perfectly flex-centered - nudge
149
+ // the glyph up to compensate.
150
+ position: relative;
151
+ top: -3px;
152
+ }
153
+ }
154
+
112
155
  /// Expandable search
113
156
  ///////////////////////////////////////////////////////
114
157
  ///
@@ -23,6 +23,16 @@ export class Toolbar extends Component<ToolbarOptions> {
23
23
  this._tracks = Array.from(this.el.querySelectorAll<HTMLElement>('.toolbar-track'));
24
24
  this._setupEventHandlers();
25
25
  this._tracks.forEach((track) => this._moveIndicator(track, false));
26
+
27
+ // A custom/web font can still be loading at construction time; its
28
+ // metrics landing after this first measurement would leave the
29
+ // indicator very slightly offset from the (now differently-sized)
30
+ // text it's supposed to sit behind. Re-measure once fonts are ready.
31
+ if (typeof document !== 'undefined' && document.fonts) {
32
+ document.fonts.ready.then(() => {
33
+ this._tracks.forEach((track) => this._moveIndicator(track, false));
34
+ });
35
+ }
26
36
  }
27
37
 
28
38
  static get defaults(): ToolbarOptions {
@@ -122,7 +132,12 @@ export class Toolbar extends Component<ToolbarOptions> {
122
132
  if (!indicator || !active) return;
123
133
 
124
134
  if (!animate) indicator.style.transition = 'none';
125
- indicator.style.transform = `translateX(${active.offsetLeft - track.clientLeft}px)`;
135
+ // No "- track.clientLeft" here: offsetLeft is already relative to the
136
+ // offsetParent's padding edge, same origin as the indicator's own
137
+ // `left: 0` (an absolutely positioned element's containing block is
138
+ // its ancestor's padding box) - subtracting the border width again
139
+ // was double-counting it, nudging the indicator a px too far left.
140
+ indicator.style.transform = `translateX(${active.offsetLeft}px)`;
126
141
  indicator.style.width = `${active.offsetWidth}px`;
127
142
  track.classList.add('is-armed');
128
143
  if (!animate) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v2.3.3-1.0.12 (https://materializeweb.com)
2
+ * Materialize v2.3.3-1.0.13 (https://materializeweb.com)
3
3
  * Copyright 2014-2026 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Materialize v2.3.3-1.0.12 (https://materializeweb.com)
2
+ * Materialize v2.3.3-1.0.13 (https://materializeweb.com)
3
3
  * Copyright 2014-2026 Materialize
4
4
  * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)
5
5
  */
@@ -13504,7 +13504,7 @@ body {
13504
13504
  background-color: color-mix(in srgb, var(--md-sys-color-primary-container), var(--md-sys-color-on-primary-container) 16%);
13505
13505
  }
13506
13506
  .btn-floating:focus {
13507
- background-color: var(--md-ref-palette-secondary80);
13507
+ background-color: color-mix(in srgb, var(--md-sys-color-primary-container), var(--md-sys-color-on-primary-container) 24%);
13508
13508
  }
13509
13509
  .btn-floating:before {
13510
13510
  border-radius: 0;
@@ -14984,6 +14984,35 @@ body.keyboard-focused .dropdown-content li:focus {
14984
14984
  outline-offset: 2px;
14985
14985
  }
14986
14986
 
14987
+ .toolbar-slider {
14988
+ display: -webkit-inline-box;
14989
+ display: -webkit-inline-flex;
14990
+ display: -ms-inline-flexbox;
14991
+ display: inline-flex;
14992
+ -webkit-box-align: center;
14993
+ -webkit-align-items: center;
14994
+ -ms-flex-align: center;
14995
+ align-items: center;
14996
+ gap: 8px;
14997
+ height: 34px;
14998
+ padding: 0 13px;
14999
+ border-radius: 999px;
15000
+ background-color: var(--md-sys-color-surface);
15001
+ border: 1px solid var(--md-sys-color-outline-variant);
15002
+ }
15003
+ .toolbar-slider .range-field {
15004
+ width: 120px;
15005
+ margin-top: 18px;
15006
+ }
15007
+ .toolbar-slider i.material-icons {
15008
+ font-size: 18px;
15009
+ }
15010
+ .toolbar-slider span {
15011
+ line-height: 1;
15012
+ position: relative;
15013
+ top: -3px;
15014
+ }
15015
+
14987
15016
  .toolbar-search {
14988
15017
  display: -webkit-inline-box;
14989
15018
  display: -webkit-inline-flex;
@@ -17735,7 +17764,6 @@ input[type=range]::-moz-range-thumb {
17735
17764
  background: var(--md-sys-color-primary);
17736
17765
  -moz-transition: box-shadow 0.3s;
17737
17766
  transition: box-shadow 0.3s;
17738
- margin-top: -5px;
17739
17767
  }
17740
17768
 
17741
17769
  input[type=range]:-moz-focusring {