diff --git a/Gemfile b/Gemfile index b80761f88..9f624d853 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,6 @@ source 'https://rubygems.org' group :development, :test do gem 'jekyll', '~> 3.7.0' gem 'jekyll-redirect-from', '~> 0.13.0' - gem 'jekyll-sitemap', '~> 1.1.1' + gem 'jekyll-sitemap', '~> 1.2.0' gem 'jekyll-toc', '~> 0.5.1' end diff --git a/Gemfile.lock b/Gemfile.lock index 28b223ea2..b4e2cccb3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,12 +9,12 @@ GEM eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.5) - ffi (1.9.18) + ffi (1.9.23) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (0.9.1) + i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.7.0) + jekyll (3.7.3) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -29,11 +29,11 @@ GEM safe_yaml (~> 1.0) jekyll-redirect-from (0.13.0) jekyll (~> 3.3) - jekyll-sass-converter (1.5.1) + jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-sitemap (1.1.1) + jekyll-sitemap (1.2.0) jekyll (~> 3.3) - jekyll-toc (0.5.1) + jekyll-toc (0.5.2) nokogiri (~> 1.6) jekyll-watch (2.0.0) listen (~> 3.0) @@ -45,15 +45,15 @@ GEM ruby_dep (~> 1.2) mercenary (0.3.6) mini_portile2 (2.3.0) - nokogiri (1.8.1) + nokogiri (1.8.2) mini_portile2 (~> 2.3.0) pathutil (0.16.1) forwardable-extended (~> 2.6) - public_suffix (3.0.1) - rb-fsevent (0.10.2) + public_suffix (3.0.2) + rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - rouge (3.1.0) + rouge (3.1.1) ruby_dep (1.5.0) safe_yaml (1.0.4) sass (3.5.5) @@ -68,8 +68,8 @@ PLATFORMS DEPENDENCIES jekyll (~> 3.7.0) jekyll-redirect-from (~> 0.13.0) - jekyll-sitemap (~> 1.1.1) + jekyll-sitemap (~> 1.2.0) jekyll-toc (~> 0.5.1) BUNDLED WITH - 1.16.0 + 1.16.1 diff --git a/README.md b/README.md index 09fc3387c..24c11c613 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ daemonite-material/ │ ├── material.min.css │ └── material.min.css.map ├── docs/ -│ └── 4.0/ +│ └── 4.1/ └── js/ ├── material.js ├── material.js.map @@ -69,7 +69,7 @@ Material's documentation, included in this repo in the root directory, is built ### Running documentation locally -1. Run through the [tooling setup](http://daemonite.github.io/material/docs/4.0/getting-started/tooling/#getting-started) to install Jekyll and other Ruby dependencies with `bundle install`. +1. Run through the [tooling setup](http://daemonite.github.io/material/docs/4.1/getting-started/tooling/#getting-started) to install Jekyll and other Ruby dependencies with `bundle install`. 2. Run `npm install` to install Node.js dependencies. 3. Run `npm run dist` and `npm run docs` to rebuild distributed CSS and JavaScript files, as well as docs assets. 4. From the root `/daemonite-material` directory, run `npm run docs-serve` in the command line. diff --git a/_config.yml b/_config.yml index 7fa1dbead..0f6c40e70 100644 --- a/_config.yml +++ b/_config.yml @@ -1,68 +1,75 @@ # dependencies - highlighter: rouge - kramdown: - auto_ids: true - markdown: kramdown +highlighter: rouge +kramdown: + auto_ids: true +markdown: kramdown # permalinks - permalink: pretty +permalink: pretty # plugins - plugins: - - jekyll-redirect-from - - jekyll-sitemap - - jekyll-toc +plugins: + - jekyll-redirect-from + - jekyll-sitemap + - jekyll-toc # server - baseurl: "/material" # workaround for our GitHub Pages hosting - destination: "gh-pages/material" # workaround for our GitHub Pages hosting - encoding: "UTF-8" - exclude: - - .babelrc.js - - .eslintignore - - .git - - .gitignore - - .sass-cache/ - - assets/ - - bower.json - - build/ - - docs-assets/ - - Gemfile - - Gemfile.lock - - gh-pages/ - - lint-vars.sh - - node_modules/ - - package.json - - package-lock.json - - README.md - host: 0.0.0.0 - port: 9999 - source: "." - url: "http://daemonite.github.io/material" +baseurl: "/material" # workaround for our GitHub Pages hosting +destination: "gh-pages/material" # workaround for our GitHub Pages hosting +encoding: "UTF-8" +exclude: + - .babelrc.js + - .eslintignore + - .git + - .gitignore + - .sass-cache/ + - assets/ + - bower.json + - build/ + - docs-assets/ + - Gemfile + - Gemfile.lock + - gh-pages/ + - lint-vars.sh + - node_modules/ + - package.json + - package-lock.json + - README.md +host: 0.0.0.0 +port: 9999 +source: "." +url: "http://daemonite.github.io/material" # social - authors: "Daemonite" - description: "Daemonite's Material UI is a cross-platform and fully responsive front-end interface based on Google Material Design developed using Bootstrap 4." - title: "Material" +authors: "Daemonite" +description: "Daemonite's Material UI is a cross-platform and fully responsive front-end interface based on Google Material Design developed using Bootstrap 4." +title: "Material" + +# toc +toc: + max_level: 4 + min_level: 2 # vars - cdn: - bs_css: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" - bs_css_docs: "https://getbootstrap.com/assets/css/docs.min.css" - bs_js: "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" - bs_js_docs: "https://getbootstrap.com/assets/js/docs.min.js" - jquery: "https://code.jquery.com/jquery-3.2.1.slim.min.js" - jquery_hash: "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" - md_font: "https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i" - md_icon: "https://fonts.googleapis.com/icon?family=Material+Icons" - popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" - popper_hash: "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" - current_version: "4.0.0" - docs_version: "4.0" - download: - source: "https://github.com/Daemonite/material/archive/v4.0.0.zip" - dist: "https://github.com/Daemonite/material/releases/download/v4.0.0/material-4.0.0-dist.zip" - id: - navbar: "doc-navbar" - navdrawer: "doc-navdrawer" - repo: "https://github.com/Daemonite/material" +cdn: + bs_css: "https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" + bs_css_docs: "https://getbootstrap.com/assets/css/docs.min.css" + bs_css_hash: "sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" + bs_js: "https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" + bs_js_docs: "https://getbootstrap.com/assets/js/docs.min.js" + bs_js_hash: "sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" + jquery: "https://code.jquery.com/jquery-3.3.1.slim.min.js" + jquery_hash: "sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" + md_font: "https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i|Roboto+Mono:300,400,700|Roboto+Slab:300,400,700" + md_icon: "https://fonts.googleapis.com/icon?family=Material+Icons" + popper: "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" + popper_hash: "sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" +current_version: "4.1.0" +docs_version: "4.1" +download: + source: "https://github.com/Daemonite/material/archive/v4.1.0.zip" + dist: "https://github.com/Daemonite/material/releases/download/v4.1.0/material-4.1.0-dist.zip" +id: + navbar: "doc-navbar" + navdrawer: "doc-navdrawer" +repo: "https://github.com/Daemonite/material" diff --git a/_data/nav.yml b/_data/nav.yml index d4cfc71b5..4e6fec3b9 100644 --- a/_data/nav.yml +++ b/_data/nav.yml @@ -1,6 +1,7 @@ - title: Getting started pages: - title: Introduction + - title: Migration - title: Theming - title: Tooling @@ -55,6 +56,7 @@ - title: Image replacement - title: Position - title: Screenreaders + - title: Shadows - title: Sizing - title: Spacing - title: Text @@ -66,6 +68,7 @@ - title: Buttons - title: Cards - title: Chips + - title: Colours - title: Data tables - title: Dialogs - title: Expansion panels @@ -75,6 +78,8 @@ - title: Pickers - title: Progress - title: Selection controls + - title: Shadows + - title: Snackbars - title: Steppers - title: Tabs - title: Text fields diff --git a/_includes/callout-danger-async-methods.md b/_includes/callout-danger-async-methods.md index f7a76aa4d..5f83c2d8e 100644 --- a/_includes/callout-danger-async-methods.md +++ b/_includes/callout-danger-async-methods.md @@ -1,7 +1,8 @@ -{% callout danger %} +{% capture callout %} #### Asynchronous methods and transitions All API methods are **asynchronous** and start a **transition**. They returns to the caller as soon as the transition is started but **before it ends**. In addition, a method call on a **transitioning component will be ignored**. [See our Javascript documentation for more informations.]({{ site.baseurl }}/getting-started/javascript/#content) -{% endcallout %} +{% endcapture %} +{% include callout.html content=callout type="danger" %} \ No newline at end of file diff --git a/_includes/callout-info-mediaqueries-breakpoints.md b/_includes/callout-info-mediaqueries-breakpoints.md index ddf2b3745..732102f37 100644 --- a/_includes/callout-info-mediaqueries-breakpoints.md +++ b/_includes/callout-info-mediaqueries-breakpoints.md @@ -1,3 +1,4 @@ -{% callout info %} +{% capture callout %} Note that since browsers do not currently support [range context queries](https://www.w3.org/TR/mediaqueries-4/#range-context), we work around the limitations of [`min-` and `max-` prefixes](https://www.w3.org/TR/mediaqueries-4/#mq-min-max) and viewports with fractional widths (which can occur under certain conditions on high-dpi devices, for instance) by using values with higher precision for these comparisons. -{% endcallout %} \ No newline at end of file +{% endcapture %} +{% include callout.html content=callout type="info" %} \ No newline at end of file diff --git a/_includes/callout-warning-color-assistive-technologies.md b/_includes/callout-warning-color-assistive-technologies.md index 1c937a805..46d987a5f 100644 --- a/_includes/callout-warning-color-assistive-technologies.md +++ b/_includes/callout-warning-color-assistive-technologies.md @@ -1,5 +1,6 @@ -{% callout warning %} +{% capture callout %} ### Conveying meaning to assistive technologies Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.sr-only` class. -{% endcallout %} \ No newline at end of file +{% endcapture %} +{% include callout.html content=callout type="info" %} \ No newline at end of file diff --git a/_includes/callout.html b/_includes/callout.html new file mode 100644 index 000000000..ff9450dc4 --- /dev/null +++ b/_includes/callout.html @@ -0,0 +1,9 @@ +{%- comment -%} +Usage: {% include callout.html content=callout type="type" %}, +where content is a capture with the content +and type is one of: info (default), danger, warning +{%- endcomment -%} +{%- assign css_class = include.type | default: "info" -%} +
+ {{- include.content | markdownify -}} +
diff --git a/_includes/example.html b/_includes/example.html new file mode 100644 index 000000000..24d12626b --- /dev/null +++ b/_includes/example.html @@ -0,0 +1,23 @@ +{%- comment -%} +Usage: {% include example.html content=markup %}, +where content is a capture with the HTML content +id - null (default) +class - "bd-example" (default) +optional: hide_preview - disabled (default) +optional: hide_markup - disabled (default) +{%- endcomment -%} + +{%- assign preview_id = include.id -%} +{%- assign preview_class = include.class -%} + +{%- if include.hide_preview == null -%} + + {{- include.content -}} + +{%- endif -%} + +{%- if include.hide_markup == null -%} + {%- highlight html -%} + {{- include.content | replace: 'data-src="holder.js', 'src="...' -}} + {%- endhighlight -%} +{%- endif -%} diff --git a/_includes/footer.html b/_includes/footer.html index 6b1286855..b3d137b15 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,7 +1,7 @@ - - - + + + diff --git a/_includes/nav-navdrawer.html b/_includes/nav-navdrawer.html index ba13959c3..3a73d566e 100644 --- a/_includes/nav-navdrawer.html +++ b/_includes/nav-navdrawer.html @@ -1,55 +1,65 @@ - -{% endexample %} +{% endcapture %} +{% include example.html content=example %} -{% example html %} +{% capture example %}
@@ -146,7 +167,8 @@ If you want to have `` elements in your form styled as plain tex
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ## Checkboxes and radios @@ -160,7 +182,7 @@ Checkboxes and radios use are built to support HTML-based form validation and pr By default, any number of checkboxes and radios that are immediate sibling will be vertically stacked and appropriately spaced with `.form-check`. -{% example html %} +{% capture example %}
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} -{% example html %} +{% capture example %}
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ### Inline Group checkboxes or radios on the same horizontal row by adding `.form-check-inline` to any `.form-check`. -{% example html %} +{% capture example %}
@@ -213,9 +237,10 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} -{% example html %} +{% capture example %}
@@ -228,20 +253,22 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ### Without labels Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`). -{% example html %} +{% capture example %}
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ## Layout @@ -251,7 +278,7 @@ Since Bootstrap applies `display: block` and `width: 100%` to almost all our for The `.form-group` class is the easiest way to add some structure to forms. It provides a flexible class that encourages proper grouping of labels, controls, optional help text, and form validation messaging. By default it only applies `margin-bottom`, but it picks up additional styles in `.form-inline` as needed. Use it with `
`s, `
`s, or nearly any other element. -{% example html %} +{% capture example %}
@@ -262,13 +289,14 @@ The `.form-group` class is the easiest way to add some structure to forms. It pr
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ### Form grid More complex forms can be built using our grid classes. Use these for form layouts that require multiple columns, varied widths, and additional alignment options. -{% example html %} +{% capture example %}
@@ -279,13 +307,14 @@ More complex forms can be built using our grid classes. Use these for form layou
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} #### Form row You may also swap `.row` for `.form-row`, a variation of our standard grid row that overrides the default column gutters for tighter and more compact layouts. -{% example html %} +{% capture example %}
@@ -296,11 +325,12 @@ You may also swap `.row` for `.form-row`, a variation of our standard grid row t
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} More complex layouts can also be created with the grid system. -{% example html %} +{% capture example %}
@@ -347,7 +377,8 @@ More complex layouts can also be created with the grid system.
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} #### Horizontal form @@ -355,7 +386,7 @@ Create horizontal forms with the grid by adding the `.row` class to form groups At times, you maybe need to use margin or padding utilities to create that perfect alignment you need. For example, we've removed the `padding-top` on our stacked radio inputs label to better align the text baseline. -{% example html %} +{% capture example %}
@@ -411,13 +442,14 @@ At times, you maybe need to use margin or padding utilities to create that perfe
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ##### Horizontal form label sizing Be sure to use `.col-form-label-sm` or `.col-form-label-lg` to your `
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} #### Column sizing As shown in the previous examples, our grid system allows you to place any number of `.col`s within a `.row` or `.form-row`. They'll split the available width equally between them. You may also pick a subset of your columns to take up more or less space, while the remaining `.col`s equally split the rest, with specific column classes like `.col-7`. -{% example html %} +{% capture example %}
@@ -458,13 +491,14 @@ As shown in the previous examples, our grid system allows you to place any numbe
-{% endexample html %} +{% endcapture %} +{% include example.html content=example %} #### Auto-sizing The example below uses a flexbox utility to vertically center the contents and changes `.col` to `.col-auto` so that your columns only take up as much space as needed. Put another way, the column sizes itself based on the contents. -{% example html %} +{% capture example %}
@@ -493,11 +527,12 @@ The example below uses a flexbox utility to vertically center the contents and c
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} You can then remix that once again with size-specific column classes. -{% example html %} +{% capture example %}
@@ -526,11 +561,12 @@ You can then remix that once again with size-specific column classes.
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} And of course [custom form controls](#custom-forms) are supported. -{% example html %} +{% capture example %}
@@ -553,7 +589,8 @@ And of course [custom form controls](#custom-forms) are supported.
-{% endexample %} +{% endcapture %} +{% include example.html content=example %} ### Inline forms @@ -565,7 +602,7 @@ Use the `.form-inline` class to display a series of labels, form controls, and b You may need to manually address the width and alignment of individual form controls with [spacing utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/spacing/) (as shown below). Lastly, be sure to always include a `