Skip to content

Release 2.1.1 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: release 2.1.1
  • Loading branch information
wuda-io committed Sep 26, 2024
commit f44a861bf4b1a9bcc1dd6f21d4a6048a0afab3d3
14 changes: 7 additions & 7 deletions getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h5>Materialize</h5>
tabindex="0"
id="download-source"
class="btn filled waves-effect waves-light icon-right"
href="https://github.com/materializecss/materialize/releases/download/2.1.0/materialize-v2.1.0.zip"
href="https://github.com/materializecss/materialize/releases/download/v2.1.1/materialize-v2.1.1.zip"
>
Materialize<i class="material-icons">file_download</i>
</a>
Expand All @@ -46,7 +46,7 @@ <h5>Sass</h5>
tabindex="0"
id="download-sass"
class="btn outlined waves-effect waves-light icon-right"
href="https://github.com/materializecss/materialize/releases/download/2.1.0/materialize-src-v2.1.0.zip"
href="https://github.com/materializecss/materialize/releases/download/v2.1.1/materialize-src-v2.1.1.zip"
>
Source<i class="material-icons right">file_download</i>
</a>
Expand All @@ -55,10 +55,10 @@ <h5>Sass</h5>

<div class="is-closed" id="download-thanks">
<div class="card p-3 mt-3">
<p class="primary-text"><b>Thank you for downloading!</b></p>
<p class="m-0 primary-text"><b>Support our work</b></p>
<p class="caption">
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
our work.
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
giving us a star or support our work.
</p>
<div class="row">
<a href="https://github.com/materializecss/materialize" target="_blank">
Expand All @@ -80,9 +80,9 @@ <h5>CDN</h5>
<span class="copyMessage">Copied!</span>
<i class="material-icons copyButton">content_copy</i>
<code class="language-html copiedText"><xmp><!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.0/dist/css/materialize.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.1/dist/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.0/dist/js/materialize.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@materializecss/materialize@2.1.1/dist/js/materialize.min.js"></script>
</xmp></code></pre>
</div>
<div class="col s12">
Expand Down
2 changes: 1 addition & 1 deletion packages/materialize
Submodule materialize updated 85 files
+8 −1 .eslintrc
+1 −0 .github/workflows/nightly.yml
+6 −17 .gitignore
+1 −3 .prettierignore
+1 −1 FOR_MAINTAINERS.md
+0 −292 Gruntfile.js
+35 −0 ci/compress.js
+0 −0 ci/empty.js
+223 −758 dist/css/materialize.css
+7 −5 dist/css/materialize.min.css
+1 −0 dist/css/materialize.min.css.map
+7,593 −0 dist/js/materialize.cjs.js
+2,333 −0 dist/js/materialize.d.ts
+6,416 −6,532 dist/js/materialize.js
+5 −6 dist/js/materialize.min.js
+0 −1 dist/js/materialize.min.js.map
+7,563 −0 dist/js/materialize.mjs
+41 −0 index.html
+6 −0 index.js
+29 −0 index.mjs
+2,220 −7,919 package-lock.json
+26 −26 package.json
+186 −0 rollup.config.ts
+11 −8 sass/components/_dropdown.scss
+11 −9 sass/components/_grid.scss
+2 −2 sass/components/_tapTarget.scss
+2 −22 sass/components/forms/_select.scss
+38 −82 spec/helpers/helper.js
+27 −0 spec/support/jasmine-browser.mjs
+267 −0 spec/tests/autocomplete/autocompleteSpec.js
+215 −0 spec/tests/cards/cardsSpec.js
+43 −0 spec/tests/carousel/carouselSpec.js
+33 −37 spec/tests/chips/chipsSpec.js
+98 −54 spec/tests/collapsible/collapsibleSpec.js
+22 −31 spec/tests/datepicker/datepickerSpec.js
+110 −0 spec/tests/dropdown/dropdownSpec.js
+32 −12 spec/tests/fab/fabSpec.js
+98 −17 spec/tests/forms/formsSpec.js
+39 −0 spec/tests/materialbox/materialboxSpec.js
+80 −51 spec/tests/modal/modalSpec.js
+392 −0 spec/tests/select/selectSpec.js
+53 −55 spec/tests/sidenav/sidenavSpec.js
+101 −0 spec/tests/slider/sliderSpec.js
+56 −44 spec/tests/tabs/tabsSpec.js
+82 −0 spec/tests/toast/toastSpec.js
+147 −0 spec/tests/tooltip/tooltipSpec.js
+7 −4 src/autocomplete.ts
+1 −2 src/cards.ts
+1 −0 src/chips.ts
+1 −0 src/dropdown.ts
+20 −20 src/forms.ts
+0 −114 src/global.ts
+98 −2 src/index.ts
+17 −0 src/modal.ts
+2 −1 src/range.ts
+27 −62 src/select.ts
+1 −1 src/slider.ts
+15 −15 src/waves.ts
+0 −18 tests/spec/autocomplete/autocompleteFixture.html
+0 −146 tests/spec/autocomplete/autocompleteSpec.js
+0 −80 tests/spec/cards/cardsFixture.html
+0 −149 tests/spec/cards/cardsSpec.js
+0 −14 tests/spec/carousel/carouselFixture.html
+0 −31 tests/spec/carousel/carouselSpec.js
+0 −4 tests/spec/chips/chipsFixture.html
+0 −59 tests/spec/collapsible/collapsible.html
+0 −6 tests/spec/datepicker/datepickerFixture.html
+0 −42 tests/spec/dropdown/dropdownFixture.html
+0 −88 tests/spec/dropdown/dropdownSpec.js
+0 −77 tests/spec/fab/fabSpec.js
+0 −56 tests/spec/forms/formsFixture.html
+0 −3 tests/spec/materialbox/materialboxFixture.html
+0 −35 tests/spec/materialbox/materialboxSpec.js
+0 −44 tests/spec/modal/modalFixture.html
+0 −53 tests/spec/select/selectFixture.html
+0 −329 tests/spec/select/selectSpec.js
+0 −16 tests/spec/sidenav/sidenavFixture.html
+0 −36 tests/spec/slider/sliderFixture.html
+0 −76 tests/spec/slider/sliderSpec.js
+0 −22 tests/spec/tabs/tabsFixture.html
+0 −66 tests/spec/toast/toastSpec.js
+0 −33 tests/spec/tooltip/tooltipFixture.html
+0 −126 tests/spec/tooltip/tooltipSpec.js
+16 −14 tsconfig.json
+0 −38 webpack.config.js
7 changes: 4 additions & 3 deletions partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@
<li class="version">
<a class="dropdown-trigger" href="#" data-target="version-dropdown">
<!-- svg -->
2.1.0<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
v2.1.1<svg class="caret" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M7 10l5 5 5-5z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>
</a>
<ul class="dropdown-content" id="version-dropdown">
<li><a>v2.1.1</a></li>
<li><a>2.1.0</a></li>
<li><a>2.0.4</a></li>
<li><a>2.0.3-alpha</a></li>
Expand All @@ -74,9 +75,9 @@ <h4>Color Scheme</h4>
<label>Primary Color</label>
<input type="color" id="color-picker" value="#0000ff" />
</div>
<button id="downloadCss" type="button" class="btn">Download css style</button>
<button id="downloadCss" type="button" class="btn tonal">Download css style</button>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect btn-flat">Close</a>
<a href="#!" class="modal-close waves-effect btn text">Close</a>
</div>
</div>
105 changes: 62 additions & 43 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
import { config } from "../config.materialize";
import { M } from "@materializecss/materialize";
import "./style.scss";
//import { argbFromHex, themeFromSourceColor } from "@material/material-color-utilities";
import { Themes } from "./themes";
import { autocompleteDemoData } from "./data-autocomplete";
import hljs from "highlight.js";
import {
Autocomplete,
Carousel,
CharacterCounter,
Chips,
Collapsible,
Datepicker,
Dropdown,
FloatingActionButton,
FormSelect,
Materialbox,
Modal,
Parallax,
Pushpin,
ScrollSpy,
Sidenav,
Slider,
Tabs,
TapTarget,
Timepicker,
Tooltip,
} from "@materializecss/materialize";

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

globalThis.M = M;

document.addEventListener("DOMContentLoaded", async function () {
document.addEventListener("DOMContentLoaded", () => {
const themes = new Themes(document);

// CSS > Colors
Expand All @@ -59,7 +78,7 @@ document.addEventListener("DOMContentLoaded", async function () {
description: el.description,
url: el.url,
}));
M.Autocomplete.init(<HTMLInputElement>searchInput, {
Autocomplete.init(<HTMLInputElement>searchInput, {
minLength: 1,
data: pages,
onAutocomplete: (items) => {
Expand Down Expand Up @@ -102,18 +121,18 @@ document.addEventListener("DOMContentLoaded", async function () {
const indexBanner = document.querySelector("#index-banner");
const tocWrappers = document.querySelectorAll(".toc-wrapper");

if (M.Pushpin) {
if (Pushpin) {
if (nav)
M.Pushpin.init(tocWrappers, {
Pushpin.init(tocWrappers, {
top: nav.getBoundingClientRect().height,
bottom: bottomOffset,
});
else if (indexBanner)
M.Pushpin.init(tocWrappers, {
Pushpin.init(tocWrappers, {
top: indexBanner.getBoundingClientRect().height,
bottom: bottomOffset,
});
else M.Pushpin.init(tocWrappers, { top: 0, bottom: bottomOffset });
else Pushpin.init(tocWrappers, { top: 0, bottom: bottomOffset });
}

// Toggle Flow Text
Expand Down Expand Up @@ -156,7 +175,7 @@ document.addEventListener("DOMContentLoaded", async function () {
const contentElem = document.querySelector("#" + navElem.getAttribute("data-target"));
const contentBox = contentElem.getBoundingClientRect();
const offsetTop = Math.floor(contentBox.top + window.scrollY - document.documentElement.clientTop);
M.Pushpin.init(<HTMLElement>navElem, {
Pushpin.init(<HTMLElement>navElem, {
top: offsetTop,
bottom: offsetTop + contentBox.height - navBox.height,
});
Expand Down Expand Up @@ -208,8 +227,8 @@ document.addEventListener("DOMContentLoaded", async function () {
themes.setThemePrimaryColor(toggleColorsButton.value);
});
const downloadCssButton = document.querySelector("#downloadCss");
downloadCssButton.addEventListener("click", (e) => {
themes.downloadCss();
downloadCssButton.addEventListener("click", () => {
themes.downloadCss();
});

//---------------------------------------------------------------
Expand Down Expand Up @@ -239,91 +258,91 @@ document.addEventListener("DOMContentLoaded", async function () {

//------ Materialize Components

M.Carousel.init(document.querySelectorAll(".carousel"), {});
M.Carousel.init(document.querySelectorAll(".carousel.carousel-slider"), {
Carousel.init(document.querySelectorAll(".carousel"), {});
Carousel.init(document.querySelectorAll(".carousel.carousel-slider"), {
fullWidth: true,
indicators: true,
onCycleTo: () => {},
});

M.Collapsible.init(document.querySelectorAll(".collapsible"), {});
M.Collapsible.init(document.querySelectorAll(".collapsible.expandable"), {
Collapsible.init(document.querySelectorAll(".collapsible"), {});
Collapsible.init(document.querySelectorAll(".collapsible.expandable"), {
accordion: false,
});

M.Dropdown.init(document.querySelectorAll(".dropdown-trigger"), {});
M.Dropdown.init(document.querySelector("#dropdown-demo-left"), {
Dropdown.init(document.querySelectorAll(".dropdown-trigger"), {});
Dropdown.init(document.querySelector("#dropdown-demo-left"), {
alignment: "left",
constrainWidth: false,
});
M.Dropdown.init(document.querySelector("#dropdown-demo-right"), {
Dropdown.init(document.querySelector("#dropdown-demo-right"), {
alignment: "right",
constrainWidth: false,
});

M.Parallax.init(document.querySelectorAll(".parallax"), {});
Parallax.init(document.querySelectorAll(".parallax"), {});

M.Materialbox.init(document.querySelectorAll(".materialboxed"), {});
M.Slider.init(document.querySelectorAll(".slider"), {});
Materialbox.init(document.querySelectorAll(".materialboxed"), {});
Slider.init(document.querySelectorAll(".slider"), {});

M.Modal.init(document.querySelectorAll(".modal"), {});
Modal.init(document.querySelectorAll(".modal"), {});

M.ScrollSpy.init(document.querySelectorAll(".scrollspy"), {});
ScrollSpy.init(document.querySelectorAll(".scrollspy"), {});

M.Datepicker.init(document.querySelectorAll(".datepicker"), {});
Datepicker.init(document.querySelectorAll(".datepicker"), {});

M.Tabs.init(document.querySelectorAll(".tabs"), {});
M.Tabs.init(document.querySelectorAll("#tabs-swipe-demo"), {
Tabs.init(document.querySelectorAll(".tabs"), {});
Tabs.init(document.querySelectorAll("#tabs-swipe-demo"), {
swipeable: true,
});

M.Timepicker.init(document.querySelectorAll(".timepicker"), {});
Timepicker.init(document.querySelectorAll(".timepicker"), {});

M.Tooltip.init(document.querySelectorAll(".tooltipped"), {});
Tooltip.init(document.querySelectorAll(".tooltipped"), {});

M.Sidenav.init(document.querySelectorAll(".sidenav"), {});
Sidenav.init(document.querySelectorAll(".sidenav"), {});

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

M.FormSelect.init(document.querySelectorAll("select:not(.disabled)"), {});
FormSelect.init(document.querySelectorAll("select:not(.disabled)"), {});

M.CharacterCounter.init(document.querySelectorAll("[maxlength]"), {});
CharacterCounter.init(document.querySelectorAll("[maxlength]"), {});

M.Autocomplete.init(document.querySelectorAll("input.autocomplete"), {
Autocomplete.init(document.querySelectorAll("input.autocomplete"), {
minLength: 0,
data: autocompleteDemoData,
});
M.Autocomplete.init(document.querySelectorAll("input.autocomplete-multiple"), {
Autocomplete.init(document.querySelectorAll("input.autocomplete-multiple"), {
isMultiSelect: true,
minLength: 1,
data: autocompleteDemoData,
});

M.Chips.init(document.querySelectorAll(".chips"), {});
M.Chips.init(document.querySelectorAll(".chips-initial"), {
Chips.init(document.querySelectorAll(".chips"), {});
Chips.init(document.querySelectorAll(".chips-initial"), {
data: autocompleteDemoData.filter((country) => ["ma", "ta", "er", "ia", "li", "ze"].includes(country.id)),
});
M.Chips.init(document.querySelectorAll(".chips-placeholder"), {
Chips.init(document.querySelectorAll(".chips-placeholder"), {
placeholder: "Enter a tag",
secondaryPlaceholder: "+Tag",
});
M.Chips.init(document.querySelectorAll(".chips-autocomplete"), {
Chips.init(document.querySelectorAll(".chips-autocomplete"), {
autocompleteOptions: {
data: autocompleteDemoData,
},
});

M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn"), {});
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.horizontal"), {
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn"), {});
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.horizontal"), {
direction: "left",
});
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.click-to-toggle"), {
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.click-to-toggle"), {
direction: "left",
hoverEnabled: false,
});
M.FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.toolbar"), {
FloatingActionButton.init(document.querySelectorAll(".fixed-action-btn.toolbar"), {
toolbarEnabled: true,
});
});
Loading