Skip to content

Commit f44a861

Browse files
committed
chore: release 2.1.1
1 parent 94f7598 commit f44a861

4 files changed

Lines changed: 74 additions & 54 deletions

File tree

getting-started.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h5>Materialize</h5>
3131
tabindex="0"
3232
id="download-source"
3333
class="btn filled waves-effect waves-light icon-right"
34-
href="https://github.com/materializecss/materialize/releases/download/2.1.0/materialize-v2.1.0.zip"
34+
href="https://github.com/materializecss/materialize/releases/download/v2.1.1/materialize-v2.1.1.zip"
3535
>
3636
Materialize<i class="material-icons">file_download</i>
3737
</a>
@@ -46,7 +46,7 @@ <h5>Sass</h5>
4646
tabindex="0"
4747
id="download-sass"
4848
class="btn outlined waves-effect waves-light icon-right"
49-
href="https://github.com/materializecss/materialize/releases/download/2.1.0/materialize-src-v2.1.0.zip"
49+
href="https://github.com/materializecss/materialize/releases/download/v2.1.1/materialize-src-v2.1.1.zip"
5050
>
5151
Source<i class="material-icons right">file_download</i>
5252
</a>
@@ -55,10 +55,10 @@ <h5>Sass</h5>
5555

5656
<div class="is-closed" id="download-thanks">
5757
<div class="card p-3 mt-3">
58-
<p class="primary-text"><b>Thank you for downloading!</b></p>
58+
<p class="m-0 primary-text"><b>Support our work</b></p>
5959
<p class="caption">
60-
We hope you find Materialize useful in your next project. We would appreciate if you help us spread the word about Materialize by giving us a star or support
61-
our work.
60+
Thank you for downloading. We hope you find Materialize useful in your next project. We would appreciate if you help us spread the word about Materialize by
61+
giving us a star or support our work.
6262
</p>
6363
<div class="row">
6464
<a href="https://github.com/materializecss/materialize" target="_blank">
@@ -80,9 +80,9 @@ <h5>CDN</h5>
8080
<span class="copyMessage">Copied!</span>
8181
<i class="material-icons copyButton">content_copy</i>
8282
<code class="language-html copiedText"><xmp><!-- Compiled and minified CSS -->
83-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.0/dist/css/materialize.min.css">
83+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.1/dist/css/materialize.min.css">
8484
<!-- Compiled and minified JavaScript -->
85-
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.0/dist/js/materialize.min.js"></script>
85+
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.1/dist/js/materialize.min.js"></script>
8686
</xmp></code></pre>
8787
</div>
8888
<div class="col s12">

packages/materialize

Submodule materialize updated 85 files

partials/navbar.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@
5050
<li class="version">
5151
<a class="dropdown-trigger" href="#" data-target="version-dropdown">
5252
<!-- svg -->
53-
2.1.0<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
53+
v2.1.1<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
5454
<path d="M7 10l5 5 5-5z"></path>
5555
<path d="M0 0h24v24H0z" fill="none"></path>
5656
</svg>
5757
</a>
5858
<ul class="dropdown-content" id="version-dropdown">
59+
<li><a>v2.1.1</a></li>
5960
<li><a>2.1.0</a></li>
6061
<li><a>2.0.4</a></li>
6162
<li><a>2.0.3-alpha</a></li>
@@ -74,9 +75,9 @@ <h4>Color Scheme</h4>
7475
<label>Primary Color</label>
7576
<input type="color" id="color-picker" value="#0000ff" />
7677
</div>
77-
<button id="downloadCss" type="button" class="btn">Download css style</button>
78+
<button id="downloadCss" type="button" class="btn tonal">Download css style</button>
7879
</div>
7980
<div class="modal-footer">
80-
<a href="#!" class="modal-close waves-effect btn-flat">Close</a>
81+
<a href="#!" class="modal-close waves-effect btn text">Close</a>
8182
</div>
8283
</div>

src/main.ts

Lines changed: 62 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
import { config } from "../config.materialize";
2-
import { M } from "@materializecss/materialize";
32
import "./style.scss";
43
//import { argbFromHex, themeFromSourceColor } from "@material/material-color-utilities";
54
import { Themes } from "./themes";
65
import { autocompleteDemoData } from "./data-autocomplete";
76
import hljs from "highlight.js";
7+
import {
8+
Autocomplete,
9+
Carousel,
10+
CharacterCounter,
11+
Chips,
12+
Collapsible,
13+
Datepicker,
14+
Dropdown,
15+
FloatingActionButton,
16+
FormSelect,
17+
Materialbox,
18+
Modal,
19+
Parallax,
20+
Pushpin,
21+
ScrollSpy,
22+
Sidenav,
23+
Slider,
24+
Tabs,
25+
TapTarget,
26+
Timepicker,
27+
Tooltip,
28+
} from "@materializecss/materialize";
829

930
function importCodeStyle(isDarkMode) {
1031
if (isDarkMode) import("highlight.js/styles/atom-one-dark.min.css");
@@ -35,9 +56,7 @@ function escapeHtml(unsafe) {
3556
return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
3657
}
3758

38-
globalThis.M = M;
39-
40-
document.addEventListener("DOMContentLoaded", async function () {
59+
document.addEventListener("DOMContentLoaded", () => {
4160
const themes = new Themes(document);
4261

4362
// CSS > Colors
@@ -59,7 +78,7 @@ document.addEventListener("DOMContentLoaded", async function () {
5978
description: el.description,
6079
url: el.url,
6180
}));
62-
M.Autocomplete.init(<HTMLInputElement>searchInput, {
81+
Autocomplete.init(<HTMLInputElement>searchInput, {
6382
minLength: 1,
6483
data: pages,
6584
onAutocomplete: (items) => {
@@ -102,18 +121,18 @@ document.addEventListener("DOMContentLoaded", async function () {
102121
const indexBanner = document.querySelector("#index-banner");
103122
const tocWrappers = document.querySelectorAll(".toc-wrapper");
104123

105-
if (M.Pushpin) {
124+
if (Pushpin) {
106125
if (nav)
107-
M.Pushpin.init(tocWrappers, {
126+
Pushpin.init(tocWrappers, {
108127
top: nav.getBoundingClientRect().height,
109128
bottom: bottomOffset,
110129
});
111130
else if (indexBanner)
112-
M.Pushpin.init(tocWrappers, {
131+
Pushpin.init(tocWrappers, {
113132
top: indexBanner.getBoundingClientRect().height,
114133
bottom: bottomOffset,
115134
});
116-
else M.Pushpin.init(tocWrappers, { top: 0, bottom: bottomOffset });
135+
else Pushpin.init(tocWrappers, { top: 0, bottom: bottomOffset });
117136
}
118137

119138
// Toggle Flow Text
@@ -156,7 +175,7 @@ document.addEventListener("DOMContentLoaded", async function () {
156175
const contentElem = document.querySelector("#" + navElem.getAttribute("data-target"));
157176
const contentBox = contentElem.getBoundingClientRect();
158177
const offsetTop = Math.floor(contentBox.top + window.scrollY - document.documentElement.clientTop);
159-
M.Pushpin.init(<HTMLElement>navElem, {
178+
Pushpin.init(<HTMLElement>navElem, {
160179
top: offsetTop,
161180
bottom: offsetTop + contentBox.height - navBox.height,
162181
});
@@ -208,8 +227,8 @@ document.addEventListener("DOMContentLoaded", async function () {
208227
themes.setThemePrimaryColor(toggleColorsButton.value);
209228
});
210229
const downloadCssButton = document.querySelector("#downloadCss");
211-
downloadCssButton.addEventListener("click", (e) => {
212-
themes.downloadCss();
230+
downloadCssButton.addEventListener("click", () => {
231+
themes.downloadCss();
213232
});
214233

215234
//---------------------------------------------------------------
@@ -239,91 +258,91 @@ document.addEventListener("DOMContentLoaded", async function () {
239258

240259
//------ Materialize Components
241260

242-
M.Carousel.init(document.querySelectorAll(".carousel"), {});
243-
M.Carousel.init(document.querySelectorAll(".carousel.carousel-slider"), {
261+
Carousel.init(document.querySelectorAll(".carousel"), {});
262+
Carousel.init(document.querySelectorAll(".carousel.carousel-slider"), {
244263
fullWidth: true,
245264
indicators: true,
246265
onCycleTo: () => {},
247266
});
248267

249-
M.Collapsible.init(document.querySelectorAll(".collapsible"), {});
250-
M.Collapsible.init(document.querySelectorAll(".collapsible.expandable"), {
268+
Collapsible.init(document.querySelectorAll(".collapsible"), {});
269+
Collapsible.init(document.querySelectorAll(".collapsible.expandable"), {
251270
accordion: false,
252271
});
253272

254-
M.Dropdown.init(document.querySelectorAll(".dropdown-trigger"), {});
255-
M.Dropdown.init(document.querySelector("#dropdown-demo-left"), {
273+
Dropdown.init(document.querySelectorAll(".dropdown-trigger"), {});
274+
Dropdown.init(document.querySelector("#dropdown-demo-left"), {
256275
alignment: "left",
257276
constrainWidth: false,
258277
});
259-
M.Dropdown.init(document.querySelector("#dropdown-demo-right"), {
278+
Dropdown.init(document.querySelector("#dropdown-demo-right"), {
260279
alignment: "right",
261280
constrainWidth: false,
262281
});
263282

264-
M.Parallax.init(document.querySelectorAll(".parallax"), {});
283+
Parallax.init(document.querySelectorAll(".parallax"), {});
265284

266-
M.Materialbox.init(document.querySelectorAll(".materialboxed"), {});
267-
M.Slider.init(document.querySelectorAll(".slider"), {});
285+
Materialbox.init(document.querySelectorAll(".materialboxed"), {});
286+
Slider.init(document.querySelectorAll(".slider"), {});
268287

269-
M.Modal.init(document.querySelectorAll(".modal"), {});
288+
Modal.init(document.querySelectorAll(".modal"), {});
270289

271-
M.ScrollSpy.init(document.querySelectorAll(".scrollspy"), {});
290+
ScrollSpy.init(document.querySelectorAll(".scrollspy"), {});
272291

273-
M.Datepicker.init(document.querySelectorAll(".datepicker"), {});
292+
Datepicker.init(document.querySelectorAll(".datepicker"), {});
274293

275-
M.Tabs.init(document.querySelectorAll(".tabs"), {});
276-
M.Tabs.init(document.querySelectorAll("#tabs-swipe-demo"), {
294+
Tabs.init(document.querySelectorAll(".tabs"), {});
295+
Tabs.init(document.querySelectorAll("#tabs-swipe-demo"), {
277296
swipeable: true,
278297
});
279298

280-
M.Timepicker.init(document.querySelectorAll(".timepicker"), {});
299+
Timepicker.init(document.querySelectorAll(".timepicker"), {});
281300

282-
M.Tooltip.init(document.querySelectorAll(".tooltipped"), {});
301+
Tooltip.init(document.querySelectorAll(".tooltipped"), {});
283302

284-
M.Sidenav.init(document.querySelectorAll(".sidenav"), {});
303+
Sidenav.init(document.querySelectorAll(".sidenav"), {});
285304

286-
const tts = M.TapTarget.init(document.querySelectorAll(".tap-target"), {});
305+
const tts = TapTarget.init(document.querySelectorAll(".tap-target"), {});
287306
document.querySelector("#open-taptarget")?.addEventListener("click", () => tts[0].open());
288307
document.querySelector("#close-taptarget")?.addEventListener("click", () => tts[0].close());
289308

290-
M.FormSelect.init(document.querySelectorAll("select:not(.disabled)"), {});
309+
FormSelect.init(document.querySelectorAll("select:not(.disabled)"), {});
291310

292-
M.CharacterCounter.init(document.querySelectorAll("[maxlength]"), {});
311+
CharacterCounter.init(document.querySelectorAll("[maxlength]"), {});
293312

294-
M.Autocomplete.init(document.querySelectorAll("input.autocomplete"), {
313+
Autocomplete.init(document.querySelectorAll("input.autocomplete"), {
295314
minLength: 0,
296315
data: autocompleteDemoData,
297316
});
298-
M.Autocomplete.init(document.querySelectorAll("input.autocomplete-multiple"), {
317+
Autocomplete.init(document.querySelectorAll("input.autocomplete-multiple"), {
299318
isMultiSelect: true,
300319
minLength: 1,
301320
data: autocompleteDemoData,
302321
});
303322

304-
M.Chips.init(document.querySelectorAll(".chips"), {});
305-
M.Chips.init(document.querySelectorAll(".chips-initial"), {
323+
Chips.init(document.querySelectorAll(".chips"), {});
324+
Chips.init(document.querySelectorAll(".chips-initial"), {
306325
data: autocompleteDemoData.filter((country) => ["ma", "ta", "er", "ia", "li", "ze"].includes(country.id)),
307326
});
308-
M.Chips.init(document.querySelectorAll(".chips-placeholder"), {
327+
Chips.init(document.querySelectorAll(".chips-placeholder"), {
309328
placeholder: "Enter a tag",
310329
secondaryPlaceholder: "+Tag",
311330
});
312-
M.Chips.init(document.querySelectorAll(".chips-autocomplete"), {
331+
Chips.init(document.querySelectorAll(".chips-autocomplete"), {
313332
autocompleteOptions: {
314333
data: autocompleteDemoData,
315334
},
316335
});
317336

318-
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn"), {});
319-
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.horizontal"), {
337+
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn"), {});
338+
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.horizontal"), {
320339
direction: "left",
321340
});
322-
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.click-to-toggle"), {
341+
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.click-to-toggle"), {
323342
direction: "left",
324343
hoverEnabled: false,
325344
});
326-
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.toolbar"), {
345+
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.toolbar"), {
327346
toolbarEnabled: true,
328347
});
329348
});

0 commit comments

Comments
 (0)