commit 2c3e91dae40cbaf1b627486dd87331a693cc3270 Author: Denys Konovalov Date: Tue Aug 15 17:02:21 2023 +0200 initial commit diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9f18003 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2020 StaticMania + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e036333 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +

Portio Hugo

+screenshot + +Portio is a simple, minimal and responsive Portfolio Hugo Theme. Portio is well organized, well-formatted and named accordingly so it’s easy to change any and all of the design. Portio is built with Bootstrap 4. You can customize it very easy to fit your needs. + +## Table of Contents + +- [Live Demo](#live-demo) +- [Installation](#installation) +- [Main Features](#features) +- [Support](#support) +- [Licensing](#licensing) +- [Hire](#hire) + +## Live Demo + +Checkout the live demo [here](https://portio-hugo.staticmania.com/) + +## Installation + +1. Add the repository into your Hugo Project repository as a submodule, `git submodule add https://github.com/StaticMania/portio-hugo themes/portio`. +2. Copy the `.forestry`, `data`, `content`, `static`, `resources` & `config.toml` files from the `exampleSite` directory and paste it on you Hugo Project repository/directory. From the site home directory: + + cp -a themes/portio/exampleSite/\* . + +3. Build your site with `hugo serve` and see the result at `http://localhost:1313/`. + +**Make sure to use Hugo Extended to serve/build your site, as else the SASS/SCSS won't be rendered correctly** + +## Features + +- Responsive Ready. +- Powered by Bootstrap 4. +- Blog Support. +- Well formatted code. +- Easy Customization. +- FabForm.io [static website form](https://fabform.io). +- Google Analytics. +- Forestry Integrated. +- Crafted for Personal Portfolio + +## Support + +Have some question or facing any technical trouble feel free to [Contact Us](https://staticmania.com/contact/) + +## Licensing + +This Repository is licensed under the [MIT](https://github.com/StaticMania/portio-hugo/blob/master/LICENSE) License + +## Hire + +Need help to build HUGO websites with your custom requirements. Feel free to [contact](https://staticmania.com/contact/) us. We provide custom development service for HUGO. diff --git a/assets/bootstrap-4.5.2/.babelrc.js b/assets/bootstrap-4.5.2/.babelrc.js new file mode 100644 index 0000000..1d6404e --- /dev/null +++ b/assets/bootstrap-4.5.2/.babelrc.js @@ -0,0 +1,17 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + loose: true, + bugfixes: true, + modules: false + } + ] + ], + env: { + test: { + plugins: [ 'istanbul' ] + } + } +}; diff --git a/assets/bootstrap-4.5.2/.browserslistrc b/assets/bootstrap-4.5.2/.browserslistrc new file mode 100644 index 0000000..1bfd197 --- /dev/null +++ b/assets/bootstrap-4.5.2/.browserslistrc @@ -0,0 +1,13 @@ +# https://github.com/browserslist/browserslist#readme + +>= 1% +last 1 major version +not dead +Chrome >= 45 +Firefox >= 38 +Edge >= 12 +Explorer >= 10 +iOS >= 9 +Safari >= 9 +Android >= 4.4 +Opera >= 30 diff --git a/assets/bootstrap-4.5.2/.bundlewatch.config.json b/assets/bootstrap-4.5.2/.bundlewatch.config.json new file mode 100644 index 0000000..e12dda9 --- /dev/null +++ b/assets/bootstrap-4.5.2/.bundlewatch.config.json @@ -0,0 +1,50 @@ +{ + "files": [ + { + "path": "./dist/css/bootstrap-grid.css", + "maxSize": "7 kB" + }, + { + "path": "./dist/css/bootstrap-grid.min.css", + "maxSize": "6.25 kB" + }, + { + "path": "./dist/css/bootstrap-reboot.css", + "maxSize": "2 kB" + }, + { + "path": "./dist/css/bootstrap-reboot.min.css", + "maxSize": "2 kB" + }, + { + "path": "./dist/css/bootstrap.css", + "maxSize": "25.5 kB" + }, + { + "path": "./dist/css/bootstrap.min.css", + "maxSize": "23.5 kB" + }, + { + "path": "./dist/js/bootstrap.bundle.js", + "maxSize": "47.50 kB" + }, + { + "path": "./dist/js/bootstrap.bundle.min.js", + "maxSize": "21.5 kB" + }, + { + "path": "./dist/js/bootstrap.js", + "maxSize": "25 kB" + }, + { + "path": "./dist/js/bootstrap.min.js", + "maxSize": "14.75 kB" + } + ], + "ci": { + "trackBranches": [ + "main", + "v4-dev" + ] + } +} diff --git a/assets/bootstrap-4.5.2/.editorconfig b/assets/bootstrap-4.5.2/.editorconfig new file mode 100644 index 0000000..9d5248e --- /dev/null +++ b/assets/bootstrap-4.5.2/.editorconfig @@ -0,0 +1,14 @@ +# editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/assets/bootstrap-4.5.2/.eslintignore b/assets/bootstrap-4.5.2/.eslintignore new file mode 100644 index 0000000..9eb685c --- /dev/null +++ b/assets/bootstrap-4.5.2/.eslintignore @@ -0,0 +1,6 @@ +**/*.min.js +**/dist/ +**/vendor/ +/_gh_pages/ +/js/coverage/ +/package.js diff --git a/assets/bootstrap-4.5.2/.eslintrc.json b/assets/bootstrap-4.5.2/.eslintrc.json new file mode 100644 index 0000000..d61d2f9 --- /dev/null +++ b/assets/bootstrap-4.5.2/.eslintrc.json @@ -0,0 +1,231 @@ +{ + "root": true, + "parser": "babel-eslint", + "env": { + "browser": true, + "es6": true + }, + "extends": ["eslint:recommended"], + "rules": { + // Possible Errors + "no-await-in-loop": "error", + "no-extra-parens": "error", + "no-prototype-builtins": "error", + "no-template-curly-in-string": "error", + "valid-jsdoc": "error", + + // Best Practices + "accessor-pairs": "error", + "array-callback-return": "error", + "block-scoped-var": "error", + "class-methods-use-this": "off", + "complexity": "error", + "consistent-return": "error", + "curly": "error", + "default-case": "error", + "dot-location": ["error", "property"], + "dot-notation": "error", + "eqeqeq": "error", + "guard-for-in": "error", + "no-alert": "error", + "no-caller": "error", + "no-console": "error", + "no-div-regex": "error", + "no-else-return": "error", + "no-empty-function": "error", + "no-eq-null": "error", + "no-eval": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-label": "error", + "no-floating-decimal": "error", + "no-implicit-coercion": "error", + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-invalid-this": "off", + "no-iterator": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-loop-func": "error", + "no-magic-numbers": ["error", { + "ignore": [-1, 0, 1], + "ignoreArrayIndexes": true + } + ], + "no-multi-spaces": ["error", { + "ignoreEOLComments": true, + "exceptions": { + "AssignmentExpression": true, + "ArrowFunctionExpression": true, + "CallExpression": true, + "VariableDeclarator": true + } + } + ], + "no-multi-str": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-wrappers": "error", + "no-octal-escape": "error", + "no-param-reassign": "off", + "no-proto": "error", + "no-restricted-properties": "error", + "no-return-assign": "error", + "no-return-await": "error", + "no-script-url": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-throw-literal": "error", + "no-unmodified-loop-condition": "error", + "no-unused-expressions": "error", + "no-useless-call": "error", + "no-useless-concat": "error", + "no-useless-return": "error", + "no-void": "error", + "no-warning-comments": "off", + "no-with": "error", + "prefer-promise-reject-errors": "error", + "radix": "error", + "require-await": "error", + "vars-on-top": "error", + "wrap-iife": "error", + "yoda": "error", + + // Strict Mode + "strict": "error", + + // Variables + "init-declarations": "off", + "no-catch-shadow": "error", + "no-label-var": "error", + "no-restricted-globals": "error", + "no-shadow": "off", + "no-shadow-restricted-names": "error", + "no-undef-init": "error", + "no-use-before-define": "off", + + // Node.js and CommonJS + "callback-return": "off", + "global-require": "error", + "handle-callback-err": "error", + "no-mixed-requires": "error", + "no-new-require": "error", + "no-path-concat": "error", + "no-process-exit": "error", + "no-restricted-modules": "error", + "no-sync": "error", + + // Stylistic Issues + "array-bracket-spacing": "error", + "block-spacing": "error", + "brace-style": "error", + "camelcase": "error", + "capitalized-comments": "off", + "comma-dangle": "error", + "comma-spacing": "error", + "comma-style": "error", + "computed-property-spacing": "error", + "consistent-this": "error", + "eol-last": "error", + "func-call-spacing": "error", + "func-name-matching": "error", + "func-names": "off", + "func-style": ["error", "declaration"], + "id-blacklist": "error", + "id-length": "off", + "id-match": "error", + "indent": ["error", 2, { "SwitchCase": 1 }], + "jsx-quotes": "error", + "key-spacing": "off", + "keyword-spacing": "error", + "linebreak-style": ["error", "unix"], + "line-comment-position": "off", + "lines-around-comment": "off", + "lines-around-directive": "error", + "max-depth": ["error", 10], + "max-len": "off", + "max-lines": "off", + "max-nested-callbacks": "error", + "max-params": "off", + "max-statements": "off", + "max-statements-per-line": "error", + "multiline-ternary": "off", + "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }], + "newline-after-var": "off", + "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }], + "new-parens": "error", + "no-array-constructor": "error", + "no-bitwise": "error", + "no-continue": "off", + "no-inline-comments": "off", + "no-lonely-if": "error", + "no-mixed-operators": "off", + "no-multi-assign": "error", + "no-multiple-empty-lines": "error", + "nonblock-statement-body-position": "error", + "no-negated-condition": "off", + "no-nested-ternary": "error", + "no-new-object": "error", + "no-plusplus": "off", + "no-restricted-syntax": "error", + "no-tabs": "error", + "no-ternary": "off", + "no-trailing-spaces": "error", + "no-underscore-dangle": "off", + "no-unneeded-ternary": "error", + "no-whitespace-before-property": "error", + "object-curly-spacing": ["error", "always"], + "object-property-newline": "error", + "one-var": ["error", "never"], + "one-var-declaration-per-line": "error", + "operator-assignment": "error", + "operator-linebreak": "error", + "padded-blocks": ["error", "never"], + "padding-line-between-statements": "off", + "quote-props": ["error", "as-needed"], + "quotes": ["error", "single"], + "require-jsdoc": "off", + "semi": ["error", "never"], + "semi-spacing": "error", + "sort-keys": "off", + "sort-vars": "error", + "space-before-blocks": "error", + "space-before-function-paren": ["error", { + "anonymous": "always", + "named": "never" + }], + "space-in-parens": "error", + "space-infix-ops": "error", + "space-unary-ops": "error", + "spaced-comment": "error", + "template-tag-spacing": "error", + "unicode-bom": "error", + "wrap-regex": "off", + + // ECMAScript 6 + "arrow-body-style": ["error", "as-needed"], + "arrow-parens": "error", + "arrow-spacing": "error", + "generator-star-spacing": "error", + "no-confusing-arrow": "error", + "no-duplicate-imports": "error", + "no-restricted-imports": "error", + "no-useless-computed-key": "error", + "no-useless-constructor": "error", + "no-useless-rename": "error", + "no-var": "error", + "object-shorthand": "error", + "prefer-arrow-callback": "error", + "prefer-const": "error", + "prefer-destructuring": "off", + "prefer-numeric-literals": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "rest-spread-spacing": "error", + "sort-imports": "error", + "symbol-description": "error", + "template-curly-spacing": "error", + "yield-star-spacing": "error" + } +} diff --git a/assets/bootstrap-4.5.2/.gitattributes b/assets/bootstrap-4.5.2/.gitattributes new file mode 100644 index 0000000..40b1c37 --- /dev/null +++ b/assets/bootstrap-4.5.2/.gitattributes @@ -0,0 +1,8 @@ +# Enforce Unix newlines +* text=auto eol=lf + +# Don't diff or textually merge source maps +*.map binary + +bootstrap.css linguist-vendored=false +bootstrap.js linguist-vendored=false diff --git a/assets/bootstrap-4.5.2/.github/CODEOWNERS b/assets/bootstrap-4.5.2/.github/CODEOWNERS new file mode 100644 index 0000000..7d3fa99 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/CODEOWNERS @@ -0,0 +1,3 @@ +*.js @twbs/js-review +*.css @twbs/css-review +*.scss @twbs/css-review diff --git a/assets/bootstrap-4.5.2/.github/CONTRIBUTING.md b/assets/bootstrap-4.5.2/.github/CONTRIBUTING.md new file mode 100644 index 0000000..2519be0 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/CONTRIBUTING.md @@ -0,0 +1,239 @@ +# Contributing to Bootstrap + +Looking to contribute something to Bootstrap? **Here's how you can help.** + +Please take a moment to review this document in order to make the contribution +process easy and effective for everyone involved. + +Following these guidelines helps to communicate that you respect the time of +the developers managing and developing this open source project. In return, +they should reciprocate that respect in addressing your issue or assessing +patches and features. + + +## Using the issue tracker + +The [issue tracker](https://github.com/twbs/bootstrap/issues) is +the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) +and [submitting pull requests](#pull-requests), but please respect the following +restrictions: + +* Please **do not** use the issue tracker for personal support requests. Stack + Overflow ([`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag), + [Slack](https://bootstrap-slack.herokuapp.com/) or [IRC](README.md#community) are better places to get help. + +* Please **do not** derail or troll issues. Keep the discussion on topic and + respect the opinions of others. + +* Please **do not** post comments consisting solely of "+1" or ":thumbsup:". + Use [GitHub's "reactions" feature](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) + instead. We reserve the right to delete comments which violate this rule. + +* Please **do not** open issues regarding the official themes offered on . + Instead, please email any questions or feedback regarding those themes to `themes AT getbootstrap DOT com`. + + +## Issues and labels + +Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them: + +- `browser bug` - Issues that are reported to us, but actually are the result of a browser-specific bug. These are diagnosed with reduced test cases and result in an issue opened on that browser's own bug tracker. +- `confirmed` - Issues that have been confirmed with a reduced test case and identify a bug in Bootstrap. +- `css` - Issues stemming from our compiled CSS or source Sass files. +- `docs` - Issues for improving or updating our documentation. +- `examples` - Issues involving the example templates included in our docs. +- `feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v3.0.0` to `v3.1.0`). +- `build` - Issues with our build system, which is used to run all our tests, concatenate and compile source files, and more. +- `help wanted` - Issues we need or would love help from the community to resolve. +- `js` - Issues stemming from our compiled or source JavaScript files. +- `meta` - Issues with the project itself or our GitHub repository. + +For a complete look at our labels, see the [project labels page](https://github.com/twbs/bootstrap/labels). + + +## Bug reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. +Good bug reports are extremely helpful, so thanks! + +Guidelines for bug reports: + +0. **[validate your HTML](https://html5.validator.nu/)** to ensure your + problem isn't caused by a simple error in your own code. + +1. **Use the GitHub issue search** — check if the issue has already been + reported. + +2. **Check if the issue has been fixed** — try to reproduce it using the + latest `master` or `v4-dev` branch in the repository. + +3. **Isolate the problem** — ideally create a [reduced test + case](https://css-tricks.com/reduced-test-cases/) and a live example. + [This JS Bin](https://jsbin.com/lolome/edit?html,output) is a helpful template. + + +A good bug report shouldn't leave others needing to chase you up for more +information. Please try to be as detailed as possible in your report. What is +your environment? What steps will reproduce the issue? What browser(s) and OS +experience the problem? Do other browsers show the bug differently? What +would you expect to be the outcome? All these details will help people to fix +any potential bugs. + +Example: + +> Short and descriptive example bug report title +> +> A summary of the issue and the browser/OS environment in which it occurs. If +> suitable, include the steps required to reproduce the bug. +> +> 1. This is the first step +> 2. This is the second step +> 3. Further steps, etc. +> +> `` - a link to the reduced test case +> +> Any other information you want to share that is relevant to the issue being +> reported. This might include the lines of code that you have identified as +> causing the bug, and potential solutions (and your opinions on their +> merits). + +### Reporting upstream browser bugs + +Sometimes bugs reported to us are actually caused by bugs in the browser(s) themselves, not bugs in Bootstrap per se. +When feasible, we aim to report such upstream bugs to the relevant browser vendor(s), and then list them on our [Wall of Browser Bugs](https://getbootstrap.com/browser-bugs/) and [document them in MDN](https://developer.mozilla.org/en-US/docs/Web). + +| Vendor(s) | Browser(s) | Rendering engine | Bug reporting website(s) | Notes | +| ------------- | ---------------------------- | ---------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------- | +| Mozilla | Firefox | Gecko | https://bugzilla.mozilla.org/enter_bug.cgi | "Core" is normally the right product option to choose. | +| Apple | Safari | WebKit | https://bugs.webkit.org/enter_bug.cgi?product=WebKit
https://bugreport.apple.com/ | In Apple's bug reporter, choose "Safari" as the product. | +| Google, Opera | Chrome, Chromium, Opera v15+ | Blink | https://bugs.chromium.org/p/chromium/issues/list | Click the "New issue" button. | +| Microsoft | Edge | EdgeHTML | https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/ | | + + +## Feature requests + +Feature requests are welcome. But take a moment to find out whether your idea +fits with the scope and aims of the project. It's up to *you* to make a strong +case to convince the project's developers of the merits of this feature. Please +provide as much detail and context as possible. + + +## Pull requests + +Good pull requests—patches, improvements, new features—are a fantastic +help. They should remain focused in scope and avoid containing unrelated +commits. + +**Please ask first** before embarking on any significant pull request (e.g. +implementing features, refactoring code, porting to a different language), +otherwise you risk spending a lot of time working on something that the +project's developers might not want to merge into the project. + +Please adhere to the [coding guidelines](#code-guidelines) used throughout the +project (indentation, accurate comments, etc.) and any other requirements +(such as test coverage). + +**Do not edit `bootstrap.css`, or `bootstrap.js` +directly!** Those files are automatically generated. You should edit the +source files in [`/bootstrap/scss/`](https://github.com/twbs/bootstrap/tree/v4-dev/scss) +and/or [`/bootstrap/js/src/`](https://github.com/twbs/bootstrap/tree/v4-dev/js/src) instead. + +Similarly, when contributing to Bootstrap's documentation, you should edit the +documentation source files in +[the `/bootstrap/site/docs/` directory of the `v4-dev` branch](https://github.com/twbs/bootstrap/tree/v4-dev/site/docs). +**Do not edit the `gh-pages` branch.** That branch is generated from the +documentation source files and is managed separately by the Bootstrap Core Team. + +Adhering to the following process is the best way to get your work +included in the project: + +1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, + and configure the remotes: + + ```bash + # Clone your fork of the repo into the current directory + git clone https://github.com//bootstrap.git + # Navigate to the newly cloned directory + cd bootstrap + # Assign the original repo to a remote called "upstream" + git remote add upstream https://github.com/twbs/bootstrap.git + ``` + +2. If you cloned a while ago, get the latest changes from upstream: + + ```bash + git checkout v4-dev + git pull upstream v4-dev + ``` + +3. Create a new topic branch (off the main project development branch) to + contain your feature, change, or fix: + + ```bash + git checkout -b + ``` + +4. Commit your changes in logical chunks. Please adhere to these [git commit + message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) + or your code is unlikely be merged into the main project. Use Git's + [interactive rebase](https://help.github.com/articles/about-git-rebase/) + feature to tidy up your commits before making them public. + +5. Locally merge (or rebase) the upstream development branch into your topic branch: + + ```bash + git pull [--rebase] upstream v4-dev + ``` + +6. Push your topic branch up to your fork: + + ```bash + git push origin + ``` + +7. [Open a Pull Request](https://help.github.com/articles/about-pull-requests/) + with a clear title and description against the `v4-dev` branch. + +**IMPORTANT**: By submitting a patch, you agree to allow the project owners to +license your work under the terms of the [MIT License](../LICENSE) (if it +includes code changes) and under the terms of the +[Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/) +(if it includes documentation changes). + + +## Code guidelines + +### HTML + +[Adhere to the Code Guide.](https://codeguide.co/#html) + +- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags). +- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`. +- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility. + +### CSS + +[Adhere to the Code Guide.](https://codeguide.co/#css) + +- When feasible, default color palettes should comply with [WCAG color contrast guidelines](https://www.w3.org/TR/WCAG20/#visual-audio-contrast). +- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](https://a11yproject.com/posts/never-remove-css-outlines/) for more details. + +### JS + +- No semicolons (in client-side JS) +- 2 spaces (no tabs) +- strict mode +- "Attractive" +- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](https://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](https://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded. + +### Checking coding style + +Run `npm run test` before committing to ensure your changes follow our coding standards. + + +## License + +By contributing your code, you agree to license your contribution under the [MIT License](../LICENSE). +By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/). + +Prior to v3.1.0, Bootstrap's code was released under the Apache License v2.0. diff --git a/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/bug_report.md b/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4899d4d --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,20 @@ +--- +name: Bug report +about: Tell us about a bug you may have identified in Bootstrap. +title: '' +labels: '' +assignees: '' + +--- + +Before opening: + +- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) +- [Validate](https://html5.validator.nu/) any HTML to avoid common problems +- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md) + +Bug reports must include: + +- Operating system and version (Windows, macOS, Android, iOS) +- Browser and version (Chrome, Firefox, Safari, Internet Explorer, Microsoft Edge, Opera, Android Browser) +- A [reduced test case](https://css-tricks.com/reduced-test-cases/) or suggested fix using [CodePen](https://codepen.io/) or [JS Bin](https://jsbin.com/) diff --git a/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/feature_request.md b/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..db44076 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for a new feature in Bootstrap. +title: '' +labels: feature +assignees: '' + +--- + +Before opening: + +- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) +- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md) + +Feature requests must include: + +- As much detail as possible for what we should add and why it's important to Bootstrap +- Relevant links to prior art, screenshots, or live demos whenever possible diff --git a/assets/bootstrap-4.5.2/.github/SUPPORT.md b/assets/bootstrap-4.5.2/.github/SUPPORT.md new file mode 100644 index 0000000..de3c4b5 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/SUPPORT.md @@ -0,0 +1,11 @@ +### Bug reports + +See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports. + +### How-to + +For general troubleshooting or help getting started: + +- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). +- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. +- Ask and explore Stack Overflow with the [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4) tag. diff --git a/assets/bootstrap-4.5.2/.github/workflows/browserstack.yml b/assets/bootstrap-4.5.2/.github/workflows/browserstack.yml new file mode 100644 index 0000000..f709b98 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/browserstack.yml @@ -0,0 +1,40 @@ +name: BrowserStack +on: [push] +env: + CI: true + NODE: 12.x + +jobs: + browserstack: + runs-on: ubuntu-latest + if: github.repository == 'twbs/bootstrap' + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ env.NODE }}- + + - name: Install npm dependencies + run: npm ci + + - name: Run dist + run: npm run dist + + - name: Run BrowserStack tests + run: npm run js-test-cloud + env: + BROWSER_STACK_ACCESS_KEY: "${{ secrets.BROWSER_STACK_ACCESS_KEY }}" + BROWSER_STACK_USERNAME: "${{ secrets.BROWSER_STACK_USERNAME }}" diff --git a/assets/bootstrap-4.5.2/.github/workflows/bundlewatch.yml b/assets/bootstrap-4.5.2/.github/workflows/bundlewatch.yml new file mode 100644 index 0000000..1e68223 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/bundlewatch.yml @@ -0,0 +1,39 @@ +name: Bundlewatch +on: [push, pull_request] +env: + CI: true + NODE: 12.x + +jobs: + bundlewatch: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ env.NODE }}- + + - name: Install npm dependencies + run: npm ci + + - name: Run dist + run: npm run dist + + - name: Run bundlewatch + run: npm run bundlewatch + env: + BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}" + CI_BRANCH_BASE: v4-dev diff --git a/assets/bootstrap-4.5.2/.github/workflows/codeql.yml b/assets/bootstrap-4.5.2/.github/workflows/codeql.yml new file mode 100644 index 0000000..777d812 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/codeql.yml @@ -0,0 +1,25 @@ +name: "Code Scanning - Action" + +on: + push: + schedule: + - cron: "0 0 * * 0" + +jobs: + CodeQL-Build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: javascript + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/assets/bootstrap-4.5.2/.github/workflows/css.yml b/assets/bootstrap-4.5.2/.github/workflows/css.yml new file mode 100644 index 0000000..390bffc --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/css.yml @@ -0,0 +1,33 @@ +name: CSS +on: [push, pull_request] +env: + CI: true + NODE: 12.x + +jobs: + css: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ env.NODE }}- + + - name: Install npm dependencies + run: npm ci + + - name: Build CSS + run: npm run css diff --git a/assets/bootstrap-4.5.2/.github/workflows/dart-sass.yml b/assets/bootstrap-4.5.2/.github/workflows/dart-sass.yml new file mode 100644 index 0000000..8482a15 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/dart-sass.yml @@ -0,0 +1,24 @@ +name: CSS (Dart Sass) +on: [push, pull_request] +env: + CI: true + NODE: 12.x + +jobs: + css: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Build CSS with Dart Sass + run: | + npx --package sass@latest sass --version + npx --package sass@latest sass --style expanded --source-map --embed-sources --no-error-css scss/:dist-sass/css/ + ls -Al dist-sass/css diff --git a/assets/bootstrap-4.5.2/.github/workflows/docs.yml b/assets/bootstrap-4.5.2/.github/workflows/docs.yml new file mode 100644 index 0000000..ba16a9a --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/docs.yml @@ -0,0 +1,65 @@ +name: Docs +on: [push, pull_request] +env: + CI: true + NODE: 12.x + RUBY: 2.7.x + +jobs: + docs: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY }} + + - name: Set up Ruby env + run: | + echo "gem: --no-document" > ~/.gemrc # Disable gem docs + bundle config set clean 'true' + bundle config set deployment 'true' + + - name: Set up Ruby cache + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-ruby-v${{ env.RUBY }}-${{ hashFiles('Gemfile') }}-${{ hashFiles('Gemfile.lock') }} + ${{ runner.os }}-ruby-v${{ env.RUBY }}- + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ env.NODE }}- + + - run: ruby --version + - run: gem --version + - run: bundle --version + - run: java -version + + - name: Install npm dependencies + run: npm ci + + - name: Install bundler dependencies + run: bundle install --deployment --jobs=4 --retry=3 --clean + + - name: Copy CSS and JS + run: npm run css-copy && npm run js-copy + + - name: Test docs + run: npm run docs diff --git a/assets/bootstrap-4.5.2/.github/workflows/js.yml b/assets/bootstrap-4.5.2/.github/workflows/js.yml new file mode 100644 index 0000000..543172c --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/js.yml @@ -0,0 +1,48 @@ +name: JS Tests +on: [push, pull_request] +env: + CI: true + +jobs: + run: + name: Node ${{ matrix.node }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + node: [10, 12] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}} + restore-keys: | + ${{ runner.OS }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ matrix.node }}- + + - name: Install npm dependencies + run: npm ci + + - name: Run dist + run: npm run js + + - name: Run JS tests + run: npm run js-test + + - name: Run Coveralls + uses: coverallsapp/github-action@master + if: matrix.node == 12 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + path-to-lcov: "./js/coverage/lcov.info" diff --git a/assets/bootstrap-4.5.2/.github/workflows/lint.yml b/assets/bootstrap-4.5.2/.github/workflows/lint.yml new file mode 100644 index 0000000..f3d00d6 --- /dev/null +++ b/assets/bootstrap-4.5.2/.github/workflows/lint.yml @@ -0,0 +1,33 @@ +name: Lint +on: [push, pull_request] +env: + CI: true + NODE: 12.x + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set Node.js version + uses: actions/setup-node@v1 + with: + node-version: "${{ env.NODE }}" + + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }} + ${{ runner.OS }}-node-v${{ env.NODE }}- + + - name: Install npm dependencies + run: npm ci + + - name: Lint + run: npm run lint diff --git a/assets/bootstrap-4.5.2/.gitignore b/assets/bootstrap-4.5.2/.gitignore new file mode 100644 index 0000000..ecef861 --- /dev/null +++ b/assets/bootstrap-4.5.2/.gitignore @@ -0,0 +1,46 @@ +# Ignore docs files +/_gh_pages/ +/site/.jekyll-cache +/site/.jekyll-metadata +/site/docs/**/dist/ +# Hugo folders +/resources/ + +# Ignore ruby/bundler files +/.bundle/ +/vendor/ +/.ruby-version + +# Numerous always-ignore extensions +*.diff +*.err +*.log +*.orig +*.rej +*.swo +*.swp +*.vi +*.zip +*~ + +# OS or Editor folders +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +*.esproj +*.sublime-project +*.sublime-workspace +nbproject +Thumbs.db + +# Komodo +.komodotools +*.komodoproject + +# Folders to ignore +/js/coverage/ +/node_modules/ diff --git a/assets/bootstrap-4.5.2/.stylelintignore b/assets/bootstrap-4.5.2/.stylelintignore new file mode 100644 index 0000000..7bc488e --- /dev/null +++ b/assets/bootstrap-4.5.2/.stylelintignore @@ -0,0 +1,4 @@ +**/*.min.css +**/dist/ +**/vendor/ +/_gh_pages/ diff --git a/assets/bootstrap-4.5.2/.stylelintrc b/assets/bootstrap-4.5.2/.stylelintrc new file mode 100644 index 0000000..93af80b --- /dev/null +++ b/assets/bootstrap-4.5.2/.stylelintrc @@ -0,0 +1,16 @@ +{ + "extends": [ + "stylelint-config-twbs-bootstrap/scss" + ], + "rules": { + "property-blacklist": [ + "border-radius", + "border-top-left-radius", + "border-top-right-radius", + "border-bottom-right-radius", + "border-bottom-left-radius", + "transition" + ], + "function-blacklist": ["calc"] + } +} diff --git a/assets/bootstrap-4.5.2/CNAME b/assets/bootstrap-4.5.2/CNAME new file mode 100644 index 0000000..52c8533 --- /dev/null +++ b/assets/bootstrap-4.5.2/CNAME @@ -0,0 +1 @@ +getbootstrap.com diff --git a/assets/bootstrap-4.5.2/CODE_OF_CONDUCT.md b/assets/bootstrap-4.5.2/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..9d9922f --- /dev/null +++ b/assets/bootstrap-4.5.2/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mdo@getbootstrap.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version] + +[homepage]: https://www.contributor-covenant.org/ +[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html diff --git a/assets/bootstrap-4.5.2/Gemfile b/assets/bootstrap-4.5.2/Gemfile new file mode 100644 index 0000000..70ac52c --- /dev/null +++ b/assets/bootstrap-4.5.2/Gemfile @@ -0,0 +1,9 @@ +source 'https://rubygems.org' + +group :development, :test do + gem 'jekyll', '~> 4.1.1' + gem 'jekyll-redirect-from', '~> 0.16.0' + gem 'jekyll-sitemap', '~> 1.4.0' + gem 'jekyll-toc', '~> 0.14.0' + gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform? +end diff --git a/assets/bootstrap-4.5.2/Gemfile.lock b/assets/bootstrap-4.5.2/Gemfile.lock new file mode 100644 index 0000000..854eede --- /dev/null +++ b/assets/bootstrap-4.5.2/Gemfile.lock @@ -0,0 +1,89 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + colorator (1.1.0) + concurrent-ruby (1.1.6) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.2.7) + eventmachine (1.2.7-x64-mingw32) + ffi (1.13.1) + ffi (1.13.1-x64-mingw32) + forwardable-extended (2.6.0) + http_parser.rb (0.6.0) + i18n (1.8.5) + concurrent-ruby (~> 1.0) + jekyll (4.1.1) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (~> 2.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (~> 0.4.0) + pathutil (~> 0.9) + rouge (~> 3.0) + safe_yaml (~> 1.0) + terminal-table (~> 1.8) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-sass-converter (2.1.0) + sassc (> 2.0.1, < 3.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-toc (0.14.0) + jekyll (>= 3.8) + nokogiri (~> 1.10) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.3.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.2.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + mini_portile2 (2.4.0) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + nokogiri (1.10.10-x64-mingw32) + mini_portile2 (~> 2.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.5) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.4) + rouge (3.21.0) + safe_yaml (1.0.5) + sassc (2.4.0) + ffi (~> 1.9) + sassc (2.4.0-x64-mingw32) + ffi (~> 1.9) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + unicode-display_width (1.7.0) + wdm (0.1.1) + +PLATFORMS + ruby + x64-mingw32 + +DEPENDENCIES + jekyll (~> 4.1.1) + jekyll-redirect-from (~> 0.16.0) + jekyll-sitemap (~> 1.4.0) + jekyll-toc (~> 0.14.0) + wdm (~> 0.1.1) + +BUNDLED WITH + 2.1.4 diff --git a/assets/bootstrap-4.5.2/LICENSE b/assets/bootstrap-4.5.2/LICENSE new file mode 100644 index 0000000..173a9eb --- /dev/null +++ b/assets/bootstrap-4.5.2/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2011-2020 Twitter, Inc. +Copyright (c) 2011-2020 The Bootstrap Authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/assets/bootstrap-4.5.2/README.md b/assets/bootstrap-4.5.2/README.md new file mode 100644 index 0000000..3497963 --- /dev/null +++ b/assets/bootstrap-4.5.2/README.md @@ -0,0 +1,209 @@ +

+ + Bootstrap logo + +

+ +

Bootstrap

+ +

+ Sleek, intuitive, and powerful front-end framework for faster and easier web development. +
+ Explore Bootstrap docs » +
+
+ Report bug + · + Request feature + · + Themes + · + Blog +

+ + +## Table of contents + +- [Quick start](#quick-start) +- [Status](#status) +- [What's included](#whats-included) +- [Bugs and feature requests](#bugs-and-feature-requests) +- [Documentation](#documentation) +- [Contributing](#contributing) +- [Community](#community) +- [Versioning](#versioning) +- [Creators](#creators) +- [Thanks](#thanks) +- [Copyright and license](#copyright-and-license) + + +## Quick start + +Several quick start options are available: + +- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.5.2.zip) +- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` +- Install with [npm](https://www.npmjs.com/): `npm install bootstrap` +- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.5.2` +- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.5.2` +- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` + +Read the [Getting started page](https://getbootstrap.com/docs/4.5/getting-started/introduction/) for information on the framework contents, templates and examples, and more. + + +## Status + +[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com/) +[![Build Status](https://github.com/twbs/bootstrap/workflows/JS%20Tests/badge.svg?branch=v4-dev)](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av4-dev) +[![npm version](https://img.shields.io/npm/v/bootstrap)](https://www.npmjs.com/package/bootstrap) +[![Gem version](https://img.shields.io/gem/v/bootstrap)](https://rubygems.org/gems/bootstrap) +[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue)](https://atmospherejs.com/twbs/bootstrap) +[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap)](https://packagist.org/packages/twbs/bootstrap) +[![NuGet](https://img.shields.io/nuget/vpre/bootstrap)](https://www.nuget.org/packages/bootstrap/absoluteLatest) +[![peerDependencies Status](https://img.shields.io/david/peer/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=peer) +[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap)](https://david-dm.org/twbs/bootstrap?type=dev) +[![Coverage Status](https://img.shields.io/coveralls/github/twbs/bootstrap/v4-dev)](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev) +[![CSS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/css/bootstrap.min.css?compression=gzip&label=CSS%20gzip%20size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/css/bootstrap.min.css) +[![JS gzip size](https://img.badgesize.io/twbs/bootstrap/v4-dev/dist/js/bootstrap.min.js?compression=gzip&label=JS%20gzip%20size)](https://github.com/twbs/bootstrap/tree/v4-dev/dist/js/bootstrap.min.js) +[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229) +[![Backers on Open Collective](https://img.shields.io/opencollective/backers/bootstrap)](#backers) +[![Sponsors on Open Collective](https://img.shields.io/opencollective/sponsors/bootstrap)](#sponsors) + + +## What's included + +Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this: + +```text +bootstrap/ +└── dist/ + ├── css/ + │ ├── bootstrap-grid.css + │ ├── bootstrap-grid.css.map + │ ├── bootstrap-grid.min.css + │ ├── bootstrap-grid.min.css.map + │ ├── bootstrap-reboot.css + │ ├── bootstrap-reboot.css.map + │ ├── bootstrap-reboot.min.css + │ ├── bootstrap-reboot.min.css.map + │ ├── bootstrap.css + │ ├── bootstrap.css.map + │ ├── bootstrap.min.css + │ └── bootstrap.min.css.map + └── js/ + ├── bootstrap.bundle.js + ├── bootstrap.bundle.js.map + ├── bootstrap.bundle.min.js + ├── bootstrap.bundle.min.js.map + ├── bootstrap.js + ├── bootstrap.js.map + ├── bootstrap.min.js + └── bootstrap.min.js.map +``` + +We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/). + + +## Bugs and feature requests + +Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). + + +## Documentation + +Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages at . The docs may also be run locally. + +Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/docs/4.5/assets/js/src/search.js` file. + +### Running documentation locally + +1. Run through the [tooling setup](https://getbootstrap.com/docs/4.5/getting-started/build-tools/#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`. +2. Run `npm install` to install Node.js dependencies. +3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes. +4. Open `http://localhost:9001` in your browser, and voilà. + +Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/). + +### Documentation for previous releases + +You can find all our previous releases docs on . + +[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. + + +## Contributing + +Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. + +Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/v4-dev/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo). + +Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/v4-dev/.editorconfig) for easy use in common text editors. Read more and download plugins at . + + +## Community + +Get updates on Bootstrap's development and chat with the project maintainers and community members. + +- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). +- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/). +- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/). +- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. +- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)). +- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability. + + +## Versioning + +For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we adhere to those rules whenever possible. + +See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release. + + +## Creators + +**Mark Otto** + +- +- + +**Jacob Thornton** + +- +- + + +## Thanks + + + BrowserStack Logo + + +Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers! + + +## Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)] + +[![](https://opencollective.com/bootstrap/sponsor/0/avatar.svg)](https://opencollective.com/bootstrap/sponsor/0/website) +[![](https://opencollective.com/bootstrap/sponsor/1/avatar.svg)](https://opencollective.com/bootstrap/sponsor/1/website) +[![](https://opencollective.com/bootstrap/sponsor/2/avatar.svg)](https://opencollective.com/bootstrap/sponsor/2/website) +[![](https://opencollective.com/bootstrap/sponsor/3/avatar.svg)](https://opencollective.com/bootstrap/sponsor/3/website) +[![](https://opencollective.com/bootstrap/sponsor/4/avatar.svg)](https://opencollective.com/bootstrap/sponsor/4/website) +[![](https://opencollective.com/bootstrap/sponsor/5/avatar.svg)](https://opencollective.com/bootstrap/sponsor/5/website) +[![](https://opencollective.com/bootstrap/sponsor/6/avatar.svg)](https://opencollective.com/bootstrap/sponsor/6/website) +[![](https://opencollective.com/bootstrap/sponsor/7/avatar.svg)](https://opencollective.com/bootstrap/sponsor/7/website) +[![](https://opencollective.com/bootstrap/sponsor/8/avatar.svg)](https://opencollective.com/bootstrap/sponsor/8/website) +[![](https://opencollective.com/bootstrap/sponsor/9/avatar.svg)](https://opencollective.com/bootstrap/sponsor/9/website) + + +## Backers + +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)] + +[![Backers](https://opencollective.com/bootstrap/backers.svg?width=890)](https://opencollective.com/bootstrap#backers) + + +## Copyright and license + +Code and documentation copyright 2011-2020 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/). diff --git a/assets/bootstrap-4.5.2/SECURITY.md b/assets/bootstrap-4.5.2/SECURITY.md new file mode 100644 index 0000000..e79dcd8 --- /dev/null +++ b/assets/bootstrap-4.5.2/SECURITY.md @@ -0,0 +1,7 @@ +# Reporting Security Issues + +The Bootstrap team and community take security issues in Bootstrap seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. + +To report a security issue, email [security@getbootstrap.com](mailto:security@getbootstrap.com) and include the word "SECURITY" in the subject line. + +We'll endeavor to respond quickly, and will keep you updated throughout the process. diff --git a/assets/bootstrap-4.5.2/_config.yml b/assets/bootstrap-4.5.2/_config.yml new file mode 100644 index 0000000..1469ed1 --- /dev/null +++ b/assets/bootstrap-4.5.2/_config.yml @@ -0,0 +1,74 @@ +# Dependencies +markdown: kramdown +highlighter: rouge + +kramdown: + auto_ids: true + +# Permalinks +permalink: pretty + +# Server +source: "site" +destination: ./_gh_pages +host: "localhost" +port: 9001 +baseurl: "" +url: "https://getbootstrap.com" +encoding: UTF-8 +exclude: + - docs/4.5/assets/scss/ + +plugins: + - jekyll-redirect-from + - jekyll-sitemap + - jekyll-toc + +redirect_from: + json: false + +# Social +title: Bootstrap +description: "The most popular HTML, CSS, and JS library in the world." +twitter: getbootstrap +authors: "Mark Otto, Jacob Thornton, and Bootstrap contributors" +social_image_path: /docs/4.5/assets/brand/bootstrap-social.png +social_logo_path: /docs/4.5/assets/brand/bootstrap-social-logo.png + +# Custom variables +current_version: 4.5.2 +current_ruby_version: 4.5.2 +docs_version: 4.5 +github_org: "https://github.com/twbs" +repo: "https://github.com/twbs/bootstrap" +slack: "https://bootstrap-slack.herokuapp.com" +opencollective: "https://opencollective.com/bootstrap" +blog: "https://blog.getbootstrap.com" +expo: "https://expo.getbootstrap.com" +themes: "https://themes.getbootstrap.com" +icons: "https://icons.getbootstrap.com" + +download: + source: "https://github.com/twbs/bootstrap/archive/v4.5.2.zip" + dist: "https://github.com/twbs/bootstrap/releases/download/v4.5.2/bootstrap-4.5.2-dist.zip" + dist_examples: "https://github.com/twbs/bootstrap/releases/download/v4.5.2/bootstrap-4.5.2-examples.zip" + +cdn: + # See https://www.srihash.org for info on how to generate the hashes + css: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" + css_hash: "sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" + js: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" + js_hash: "sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" + js_bundle: "https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js" + js_bundle_hash: "sha384-LtrjvnR4Twt/qOuYxE721u19sVFLVSA4hf/rRt6PrZTmiPltdZcI7q7PXQBYTKyf" + jquery: "https://code.jquery.com/jquery-3.5.1.slim.min.js" + jquery_hash: "sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" + popper: "https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" + popper_hash: "sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" + +toc: + min_level: 2 + max_level: 4 + no_toc_section_class: + - "bd-callout" + - "bd-example" diff --git a/assets/bootstrap-4.5.2/build/.eslintrc.json b/assets/bootstrap-4.5.2/build/.eslintrc.json new file mode 100644 index 0000000..e406f9f --- /dev/null +++ b/assets/bootstrap-4.5.2/build/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "env": { + "browser": false, + "node": true + }, + "parserOptions": { + "sourceType": "script" + }, + "extends": "../.eslintrc.json", + "rules": { + "consistent-return": "off", + "func-style": "off", + "no-console": "off", + "no-magic-numbers": "off", + "no-process-exit": "off", + "no-sync": "off", + "spaced-comment": "off" + } +} diff --git a/assets/bootstrap-4.5.2/build/banner.js b/assets/bootstrap-4.5.2/build/banner.js new file mode 100644 index 0000000..df82ff3 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/banner.js @@ -0,0 +1,14 @@ +'use strict' + +const pkg = require('../package.json') +const year = new Date().getFullYear() + +function getBanner(pluginFilename) { + return `/*! + * Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage}) + * Copyright 2011-${year} ${pkg.author} + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */` +} + +module.exports = getBanner diff --git a/assets/bootstrap-4.5.2/build/build-plugins.js b/assets/bootstrap-4.5.2/build/build-plugins.js new file mode 100644 index 0000000..3829bb2 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/build-plugins.js @@ -0,0 +1,92 @@ +#!/usr/bin/env node + +/*! + * Script to build our plugins to use them separately. + * Copyright 2020 The Bootstrap Authors + * Copyright 2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +'use strict' + +const path = require('path') +const rollup = require('rollup') +const { babel } = require('@rollup/plugin-babel') +const banner = require('./banner.js') + +const TEST = process.env.NODE_ENV === 'test' +const plugins = [ + babel({ + // Only transpile our source code + exclude: 'node_modules/**', + // Inline the required helpers in each file + babelHelpers: 'inline' + }) +] +const bsPlugins = { + Alert: path.resolve(__dirname, '../js/src/alert.js'), + Button: path.resolve(__dirname, '../js/src/button.js'), + Carousel: path.resolve(__dirname, '../js/src/carousel.js'), + Collapse: path.resolve(__dirname, '../js/src/collapse.js'), + Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'), + Modal: path.resolve(__dirname, '../js/src/modal.js'), + Popover: path.resolve(__dirname, '../js/src/popover.js'), + ScrollSpy: path.resolve(__dirname, '../js/src/scrollspy.js'), + Tab: path.resolve(__dirname, '../js/src/tab.js'), + Toast: path.resolve(__dirname, '../js/src/toast.js'), + Tooltip: path.resolve(__dirname, '../js/src/tooltip.js'), + Util: path.resolve(__dirname, '../js/src/util.js') +} +const rootPath = TEST ? '../js/coverage/dist/' : '../js/dist/' + +const build = async (plugin) => { + console.log(`Building ${plugin} plugin...`) + + const external = ['jquery', 'popper.js'] + const globals = { + jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode + 'popper.js': 'Popper' + } + + // Do not bundle Util in plugins + if (plugin !== 'Util') { + external.push(bsPlugins.Util) + globals[bsPlugins.Util] = 'Util' + } + + // Do not bundle Tooltip in Popover + if (plugin === 'Popover') { + external.push(bsPlugins.Tooltip) + globals[bsPlugins.Tooltip] = 'Tooltip' + } + + const pluginFilename = `${plugin.toLowerCase()}.js` + const bundle = await rollup.rollup({ + input: bsPlugins[plugin], + plugins, + external + }) + + await bundle.write({ + banner: banner(pluginFilename), + format: 'umd', + name: plugin, + sourcemap: true, + globals, + file: path.resolve(__dirname, `${rootPath}${pluginFilename}`) + }) + + console.log(`Building ${plugin} plugin... Done!`) +} + +const main = async () => { + try { + await Promise.all(Object.keys(bsPlugins).map((plugin) => build(plugin))) + } catch (error) { + console.error(error) + + process.exit(1) + } +} + +main() diff --git a/assets/bootstrap-4.5.2/build/change-version.js b/assets/bootstrap-4.5.2/build/change-version.js new file mode 100644 index 0000000..d113123 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/change-version.js @@ -0,0 +1,105 @@ +#!/usr/bin/env node + +/*! + * Script to update version number references in the project. + * Copyright 2017-2020 The Bootstrap Authors + * Copyright 2017-2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +'use strict' + +const fs = require('fs') +const path = require('path') +const sh = require('shelljs') + +sh.config.fatal = true + +// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37 +function regExpQuote(string) { + return string.replace(/[$()*+.?[\\\]^{|}-]/g, '\\$&') +} + +function regExpQuoteReplacement(string) { + return string.replace(/\$/g, '$$') +} + +const DRY_RUN = false + +function walkAsync(directory, excludedDirectories, fileCallback, errback) { + if (excludedDirectories.has(path.parse(directory).base)) { + return + } + fs.readdir(directory, (err, names) => { + if (err) { + errback(err) + return + } + names.forEach((name) => { + const filepath = path.join(directory, name) + fs.lstat(filepath, (err, stats) => { + if (err) { + process.nextTick(errback, err) + return + } + if (stats.isDirectory()) { + process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback) + } else if (stats.isFile()) { + process.nextTick(fileCallback, filepath) + } + }) + }) + }) +} + +function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) { + original = new RegExp(regExpQuote(original), 'g') + replacement = regExpQuoteReplacement(replacement) + const updateFile = DRY_RUN ? (filepath) => { + if (allowedExtensions.has(path.parse(filepath).ext)) { + console.log(`FILE: ${filepath}`) + } else { + console.log(`EXCLUDED:${filepath}`) + } + } : (filepath) => { + if (allowedExtensions.has(path.parse(filepath).ext)) { + sh.sed('-i', original, replacement, filepath) + } + } + walkAsync(directory, excludedDirectories, updateFile, (err) => { + console.error('ERROR while traversing directory!:') + console.error(err) + process.exit(1) + }) +} + +function main(args) { + if (args.length !== 2) { + console.error('USAGE: change-version old_version new_version') + console.error('Got arguments:', args) + process.exit(1) + } + const oldVersion = args[0] + const newVersion = args[1] + const EXCLUDED_DIRS = new Set([ + '.git', + '_gh_pages', + 'node_modules', + 'vendor' + ]) + const INCLUDED_EXTENSIONS = new Set([ + // This extension whitelist is how we avoid modifying binary files + '', + '.css', + '.html', + '.js', + '.json', + '.md', + '.scss', + '.txt', + '.yml' + ]) + replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion) +} + +main(process.argv.slice(2)) diff --git a/assets/bootstrap-4.5.2/build/generate-sri.js b/assets/bootstrap-4.5.2/build/generate-sri.js new file mode 100644 index 0000000..d340b53 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/generate-sri.js @@ -0,0 +1,66 @@ +#!/usr/bin/env node + +/*! + * Script to generate SRI hashes for use in our docs. + * Remember to use the same vendor files as the CDN ones, + * otherwise the hashes won't match! + * + * Copyright 2017-2020 The Bootstrap Authors + * Copyright 2017-2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +'use strict' + +const crypto = require('crypto') +const fs = require('fs') +const path = require('path') +const sh = require('shelljs') + +const pkg = require('../package.json') + +sh.config.fatal = true + +const configFile = path.join(__dirname, '../_config.yml') + +// Array of objects which holds the files to generate SRI hashes for. +// `file` is the path from the root folder +// `configPropertyName` is the _config.yml variable's name of the file +const files = [ + { + file: 'dist/css/bootstrap.min.css', + configPropertyName: 'css_hash' + }, + { + file: 'dist/js/bootstrap.min.js', + configPropertyName: 'js_hash' + }, + { + file: 'dist/js/bootstrap.bundle.min.js', + configPropertyName: 'js_bundle_hash' + }, + { + file: `site/docs/${pkg.version_short}/assets/js/vendor/jquery.slim.min.js`, + configPropertyName: 'jquery_hash' + }, + { + file: 'node_modules/popper.js/dist/umd/popper.min.js', + configPropertyName: 'popper_hash' + } +] + +files.forEach((file) => { + fs.readFile(file.file, 'utf8', (err, data) => { + if (err) { + throw err + } + + const algo = 'sha384' + const hash = crypto.createHash(algo).update(data, 'utf8').digest('base64') + const integrity = `${algo}-${hash}` + + console.log(`${file.configPropertyName}: ${integrity}`) + + sh.sed('-i', new RegExp(`(\\s${file.configPropertyName}:\\s+"|')(\\S+)("|')`), `$1${integrity}$3`, configFile) + }) +}) diff --git a/assets/bootstrap-4.5.2/build/postcss.config.js b/assets/bootstrap-4.5.2/build/postcss.config.js new file mode 100644 index 0000000..157291f --- /dev/null +++ b/assets/bootstrap-4.5.2/build/postcss.config.js @@ -0,0 +1,14 @@ +'use strict' + +module.exports = (ctx) => ({ + map: ctx.file.dirname.includes('examples') ? false : { + inline: false, + annotation: true, + sourcesContent: true + }, + plugins: { + autoprefixer: { + cascade: false + } + } +}) diff --git a/assets/bootstrap-4.5.2/build/rollup.config.js b/assets/bootstrap-4.5.2/build/rollup.config.js new file mode 100644 index 0000000..6294204 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/rollup.config.js @@ -0,0 +1,44 @@ +'use strict' + +const path = require('path') +const { babel } = require('@rollup/plugin-babel') +const { nodeResolve } = require('@rollup/plugin-node-resolve') +const banner = require('./banner.js') + +const BUNDLE = process.env.BUNDLE === 'true' + +let fileDest = 'bootstrap.js' +const external = ['jquery', 'popper.js'] +const plugins = [ + babel({ + // Only transpile our source code + exclude: 'node_modules/**', + // Include the helpers in the bundle, at most one copy of each + babelHelpers: 'bundled' + }) +] +const globals = { + jquery: 'jQuery', // Ensure we use jQuery which is always available even in noConflict mode + 'popper.js': 'Popper' +} + +if (BUNDLE) { + fileDest = 'bootstrap.bundle.js' + // Remove last entry in external array to bundle Popper + external.pop() + delete globals['popper.js'] + plugins.push(nodeResolve()) +} + +module.exports = { + input: path.resolve(__dirname, '../js/src/index.js'), + output: { + banner, + file: path.resolve(__dirname, `../dist/js/${fileDest}`), + format: 'umd', + globals, + name: 'bootstrap' + }, + external, + plugins +} diff --git a/assets/bootstrap-4.5.2/build/ship.sh b/assets/bootstrap-4.5.2/build/ship.sh new file mode 100644 index 0000000..f1c5e38 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/ship.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +set -e + +# +# Usage +# --------------- +# 1. Clone second version of Bootstrap in sibling directory named `bs-docs`. +# 2. Within `bs-docs` copy, switch to `gh-pages` branch. +# 3. Pull latest, re-bundle, re-npm. +# 4. Run script. + +red=$'\e[1;31m' +green=$'\e[1;32m' +#blue=$'\e[1;34m' +magenta=$'\e[1;35m' +#cyan=$'\e[1;36m' +end=$'\e[0m' + +# Get current version from package.json +current_version=$(node -p "require('./package.json').version") + +if [[ $# -lt 1 ]]; then + printf "\n%s⚠️ Shipping aborted. You must specify a version.\n%s" "$red" "$end" + exit 1 +fi + +# Pulling latest changes, just to be sure +printf "\n%s=======================================================%s" "$magenta" "$end" +printf "\n%sPulling latest changes...%s" "$magenta" "$end" +printf "\n%s=======================================================\n\n%s" "$magenta" "$end" +git pull origin v4-dev + +# Update version number +printf "\n%s=======================================================%s" "$magenta" "$end" +printf "\n%sUpdating version number...%s" "$magenta" "$end" +printf "\n%s=======================================================\n%s" "$magenta" "$end" +npm run release-version "$current_version" "$1" + +# Build release +printf "\n%s=======================================================%s" "$magenta" "$end" +printf "\n%sBuilding release...%s" "$magenta" "$end" +printf "\n%s=======================================================\n%s" "$magenta" "$end" +npm run release + +# Copy the contents of the built docs site over to `bs-docs` repo +printf "\n%s=======================================================%s" "$magenta" "$end" +printf "\n%sCopy it over...%s" "$magenta" "$end" +printf "\n%s=======================================================\n%s" "$magenta" "$end" +cp -rf _gh_pages/. ../bs-docs/ +printf "\nDone!\n" + +printf "\n%s=======================================================%s" "$green" "$end" +printf "\n%sSuccess, $1 is ready to review and publish.%s" "$green" "$end" +printf "\n%s=======================================================\n\n%s" "$green" "$end" diff --git a/assets/bootstrap-4.5.2/build/svgo.yml b/assets/bootstrap-4.5.2/build/svgo.yml new file mode 100644 index 0000000..1b592f0 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/svgo.yml @@ -0,0 +1,60 @@ +# Usage: +# install svgo globally: `npm i -g svgo` +# svgo --config=build/svgo.yml --input=foo.svg + +# https://github.com/svg/svgo/blob/master/docs/how-it-works/en.md +# replace default config + +multipass: true +#full: true + +# https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options + +js2svg: + pretty: true + indent: 2 + +plugins: + # remove this with IE 11 is no longer supported + - addAttributesToSVGElement: + attributes: + - focusable: false + - cleanupAttrs: true + - cleanupEnableBackground: true + - cleanupIDs: true + - cleanupListOfValues: true + - cleanupNumericValues: true + - collapseGroups: true + - convertColors: true + - convertPathData: true + - convertShapeToPath: true + - convertStyleToAttrs: true + - convertTransform: true + - inlineStyles: true + - mergePaths: true + - minifyStyles: true + - moveElemsAttrsToGroup: true + - moveGroupAttrsToElems: true + - removeAttrs: + attrs: + - "data-name" + - removeComments: true + - removeDesc: true + - removeDoctype: true + - removeEditorsNSData: true + - removeEmptyAttrs: true + - removeEmptyContainers: true + - removeEmptyText: true + - removeHiddenElems: true + - removeMetadata: true + - removeNonInheritableGroupAttrs: true + - removeTitle: false + - removeUnknownsAndDefaults: + keepRoleAttr: true + - removeUnusedNS: true + - removeUselessDefs: true + - removeUselessStrokeAndFill: true + - removeViewBox: false + - removeXMLNS: false + - removeXMLProcInst: true + - sortAttrs: true diff --git a/assets/bootstrap-4.5.2/build/vnu-jar.js b/assets/bootstrap-4.5.2/build/vnu-jar.js new file mode 100644 index 0000000..f4a4141 --- /dev/null +++ b/assets/bootstrap-4.5.2/build/vnu-jar.js @@ -0,0 +1,65 @@ +#!/usr/bin/env node + +/*! + * Script to run vnu-jar if Java is available. + * Copyright 2017-2020 The Bootstrap Authors + * Copyright 2017-2020 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ + +'use strict' + +const childProcess = require('child_process') +const vnu = require('vnu-jar') + +childProcess.exec('java -version', (error, stdout, stderr) => { + if (error) { + console.error('Skipping vnu-jar test; Java is missing.') + return + } + + const is32bitJava = !/64-Bit/.test(stderr) + + // vnu-jar accepts multiple ignores joined with a `|`. + // Also note that the ignores are regular expressions. + const ignores = [ + // "autocomplete" is included in + + + + + + diff --git a/assets/bootstrap-4.5.2/js/tests/integration/rollup.bundle.js b/assets/bootstrap-4.5.2/js/tests/integration/rollup.bundle.js new file mode 100644 index 0000000..7e6f662 --- /dev/null +++ b/assets/bootstrap-4.5.2/js/tests/integration/rollup.bundle.js @@ -0,0 +1,21 @@ +/* eslint-env node */ + +const commonjs = require('@rollup/plugin-commonjs') +const { babel } = require('@rollup/plugin-babel') +const { nodeResolve } = require('@rollup/plugin-node-resolve') + +module.exports = { + input: 'js/tests/integration/bundle.js', + output: { + file: 'js/coverage/bundle.js', + format: 'iife' + }, + plugins: [ + nodeResolve(), + commonjs(), + babel({ + exclude: 'node_modules/**', + babelHelpers: 'bundled' + }) + ] +} diff --git a/assets/bootstrap-4.5.2/js/tests/karma.conf.js b/assets/bootstrap-4.5.2/js/tests/karma.conf.js new file mode 100644 index 0000000..fc3c770 --- /dev/null +++ b/assets/bootstrap-4.5.2/js/tests/karma.conf.js @@ -0,0 +1,142 @@ +/* eslint-env node */ + +const path = require('path') +const ip = require('ip') +const { + browsers, + browsersKeys +} = require('./browsers') + +const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'node_modules/jquery/dist/jquery.slim.min.js' +const bundle = process.env.BUNDLE === 'true' +const browserStack = process.env.BROWSER === 'true' + +const frameworks = [ + 'qunit', + 'sinon' +] + +const plugins = [ + 'karma-qunit', + 'karma-sinon' +] + +const reporters = ['dots'] + +const detectBrowsers = { + usePhantomJS: false, + postDetection(availableBrowser) { + if (process.env.CI === true || availableBrowser.includes('Chrome')) { + return ['ChromeHeadless'] + } + + if (availableBrowser.includes('Firefox')) { + return ['FirefoxHeadless'] + } + + throw new Error('Please install Firefox or Chrome') + } +} + +const customLaunchers = { + FirefoxHeadless: { + base: 'Firefox', + flags: ['-headless'] + } +} + +let files = [ + 'node_modules/popper.js/dist/umd/popper.min.js', + 'node_modules/hammer-simulator/index.js' +] + +const conf = { + basePath: '../..', + port: 9876, + colors: true, + autoWatch: false, + singleRun: true, + concurrency: Infinity, + client: { + qunit: { + showUI: true + } + } +} + +if (bundle) { + frameworks.push('detectBrowsers') + plugins.push( + 'karma-chrome-launcher', + 'karma-firefox-launcher', + 'karma-detect-browsers' + ) + conf.customLaunchers = customLaunchers + conf.detectBrowsers = detectBrowsers + files = files.concat([ + jqueryFile, + 'dist/js/bootstrap.js' + ]) +} else if (browserStack) { + conf.hostname = ip.address() + conf.browserStack = { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY, + build: `bootstrap-${new Date().toISOString()}`, + project: 'Bootstrap', + retryLimit: 2 + } + plugins.push('karma-browserstack-launcher') + conf.customLaunchers = browsers + conf.browsers = browsersKeys + reporters.push('BrowserStack') + files = files.concat([ + 'node_modules/jquery/dist/jquery.slim.min.js', + 'js/dist/util.js', + 'js/dist/tooltip.js', + 'js/dist/!(util|index|tooltip).js' // include all of our js/dist files except util.js, index.js and tooltip.js + ]) +} else { + frameworks.push('detectBrowsers') + plugins.push( + 'karma-chrome-launcher', + 'karma-firefox-launcher', + 'karma-detect-browsers', + 'karma-coverage-istanbul-reporter' + ) + files = files.concat([ + jqueryFile, + 'js/coverage/dist/util.js', + 'js/coverage/dist/tooltip.js', + 'js/coverage/dist/!(util|index|tooltip).js' // include all of our js/dist files except util.js, index.js and tooltip.js + ]) + reporters.push('coverage-istanbul') + conf.customLaunchers = customLaunchers + conf.detectBrowsers = detectBrowsers + conf.coverageIstanbulReporter = { + dir: path.resolve(__dirname, '../coverage/'), + reports: ['lcov', 'text-summary'], + thresholds: { + emitWarning: false, + global: { + statements: 90, + branches: 86, + functions: 89, + lines: 90 + } + } + } +} + +files.push('js/tests/unit/*.js') + +conf.frameworks = frameworks +conf.plugins = plugins +conf.reporters = reporters +conf.files = files + +module.exports = (karmaConfig) => { + // possible values: karmaConfig.LOG_DISABLE || karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN || karmaConfig.LOG_INFO || karmaConfig.LOG_DEBUG + conf.logLevel = karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN + karmaConfig.set(conf) +} diff --git a/assets/bootstrap-4.5.2/js/tests/unit/.eslintrc.json b/assets/bootstrap-4.5.2/js/tests/unit/.eslintrc.json new file mode 100644 index 0000000..86d851a --- /dev/null +++ b/assets/bootstrap-4.5.2/js/tests/unit/.eslintrc.json @@ -0,0 +1,40 @@ +{ + "env": { + "es6": false, + "jquery": true, + "qunit": true + }, + "globals": { + "bootstrap": false, + "sinon": false, + "Util": false, + "Alert": false, + "Button": false, + "Carousel": false, + "Simulator": false, + "Toast": false + }, + "parserOptions": { + "ecmaVersion": 5, + "sourceType": "script" + }, + "extends": "../../../.eslintrc.json", + "rules": { + "no-console": "error", + // Best Practices + "consistent-return": "off", + "no-magic-numbers": "off", + "vars-on-top": "off", + + // Stylistic Issues + "func-style": "off", + "spaced-comment": "off", + + // ECMAScript 6 + "no-var": "off", + "object-shorthand": "off", + "prefer-arrow-callback": "off", + "prefer-template": "off", + "prefer-rest-params": "off" + } +} diff --git a/assets/bootstrap-4.5.2/js/tests/unit/alert.js b/assets/bootstrap-4.5.2/js/tests/unit/alert.js new file mode 100644 index 0000000..0d89d5f --- /dev/null +++ b/assets/bootstrap-4.5.2/js/tests/unit/alert.js @@ -0,0 +1,123 @@ +$(function () { + 'use strict' + + QUnit.module('alert plugin') + + QUnit.test('should be defined on jquery object', function (assert) { + assert.expect(1) + assert.ok($(document.body).alert, 'alert method is defined') + }) + + QUnit.module('alert', { + beforeEach: function () { + // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode + $.fn.bootstrapAlert = $.fn.alert.noConflict() + }, + afterEach: function () { + $.fn.alert = $.fn.bootstrapAlert + delete $.fn.bootstrapAlert + $('#qunit-fixture').html('') + } + }) + + QUnit.test('should provide no conflict', function (assert) { + assert.expect(1) + assert.strictEqual(typeof $.fn.alert, 'undefined', 'alert was set back to undefined (org value)') + }) + + QUnit.test('should return jquery collection containing the element', function (assert) { + assert.expect(2) + var $el = $('
') + var $alert = $el.bootstrapAlert() + assert.ok($alert instanceof $, 'returns jquery collection') + assert.strictEqual($alert[0], $el[0], 'collection contains element') + }) + + QUnit.test('should fade element out on clicking .close', function (assert) { + assert.expect(1) + var alertHTML = '
' + + '×' + + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' + + '
' + + var $alert = $(alertHTML).bootstrapAlert().appendTo($('#qunit-fixture')) + + $alert.find('.close').trigger('click') + + assert.strictEqual($alert.hasClass('show'), false, 'remove .show class on .close click') + }) + + QUnit.test('should remove element when clicking .close', function (assert) { + assert.expect(2) + var done = assert.async() + var alertHTML = '
' + + '×' + + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' + + '
' + var $alert = $(alertHTML).appendTo('#qunit-fixture').bootstrapAlert() + + assert.notStrictEqual($('#qunit-fixture').find('.alert').length, 0, 'element added to dom') + + $alert + .one('closed.bs.alert', function () { + assert.strictEqual($('#qunit-fixture').find('.alert').length, 0, 'element removed from dom') + done() + }) + .find('.close') + .trigger('click') + }) + + QUnit.test('should not fire closed when close is prevented', function (assert) { + assert.expect(1) + var done = assert.async() + $('
') + .on('close.bs.alert', function (e) { + e.preventDefault() + assert.ok(true, 'close event fired') + done() + }) + .on('closed.bs.alert', function () { + assert.ok(false, 'closed event fired') + }) + .bootstrapAlert('close') + }) + + QUnit.test('close should use internal _element if no element provided', function (assert) { + assert.expect(1) + + var done = assert.async() + var $el = $('
') + var $alert = $el.bootstrapAlert() + var alertInstance = $alert.data('bs.alert') + + $alert.one('closed.bs.alert', function () { + assert.ok('alert closed') + done() + }) + + alertInstance.close() + }) + + QUnit.test('dispose should remove data and the element', function (assert) { + assert.expect(2) + + var $el = $('
') + var $alert = $el.bootstrapAlert() + + assert.ok(typeof $alert.data('bs.alert') !== 'undefined') + + $alert.data('bs.alert').dispose() + + assert.ok(typeof $alert.data('bs.button') === 'undefined') + }) + + QUnit.test('should return alert version', function (assert) { + assert.expect(1) + + if (typeof Alert !== 'undefined') { + assert.ok(typeof Alert.VERSION === 'string') + } else { + assert.notOk() + } + }) +}) diff --git a/assets/bootstrap-4.5.2/js/tests/unit/button.js b/assets/bootstrap-4.5.2/js/tests/unit/button.js new file mode 100644 index 0000000..2adffed --- /dev/null +++ b/assets/bootstrap-4.5.2/js/tests/unit/button.js @@ -0,0 +1,455 @@ +$(function () { + 'use strict' + + QUnit.module('button plugin') + + QUnit.test('should be defined on jquery object', function (assert) { + assert.expect(1) + assert.ok($(document.body).button, 'button method is defined') + }) + + QUnit.module('button', { + beforeEach: function () { + // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode + $.fn.bootstrapButton = $.fn.button.noConflict() + }, + afterEach: function () { + $.fn.button = $.fn.bootstrapButton + delete $.fn.bootstrapButton + $('#qunit-fixture').html('') + } + }) + + QUnit.test('should provide no conflict', function (assert) { + assert.expect(1) + assert.strictEqual(typeof $.fn.button, 'undefined', 'button was set back to undefined (org value)') + }) + + QUnit.test('should return jquery collection containing the element', function (assert) { + assert.expect(2) + var $el = $('
') + var $button = $el.bootstrapButton() + assert.ok($button instanceof $, 'returns jquery collection') + assert.strictEqual($button[0], $el[0], 'collection contains element') + }) + + QUnit.test('should toggle active', function (assert) { + assert.expect(2) + var $btn = $('') + assert.ok(!$btn.hasClass('active'), 'btn does not have active class') + $btn.bootstrapButton('toggle') + assert.ok($btn.hasClass('active'), 'btn has class active') + }) + + QUnit.test('should toggle active when btn children are clicked', function (assert) { + assert.expect(2) + var $btn = $('') + var $inner = $('') + $btn + .append($inner) + .appendTo('#qunit-fixture') + assert.ok(!$btn.hasClass('active'), 'btn does not have active class') + $inner.trigger('click') + assert.ok($btn.hasClass('active'), 'btn has class active') + }) + + QUnit.test('should toggle aria-pressed', function (assert) { + assert.expect(2) + var $btn = $('') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false') + $btn.bootstrapButton('toggle') + assert.strictEqual($btn.attr('aria-pressed'), 'true', 'btn aria-pressed state is true') + }) + + QUnit.test('should not toggle aria-pressed on buttons with disabled class', function (assert) { + assert.expect(2) + var $btn = $('') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false') + $btn.bootstrapButton('toggle') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is still false') + }) + + QUnit.test('should not toggle aria-pressed on buttons that are disabled', function (assert) { + assert.expect(2) + var $btn = $('') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false') + $btn.bootstrapButton('toggle') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is still false') + }) + + QUnit.test('should toggle aria-pressed on buttons with container', function (assert) { + assert.expect(1) + var groupHTML = '
' + + '' + + '' + + '
' + $('#qunit-fixture').append(groupHTML) + $('#btn1').bootstrapButton('toggle') + assert.strictEqual($('#btn1').attr('aria-pressed'), 'true') + }) + + QUnit.test('should toggle aria-pressed when btn children are clicked', function (assert) { + assert.expect(2) + var $btn = $('') + var $inner = $('') + $btn + .append($inner) + .appendTo('#qunit-fixture') + assert.strictEqual($btn.attr('aria-pressed'), 'false', 'btn aria-pressed state is false') + $inner.trigger('click') + assert.strictEqual($btn.attr('aria-pressed'), 'true', 'btn aria-pressed state is true') + }) + + QUnit.test('should assign active class on page load to buttons with aria-pressed="true"', function (assert) { + assert.expect(1) + var done = assert.async() + var $btn = $('') + $btn.appendTo('#qunit-fixture') + $(window).trigger($.Event('load')) + setTimeout(function () { + assert.ok($btn.hasClass('active'), 'button with aria-pressed="true" has been given class active') + done() + }, 5) + }) + + QUnit.test('should assign active class on page load to button checkbox with checked attribute', function (assert) { + assert.expect(1) + var done = assert.async() + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + var $btn = $group.children().eq(0) + + $(window).trigger($.Event('load')) + setTimeout(function () { + assert.ok($btn.hasClass('active'), 'checked checkbox button has been given class active') + done() + }, 5) + }) + + QUnit.test('should remove active class on page load from buttons without aria-pressed="true"', function (assert) { + assert.expect(1) + var done = assert.async() + var $btn = $('') + $btn.appendTo('#qunit-fixture') + $(window).trigger($.Event('load')) + setTimeout(function () { + assert.ok(!$btn.hasClass('active'), 'button without aria-pressed="true" has had active class removed') + done() + }, 5) + }) + + QUnit.test('should remove active class on page load from button checkbox without checked attribute', function (assert) { + assert.expect(1) + var done = assert.async() + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + var $btn = $group.children().eq(0) + + $(window).trigger($.Event('load')) + setTimeout(function () { + assert.ok(!$btn.hasClass('active'), 'unchecked checkbox button has had active class removed') + done() + }, 5) + }) + + QUnit.test('should trigger input change event when toggled button has input field', function (assert) { + assert.expect(1) + var done = assert.async() + + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + $group.find('input').on('change', function (e) { + e.preventDefault() + assert.ok(true, 'change event fired') + done() + }) + + $group.find('label').trigger('click') + }) + + QUnit.test('should check for closest matching toggle', function (assert) { + assert.expect(18) + var groupHTML = '
' + + '' + + '' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn1 = $group.children().eq(0) + var $btn2 = $group.children().eq(1) + + assert.ok($btn1.hasClass('active'), 'btn1 has active class') + assert.ok($btn1.find('input').prop('checked'), 'btn1 is checked') + assert.ok(!$btn2.hasClass('active'), 'btn2 does not have active class') + assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked') + $btn2.find('input').trigger('click') + assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class') + assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked') + assert.ok($btn2.hasClass('active'), 'btn2 has active class') + assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked') + + $btn2.find('input').trigger('click') // Clicking an already checked radio should not un-check it + assert.ok(!$btn1.hasClass('active'), 'btn1 does not have active class') + assert.ok(!$btn1.find('input').prop('checked'), 'btn1 is not checked') + assert.ok($btn2.hasClass('active'), 'btn2 has active class') + assert.ok($btn2.find('input').prop('checked'), 'btn2 is checked') + $btn1.bootstrapButton('toggle') + assert.ok($btn1.hasClass('active'), 'btn1 has active class') + assert.ok($btn1.find('input').prop('checked'), 'btn1 prop is checked') + assert.ok($btn1.find('input')[0].checked, 'btn1 is checked with jquery') + assert.ok(!$btn2.hasClass('active'), 'btn2 does not have active class') + assert.ok(!$btn2.find('input').prop('checked'), 'btn2 is not checked') + assert.ok(!$btn2.find('input')[0].checked, 'btn2 is not checked') + }) + + QUnit.test('should fire click event on input', function (assert) { + assert.expect(1) + var done = assert.async() + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + $group.find('input').on('click', function (e) { + e.preventDefault() + assert.ok(true, 'click event fired') + done() + }) + + $btn[0].click() + }) + + QUnit.test('should fire click event on label', function (assert) { + assert.expect(1) + var done = assert.async() + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + $group.find('label').on('click', function (e) { + e.preventDefault() + assert.ok(true, 'click event fired') + done() + }) + + $btn[0].click() + }) + + QUnit.test('should not add aria-pressed on labels for radio/checkbox inputs in a data-toggle="buttons" group', function (assert) { + assert.expect(2) + var groupHTML = '
' + + '' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn1 = $group.children().eq(0) + var $btn2 = $group.children().eq(1) + + $btn1.find('input').trigger('click') + assert.ok($btn1.is(':not([aria-pressed])'), 'label for nested checkbox input has not been given an aria-pressed attribute') + + $btn2.find('input').trigger('click') + assert.ok($btn2.is(':not([aria-pressed])'), 'label for nested radio input has not been given an aria-pressed attribute') + }) + + QUnit.test('should handle disabled attribute on non-button elements', function (assert) { + assert.expect(4) + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + var $input = $btn.children().eq(0) + + assert.ok($btn.is(':not(.active)'), 'button is initially not active') + assert.ok(!$input.prop('checked'), 'checkbox is initially not checked') + $btn[0].click() // fire a real click on the DOM node itself, not a click() on the jQuery object that just aliases to trigger('click') + assert.ok($btn.is(':not(.active)'), 'button did not become active') + assert.ok(!$input.prop('checked'), 'checkbox did not get checked') + }) + + QUnit.test('should not set active class if inner hidden checkbox is disabled but author forgot to set disabled class on outer button', function (assert) { + assert.expect(4) + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + var $input = $btn.children().eq(0) + + assert.ok($btn.is(':not(.active)'), 'button is initially not active') + assert.ok(!$input.prop('checked'), 'checkbox is initially not checked') + $btn[0].click() // fire a real click on the DOM node itself, not a click() on the jQuery object that just aliases to trigger('click') + assert.ok($btn.is(':not(.active)'), 'button did not become active') + assert.ok(!$input.prop('checked'), 'checkbox did not get checked') + }) + + QUnit.test('should correctly set checked state on input and active class on label when using structure', function (assert) { + assert.expect(4) + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $label = $group.children().eq(0) + var $input = $label.children().eq(0) + + assert.ok($label.is(':not(.active)'), 'label is initially not active') + assert.ok(!$input.prop('checked'), 'checkbox is initially not checked') + $label[0].click() // fire a real click on the DOM node itself, not a click() on the jQuery object that just aliases to trigger('click') + assert.ok($label.is('.active'), 'label is active after click') + assert.ok($input.prop('checked'), 'checkbox is checked after click') + }) + + QUnit.test('should correctly set checked state on input and active class on the faked button when using
structure', function (assert) { + assert.expect(4) + var groupHTML = '
' + + '
' + + '' + + '
' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + var $input = $btn.children().eq(0) + + assert.ok($btn.is(':not(.active)'), '
is initially not active') + assert.ok(!$input.prop('checked'), 'checkbox is initially not checked') + $btn[0].click() // fire a real click on the DOM node itself, not a click() on the jQuery object that just aliases to trigger('click') + assert.ok($btn.is('.active'), '
is active after click') + assert.ok($input.prop('checked'), 'checkbox is checked after click') + }) + + QUnit.test('should correctly set checked state on input and active class on the label when using button toggle', function (assert) { + assert.expect(6) + var groupHTML = '
' + + '' + + '
' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + var $btn = $group.children().eq(0) + var $input = $btn.children().eq(0) + + assert.ok($btn.is(':not(.active)'), '