Repository: audi/audi-ui Branch: master Commit: 03b8cd1ca4d4 Files: 371 Total size: 713.8 KB Directory structure: gitextract_7dvh5nw8/ ├── .babelrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── README.md ├── dist/ │ └── audi-ui.css ├── gulpfile.js ├── package.json ├── src/ │ ├── _blank-component/ │ │ ├── README.md │ │ ├── _blank.scss │ │ └── blank.js │ ├── _functions.scss │ ├── _mixins.scss │ ├── _themes.scss │ ├── _variables.scss │ ├── alert/ │ │ ├── README.md │ │ ├── _alert.scss │ │ ├── alert.js │ │ └── snippets/ │ │ ├── alert-animate.html │ │ ├── alert-danger.html │ │ ├── alert-sticky.html │ │ ├── alert-success.html │ │ └── alert-warning.html │ ├── animation/ │ │ └── _animation.scss │ ├── audioplayer/ │ │ ├── _audioplayer-themes.scss │ │ ├── _audioplayer.scss │ │ ├── audioplayer.js │ │ └── snippets/ │ │ ├── audioplayer-basic.html │ │ ├── audioplayer-cover-small.html │ │ ├── audioplayer-download.html │ │ ├── audioplayer-playlist.html │ │ └── audioplayer-volume-control.html │ ├── badge/ │ │ ├── _badge.scss │ │ └── snippets/ │ │ ├── badge-charging-blue.html │ │ ├── badge-charging-green.html │ │ ├── badge-danger.html │ │ ├── badge-hidden.html │ │ ├── badge-signal-green.html │ │ ├── badge-signal-red.html │ │ ├── badge-signal-yellow.html │ │ ├── badge-single-digit.html │ │ ├── badge-small-icon.html │ │ ├── badge-small-label-small.html │ │ ├── badge-small-label.html │ │ ├── badge-small-text.html │ │ ├── badge-small.html │ │ ├── badge-success.html │ │ ├── badge-warning.html │ │ └── badge.html │ ├── breadcrumb/ │ │ ├── _breadcrumb-themes.scss │ │ ├── _breadcrumb.scss │ │ ├── breadcrumb.js │ │ └── snippets/ │ │ └── breadcrumb.html │ ├── breakpoint/ │ │ ├── README.md │ │ └── _breakpoint.scss │ ├── button/ │ │ ├── README.md │ │ ├── _button-themes.scss │ │ ├── _button.scss │ │ └── snippets/ │ │ ├── button-bold.html │ │ ├── button-disabled.html │ │ ├── button-floating.html │ │ ├── button-icon-disabled.html │ │ ├── button-icon-large-disabled.html │ │ ├── button-icon-large.html │ │ ├── button-icon.html │ │ ├── button-primary-disabled.html │ │ ├── button-primary-sticky.html │ │ ├── button-primary-with-icon-disabled.html │ │ ├── button-primary-with-icon-right-disabled.html │ │ ├── button-primary-with-icon-right.html │ │ ├── button-primary-with-icon.html │ │ ├── button-primary.html │ │ ├── button-secondary-disabled.html │ │ ├── button-secondary-with-icon-disabled.html │ │ ├── button-secondary-with-icon-right-disabled.html │ │ ├── button-secondary-with-icon-right.html │ │ ├── button-secondary-with-icon.html │ │ ├── button-secondary.html │ │ ├── button-text-disabled.html │ │ ├── button-text.html │ │ └── button.html │ ├── button-group/ │ │ ├── README.md │ │ ├── _button-group.scss │ │ └── snippets/ │ │ ├── button-group-icons.html │ │ ├── button-group-primary-secondary.html │ │ ├── button-group-two-secondary.html │ │ └── button-group-two-text.html │ ├── card/ │ │ ├── README.md │ │ ├── _card.scss │ │ └── snippets/ │ │ └── card-actions.html │ ├── checkbox/ │ │ ├── README.md │ │ ├── _checkbox-themes.scss │ │ ├── _checkbox.scss │ │ ├── checkbox.js │ │ └── snippets/ │ │ ├── checkbox-checked-disabled.html │ │ ├── checkbox-checked-invalid.html │ │ ├── checkbox-checked.html │ │ ├── checkbox-disabled.html │ │ ├── checkbox-invalid.html │ │ └── checkbox.html │ ├── color/ │ │ ├── README.md │ │ └── _color.scss │ ├── component/ │ │ └── component.js │ ├── draggable/ │ │ ├── README.md │ │ ├── _draggable-themes.scss │ │ ├── _draggable.scss │ │ └── snippets/ │ │ ├── draggable-list-active.html │ │ └── draggable-list.html │ ├── dropdown/ │ │ ├── _dropdown-themes.scss │ │ ├── _dropdown.scss │ │ ├── dropdown.js │ │ └── snippets/ │ │ ├── dropdown-disabled.html │ │ ├── dropdown-invalid.html │ │ ├── dropdown-multiple.html │ │ └── dropdown.html │ ├── dropzone/ │ │ ├── README.md │ │ ├── _dropzone-themes.scss │ │ ├── _dropzone.scss │ │ └── snippets/ │ │ ├── dropzone-fullpage.html │ │ └── dropzone.html │ ├── fieldset/ │ │ ├── _fieldset-themes.scss │ │ ├── _fieldset.scss │ │ └── snippets/ │ │ ├── fieldset-radios-invalid.html │ │ ├── fieldset-radios.html │ │ ├── fieldset-selects-invalid.html │ │ ├── fieldset-selects.html │ │ ├── fieldset-textfields-invalid.html │ │ └── fieldset-textfields.html │ ├── figure/ │ │ ├── README.md │ │ └── _figure.scss │ ├── flyout/ │ │ ├── README.md │ │ ├── _flyout-themes.scss │ │ ├── _flyout.scss │ │ ├── flyout.js │ │ └── snippets/ │ │ ├── flyout-center.html │ │ ├── flyout-right.html │ │ └── flyout.html │ ├── fullscreen/ │ │ └── _fullscreen.scss │ ├── grid/ │ │ ├── README.md │ │ └── _grid.scss │ ├── header/ │ │ ├── README.md │ │ ├── _header.scss │ │ ├── header.js │ │ └── snippets/ │ │ └── header-sticky.html │ ├── index.js │ ├── index.scss │ ├── indicator/ │ │ ├── _indicator-themes.scss │ │ ├── _indicator.scss │ │ ├── indicator.js │ │ └── snippets/ │ │ ├── indicator-image.html │ │ └── indicator.html │ ├── list/ │ │ ├── README.md │ │ └── _list.scss │ ├── modal/ │ │ ├── README.md │ │ ├── _modal.scss │ │ ├── modal-default.js │ │ ├── modal-dialog.js │ │ ├── modal-morph.js │ │ ├── modal.js │ │ └── snippets/ │ │ ├── modal-layer.html │ │ ├── modal-morphing-layer.html │ │ ├── modal-window.html │ │ └── modal.html │ ├── nav/ │ │ ├── README.md │ │ ├── _nav-themes.scss │ │ ├── _nav.scss │ │ ├── nav-bar.js │ │ ├── nav-dropdown.js │ │ ├── nav-list.js │ │ ├── nav.js │ │ └── snippets/ │ │ ├── nav-bar-small.html │ │ ├── nav-bar.html │ │ ├── nav-dropdown-sticky.html │ │ ├── nav-dropdown.html │ │ ├── nav-list-icons.html │ │ ├── nav-list-large-icons.html │ │ ├── nav-tab-overlap.html │ │ ├── nav-tab-small.html │ │ ├── nav-tab.html │ │ └── nav.html │ ├── notification/ │ │ ├── _notification.scss │ │ ├── notification.js │ │ └── snippets/ │ │ ├── notification-light.html │ │ └── notification.html │ ├── pager/ │ │ ├── README.md │ │ ├── _pager-themes.scss │ │ ├── _pager.scss │ │ └── snippets/ │ │ ├── pager-minimal.html │ │ ├── pager-pagination.html │ │ └── pager.html │ ├── pagination/ │ │ ├── _pagination-themes.scss │ │ ├── _pagination.scss │ │ ├── pagination.js │ │ └── snippets/ │ │ └── pagination.html │ ├── player/ │ │ ├── README.md │ │ ├── _player.scss │ │ ├── player.js │ │ └── snippets/ │ │ ├── player_chrome.html │ │ ├── player_large-button.html │ │ ├── player_overlay.html │ │ ├── player_related-container.html │ │ └── player_video-container.html │ ├── popover/ │ │ ├── README.md │ │ ├── _popover.scss │ │ ├── popover.js │ │ └── snippets/ │ │ ├── popover-dark.html │ │ ├── popover-image.html │ │ └── popover.html │ ├── progress/ │ │ ├── _progress-themes.scss │ │ ├── _progress.scss │ │ ├── progress.js │ │ └── snippets/ │ │ ├── continuous-progress.html │ │ └── progress.html │ ├── radio/ │ │ ├── README.md │ │ ├── _radio-themes.scss │ │ ├── _radio.scss │ │ ├── radio.js │ │ └── snippets/ │ │ ├── radio-checked-disabled.html │ │ ├── radio-checked.html │ │ ├── radio-disabled.html │ │ └── radio.html │ ├── requirements.scss │ ├── response/ │ │ ├── README.md │ │ ├── _response.scss │ │ └── response.js │ ├── select/ │ │ ├── _select-themes.scss │ │ ├── _select.scss │ │ ├── select.js │ │ └── snippets/ │ │ ├── select-disabled.html │ │ ├── select-invalid.html │ │ └── select.html │ ├── slider/ │ │ ├── _slider-themes.scss │ │ ├── _slider.scss │ │ ├── slider.js │ │ └── snippets/ │ │ ├── slider-disabled.html │ │ ├── slider-output.html │ │ ├── slider-range-disabled.html │ │ └── slider-range.html │ ├── spinner/ │ │ ├── _spinner-themes.scss │ │ ├── _spinner.scss │ │ ├── snippets/ │ │ │ ├── continuous-spinner.html │ │ │ └── spinner.html │ │ └── spinner.js │ ├── sr-only/ │ │ ├── README.md │ │ └── _sr-only.scss │ ├── sticky/ │ │ └── sticky.js │ ├── switch/ │ │ ├── README.md │ │ ├── _switch-themes.scss │ │ ├── _switch.scss │ │ └── snippets/ │ │ ├── switch-checked-disabled.html │ │ ├── switch-checked.html │ │ ├── switch-disabled.html │ │ ├── switch-equal-checked-disabled.html │ │ ├── switch-equal-disabled.html │ │ ├── switch-equal.html │ │ ├── switch-text-left-disabled.html │ │ ├── switch-text-left.html │ │ ├── switch-without-text.html │ │ └── switch.html │ ├── table/ │ │ ├── README.md │ │ ├── _table-themes.scss │ │ ├── _table.scss │ │ └── snippets/ │ │ ├── table-colored.html │ │ ├── table-nonsemantic.html │ │ ├── table-responsive.html │ │ ├── table-stretched-responsive.html │ │ └── table-stretched.html │ ├── textfield/ │ │ ├── README.md │ │ ├── _textfield-themes.scss │ │ ├── _textfield.scss │ │ ├── snippets/ │ │ │ ├── textfield-disabled.html │ │ │ ├── textfield-floating-label.html │ │ │ ├── textfield-icon.html │ │ │ ├── textfield-invalid.html │ │ │ ├── textfield-multiline-counter.html │ │ │ ├── textfield-multiline-disabled.html │ │ │ ├── textfield-multiline-invalid.html │ │ │ ├── textfield-multiline.html │ │ │ ├── textfield-valid.html │ │ │ └── textfield.html │ │ └── textfield.js │ ├── tooltip/ │ │ ├── README.md │ │ ├── _tooltip.scss │ │ ├── snippets/ │ │ │ ├── tooltip-dark.html │ │ │ ├── tooltip-image-dark.html │ │ │ ├── tooltip-image.html │ │ │ └── tooltip.html │ │ └── tooltip.js │ ├── typography/ │ │ ├── README.md │ │ ├── _typography.scss │ │ └── snippets/ │ │ ├── headline-1.html │ │ ├── headline-2.html │ │ ├── headline-3.html │ │ ├── headline-4.html │ │ ├── headline-5.html │ │ ├── headline-6.html │ │ ├── list-arrow.html │ │ ├── list-bullet.html │ │ ├── list-number.html │ │ ├── paragraph-big.html │ │ ├── paragraph-caption.html │ │ ├── paragraph-shortread.html │ │ ├── paragraph-small.html │ │ ├── paragraph.html │ │ └── textlink.html │ ├── util/ │ │ ├── _units.scss │ │ ├── animation-end-event.js │ │ ├── clamp.js │ │ ├── closest.js │ │ ├── is-none.js │ │ ├── limit.js │ │ ├── map-linear.js │ │ ├── matches.js │ │ ├── object-resize.js │ │ ├── reflow.js │ │ ├── resize-observer.js │ │ ├── scroll-observer-element.js │ │ ├── scroll-observer.js │ │ ├── signal.js │ │ └── transition-end-event.js │ └── visibility/ │ ├── README.md │ └── _visibility.scss └── test/ └── visual/ ├── js/ │ └── test.js ├── pages/ │ ├── _layouts/ │ │ ├── default.nunjucks │ │ ├── page-color.nunjucks │ │ └── page.nunjucks │ ├── _macros/ │ │ ├── helpers.nunjucks │ │ ├── icon.nunjucks │ │ └── section.nunjucks │ ├── _shared/ │ │ ├── color-control.nunjucks │ │ ├── demo-content.nunjucks │ │ ├── nav.nunjucks │ │ └── section.nunjucks │ ├── audioplayer/ │ │ └── index.nunjucks │ ├── button/ │ │ ├── floating.nunjucks │ │ ├── index.nunjucks │ │ └── sticky.nunjucks │ ├── button-group/ │ │ └── index.nunjucks │ ├── card/ │ │ └── index.nunjucks │ ├── draganddrop/ │ │ ├── dropzone-fullpage.nunjucks │ │ └── index.nunjucks │ ├── form/ │ │ └── index.nunjucks │ ├── index.nunjucks │ ├── loading/ │ │ └── index.nunjucks │ ├── modal/ │ │ └── index.nunjucks │ ├── navigation/ │ │ ├── header.nunjucks │ │ └── index.nunjucks │ ├── notification/ │ │ ├── alert-animate.nunjucks │ │ ├── alert-danger.nunjucks │ │ ├── alert-sticky.nunjucks │ │ ├── alert-success.nunjucks │ │ ├── alert-warning.nunjucks │ │ └── index.nunjucks │ ├── pagination/ │ │ └── index.nunjucks │ ├── player/ │ │ └── index.nunjucks │ ├── popover/ │ │ └── index.nunjucks │ ├── switch/ │ │ └── index.nunjucks │ ├── table/ │ │ └── index.nunjucks │ ├── tooltip/ │ │ └── index.nunjucks │ └── typography/ │ └── index.nunjucks └── scss/ ├── components/ │ ├── align.scss │ ├── color.scss │ ├── control.scss │ ├── header.scss │ ├── main.scss │ ├── nav.scss │ ├── section.scss │ ├── snippet.scss │ └── spacing.scss ├── mixins.scss └── test.scss ================================================ FILE CONTENTS ================================================ ================================================ FILE: .babelrc ================================================ { "presets": ["es2015"], "plugins": [ "babel-plugin-add-module-exports", ["transform-es2015-classes", { "loose": true }] ] } ================================================ FILE: .editorconfig ================================================ # EditorConfig helps developers define and maintain consistent # coding styles between different editors and IDEs # editorconfig.org root = true [*] # Change these settings to your own preference indent_style = space indent_size = 2 # We recommend you to keep these unchanged end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true curly_bracket_next_line = false spaces_around_operators = false spaces_around_brackets = both [*.md] trim_trailing_whitespace = false ================================================ FILE: .eslintrc ================================================ { "parser": "babel-eslint", "env": { "browser": true, "es6": true, "node": true, "jquery": true }, "ecmaFeatures": { "classes": true, "globalReturn": true, "modules": true }, "rules": { "no-debugger": 1, "eqeqeq": 1, "key-spacing": 0, "new-cap": 0, "strict": [2, "global"], "no-underscore-dangle": 0, "no-use-before-define": 0, "eol-last": 0, "quotes": 0, "semi": 0, "space-infix-ops": 0, "no-trailing-spaces": 0, "no-multi-spaces": 0, "no-alert": 0, "no-undef": 2, "no-unused-vars": [1, { "vars": "local", "args": "none" }], "valid-jsdoc": [1, { "prefer": { "arg": "param", "argument": "param", "class": "constructor", "return": "returns", "virtual": "abstract" }, # "preferType": { # "Boolean": "boolean", # "Number": "number", # "object": "Object", # "array": "Array", # "String": "string" # }, "requireReturn": false }] }, "globals": { "document": false, "escape": false, "navigator": false, "unescape": false, "window": true, "describe": true, "before": true, "it": true, "expect": true, "sinon": true } } ================================================ FILE: .gitignore ================================================ # Project specific .temp # Logs logs *.log # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules .DS_Store ================================================ FILE: README.md ================================================ # Audi UI > An implementation of Audi UI components in CSS, Vanilla JavaScript, and HTML. > Complementary [typefaces](https://github.com/audi/audi-type) and [icons](http://github.com/audi/audi-icon) can be found in the corresponding repositories on the same organization account. > Project status: **alpha** ## Want to contribute? If you found a bug, have any questions or want to contribute feel free to file an issue on GitHub. For general information on the audi corporate design please follow the [official guidelines](https://www.audi.com/ci). ## Getting Started ### Build workflow Our current build workflow requires [Gulp](http://gulpjs.com/) v4. Make sure you have the latest version installed. You will need to remove your current gulp global package before installing v4 in order to do an upgrade. ``` npm rm -g gulp npm install -g gulp-cli ``` This command removes your current global package and installs v4 from the gulp-cli 4.0 branch. Make sure you don't get any errors from the first command before you type the second. Depending on your set-up, you may need to run them with `sudo`. To verify what version you have installed globally, you can run the below command (and should see a similar output). ``` gulp -v CLI version 1.2.2 ``` ### Setup the repo: ``` git clone https://github.com/audi/audi-ui.git && cd audi-ui npm i ``` ### Build library files: ``` gulp ``` ### Build library and run the development server: ``` cd /path/to/audi-ui gulp test:visual ``` ## Use Audi UI for your project #### 1. Install Audi UI via NPM ``` npm install @audi/audi-ui ``` #### 2. Link CSS directly OR import library SCSS in your styles ``` html ``` ``` CSS @import "/node_modules/@audi/audi-ui/src/index"; ``` #### 3. Initialize JS ``` JavaScript // Add DOM4 support, https://github.com/WebReflection/dom4 import 'dom4'; // Add Babel polyfill for ES2015, https://babeljs.io/docs/usage/polyfill/ import 'babel-polyfill'; // Import all components from Audi UI library import aui from 'audi-ui'; // Or only some import {Modal, Nav, Spinner} from 'audi-ui'; // Initialize all Audi UI components aui.upgradeAllElements(); // Or only some Modal.upgradeElements(); Nav.upgradeElements(); Spinner.upgradeElements(); ``` #### 4. Check if JavaScript is enabled We use an approach like [Modernizr](https://modernizr.com/docs#no-js) to detect JS support, and change the styling accordingly. Add the class `aui-no-js` to the `html` element. ``` html ``` Replace the name with `aui-js` if JS is supported. ``` html ``` ## Browser Support Supported evergreen browsers: - Chrome - Edge - Firefox - Opera Supported versioned browsers: - Internet Explorer 10 - Safari 8 - Mobile Safari 8 ================================================ FILE: dist/audi-ui.css ================================================ /** * @audi/audi-ui - Audi UI components in HTML, CSS and JS. * @version v1.0.0-alpha.1 * @license Apache-2.0 * @copyright 2023 Audi * @link https://github.com/audi/audi-ui */ @charset "UTF-8"; /** * Returns multiple unit * @param {number (unitless)} $multiple * @return {number (rem)} */ /** * Convert pixels to ems * eg. for a relational value of 12px write em(12) when the parent is equal * the em-base (defined in $audui-config). * If the parent is another value say 24px write em(12, 24) * @param {number (px)} $val * @param {number} $base * @return {number (em)} */ /** * Convert pixels to rems * Assumes that the defined em-base is the font-size of * @param {number (px)} $val * @param {number} $base * @return {number (rem)} */ /** * Strips the unit from a number. * @param {number (with unit)} $value * @return {number (unitless)} */ /** * Modular Scale */ /** * Animation & Transitions */ /** * Colors */ /** * Font */ /** * Icons */ /** * SVG */ /** * Breakpoints */ /** * Card Component */ /** * Form Field Components, like Textfield */ /** * Grid Component */ /** * Visibility Component */ /** * z-index */ .aui-js .aui-checkbox__input, .aui-js .aui-radio__input, .aui-switch .aui-switch__input { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: absolute; width: 0; height: 0; overflow: hidden; margin: 0; padding: 0; border: 0; outline: 0; opacity: 0; z-index: -1; } .aui-alert { position: relative; transition: height 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); font-size: 14px; line-height: 20px; } @media (min-width: 375px) { .aui-alert { font-size: 14px; line-height: 20px; } } @media (min-width: 1024px) { .aui-alert { font-size: 15px; line-height: 24px; } } @media (min-width: 1920px) { .aui-alert { font-size: 16px; line-height: 24px; } } .aui-alert__content { position: relative; color: inherit; background: inherit; margin-right: 27px; padding: 1.25rem 3.5rem 1.25rem 1.75rem; transition: transform 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), box-shadow 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-alert__close { position: absolute; top: 1.25rem; right: 1.75rem; width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23333333' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E") center center no-repeat; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-alert.aui-color-text-light .aui-alert__close, .aui-alert.aui-color-text-warning .aui-alert__close { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23f2f2f2' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E"); } .aui-alert--sticky .aui-alert__content { position: fixed; top: 0; left: 0; width: 100%; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); z-index: 1700; } .aui-alert.is-open .aui-alert__content { transform: translateY(0); } .aui-alert.is-closed { overflow: hidden; height: 0 !important; } .aui-alert.is-closed .aui-alert__content { box-shadow: none; transform: translateY(-100%); } .aui-audioplayer { padding: 1.25rem; } .aui-audioplayer__controls { line-height: 23px; -ms-flex-order: 1; order: 1; margin-left: 1rem; } .aui-audioplayer__controls .aui-button-group { -ms-flex-flow: row nowrap; flex-flow: row nowrap; } .aui-audioplayer__controls--secondary { margin-top: 1rem; -ms-flex-order: 2; order: 2; } .aui-audioplayer__chrome { -ms-flex-align: center; align-items: center; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; height: 100%; -ms-flex-pack: justify; justify-content: space-between; vertical-align: middle; } .aui-audioplayer__cover { background-color: #e5e5e5; display: none; min-height: 100px; min-width: 100px; max-height: 100px; max-width: 100px; } .aui-audioplayer--large-cover .aui-audioplayer__cover { margin-bottom: 20px; max-height: inherit; max-width: inherit; } .aui-audioplayer__cover-image { width: 100%; display: block; } .aui-audioplayer__meta { font-size: 0.875rem; line-height: 1; margin-bottom: 1rem; -ms-flex-order: 0; order: 0; width: 100%; } .aui-audioplayer__time { font-size: 0.75rem; margin-top: 0.25rem; } .aui-audioplayer__title { margin-bottom: 0.25rem; } .aui-audioplayer__icon-previous .audiicon-small, .aui-audioplayer__icon-next .audiicon-small { visibility: visible; } .aui-audioplayer__icon-previous .audiicon-large, .aui-audioplayer__icon-next .audiicon-large { visibility: hidden; } .aui-audioplayer__icon-pause .audiicon-small, .aui-audioplayer__icon-play .audiicon-small { visibility: hidden; } .aui-audioplayer__icon-pause .audiicon-large, .aui-audioplayer__icon-play .audiicon-large { visibility: visible; } .aui-audioplayer__icon-exit-fullscreen, .aui-audioplayer__icon-pause, .aui-audioplayer__icon-replay, .aui-audioplayer__icon-unmute { display: none; } .aui-audioplayer.is-controlled .aui-audioplayer__chrome, .aui-audioplayer:hover .aui-audioplayer__chrome { transform: translateY(0); } .aui-audioplayer.is-seeking .aui-audioplayer__seek-holder { opacity: 1; transition-delay: .1s; } .aui-audioplayer.is-seeking .aui-audioplayer__preview { opacity: 1; transition-delay: .1s; } .aui-audioplayer.is-seeking.aui-player--preview .aui-audioplayer__chrome::after { transition-delay: 0s; } .aui-audioplayer.is-mute .aui-audioplayer__icon-mute { display: none; } .aui-audioplayer.is-mute .aui-audioplayer__icon-unmute { display: inline-block; } .aui-audioplayer.is-playing .aui-audioplayer__icon-play { display: none; } .aui-audioplayer.is-playing .aui-audioplayer__icon-pause { display: inline-block; } .aui-audioplayer.is-complete .aui-audioplayer__icon-pause, .aui-audioplayer.is-complete .aui-audioplayer__icon-play { display: none; } .aui-audioplayer.is-complete .aui-audioplayer__icon-replay { display: inline-block; } .aui-audioplayer .aui-slider { min-height: 1.25rem; } .aui-audioplayer .aui-slider__handle { height: 1.25rem; width: 1.25rem; } .aui-audioplayer .aui-slider__target { height: 1.25rem; margin-left: 0.625rem; margin-right: 0.625rem; } @media (min-width: 1024px) { .aui-audioplayer { padding: 1.25rem 1rem 1.25rem 0px; } .aui-audioplayer--frameless { padding: 0px 1rem 0px 0px; } .aui-audioplayer__controls--secondary { margin-top: 0; margin-left: 1rem; } .aui-audioplayer__chrome { -ms-flex-direction: row; flex-direction: row; } .aui-audioplayer__cover { display: block; margin-right: 1rem; } .aui-audioplayer__cover-image { max-width: 100px; } .aui-audioplayer--large-cover .aui-audioplayer__cover { margin-right: 0; } .aui-audioplayer--large-cover .aui-audioplayer__cover-image { max-width: none; } .aui-audioplayer__meta { margin-bottom: 0; margin-left: 1rem; margin-top: 0; -ms-flex-order: 2; order: 2; } .aui-audioplayer__playhead { width: 1.25rem; height: 1.25rem; } } .aui-animation-morph-in, .aui-animation-morph-out { transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); transition-duration: .6s; } .aui-no-transition { transition: none !important; } body::before { content: 'default'; display: none; } @media (min-width: 0px) { body::before { content: "xsmall"; } } @media (min-width: 375px) { body::before { content: "small"; } } @media (min-width: 768px) { body::before { content: "medium"; } } @media (min-width: 1024px) { body::before { content: "large"; } } @media (min-width: 1440px) { body::before { content: "xlarge"; } } @media (min-width: 1920px) { body::before { content: "huge"; } } @-moz-viewport { width: device-width; } @-ms-viewport { width: device-width; } @-webkit-viewport { width: device-width; } @viewport { width: device-width; } .aui-badge__dot { display: inline-block; font-family: 'AudiTypeWide', Verdana, Geneva, sans-serif; font-weight: 400; line-height: 24px; border-radius: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; transition: transform 0.25s cubic-bezier(0.75, 0.02, 0.5, 1), visibility 0.25s cubic-bezier(0.75, 0.02, 0.5, 1), color 0.25s cubic-bezier(0.75, 0.02, 0.5, 1) 0.1s; vertical-align: middle; } .aui-badge__dot--large { width: 24px; height: 24px; font-size: 12px; } .aui-badge__dot--small { width: 8px; height: 8px; margin: 8px; } .aui-badge__dot--signal-yellow { border-radius: 0; transform: rotate(45deg); background-color: #ffaa00; } .aui-badge__dot--signal-green { background-color: #009900; } .aui-badge__dot--signal-red { margin: 8px 7px; border-radius: 0; width: 0; height: 0; border-style: solid; border-width: 0 5px 8px 5px; border-color: transparent transparent #eb0d3f transparent; } .aui-badge__dot--charging-neon-green { background-color: #15da15; } .aui-badge__dot--charging-green { background-color: #0da20d; } .aui-badge__dot--charging-neon-blue { background-color: #556EFE; } .aui-badge__dot--charging-blue { background-color: #2526fe; } .aui-badge.is-hidden { transform: scale(0); color: transparent !important; transition-delay: 0s; visibility: hidden; } .aui-badge--small-text { font-size: 10px; } .aui-badge--label { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; } .aui-badge--icon { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; } .aui-badge--icon .audiicon { width: 24px; height: 24px; } .aui-badge__label { font-size: 1rem; } .aui-badge__label--small { font-size: 0.75rem; } .aui-badge.aui-color-text-light { color: #ffffff; stroke: #ffffff; fill: #ffffff; } .aui-breadcrumb { display: block; overflow: hidden; position: relative; padding-top: 0.25rem; color: #666666; font-size: 0.6875rem; line-height: 1rem; font-weight: 400; } .aui-breadcrumb__items { display: block; overflow: hidden; white-space: nowrap; list-style: none; padding: 0; } .aui-breadcrumb__item { display: inline-block; max-width: 10em; overflow: hidden; text-overflow: ellipsis; } .aui-breadcrumb__item:last-child { color: #000000; max-width: 22em; } .aui-breadcrumb__item + .aui-breadcrumb__item::before { content: ''; display: inline-block; margin-left: .5em; margin-right: .7em; width: 0.3125rem; height: 0.5rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='8' viewBox='0 0 5 8'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='1px' fill='none' d='M0.5,0.5l3.24,3.252l-3.237,3.247' /%3E%3C/svg%3E") center center no-repeat; } .aui-breadcrumb__action { transition: color .15s linear; } .aui-breadcrumb__action:hover { color: #000; } .aui-breadcrumb.is-oversized::after { content: ''; display: block; position: absolute; top: 0; left: 0; width: 40px; height: 100%; background: linear-gradient(to right, #ffffff 5%, rgba(255, 255, 255, 0) 100%); } .aui-button.is-active, .aui-button:active, .aui-button:hover, .aui-button:visited { color: #4c4c4c; stroke: #4c4c4c; fill: #4c4c4c; } .aui-button { border-radius: 0; cursor: pointer; display: inline-block; position: relative; padding: 1em 0 1em 0; outline: 0; font-family: inherit; font-size: 1rem; font-weight: 400; line-height: 1.5rem; text-align: center; text-decoration: none; white-space: normal; vertical-align: middle; transition: all 250ms cubic-bezier(0.75, 0.02, 0.5, 1); -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-button, .aui-button.is-disabled, .aui-button:disabled { color: #000000; stroke: #000000; fill: #000000; border: 1px solid transparent; background: transparent; } .aui-button.is-disabled, .aui-button:disabled { cursor: not-allowed; } .aui-button--bold { font-weight: 700; } .aui-button--padded, .aui-button--primary, .aui-button--secondary { padding-left: 2rem; padding-right: 2rem; } .aui-button--icon.is-disabled, .aui-button--icon:disabled, .aui-button--icon:hover, .aui-button--primary.is-disabled, .aui-button--primary:disabled, .aui-button--primary:hover, .aui-button--secondary.is-disabled, .aui-button--secondary:disabled, .aui-button--secondary:hover { box-shadow: none; } .aui-button--round.is-disabled, .aui-button--round:disabled { color: #b3b3b3; stroke: #b3b3b3; fill: #b3b3b3; } .aui-button--floating.is-active, .aui-button--floating:active, .aui-button--floating:hover, .aui-button--primary.is-active, .aui-button--primary:active, .aui-button--primary:hover { border-color: #4c4c4c; background-color: #4c4c4c; } .aui-button--floating, .aui-button--floating.is-active, .aui-button--floating:active, .aui-button--floating:hover, .aui-button--floating:visited, .aui-button--primary, .aui-button--primary.is-active, .aui-button--primary:active, .aui-button--primary:hover, .aui-button--primary:visited { color: #ffffff; stroke: #ffffff; fill: #ffffff; } .aui-button--floating.is-disabled, .aui-button--floating:disabled, .aui-button--primary.is-disabled, .aui-button--primary:disabled { color: #ffffff; stroke: #ffffff; fill: #ffffff; border-color: #b3b3b3 !important; background-color: #b3b3b3 !important; } .aui-button--floating, .aui-button--floating.is-disabled, .aui-button--floating:disabled, .aui-button--primary, .aui-button--primary.is-disabled, .aui-button--primary:disabled { border-color: #000000; background-color: #000000; } .aui-button--secondary.is-active, .aui-button--secondary:active, .aui-button--secondary:hover { border-color: #808080; } .aui-button--secondary, .aui-button--secondary.is-disabled, .aui-button--secondary:disabled { border-color: #000000; } .aui-button--secondary.is-disabled, .aui-button--secondary:disabled { color: #b3b3b3 !important; border-color: #b3b3b3 !important; } .aui-button--text .aui-button__text::after { content: ''; display: inline-block; position: relative; top: 0.0625em; margin-left: 0.25em; width: 0.5em; height: 0.8125em; background: center no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%23000000' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); background-size: contain; transition: transform 0.2s ease; } .aui-button--text:hover .aui-button__text::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%234c4c4c' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); transform: translateX(5px); } .aui-button--text:disabled .aui-button__text { color: #b3b3b3; } .aui-button--text.is-disabled .aui-button__text::after, .aui-button--text:disabled .aui-button__text::after { transform: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%23b3b3b3' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); } .aui-button--icon { width: 23px; height: 23px; padding: 0; border: none; } .aui-button--icon .audiicon { position: absolute; top: 0; left: 0; margin: 0; width: 24px; height: 24px; } .aui-button--icon--large { width: 45px; height: 45px; } .aui-button--icon--large .audiicon { top: -1px; left: -1px; width: 48px; height: 48px; } .aui-button--icon--large .audiicon-container--small { display: none; } .aui-button--icon--large .audiicon-container--large { display: inline; } .aui-button--round { border-radius: 50%; } .aui-button--stretched { width: 100%; max-width: 767px; } .aui-button--sticky { position: fixed; left: 0; bottom: 0; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } .aui-button--centered { left: 50%; transform: translateX(-50%); } .aui-button--floating { position: fixed; right: 1.5rem; bottom: 1.5rem; width: 45px; height: 45px; padding: 0; z-index: 900; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } .aui-button--floating .audiicon { position: absolute; left: -1px; top: -1px; width: 48px; height: 48px; } .aui-button--floating .audiicon-container--small { display: none; } .aui-button--floating .audiicon-container--large { display: inline; } .aui-button--floating, .aui-button--floating:focus, .aui-button--floating:hover { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } .aui-button__text { display: inline-block; position: relative; text-align: left; } .aui-button__text-icon { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: center; align-items: center; position: relative; text-align: left; vertical-align: middle; } .aui-button__text-icon .audiicon { display: inline-block; } .aui-button__text-icon .aui-button__text:first-child { margin-right: 1em; } .aui-button__text-icon .aui-button__text:not(:first-child) { margin-left: 1em; } .aui-button::-moz-focus-inner { border: 0; padding: 0; } .aui-button-group { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-flow: row wrap; flex-flow: row wrap; -ms-flex-align: center; align-items: center; vertical-align: top; margin-right: -0.2rem; margin-bottom: -0.2rem; } .aui-button-group .aui-button { -ms-flex: 1 1 auto; flex: 1 1 auto; margin: 0 0.2rem 0.2rem 0; } .aui-button-group .aui-button:hover, .aui-button-group .aui-button:focus, .aui-button-group .aui-button:active, .aui-button-group .aui-button.is-active { z-index: 2; } .aui-button-group .aui-button--icon { -ms-flex: 0 0 auto; flex: 0 0 auto; } .aui-button-group--block { display: -ms-flexbox; display: flex; } .aui-button-group--texts { margin-right: -1.2rem; margin-bottom: -1.2rem; } .aui-button-group--texts .aui-button { margin: 0 1.2rem 1.2rem 0; } .aui-button-group--icons { margin-right: -0.6rem; margin-bottom: -0.6rem; } .aui-button-group--icons .aui-button { margin: 0 0.6rem 0.6rem 0; } .aui-card-grid { display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; margin: -0.125rem; } .aui-card-grid .aui-card-grid { margin: 0; } .aui-card-grid__item { display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; -ms-flex-align: stretch; align-items: stretch; -ms-flex-pack: start; justify-content: flex-start; -ms-flex: 1 1 auto; flex: 1 1 auto; width: 288px; } .aui-card-grid__item--column { -ms-flex-direction: column; flex-direction: column; } .aui-card { -ms-flex: 1 1 auto; flex: 1 1 auto; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; position: relative; margin: 0.125rem; width: calc(100% - 0.25rem); background-repeat: no-repeat; background-position: 50% 50%; background-size: cover; background-origin: padding-box; background-attachment: scroll; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1), box-shadow 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); /** * Variant: Action */ /** * Variant: Cover */ } .aui-card__cover { display: block; } .aui-card__cover-image { display: block; width: 100%; height: auto; } .aui-card__body { -ms-flex: 1 1 auto; flex: 1 1 auto; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; } .aui-card__content { padding: 1.25rem; } .aui-card__content--bottom { margin-top: auto; } .aui-card__media { text-align: center; } .aui-card__media img { display: block; width: 100%; height: auto; } .aui-card--action:hover, .aui-card--action:focus { z-index: 1; outline: none; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); transform: translateY(-0.25rem); } .aui-card--cover { -ms-flex-direction: row; flex-direction: row; } .aui-card--cover .aui-card__cover { -ms-flex: 1 1 auto; flex: 1 1 auto; } .aui-card--cover .aui-card__body { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 1; } .aui-checkbox { display: inline-block; position: relative; font-weight: 400; line-height: 1.5; color: #333333; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); /** * Variant: stretch */ /** * Variant: box-right */ /** * Variant: dropdown-option */ /** * States */ } .aui-js .aui-checkbox { padding-left: 2.5em; } .aui-checkbox__label--optional { color: #666666; } .aui-checkbox__box { display: none; overflow: hidden; position: absolute; top: 0; left: 0; width: 1.5em; height: 1.5em; border: 1px solid #808080; transition: box-shadow .15s linear, border .15s linear; cursor: pointer; pointer-events: none; z-index: 1; } .aui-js .aui-checkbox__box { display: inline-block; } .aui-checkbox__tick { display: block; position: absolute; top: 50%; left: 50%; width: 0.75em; height: 0.75em; transform: translate(-50%, -50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23000000' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E") center center no-repeat; opacity: 0; transition: opacity 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); pointer-events: none; } .aui-checkbox__error { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; line-height: 1.25rem; margin-top: 0.875rem; font-size: 0.8125rem; color: #eb0d3f; } .aui-checkbox__error::before { content: ''; display: inline-block; line-height: 1.25rem; margin-right: 1rem; width: 40px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M21.5,20.5 L1.5,20.5 L11.5,2.5 L21.5,20.5 Z M11.5,16 L11.5,18 M11.5,8 L11.5,14' stroke='%23eb0d3f' stroke-width='1' fill-rule='evenodd'/%3E%3C/svg%3E") center center no-repeat; } @media (min-width: 1024px) { .aui-checkbox__error::before { margin-right: 0.625rem; width: 36px; height: 24px; } } .aui-checkbox--stretch { width: 100%; } .aui-js .aui-checkbox--box-right { padding-left: 0; padding-right: 2.5em; } .aui-js .aui-checkbox--box-right .aui-checkbox__box { left: auto; right: 0; } .aui-js .aui-checkbox--dropdown-option { width: 100%; padding-left: 0; padding-right: 2.5em; } .aui-js .aui-checkbox--dropdown-option .aui-checkbox__box { left: auto; right: 0; } .aui-checkbox:hover:not(.is-disabled) { color: #000000; } .aui-checkbox:hover:not(.is-disabled) .aui-checkbox__box { border-color: #000000; } .aui-checkbox.is-disabled { color: #b3b3b3; cursor: not-allowed; } .aui-checkbox.is-checked .aui-checkbox__tick { opacity: 1; } .aui-checkbox.is-invalid, .aui-checkbox.is-invalid .aui-checkbox__label { color: #eb0d3f; } .aui-checkbox.is-invalid .aui-checkbox__tick { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23eb0d3f' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E"); } .aui-checkbox.is-invalid .aui-checkbox__box, .aui-checkbox.is-invalid:hover .aui-checkbox__box { border-color: #eb0d3f; } .aui-color-white { background-color: #ffffff; } .aui-color-black { background-color: #000000; } .aui-color-silver { background-color: #b2b2b2; } .aui-color-warmsilver { background-color: #b6b1a9; } .aui-color-green, .aui-color-success { background-color: #009900; } .aui-color-warning, .aui-color-yellow { background-color: #ffaa00; } .aui-color-danger, .aui-color-red { background-color: #bb0a30; } .aui-color-danger, .aui-color-progressive-red { background-color: #f50537; } .aui-color-signal-red { background-color: #eb0d3f; } .aui-color-gray10 { background-color: #1a1a1a; } .aui-color-gray20 { background-color: #333333; } .aui-color-gray30 { background-color: #4c4c4c; } .aui-color-gray40 { background-color: #666666; } .aui-color-gray50 { background-color: #808080; } .aui-color-gray60 { background-color: #999999; } .aui-color-gray70 { background-color: #b3b3b3; } .aui-color-gray80 { background-color: #cccccc; } .aui-color-gray85 { background-color: #d9d9d9; } .aui-color-gray90 { background-color: #e5e5e5; } .aui-color-gray95 { background-color: #f2f2f2; } .aui-color-text-light { color: #f2f2f2; } .aui-color-text-dark { color: #333333; } .aui-color-text-green, .aui-color-text-success { color: #009900; } .aui-color-text-warning, .aui-color-text-yellow { color: #ffaa00; } .aui-color-text-danger, .aui-color-text-red { color: #bb0a30; } .aui-draggable-list { padding-left: 0; list-style: none; font-weight: 400; } .aui-draggable-list__item { cursor: move; position: relative; padding: 1rem 3rem 1rem 1.5rem; color: rgba(0, 0, 0, 0.8); background: rgba(0, 0, 0, 0.1); transition: background .15s linear, color .15s linear; } .aui-draggable-list__item:hover { color: #000000; background: rgba(0, 0, 0, 0.15); } .aui-draggable-list__item + .aui-draggable-list__item { margin-top: 1px; } .aui-draggable-list.is-dragging .aui-draggable-list__item, .aui-draggable-list.is-dragging .aui-draggable-list__item:hover { background: rgba(0, 0, 0, 0.05); } .aui-draggable-list.is-dragging .aui-draggable-list__item.is-active, .aui-draggable-list.is-dragging .aui-draggable-list__item:hover.is-active { color: #000000; background: #cccccc; } .aui-draggable-list.is-dragging .is-placeholder, .aui-draggable-list.is-dragging .is-placeholder:hover { color: transparent; background: none; } .aui-draggable-list .is-placeholder::before { content: ''; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border: 1px dotted rgba(0, 0, 0, 0.05); } .aui-draggable-list__item:not(.is-placeholder)::after { content: ''; opacity: 0; display: block; position: absolute; top: 50%; right: 1.5rem; width: 16px; height: 5px; margin-top: -2.5px; background: url("data:image/svg+xml;dataset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='5' viewBox='0 0 16 5'%3E%3Crect style='fill:%23000000' x='0' y='0' width='16' height='1' /%3E%3Crect style='fill:%23000000' x='0' y='4' width='16' height='1' /%3E%3C/svg%3E") center center no-repeat; transition: opacity .15s linear; } .aui-draggable-list__item.is-active::after, .aui-draggable-list__item:hover::after { opacity: 1; } /** * Add class `aui-dropzone-active` to body element, to prevent scrolling, * when strechted dropzone is active. */ .aui-dropzone-active { overflow: hidden; } .aui-dropzone { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; -ms-flex-pack: center; justify-content: center; min-height: 1rem; color: #333333; border: 1px dashed rgba(0, 0, 0, 0.2); transition: border 0.15s linear; } .aui-dropzone__message { -ms-flex: none; flex: none; } .aui-dropzone:hover, .aui-dropzone.is-active { border-color: rgba(0, 0, 0, 0.8); } .aui-dropzone--fullpage { visibility: hidden; opacity: 0; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 0; height: 0; background: rgba(255, 255, 255, 0.9); border: none; transition: border 0.15s linear, opacity 0.15s linear, visibility 0.15s linear; } .aui-dropzone--fullpage::after { content: ''; display: block; position: absolute; top: 0.5rem; right: 0.5rem; bottom: 0.5rem; left: 0.5rem; border: 1px dashed rgba(0, 0, 0, 0.8); } .aui-dropzone--fullpage.is-active { visibility: visible; overflow: visible; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; opacity: 1; padding: 0.5rem; } .aui-figure { display: block; margin: 0; } .aui-figure__image { display: block; max-width: 100%; height: auto; } .aui-figure__caption { margin-top: 1rem; } .aui-fieldset { margin: 0; padding: 0; border: none; line-height: 1.5rem; font-weight: 400; color: #333333; box-sizing: border-box; } .aui-fieldset--selects .aui-fieldset__legend, .aui-fieldset--textfields .aui-fieldset__legend { font-weight: 700; color: #333333; } .aui-fieldset--radios .aui-fieldset__legend { margin-bottom: 1rem; } .aui-fieldset__fields { display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; margin-right: -1.5rem; margin-bottom: -1.5rem; } .aui-fieldset__field { -ms-flex: 1 1 auto; flex: 1 1 auto; margin-right: 1.5rem; margin-bottom: 1.5rem; } .aui-fieldset--radios .aui-fieldset__field { -ms-flex: 0 1 auto; flex: 0 1 auto; } .aui-fieldset--radios.is-invalid .aui-radio__label { color: #eb0d3f; } .aui-fieldset__error { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; line-height: 1.25rem; margin-top: 0.875rem; font-size: 0.8125rem; color: #eb0d3f; } .aui-fieldset__error::before { content: ''; display: inline-block; margin-right: 1rem; width: 24px; min-width: 24px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M21.5,20.5 L1.5,20.5 L11.5,2.5 L21.5,20.5 Z M11.5,16 L11.5,18 M11.5,8 L11.5,14' stroke='%23eb0d3f' stroke-width='1' fill-rule='evenodd'/%3E%3C/svg%3E") center center no-repeat; } @media (min-width: 1024px) { .aui-fieldset__error::before { margin-right: 0.5rem; } } .aui-fieldset.is-invalid .aui-fieldset__error, .aui-fieldset.is-invalid .aui-fieldset__legend { color: #eb0d3f; } /** * Prevent scrolling of body, when Flyout is open. * Added to body by JS. */ @media (max-width: 399px) { .aui-flyout-is-open { overflow: hidden; } } .aui-flyout { display: inline-block; position: relative; } .aui-flyout__toggle { z-index: 1; } .aui-flyout__panel { display: block; opacity: 0; overflow: hidden; position: fixed; top: 0; left: 0; right: 0; bottom: 0; max-height: 0; color: #333333; background: #e5e5e5; font-size: .875rem; font-weight: 400; line-height: 1.25rem; text-align: left; transition: opacity 0.2s linear, transform 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), max-height 0.1s linear 0.4s; } .aui-flyout__panel-content { position: absolute; top: 68px; left: 0; right: 0; bottom: 0; overflow: scroll; -webkit-overflow-scrolling: touch; opacity: 0; padding: 0.5rem 1.75rem; transition: opacity 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); z-index: 1; background-color: inherit; } .aui-flyout__triangle { position: absolute; top: 0; margin-left: 1.5rem; background: inherit; opacity: 0; transition: opacity 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-flyout__triangle::after { content: ''; display: block; position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; transform: rotate(45deg); transform-origin: center; background: inherit; box-shadow: -1px -1px 4px rgba(0, 0, 0, 0.05); } .aui-flyout--center .aui-flyout__triangle { left: 50%; margin-left: 0; } .aui-flyout--right .aui-flyout__triangle { left: 100%; margin-left: -1.5rem; } .aui-flyout__header { position: absolute; top: 0; left: 0; width: 100%; height: 3.5625rem; } .aui-flyout__close { position: absolute; top: 1.25rem; right: 1.25rem; width: 1.0625rem; height: 1.0625rem; outline: 0; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23333333' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E") center center no-repeat; z-index: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-flyout::after { content: ''; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; } .aui-flyout.is-active::after { bottom: -1.25rem; } .aui-flyout.is-active .aui-flyout__panel { opacity: 1; max-height: 9999px; transition-delay: 0s; z-index: 9999; overflow: visible; } .aui-flyout.is-active .aui-flyout__panel-content { opacity: 1; transition-delay: .2s; } .aui-flyout.is-active .aui-flyout__triangle { opacity: 1; transition-delay: .2s; } @media (min-width: 400px) { .aui-flyout__panel { position: absolute; top: 100%; left: 0; right: auto; bottom: auto; margin-top: 1.25rem; max-width: 288px; color: #333333; background: #ffffff; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); transform: translateY(-10px); } .aui-flyout__panel-content { position: relative; top: auto; left: auto; right: auto; bottom: auto; overflow: auto; } .aui-flyout__header { display: none; } .aui-flyout--right .aui-flyout__panel { left: auto; right: 0; } .aui-flyout--center .aui-flyout__panel { left: 50%; transform: translate(-50%, -10px); } .aui-flyout.is-active .aui-flyout__panel { transform: translateY(0); transition-delay: 0s; } .aui-flyout.is-active.aui-flyout--center .aui-flyout__panel { transform: translate(-50%, 0); } } .aui-layout { margin-left: auto; margin-right: auto; padding-left: 4.375%; padding-right: 4.375%; } .aui-grid { margin-left: -0.25rem; box-sizing: border-box; } .aui-grid::after { content: ' '; display: block; clear: both; } .aui-cell { float: left; width: 100%; padding-left: 0.25rem; } .aui-cell--1 { width: 8.3333333333%; } .aui-cell--2 { width: 16.6666666667%; } .aui-cell--3 { width: 25%; } .aui-cell--4 { width: 33.3333333333%; } .aui-cell--5 { width: 41.6666666667%; } .aui-cell--6 { width: 50%; } .aui-cell--7 { width: 58.3333333333%; } .aui-cell--8 { width: 66.6666666667%; } .aui-cell--9 { width: 75%; } .aui-cell--10 { width: 83.3333333333%; } .aui-cell--11 { width: 91.6666666667%; } .aui-cell--12 { width: 100%; } .aui-cell--spacing-left { padding-left: 1rem; } .aui-grid--nested-2 .aui-cell { width: 600%; } .aui-grid--nested-2 .aui-cell--1 { width: 50%; } .aui-grid--nested-2 .aui-cell--2 { width: 100%; } .aui-grid--nested-2 .aui-cell--3 { width: 150%; } .aui-grid--nested-2 .aui-cell--4 { width: 200%; } .aui-grid--nested-2 .aui-cell--5 { width: 250%; } .aui-grid--nested-2 .aui-cell--6 { width: 300%; } .aui-grid--nested-2 .aui-cell--7 { width: 350%; } .aui-grid--nested-2 .aui-cell--8 { width: 400%; } .aui-grid--nested-2 .aui-cell--9 { width: 450%; } .aui-grid--nested-2 .aui-cell--10 { width: 500%; } .aui-grid--nested-2 .aui-cell--11 { width: 550%; } .aui-grid--nested-2 .aui-cell--12 { width: 600%; } .aui-grid--nested-3 .aui-cell { width: 400%; } .aui-grid--nested-3 .aui-cell--1 { width: 33.3333333333%; } .aui-grid--nested-3 .aui-cell--2 { width: 66.6666666667%; } .aui-grid--nested-3 .aui-cell--3 { width: 100%; } .aui-grid--nested-3 .aui-cell--4 { width: 133.333333333%; } .aui-grid--nested-3 .aui-cell--5 { width: 166.666666667%; } .aui-grid--nested-3 .aui-cell--6 { width: 200%; } .aui-grid--nested-3 .aui-cell--7 { width: 233.333333333%; } .aui-grid--nested-3 .aui-cell--8 { width: 266.666666667%; } .aui-grid--nested-3 .aui-cell--9 { width: 300%; } .aui-grid--nested-3 .aui-cell--10 { width: 333.333333333%; } .aui-grid--nested-3 .aui-cell--11 { width: 366.666666667%; } .aui-grid--nested-3 .aui-cell--12 { width: 400%; } .aui-grid--nested-4 .aui-cell { width: 300%; } .aui-grid--nested-4 .aui-cell--1 { width: 25%; } .aui-grid--nested-4 .aui-cell--2 { width: 50%; } .aui-grid--nested-4 .aui-cell--3 { width: 75%; } .aui-grid--nested-4 .aui-cell--4 { width: 100%; } .aui-grid--nested-4 .aui-cell--5 { width: 125%; } .aui-grid--nested-4 .aui-cell--6 { width: 150%; } .aui-grid--nested-4 .aui-cell--7 { width: 175%; } .aui-grid--nested-4 .aui-cell--8 { width: 200%; } .aui-grid--nested-4 .aui-cell--9 { width: 225%; } .aui-grid--nested-4 .aui-cell--10 { width: 250%; } .aui-grid--nested-4 .aui-cell--11 { width: 275%; } .aui-grid--nested-4 .aui-cell--12 { width: 300%; } .aui-grid--nested-5 .aui-cell { width: 240%; } .aui-grid--nested-5 .aui-cell--1 { width: 20%; } .aui-grid--nested-5 .aui-cell--2 { width: 40%; } .aui-grid--nested-5 .aui-cell--3 { width: 60%; } .aui-grid--nested-5 .aui-cell--4 { width: 80%; } .aui-grid--nested-5 .aui-cell--5 { width: 100%; } .aui-grid--nested-5 .aui-cell--6 { width: 120%; } .aui-grid--nested-5 .aui-cell--7 { width: 140%; } .aui-grid--nested-5 .aui-cell--8 { width: 160%; } .aui-grid--nested-5 .aui-cell--9 { width: 180%; } .aui-grid--nested-5 .aui-cell--10 { width: 200%; } .aui-grid--nested-5 .aui-cell--11 { width: 220%; } .aui-grid--nested-5 .aui-cell--12 { width: 240%; } .aui-grid--nested-6 .aui-cell { width: 200%; } .aui-grid--nested-6 .aui-cell--1 { width: 16.6666666667%; } .aui-grid--nested-6 .aui-cell--2 { width: 33.3333333333%; } .aui-grid--nested-6 .aui-cell--3 { width: 50%; } .aui-grid--nested-6 .aui-cell--4 { width: 66.6666666667%; } .aui-grid--nested-6 .aui-cell--5 { width: 83.3333333333%; } .aui-grid--nested-6 .aui-cell--6 { width: 100%; } .aui-grid--nested-6 .aui-cell--7 { width: 116.666666667%; } .aui-grid--nested-6 .aui-cell--8 { width: 133.333333333%; } .aui-grid--nested-6 .aui-cell--9 { width: 150%; } .aui-grid--nested-6 .aui-cell--10 { width: 166.666666667%; } .aui-grid--nested-6 .aui-cell--11 { width: 183.333333333%; } .aui-grid--nested-6 .aui-cell--12 { width: 200%; } .aui-grid--nested-7 .aui-cell { width: 171.428571429%; } .aui-grid--nested-7 .aui-cell--1 { width: 14.2857142857%; } .aui-grid--nested-7 .aui-cell--2 { width: 28.5714285714%; } .aui-grid--nested-7 .aui-cell--3 { width: 42.8571428571%; } .aui-grid--nested-7 .aui-cell--4 { width: 57.1428571429%; } .aui-grid--nested-7 .aui-cell--5 { width: 71.4285714286%; } .aui-grid--nested-7 .aui-cell--6 { width: 85.7142857143%; } .aui-grid--nested-7 .aui-cell--7 { width: 100%; } .aui-grid--nested-7 .aui-cell--8 { width: 114.285714286%; } .aui-grid--nested-7 .aui-cell--9 { width: 128.571428571%; } .aui-grid--nested-7 .aui-cell--10 { width: 142.857142857%; } .aui-grid--nested-7 .aui-cell--11 { width: 157.142857143%; } .aui-grid--nested-7 .aui-cell--12 { width: 171.428571429%; } .aui-grid--nested-8 .aui-cell { width: 150%; } .aui-grid--nested-8 .aui-cell--1 { width: 12.5%; } .aui-grid--nested-8 .aui-cell--2 { width: 25%; } .aui-grid--nested-8 .aui-cell--3 { width: 37.5%; } .aui-grid--nested-8 .aui-cell--4 { width: 50%; } .aui-grid--nested-8 .aui-cell--5 { width: 62.5%; } .aui-grid--nested-8 .aui-cell--6 { width: 75%; } .aui-grid--nested-8 .aui-cell--7 { width: 87.5%; } .aui-grid--nested-8 .aui-cell--8 { width: 100%; } .aui-grid--nested-8 .aui-cell--9 { width: 112.5%; } .aui-grid--nested-8 .aui-cell--10 { width: 125%; } .aui-grid--nested-8 .aui-cell--11 { width: 137.5%; } .aui-grid--nested-8 .aui-cell--12 { width: 150%; } .aui-grid--nested-9 .aui-cell { width: 133.333333333%; } .aui-grid--nested-9 .aui-cell--1 { width: 11.1111111111%; } .aui-grid--nested-9 .aui-cell--2 { width: 22.2222222222%; } .aui-grid--nested-9 .aui-cell--3 { width: 33.3333333333%; } .aui-grid--nested-9 .aui-cell--4 { width: 44.4444444444%; } .aui-grid--nested-9 .aui-cell--5 { width: 55.5555555556%; } .aui-grid--nested-9 .aui-cell--6 { width: 66.6666666667%; } .aui-grid--nested-9 .aui-cell--7 { width: 77.7777777778%; } .aui-grid--nested-9 .aui-cell--8 { width: 88.8888888889%; } .aui-grid--nested-9 .aui-cell--9 { width: 100%; } .aui-grid--nested-9 .aui-cell--10 { width: 111.111111111%; } .aui-grid--nested-9 .aui-cell--11 { width: 122.222222222%; } .aui-grid--nested-9 .aui-cell--12 { width: 133.333333333%; } .aui-grid--nested-10 .aui-cell { width: 120%; } .aui-grid--nested-10 .aui-cell--1 { width: 10%; } .aui-grid--nested-10 .aui-cell--2 { width: 20%; } .aui-grid--nested-10 .aui-cell--3 { width: 30%; } .aui-grid--nested-10 .aui-cell--4 { width: 40%; } .aui-grid--nested-10 .aui-cell--5 { width: 50%; } .aui-grid--nested-10 .aui-cell--6 { width: 60%; } .aui-grid--nested-10 .aui-cell--7 { width: 70%; } .aui-grid--nested-10 .aui-cell--8 { width: 80%; } .aui-grid--nested-10 .aui-cell--9 { width: 90%; } .aui-grid--nested-10 .aui-cell--10 { width: 100%; } .aui-grid--nested-10 .aui-cell--11 { width: 110%; } .aui-grid--nested-10 .aui-cell--12 { width: 120%; } .aui-grid--nested-11 .aui-cell { width: 109.090909091%; } .aui-grid--nested-11 .aui-cell--1 { width: 9.0909090909%; } .aui-grid--nested-11 .aui-cell--2 { width: 18.1818181818%; } .aui-grid--nested-11 .aui-cell--3 { width: 27.2727272727%; } .aui-grid--nested-11 .aui-cell--4 { width: 36.3636363636%; } .aui-grid--nested-11 .aui-cell--5 { width: 45.4545454545%; } .aui-grid--nested-11 .aui-cell--6 { width: 54.5454545455%; } .aui-grid--nested-11 .aui-cell--7 { width: 63.6363636364%; } .aui-grid--nested-11 .aui-cell--8 { width: 72.7272727273%; } .aui-grid--nested-11 .aui-cell--9 { width: 81.8181818182%; } .aui-grid--nested-11 .aui-cell--10 { width: 90.9090909091%; } .aui-grid--nested-11 .aui-cell--11 { width: 100%; } .aui-grid--nested-11 .aui-cell--12 { width: 109.090909091%; } .aui-header { z-index: 100; top: 0; font-size: 12px; height: 3.5rem; } .aui-header__content { display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; -ms-flex-align: center; align-items: center; height: 3.5rem; transition: box-shadow linear .15s; } .aui-header--grid .aui-header__content { padding: 0 4.375%; } .aui-header.is-sticky .aui-header__content { z-index: 100; position: fixed; top: 0; left: 0; width: 100%; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } .aui-list { counter-reset: li; margin-left: 0; padding-left: 0; list-style: none; font-size: 16px; line-height: 24px; } @media (min-width: 375px) { .aui-list { font-size: 16px; line-height: 24px; } } @media (min-width: 1024px) { .aui-list { font-size: 18px; line-height: 28px; } } @media (min-width: 1920px) { .aui-list { font-size: 20px; line-height: 32px; } } .aui-list__item { margin-left: 1.25rem; } .aui-list__item + .aui-list__item { margin-top: 0.75rem; } .aui-list__item::before { display: inline-block; width: 1.25rem; margin-left: -1.25rem; color: #808080; } .aui-list--arrow .aui-list__item::before { content: '›'; } .aui-list--number .aui-list__item::before { content: counter(li); counter-increment: li; } .aui-color-text-light .aui-list__item::before { color: rgba(255, 255, 255, 0.6); } /** * Prevent scrolling of body, when modal is open. * Added to body by JS. */ .aui-modal-open { overflow: hidden; } /** * Modal container stretched to viewport size. */ .aui-modal { position: fixed; top: 0; left: 0; width: 0; height: 0; outline: 0; z-index: 1900; overflow: hidden; } .aui-modal.is-active { right: 0; bottom: 0; width: auto; height: auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; } /** * Modal dialog */ .aui-modal-dialog { display: -ms-flexbox; display: flex; -ms-flex-flow: row; flex-flow: row; -ms-flex-pack: center; justify-content: center; position: relative; min-height: 100vh; opacity: 0; transition: opacity 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); background-color: #ffffff; } .aui-modal-dialog__body { display: -ms-flexbox; display: flex; -ms-flex-flow: column; flex-flow: column; -ms-flex-pack: center; justify-content: center; position: relative; min-width: 1px; max-width: 100%; min-height: 100vh; padding: 1.625rem 4.375%; } .aui-modal-dialog__body--full { padding: 0; } .aui-modal-dialog__content { max-width: 100%; } .aui-modal-dialog__close { position: fixed; top: 0.375rem; right: 0.375rem; width: 45px; height: 45px; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); transition: color 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); color: #ffffff; } .aui-modal-dialog__close:hover { color: #cccccc; } .aui-modal-dialog__close--dark { color: #666666; } .aui-modal-dialog__close--dark:hover { color: #000000; } .aui-modal-close-icon-large, .aui-modal-close-icon-small { display: block; stroke-width: 1px; } .aui-modal-close-icon-large { display: none; } /** * Styles when modal is open: */ .aui-modal-open .aui-modal.is-active .aui-modal-dialog { opacity: 1; transition-delay: 0.4s; } .aui-modal-open .aui-modal.is-active .aui-modal-dialog--morph { transition-delay: 0s; } .aui-modal-open .aui-modal.is-active .aui-modal-dialog--morph .aui-modal-dialog__body { transition-delay: 0s; } /** * Responsive adaptions: */ @media (min-width: 0px) { .aui-modal-dialog__body { width: 62.5%; max-width: 1200px; } .aui-modal-dialog--fullpage .aui-modal-dialog__close, .aui-modal-dialog--window .aui-modal-dialog__close { top: 0; right: 0; width: 81px; height: 81px; } .aui-modal-dialog--fullpage .aui-modal-dialog__body { padding-left: 0; padding-right: 0; } .aui-modal-dialog--window, .aui-modal-dialog--layer { background-color: transparent; } .aui-modal-dialog--window .aui-modal-dialog__body { width: 80%; padding-left: 81px; padding-right: 81px; background-color: #ffffff; } .aui-modal-dialog--layer { padding: 0 4.375%; } .aui-modal-dialog--layer .aui-modal-dialog__body { padding: 1.625rem 0; } .aui-modal-dialog--layer .aui-modal-dialog__content { transform: translateY(0); background-color: #ffffff; } .aui-modal-dialog--layer .aui-modal-dialog__content { padding: 2rem; } .aui-modal-dialog--layer:not(.aui-modal-dialog--morph) .aui-modal-dialog__body { transform: translateY(10px); transition: transform 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-modal-dialog--layer .aui-modal-dialog__close { position: absolute; } .aui-modal-dialog--layer .aui-modal-dialog__body--full, .aui-modal-dialog__body--full { padding: 0; } .aui-modal-close-icon-small { display: none; } .aui-modal-close-icon-large { display: block; } /** * Styles when modal is open: */ .aui-modal-open .aui-modal.is-active .aui-modal-dialog { opacity: 1; transition-delay: 0.4s; } .aui-modal-open .aui-modal.is-active .aui-modal-dialog__content { transform: translateY(0); transition-delay: 0.4s; } .aui-modal-open .aui-modal.is-active .aui-modal-dialog--layer .aui-modal-dialog__body { transform: translateY(0); transition-delay: 0.4s; } } /** * Modal morph * Created by JS */ .aui-modal-morph { position: absolute; opacity: 0; background-color: #ffffff; transition-property: top, left, width, height, opacity; transition-duration: 0.4s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); z-index: 1801; } .aui-modal-morph.is-morphing { opacity: 1; } /** * Modal backdrop * Created by JS */ .aui-modal-backdrop { opacity: 0; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #1a1a1a; transition: opacity 0.6s cubic-bezier(0.75, 0.02, 0.5, 1); z-index: 1800; } .aui-modal-open .aui-modal-backdrop { opacity: 1; } .aui-nav { position: relative; font-weight: 400; font-size: 1rem; line-height: 1; color: #333333; fill: #333333; stroke: #333333; } .aui-nav__items { padding-left: 0; list-style: none; } .aui-nav__action { display: block; width: 100%; z-index: 1; font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; position: relative; padding: 0.625rem 0; vertical-align: baseline; text-align: left; transition-property: color, background, fill, stroke; transition-duration: .15s; transition-timing-function: linear; cursor: pointer; } .aui-nav__action.is-active, .aui-nav__action:hover { color: #000000; fill: #000000; stroke: #000000; } .aui-nav__action, .aui-nav__action.is-disabled { color: #333333; fill: #333333; stroke: #333333; } .aui-nav__action, .aui-nav__action.is-disabled, .aui-nav__action:active, .aui-nav__action:focus { outline: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-nav__action > span { position: relative; } .aui-nav__action .audiicon { position: relative; margin-right: .75em; vertical-align: middle; } .aui-nav__action.is-disabled { cursor: not-allowed; color: #b3b3b3; fill: #b3b3b3; stroke: #b3b3b3; } /** * Modifier: List */ .aui-nav--list .aui-nav__action { padding: 0.75rem 0; } .aui-nav--list .aui-nav__item { display: block; } .aui-nav--list .aui-nav__item + .aui-nav__item { border-top: 1px solid #d9d9d9; } .aui-nav--list .aui-nav__action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /** * Modifier: Bar and Tab */ .aui-nav--bar, .aui-nav--tab { font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-variation-settings: "wdth" 130; overflow: hidden; height: 2.25rem; } .aui-nav--bar .aui-nav__panel, .aui-nav--tab .aui-nav__panel { position: relative; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 50px; box-sizing: content-box; } .aui-nav--bar .aui-nav__items, .aui-nav--tab .aui-nav__items { display: -ms-flexbox; display: flex; width: 100%; -ms-flex-flow: row nowrap; flex-flow: row nowrap; -ms-flex-align: start; align-items: flex-start; white-space: nowrap; } .aui-nav--bar .aui-nav__item, .aui-nav--tab .aui-nav__item { -ms-flex: 0 0 auto; flex: 0 0 auto; padding: 0 1rem; } .aui-nav--bar .aui-nav__item:first-child, .aui-nav--tab .aui-nav__item:first-child { padding-left: 0; } .aui-nav--bar .aui-nav__item:last-child, .aui-nav--tab .aui-nav__item:last-child { padding-right: 0; } .aui-nav--bar .aui-nav__action, .aui-nav--tab .aui-nav__action { display: inline-block; width: auto; font-family: inherit; } .aui-nav--bar .aui-nav__action.is-active, .aui-nav--tab .aui-nav__action.is-active { transition-delay: .15s; } .aui-nav__indicator { pointer-events: none; display: block; position: absolute; top: 2.25rem; left: 0; width: 1px; height: 2px; background: #000000; opacity: 0; transform: translateY(-100%); } .aui-nav__paddle-left, .aui-nav__paddle-right { content: ''; display: block; position: absolute; top: 0; width: 2rem; height: 100%; z-index: 2; border: 0; outline: 0; overflow: hidden; transition: opacity .15s linear; } .aui-nav__paddle-left::after, .aui-nav__paddle-right::after { content: ''; display: inline-block; position: absolute; top: 50%; width: 8px; height: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%23333333' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E") center center no-repeat; transform: translateY(-50%); } .aui-nav__paddle-left:disabled, .aui-nav__paddle-right:disabled { width: 0; opacity: 0; } .aui-nav__paddle-left { left: 0; background: linear-gradient(to right, white 40%, rgba(255, 255, 255, 0) 100%); } .aui-nav__paddle-left::after { left: 0; transform: translateY(-50%) rotate(180deg); } .aui-nav__paddle-right { right: 0; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, white 60%); } .aui-nav__paddle-right::after { right: 0; } .is-animated .aui-nav__indicator { opacity: 1; transition: left 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), width 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), opacity 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-nav--overlap { margin-top: -2.25rem; } .aui-nav--small { height: 1.75rem; font-size: 0.75rem; font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; } .aui-nav--small .aui-nav__item { padding: 0 0.75rem; } .aui-nav--small .aui-nav__item:first-child { padding-left: 0; } .aui-nav--small .aui-nav__item:last-child { padding-right: 0; } .aui-nav--small .aui-nav__action { padding: 0.5rem 0; } .aui-nav--small .aui-nav__indicator { top: 1.75rem; } .aui-nav--tab { height: 3.25rem; } .aui-nav--tab .aui-nav__item { padding-left: 0; padding-right: 0; } .aui-nav--tab .aui-nav__action { padding: 1.125rem 1.25rem; } .aui-nav--tab .aui-nav__indicator { top: 0; height: 100%; transform: none; background: #e5e5e5; } .aui-nav--tab.aui-nav--small { height: 2.5rem; } .aui-nav--tab.aui-nav--small .aui-nav__action { padding: 0.875rem 1rem; } .aui-nav--tab.aui-nav--overlap { margin-top: -3.25rem; } /** * Modifier: dropdown */ .aui-nav--dropdown { color: #333333; } .aui-nav--dropdown.is-active { z-index: 1000; } .aui-nav--dropdown .aui-nav__toggle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; padding: 0.625rem 0; width: 100%; border: 0; background: none; outline: none; line-height: 1; text-align: left; color: #000000; } .aui-nav--dropdown .aui-nav__toggle-label { display: block; position: relative; pointer-events: none; padding-right: 18px; } .aui-nav--dropdown .aui-nav__toggle-label::after { content: ''; display: block; position: absolute; top: 50%; right: 0; width: 13px; height: 8px; margin-top: -4px; transition-property: transform, background; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-nav--dropdown.is-active .aui-nav__toggle-label::after { transform: rotate(180deg); } .aui-nav--dropdown .aui-nav__underline { display: block; position: relative; top: -1px; height: 1px; background: #333333; z-index: 1; } .aui-nav--dropdown .aui-nav__underline::after { content: ''; display: block; opacity: 0; position: absolute; top: 1px; width: 100%; height: 1px; background: inherit; transition: opacity .25s linear; } .aui-nav--dropdown.is-active .aui-nav__underline::after { opacity: 1; } .aui-nav--dropdown .aui-nav__panel { position: absolute; top: 100%; width: 100%; opacity: 0; visibility: hidden; background: #e5e5e5; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); transition: opacity .3s, visibility .3s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); z-index: 1000; } .aui-nav--dropdown.is-active .aui-nav__panel { visibility: visible; opacity: 1; } .aui-nav--dropdown .aui-nav__items { max-height: 0; overflow: hidden; padding: 0.5rem 0; transition: max-height 0s .3s; } .aui-nav--dropdown.is-active .aui-nav__items { max-height: 10000px; transition-delay: 0s; } .aui-nav--dropdown .aui-nav__item { opacity: 0; margin: 0 1.25rem; transform: translateY(10%); transition-property: transform, opacity; transition-duration: .3s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); transition-delay: 0s; } .aui-nav--dropdown .aui-nav__item:not(:last-child) { border-bottom: 1px solid #d9d9d9; } .aui-nav--dropdown.is-active .aui-nav__item { opacity: 1; transform: translateY(0); } .aui-nav--dropdown .aui-nav__action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1.25rem 0; } .aui-nav--dropdown.aui-nav--sticky { position: -webkit-sticky; position: sticky; top: 0; z-index: 1001; } .aui-nav--dropdown.aui-nav--sticky .aui-nav__toggle { background: #ffffff; } .aui-nav--dropdown.is-sticky .aui-nav__toggle { padding: 1.125rem 4.375%; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); z-index: 1001; } .aui-nav--dropdown.is-sticky .aui-nav__toggle { position: fixed; top: 0; left: 0; width: 100%; } .aui-nav--dropdown.is-sticky .aui-nav__panel { position: fixed; top: 3.25rem; left: 0; } .aui-nav--dropdown.is-sticky .aui-nav__underline { opacity: 0; } .aui-nav--dropdown.is-sticky .aui-nav__item { margin-left: 4.375%; margin-right: 4.375%; } .aui-notification { position: relative; width: 18.5rem; font-size: 14px; line-height: 20px; transform: translateY(30px); transition: height 0.4s cubic-bezier(0.75, 0.02, 0.5, 1) 0.4s, margin 0.4s cubic-bezier(0.75, 0.02, 0.5, 1) 0.4s, opacity 0.4s cubic-bezier(0.75, 0.02, 0.5, 1), visibility 0.4s cubic-bezier(0.75, 0.02, 0.5, 1), transform 0.4s cubic-bezier(0.75, 0.02, 0.5, 1), box-shadow 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); margin-bottom: 0.25rem; opacity: 0; visibility: hidden; } @media (min-width: 375px) { .aui-notification { font-size: 14px; line-height: 20px; } } @media (min-width: 1024px) { .aui-notification { font-size: 15px; line-height: 24px; } } @media (min-width: 1920px) { .aui-notification { font-size: 16px; line-height: 24px; } } .aui-notification-container { position: fixed; right: 0.75rem; top: 0.75rem; z-index: 1701; } .aui-notification__content { position: relative; margin-right: 27px; padding: 0.75rem 1.5rem 0.75rem 0.75rem; } .aui-notification__close { position: absolute; top: 0.75rem; right: 0.75rem; width: 17px; height: 17px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23333333' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E") center center no-repeat; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-notification.aui-color-text-light .aui-notification__close, .aui-notification.aui-color-text-warning .aui-notification__close { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23f2f2f2' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E"); } .aui-notification.is-open { transform: translateY(0); opacity: 1; visibility: visible; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); transition-duration: 0.4s; } .aui-notification.is-closed { transform: translateY(0); overflow: hidden; height: 0 !important; } .aui-pager { list-style: none; padding-left: 0; font-weight: 400; color: #666666; } .aui-pager__item { display: inline-block; } .aui-pager__current { color: #000000; } .aui-pager__next, .aui-pager__prev { transition: color .15s linear; } .aui-pager__prev { margin-right: 1em; } .aui-pager__next { margin-left: 1em; } .aui-pager__next-icon, .aui-pager__prev-icon { display: inline-block; width: .5em; height: .8125em; text-indent: 100%; overflow: hidden; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); background-size: contain; background-repeat: no-repeat; background-position: center; } .aui-pager__next-icon svg, .aui-pager__prev-icon svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.1px; } .aui-pager__prev-icon { transform: translateY(0.0625em) rotate(180deg); } .aui-pager__next:hover:not(.is-disabled), .aui-pager__prev:hover:not(.is-disabled) { color: #000000; } .aui-pager__prev:hover:not(.is-disabled) .aui-pager__prev-icon { transform: translateX(-4px) translateY(0.0625em) rotate(180deg); } .aui-pager__next:hover:not(.is-disabled) .aui-pager__next-icon { transform: translateX(4px); } .aui-pager__next.is-disabled, .aui-pager__prev.is-disabled { cursor: not-allowed; opacity: .30; pointer-events: none; } .aui-pagination { position: relative; height: 1.75rem; font-size: 1rem; line-height: 1.75rem; font-weight: 400; color: #666666; } .aui-pagination__items { display: block; list-style: none; padding-left: 0; } .aui-pagination__items::after { content: ''; display: table; clear: both; } .aui-pagination__item { display: block; margin: 0 0.75rem; float: left; } .aui-pagination__item:first-child { margin-left: 0; } .aui-pagination__item:last-child { margin-right: 0; } .aui-pagination__ellipsis, .aui-pagination__link, .aui-pagination__next, .aui-pagination__prev { transition: color .15s linear; } .aui-pagination__link.is-active, .aui-pagination__link:hover:not(.is-disabled), .aui-pagination__next:hover:not(.is-disabled), .aui-pagination__prev:hover:not(.is-disabled) { color: #000000; } .aui-pagination__prev:hover:not(.is-disabled) .aui-pagination__prev-icon { transform: translateX(-4px) translateY(0.0625em) rotate(180deg); } .aui-pagination__next:hover:not(.is-disabled) .aui-pagination__next-icon { transform: translateX(4px) translateY(0.0625em); } .aui-pagination__next-icon, .aui-pagination__prev-icon { display: inline-block; width: .5em; height: .8125em; text-indent: 100%; overflow: hidden; transform: translateY(0.0625em); transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); background-size: contain; background-repeat: no-repeat; background-position: center; } .aui-pagination__next-icon svg, .aui-pagination__prev-icon svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.1px; } .aui-pagination__prev-icon { transform: translateY(0.0625em) rotate(180deg); } .aui-pagination__indicator { pointer-events: none; display: block; position: absolute; bottom: 0; left: 0; width: 1px; height: 2px; background: #000000; z-index: 1; opacity: 0; } .is-animated .aui-pagination__indicator { opacity: 1; transition: left 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), width 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), opacity 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); } [displaytype^='stepless'] .aui-pagination__indicator { display: none; } [pageCount^='0'] .aui-pagination__indicator { display: none; } .aui-pagination__link.is-disabled, .aui-pagination__next.is-disabled, .aui-pagination__prev.is-disabled { cursor: not-allowed; opacity: .30; pointer-events: none; } .aui-player { position: relative; overflow: hidden; width: 100%; height: 0; padding-bottom: 56.25%; color: #ffffff; background-color: #000000; background-position: center; background-repeat: no-repeat; background-size: cover; /** * States */ /** * Responsiveness */ } .aui-player-related-container { z-index: 1; display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); overflow: hidden; } .aui-player-related-container__replay { position: absolute; left: 5%; bottom: 19px; } .aui-player-related-container__replay .audiicon { width: 100%; height: 100%; } .aui-player-related-grid { display: -ms-flexbox; display: flex; -ms-flex-flow: row nowrap; flex-flow: row nowrap; width: 90%; margin: 0 auto; overflow: hidden; } .aui-player-related-grid__cell { display: block; -ms-flex: 1 1 auto; flex: 1 1 auto; width: 1px; margin: 0 0.25rem 0 0; } .aui-player-related-grid__cell:last-child { margin-right: 0; } .aui-player-related-content { display: block; width: 100%; padding: 0; outline: none; color: inherit; background: none; border: 0 none; font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: -0.015em; text-align: left; cursor: pointer; } .aui-player-related-content__image { display: block; width: 100%; height: auto; } .aui-player-related-content__title { display: block; margin-top: 0.5rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-wrap: normal; padding-right: 1rem; } .aui-player__overlay { position: absolute; background: rgba(0, 0, 0, 0.5); top: 0; bottom: 0; left: 0; right: 0; } .aui-player__large-button { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; border: 1px solid #ffffff; transform: translate(-50%, -50%); } .aui-player__large-button .audiicon { position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; } .aui-player__large-button, .aui-player__overlay { transition: opacity .2s linear .5s; } .aui-player.is-playing .aui-player__large-button, .aui-player.is-playing .aui-player__overlay { opacity: 0; } .aui-player:hover .aui-player__large-button, .aui-player:hover .aui-player__overlay { transition: opacity .2s linear; opacity: 1; } .aui-player__chrome { z-index: 3; display: -ms-flexbox; display: flex; -ms-flex-flow: row nowrap; flex-flow: row nowrap; -ms-flex-align: center; align-items: center; position: absolute; left: 0; bottom: 0; width: 100%; height: 60px; padding: 0 5%; font-size: 0.75rem; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-player__chrome::after { content: ''; display: block; position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background-color: rgba(0, 0, 0, 0.6); transition: height 0.2s cubic-bezier(0.75, 0.02, 0.5, 1) 0.1s; z-index: -1; } .aui-player__current-time, .aui-player__duration, .aui-player__fullscreen, .aui-player__mute, .aui-player__play { -ms-flex: 0 0 auto; flex: 0 0 auto; } .aui-player__progress-control { -ms-flex: 1 1 auto; flex: 1 1 auto; } .aui-player__current-time, .aui-player__duration { transform: translateY(0.0833333333em); } .aui-player__current-time { margin-left: 0.5rem; margin-right: 0.25rem; } .aui-player__current-time:first-child { margin-left: 0; } .aui-player__duration { margin-left: 0.25rem; margin-right: 0.5rem; } .aui-player__duration:last-child { margin-right: 0; } .aui-player__progress-control { position: relative; height: 100%; } .aui-player__progress-holder { position: absolute; top: 50%; width: 100%; height: 1px; background-color: #4c4c4c; } .aui-player__progress { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } .aui-player__progress--loading { background-color: #808080; } .aui-player__progress--progress { background-color: #ffffff; } .aui-player__mute + .aui-player__fullscreen { margin-left: 0.5rem; } .aui-player__playhead { position: absolute; left: 0; top: 0; width: 0.75rem; height: 0.75rem; border: 1px solid #ffffff; border-radius: 50%; transform: translate(-50%, -50%); background-color: #333333; z-index: 1; } .aui-player__seek-holder { position: absolute; top: 0; left: 0; width: 0; height: 100%; opacity: 0; transition: opacity .2s linear; } .aui-player__seek-marker { position: absolute; top: -0.375rem; right: 0; width: 1px; height: 0.75rem; background-color: #ffffff; } .aui-player__seek-time { position: absolute; bottom: 7px; right: 0; line-height: 2em; transform: translateX(50%); z-index: 1; } .aui-player__preview { display: none; position: absolute; right: 0; transform: translateX(50%); opacity: 0; transition: opacity .2s linear; } .aui-player__preview-image { width: 80px; height: 0; padding-bottom: 56.25%; background-position: center; background-size: cover; } .aui-player__icon-exit-fullscreen, .aui-player__icon-pause, .aui-player__icon-replay, .aui-player__icon-unmute { display: none; } .aui-player--preview .aui-player__preview, .aui-player--preview .aui-player__seek-time { bottom: 17px; } .aui-player--preview .aui-player__preview { display: block; } .aui-player.is-controlled .aui-player__chrome, .aui-player:hover .aui-player__chrome { transform: translateY(0); } .aui-player.is-seeking .aui-player__seek-holder { opacity: 1; transition-delay: .1s; } .aui-player.is-seeking .aui-player__preview { opacity: 1; transition-delay: .1s; } .aui-player.is-seeking.aui-player--preview .aui-player__chrome::after { height: 101px; transition-delay: 0s; } .aui-player.is-mute .aui-player__icon-mute { display: none; } .aui-player.is-mute .aui-player__icon-unmute { display: inline-block; } .aui-player.is-playing .aui-player__icon-play { display: none; } .aui-player.is-playing .aui-player__icon-pause { display: inline-block; } .aui-player.is-complete .aui-player__icon-pause, .aui-player.is-complete .aui-player__icon-play { display: none; } .aui-player.is-complete .aui-player__icon-replay { display: inline-block; } .aui-player.is-fullscreen .aui-player__icon-enter-fullscreen, .aui-player:-webkit-full-screen .aui-player__icon-enter-fullscreen { visibility: hidden; } .aui-player.is-fullscreen .aui-player__icon-enter-fullscreen, .aui-player:-ms-fullscreen .aui-player__icon-enter-fullscreen { visibility: hidden; } .aui-player.is-fullscreen .aui-player__icon-enter-fullscreen, .aui-player:fullscreen .aui-player__icon-enter-fullscreen { visibility: hidden; } .aui-player.is-fullscreen .aui-player__icon-exit-fullscreen, .aui-player:-webkit-full-screen .aui-player__icon-exit-fullscreen { visibility: visible; } .aui-player.is-fullscreen .aui-player__icon-exit-fullscreen, .aui-player:-ms-fullscreen .aui-player__icon-exit-fullscreen { visibility: visible; } .aui-player.is-fullscreen .aui-player__icon-exit-fullscreen, .aui-player:fullscreen .aui-player__icon-exit-fullscreen { visibility: visible; } @media (min-width: 0px) { .aui-player__large-button { width: 72px; height: 72px; } .aui-player__large-button .audiicon { left: 12px; top: 12px; width: 48px; height: 48px; } .aui-player__large-button .audiicon-small { visibility: hidden; } .aui-player__large-button .audiicon-large { visibility: visible; } } @media (min-width: 1024px) { .aui-player__chrome { font-size: 1rem; height: 120px; } .aui-player__chrome::after { height: 120px; } .aui-player__chrome .aui-button--icon { width: 45px; height: 45px; } .aui-player__chrome .aui-button--icon .audiicon { left: -1px; top: -1px; width: 48px; height: 48px; } .aui-player__chrome .aui-button--icon .audiicon-small { visibility: hidden; } .aui-player__chrome .aui-button--icon .audiicon-large { visibility: visible; } .aui-player__current-time { margin-left: 2.5rem; margin-right: 1.25rem; } .aui-player__duration { margin-left: 1.25rem; margin-right: 2.5rem; } .aui-player__mute + .aui-player__fullscreen { margin-left: 1.25rem; } .aui-player__playhead { width: 1.25rem; height: 1.25rem; } .aui-player__seek-time { bottom: 20px; } .aui-player__seek-marker { top: -0.625rem; height: 1.25rem; } .aui-player__preview-image { width: 128px; height: 72px; } .aui-player-related-container__replay { bottom: 38px; width: 44px; height: 44px; } .aui-player .audiicon-small { visibility: hidden; } .aui-player .audiicon-large { visibility: visible; } .aui-player.aui-player--preview .aui-player__preview, .aui-player.aui-player--preview .aui-player__seek-time { bottom: 31px; } .aui-player.is-seeking.aui-player--preview .aui-player__chrome::after { height: 182px; } } @media (min-width: 1024px) { .aui-player-related-content { font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-variation-settings: "wdth" 130; font-size: 14px; line-height: 20px; } } @media (min-width: 1024px) { .aui-player-related-content { font-size: 16px; line-height: 24px; } .aui-player__preview-image { width: 160px; height: 90px; } .aui-player.is-seeking.aui-player--preview .aui-player__chrome::after { height: 200px; } } /** * Prevent zooming of body, when popover is open. * Added to body by JS. */ .aui-popover-is-open { overflow-x: hidden; } .aui-popover { display: block; position: absolute; top: 0; left: 0; padding: 2px; width: 0; height: 0; font-size: 0.875rem; line-height: 1.25rem; text-align: left; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .15s linear, visibility .15s linear; z-index: 1002; /** * States */ } .aui-popover.aui-tether-enabled { width: 90vw; max-width: 22em; height: auto; overflow: visible; visibility: visible; } .aui-popover__content { position: relative; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } .aui-popover__content:not([class^="aui-color-"]):not([class*=" aui-color-"]) { background-color: #ffffff; } .aui-popover__text { display: block; position: relative; padding: 1rem; background-color: inherit; z-index: 1; } .aui-popover__media { display: block; position: relative; width: 100%; height: auto; z-index: 1; } .aui-popover__arrow { display: block; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; fill: #ffffff; transform: translate(-50%, -50%); } .aui-popover__arrow-shape { display: block; } .aui-popover.aui-tether-element-attached-top { margin-top: 12px; } .aui-popover.aui-tether-element-attached-top .aui-popover__arrow { top: 0; } .aui-popover.aui-tether-element-attached-bottom { margin-top: -12px; } .aui-popover.aui-tether-element-attached-bottom .aui-popover__arrow { top: 100%; } .aui-popover.aui-tether-element-attached-left { padding-left: 12px; } .aui-popover.aui-tether-element-attached-left .aui-popover__arrow { left: 0; } .aui-popover.aui-tether-element-attached-right { padding-right: 12px; } .aui-popover.aui-tether-element-attached-right .aui-popover__arrow { left: 100%; } .aui-popover.aui-tether-element-attached-middle.aui-tether-pinned-right { left: 0 !important; padding-right: 12px; } .aui-popover.aui-tether-element-attached-middle.aui-tether-pinned-right .aui-popover__arrow { left: 100%; } .aui-popover.aui-tether-element-attached-middle.aui-tether-pinned-left { right: 0; left: auto !important; padding-left: 12px; } .aui-popover.aui-tether-element-attached-middle.aui-tether-pinned-left .aui-popover__arrow { left: 0; } .aui-popover.is-shown { opacity: 1; visibility: visible; transition-duration: .25s; } .aui-progress { position: relative; height: 0.25rem; background: #e5e5e5; overflow: hidden; } .aui-progress__bar { display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; background: #f50537; transform-origin: 0% 0%; } .aui-progress--continuous .aui-progress__bar { animation: aui-progress 1s cubic-bezier(0.85, 0, 1, 1) 0s infinite normal none running; } @keyframes aui-progress { 0% { transform: translateX(0%) scaleX(0); } 50% { transform: translateX(20%) scaleX(0.5); animation-timing-function: cubic-bezier(0, 0, 0, 1); } 100% { transform: translateX(100%) scaleX(0.5); } } .aui-radio { display: inline-block; position: relative; font-weight: 400; line-height: 1.5; color: #333333; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } .aui-js .aui-radio { padding-left: 2.5em; } .aui-radio__hint { display: block; margin-top: 0.5rem; font-size: 0.8125rem; line-height: 1.25rem; } .aui-radio__box { display: none; overflow: hidden; position: absolute; top: 0; left: 0; width: 1.5em; height: 1.5em; border: 1px solid #808080; border-radius: 50%; transition: box-shadow .15s linear, border .15s linear; cursor: pointer; pointer-events: none; z-index: 1; } .aui-js .aui-radio__box { display: inline-block; } .aui-radio__tick { display: block; position: absolute; top: 50%; left: 50%; width: 1.5em; height: 1.5em; transform: translate(-50%, -50%) scale(0.3333333333, 0.3333333333); border-radius: 50%; background: #d9d9d9; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1), background 0.15s linear; pointer-events: none; } .aui-radio:hover:not(.is-disabled) { color: #000000; } .aui-radio:hover:not(.is-disabled) .aui-radio__box { border-color: #000000; } .aui-radio:hover:not(.is-disabled) .aui-radio__tick { transform: translate(-50%, -50%) scale(0.4166666667, 0.4166666667); } .aui-radio.is-disabled { color: #666666; cursor: not-allowed; } .aui-radio.is-checked .aui-radio__tick { background: #000000; transform: translate(-50%, -50%) scale(0.5, 0.5); } .aui-response { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; } .aui-response__effect { content: ''; display: block; position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; } .aui-response__effect--large { width: 60px; height: 60px; margin: -30px 0 0 -30px; } .aui-response--masked { overflow: hidden; } .aui-response.is-animating .aui-response__effect { animation: aui-response-dark 0.6s cubic-bezier(0.75, 0.02, 0.5, 1) both; } .aui-response.aui-theme-light.is-animating .aui-response__effect, .aui-button.aui-theme-light .aui-response.is-animating .aui-response__effect { animation: aui-response-light 0.6s cubic-bezier(0.75, 0.02, 0.5, 1) both; } /** * Invert effect, when used with Primary Button */ .aui-button--primary .aui-response.is-animating .aui-response__effect { animation: aui-response-light 0.6s cubic-bezier(0.75, 0.02, 0.5, 1) both; } .aui-button--primary.aui-theme-light .aui-response.is-animating .aui-response__effect { animation: aui-response-dark 0.6s cubic-bezier(0.75, 0.02, 0.5, 1) both; } /** * Animations */ @keyframes aui-response-dark { 0% { opacity: 1; box-shadow: inset 0 0 0 30px rgba(153, 153, 153, 0.3); transform: scale3d(0.01, 0.01, 1); } 100% { opacity: 0; box-shadow: inset 0 0 0 1px #999999; transform: scale3d(1.7, 1.7, 1); } } @keyframes aui-response-light { 0% { opacity: 1; box-shadow: inset 0 0 0 30px rgba(255, 255, 255, 0.3); transform: scale3d(0.01, 0.01, 1); } 100% { opacity: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); transform: scale3d(1.7, 1.7, 1); } } .aui-select { display: block; position: relative; margin: 0; padding: 0; padding-top: 0.6875rem; font-size: 1rem; line-height: 1.5; box-sizing: border-box; /** * Variant: floating-label */ /** * States */ } .aui-select:hover .aui-select__focus-line { background: #000000; } .aui-select__input { display: block; margin: 0; padding-right: 1.3125rem; width: 100%; min-height: 2.7rem; font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-size: inherit; font-weight: 400; line-height: inherit; color: #333333; background: none; border: none; border-bottom: 1px solid #808080; border-radius: 0; box-shadow: none; transition: color, border; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); -webkit-appearance: none; -moz-appearance: none; appearance: none; outline: 0; } .aui-select__input::-ms-expand { display: none; } .aui-select__input::-ms-value { background: none; color: #333333; } .aui-select__input option { color: #333333; background: white; } .aui-select__input option:disabled { color: #333333; } @-moz-document url-prefix() { .aui-select .aui-select__input { padding-top: 0.5625em; } } .aui-select__label { display: block; position: absolute; top: 0.5rem; right: 0; bottom: 0; left: 0; width: 100%; color: #333333; font-size: inherit; font-weight: 400; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition-property: top, font-size, color, opacity; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); opacity: 1; pointer-events: none; } .aui-select::after { content: ''; display: block; position: absolute; top: 2.105rem; right: 0; width: 13px; height: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23333333' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E") center center no-repeat; transform: translateY(-50%); transition: background .25s linear; pointer-events: none; } .aui-select__focus-line { display: block; position: relative; width: 100%; margin-top: -1px; height: 1px; background: #808080; opacity: 1; transition-property: background; transition-duration: 0.25s; } .aui-select__description { display: block; color: #666666; transition: color 0.25s linear; margin-top: 0.875rem; font-size: 0.8125rem; line-height: 1.25rem; } .aui-select__error { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; line-height: 1.25rem; margin-top: 0.875rem; font-size: 0.8125rem; color: #eb0d3f; } .aui-select__error::before { content: ''; display: inline-block; margin-right: 1rem; width: 40px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M21.5,20.5 L1.5,20.5 L11.5,2.5 L21.5,20.5 Z M11.5,16 L11.5,18 M11.5,8 L11.5,14' stroke='%23eb0d3f' stroke-width='1' fill-rule='evenodd'/%3E%3C/svg%3E") center center no-repeat; } @media (min-width: 1024px) { .aui-select__error::before { margin-right: 0.5rem; width: 24px; height: 24px; } } .aui-js .aui-select.aui-select--floating-label .aui-select__label { top: 1.28rem; } .aui-select.aui-select--floating-label .aui-select__input { opacity: 0; } .aui-select.aui-select--floating-label .aui-select__input:focus, .aui-select.aui-select--floating-label .aui-select__input:not(:focus) { opacity: 1; } .aui-select.aui-select--floating-label::after { top: 2.105rem; } .aui-select:not(.is-disabled):not(.is-invalid) .aui-select__input:hover { border-color: #000000; } .aui-select.is-focused .aui-select__label { opacity: 0; } .aui-select.is-focused.aui-select--floating-label .aui-select__label { top: 0; font-size: .75rem; opacity: 1; } .aui-select.is-focused .aui-select__input { outline: none; box-shadow: none; border-color: #000000; } .aui-select.is-focused .aui-select__focus-line { opacity: 0; } .aui-select.is-disabled { color: #666666; cursor: not-allowed; } .aui-select.is-disabled .aui-select__input { cursor: not-allowed; } .aui-select.is-disabled .aui-select__focus-line { opacity: 1; } .aui-select.is-dirty::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23333333' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-select.is-dirty .aui-select__label { opacity: 0; } .aui-select.is-dirty.aui-select--floating-label .aui-select__label { top: 0; font-size: .75rem; opacity: 1; } .aui-select.is-dirty .aui-select__input { border-color: #000000; color: #333333; } .aui-select.is-dirty .aui-select__input::-ms-value { color: #333333; } .aui-select.is-invalid, .aui-select.is-invalid:not(.is-dirty) .aui-select__input, .aui-select.is-invalid .aui-select__label { color: #eb0d3f; } .aui-select.is-invalid::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23eb0d3f' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-select.is-invalid .aui-select__input { border-color: #eb0d3f; } .aui-select.is-invalid .aui-select__focus-line { background: #eb0d3f; } /** * NOTE * The Slider AUI component relies on the 3rd party library * noUiSlider by Leon Gersen * @see https://refreshless.com/nouislider/ */ .aui-slider { position: relative; padding: 0; min-height: 1.5rem; color: #333333; display: -ms-flexbox; display: flex; -ms-flex-direction: column; flex-direction: column; /** * Customized noUiSlider Styles */ /** * Variants */ /** * States */ } .aui-slider__label { -ms-flex-order: -2; order: -2; font-size: 0.75rem; color: #666666; margin-bottom: 1rem; } .aui-slider__rangeOutput { -ms-flex-order: -1; order: -1; position: relative; -ms-flex-item-align: center; -ms-grid-row-align: center; align-self: center; font-size: 14px; } .aui-slider__target, .aui-slider__target * { -webkit-touch-callout: none; -webkit-tap-highlight-color: #000000; -ms-touch-action: none; touch-action: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; box-sizing: border-box; } .aui-slider__target { position: relative; direction: ltr; } .aui-slider__base { width: 100%; height: 100%; position: relative; z-index: 1; } .aui-slider__connect { position: absolute; right: 0; top: 0; left: 0; bottom: 0; } .aui-slider__origin { position: absolute; height: 0; width: 0; } .aui-slider__handle { position: relative; z-index: 1; } .aui-slider__state-tap .aui-slider__connect, .aui-slider__state-tap .aui-slider__origin { transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; } .aui-slider__state-drag * { cursor: inherit !important; } .aui-slider__base, .aui-slider__handle { transform: translate3d(0, 0, 0); } .aui-slider__horizontal { height: 2px; } .aui-slider__vertical { width: 2px; } .aui-slider__target { margin: 0 0.75rem; height: 1.5rem; } .aui-slider__target::after { content: ''; display: block; position: absolute; top: 50%; left: 0; right: 0; height: 2px; margin: 0 -0.75rem; transform: translateY(-50%); background: #cccccc; } .aui-slider__connect::after { content: ''; display: block; position: absolute; top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); background: #000000; } .aui-slider.aui-slider--single .aui-slider__connect::after { margin-left: -0.75rem; } .aui-slider__draggable { cursor: ew-resize; } .aui-slider__vertical .aui-slider__draggable { cursor: ns-resize; } .aui-slider__handle { position: relative; width: 1.5rem; height: 1.5rem; background: #ffffff; border-radius: 50%; border: 1px solid #808080; transform: translateX(-50%); transition: border .15s linear; cursor: pointer; } .aui-slider.aui-slider--output .aui-slider__origin::before { position: absolute; top: -35px; transform: translateX(-50%); font-size: 14px; display: block; content: attr(data-before); } .aui-slider:not(.is-disabled) .aui-slider__handle:hover { border-color: #000000; } .aui-slider__handle[disabled], [disabled] .aui-slider__handle, [disabled] .aui-slider__target { cursor: not-allowed; } .aui-slider__pips, .aui-slider__pips * { box-sizing: border-box; } .aui-slider__pips { position: absolute; color: #999; } .aui-slider__value { position: absolute; text-align: center; } .aui-slider__value-sub { color: #ccc; font-size: 10px; } .aui-slider__range { display: -ms-flexbox; display: flex; -ms-flex-pack: justify; justify-content: space-between; font-size: 0.75rem; } .aui-slider__marker { position: absolute; background: #CCC; } .aui-slider__marker-sub { background: #AAA; } .aui-slider__marker-large { background: #AAA; } .aui-slider__pips-horizontal { padding: 10px 0; height: 80px; top: 100%; left: 0; width: 100%; } .aui-slider__value-horizontal { transform: translate3d(-50%, 50%, 0); } .aui-slider__marker-horizontal.aui-slider__marker { margin-left: -1px; width: 2px; height: 5px; } .aui-slider__marker-horizontal.aui-slider__marker-sub { height: 10px; } .aui-slider__marker-horizontal.aui-slider__marker-large { height: 15px; } .aui-slider__pips-vertical { padding: 0 10px; height: 100%; top: 0; left: 100%; } .aui-slider__value-vertical { transform: translate3d(0, 50%, 0); padding-left: 25px; } .aui-slider__marker-vertical.aui-slider__marker { width: 5px; height: 2px; margin-top: -1px; } .aui-slider__marker-vertical.aui-slider__marker-sub { width: 10px; } .aui-slider__marker-vertical.aui-slider__marker-large { width: 15px; } .aui-slider__tooltip { display: block; position: absolute; border: 1px solid #D9D9D9; border-radius: 3px; background: #fff; color: #000; padding: 5px; text-align: center; } .aui-slider__horizontal .aui-slider__tooltip { transform: translate(-50%, 0); left: 50%; bottom: 120%; } .aui-slider__vertical .aui-slider__tooltip { transform: translate(0, -50%); top: 50%; right: 120%; } .aui-slider--output .aui-slider__label { margin-bottom: 2rem; } .aui-slider.is-disabled { cursor: not-allowed; } .aui-slider.is-disabled .aui-slider__connect::after { background-color: #b3b3b3; } .aui-slider.is-disabled .aui-slider__target::after { background-color: #e5e5e5; } .aui-slider.is-disabled .aui-slider__handle, .aui-slider.is-disabled .aui-slider__draggable { cursor: not-allowed; } .aui-indicator { display: inline-block; position: relative; font-family: serif; margin-left: -4px; line-height: 4px; } .aui-indicator__items { padding-left: 0; list-style: none; } .aui-indicator__items::after { content: ''; display: table; clear: both; } .aui-indicator__item { float: left; margin-left: 0.25rem; } .aui-indicator__trigger { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; width: 40px; height: 40px; padding: 0 4px 0 0; } .aui-indicator__trigger:hover .aui-indicator__dot { background: #666666; } .aui-indicator__dot { pointer-events: none; display: block; width: 32px; height: 2px; overflow: hidden; text-indent: 100%; white-space: nowrap; text-decoration: none; outline: 0; transition: background 0.15s linear; } .aui-indicator__dot, .aui-indicator__dot:visited { background: #cccccc; } .aui-indicator__indicator { display: block; position: absolute; top: calc(50% - 1px); left: 4px; transform: translate(0, -50%); width: 32px; height: 4px; background: #000000; z-index: 1; transition: left 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); pointer-events: none; } .aui-indicator--shadow .aui-indicator__dot { box-shadow: 0 0 8px #666666; } /** * NOTE * All animations happen in JS. */ .aui-spinner { display: inline-block; position: relative; width: 5.75rem; height: 5.75rem; stroke: #e5e5e5; font-size: 1rem; } .aui-spinner__svg { overflow: visible !important; width: 100%; height: 100%; } .aui-spinner__path { stroke-miterlimit: 10; stroke-width: 4px; fill: none; } .aui-spinner__path--progress { stroke: #f50537; stroke-width: 4px; } .aui-spinner__value { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-variation-settings: "wdth" 130; font-size: 1rem; line-height: 1; text-align: center; } .aui-spinner--continuous { width: 3rem; height: 3rem; } .aui-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .aui-switch { cursor: pointer; display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; position: relative; font-weight: 400; height: 2em; min-width: 3.63em; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); /** * Variant: text-left */ /** * Variant: equal */ /** * States */ } .aui-switch::after { content: '.'; display: inline-block; width: 0; visibility: hidden; } .aui-switch__text { display: inline-block; padding-left: 4.63em; color: #333333; transition: all 250ms cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-switch__track { display: inline-block; position: absolute; left: 0; width: 3.63em; height: 2em; border-radius: 1em; vertical-align: middle; background-color: #d9d9d9; transition: all .15s linear, border .15s linear; } .aui-switch__thumb { display: inline-block; position: absolute; z-index: 10; top: 50%; left: 1em; width: 3.26em; height: 3.26em; border-radius: 50%; transform: translate(-50%, -50%) scale(0.5, 0.5); background: #ffffff; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1), left 0.3s cubic-bezier(0.75, 0.02, 0.5, 1), background 0.3s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-switch__indicator { position: absolute; top: 50%; transform: translateY(-50%); } .aui-switch__indicator--on { width: 1px; height: 8px; background-color: #ffffff; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1), opacity 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-switch__indicator--off { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #808080; right: 0.75em; transition: transform 0.15s cubic-bezier(0.75, 0.02, 0.5, 1), opacity 0.15s cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-switch--text-left .aui-switch__text { padding-left: 0; padding-right: 4.63em; } .aui-switch--text-left .aui-switch__track { left: auto; right: 0; } .aui-switch--equal { display: -ms-inline-flexbox; display: inline-flex; } .aui-switch--equal .aui-switch__text { padding-left: 0; padding-right: 0; -ms-flex: 1 1 auto; flex: 1 1 auto; -ms-flex-order: 1; order: 1; } .aui-switch--equal .aui-switch__text--left { margin-right: 1em; } .aui-switch--equal .aui-switch__text--right { -ms-flex-order: 3; order: 3; color: #666666; margin-left: 1em; } .aui-switch--equal .aui-switch__track { position: relative; left: auto; -ms-flex: 0 0 3.63em; flex: 0 0 3.63em; -ms-flex-order: 2; order: 2; } .aui-switch--equal .aui-switch__thumb { background: #ffffff; transform: translate(-50%, -50%) scale(0.5, 0.5); } .aui-switch:hover:not(.is-disabled) .aui-switch__text { color: #000000; } .aui-switch:hover:not(.is-disabled) .aui-switch__track { border-color: #000000; } .aui-switch:hover:not(.is-disabled) .aui-switch__track .aui-switch__thumb { transform: translate(-50%, -50%) scale(0.4, 0.4); } .aui-switch--equal:hover:not(.is-disabled) .aui-switch__text--right { color: #666666; } .aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--left { color: #666666; } .aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--right { color: #000000; } .aui-switch.is-disabled { opacity: 0.3; cursor: not-allowed; } .aui-switch__input:checked ~ .aui-switch__track { background: #009900; } .aui-switch__input:checked ~ .aui-switch__track .aui-switch__indicator--on { opacity: 1; transform: translate(1.05em, -50%); } .aui-switch__input:checked ~ .aui-switch__track .aui-switch__indicator--off { transform: translate(-0.7em, -50%); opacity: 0; } .aui-switch__input:not(:checked) ~ .aui-switch__track .aui-switch__indicator--on { opacity: 0; transform: translate(1.75em, -50%); } .aui-switch__input:not(:checked) ~ .aui-switch__track .aui-switch__indicator--off { opacity: 1; transform: translate(0, -50%); } .aui-switch__input:checked ~ .aui-switch__track .aui-switch__thumb { background: #ffffff; transform: translate(-50%, -50%) scale(0.5, 0.5); left: 2.65em; } .aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--left { color: #666666; } .aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--right { color: #333333; } .aui-table { width: calc(100% + 1rem); margin-left: -0.5rem; overflow: auto; overflow-y: hidden; } .aui-table table { border-collapse: separate; border-spacing: 0.5rem; border-color: #000000; } .aui-table caption { font-weight: 700; text-align: left; padding: 1rem 0.5rem; } .aui-table tr { vertical-align: top; } .aui-table th { border-top: 3px solid #000000; font-weight: 700; text-align: left; } .aui-table th, .aui-table td { padding: 1rem 0.75rem 0.5rem 0; } .aui-table td { border-top: 1px solid #000000; } .aui-table__cell--colored { background-color: #d9d9d9; } .aui-table__cell--last-row td { position: relative; } .aui-table__cell--last-row td::after { content: ''; display: block; position: absolute; bottom: -0.5rem; left: 0; right: 0; border-bottom: 1px solid #000000; } .aui-table--stretched table { width: 100%; } .aui-table--padded th, .aui-table--padded td { padding: 1rem 0.75rem; } .aui-table--responsive thead, .aui-table--responsive tfoot { display: none; } .aui-table--responsive tr { border-top: 3px solid #000000; padding-bottom: 2rem; } .aui-table--responsive tr, .aui-table--responsive td { float: left; width: 100%; } .aui-table--responsive td { padding-bottom: 1rem; } .aui-table--responsive td:before { content: attr(data-label); float: left; font-weight: 700; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; padding-right: 0.75rem; width: 50%; word-break: break-word; } .aui-table--responsive .aui-table__cell--last-row-responsive { border-bottom: 3px solid #000000; } @media (min-width: 1024px) { .aui-table--responsive td { padding-bottom: 0.5rem; } .aui-table--responsive td:before { content: none; } .aui-table--responsive thead, .aui-table--responsive tr, .aui-table--responsive td, .aui-table--responsive tfoot { float: none; width: auto; } .aui-table--responsive th, .aui-table--responsive td { display: table-cell; } .aui-table--responsive thead { display: table-header-group; } .aui-table--responsive tr { display: table-row; } .aui-table--responsive tfoot { display: table-footer-group; } .aui-table--responsive .aui-table__cell--last-row-responsive td { border-bottom: 1px solid #000000; padding-bottom: 1rem; } } .aui-textfield { display: block; position: relative; margin: 0; padding: 0.6875rem 0 0; font-size: 1rem; line-height: 1.5; stroke: #333333; /** * Variant: floating-label */ /** * Variant: multiline */ /** * Variant: icon */ /** * States */ } .aui-textfield__input { display: block; margin: 0; padding: 0.5em 0; width: 100%; min-height: 2.7rem; font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-size: inherit; font-weight: 400; line-height: inherit; text-align: left; color: #333333; background: none; border: none; transition: color 0.25s cubic-bezier(0.75, 0.02, 0.5, 1); resize: none; outline: 0; border-radius: 0; } .aui-textfield__field { position: relative; border-bottom: 1px solid #808080; transition-property: border, padding; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-textfield__label { display: block; position: absolute; top: 0; left: 0; width: 100%; color: #333333; font-size: 0.75rem; font-weight: 400; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition-property: top, font-size, color, opacity; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); pointer-events: none; } .aui-textfield__label-optional { font-size: 0.8125rem; padding-left: 4px; color: #666666; } .aui-textfield__focus-line { display: block; position: relative; width: 100%; margin-top: -2px; height: 1px; background: #808080; opacity: 0; transition-property: opacity, background; transition-duration: 0.25s; } .aui-textfield__counter, .aui-textfield__description, .aui-textfield__error, .aui-textfield__valid { display: block; color: #666666; transition: color 0.25s linear; margin-top: 0.5rem; font-size: 0.8125rem; line-height: 1.25rem; } .aui-textfield__counter { position: relative; height: 1.25rem; } .aui-textfield__counter-value { display: block; position: absolute; top: 0; right: 0; } .aui-textfield__counter ~ .aui-textfield__description, .aui-textfield__counter ~ .aui-textfield__error { margin-top: -1.25rem; padding-right: 4em; } .aui-textfield__valid { position: relative; } .aui-textfield__valid::before { content: ''; display: inline-block; margin-right: 1rem; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23000000' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E") center center no-repeat; } @media (min-width: 1024px) { .aui-textfield__valid::before { margin-right: 0.5rem; } } .aui-textfield__error { display: -ms-flexbox; display: flex; -ms-flex-align: center; align-items: center; font-size: 0.8125rem; color: #eb0d3f; } .aui-textfield__error::before { content: ''; display: inline-block; margin-right: 1rem; width: 24px; min-width: 24px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' d='M21.5,20.5 L1.5,20.5 L11.5,2.5 L21.5,20.5 Z M11.5,16 L11.5,18 M11.5,8 L11.5,14' stroke='%23eb0d3f' stroke-width='1' fill-rule='evenodd'/%3E%3C/svg%3E") center center no-repeat; } @media (min-width: 1024px) { .aui-textfield__error::before { margin-right: 0.5rem; } } .aui-textfield .audiicon { position: absolute; top: 1.35rem; left: 0; transform: translateY(-50%); } .aui-js .aui-textfield { padding-top: 0; } .aui-js .aui-textfield .aui-textfield__label { top: 0.5rem; font-size: inherit; } .aui-textfield.aui-textfield--floating-label .aui-textfield__field { padding-top: 0.6875rem; } .aui-js .aui-textfield.aui-textfield--floating-label .aui-textfield__label { top: 1.1875rem; font-size: inherit; } .aui-textfield.aui-textfield--multiline { transition-property: padding; transition-duration: 0.25s; transition-timing-function: cubic-bezier(0.75, 0.02, 0.5, 1); } .aui-textfield.aui-textfield--multiline .aui-textfield__field { padding-top: 1.25em; border: 1px solid #808080; } .aui-textfield.aui-textfield--multiline .aui-textfield__label { top: 10px; left: 10px; } .aui-textfield.aui-textfield--multiline .aui-textfield__input { padding-left: 0.625em; padding-right: 0.625em; } .aui-js .aui-textfield.aui-textfield--multiline { padding-top: 0.8125em; } .aui-js .aui-textfield.aui-textfield--multiline .aui-textfield__field { padding-top: 0.4375em; } .aui-js .aui-textfield.aui-textfield--multiline .aui-textfield__label { top: 7px; } .aui-textfield--icon .aui-textfield__input, .aui-textfield--icon .aui-textfield__label { padding-left: 3rem; } @media (min-width: 1024px) { .aui-textfield--icon .aui-textfield__input, .aui-textfield--icon .aui-textfield__label { padding-left: 2rem; } } .aui-textfield:not(.is-disabled):not(.is-invalid) .aui-textfield__field:hover { border-bottom-color: #808080; } .aui-textfield.is-focused .aui-textfield__label { opacity: 0; } .aui-textfield.is-focused.aui-textfield--floating-label .aui-textfield__label { top: 0; font-size: 0.75rem; opacity: 1; } .aui-textfield.is-focused.aui-textfield--multiline { padding-top: 0; } .aui-textfield.is-focused.aui-textfield--multiline .aui-textfield__field { padding-top: 1.25em; } .aui-textfield.is-focused.aui-textfield--multiline .aui-textfield__label { top: 0.625em; font-size: 0.75rem; opacity: 1; } .aui-textfield.is-focused .aui-textfield__field { border-bottom-color: #000000; } .aui-textfield.is-focused .aui-textfield__input { outline: none; box-shadow: none; } .aui-textfield.is-focused .aui-textfield__focus-line { opacity: 1; } .aui-textfield.is-disabled { color: #666666; cursor: not-allowed; } .aui-textfield.is-disabled .aui-textfield__input { cursor: not-allowed; border-color: #b3b3b3; } .aui-textfield.is-disabled .aui-textfield__label { color: #666666; } .aui-textfield.is-disabled .aui-textfield__focus-line { opacity: 0; } .aui-textfield.is-dirty .aui-textfield__label { opacity: 0; } .aui-textfield.is-dirty.aui-textfield--floating-label .aui-textfield__label { top: 0; font-size: 0.75rem; opacity: 1; } .aui-textfield.is-dirty.aui-textfield--multiline { padding-top: 0; } .aui-textfield.is-dirty.aui-textfield--multiline .aui-textfield__field { padding-top: 1.25em; } .aui-textfield.is-dirty.aui-textfield--multiline .aui-textfield__label { top: 0.625em; font-size: 0.75rem; opacity: 1; } .aui-textfield.is-dirty .aui-textfield__field { border-bottom-color: #000000; } .aui-textfield.is-dirty .aui-textfield__input { color: #333333; } .aui-textfield.is-invalid, .aui-textfield.is-invalid:not(.is-dirty) .aui-textfield__input, .aui-textfield.is-invalid .aui-textfield__counter, .aui-textfield.is-invalid .aui-textfield__label { color: #eb0d3f; } .aui-textfield.is-invalid .aui-textfield__field { border-color: #eb0d3f; } .aui-textfield.is-invalid .aui-textfield__focus-line { background: #eb0d3f; } .aui-tooltip { pointer-events: none; display: block; position: fixed; top: -1000px; left: -1000px; max-width: 288px; font-size: .875rem; line-height: 1.25rem; color: #333333; background: #ffffff; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); opacity: 0; visibility: hidden; transition-property: opacity, visibility; transition-duration: 0.15s; transition-timing-function: linear; /** * Variant: Dark */ /** * States */ } .aui-tooltip__triangle { display: block; position: absolute; top: 0; left: 50%; background: inherit; } .aui-tooltip__triangle::after { content: ''; display: block; position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; transform: rotate(45deg); transform-origin: center; background: inherit; } .aui-tooltip__text { display: inline-block; padding: 0.75rem 1.25rem; } .aui-tooltip__media { position: relative; z-index: 1; display: block; width: 100%; height: auto; } .aui-tooltip--dark { color: #ffffff; background: #4c4c4c; } .aui-tooltip.is-active { opacity: 1; visibility: visible; transition-duration: 0.25s; z-index: 1002; } .aui-tooltip.is-top .aui-tooltip__triangle { top: auto; bottom: 0; } html { font-size: 16px; line-height: 28px; } @media (min-width: 375px) { html { font-size: 16px; line-height: 28px; } } @media (min-width: 1024px) { html { font-size: 18px; line-height: 32px; } } @media (min-width: 1920px) { html { font-size: 20px; line-height: 36px; } } body { font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-weight: 300; color: #333333; } .aui-headline-1, .aui-headline-2, .aui-headline-3, .aui-headline-4, .aui-headline-5 { font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; font-variation-settings: "wdth" 130; font-weight: 400; letter-spacing: -0.015em; } .aui-headline-1--bold, .aui-headline-2--bold, .aui-headline-3--bold, .aui-headline-4--bold, .aui-headline-5--bold { font-weight: 700; } .aui-headline-6 { font-family: 'AudiTypeVariable', Verdana, Geneva, sans-serif; } .aui-headline-1 { font-size: 46px; line-height: 52px; font-weight: 700; color: #000000; } @media (min-width: 375px) { .aui-headline-1 { font-size: 56px; line-height: 60px; } } @media (min-width: 1024px) { .aui-headline-1 { font-size: 83px; line-height: 92px; } } @media (min-width: 1920px) { .aui-headline-1 { font-size: 119px; line-height: 132px; } } .aui-headline-1--normal { font-weight: 400; } .aui-color-text-light .aui-headline-1 { color: #ffffff; } .aui-headline-2 { font-size: 31px; line-height: 36px; } @media (min-width: 375px) { .aui-headline-2 { font-size: 35px; line-height: 44px; } } @media (min-width: 1024px) { .aui-headline-2 { font-size: 47px; line-height: 56px; } } @media (min-width: 1920px) { .aui-headline-2 { font-size: 61px; line-height: 72px; } } .aui-headline-3 { font-size: 21px; line-height: 24px; } @media (min-width: 375px) { .aui-headline-3 { font-size: 22px; line-height: 28px; } } @media (min-width: 1024px) { .aui-headline-3 { font-size: 26px; line-height: 32px; } } @media (min-width: 1920px) { .aui-headline-3 { font-size: 31px; line-height: 36px; } } .aui-headline-4 { font-size: 18px; line-height: 20px; } @media (min-width: 375px) { .aui-headline-4 { font-size: 19px; line-height: 24px; } } @media (min-width: 1024px) { .aui-headline-4 { font-size: 22px; line-height: 28px; } } @media (min-width: 1920px) { .aui-headline-4 { font-size: 25px; line-height: 32px; } } .aui-headline-5 { font-size: 16px; line-height: 20px; } @media (min-width: 375px) { .aui-headline-5 { font-size: 16px; line-height: 20px; } } @media (min-width: 1024px) { .aui-headline-5 { font-size: 18px; line-height: 24px; } } @media (min-width: 1920px) { .aui-headline-5 { font-size: 20px; line-height: 28px; } } .aui-headline-6 { font-size: 16px; line-height: 24px; font-weight: 700; } @media (min-width: 375px) { .aui-headline-6 { font-size: 16px; line-height: 24px; } } @media (min-width: 1024px) { .aui-headline-6 { font-size: 18px; line-height: 28px; } } @media (min-width: 1920px) { .aui-headline-6 { font-size: 20px; line-height: 32px; } } .aui-headline-6--normal { font-weight: 400; } .aui-shortread { font-size: 16px; line-height: 24px; } @media (min-width: 375px) { .aui-shortread { font-size: 16px; line-height: 24px; } } @media (min-width: 1024px) { .aui-shortread { font-size: 18px; line-height: 28px; } } @media (min-width: 1920px) { .aui-shortread { font-size: 20px; line-height: 32px; } } .aui-color-text-light .aui-accentuated::before { border-top-color: #ffffff; } .aui-caption { font-size: 14px; line-height: 20px; } @media (min-width: 375px) { .aui-caption { font-size: 14px; line-height: 20px; } } @media (min-width: 1024px) { .aui-caption { font-size: 15px; line-height: 24px; } } @media (min-width: 1920px) { .aui-caption { font-size: 16px; line-height: 24px; } } .aui-big { font-size: 18px; line-height: 32px; } @media (min-width: 375px) { .aui-big { font-size: 19px; line-height: 32px; } } @media (min-width: 1024px) { .aui-big { font-size: 22px; line-height: 40px; } } @media (min-width: 1920px) { .aui-big { font-size: 25px; line-height: 44px; } } .aui-small { font-size: 12px; line-height: 20px; } @media (min-width: 375px) { .aui-small { font-size: 12px; line-height: 20px; } } @media (min-width: 1024px) { .aui-small { font-size: 12px; line-height: 20px; } } @media (min-width: 1920px) { .aui-small { font-size: 13px; line-height: 20px; } } .aui-blockquote { margin: 0; font-weight: normal; font-size: 18px; line-height: 28px; } @media (min-width: 375px) { .aui-blockquote { font-size: 19px; line-height: 28px; } } @media (min-width: 1024px) { .aui-blockquote { font-size: 22px; line-height: 32px; } } @media (min-width: 1920px) { .aui-blockquote { font-size: 25px; line-height: 36px; } } .aui-textlink { padding-bottom: 0.06125em; border-bottom: 1px solid #808080; color: inherit; font-weight: 400; transition: color 0.3s linear, border 0.3s linear; } .aui-textlink:hover { color: #000000; border-bottom-color: #000000; } .aui-textlink:focus { outline: none; } .aui-color-text-light .aui-textlink { border-bottom-color: rgba(255, 255, 255, 0.3); } .aui-color-text-light .aui-textlink:hover { color: #ffffff; border-bottom-color: #ffffff; } .aui-visible { display: block !important; } .aui-visible-inline { display: inline !important; } .aui-visible-inline-block { display: inline-block !important; } .aui-hidden { display: none !important; } .aui-visible-tiny, .aui-visible-tiny-inline, .aui-visible-tiny-inline-block { display: none !important; } .aui-visible-tiny { display: block !important; } .aui-visible-tiny-inline { display: inline !important; } .aui-visible-tiny-inline-block { display: inline-block !important; } .aui-hidden-tiny { display: none !important; } .aui-visible-xsmall, .aui-visible-xsmall-inline, .aui-visible-xsmall-inline-block { display: none !important; } @media (min-width: 0px) { .aui-visible-xsmall { display: block !important; } .aui-visible-xsmall-inline { display: inline !important; } .aui-visible-xsmall-inline-block { display: inline-block !important; } .aui-hidden-xsmall { display: none !important; } } .aui-visible-small, .aui-visible-small-inline, .aui-visible-small-inline-block { display: none !important; } @media (min-width: 375px) { .aui-visible-small { display: block !important; } .aui-visible-small-inline { display: inline !important; } .aui-visible-small-inline-block { display: inline-block !important; } .aui-hidden-small { display: none !important; } } .aui-visible-medium, .aui-visible-medium-inline, .aui-visible-medium-inline-block { display: none !important; } @media (min-width: 768px) { .aui-visible-medium { display: block !important; } .aui-visible-medium-inline { display: inline !important; } .aui-visible-medium-inline-block { display: inline-block !important; } .aui-hidden-medium { display: none !important; } } .aui-visible-large, .aui-visible-large-inline, .aui-visible-large-inline-block { display: none !important; } @media (min-width: 1024px) { .aui-visible-large { display: block !important; } .aui-visible-large-inline { display: inline !important; } .aui-visible-large-inline-block { display: inline-block !important; } .aui-hidden-large { display: none !important; } } .aui-visible-xlarge, .aui-visible-xlarge-inline, .aui-visible-xlarge-inline-block { display: none !important; } @media (min-width: 1440px) { .aui-visible-xlarge { display: block !important; } .aui-visible-xlarge-inline { display: inline !important; } .aui-visible-xlarge-inline-block { display: inline-block !important; } .aui-hidden-xlarge { display: none !important; } } .aui-visible-huge, .aui-visible-huge-inline, .aui-visible-huge-inline-block { display: none !important; } @media (min-width: 1920px) { .aui-visible-huge { display: block !important; } .aui-visible-huge-inline { display: inline !important; } .aui-visible-huge-inline-block { display: inline-block !important; } .aui-hidden-huge { display: none !important; } } .aui-audioplayer.aui-theme-light { color: #ffffff; } .aui-audioplayer.aui-theme-light .aui-button { fill: #ffffff; color: #ffffff; } .aui-audioplayer.aui-theme-light .aui-audioplayer__playhead { background-color: #333333; } .aui-audioplayer.aui-theme-light .aui-audioplayer__progress--loading { background-color: #808080; } .aui-audioplayer.aui-theme-light .aui-audioplayer__progress--progress { background-color: #ffffff; } .aui-audioplayer.aui-theme-light .aui-audioplayer__progress-holder { background-color: #4c4c4c; } .aui-audioplayer.aui-theme-light .aui-audioplayer__cover { background-color: #000000; } .aui-breadcrumb.aui-theme-black.is-oversized::after { background: linear-gradient(to right, #000000 5%, transparent 100%); } .aui-breadcrumb.aui-theme-silver.is-oversized::after { background: linear-gradient(to right, #b2b2b2 5%, rgba(178, 178, 178, 0) 100%); } .aui-breadcrumb.aui-theme-warmsilver.is-oversized::after { background: linear-gradient(to right, #b6b1a9 5%, rgba(182, 177, 169, 0) 100%); } .aui-breadcrumb.aui-theme-red.is-oversized::after { background: linear-gradient(to right, #bb0a30 5%, rgba(187, 10, 48, 0) 100%); } .aui-breadcrumb.aui-theme-black, .aui-breadcrumb.aui-theme-silver, .aui-breadcrumb.aui-theme-warmsilver, .aui-breadcrumb.aui-theme-red { color: rgba(255, 255, 255, 0.6); } .aui-breadcrumb.aui-theme-black .aui-breadcrumb__item:last-child, .aui-breadcrumb.aui-theme-silver .aui-breadcrumb__item:last-child, .aui-breadcrumb.aui-theme-warmsilver .aui-breadcrumb__item:last-child, .aui-breadcrumb.aui-theme-red .aui-breadcrumb__item:last-child { color: #ffffff; } .aui-breadcrumb.aui-theme-black .aui-breadcrumb__item + .aui-breadcrumb__item::before, .aui-breadcrumb.aui-theme-silver .aui-breadcrumb__item + .aui-breadcrumb__item::before, .aui-breadcrumb.aui-theme-warmsilver .aui-breadcrumb__item + .aui-breadcrumb__item::before, .aui-breadcrumb.aui-theme-red .aui-breadcrumb__item + .aui-breadcrumb__item::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='8' viewBox='0 0 5 8'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='1px' fill='none' d='M0.5,0.5l3.24,3.252l-3.237,3.247' /%3E%3C/svg%3E"); } .aui-breadcrumb.aui-theme-black .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-silver .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-warmsilver .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-red .aui-breadcrumb__action:hover { color: rgba(255, 255, 255, 0.6); } .aui-breadcrumb.aui-theme-black .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-silver .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-warmsilver .aui-breadcrumb__action:hover, .aui-breadcrumb.aui-theme-red .aui-breadcrumb__action:hover { color: #fff; } .aui-button.aui-theme-light.is-active, .aui-button.aui-theme-light:active, .aui-button.aui-theme-light:hover { color: #e5e5e5; stroke: #e5e5e5; fill: #e5e5e5; } .aui-button.aui-theme-light, .aui-button.aui-theme-light.is-disabled, .aui-button.aui-theme-light:disabled { color: #ffffff; stroke: #ffffff; fill: #ffffff; } .aui-button.aui-theme-light.is-disabled, .aui-button.aui-theme-light:disabled { opacity: .30; } .aui-button--icon.aui-theme-light:focus, .aui-button--primary.aui-theme-light:focus, .aui-button--secondary.aui-theme-light:focus { box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.2); } .aui-button--icon.aui-theme-light.is-disabled, .aui-button--icon.aui-theme-light:disabled, .aui-button--icon.aui-theme-light:hover, .aui-button--primary.aui-theme-light.is-disabled, .aui-button--primary.aui-theme-light:disabled, .aui-button--primary.aui-theme-light:hover, .aui-button--secondary.aui-theme-light.is-disabled, .aui-button--secondary.aui-theme-light:disabled, .aui-button--secondary.aui-theme-light:hover { box-shadow: none; } .aui-button--primary.aui-theme-light, .aui-button--primary.aui-theme-light.is-active, .aui-button--primary.aui-theme-light:active, .aui-button--primary.aui-theme-light:hover, .aui-button--floating.aui-theme-light, .aui-button--floating.aui-theme-light.is-active, .aui-button--floating.aui-theme-light:active, .aui-button--floating.aui-theme-light:hover { color: #000000; stroke: #000000; fill: #000000; } .aui-button--primary.aui-theme-light.is-disabled, .aui-button--primary.aui-theme-light:disabled, .aui-button--floating.aui-theme-light.is-disabled, .aui-button--floating.aui-theme-light:disabled { color: #666666; stroke: #666666; fill: #666666; } .aui-button--primary.aui-theme-light.is-active, .aui-button--primary.aui-theme-light:active, .aui-button--primary.aui-theme-light:hover, .aui-button--floating.aui-theme-light.is-active, .aui-button--floating.aui-theme-light:active, .aui-button--floating.aui-theme-light:hover { border-color: #e5e5e5; background-color: #e5e5e5; } .aui-button--primary.aui-theme-light, .aui-button--primary.aui-theme-light.is-disabled, .aui-button--primary.aui-theme-light:disabled, .aui-button--floating.aui-theme-light, .aui-button--floating.aui-theme-light.is-disabled, .aui-button--floating.aui-theme-light:disabled { border-color: #ffffff; background-color: #ffffff; } .aui-button--secondary.aui-theme-light.is-active, .aui-button--secondary.aui-theme-light:active, .aui-button--secondary.aui-theme-light:hover { border-color: #cccccc; } .aui-button--secondary.aui-theme-light, .aui-button--secondary.aui-theme-light.is-disabled, .aui-button--secondary.aui-theme-light:disabled { border-color: #ffffff; } .aui-button--text.aui-theme-light .aui-button__text::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%23ffffff' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); } .aui-button--text.aui-theme-light .aui-button__text:hover::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='%23e5e5e5' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); } .aui-button--floating.aui-theme-light, .aui-button--floating.aui-theme-light:focus, .aui-button--floating.aui-theme-light:hover { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-button--fixed.aui-theme-light { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-checkbox { /** * Theme: light */ } .aui-checkbox.aui-theme-light { color: #f2f2f2; /** * States */ } .aui-checkbox.aui-theme-light .aui-checkbox__box { border-color: #808080; } .aui-checkbox.aui-theme-light .aui-checkbox__tick { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23f2f2f2' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E"); } .aui-checkbox.aui-theme-light:hover:not(.is-disabled) { color: #ffffff; } .aui-checkbox.aui-theme-light:hover:not(.is-disabled) .aui-checkbox__box { border-color: #ffffff; } .aui-checkbox.aui-theme-light .aui-checkbox__input:focus ~ .aui-checkbox__box { box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.2); } .aui-checkbox.aui-theme-light.is-invalid, .aui-checkbox.aui-theme-light.is-invalid .aui-checkbox__label { color: #eb0d3f; } .aui-checkbox.aui-theme-light.is-invalid .aui-checkbox__tick { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23eb0d3f' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E"); } .aui-checkbox.aui-theme-light.is-invalid .aui-checkbox__box, .aui-checkbox.aui-theme-light.is-invalid:hover .aui-checkbox__box { border-color: #eb0d3f; } .aui-draggable-list.aui-theme-light .aui-draggable-list__item { color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.2); } .aui-draggable-list.aui-theme-light .aui-draggable-list__item:hover { color: rgba(255, 255, 255, 0.95); background: rgba(255, 255, 255, 0.3); } .aui-draggable-list.aui-theme-light.is-dragging .aui-draggable-list__item, .aui-draggable-list.aui-theme-light.is-dragging .aui-draggable-list__item:hover { background: rgba(255, 255, 255, 0.1); } .aui-draggable-list.aui-theme-light.is-dragging .aui-draggable-list__item.is-active, .aui-draggable-list.aui-theme-light.is-dragging .aui-draggable-list__item:hover.is-active { color: rgba(255, 255, 255, 0.95); background: #666666; } .aui-draggable-list.aui-theme-light.is-dragging .is-placeholder, .aui-draggable-list.aui-theme-light.is-dragging .is-placeholder:hover { color: transparent; background: none; } .aui-draggable-list.aui-theme-light .is-placeholder::before { border-color: rgba(255, 255, 255, 0.1); } .aui-draggable-list.aui-theme-light .aui-draggable-list__item::after { background-image: url("data:image/svg+xml;dataset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='5' viewBox='0 0 16 5'%3E%3Crect style='fill:rgba(255, 255, 255, 0.8)' x='0' y='0' width='16' height='1' /%3E%3Crect style='fill:rgba(255, 255, 255, 0.8)' x='0' y='4' width='16' height='1' /%3E%3C/svg%3E"); } .aui-dropzone.aui-theme-light { color: #f2f2f2; border-color: rgba(255, 255, 255, 0.2); } .aui-dropzone.aui-theme-light.is-active, .aui-dropzone.aui-theme-light:hover { border-color: rgba(255, 255, 255, 0.8); } .aui-dropzone.aui-theme-light.aui-dropzone--fullpage { background: rgba(0, 0, 0, 0.9); } .aui-dropzone.aui-theme-light.aui-dropzone--fullpage::after { border-color: rgba(255, 255, 255, 0.8); } .aui-dropdown.aui-theme-black, .aui-dropdown.aui-theme-warmsilver, .aui-dropdown.aui-theme-silver { /** * States */ } .aui-dropdown.aui-theme-black .aui-dropdown__input, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__input, .aui-dropdown.aui-theme-silver .aui-dropdown__input { color: rgba(255, 255, 255, 0.6); border-color: #808080; } .aui-dropdown.aui-theme-black .aui-dropdown__label, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__label, .aui-dropdown.aui-theme-silver .aui-dropdown__label { color: rgba(255, 255, 255, 0.6); } .aui-dropdown.aui-theme-black .aui-dropdown__field::after, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__field::after, .aui-dropdown.aui-theme-silver .aui-dropdown__field::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='rgba(255, 255, 255, 0.6)' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-dropdown.aui-theme-black .aui-dropdown__focus-line, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__focus-line, .aui-dropdown.aui-theme-silver .aui-dropdown__focus-line { background: #000000; } .aui-dropdown.aui-theme-black .aui-dropdown__description, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__description, .aui-dropdown.aui-theme-silver .aui-dropdown__description, .aui-dropdown.aui-theme-black .aui-dropdown__error, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__error, .aui-dropdown.aui-theme-silver .aui-dropdown__error { color: #808080; } .aui-dropdown.aui-theme-black .aui-dropdown__error, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__error, .aui-dropdown.aui-theme-silver .aui-dropdown__error { color: #eb0d3f; } .aui-dropdown.aui-theme-black .aui-dropdown__panel, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__panel, .aui-dropdown.aui-theme-silver .aui-dropdown__panel { background: #1a1a1a; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-dropdown.aui-theme-black .aui-dropdown__list-title, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__list-title, .aui-dropdown.aui-theme-silver .aui-dropdown__list-title { color: rgba(255, 255, 255, 0.3); } .aui-dropdown.aui-theme-black .aui-dropdown__option, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__option, .aui-dropdown.aui-theme-silver .aui-dropdown__option { color: #f2f2f2; } .aui-dropdown.aui-theme-black .aui-dropdown__option:hover, .aui-dropdown.aui-theme-warmsilver .aui-dropdown__option:hover, .aui-dropdown.aui-theme-silver .aui-dropdown__option:hover { background: rgba(255, 255, 255, 0.1); } .aui-dropdown.aui-theme-black:not(.is-disabled):not(.is-invalid) .aui-dropdown__input:hover, .aui-dropdown.aui-theme-warmsilver:not(.is-disabled):not(.is-invalid) .aui-dropdown__input:hover, .aui-dropdown.aui-theme-silver:not(.is-disabled):not(.is-invalid) .aui-dropdown__input:hover { border-color: #000000; } .is-focused.aui-dropdown.aui-theme-black .aui-dropdown__input, .is-focused.aui-dropdown.aui-theme-warmsilver .aui-dropdown__input, .is-focused.aui-dropdown.aui-theme-silver .aui-dropdown__input { border-color: #000000; } .is-dirty.aui-dropdown.aui-theme-black .aui-dropdown__field::after, .is-dirty.aui-dropdown.aui-theme-warmsilver .aui-dropdown__field::after, .is-dirty.aui-dropdown.aui-theme-silver .aui-dropdown__field::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23f2f2f2' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .is-dirty.aui-dropdown.aui-theme-black .aui-dropdown__input, .is-dirty.aui-dropdown.aui-theme-warmsilver .aui-dropdown__input, .is-dirty.aui-dropdown.aui-theme-silver .aui-dropdown__input { border-color: #000000; color: #f2f2f2; } .is-invalid.aui-dropdown.aui-theme-black, .is-invalid.aui-dropdown.aui-theme-warmsilver, .is-invalid.aui-dropdown.aui-theme-silver, .is-invalid.aui-dropdown.aui-theme-black:not(.is-dirty) .aui-dropdown__input, .is-invalid.aui-dropdown.aui-theme-warmsilver:not(.is-dirty) .aui-dropdown__input, .is-invalid.aui-dropdown.aui-theme-silver:not(.is-dirty) .aui-dropdown__input, .is-invalid.aui-dropdown.aui-theme-black .aui-dropdown__counter, .is-invalid.aui-dropdown.aui-theme-warmsilver .aui-dropdown__counter, .is-invalid.aui-dropdown.aui-theme-silver .aui-dropdown__counter, .is-invalid.aui-dropdown.aui-theme-black .aui-dropdown__label, .is-invalid.aui-dropdown.aui-theme-warmsilver .aui-dropdown__label, .is-invalid.aui-dropdown.aui-theme-silver .aui-dropdown__label { color: #eb0d3f; } .is-invalid.aui-dropdown.aui-theme-black .aui-dropdown__field::after, .is-invalid.aui-dropdown.aui-theme-warmsilver .aui-dropdown__field::after, .is-invalid.aui-dropdown.aui-theme-silver .aui-dropdown__field::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23eb0d3f' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .is-invalid.aui-dropdown.aui-theme-black .aui-dropdown__input, .is-invalid.aui-dropdown.aui-theme-warmsilver .aui-dropdown__input, .is-invalid.aui-dropdown.aui-theme-silver .aui-dropdown__input { border-color: #eb0d3f; } .is-invalid.aui-dropdown.aui-theme-black .aui-dropdown__focus-line, .is-invalid.aui-dropdown.aui-theme-warmsilver .aui-dropdown__focus-line, .is-invalid.aui-dropdown.aui-theme-silver .aui-dropdown__focus-line { background: #eb0d3f; } .aui-dropdown { /** * Theme: black */ /** * Theme: warmsilver */ /** * Theme: silver */ } .aui-dropdown.aui-theme-warmsilver .aui-dropdown__panel { background: #c2beb7; } .aui-dropdown.aui-theme-silver .aui-dropdown__panel { background: #bfbfbf; } .aui-fieldset { /** * Theme: light */ } .aui-fieldset.aui-theme-light { color: rgba(255, 255, 255, 0.6); } .aui-fieldset.aui-theme-light.aui-fieldset--selects .aui-fieldset__legend, .aui-fieldset.aui-theme-light.aui-fieldset--textfields .aui-fieldset__legend { color: #f2f2f2; } .aui-fieldset.aui-theme-light.is-invalid .aui-fieldset__error, .aui-fieldset.aui-theme-light.is-invalid .aui-fieldset__legend { color: #eb0d3f; } .aui-flyout.aui-theme-light .aui-flyout__panel { color: #808080; background: #333333; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-flyout.aui-theme-light .aui-flyout__close { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 17 17' %3E%3Cpath fill='%23808080' d='M8.487,7.78l7.78,-7.777c0.235,0.236 0.471,0.472 0.707,0.707l-7.78,7.777l7.777,7.78l-0.708,0.707l-7.776,-7.78l-7.78,7.777l-0.707,-0.708l7.78,-7.776l-7.777,-7.78l0.707,-0.707l7.777,7.78Z' /%3E%3C/svg%3E") center center no-repeat; } .aui-nav.aui-theme-black, .aui-nav.aui-theme-warmsilver, .aui-nav.aui-theme-silver, .aui-nav.aui-theme-red { color: rgba(255, 255, 255, 0.5); fill: rgba(255, 255, 255, 0.5); stroke: rgba(255, 255, 255, 0.5); /** * Modifier: List */ /** * Modifier: Dropdown */ } .aui-nav.aui-theme-black .aui-nav__action.is-active, .aui-nav.aui-theme-warmsilver .aui-nav__action.is-active, .aui-nav.aui-theme-silver .aui-nav__action.is-active, .aui-nav.aui-theme-red .aui-nav__action.is-active, .aui-nav.aui-theme-black .aui-nav__action:hover, .aui-nav.aui-theme-warmsilver .aui-nav__action:hover, .aui-nav.aui-theme-silver .aui-nav__action:hover, .aui-nav.aui-theme-red .aui-nav__action:hover { color: #ffffff; fill: #ffffff; stroke: #ffffff; } .aui-nav.aui-theme-black .aui-nav__action, .aui-nav.aui-theme-warmsilver .aui-nav__action, .aui-nav.aui-theme-silver .aui-nav__action, .aui-nav.aui-theme-red .aui-nav__action, .aui-nav.aui-theme-black .aui-nav__action.is-disabled, .aui-nav.aui-theme-warmsilver .aui-nav__action.is-disabled, .aui-nav.aui-theme-silver .aui-nav__action.is-disabled, .aui-nav.aui-theme-red .aui-nav__action.is-disabled { color: rgba(255, 255, 255, 0.5); fill: rgba(255, 255, 255, 0.5); stroke: rgba(255, 255, 255, 0.5); } .aui-nav.aui-theme-black .aui-nav__indicator, .aui-nav.aui-theme-warmsilver .aui-nav__indicator, .aui-nav.aui-theme-silver .aui-nav__indicator, .aui-nav.aui-theme-red .aui-nav__indicator { background: #ffffff; } .aui-nav.aui-theme-black .aui-nav__paddle-left::after, .aui-nav.aui-theme-warmsilver .aui-nav__paddle-left::after, .aui-nav.aui-theme-silver .aui-nav__paddle-left::after, .aui-nav.aui-theme-red .aui-nav__paddle-left::after, .aui-nav.aui-theme-black .aui-nav__paddle-right::after, .aui-nav.aui-theme-warmsilver .aui-nav__paddle-right::after, .aui-nav.aui-theme-silver .aui-nav__paddle-right::after, .aui-nav.aui-theme-red .aui-nav__paddle-right::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); } .aui-nav.aui-theme-black .aui-nav__paddle-left, .aui-nav.aui-theme-warmsilver .aui-nav__paddle-left, .aui-nav.aui-theme-silver .aui-nav__paddle-left, .aui-nav.aui-theme-red .aui-nav__paddle-left { background: linear-gradient(to right, black 40%, transparent 100%); } .aui-nav.aui-theme-black .aui-nav__paddle-right, .aui-nav.aui-theme-warmsilver .aui-nav__paddle-right, .aui-nav.aui-theme-silver .aui-nav__paddle-right, .aui-nav.aui-theme-red .aui-nav__paddle-right { background: linear-gradient(to right, transparent 0%, black 60%); } .aui-nav--tab.aui-nav.aui-theme-black .aui-nav__action.is-active, .aui-nav--tab.aui-nav.aui-theme-warmsilver .aui-nav__action.is-active, .aui-nav--tab.aui-nav.aui-theme-silver .aui-nav__action.is-active, .aui-nav--tab.aui-nav.aui-theme-red .aui-nav__action.is-active { color: #000000; } .aui-nav--tab.aui-nav.aui-theme-black .aui-nav__indicator, .aui-nav--tab.aui-nav.aui-theme-warmsilver .aui-nav__indicator, .aui-nav--tab.aui-nav.aui-theme-silver .aui-nav__indicator, .aui-nav--tab.aui-nav.aui-theme-red .aui-nav__indicator { background: #e5e5e5; } .aui-nav--list.aui-nav.aui-theme-black .aui-nav__item + .aui-nav__item, .aui-nav--list.aui-nav.aui-theme-warmsilver .aui-nav__item + .aui-nav__item, .aui-nav--list.aui-nav.aui-theme-silver .aui-nav__item + .aui-nav__item, .aui-nav--list.aui-nav.aui-theme-red .aui-nav__item + .aui-nav__item { border-color: rgba(255, 255, 255, 0.2); } .aui-nav--dropdown.aui-nav.aui-theme-black, .aui-nav--dropdown.aui-nav.aui-theme-warmsilver, .aui-nav--dropdown.aui-nav.aui-theme-silver, .aui-nav--dropdown.aui-nav.aui-theme-red { color: rgba(255, 255, 255, 0.5); } .aui-nav--dropdown.aui-nav.aui-theme-black .aui-nav__toggle, .aui-nav--dropdown.aui-nav.aui-theme-warmsilver .aui-nav__toggle, .aui-nav--dropdown.aui-nav.aui-theme-silver .aui-nav__toggle, .aui-nav--dropdown.aui-nav.aui-theme-red .aui-nav__toggle { color: #ffffff; } .aui-nav--dropdown.aui-nav.aui-theme-black .aui-nav__toggle-label::after, .aui-nav--dropdown.aui-nav.aui-theme-warmsilver .aui-nav__toggle-label::after, .aui-nav--dropdown.aui-nav.aui-theme-silver .aui-nav__toggle-label::after, .aui-nav--dropdown.aui-nav.aui-theme-red .aui-nav__toggle-label::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='rgba(255, 255, 255, 0.5)' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-nav--dropdown.aui-nav.aui-theme-black .aui-nav__item:not(:last-child), .aui-nav--dropdown.aui-nav.aui-theme-warmsilver .aui-nav__item:not(:last-child), .aui-nav--dropdown.aui-nav.aui-theme-silver .aui-nav__item:not(:last-child), .aui-nav--dropdown.aui-nav.aui-theme-red .aui-nav__item:not(:last-child) { border-color: rgba(255, 255, 255, 0.2); } .aui-nav--dropdown.aui-nav.aui-theme-black .aui-nav__panel, .aui-nav--dropdown.aui-nav.aui-theme-warmsilver .aui-nav__panel, .aui-nav--dropdown.aui-nav.aui-theme-silver .aui-nav__panel, .aui-nav--dropdown.aui-nav.aui-theme-red .aui-nav__panel { background: #333333; box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-nav.aui-theme-black .aui-nav__underline, .aui-nav.aui-theme-warmsilver .aui-nav__underline, .aui-nav.aui-theme-silver .aui-nav__underline, .aui-nav.aui-theme-red .aui-nav__underline { background: rgba(255, 255, 255, 0.5); } .is-sticky.aui-nav.aui-theme-black .aui-nav__toggle, .is-sticky.aui-nav.aui-theme-warmsilver .aui-nav__toggle, .is-sticky.aui-nav.aui-theme-silver .aui-nav__toggle, .is-sticky.aui-nav.aui-theme-red .aui-nav__toggle { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } .aui-nav { /** * Theme: black */ /** * Theme: warmsilver */ /** * Theme: silver */ /** * Theme: red */ /** * Theme: gray95 */ /** * TODO Remove in final version. * Theme: gray */ } .aui-nav.aui-theme-warmsilver .aui-nav__paddle-left { background: linear-gradient(to right, #b6b1a9 40%, rgba(182, 177, 169, 0) 100%); } .aui-nav.aui-theme-warmsilver .aui-nav__paddle-right { background: linear-gradient(to right, rgba(182, 177, 169, 0) 0%, #b6b1a9 60%); } .aui-nav.aui-theme-silver .aui-nav__paddle-left { background: linear-gradient(to right, #b2b2b2 40%, rgba(178, 178, 178, 0) 100%); } .aui-nav.aui-theme-silver .aui-nav__paddle-right { background: linear-gradient(to right, rgba(178, 178, 178, 0) 0%, #b2b2b2 60%); } .aui-nav.aui-theme-red .aui-nav__paddle-left { background: linear-gradient(to right, #bb0a30 40%, rgba(187, 10, 48, 0) 100%); } .aui-nav.aui-theme-red .aui-nav__paddle-right { background: linear-gradient(to right, rgba(187, 10, 48, 0) 0%, #bb0a30 60%); } .aui-nav.aui-theme-gray95 .aui-nav__paddle-left { background: linear-gradient(to right, #f2f2f2 40%, rgba(242, 242, 242, 0) 100%); } .aui-nav.aui-theme-gray95 .aui-nav__paddle-right { background: linear-gradient(to right, rgba(242, 242, 242, 0) 0%, #f2f2f2 60%); } .aui-nav.aui-theme-gray10-gray20 { color: rgba(255, 255, 255, 0.5); fill: rgba(255, 255, 255, 0.5); stroke: rgba(255, 255, 255, 0.5); } .aui-nav.aui-theme-gray10-gray20 .aui-nav__action.is-active, .aui-nav.aui-theme-gray10-gray20 .aui-nav__action:hover { color: #ffffff; fill: #ffffff; stroke: #ffffff; } .aui-nav.aui-theme-gray10-gray20 .aui-nav__action, .aui-nav.aui-theme-gray10-gray20 .aui-nav__action.is-disabled { color: rgba(255, 255, 255, 0.5); fill: rgba(255, 255, 255, 0.5); stroke: rgba(255, 255, 255, 0.5); } .aui-nav.aui-theme-gray10-gray20 .aui-nav__indicator { background: #ffffff; } .aui-nav.aui-theme-gray10-gray20 .aui-nav__paddle-left::after, .aui-nav.aui-theme-gray10-gray20 .aui-nav__paddle-right::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='1px' fill='none' d='M1.5,1l5.485,5.504l-5.48,5.496' /%3E%3C/svg%3E"); } .aui-nav.aui-theme-gray10-gray20 .aui-nav__paddle-left { background: linear-gradient(to right, #1a1a1a 40%, rgba(26, 26, 26, 0) 100%); } .aui-nav.aui-theme-gray10-gray20 .aui-nav__paddle-right { background: linear-gradient(to right, rgba(26, 26, 26, 0) 0%, #1a1a1a 60%); } .aui-nav.aui-theme-gray10-gray20.aui-nav--tab .aui-nav__action.is-active { color: #ffffff; } .aui-nav.aui-theme-gray10-gray20.aui-nav--tab .aui-nav__indicator { background: #333333; } .aui-pager.aui-theme-light { color: #808080; } .aui-pager.aui-theme-light .aui-pager__current { color: #ffffff; } .aui-pager.aui-theme-light .aui-pager__next:hover:not(.is-disabled), .aui-pager.aui-theme-light .aui-pager__prev:hover:not(.is-disabled) { color: #ffffff; } .aui-pagination.aui-theme-light { color: #808080; } .aui-pagination.aui-theme-light .aui-pagination__link.is-active, .aui-pagination.aui-theme-light .aui-pagination__link:hover:not(.is-disabled), .aui-pagination.aui-theme-light .aui-pagination__next:hover:not(.is-disabled), .aui-pagination.aui-theme-light .aui-pagination__prev:hover:not(.is-disabled) { color: #ffffff; } .aui-pagination.aui-theme-light .aui-pagination__indicator { background: #ffffff; } .aui-progress.aui-theme-light { background: rgba(255, 255, 255, 0.3); } .aui-radio { /** * Theme: light */ } .aui-radio.aui-theme-light { color: #f2f2f2; } .aui-radio.aui-theme-light .aui-radio__box { border-color: #808080; } .aui-radio.aui-theme-light .aui-radio__tick { background: rgba(255, 255, 255, 0.2); } .aui-radio.aui-theme-light:hover:not(.is-disabled) { color: #ffffff; } .aui-radio.aui-theme-light:hover:not(.is-disabled) .aui-radio__box { border-color: #ffffff; } .aui-radio.aui-theme-light .aui-radio__input:focus ~ .aui-radio__box { box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.2); } .aui-radio.aui-theme-light.is-checked .aui-radio__tick { background: #000000; } .aui-select { /** * Theme: light */ } .aui-select.aui-theme-light { /** * States */ } .aui-select.aui-theme-light .aui-select__input { color: rgba(255, 255, 255, 0.6); border-color: #808080; } .aui-select.aui-theme-light .aui-select__input::-ms-value { color: rgba(255, 255, 255, 0.6); } .aui-select.aui-theme-light .aui-select__label { color: rgba(255, 255, 255, 0.6); } .aui-select.aui-theme-light::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='rgba(255, 255, 255, 0.6)' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E") center center no-repeat; } .aui-select.aui-theme-light .aui-select__focus-line { background: #000000; } .aui-select.aui-theme-light .aui-select__description, .aui-select.aui-theme-light .aui-select__error { color: #808080; } .aui-select.aui-theme-light .aui-select__error { color: #eb0d3f; } .aui-select.aui-theme-light:not(.is-disabled):not(.is-invalid) .aui-select__input:hover { border-color: #000000; } .aui-select.aui-theme-light.is-dirty::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23f2f2f2' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-select.aui-theme-light.is-dirty .aui-select__input { border-color: #000000; color: #f2f2f2; } .aui-select.aui-theme-light.is-dirty .aui-select__input::-ms-value { color: #f2f2f2; } .aui-select.aui-theme-light.is-invalid, .aui-select.aui-theme-light.is-invalid .aui-select__label, .aui-select.aui-theme-light.is-invalid:not(.is-dirty) .aui-select__input { color: #eb0d3f; } .aui-select.aui-theme-light.is-invalid::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8' viewBox='0 0 13 8'%3E%3Cpolygon fill='%23eb0d3f' points='6.511 7.371 0 0.715 0.731 0 6.51 5.907 12.267 0 13 0.714 6.511 7.371'/%3E%3C/svg%3E"); } .aui-select.aui-theme-light.is-invalid .aui-select__input { border-color: #eb0d3f; } .aui-select.aui-theme-light.is-invalid .aui-select__focus-line { background: #eb0d3f; } .aui-slider { /** * Theme: black */ /** * Theme: silver */ /** * Theme: warmsilver */ } .aui-slider.aui-theme-black { color: #cccccc; } .aui-slider.aui-theme-black .aui-slider__target::after { background: #333333; } .aui-slider.aui-theme-black .aui-slider__connect::after { background: #ffffff; } .aui-slider.aui-theme-black .aui-slider__handle { background: #000000; border-color: #808080; } .aui-slider.aui-theme-black:not(.is-disabled) .aui-slider__handle:hover { border-color: #ffffff; } .aui-slider.aui-theme-silver { color: #000000; } .aui-slider.aui-theme-silver .aui-slider__target::after { background: #c1c1c1; } .aui-slider.aui-theme-silver .aui-slider__connect::after { background: #ffffff; } .aui-slider.aui-theme-silver .aui-slider__handle { background: #b2b2b2; border-color: #d9d9d9; } .aui-slider.aui-theme-silver:not(.is-disabled) .aui-slider__handle:hover { border-color: #ffffff; } .aui-slider.aui-theme-warmsilver { color: #000000; } .aui-slider.aui-theme-warmsilver .aui-slider__target::after { background: #c5c1ba; } .aui-slider.aui-theme-warmsilver .aui-slider__connect::after { background: #ffffff; } .aui-slider.aui-theme-warmsilver .aui-slider__handle { background: #b6b1a9; border-color: #dbd8d4; } .aui-slider.aui-theme-warmsilver:not(.is-disabled) .aui-slider__handle:hover { border-color: #ffffff; } .aui-indicator.aui-theme-light .aui-indicator__action, .aui-indicator.aui-theme-light .aui-indicator__action:visited { background: rgba(255, 255, 255, 0.2); } .aui-indicator.aui-theme-light .aui-indicator__action:hover { background: #808080; } .aui-indicator.aui-theme-light .aui-indicator__indicator { background: #000000; } .aui-indicator.aui-theme-image .aui-indicator__action, .aui-indicator.aui-theme-image .aui-indicator__action:visited { background: rgba(179, 179, 179, 0.5); } .aui-indicator.aui-theme-image .aui-indicator__action:hover { background: #808080; } .aui-indicator.aui-theme-image .aui-indicator__indicator { background: #000000; } .aui-spinner.aui-theme-light { stroke: rgba(255, 255, 255, 0.6); } .aui-switch { /** * Theme: light */ } .aui-switch.aui-theme-light .aui-switch__text { color: #f2f2f2; } .aui-switch.aui-theme-light .aui-switch__track { border-color: #808080; } .aui-switch.aui-theme-light .aui-switch__thumb { background: rgba(255, 255, 255, 0.2); } .aui-switch.aui-theme-light.aui-switch--equal .aui-switch__text--right { color: #808080; } .aui-switch.aui-theme-light.aui-switch--equal .aui-switch__thumb { background: #000000; } .aui-switch.aui-theme-light:hover:not(.is-disabled) .aui-switch__text { color: #ffffff; } .aui-switch.aui-theme-light:hover:not(.is-disabled) .aui-switch__track { border-color: #ffffff; } .aui-switch.aui-theme-light.aui-switch--equal:hover:not(.is-disabled) .aui-switch__text--right { color: #808080; } .aui-switch.aui-theme-light.aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--left { color: #808080; } .aui-switch.aui-theme-light.aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--right { color: #ffffff; } .aui-switch.aui-theme-light .aui-switch__input:focus ~ .aui-switch__track { box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.2); } .aui-switch.aui-theme-light .aui-switch__input:checked ~ .aui-switch__track .aui-switch__thumb { background: #000000; } .aui-switch.aui-theme-light.aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--left { color: #808080; } .aui-switch.aui-theme-light.aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--right { color: #f2f2f2; } .aui-table { /** * Theme: light */ } .aui-table.aui-theme-light table { border-color: #ffffff; } .aui-table.aui-theme-light th { border-top-color: #ffffff; } .aui-table.aui-theme-light td { border-top-color: #ffffff; } .aui-table.aui-theme-light .aui-table__cell--colored { background-color: rgba(255, 255, 255, 0.2); } .aui-table.aui-theme-light .aui-table__cell--last-row td::after { border-color: #ffffff; } .aui-textfield { /** * Theme: light */ } .aui-textfield.aui-theme-light { stroke: #f2f2f2; /** * States */ } .aui-textfield.aui-theme-light .aui-textfield__field { border-color: #808080; } .aui-textfield.aui-theme-light .aui-textfield__input { color: rgba(255, 255, 255, 0.6); } .aui-textfield.aui-theme-light .aui-textfield__label { color: rgba(255, 255, 255, 0.6); } .aui-textfield.aui-theme-light .aui-textfield__focus-line { background: #000000; } .aui-textfield.aui-theme-light .aui-textfield__counter, .aui-textfield.aui-theme-light .aui-textfield__description, .aui-textfield.aui-theme-light .aui-textfield__error, .aui-textfield.aui-theme-light .aui-textfield__valid { color: #808080; } .aui-textfield.aui-theme-light .aui-textfield__valid::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpolygon fill='%23000000' points='4.945 12 0 7.699 0.667 6.92 4.708 10.435 11.132 0 12 0.543 4.945 12' /%3E%3C/svg%3E") center center no-repeat; } .aui-textfield.aui-theme-light .aui-textfield__error { color: #eb0d3f; } .aui-textfield.aui-theme-light:not(.is-disabled):not(.is-invalid) .aui-textfield__field:hover { border-bottom-color: #000000; } .aui-textfield.aui-theme-light.is-focused .aui-textfield__field { border-bottom-color: #000000; } .aui-textfield.aui-theme-light.is-dirty .aui-textfield__field { border-bottom-color: #000000; } .aui-textfield.aui-theme-light.is-dirty .aui-textfield__input { color: #f2f2f2; } .aui-textfield.aui-theme-light.is-invalid, .aui-textfield.aui-theme-light.is-invalid:not(.is-dirty) .aui-textfield__input, .aui-textfield.aui-theme-light.is-invalid .aui-textfield__counter, .aui-textfield.aui-theme-light.is-invalid .aui-textfield__label { color: #eb0d3f; } .aui-textfield.aui-theme-light.is-invalid .aui-textfield__field { border-color: #eb0d3f; } .aui-textfield.aui-theme-light.is-invalid .aui-textfield__focus-line { background: #eb0d3f; } ================================================ FILE: gulpfile.js ================================================ /** * * Audi UI * Copyright 2016 Audi AG. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License * */ 'use strict'; // eslint-disable-line strict const _ = require('gulp-load-plugins')(); const browserSync = require('browser-sync').create(); const del = require('del'); const gulp = require('gulp'); const pkg = require('./package.json'); const webpack = require('webpack'); const webpackStream = require('webpack-stream'); // ---------------------------------------------------------------------------- // CONFIG // ---------------------------------------------------------------------------- const libraryName = 'audi-ui'; const libraryDest = 'dist'; const testFolder = '.temp/test/visual'; const banner = `/** * ${pkg.name} - ${pkg.description} * @version v${pkg.version} * @license ${pkg.license} * @copyright ${new Date().getFullYear()} ${pkg.author} * @link ${pkg.homepage} */\n`; const webpackConfig = { output: { filename: `${libraryName}.min.js`, library: libraryName, libraryTarget: 'umd', umdNamedDefine: true }, devtool: 'source-map', module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel', query: { compact: false } }, { test: /\.js$/, exclude: /node_modules/, loader: 'eslint-loader' } ] }, plugins: [ new webpack.optimize.UglifyJsPlugin({ minimize: true }), new webpack.BannerPlugin(banner, { raw: true }) ] }; const webpackConfigTest = { output: { filename: `test.min.js`, libraryTarget: 'umd' }, devtool: 'source-map', module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: 'babel', query: { compact: false } }, { test: /\.js$/, exclude: /node_modules/, loader: 'eslint-loader' } ] } }; const nunjucksConfig = { path: ['test/visual/', 'src'], envOptions: { watch: false }, manageEnv: function(environment) { environment.addFilter('path', function(str, baseDir) { // TODO switch depending on environment (test, deploy, etc.) const dir = { test: '.temp/test/visual/', //test: 'audi/audi-ui-redo-2021/', }; baseDir = dir[baseDir] || ''; return `/${baseDir}${str}`; }); environment.addFilter('slug', function(str) { return str && str.replace(/\s/g, '-', str).toLowerCase(); }); environment.addGlobal('testFolder', testFolder); } }; // ---------------------------------------------------------------------------- // ERROR HANDLING // ---------------------------------------------------------------------------- /** * Template for error logging messages. * @param {Object} error object. * @returns {string} template */ function errorLoggingTemplate(error) { return `${_.util.colors.bgRed(`${error.name} in ${error.relativePath}`)} ⚠️ ${error.name} ${_.util.colors.dim(`reported by`)} ${error.plugin} Path: ${error.relativePath} Line: ${error.line} Column: ${error.column} ${_.util.colors.red( error.formatted ? error.formatted.split('\n').join('\n ') : '' )}`; }; /** * Template for error notifications. * @param {Object} error object. * @returns {Object} notification */ function errorNotifyObject(error) { return { title: `Gulp`, subtitle: `${error.name}: ${error.plugin}`, message: `${error.relativePath} ${error.line}:${error.column}`, sound: 'Hero', }; } /** * Error handling * * To eliminate the need of adding the error handler to each task, we overwrite * the `gulp.src` method and add proper error logging messages and notifications. */ const _gulpSrc = gulp.src; gulp.src = function() { return _gulpSrc .apply(gulp, arguments) .pipe(_.plumber(function(error) { // Log error message in console _.util.log(errorLoggingTemplate(error)); // Display notification _.notify.onError(errorNotifyObject(error)).apply(this, arguments); // Emit the end event, to properly end the task this.emit('end'); })); }; // ---------------------------------------------------------------------------- // CSS // ---------------------------------------------------------------------------- gulp.task('css', function() { return gulp.src('src/index.scss') .pipe(_.plumber()) .pipe(_.sass({precision: 10})) .pipe(_.autoprefixer({ browsers: ['last 2 version'] })) .pipe(_.header(banner)) .pipe(_.rename({ basename: libraryName })) .pipe(gulp.dest(libraryDest)) .pipe(_.if ('*.css', _.csso())) .pipe(_.header(banner)) .pipe(_.rename({ suffix: '.min' })) // .pipe(_.plumber.stop()) .pipe(gulp.dest(libraryDest)) .pipe(_.size({ title: _.util.colors.underline('CSS size:') + '\n', showFiles: true, showTotal: false, gzip: true })); }); // ---------------------------------------------------------------------------- // JS // ---------------------------------------------------------------------------- gulp.task('js', function() { return gulp.src('src/index.js') .pipe(webpackStream(webpackConfig, webpack)) .pipe(gulp.dest(libraryDest)) .pipe(_.size({ title: _.util.colors.underline('JS size:') + '\n', showFiles: true, showTotal: false, gzip: true })); }); // ---------------------------------------------------------------------------- // SERVE & WATCH // ---------------------------------------------------------------------------- gulp.task('serve:test', function(done) { browserSync.init({ notify: false, server: '.', startPath: `${testFolder}/index.html` }, done); }); gulp.task('reload', function(done) { browserSync.reload(); done(); }); // FIXME CSS live injection currently not working with proxy option. // Quick win is to perform a page reload. gulp.task('watch:css', function() { gulp.watch('src/**/*.scss', gulp.series('css', 'test:visual:css', 'reload')); }); gulp.task('watch:js', function() { gulp.watch('src/**/*.js', gulp.series('js', 'reload')); }); gulp.task('watch:test:css', function() { gulp.watch(['src/**/*.scss', 'test/visual/scss/**/*.scss'], gulp.series('test:visual:css', 'reload')); }); gulp.task('watch:test:js', function() { gulp.watch(['src/**/*.js', 'test/visual/js/**/*.js'], gulp.series('test:visual:js', 'reload')); }); gulp.task('watch:test:pages', function() { gulp.watch('test/visual/pages/**/*.+(html|nunjucks|njk|md)', gulp.series('test:visual:pages', 'reload')); }); gulp.task('watch:test', gulp.parallel('watch:test:css', 'watch:test:js', 'watch:test:pages')); // ---------------------------------------------------------------------------- // CLEAN // ---------------------------------------------------------------------------- gulp.task('clean', function() { return del([libraryDest, '.temp']); }); // ---------------------------------------------------------------------------- // TEST // ---------------------------------------------------------------------------- let getPackageData = function(file) { // Returns package.json as variable package // to use it in Nunjucks templates like this {{ package.version }} return { 'package': pkg, }; } gulp.task('test:visual:css', function() { return gulp.src('test/visual/scss/test.scss') .pipe(_.sass({precision: 10})) .pipe(_.autoprefixer({ browsers: ['last 2 version'] })) .pipe(gulp.dest(`${testFolder}/assets/css`)); }); gulp.task('test:visual:js', function() { return gulp.src('test/visual/js/test.js') .pipe(webpackStream(webpackConfigTest, webpack)) .pipe(gulp.dest(`${testFolder}/assets/js`)); }); gulp.task('test:visual:pages', function() { return gulp.src(['test/visual/pages/**/*.+(html|nunjucks|njk|md)', '!test/visual/pages/_**/*.*', '!test/visual/pages/_*.*']) .pipe(_.data(getPackageData)) .pipe(_.nunjucksRender(nunjucksConfig)) .pipe(gulp.dest(`${testFolder}`)); }); gulp.task('test:visual:content', function() { return gulp.src(['test/visual/content/**/*.*']) .pipe(gulp.dest(`${testFolder}/assets/content`)); }); gulp.task('test:visual:fonts', function() { return gulp.src(['./node_modules/@audi/audi-type/dist/fonts/**/*.{woff,woff2,ttf}']) .pipe(gulp.dest(`${testFolder}/assets/fonts`)); }); gulp.task('test:visual:svg', function() { return gulp.src(['node_modules/@audi/audi-icon/dist/svg/sprite/sprite.svg']) .pipe(gulp.dest(`${testFolder}/assets/svg`)); }); gulp.task('test:visual', gulp.series( gulp.parallel('clean'), gulp.parallel('css', 'js'), gulp.parallel('test:visual:svg', 'test:visual:css', 'test:visual:js', 'test:visual:pages', 'test:visual:content', 'test:visual:fonts'), gulp.parallel('serve:test', 'watch:test') ) ); // ---------------------------------------------------------------------------- // DEFAULT // ---------------------------------------------------------------------------- gulp.task('default', gulp.series('clean', 'css', 'js')); ================================================ FILE: package.json ================================================ { "name": "@audi/audi-ui", "version": "1.0.0-alpha.1", "description": "Audi UI components in HTML, CSS and JS.", "author": "Audi", "private": false, "homepage": "https://github.com/audi/audi-ui", "repository": { "type": "git", "url": "git://github.com/audi/audi-ui.git" }, "main": "dist/audi-ui.min.js", "devDependencies": { "@audi/audi-icon": "^1.0.0-alpha.1", "@audi/audi-type": "^1.0.0-alpha.1", "babel": "6.3.13", "babel-core": "6.1.18", "babel-eslint": "5.0.0", "babel-loader": "6.1.0", "babel-plugin-add-module-exports": "0.1.2", "babel-plugin-transform-es2015-classes": "^6.9.0", "babel-polyfill": "^6.16.0", "babel-preset-es2015": "6.3.13", "bezier-easing": "^2.0.3", "browser-sync": "^2.17.3", "del": "^2.2.2", "dom4": "^1.8.3", "eslint": "1.7.2", "eslint-loader": "1.1.0", "fontfaceobserver": "^2.0.5", "gulp": "4.0.2", "gulp-autoprefixer": "^3.1.1", "gulp-csso": "^2.0.0", "gulp-data": "^1.2.1", "gulp-header": "^1.8.8", "gulp-if": "^2.0.1", "gulp-load-plugins": "^1.2.4", "gulp-notify": "^2.2.0", "gulp-nunjucks-render": "^2.0.0", "gulp-plumber": "^1.1.0", "gulp-rename": "^1.2.2", "gulp-sass": "^2.3.2", "gulp-size": "^2.1.0", "gulp-sourcemaps": "^2.0.0", "gulp-to-json": "^1.0.1", "gulp-uglify": "^2.0.0", "gulp-util": "^3.0.7", "normalize.css": "^5.0.0", "nouislider": "^9.2.0", "path": "^0.12.7", "tether": "^1.3.7", "urijs": "^1.18.2", "webpack": "1.12.9", "webpack-stream": "^3.2.0" }, "scripts": { "build": "gulp", "test:visual": "gulp test:visual" }, "engines": { "node": ">=6.0.0" }, "bugs": { "url": "https://github.com/audi/audi-ui/issues" }, "directories": { "test": "test" }, "license": "Apache-2.0" } ================================================ FILE: src/_blank-component/README.md ================================================ ## Introduction The Audi UI (AUI) **Blank** component is … (text follows) ### To include an AUI **Blank** component: ```html ``` ================================================ FILE: src/_blank-component/_blank.scss ================================================ $aui-blank-variable: 'value'; .aui-blank { // (1) Rename 'blank' to 'name-of-component' // (2) Import me in 'src/index.scss' } ================================================ FILE: src/_blank-component/blank.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-blank'; /** * Class constructor for Blank AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Blank extends Component { /** * Upgrades all Blank AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Blank(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); // (1) Define `SELECTOR_COMPONENT` like '.aui-js-name-of-component' // (2) Rename 'Blank' to 'NameOfComponent' // - in the comments of constructor method // - in the class name // - in the comments of method `upgradeElements` // - in the method `upgradeElements` itself // (3) Reference me in 'src/index.js' } /** * Dispose component */ dispose() { super.dispose(); // Remove dynamic added classes and attributes // Remove event listener // etc. } } ================================================ FILE: src/_functions.scss ================================================ // TODO Überprüfen ob die noch benötigt wird. Derzeit nur im Player. @function line-height($line-height-ratio, $font-size, $baseline: $aui-base-unit) { @return round($line-height-ratio * $font-size / $baseline) * $baseline; } // TODO Complete error handling @function aui-map-get($map, $args...) { $return: $map; @for $i from 1 through length($args) { $key: nth($args, $i); $return: map-get($return, $key); @if type-of($return) != 'map' and $i < length($args) { @warn 'No map found for `' + $key + '`.'; @return ''; } $last-key: $key; } @return $return; } // Fork of Bourbon SASS implememntation // https://github.com/thoughtbot/bourbon/blob/v4-stable/app/assets/stylesheets/functions/_modular-scale.scss // Multiplies $value with $ratio in power of $increment @function modular-scale($increment, $value: aui-map-get($aui-modular-scale, default, base), $ratio: aui-map-get($aui-modular-scale, default, ratio), $round: true) { $v1: nth($value, 1); $v2: nth($value, length($value)); $value: $v1; // scale $v2 to just above $v1 @while $v2 > $v1 { $v2: ($v2 / $ratio); // will be off-by-1 } @while $v2 < $v1 { $v2: ($v2 * $ratio); // will fix off-by-1 } // check AFTER scaling $v2 to prevent double-counting corner-case $double-stranded: $v2 > $v1; @if $increment > 0 { @for $i from 1 through $increment { @if $double-stranded and ($v1 * $ratio) > $v2 { $value: $v2; $v2: ($v2 * $ratio); } @else { $v1: ($v1 * $ratio); $value: $v1; } } } @if $increment < 0 { // adjust $v2 to just below $v1 @if $double-stranded { $v2: ($v2 / $ratio); } @for $i from $increment through -1 { @if $double-stranded and ($v1 / $ratio) < $v2 { $value: $v2; $v2: ($v2 / $ratio); } @else { $v1: ($v1 / $ratio); $value: $v1; } } } @if ($round) { $value: round($value) } @return $value; } // Replace `$search` with `$replace` in `$string` // @author Hugo Giraudel // @param {string} $string - Initial string // @param {string} $search - Substring to replace // @param {string} $replace ('') - New value // @return {string} - Updated string // https://css-tricks.com/snippets/sass/str-replace-function/ @function str-replace($string, $search, $replace: '') { $index: str-index($string, $search); @if $index { @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); } @return $string; } // Encode SVG to use them as data-uri for background-image // Encodes <, > and #. // https://codepen.io/tigt/post/optimizing-svgs-in-data-uris // @param {string} $string - SVG code to encode // @returns {string} - encoded String @function encode-svg($string) { $string: str-replace($string, '<', '%3C'); $string: str-replace($string, '>', '%3E'); $string: str-replace($string, '#', '%23'); @return $string; } // Returns a handle symbol used in Draggable components as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-draggable-handle($color) { @return encode-svg(""); } // Returns an arrow symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-arrow($color) { @return encode-svg(""); } // Returns an arrow symbol used in Dropdown/Select components as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-dropdown-arrow($color) { @return encode-svg(""); } // Returns a divider symbol used in breadcrumbs as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-breadcrumb-divider($color) { @return encode-svg(""); } // Returns a close symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-close($color) { @return encode-svg(""); } // Returns a tick symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-tick($color) { @return encode-svg(""); } // Returns a triangle symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-triangle($color) { @return encode-svg(""); } // Returns a circle symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-circle($color) { @return encode-svg(""); } // Returns a circle symbol as SVG element. // @param {color} $color the color used as fill and/or stroke. // @returns {string} the SVG element as string. @function aui-svg-caution($color) { @return encode-svg(""); } ================================================ FILE: src/_mixins.scss ================================================ @mixin aui-respond-to($breakpoint-name) { @if map-has-key($aui-breakpoint, $breakpoint-name) { @media (min-width: map-get($aui-breakpoint, $breakpoint-name)) { @content; } } @else { @content; } } @mixin aui-responsive-type($font-size-increment, $line-height-ratio) { $base: aui-map-get($aui-modular-scale, default, base); $ratio: aui-map-get($aui-modular-scale, default, ratio); $baseline: $aui-base-unit; $font-size: modular-scale($font-size-increment, $base, $ratio); font-size: round($font-size); line-height: round($line-height-ratio * $font-size / $baseline) * $baseline; @each $breakpoint-name, $scale in $aui-modular-scale { @if $breakpoint-name != 'default' { @if type-of($scale) == 'map' { @include aui-respond-to($breakpoint-name) { $changed: false; @if map-get($scale, base) and map-get($scale, base) != $base { $base: map-get($scale, base); $changed: true; } @if map-get($scale, ratio) and map-get($scale, ratio) != $ratio { $ratio: map-get($scale, ratio); $changed: true; } @if $changed { $font-size: modular-scale($font-size-increment, $base, $ratio); font-size: round($font-size); line-height: round($line-height-ratio * $font-size / $baseline) * $baseline; } } } } } } @mixin typo-body() { font-size: unit(4); line-height: unit(7); } // TODO Ersetzen. Wird nur noch von Player verwendet. @mixin aui-font-size-line-height($font-size-increment, $line-height-ratio, $base: aui-map-get($aui-modular-scale, default, base), $ratio: aui-map-get($aui-modular-scale, default, ratio), $baseline: $aui-base-unit) { $font-size: modular-scale($font-size-increment, $base, $ratio); font-size: round($font-size); line-height: round($line-height-ratio * $font-size / $baseline) * $baseline; } @mixin aui-remove-tap-highlight() { // Remove the unwanted box around interactive elements, e.g. AUI button: // http://phonegap-tips.com/articles/essential-phonegap-css-webkit-tap-highlight-color.html -webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); } // Provides an easy way to include a clearfix for containing floats. // We use this modern clearfix from cssmojo: // http://cssmojo.com/latest_new_clearfix_so_far/ @mixin clearfix() { &::after { content: ''; display: table; clear: both; } } // Shadows @mixin shadow() { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.05), 0 0 50px 0 rgba(0, 0, 0, 0.07); } @mixin shadow-dark() { box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1), 0 0 40px 0 rgba(0, 0, 0, 0.15); } @mixin shadow-focus() { box-shadow: 0 0 3px 3px rgba(#000, 0.1); } @mixin shadow-focus-light() { box-shadow: 0 0 3px 3px rgba(#fff, 0.2); } // SVG @mixin icon { display: block; fill: none; stroke: currentColor; stroke-width: $aui-icon-stroke-width; } ================================================ FILE: src/_themes.scss ================================================ @import "audioplayer/audioplayer-themes"; @import "breadcrumb/breadcrumb-themes"; @import "button/button-themes"; @import "checkbox/checkbox-themes"; @import "draggable/draggable-themes"; @import "dropzone/dropzone-themes"; @import "dropdown/dropdown-themes"; @import "fieldset/fieldset-themes"; @import "flyout/flyout-themes"; @import "nav/nav-themes"; @import "pager/pager-themes"; @import "pagination/pagination-themes"; @import "progress/progress-themes"; @import "radio/radio-themes"; @import "select/select-themes"; @import "slider/slider-themes"; @import "indicator/indicator-themes"; @import "spinner/spinner-themes"; @import "switch/switch-themes"; @import "table/table-themes"; @import "textfield/textfield-themes"; ================================================ FILE: src/_variables.scss ================================================ $aui-rem-base: 16px !default; // in px $aui-base-unit: 4px !default; // in px @import "util/units"; $aui-layout-min-width: 288px !default; // = smallest grid width on 320px viewport. $aui-pi: 3.14159; /** * Modular Scale */ //$aui-modular-scale: ( default: ( base: 16px, ratio: 1.14, ), small: ( ratio: 1.17, ), large: ( base: 18px, ratio: 1.21, ), huge: ( base: 20px, ratio: 1.25, ), ) !default; $aui-modular-scale: ( default: ( base: 16px, ratio: 1.14, ), small: ( base: 16px, ratio: 1.17, ), large: ( base: 18px, ratio: 1.21, ), huge: ( base: 20px, ratio: 1.25, ), ) !default; /** * Animation & Transitions */ $aui-easing: cubic-bezier(0.75, 0.02, 0.5, 1) !default; /** * Colors */ $aui-color-red: #bb0a30 !default; $aui-color-progressive-red: #f50537 !default; $aui-color-signal-red: #eb0d3f !default; $aui-color-yellow: #ffaa00 !default; $aui-color-green: #009900 !default; $aui-color-charging-neon-blue: #556EFE !default; $aui-color-charging-blue: #2526fe !default; $aui-color-charging-neon-green: #15da15 !default; $aui-color-charging-green: #0da20d !default; $aui-color-silver: #b2b2b2 !default; $aui-color-warmsilver: #b6b1a9 !default; $aui-color-black: #000000 !default; $aui-color-gray10: #1a1a1a !default; $aui-color-gray20: #333333 !default; $aui-color-gray30: #4c4c4c !default; $aui-color-gray40: #666666 !default; $aui-color-gray50: #808080 !default; $aui-color-gray60: #999999 !default; $aui-color-gray70: #b3b3b3 !default; $aui-color-gray80: #cccccc !default; $aui-color-gray85: #d9d9d9 !default; $aui-color-gray90: #e5e5e5 !default; $aui-color-gray95: #f2f2f2 !default; $aui-color-white: #ffffff !default; $aui-color-light: $aui-color-gray95 !default; $aui-color-dark: $aui-color-gray20 !default; $aui-color-body: $aui-color-dark !default; $aui-color-placeholder: $aui-color-gray60 !default; $aui-color-invalid: $aui-color-signal-red !default; /** * Font */ $aui-font-default: #{"\'AudiTypeVariable\'", Verdana, Geneva, sans-serif} !default; $aui-font-wide: #{"\'AudiTypeWide\'", Verdana, Geneva, sans-serif} !default; //$aui-font-extended: #{"\'AudiTypeExtended\'", Verdana, Geneva, sans-serif} !default; $aui-font-extended: #{"\'AudiTypeVariable\'", Verdana, Geneva, sans-serif} !default; $aui-font-extended-width: "wdth" 130; $aui-font-weight-light: 300 !default; $aui-font-weight-normal: 400 !default; $aui-font-weight-bold: 700 !default; // To smooth circles in Chrome on subpixel, we define an scaling factor: $aui-circle-smoothing-factor: 2 !default; /** * Icons */ $aui-icon-size-small: 24px !default; $aui-icon-size-large: 48px !default; $aui-icon-system-size-small: 23px !default; $aui-icon-system-size-large: 45px !default; $aui-icon-stroke-width: 1.1px !default; /** * SVG */ $aui-svg-arrow-width: 8px !default; $aui-svg-arrow-height: 13px !default; /** * Breakpoints */ //$aui-breakpoint: ( tiny : 480px, xsmall : 600px, small : 740px, medium : 960px, large : 1264px, xlarge : 1424px, huge : 1584px, ) !default; $aui-breakpoint: ( xsmall : 0px, small : 375px, medium : 768px, large : 1024px, xlarge : 1440px, huge : 1920px, ) !default; // $aui-shadow: 0 10px 50px $aui-color-gray85; /** * Card Component */ $aui-card-spacing: unit(1) !default; /** * Form Field Components, like Textfield */ // $aui-field-floating-label-padding: unit(4); $aui-field-floating-label-padding: 0.6875rem !default; $aui-field-floating-label-font-size: .75rem !default; $aui-field-default-height: unit(10.8) !default; $aui-field-line-height: 1.5 !default; $aui-field-error-line-height: unit(5) !default; $aui-field-error-color: $aui-color-invalid !default; $aui-field-disabled-opacity: 0.3 !default; $aui-field-placeholder-color: $aui-color-gray20 !default; $aui-field-placeholder-color-light: rgba(#fff, 0.6) !default; $aui-field-transition-duration: 0.25s !default; $aui-field-label-y: 0.5rem !default; $aui-field-focus-line-height: 1px !default; /** * Grid Component */ $aui-grid-columns: 12 !default; $aui-grid-gutters: unit(1) !default; $aui-grid-container-offset: 4.375% !default; // in percent /** * Visibility Component */ $aui-visibility: ( tiny, xsmall, small, medium, large, xlarge, huge, ); /** * z-index */ $aui-zindex-header: 100 !default; $aui-dropdown-open-index: 1000 !default; $aui-alert-zindex: 1700 !default; $aui-notification-zindex: 1701 !default; $aui-button-floating-zindex: 900 !default; $aui-zindex-modal-backdrop: 1800 !default; $aui-zindex-modal-morph: 1801 !default; $aui-zindex-modal: 1900 !default; $aui-zindex-dropdown: 1000 !default; $aui-zindex-nav-dropdown-toggle: 1001 !default; $aui-zindex-tooltip: 1002 !default; $aui-zindex-popover: 1002 !default; $aui-zindex-dropdown: 1002 !default; $aui-zindex-nav-sticky: 1001 !default; %aui-hidden-input { appearance: none; position: absolute; width: 0; height: 0; overflow: hidden; margin: 0; padding: 0; border: 0; outline: 0; opacity: 0; z-index: -1; } ================================================ FILE: src/alert/README.md ================================================ # AUI Alert ## Usage ##### ES2015 ```javascript import {Alert} from 'audi-ui'; ``` ##### CommonJS ```javascript tbd. ``` ##### AMD ```javascript tbd. ``` ##### Global ```javascript tbd. ``` #### Automatic Instantiation If you do not care about retaining the component instance for the alert, simply call `upgradeElements`. ```javascript import {Alert} from 'audi-ui'; Alert.upgradeElements(); ``` #### Manual Instantiation Alerts can easily be initialized using their default constructors as well, similar to `upgradeElements`. ```javascript import {Alert} from 'audi-ui'; const alert = new Alert(document.querySelector('.aui-alert')); ``` ## Classes ### Element The block class is `aui-alert`. This defines the top-level alert element. Have a look into the `snippets` folder for examples. ### Modifier The provided modifiers are: | Class | Description | | --------------------- | ---------------------------| | `aui-alert--sticky` | Make the alert sticky. | | `is-open` | State, if alert is open. | | `is-closed` | State, if alert is closed. | ================================================ FILE: src/alert/_alert.scss ================================================ $aui-alert-close-btn-size: 17px !default; $aui-alert-text-padding-x: unit(7) !default; $aui-alert-text-padding-y: unit(5) !default; $aui-alert-closing-duration: .3s !default; .aui-alert { position: relative; transition: height $aui-alert-closing-duration $aui-easing; @include aui-responsive-type(-1, 1.5); &__content { position: relative; color: inherit; background: inherit; margin-right: #{$aui-alert-close-btn-size + 10px}; padding: $aui-alert-text-padding-y #{$aui-alert-text-padding-x * 2} $aui-alert-text-padding-y $aui-alert-text-padding-x; transition: transform $aui-alert-closing-duration $aui-easing, box-shadow $aui-alert-closing-duration $aui-easing; } &__close { position: absolute; top: $aui-alert-text-padding-y; right: $aui-alert-text-padding-x; width: $aui-alert-close-btn-size; height: $aui-alert-close-btn-size; background: url('data:image/svg+xml,#{aui-svg-close($aui-color-dark)}') center center no-repeat; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; @include aui-remove-tap-highlight; } &.aui-color-text-light &__close, &.aui-color-text-warning &__close { background-image: url('data:image/svg+xml,#{aui-svg-close($aui-color-light)}'); } &--sticky &__content { position: fixed; top: 0; left: 0; width: 100%; @include shadow-dark; z-index: $aui-alert-zindex; } &.is-open &__content { transform: translateY(0); } &.is-closed { overflow: hidden; height: 0 !important; } &.is-closed &__content { box-shadow: none; transform: translateY(-100%); } } ================================================ FILE: src/alert/alert.js ================================================ import Component from '../component/component'; import ResizeObserver from '../util/resize-observer'; const SELECTOR_COMPONENT = '.aui-js-alert'; const CLASS_CONTENT = 'aui-alert__content'; const CLASS_CLOSE_BUTTON = 'aui-alert__close'; const CLASS_IS_CLOSED = 'is-closed'; const CLASS_IS_OPEN = 'is-open'; const ATTR_CLOSE = 'data-close'; const ATTR_OPENDELAY = 'data-opendelay'; /** * Class constructor for Alert AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Alert extends Component { /** * Upgrades all Alert AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Alert(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component */ init() { super.init(); this._content = this._element.querySelector(`.${CLASS_CONTENT}`); // Add close button this._closeButton = document.createElement('button'); this._closeButton.setAttribute('type', 'button'); this._closeButton.classList.add(CLASS_CLOSE_BUTTON); if (this._content) { this._content.appendChild(this._closeButton); } if (this._element.hasAttribute(ATTR_OPENDELAY)) { let delay = parseInt(this._element.getAttribute(ATTR_OPENDELAY)); this._element.classList.add(CLASS_IS_CLOSED); this.openingTimeout = setTimeout(() => this.open(true), delay); } else { this.open(); } this._resizeObserver = new ResizeObserver(); this._resizeObserver.resized.add(this._resizedHandler = () => this.update()); this.update(); } /** * Open an Alert * @param {boolean} animate True, if the opening should be animated. Default: false */ open(animate) { animate = animate || false; this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event)); if (animate) { this._animateOpen(); } else { this._element.classList.add(CLASS_IS_OPEN); this._element.classList.remove(CLASS_IS_CLOSED); } } /** * Animate opening of Alert */ _animateOpen() { clearTimeout(this.openingTimeout); // Loop until start height is set and correctly rendered if (window.getComputedStyle(this._element).height && this._element.style.height) { this._element.classList.add(CLASS_IS_OPEN); this._element.classList.remove(CLASS_IS_CLOSED); } else { window.requestAnimationFrame(() => this._animateOpen()); } } /** * Close this Alert */ close() { this._element.removeEventListener('click', this._clickHandler); this._element.style.height = `${this._content.offsetHeight}px`; this._animateClose(); } /** * Animate closing of Alert */ _animateClose() { clearTimeout(this.openingTimeout); // Loop until start height is set and correctly rendered if (window.getComputedStyle(this._element).height && this._element.style.height) { this._element.classList.remove(CLASS_IS_OPEN); this._element.classList.add(CLASS_IS_CLOSED); } else { window.requestAnimationFrame(() => this._animateClose()); } } /** * Update Alert. * Equalize element height with containing content. */ update() { this._element.style.height = `${this._content.offsetHeight}px`; } /** * Handle click of element. * @param {Event} event The event that fired. * @private */ _onClick(event) { if (event.target.classList.contains(CLASS_CLOSE_BUTTON) || event.target.hasAttribute(ATTR_CLOSE)) { this.close(); } } /** * Dispose component */ dispose() { super.dispose(); clearTimeout(this.openingTimeout); this._element.classList.remove(CLASS_IS_CLOSED); this._element.classList.remove(CLASS_IS_OPEN); this._element.removeEventListener('click', this._clickHandler); this._element.style.height = ''; this.removeChild(this._closeButton); this.resizeObserver.resized.remove(this._resizedHandler); } } ================================================ FILE: src/alert/snippets/alert-animate.html ================================================ ================================================ FILE: src/alert/snippets/alert-danger.html ================================================ ================================================ FILE: src/alert/snippets/alert-sticky.html ================================================ ================================================ FILE: src/alert/snippets/alert-success.html ================================================ ================================================ FILE: src/alert/snippets/alert-warning.html ================================================ ================================================ FILE: src/animation/_animation.scss ================================================ .aui-animation { &-morph-in, &-morph-out { transition-timing-function: $aui-easing; transition-duration: .6s; } } .aui-no-transition { transition: none !important; } ================================================ FILE: src/audioplayer/_audioplayer-themes.scss ================================================ $aui-audioplayer-light-loading: $aui-color-gray50 !default; $aui-audioplayer-light-progress: $aui-color-white !default; $aui-audioplayer-light-timeline: $aui-color-gray30 !default; .aui-audioplayer { &.aui-theme-light { color: $aui-color-white; .aui-button { fill: $aui-color-white; color: $aui-color-white; } .aui-audioplayer__playhead { background-color: $aui-color-gray20; } .aui-audioplayer__progress--loading { background-color: $aui-audioplayer-light-loading; } .aui-audioplayer__progress--progress { background-color: $aui-audioplayer-light-progress; } .aui-audioplayer__progress-holder { background-color: $aui-audioplayer-light-timeline; } .aui-audioplayer__cover { background-color: $aui-color-black; } } } ================================================ FILE: src/audioplayer/_audioplayer.scss ================================================ $aui-audioplayer-dark-loading: $aui-color-gray50 !default; $aui-audioplayer-dark-progress: $aui-color-black !default; $aui-audioplayer-dark-timeline: $aui-color-gray90 !default; .aui-audioplayer { padding: 1.25rem; &__controls { line-height: 23px; order: 1; margin-left: 1rem; .aui-button-group { flex-flow: row nowrap; } &--secondary { margin-top: unit(4); order: 2; } } &__chrome { align-items: center; display: flex; flex-direction: column; height: 100%; justify-content: space-between; vertical-align: middle; } &__cover { background-color: $aui-color-gray90; display: none; min-height: 100px; min-width: 100px; max-height: 100px; max-width: 100px; } &--large-cover { .aui-audioplayer__cover { margin-bottom: 20px; max-height: inherit; max-width: inherit; } } &__cover-image { width: 100%; display: block; } &__meta { font-size: rem(14px); line-height: 1; margin-bottom: unit(4); //margin-top: unit(4); order: 0; width: 100%; } &__time { font-size: rem(12px); margin-top: unit(1); } &__title { margin-bottom: unit(1); } &__icon-previous, &__icon-next { .audiicon-small { visibility: visible; } .audiicon-large { visibility: hidden; } } &__icon-pause, &__icon-play { .audiicon-small { visibility: hidden; } .audiicon-large { visibility: visible; } } &__icon-exit-fullscreen, &__icon-pause, &__icon-replay, &__icon-unmute { display: none; } &.is-controlled &__chrome, &:hover &__chrome { transform: translateY(0); } &.is-seeking { .aui-audioplayer__seek-holder { opacity: 1; transition-delay: .1s; } .aui-audioplayer__preview { opacity: 1; transition-delay: .1s; } } &.is-seeking.aui-player--preview { .aui-audioplayer__chrome::after { transition-delay: 0s; } } &.is-mute { .aui-audioplayer__icon-mute { display: none; } .aui-audioplayer__icon-unmute { display: inline-block; } } &.is-playing { .aui-audioplayer__icon-play { display: none; } .aui-audioplayer__icon-pause { display: inline-block; } } &.is-complete { .aui-audioplayer__icon-pause, .aui-audioplayer__icon-play { display: none; } .aui-audioplayer__icon-replay { display: inline-block; } } .aui-slider { min-height: 1.25rem; } .aui-slider__handle { height: 1.25rem; width: 1.25rem; } .aui-slider__target { height: 1.25rem; margin-left: 0.625rem; margin-right: 0.625rem; } @include aui-respond-to(large) { padding: 1.25rem 1rem 1.25rem 0px; &--frameless { padding: 0px 1rem 0px 0px; } &__controls { &--secondary { margin-top: 0; margin-left: 1rem; } } &__chrome { flex-direction: row; } &__cover { display: block; margin-right: 1rem; } &__cover-image { max-width: 100px; } &--large-cover { .aui-audioplayer__cover { margin-right: 0; } .aui-audioplayer__cover-image { max-width: none; } } &__meta { margin-bottom: 0; margin-left: 1rem; margin-top: 0; order: 2; } &__playhead { width: unit(5); height: unit(5); } } @include aui-respond-to(large) { } } ================================================ FILE: src/audioplayer/audioplayer.js ================================================ import Component from '../component/component'; import Popover from './../popover/popover'; const SELECTOR_COMPONENT = '.aui-audioplayer'; export default class Audioplayer extends Component { /** * Upgrades all Audioplayer components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Audioplayer(element)); } }); return components; }; formatCurrentTime(currentTime) { return `${('0' + Math.floor(currentTime % 3600 / 60)).slice(-2)}:${('0' + Math.floor(currentTime % 3600 % 60)).slice(-2)}`; } init() { super.init(); this.currentTrack = 0; this.scrobble = false; this.embed = this.element.querySelector('.aui-audioplayer__embed'); this.embed.preload = true; this.tracks = JSON.parse(this.element.querySelector('.aui-audioplayer__tracks').value); this.embed.addEventListener('ended', (event) => { this.cancelProgress(); if (this.tracks.length > 1) { this.next(); } else { this.pause(); this.element.classList.add('has-ended'); } this.updateProgress(); }); this.embed.addEventListener('canplay', (event) => { this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration); }); this.embed.addEventListener('timeupdate', (event) => { this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.currentTime); }); let play = this.element.querySelector('.aui-audioplayer__play'); if (play) { play.addEventListener('click', (event) => { if (this.isPlaying()) { this.pause(); } else { this.play(); } }); } let mute = this.element.querySelector('.aui-audioplayer__mute'); if (mute) { mute.addEventListener('click', (event) => { if (this.isMuted()) { this.unmute(); } else { this.mute(); } }); } let next = this.element.querySelector('.aui-audioplayer__next'); if (next) { next.addEventListener('click', (event) => { this.next(); }); } let previous = this.element.querySelector('.aui-audioplayer__previous'); if (previous) { previous.addEventListener('click', (event) => { this.previous(); }); } window.setTimeout(() => { this.slider = this.element.querySelector('.aui-slider__target').noUiSlider; this.slider.on('start', () => { this.scrobble = true; }); this.slider.on('end', () => { this.scrobble = false; }); this.slider.on('change', (value) => { this.embed.currentTime = ((Math.abs(value) * this.embed.duration) / 100); }); }, 400); } isMuted() { return this.embed.muted; } isPlaying() { return !this.embed.paused; } mute() { this.element.classList.add('is-mute'); this.embed.muted = true; } next() { if (this.tracks.length > 1) { let restartPlayback = this.isPlaying(); this.pause(); if (this.currentTrack >= this.tracks.length - 1) { this.currentTrack = 0; } else { this.currentTrack = this.currentTrack + 1; } this.embed.src = this.tracks[this.currentTrack].src; this.embed.load(); this.slider.set(0); this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration); if (restartPlayback) this.play(); this.element.querySelector('.aui-audioplayer__time').innerHTML = '00:00'; this.element.querySelector('.aui-audioplayer__title').innerHTML = this.tracks[this.currentTrack].title; let cover = this.element.querySelector('.aui-audioplayer__cover'); if (cover) { cover.querySelector('.aui-audioplayer__cover-image').setAttribute('src', this.tracks[this.currentTrack].cover); } } } pause() { this.cancelProgress(); this.element.classList.remove('is-playing'); this.embed.pause(); } play() { this.updateProgress(); this.element.classList.add('is-playing'); this.element.classList.remove('has-ended'); this.embed.play(); } previous() { if (this.tracks.length > 1) { let restartPlayback = this.isPlaying(); this.pause(); if (this.currentTrack === 0) { this.currentTrack = this.tracks.length - 1; } else { this.currentTrack = this.currentTrack - 1; } this.embed.src = this.tracks[this.currentTrack].src; this.embed.load(); this.slider.set(0); this.element.querySelector('.aui-audioplayer__time').innerHTML = this.formatCurrentTime(this.embed.duration); if (restartPlayback) this.play(); this.element.querySelector('.aui-audioplayer__time').innerHTML = '00:00'; this.element.querySelector('.aui-audioplayer__title').innerHTML = this.tracks[this.currentTrack].title; let cover = this.element.querySelector('.aui-audioplayer__cover'); if (cover) { cover.querySelector('.aui-audioplayer__cover-image').setAttribute('src', this.tracks[this.currentTrack].cover); } } } unmute() { this.element.classList.remove('is-mute'); this.embed.muted = false; } cancelProgress() { if (this.tick) { window.cancelAnimationFrame(this.tick); this.tick = undefined; } } updateProgress() { this.tick = window.requestAnimationFrame(() => { if(!this.scrobble) this.slider.set(Math.abs((this.embed.currentTime * 100) / this.embed.duration)); this.updateProgress(); }); } } ================================================ FILE: src/audioplayer/snippets/audioplayer-basic.html ================================================
Title of audio file
2:34 / 10:16
 
Title of audio file
2:34 / 10:16
================================================ FILE: src/audioplayer/snippets/audioplayer-cover-small.html ================================================
Title of audio file
2:34 / 10:16
 
Title of audio file
2:34 / 10:16
================================================ FILE: src/audioplayer/snippets/audioplayer-download.html ================================================
Title of audio file
2:34 / 10:16
 
Title of audio file
2:34 / 10:16
================================================ FILE: src/audioplayer/snippets/audioplayer-playlist.html ================================================
Title of audio file
2:34 / 10:16
 
Title of audio file
2:34 / 10:16
================================================ FILE: src/audioplayer/snippets/audioplayer-volume-control.html ================================================
Title of audio file
2:34 / 10:16
 
Title of audio file
2:34 / 10:16
================================================ FILE: src/badge/_badge.scss ================================================ .aui-badge { $size: 24px; $size-small: 8px; &__dot { display: inline-block; font-family: $aui-font-wide; font-weight: $aui-font-weight-normal; line-height: $size; border-radius: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; transition: transform .25s $aui-easing, visibility .25s $aui-easing, color .25s $aui-easing .1s; vertical-align: middle; &--large { width: $size; height: $size; font-size: 12px; } &--small { width: $size-small; height: $size-small; margin: $size-small; } &--signal-yellow { border-radius: 0; transform: rotate(45deg); background-color: $aui-color-yellow; } &--signal-green { background-color: $aui-color-green; } &--signal-red { margin: $size-small 7px; border-radius: 0; width: 0; height: 0; border-style: solid; border-width: 0 5px 8px 5px; border-color: transparent transparent $aui-color-signal-red transparent; } &--charging-neon-green { background-color: $aui-color-charging-neon-green; } &--charging-green { background-color: $aui-color-charging-green; } &--charging-neon-blue { background-color: $aui-color-charging-neon-blue; } &--charging-blue { background-color: $aui-color-charging-blue; } } &.is-hidden { transform: scale(0); color: transparent !important; transition-delay: 0s; visibility: hidden; } &--small-text { font-size: 10px; } &--label { display: inline-flex; align-items: center; } &--icon { display: inline-flex; align-items: center; .audiicon { width: $aui-icon-size-small; height: $aui-icon-size-small; } } &__label { //margin-left: 0.5rem; font-size: 1rem; &--small { font-size: rem(12); } &--left { //margin: 0 0.5rem 0 0; } } &__icon { //margin-left: 0.5rem; &--left { //margin: 0 0.5rem 0 0; } } &.aui-color-text-light { color: $aui-color-white; stroke: $aui-color-white; fill: $aui-color-white; } } ================================================ FILE: src/badge/snippets/badge-charging-blue.html ================================================ ================================================ FILE: src/badge/snippets/badge-charging-green.html ================================================ ================================================ FILE: src/badge/snippets/badge-danger.html ================================================ ================================================ FILE: src/badge/snippets/badge-hidden.html ================================================ ================================================ FILE: src/badge/snippets/badge-signal-green.html ================================================ Label large ================================================ FILE: src/badge/snippets/badge-signal-red.html ================================================ Label large ================================================ FILE: src/badge/snippets/badge-signal-yellow.html ================================================ Label large ================================================ FILE: src/badge/snippets/badge-single-digit.html ================================================ 8 ================================================ FILE: src/badge/snippets/badge-small-icon.html ================================================ ================================================ FILE: src/badge/snippets/badge-small-label-small.html ================================================ Label small ================================================ FILE: src/badge/snippets/badge-small-label.html ================================================ Label large left ================================================ FILE: src/badge/snippets/badge-small-text.html ================================================ 99+ ================================================ FILE: src/badge/snippets/badge-small.html ================================================ {# 1 #} ================================================ FILE: src/badge/snippets/badge-success.html ================================================ ================================================ FILE: src/badge/snippets/badge-warning.html ================================================ ! ================================================ FILE: src/badge/snippets/badge.html ================================================ 99 ================================================ FILE: src/breadcrumb/_breadcrumb-themes.scss ================================================ .aui-breadcrumb { // Black color theme &.aui-theme-black { @extend %aui-breadcrumb-theme-light; &.is-oversized::after { background: linear-gradient(to right, $aui-color-black 5%, rgba($aui-color-black, 0) 100%); } } // Silver color theme &.aui-theme-silver { @extend %aui-breadcrumb-theme-light; &.is-oversized::after { background: linear-gradient(to right, $aui-color-silver 5%, rgba($aui-color-silver, 0) 100%); } } // Warm silver color theme &.aui-theme-warmsilver { @extend %aui-breadcrumb-theme-light; &.is-oversized::after { background: linear-gradient(to right, $aui-color-warmsilver 5%, rgba($aui-color-warmsilver, 0) 100%); } } // Red color theme &.aui-theme-red { @extend %aui-breadcrumb-theme-light; &.is-oversized::after { background: linear-gradient(to right, $aui-color-red 5%, rgba($aui-color-red, 0) 100%); } } } %aui-breadcrumb-theme-light { color: rgba(#fff, .6); .aui-breadcrumb__item:last-child { color: $aui-color-white; } .aui-breadcrumb__item + .aui-breadcrumb__item::before { background-image: url('data:image/svg+xml,#{aui-svg-breadcrumb-divider(rgba(#fff, .5))}'); } .aui-breadcrumb__action:hover { color: rgba(#fff, .6); } .aui-breadcrumb__action:hover { color: #fff; } } ================================================ FILE: src/breadcrumb/_breadcrumb.scss ================================================ .aui-breadcrumb { display: block; overflow: hidden; position: relative; padding-top: unit(1); color: $aui-color-gray40; font-size: rem(11); line-height: unit(4); font-weight: $aui-font-weight-normal; &__items { // In order to make element scrollable: display: block; overflow: hidden; white-space: nowrap; // Reset list styles: list-style: none; padding: 0; } &__item { display: inline-block; max-width: 10em; overflow: hidden; text-overflow: ellipsis; // Current page &:last-child { color: $aui-color-black ; max-width: 22em; } } // Divider &__item + &__item::before { content: ''; display: inline-block; margin-left: .5em; margin-right: .7em; width: rem(5); height: rem(8); background: url('data:image/svg+xml,#{aui-svg-breadcrumb-divider(rgba(#000, .5))}') center center no-repeat; } &__action { transition: color .15s linear; } &__action:hover { color: #000; } // Added by JS, when element.offsetWidth > element.scrollWidth &.is-oversized::after { content: ''; display: block; position: absolute; top: 0; left: 0; width: 40px; height: 100%; background: linear-gradient(to right, #ffffff 5%, rgba(#ffffff, 0) 100%); } } ================================================ FILE: src/breadcrumb/breadcrumb.js ================================================ import Component from '../component/component'; import ResizeObserver from '../util/resize-observer'; const SELECTOR_COMPONENT = '.aui-js-breadcrumb'; const CLASS_ITEMS = 'aui-breadcrumb__items'; const CLASS_IS_OVERSIZED = 'is-oversized'; /** * Class constructor for Breadcrumb AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Breadcrumb extends Component { /** * Upgrades all Breadcrumb AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Breadcrumb(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._items = this._element.querySelector(`.${CLASS_ITEMS}`); this._resizeObserver = new ResizeObserver(); this._resizeObserver.resized.add(this._resizedHandler = () => this.update()); this.update(); } update() { this._checkSize(); } dispose() { super.dispose(); this._resizeObserver.resized.remove(this._resizedHandler); } _checkSize() { if (this._items.scrollWidth > this._items.offsetWidth) { this._items.scrollLeft = 9999; this._element.classList.add(CLASS_IS_OVERSIZED); } else { this._element.classList.remove(CLASS_IS_OVERSIZED); } } } ================================================ FILE: src/breadcrumb/snippets/breadcrumb.html ================================================ ================================================ FILE: src/breakpoint/README.md ================================================ ## Introduction The Audi UI (AUI) **breakpoint** component is … (text follows) ### To include an AUI **breakpoint** component: ```html ``` ================================================ FILE: src/breakpoint/_breakpoint.scss ================================================ // TODO Comment the use with js body { &::before { content: 'default'; display: none; @each $name, $size in $aui-breakpoint { @include aui-respond-to($name) { content: '#{$name}'; } } } } // Make viewport responsive // // @viewport is needed because IE 10+ doesn't honor in // some cases. See http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/. // Eventually @viewport will replace . It's been manually // prefixed for forward-compatibility. @-moz-viewport { width: device-width; } @-ms-viewport { width: device-width; } @-o-viewport { width: device-width; } @-webkit-viewport { width: device-width; } @viewport { width: device-width; } ================================================ FILE: src/button/README.md ================================================ ## Introduction The Audi UI (AUI) **button** component is an enhanced version of the standard HTML ` ```  2. Add one or more AUI classes, separated by spaces, to the button using the `class` attribute. ```html ```  3. All buttons must have the *Audi Response Effect*. Add Response class to button. ```html ``` The button component is ready for use. #### Examples A flat button with padding on the sides. ```html ``` A primary button. ```html ``` A secondary button. ```html ``` A text button. ```html ``` An icon button with the system icon *download*. ```html ``` An icon button with a large system icon. ```html ``` ## Configuration options The AUI CSS classes apply various predefined visual and behavioral enhancements to the button. The table below lists the available classes and their effects. | AUI class | Effect | Remarks | |-----------|--------|---------| | `aui-button` | Defines button as an AUI button component | Required | | (none) | Applies *flat* display effect to button | Default | | `aui-button--primary` | Applies *primary* (fill) display effect | | | `aui-button--secondary` | Applies *secondary* (outline) display effect | | | `aui-button--text` | Applies *text* (arrow) display effect | | | `aui-button--icon` | Applies *icon* (outlined system icon) display effect | Only use system icons; no text | | `aui-button--icon-large` | Use together with large system icons | Mutually exclusive with *icon* | | `aui-button--padded` | Applies left and right padding | Mutually exclusive with *flat* and *text* | | `aui-js-response` | Applies *Response* click effect | Required; May be used in combination with any other classes | >**Note:** Disabled versions of all the available button types are provided, and are invoked with the standard HTML boolean attribute `disabled`. ``. Alternatively, the `aui-button--disabled` class can be used to achieve the same result. >This attribute may be added or removed programmatically via scripting. ================================================ FILE: src/button/_button-themes.scss ================================================ .aui-button { $aui-button-color: $aui-color-white; $aui-button-color-hover: $aui-color-gray90; $aui-button-color-primary: $aui-color-black; $aui-button-border-color: $aui-color-white; $aui-button-border-color-hover: $aui-color-gray80; $aui-button-background: $aui-color-white; $aui-button-background-hover: $aui-color-gray90; &.aui-theme-light { &.is-active, &:active, &:hover { color: $aui-button-color-hover; stroke: $aui-button-color-hover; fill: $aui-button-color-hover; } &, &.is-disabled, &:disabled { color: $aui-button-color; stroke: $aui-button-color; fill: $aui-button-color; } &.is-disabled, &:disabled { opacity: .30; } } &--icon.aui-theme-light, &--primary.aui-theme-light, &--secondary.aui-theme-light { &:focus { @include shadow-focus-light; } &.is-disabled, &:disabled, &:hover { box-shadow: none; } } &--primary.aui-theme-light, &--floating.aui-theme-light { &, &.is-active, &:active, &:hover { color: $aui-button-color-primary; stroke: $aui-button-color-primary; fill: $aui-button-color-primary; } &.is-disabled, &:disabled { color: $aui-color-gray40; stroke: $aui-color-gray40; fill: $aui-color-gray40; } &.is-active, &:active, &:hover { border-color: $aui-button-background-hover; background-color: $aui-button-background-hover; } &, &.is-disabled, &:disabled { border-color: $aui-button-background; background-color: $aui-button-background; } } &--secondary.aui-theme-light { &.is-active, &:active, &:hover { border-color: $aui-button-border-color-hover; } &, &.is-disabled, &:disabled { border-color: $aui-button-border-color; } } &--text.aui-theme-light &__text { &::after { background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-button-color)}'); } &:hover::after { background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-button-color-hover)}'); } } &--floating.aui-theme-light { &, &:focus, &:hover { @include shadow-dark; } } &--fixed.aui-theme-light { @include shadow-dark; } } ================================================ FILE: src/button/_button.scss ================================================ $aui-button-font-size: 16 !default; $aui-button-font-size-rem: rem($aui-button-font-size) !default; $aui-button-icon-margin: 16 !default; $aui-button-floating-offset-x: 1.5rem !default; $aui-button-floating-offset-y: 1.5rem !default; $aui-button-color: $aui-color-black !default; $aui-button-color-hover: $aui-color-gray30 !default; $aui-button-color-disabled: $aui-color-gray70 !default; $aui-button-color-primary: $aui-color-white !default; $aui-button-border-color: $aui-color-black !default; $aui-button-border-color-hover: $aui-color-gray50 !default; $aui-button-background: $aui-color-black !default; $aui-button-background-hover: $aui-color-gray30 !default; $aui-button-padding: em(16, $aui-button-font-size) 0 em(16, $aui-button-font-size) 0 !default; $aui-button-stretch-max: 767px !default; .aui-button { &.is-active, &:active, &:hover, &:visited { color: $aui-button-color-hover; stroke: $aui-button-color-hover; fill: $aui-button-color-hover; }; & { border-radius: 0; cursor: pointer; display: inline-block; position: relative; padding: $aui-button-padding; outline: 0; font-family: inherit; font-size: $aui-button-font-size-rem; font-weight: $aui-font-weight-normal; //line-height: unit(4.8); line-height: unit(6); text-align: center; text-decoration: none; white-space: normal; vertical-align: middle; transition: all 250ms $aui-easing; @include aui-remove-tap-highlight; } &, &.is-disabled, &:disabled { color: $aui-button-color; stroke: $aui-button-color; fill: $aui-button-color; border: 1px solid transparent; background: transparent; } &.is-disabled, &:disabled { cursor: not-allowed; } &--bold { font-weight: $aui-font-weight-bold; } &--padded, &--primary, &--secondary { padding-left: 2rem; padding-right: 2rem; } &--icon, &--primary, &--secondary { &:focus { // @include shadow-focus; // adjusted to react library } &.is-disabled, &:disabled, &:hover { box-shadow: none; } } &--round { &.is-disabled, &:disabled { color: $aui-button-color-disabled; stroke: $aui-button-color-disabled; fill: $aui-button-color-disabled; } } &--floating, &--primary { &.is-active, &:active, &:hover { border-color: $aui-button-background-hover; background-color: $aui-button-background-hover; } &, &.is-active, &:active, &:hover, &:visited { color: $aui-button-color-primary; stroke: $aui-button-color-primary; fill: $aui-button-color-primary; } &.is-disabled, &:disabled { color: $aui-color-white; stroke: $aui-color-white; fill: $aui-color-white; border-color: $aui-button-color-disabled !important; background-color: $aui-button-color-disabled !important; } &, &.is-disabled, &:disabled { border-color: $aui-button-background; background-color: $aui-button-background; } } &--secondary { &.is-active, &:active, &:hover { border-color: $aui-button-border-color-hover; }; &, &.is-disabled, &:disabled { border-color: $aui-button-border-color; } &.is-disabled, &:disabled { color: $aui-button-color-disabled !important; border-color: $aui-button-color-disabled !important; } } &--text { .aui-button__text::after { content: ''; display: inline-block; position: relative; top: em(1, $aui-button-font-size); margin-left: em(4, $aui-button-font-size); width: 0.5em; height: 0.8125em; background: center no-repeat url('data:image/svg+xml,#{aui-svg-arrow($aui-button-color)}'); background-size: contain; transition: transform 0.2s ease; } &:hover .aui-button__text::after { background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-button-color-hover)}'); transform: translateX(5px); } &:disabled { .aui-button__text { color: $aui-button-color-disabled; } } &.is-disabled .aui-button__text::after, &:disabled .aui-button__text::after { transform: none; background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-button-color-disabled)}'); } } &--icon { // System icon size without white space width: 23px; height: 23px; padding: 0; border: none; .audiicon { position: absolute; top: 0; left: 0; margin: 0; width: $aui-icon-size-small; height: $aui-icon-size-small; } } &--icon--large { // Large system icon size without white space width: 45px; height: 45px; .audiicon { top: -1px; left: -1px; width: $aui-icon-size-large; height: $aui-icon-size-large; &-container--small { display: none; } &-container--large { display: inline; } } } &--round { border-radius: 50%; } &--stretched { width: 100%; max-width: $aui-button-stretch-max; } &--sticky { position: fixed; left: 0; bottom: 0; @include shadow; } &--centered { left: 50%; transform: translateX(-50%); } &--floating { position: fixed; right: $aui-button-floating-offset-x; bottom: $aui-button-floating-offset-y; width: 45px; height: 45px; padding: 0; z-index: $aui-button-floating-zindex; @include shadow; .audiicon { position: absolute; left: -1px; top: -1px; width: $aui-icon-size-large; height: $aui-icon-size-large; &-container--small { display: none; } &-container--large { display: inline; } } &, &:focus, &:hover { @include shadow; } } &__text { display: inline-block; position: relative; text-align: left; // vertical-align: middle; REVIEW Increases button height by 1px; check if necessary } // Child elements &__text-icon { $_margin: em($aui-button-icon-margin, $aui-button-font-size); display: inline-flex; align-items: center; position: relative; text-align: left; vertical-align: middle; .audiicon { display: inline-block; } .aui-button__text:first-child { margin-right: $_margin; } .aui-button__text:not(:first-child) { margin-left: $_margin; } } // Firefox Button Height Fix // @see https://davidwalsh.name/firefox-buttons &::-moz-focus-inner { border: 0; padding: 0; } } ================================================ FILE: src/button/snippets/button-bold.html ================================================ ================================================ FILE: src/button/snippets/button-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-floating.html ================================================ ================================================ FILE: src/button/snippets/button-icon-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-icon-large-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-icon-large.html ================================================ ================================================ FILE: src/button/snippets/button-icon.html ================================================ ================================================ FILE: src/button/snippets/button-primary-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-primary-sticky.html ================================================ ================================================ FILE: src/button/snippets/button-primary-with-icon-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-primary-with-icon-right-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-primary-with-icon-right.html ================================================ ================================================ FILE: src/button/snippets/button-primary-with-icon.html ================================================ ================================================ FILE: src/button/snippets/button-primary.html ================================================ ================================================ FILE: src/button/snippets/button-secondary-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-secondary-with-icon-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-secondary-with-icon-right-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-secondary-with-icon-right.html ================================================ ================================================ FILE: src/button/snippets/button-secondary-with-icon.html ================================================ ================================================ FILE: src/button/snippets/button-secondary.html ================================================ ================================================ FILE: src/button/snippets/button-text-disabled.html ================================================ ================================================ FILE: src/button/snippets/button-text.html ================================================ ================================================ FILE: src/button/snippets/button.html ================================================ ================================================ FILE: src/button-group/README.md ================================================ --- title: Button Group --- ## Introduction The Audi UI (AUI) **button-group** component is … (text follows) ### To include an AUI **button-group** component: ```html ``` ================================================ FILE: src/button-group/_button-group.scss ================================================ .aui-button-group { $button-spacing: unit(0.8); display: inline-flex; flex-flow: row wrap; align-items: center; // Fix an issue with positioning in IE10+ vertical-align: top; // Remove button margin margin-right: ($button-spacing * -1); margin-bottom: ($button-spacing * -1); .aui-button { flex: 1 1 auto; margin: 0 $button-spacing $button-spacing 0; // Bring the "active" button to the front &:hover, &:focus, &:active, &.is-active { z-index: 2; } } // The Icon-Buttons must not scale .aui-button--icon { flex: 0 0 auto; } // A Button-Group, that always stretch to full width of parent &--block { display: flex; } // A Button-Group, that only contains Text-Buttons &--texts { $button-spacing: unit(4.8); margin-right: ($button-spacing * -1); margin-bottom: ($button-spacing * -1); .aui-button { margin: 0 $button-spacing $button-spacing 0; } } // A Button-Group, that only contains Icon-Buttons &--icons { $button-spacing: unit(2.4); margin-right: ($button-spacing * -1); margin-bottom: ($button-spacing * -1); .aui-button { margin: 0 $button-spacing $button-spacing 0; } } } ================================================ FILE: src/button-group/snippets/button-group-icons.html ================================================
================================================ FILE: src/button-group/snippets/button-group-primary-secondary.html ================================================
================================================ FILE: src/button-group/snippets/button-group-two-secondary.html ================================================
================================================ FILE: src/button-group/snippets/button-group-two-text.html ================================================
================================================ FILE: src/card/README.md ================================================ ## Introduction The Audi UI (AUI) **card** component is … (text follows) ### To include an AUI **card** component: ================================================ FILE: src/card/_card.scss ================================================ .aui-card-grid { display: flex; flex-flow: row wrap; margin: #{$aui-card-spacing / -2}; .aui-card-grid { margin: 0; } &__item { display: flex; flex-flow: row wrap; align-items: stretch; justify-content: flex-start; flex: 1 1 auto; width: $aui-layout-min-width; } &__item--column { flex-direction: column; } } .aui-card { flex: 1 1 auto; display: flex; flex-direction: column; position: relative; margin: #{$aui-card-spacing / 2}; width: calc(100% - #{$aui-card-spacing}); // IE fix background-repeat: no-repeat; background-position: 50% 50%; background-size: cover; background-origin: padding-box; background-attachment: scroll; transition: transform .15s $aui-easing, box-shadow .15s $aui-easing; &__cover { display: block; &-image { display: block; width: 100%; height: auto; } } &__body { flex: 1 1 auto; display: flex; flex-direction: column; } &__content { padding: unit(5); // TODO Laut Laoyut 6, dann passen aber nicht 2 System Icons nebeneinander &--bottom { margin-top: auto; } } &__media { text-align: center; img { display: block; width: 100%; height: auto; } } /** * Variant: Action */ &--action:hover, &--action:focus { z-index: 1; outline: none; @include shadow; transform: translateY(unit(-1)); } /** * Variant: Cover */ &--cover { flex-direction: row; } &--cover &__cover { flex: 1 1 auto; } &--cover &__body { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 1; } } ================================================ FILE: src/card/snippets/card-actions.html ================================================

Headline

And, now Your Highness, we will discuss the location of your hidden Rebel base.

================================================ FILE: src/checkbox/README.md ================================================ ## Introduction The Audi UI (AUI) **checkbox** component is … (text follows) ### To include an AUI **checkbox** component: ================================================ FILE: src/checkbox/_checkbox-themes.scss ================================================ .aui-checkbox { /** * Theme: light */ &.aui-theme-light { $aui-checkbox-color-text: $aui-color-gray95; $aui-checkbox-color-text-hover: $aui-color-white; $aui-checkbox-color-border: $aui-color-gray50; $aui-checkbox-color-border-hover: $aui-color-white; $aui-checkbox-color-border-invalid: $aui-color-invalid; $aui-checkbox-color-tick: $aui-checkbox-color-text; color: $aui-checkbox-color-text; .aui-checkbox__box { border-color: $aui-checkbox-color-border; } .aui-checkbox__tick { background-image: url('data:image/svg+xml,#{aui-svg-tick($aui-checkbox-color-tick)}'); } /** * States */ // Hover state &:hover:not(.is-disabled) { color: $aui-checkbox-color-text-hover; .aui-checkbox__box { border-color: $aui-checkbox-color-border-hover; } } // Focus state .aui-checkbox__input:focus ~ .aui-checkbox__box { @include shadow-focus-light; } // Invalid states &.is-invalid, &.is-invalid .aui-checkbox__label { color: $aui-field-error-color; } &.is-invalid .aui-checkbox__tick { background-image: url('data:image/svg+xml,#{aui-svg-tick($aui-color-invalid)}'); } &.is-invalid .aui-checkbox__box, &.is-invalid:hover .aui-checkbox__box { border-color: $aui-checkbox-color-border-invalid; } } } ================================================ FILE: src/checkbox/_checkbox.scss ================================================ $aui-checkbox-box-width: 1.5em !default; $aui-checkbox-tick-size: .75em !default; $aui-checkbox-text-spacing: 1em !default; $aui-checkbox-color-text: $aui-color-gray20 !default; $aui-checkbox-color-text-hover: $aui-color-black !default; $aui-checkbox-color-border: $aui-color-gray50 !default; $aui-checkbox-color-border-hover: $aui-color-black !default; $aui-checkbox-color-border-invalid: $aui-color-invalid !default; $aui-checkbox-color-border-disabled: $aui-color-gray70 !default; $aui-checkbox-color-tick: $aui-color-black !default; .aui-checkbox { display: inline-block; position: relative; font-weight: $aui-font-weight-normal; line-height: $aui-field-line-height; color: $aui-checkbox-color-text; cursor: pointer; @include aui-remove-tap-highlight; .aui-js & { padding-left: $aui-checkbox-box-width + $aui-checkbox-text-spacing; } .aui-js &__input { // Visually hide input @extend %aui-hidden-input; } &__label { &--optional { color: $aui-color-gray40; } } &__box { display: none; overflow: hidden; position: absolute; top: 0; left: 0; width: $aui-checkbox-box-width; height: $aui-checkbox-box-width; border: 1px solid $aui-checkbox-color-border; transition: box-shadow .15s linear, border .15s linear; cursor: pointer; pointer-events: none; z-index: 1; .aui-js & { display: inline-block; } } &__tick { display: block; position: absolute; top: 50%; left: 50%; width: $aui-checkbox-tick-size; height: $aui-checkbox-tick-size; transform: translate(-50%, -50%); background: url('data:image/svg+xml,#{aui-svg-tick($aui-checkbox-color-tick)}') center center no-repeat; opacity: 0; transition: opacity .15s $aui-easing; pointer-events: none; } // &__error { // display: block; // margin-top: unit(2); // font-size: rem(13); // line-height: unit(5); // color: $aui-field-error-color; // transition: color .25s linear; // } &__error { display: flex; align-items: center; line-height: $aui-field-error-line-height; margin-top: unit(3.5); font-size: rem(13); color: $aui-field-error-color; &::before { content: ''; display: inline-block; line-height: $aui-field-error-line-height; margin-right: rem(16px); width: 40px; height: 24px; background: url('data:image/svg+xml,#{aui-svg-caution($aui-field-error-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2.5); width: 36px; height: 24px; } } } /** * Variant: stretch */ &--stretch { width: 100%; } /** * Variant: box-right */ .aui-js &--box-right { padding-left: 0; padding-right: $aui-checkbox-box-width + $aui-checkbox-text-spacing; .aui-checkbox__box { left: auto; right: 0; } } /** * Variant: dropdown-option */ .aui-js &--dropdown-option { width: 100%; padding-left: 0; padding-right: $aui-checkbox-box-width + $aui-checkbox-text-spacing; .aui-checkbox__box { left: auto; right: 0; } } /** * States */ // Hover state &:hover:not(.is-disabled) { color: $aui-checkbox-color-text-hover; .aui-checkbox__box { border-color: $aui-checkbox-color-border-hover; } } // Focus state // &__input:focus ~ .aui-checkbox__box { // @include shadow-focus; // } // Disabled state &.is-disabled { //opacity: $aui-field-disabled-opacity; color: $aui-checkbox-color-border-disabled; cursor: not-allowed; } // Checked state &.is-checked &__tick { opacity: 1; } // Invalid states &.is-invalid, &.is-invalid &__label { color: $aui-field-error-color; } &.is-invalid &__tick { background-image: url('data:image/svg+xml,#{aui-svg-tick($aui-color-invalid)}'); } &.is-invalid &__box, &.is-invalid:hover &__box { border-color: $aui-checkbox-color-border-invalid; } } ================================================ FILE: src/checkbox/checkbox.js ================================================ import Component from '../component/component'; const NAMESPACE = 'auiCheckbox'; const SELECTOR_COMPONENT = '.aui-js-checkbox'; const CLASS_INPUT = 'aui-checkbox__input'; const CLASS_LABEL = 'aui-checkbox__label'; const CLASS_BOX = 'aui-checkbox__box'; const CLASS_TICK = 'aui-checkbox__tick'; const CLASS_IS_FOCUS = 'is-focused'; const CLASS_IS_CHECKED = 'is-checked'; const CLASS_IS_DISABLED = 'is-disabled'; /** * Class constructor for Checkbox AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Checkbox extends Component { /** * Upgrades all Checkbox AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Checkbox(element)); } }); return components; }; /** * Returns all AUI component instances within the given container * @param {HTMLElement} container The container element to search for components * @returns {Array} Returns an array of all newly upgraded components. */ static get(container = document) { let components = []; if (container) { Array.from(container.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { components.push(element.auiCheckbox); }); } return components; } constructor(element) { super(element, NAMESPACE); } init() { super.init(); this._input = this._element.querySelector(`.${CLASS_INPUT}`); this._input.addEventListener('change', this._changeHandler = (event) => this._onChange(event)); this._input.addEventListener('focus', this._focusHandler = (event) => this._onFocus(event)); this._input.addEventListener('blur', this._blurHandler = (event) => this._onBlur(event)); // Insert box with tick after label element: this._label = this._element.querySelector(`.${CLASS_LABEL}`); let box = document.createElement('span'); box.classList.add(CLASS_BOX); this._label.parentNode.insertBefore(box, this._label.nextSibling); let tick = document.createElement('span'); tick.classList.add(CLASS_TICK); box.appendChild(tick); this.updateClasses(); } updateClasses() { this.checkDisabled(); this.checkToggleState(); this.checkFocus(); } /** * Check the disabled state and update field accordingly. */ checkDisabled() { if (this._input.disabled) { this._element.classList.add(CLASS_IS_DISABLED); } else { this._element.classList.remove(CLASS_IS_DISABLED); } } /** * Check the toggle state and update field accordingly. */ checkToggleState() { if (this._input.checked) { this._element.classList.add(CLASS_IS_CHECKED); } else { this._element.classList.remove(CLASS_IS_CHECKED); } } /** * Check the focus state and update field accordingly. */ checkFocus() { if (Boolean(this._element.querySelector(':focus'))) { this._element.classList.add(CLASS_IS_FOCUS); } else { this._element.classList.remove(CLASS_IS_FOCUS); } } /** * Enable checkbox */ enable() { this._input.disabled = false; this.updateClasses(); } /** * Disable checkbox */ disable() { this._input.disabled = true; this.updateClasses(); } /** * Check checkbox */ check() { this._input.checked = true; this.updateClasses(); } /** * Uncheck checkbox */ uncheck() { this._input.checked = false; this.updateClasses(); } /** * Uncheck checkbox */ toggle() { if (this._input.checked) { this.uncheck(); } else { this.check(); } } /** * Dispose component */ dispose() { super.dispose(); this._input.removeEventListener('change', this._changeHandler); this._input.removeEventListener('focus', this._focusHandler); this._input.removeEventListener('blur', this._blurHandler); this._element.removeChild(this._element.querySelector(`.${CLASS_BOX}`)); } /** * Event Handler */ _onChange(event) { this.updateClasses(); } // TODO Find out why unfocus is triggered on mousedown _onFocus(event) { this._element.classList.add(CLASS_IS_FOCUS); } _onBlur(event) { this._element.classList.remove(CLASS_IS_FOCUS); } /** * Getter and Setter */ get input() { return this._input; } get checked() { return this._input.checked = true; } set checked(value) { if (value) { this.check(); } else { this.uncheck(); } } get disabled() { return this._input.disabled = true; } set disabled(value) { if (value) { this.disable(); } else { this.enable(); } } } ================================================ FILE: src/checkbox/snippets/checkbox-checked-disabled.html ================================================ ================================================ FILE: src/checkbox/snippets/checkbox-checked-invalid.html ================================================ ================================================ FILE: src/checkbox/snippets/checkbox-checked.html ================================================ ================================================ FILE: src/checkbox/snippets/checkbox-disabled.html ================================================ ================================================ FILE: src/checkbox/snippets/checkbox-invalid.html ================================================ ================================================ FILE: src/checkbox/snippets/checkbox.html ================================================ ================================================ FILE: src/color/README.md ================================================ ## Introduction The Audi UI (AUI) **color** component is … (text follows) ### To include an AUI **color** component: ================================================ FILE: src/color/_color.scss ================================================ .aui-color { &-white { background-color: $aui-color-white; } &-black { background-color: $aui-color-black; } &-silver { background-color: $aui-color-silver; } &-warmsilver { background-color: $aui-color-warmsilver; } &-green, &-success { background-color: $aui-color-green; } &-warning, &-yellow { background-color: $aui-color-yellow; } &-danger, &-red { background-color: $aui-color-red; } &-danger, &-progressive-red { background-color: $aui-color-progressive-red; } &-signal-red { background-color: $aui-color-signal-red; } &-gray10 { background-color: $aui-color-gray10; } &-gray20 { background-color: $aui-color-gray20; } &-gray30 { background-color: $aui-color-gray30; } &-gray40 { background-color: $aui-color-gray40; } &-gray50 { background-color: $aui-color-gray50; } &-gray60 { background-color: $aui-color-gray60; } &-gray70 { background-color: $aui-color-gray70; } &-gray80 { background-color: $aui-color-gray80; } &-gray85 { background-color: $aui-color-gray85; } &-gray90 { background-color: $aui-color-gray90; } &-gray95 { background-color: $aui-color-gray95; } } .aui-color-text { &-light { color: $aui-color-light; } &-dark { color: $aui-color-dark; } &-green, &-success { color: $aui-color-green; } &-warning, &-yellow { color: $aui-color-yellow; } &-danger, &-red { color: $aui-color-red; } } ================================================ FILE: src/component/component.js ================================================ const CLASS_IS_UPGRADED = 'is-upgraded'; const SVG_NS = 'http://www.w3.org/2000/svg'; /** * Class constructor for abstract AUI Component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Component { /** * Check if an element is upgraded. * @param {HTMLElement} element The element to test if its already be upgraded. * @returns {boolean} Returns true if element is already upgraded */ static isElementUpgraded(element) { return element.classList.contains(CLASS_IS_UPGRADED); } /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. * @param {String} namespace The namespace of the AUI component, like `auiComponent`. */ constructor(element, namespace) { this._element = element; if (this._element) { if (namespace) { this._element[namespace] = this; } this.init(); } } /** * Initialize component */ init() { this._element.classList.add(CLASS_IS_UPGRADED); } /** * Dispose component */ dispose() { this._element.classList.remove(CLASS_IS_UPGRADED); } /** * Remove a child element from its parent. * @param {HTMLElement} childNode The element to remove. */ removeChild(childNode) { if (childNode && childNode.parentNode) { if (this.isIE()) { childNode.removeNode(true); } else { childNode.remove(); } } } /** * Creates an HTML element and sets the given CSS classes and attributes. * @param {string} tagName is a string that specifies the type of element to be created. * @param {Array} classes is an array of class names to set, e.g. ['aui-class-1', 'aui-class-2']. * @param {Object} attributes is an object with attributes to set, e.g. {width: 100}. * @returns {HTMLElement} The created element. */ createElement(tagName, classes, attributes) { let element = document.createElement(tagName); if (classes && classes.length) { element.classList.add.apply(element.classList, classes); } for (var attr in attributes) { element.setAttribute(attr, attributes[attr]); } return element; } /** * Creates an SVG element and sets the given attributes. * @param {string} qualifiedName is a string that specifies the type of element to be created. * @param {Object} attributes is an object with attributes to set, e.g. {width: 100}. * @returns {SVGElement} The created element. */ createSvgNode(qualifiedName, attributes) { let element = document.createElementNS(SVG_NS, qualifiedName); for (var attr in attributes) { element.setAttributeNS( null, // Replaces viewBox with view-box // attr.replace(/[A-Z]/g, function(match) { // return '-' + match.toLowerCase(); // }), attr, attributes[attr] ); } return element; } /** * Returns the HTMLElement of component. */ get element() { return this._element; } /** * Returns boolean if browser is Internet Explorer. Other browser (also Edge) return false. */ isIE() { var ua = window.navigator.userAgent; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older return true; } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 var rv = ua.indexOf('rv:'); return true; } var edge = ua.indexOf('Edge/'); if (edge > 0) { // Edge (IE 12+) return false; } // other browser return false; } } ================================================ FILE: src/draggable/README.md ================================================ ## Introduction The Audi UI (AUI) **Draggable** component is … (text follows) ### To include an AUI **Draggable** component: ```html ``` ================================================ FILE: src/draggable/_draggable-themes.scss ================================================ .aui-draggable-list { $aui-draggable-color: rgba(#fff, .8); $aui-draggable-color-hover: rgba(#fff, 0.95); $aui-draggable-color-active: rgba(#fff, 0.95); $aui-draggable-background: rgba(#fff, 0.2); $aui-draggable-background-hover: rgba(#fff, 0.3); $aui-draggable-background-active: $aui-color-gray40; $aui-draggable-background-dragging: rgba(#fff, 0.1); &.aui-theme-light { .aui-draggable-list__item { color: $aui-draggable-color; background: $aui-draggable-background; &:hover { color: $aui-draggable-color-hover; background: $aui-draggable-background-hover; } } &.is-dragging .aui-draggable-list__item, &.is-dragging .aui-draggable-list__item:hover { background: $aui-draggable-background-dragging; &.is-active { color: $aui-draggable-color-active; background: $aui-draggable-background-active; } } // Placeholder state &.is-dragging .is-placeholder, &.is-dragging .is-placeholder:hover { color: transparent; background: none; } .is-placeholder::before { border-color: $aui-draggable-background-dragging; } // Dragging icon .aui-draggable-list__item::after { background-image: url('data:image/svg+xml;dataset=utf-8,#{aui-svg-draggable-handle($aui-draggable-color)}'); } } } ================================================ FILE: src/draggable/_draggable.scss ================================================ $aui-draggable-icon-width: rem(16) !default; $aui-draggable-icon-margin-left: unit(2) !default; $aui-draggable-padding-x: unit(6) !default; $aui-draggable-color: rgba(#000, .8) !default; $aui-draggable-color-hover: $aui-color-black !default; $aui-draggable-color-active: $aui-color-black !default; $aui-draggable-background: rgba(#000, 0.1) !default; $aui-draggable-background-hover: rgba(#000, 0.15) !default; $aui-draggable-background-active: $aui-color-gray80 !default; $aui-draggable-background-dragging: rgba(#000, 0.05) !default; .aui-draggable-list { padding-left: 0; list-style: none; font-weight: $aui-font-weight-normal; &__item { cursor: move; position: relative; padding: unit(4) #{$aui-draggable-padding-x + $aui-draggable-icon-width + $aui-draggable-icon-margin-left} unit(4) $aui-draggable-padding-x; color: $aui-draggable-color; background: $aui-draggable-background; transition: background .15s linear, color .15s linear; &:hover { color: $aui-draggable-color-hover; background: $aui-draggable-background-hover; } } &__item + &__item { margin-top: 1px; } &.is-dragging &__item, &.is-dragging &__item:hover { background: $aui-draggable-background-dragging; &.is-active { color: $aui-draggable-color-active; background: $aui-draggable-background-active; } } // Placeholder state &.is-dragging .is-placeholder, &.is-dragging .is-placeholder:hover { color: transparent; background: none; } .is-placeholder::before { content: ''; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border: 1px dotted $aui-draggable-background-dragging; } // Dragging icon &__item:not(.is-placeholder)::after { content: ''; opacity: 0; display: block; position: absolute; top: 50%; right: $aui-draggable-padding-x; width: 16px; height: 5px; margin-top: -2.5px; background: url('data:image/svg+xml;dataset=utf-8,#{aui-svg-draggable-handle($aui-draggable-color-hover)}') center center no-repeat; transition: opacity .15s linear; } &__item.is-active::after, &__item:hover::after { opacity: 1; } } ================================================ FILE: src/draggable/snippets/draggable-list-active.html ================================================ ================================================ FILE: src/draggable/snippets/draggable-list.html ================================================ ================================================ FILE: src/dropdown/_dropdown-themes.scss ================================================ %aui-dropdown-theme-light { $aui-dropdown-color: $aui-color-gray95; $aui-dropdown-secondary-color: $aui-color-gray50; $aui-dropdown-border: $aui-color-gray50; $aui-dropdown-hover-border: $aui-color-black; $aui-dropdown-focus-border: $aui-color-black; $aui-dropdown-dirty-border: $aui-color-black; $aui-dropdown-valid-tick-color: rgba(#fff, 0.6); $aui-dropdown-arrow-color: $aui-field-placeholder-color-light; $aui-dropdown-dirty-arrow-color: $aui-dropdown-color; $aui-dropdown-panel-background: lighten($aui-color-black, 10%); $aui-dropdown-list-title-color: rgba(#fff, 0.3); $aui-dropdown-option-color: $aui-color-gray95; $aui-dropdown-option-hover-background: rgba(#fff, 0.10); .aui-dropdown__input { color: $aui-field-placeholder-color-light; border-color: $aui-dropdown-border; } .aui-dropdown__label { color: $aui-field-placeholder-color-light; } // Arrow icon .aui-dropdown__field::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-dropdown-arrow-color)}'); } // Focus line will be injected by JS .aui-dropdown__focus-line { background: $aui-dropdown-hover-border; } .aui-dropdown__description, .aui-dropdown__error { color: $aui-dropdown-secondary-color; } .aui-dropdown__error { color: $aui-field-error-color; } .aui-dropdown__panel { background: $aui-dropdown-panel-background; @include shadow-dark; } .aui-dropdown__list-title { color: $aui-dropdown-list-title-color; } .aui-dropdown__option { color: $aui-dropdown-option-color; &:hover { background: $aui-dropdown-option-hover-background; } } /** * States */ // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-dropdown__input:hover { border-color: $aui-dropdown-hover-border; } } // Focus state &.is-focused { .aui-dropdown__input { border-color: $aui-dropdown-focus-border; } } // Dirty state &.is-dirty { .aui-dropdown__field::after { // Arrow icon background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-dropdown-dirty-arrow-color)}'); } .aui-dropdown__input { border-color: $aui-dropdown-dirty-border; color: $aui-dropdown-color; } } // Invalid state &.is-invalid { &, &:not(.is-dirty) .aui-dropdown__input, .aui-dropdown__counter, .aui-dropdown__label { color: $aui-field-error-color; } // Arrow icon .aui-dropdown__field::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-field-error-color)}'); } .aui-dropdown__input { border-color: $aui-field-error-color; } .aui-dropdown__focus-line { background: $aui-field-error-color; } } } .aui-dropdown { /** * Theme: black */ &.aui-theme-black { @extend %aui-dropdown-theme-light; } /** * Theme: warmsilver */ &.aui-theme-warmsilver { @extend %aui-dropdown-theme-light; $aui-dropdown-panel-background: lighten($aui-color-warmsilver, 5%); .aui-dropdown__panel { background: $aui-dropdown-panel-background; } } /** * Theme: silver */ &.aui-theme-silver { @extend %aui-dropdown-theme-light; $aui-dropdown-panel-background: lighten($aui-color-silver, 5%); .aui-dropdown__panel { background: $aui-dropdown-panel-background; } } } ================================================ FILE: src/dropdown/_dropdown.scss ================================================ $aui-dropdown-arrow-width: 13px !default; $aui-dropdown-arrow-top-default: $aui-field-default-height * .525 !default; $aui-dropdown-font-size: 1rem !default; $aui-dropdown-option-box-width: 1.5em !default; $aui-dropdown-option-tick-size: .75em !default; $aui-dropdown-color: $aui-color-dark !default; $aui-dropdown-secondary-color: $aui-color-gray40 !default; $aui-dropdown-border: $aui-color-gray50 !default; $aui-dropdown-hover-border: $aui-color-black !default; $aui-dropdown-focus-border: $aui-color-black !default; $aui-dropdown-dirty-border: $aui-color-black !default; $aui-dropdown-valid-tick-color: $aui-color-black !default; $aui-dropdown-arrow-color: $aui-field-placeholder-color !default; $aui-dropdown-dirty-arrow-color: $aui-dropdown-color !default; $aui-dropdown-panel-background: darken($aui-color-white, 10%) !default; $aui-dropdown-list-title-color: rgba(#000, 0.2) !default; $aui-dropdown-option-color: $aui-color-dark !default; $aui-dropdown-option-hover-background: rgba(#000, 0.10) !default; .aui-dropdown { display: block; position: relative; margin: 0; padding: 0; font-size: $aui-dropdown-font-size; line-height: $aui-field-line-height; box-sizing: border-box; @include aui-remove-tap-highlight; &__field { position: relative; } &__input { display: block; margin: 0; width: 100%; padding-right: #{rem($aui-dropdown-arrow-width) + unit(2)}; min-height: $aui-field-default-height; font-family: $aui-font-default; font-size: inherit; font-weight: $aui-font-weight-normal; line-height: inherit; text-align: left; color: $aui-field-placeholder-color; background: none; border: none; border-bottom: 1px solid $aui-dropdown-border; border-radius: 0; transition: color, border; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; resize: none; outline: 0; cursor: pointer; } &__label { display: block; position: absolute; top: $aui-field-label-y; right: 0; bottom: 0; left: 0; width: 100%; color: $aui-field-placeholder-color; font-size: inherit; font-weight: $aui-font-weight-normal; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition-property: top, font-size, color, opacity; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; pointer-events: none; } // Arrow icon &__field::after { $_height: 8px; content: ''; display: block; position: absolute; top: $aui-dropdown-arrow-top-default; right: 0; width: $aui-dropdown-arrow-width; height: $_height; margin-top: ($_height / -2); background: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-dropdown-arrow-color)}') center center no-repeat; transition-property: transform, background; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; } // Focus line will be injected by JS &__focus-line { display: block; position: absolute; bottom: $aui-field-focus-line-height; width: 100%; height: $aui-field-focus-line-height; background: $aui-dropdown-hover-border; opacity: 0; transition-property: opacity, background; transition-duration: $aui-field-transition-duration; } &__description { display: block; color: $aui-dropdown-secondary-color; transition: color $aui-field-transition-duration linear; margin-top: unit(3.5); font-size: rem(12); line-height: $aui-field-error-line-height; } // &__error { // color: $aui-field-error-color; // } &__error { display: flex; align-items: center; line-height: $aui-field-error-line-height; margin-top: unit(3.5); font-size: rem(13); color: $aui-field-error-color; &::before { content: ''; display: inline-block; margin-right: rem(16px); width: 40px; height: 24px; background: url('data:image/svg+xml,#{aui-svg-caution($aui-field-error-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2); width: 24px; height: 24px; } } } &__panel { display: block; visibility: hidden; overflow: auto; position: absolute; top: 100%; left: 0; width: 100%; // IDEA Should Dropdown panels have max height? // max-height: 80vh; background: $aui-dropdown-panel-background; opacity: 0; @include shadow; transition: opacity $aui-field-transition-duration $aui-easing; z-index: 1; } &__list { list-style: none; padding: 0; } &__list-item--animate { opacity: 0; transform: translateY(.5em); transition: transform .25s $aui-easing, opacity .25s $aui-easing; // A transition delay will be applied by JS: // transition-delay: 0.05s * i; } &__list-title, &__option { display: block; padding: 0 unit(4); font-weight: $aui-font-weight-normal; } &__list-title { color: $aui-dropdown-list-title-color; padding-top: unit(3); padding-bottom: 0; } &__option { position: relative; width: 100%; padding-top: unit(3); padding-bottom: unit(3); text-align: left; text-decoration: none; color: $aui-dropdown-option-color; background: none; border: none; outline: none; white-space: normal; vertical-align: middle; cursor: pointer; transition: background $aui-field-transition-duration linear; @include aui-remove-tap-highlight; &:hover { background: $aui-dropdown-option-hover-background; } } &__list &__list &__option { padding-left: unit(10); } /** * Variant: floating-label */ &.aui-dropdown--floating-label { .aui-dropdown__field { padding-top: $aui-field-floating-label-padding; // Arrow icon &::after { top: $aui-dropdown-arrow-top-default + $aui-field-floating-label-padding; } } } .aui-js &.aui-dropdown--floating-label &__label { top: $aui-field-label-y + $aui-field-floating-label-padding; } /** * States */ // Active state &.is-active { z-index: $aui-zindex-dropdown; // Arrow icon .aui-dropdown__field::after { transform: rotate(180deg); } .aui-dropdown__focus-line { opacity: 1; } .aui-dropdown__panel { visibility: visible; opacity: 1; } .aui-dropdown__list-item--animate { opacity: 1; transform: translateY(0); } } // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-dropdown__input:hover { border-color: $aui-dropdown-hover-border; } } // Focus state &.is-focused { .aui-dropdown__input { outline: none; box-shadow: none; border-color: $aui-dropdown-focus-border; } .aui-dropdown__focus-line { opacity: 1; } } // Disabled state &.is-disabled { opacity: $aui-field-disabled-opacity; cursor: not-allowed; .aui-dropdown__input { cursor: not-allowed; } .aui-dropdown__focus-line { opacity: 0; } } // Dirty state &.is-dirty { .aui-dropdown__label { opacity: 0; } .aui-dropdown__field::after { // Arrow icon background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-dropdown-dirty-arrow-color)}'); } &.aui-dropdown--floating-label .aui-dropdown__label { top: 0; font-size: .75rem; opacity: 1; } .aui-dropdown__input { border-color: $aui-dropdown-dirty-border; color: $aui-dropdown-color; } } // Invalid state &.is-invalid { &, &:not(.is-dirty) .aui-dropdown__input, .aui-dropdown__counter, .aui-dropdown__label { color: $aui-field-error-color; } // Arrow icon .aui-dropdown__field::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-field-error-color)}'); } .aui-dropdown__input { border-color: $aui-field-error-color; } .aui-dropdown__focus-line { background: $aui-field-error-color; } } } ================================================ FILE: src/dropdown/dropdown.js ================================================ import Component from '../component/component'; import Checkbox from '../checkbox/checkbox'; const SELECTOR_COMPONENT = '.aui-js-dropdown'; const SELECTOR_OPTION_INPUT = 'input'; const CLASS_ANIMATED_LIST_ITEMS = 'aui-dropdown__list-item--animate'; const CLASS_LABEL = 'aui-dropdown__label'; const CLASS_INPUT = 'aui-dropdown__input'; const CLASS_VALUE = 'aui-dropdown__value'; const CLASS_FOCUS_LINE = 'aui-dropdown__focus-line'; const CLASS_OPTION = 'aui-dropdown__option'; const CLASS_MULTIPLE = 'aui-dropdown--multiple'; const CLASS_IS_FOCUS = 'is-focused'; const CLASS_IS_DIRTY = 'is-dirty'; const CLASS_IS_DISABLED = 'is-disabled'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for Dropdown AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Dropdown extends Component { /** * Upgrades all Dropdown AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Dropdown(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); this._element.addEventListener('click', this._clickHandler = event => this._onClick(event)); this.multiple = this._element.classList.contains(CLASS_MULTIPLE); this._isActive = false; this._valueField = this._element.querySelector(`.${CLASS_VALUE}`); this._input = this._element.querySelector(`.${CLASS_INPUT}`); this._input.addEventListener('input', this._inputHandler = event => this._onInput(event)); this._input.addEventListener('focus', this._focusHandler = event => this._onFocus(event)); this._input.addEventListener('blur', this._blurHandler = event => this._onBlur(event)); this._input.addEventListener('reset', this._resetHandler = event => this._onReset(event)); let itemsAnimated = this._element.querySelectorAll(`.${CLASS_ANIMATED_LIST_ITEMS}`); for (var i = 0; i < itemsAnimated.length; i++) { itemsAnimated[i].style.transitionDelay = itemsAnimated[i].style.webkitTransitionDelay = `${.05 * i}s`; } // Insert thick focus line after label element: this._label = this._element.querySelector(`.${CLASS_LABEL}`); let focusLine = document.createElement('span'); focusLine.classList.add(CLASS_FOCUS_LINE); this._label.parentNode.insertBefore(focusLine, this._label.nextSibling); this.updateClasses(); } optionClicked(option) { if (this._valueField) { this._valueField.value = this._getOptionValue(option); } this.updateInput(option); if (!this.multiple) { this.close(); } } updateInput(option) { let value = ''; if (this.multiple) { let values = []; Array.from(this._element.querySelectorAll(`.${CLASS_OPTION}`)).forEach(element => { const input = element.querySelector(SELECTOR_OPTION_INPUT); if (input && input.checked) { values.push(this._getOptionTitle(element)); } }); value = values.length > 0 ? `(${values.length}) ${values.join(', ')}` : ''; } else { value = this._getOptionTitle(option); } this._input.value = value; this.updateClasses(); } _getOptionTitle(option) { let title = ''; if (option) { title = option.hasAttribute('data-title') ? option.getAttribute('data-title') : ''; } return title; } _getOptionValue(option) { let value = ''; if (option) { value = option.hasAttribute('data-value') ? option.getAttribute('data-value') : ''; } return value; } open() { if (!this._element.classList.contains(CLASS_IS_DISABLED)) { this._isActive = true; this._element.classList.add(CLASS_IS_ACTIVE); window.addEventListener('click', this._clickHandlerWindow = (event) => this._onClickOutside(event)); } } close() { this._isActive = false; this._element.classList.remove(CLASS_IS_ACTIVE); window.removeEventListener('click', this.close); } toggleOpen() { if (this._isActive) { this.close(); } else { this.open(); } } updateClasses() { this.checkDisabled(); this.checkDirty(); this.checkFocus(); } /** * Check the disabled state and update field accordingly. */ checkDisabled() { if (this._input.disabled) { this._element.classList.add(CLASS_IS_DISABLED); } else { this._element.classList.remove(CLASS_IS_DISABLED); } } /** * Check the dirty state and update field accordingly. */ checkDirty() { if (this._input.value && this._input.value.length > 0) { this._element.classList.add(CLASS_IS_DIRTY); } else { this._element.classList.remove(CLASS_IS_DIRTY); } } /** * Check the focus state and update field accordingly. */ checkFocus() { if (Boolean(this._element.querySelector(':focus'))) { this._element.classList.add(CLASS_IS_FOCUS); } else { this._element.classList.remove(CLASS_IS_FOCUS); } } /** * Disable text field. */ disable() { this._input.disabled = true; this.updateClasses(); } /** * Dispose component */ dispose() { super.dispose(); this._input.removeEventListener('input', this._inputHandler); this._input.removeEventListener('focus', this._focusHandler); this._input.removeEventListener('blur', this._blurHandler); this._input.removeEventListener('reset', this._resetHandler); window.removeEventListener('click', this.close); } /** * Event Handler */ _onClick(event) { let isOption = false; // Find closest action element let currentElement = event.target; while (currentElement !== event.currentTarget) { if (currentElement.classList.contains(CLASS_OPTION)) { isOption = true; break; } currentElement = currentElement.parentNode; } if (!isOption) { this.toggleOpen(); } else { // Toggle the Checkbox contained Checkbox.get(currentElement).forEach(checkbox => { checkbox.toggle(); this.optionClicked(currentElement); }); } } _onClickOutside(event) { if (!this._element.contains(event.target)) { this.close(); this.updateClasses(); } } _onInput(event) { this.updateClasses(); } _onFocus(event) { this._element.classList.add(CLASS_IS_FOCUS); } _onBlur(event) { this._element.classList.remove(CLASS_IS_FOCUS); } _onReset(event) { this.updateClasses(); } } ================================================ FILE: src/dropdown/snippets/dropdown-disabled.html ================================================
  • A1
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/dropdown/snippets/dropdown-invalid.html ================================================
  • A1
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/dropdown/snippets/dropdown-multiple.html ================================================
  • A1
  • A3
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/dropdown/snippets/dropdown.html ================================================
  • A1
  • A3
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/dropzone/README.md ================================================ ## Introduction The Audi UI (AUI) **Dropzone** component is … (text follows) ### To include an AUI **Dropzone** component: ```html ``` ### Customize You have to define a specific height for `.aui-dropzone`. ================================================ FILE: src/dropzone/_dropzone-themes.scss ================================================ .aui-dropzone { $aui-dropzone-background: rgba(#000, .9); $aui-dropzone-border: rgba(#fff, .2); $aui-dropzone-border-active: rgba(#fff, .8); &.aui-theme-light { color: $aui-color-light; border-color: $aui-dropzone-border; &.is-active, &:hover { border-color: $aui-dropzone-border-active; } &.aui-dropzone--fullpage { background: $aui-dropzone-background; // Indented broder &::after { border-color: $aui-dropzone-border-active; } } } } ================================================ FILE: src/dropzone/_dropzone.scss ================================================ /** * Add class `aui-dropzone-active` to body element, to prevent scrolling, * when strechted dropzone is active. */ .aui-dropzone-active { overflow: hidden; } $aui-dropzone-background: rgba(#fff, .9) !default; $aui-dropzone-border: rgba(#000, .2) !default; $aui-dropzone-border-active: rgba(#000, .8) !default; $aui-dropzone-border-width: 1px !default; $aui-dropzone-padding-fullpage: unit(2) !default; .aui-dropzone { display: flex; align-items: center; justify-content: center; min-height: 1rem; color: $aui-color-dark; border: $aui-dropzone-border-width dashed $aui-dropzone-border; transition: border 0.15s linear; &__message { flex: none; } &:hover, &.is-active { border-color: $aui-dropzone-border-active; } // Full-page dropzone covering entire viewport &--fullpage { visibility: hidden; opacity: 0; overflow: hidden; position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 0; height: 0; background: $aui-dropzone-background; border: none; transition: border 0.15s linear, opacity 0.15s linear, visibility 0.15s linear; // Indented broder &::after { content: ''; display: block; position: absolute; top: $aui-dropzone-padding-fullpage; right: $aui-dropzone-padding-fullpage; bottom: $aui-dropzone-padding-fullpage; left: $aui-dropzone-padding-fullpage; border: $aui-dropzone-border-width dashed $aui-dropzone-border-active; } &.is-active { visibility: visible; overflow: visible; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; opacity: 1; padding: $aui-dropzone-padding-fullpage; } } } ================================================ FILE: src/dropzone/snippets/dropzone-fullpage.html ================================================
Drop here
================================================ FILE: src/dropzone/snippets/dropzone.html ================================================
Drop here
================================================ FILE: src/fieldset/_fieldset-themes.scss ================================================ .aui-fieldset { /** * Theme: light */ &.aui-theme-light { color: $aui-field-placeholder-color-light; &.aui-fieldset--selects .aui-fieldset__legend, &.aui-fieldset--textfields .aui-fieldset__legend { color: $aui-color-gray95; } &.is-invalid .aui-fieldset__error, &.is-invalid .aui-fieldset__legend { color: $aui-color-invalid; } } } ================================================ FILE: src/fieldset/_fieldset.scss ================================================ $aui-fieldset-field-spacing-x: unit(6) !default; $aui-fieldset-field-spacing-y: unit(6) !default; .aui-fieldset { margin: 0; padding: 0; border: none; line-height: unit(6); font-weight: $aui-font-weight-normal; color: $aui-field-placeholder-color; box-sizing: border-box; &--selects &__legend, &--textfields &__legend { font-weight: $aui-font-weight-bold; color: $aui-color-dark; } &--radios &__legend { margin-bottom: unit(4); } &__fields { display: flex; flex-flow: row wrap; margin-right: #{$aui-fieldset-field-spacing-x * -1}; margin-bottom: #{$aui-fieldset-field-spacing-y * -1}; } &__field { flex: 1 1 auto; margin-right: $aui-fieldset-field-spacing-x; margin-bottom: $aui-fieldset-field-spacing-y; } &--radios &__field { flex: 0 1 auto; } &--radios { &.is-invalid { .aui-radio__label { color: $aui-color-invalid; } } } &__error { display: flex; align-items: center; line-height: $aui-field-error-line-height; margin-top: unit(3.5); font-size: rem(13); color: $aui-field-error-color; &::before { content: ''; display: inline-block; margin-right: rem(16px); width: 24px; min-width: 24px; height: 24px; background: url('data:image/svg+xml,#{aui-svg-caution($aui-field-error-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2); } } } &.is-invalid &__error, &.is-invalid &__legend { color: $aui-color-invalid; } } ================================================ FILE: src/fieldset/snippets/fieldset-radios-invalid.html ================================================
Title
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/fieldset/snippets/fieldset-radios.html ================================================
Title
================================================ FILE: src/fieldset/snippets/fieldset-selects-invalid.html ================================================
Title
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/fieldset/snippets/fieldset-selects.html ================================================
Title
================================================ FILE: src/fieldset/snippets/fieldset-textfields-invalid.html ================================================
Title
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/fieldset/snippets/fieldset-textfields.html ================================================
Title
================================================ FILE: src/figure/README.md ================================================ ## Introduction The Audi UI (AUI) **figure** component is … (text follows) ### To include an AUI **figure** component: ================================================ FILE: src/figure/_figure.scss ================================================ .aui-figure { display: block; margin: 0; &__image { display: block; max-width: 100%; height: auto; } &__caption { margin-top: unit(4); } } ================================================ FILE: src/flyout/README.md ================================================ ## Introduction The Audi UI (AUI) **Flyout** component is … (text follows) ### To include an AUI **Flyout** component: ```html ``` ================================================ FILE: src/flyout/_flyout-themes.scss ================================================ .aui-flyout { $aui-nav-panel-color: $aui-color-gray50; $aui-nav-panel-background: $aui-color-gray20; &.aui-theme-light { .aui-flyout__panel { color: $aui-nav-panel-color; background: $aui-nav-panel-background; @include shadow-dark; } .aui-flyout__close { background: url('data:image/svg+xml,#{aui-svg-close($aui-nav-panel-color)}') center center no-repeat; } } } ================================================ FILE: src/flyout/_flyout.scss ================================================ $aui-flyout-panel-translate-y: -10px !default; $aui-fylout-panel-offset-y: unit(5) !default; $aui-fylout-breakpoint: 400px !default; $aui-fylout-panel-close-size: rem(17) !default; $aui-fylout-panel-header-padding: unit(5) !default; $aui-fylout-panel-header-height: $aui-fylout-panel-close-size + 2 * $aui-fylout-panel-header-padding !default; /** * Prevent scrolling of body, when Flyout is open. * Added to body by JS. */ .aui-flyout-is-open { @media (max-width: $aui-fylout-breakpoint - 1px) { overflow: hidden; } } .aui-flyout { display: inline-block; position: relative; &__toggle { z-index: 1; } &__panel { display: block; opacity: 0; overflow: hidden; position: fixed; top: 0; left: 0; right: 0; bottom: 0; max-height: 0; color: $aui-color-body; background: $aui-color-gray90; font-size: .875rem; font-weight: $aui-font-weight-normal; line-height: unit(5); text-align: left; transition: opacity .2s linear, transform .3s $aui-easing, max-height .1s linear .4s; } &__panel-content { position: absolute; top: 68px; left: 0; right: 0; bottom: 0; overflow: scroll; -webkit-overflow-scrolling: touch; opacity: 0; padding: unit(2) unit(7); transition: opacity .4s $aui-easing; z-index: 1; background-color: inherit; } &__triangle { // TODO Figure out how to implement the triangle with box-shadow // display: none; position: absolute; top: 0; margin-left: unit(6); background: inherit; opacity: 0; transition: opacity .4s $aui-easing; &::after { $size: 16px; content: ''; display: block; position: absolute; left: #{$size / -2}; top: #{$size / -2}; width: $size; height: $size; transform: rotate(45deg); transform-origin: center; background: inherit; box-shadow: -1px -1px 4px rgba(#000, 0.05); } } &--center &__triangle { left: 50%; margin-left: 0; } &--right &__triangle { left: 100%; margin-left: unit(-6); } &__header { position: absolute; top: 0; left: 0; width: 100%; height: $aui-fylout-panel-header-height; } &__close { position: absolute; top: $aui-fylout-panel-header-padding; right: $aui-fylout-panel-header-padding; width: $aui-fylout-panel-close-size; height: $aui-fylout-panel-close-size; outline: 0; border: 0; background: url('data:image/svg+xml,#{aui-svg-close($aui-color-dark)}') center center no-repeat; z-index: 1; cursor: pointer; @include aui-remove-tap-highlight; } // Close gap between trigger and panel, when flyout is `active`. &::after { content: ''; display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; } &.is-active::after { bottom: #{$aui-fylout-panel-offset-y * -1}; } &.is-active &__panel { opacity: 1; max-height: 9999px; transition-delay: 0s; z-index: 9999; overflow: visible; } &.is-active &__panel-content { opacity: 1; transition-delay: .2s; } &.is-active &__triangle { opacity: 1; transition-delay: .2s; } @media (min-width: $aui-fylout-breakpoint) { &__panel { position: absolute; top: 100%; left: 0; right: auto; bottom: auto; margin-top: $aui-fylout-panel-offset-y; max-width: $aui-layout-min-width; color: $aui-color-body; background: $aui-color-white; @include shadow; transform: translateY($aui-flyout-panel-translate-y); } &__panel-content { position: relative; top: auto; left: auto; right: auto; bottom: auto; overflow: auto; } &__header { display: none; } &--right &__panel { left: auto; right: 0; } &--center &__panel { left: 50%; transform: translate(-50%, $aui-flyout-panel-translate-y); } &.is-active &__panel { transform: translateY(0); transition-delay: 0s; } &.is-active.aui-flyout--center &__panel { transform: translate(-50%, 0); } } } ================================================ FILE: src/flyout/flyout.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-flyout'; const CLASS_TOGGLE = 'aui-flyout__toggle'; const CLASS_TRIANGLE = 'aui-flyout__triangle'; const CLASS_HEADER = 'aui-flyout__header'; const CLASS_CLOSE_BUTTON = 'aui-flyout__close'; const CLASS_PANEL = 'aui-flyout__panel'; const CLASS_IS_UPGRADED = 'is-upgraded'; const CLASS_IS_ACTIVE = 'is-active'; const CLASS_FLYOUT_IS_OPEN = 'aui-flyout-is-open'; const TOGGLE_THRESHOLD = 250; // in ms /** * Class constructor for Flyout AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Flyout extends Component { /** * Upgrades all Flyout AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Flyout(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); this._activationTime = 0; this._body = document.querySelector('body'); this._toggle = this._element.querySelector(`.${CLASS_TOGGLE}`); this._panel = this._element.querySelector(`.${CLASS_PANEL}`); // Add triangle shape this._triangle = document.createElement('span'); this._triangle.classList.add(CLASS_TRIANGLE); this._panel.appendChild(this._triangle); // Add panel header with close button this._header = document.createElement('div'); this._header.classList.add(CLASS_HEADER); this._header.innerHTML = ``; this._panel.appendChild(this._header); this._closeBtn = this._header.querySelector(`.${CLASS_CLOSE_BUTTON}`); this._closeBtn.addEventListener('click', this._boundClickClose = (event) => this._onClickClose(event)); this._toggle.addEventListener('click', this._boundClickToggle = (event) => this._onClickToggle(event)); if (this._element.classList.contains(CLASS_IS_ACTIVE)) { this.open(); } } /** * Dispose component */ dispose() { this._toggle.removeEventListener('click', this._boundClickToggle); this._closeBtn.removeEventListener('click', this._boundClickClose); window.removeEventListener('click', this._boundClickWindow); window.removeEventListener('touchend', this._boundTouchendWindow); this._panel.removeChild(this._triangle); this._element.classList.remove(CLASS_IS_ACTIVE, CLASS_IS_UPGRADED); this._element.removeAttribute('style'); } /** * Open Flyout */ open() { this._body.classList.add(CLASS_FLYOUT_IS_OPEN); this._activationTime = Date.now(); this._isActive = true; this._element.classList.add(CLASS_IS_ACTIVE); window.addEventListener('click', this._boundClickWindow = (event) => this._onTouchOutside(event), true); window.addEventListener('touchend', this._boundTouchendWindow = (event) => this._onTouchOutside(event), true); } /** * Close Flyout */ close() { this._body.classList.remove(CLASS_FLYOUT_IS_OPEN); this._isActive = false; this._element.classList.remove(CLASS_IS_ACTIVE); window.removeEventListener('click', this._boundClickWindow, true); window.removeEventListener('touchend', this._boundTouchendWindow, true); } /** * Toggle open/close Flyout */ toggle() { let elapsed = Date.now() - this._activationTime; if (elapsed < TOGGLE_THRESHOLD) { return; } if (this._isActive) { this.close(); } else { this.open(); } } /** * Handle click of close button. * @param {Event} event that fired. */ _onClickClose(event) { this.close(); } /** * Handle click of toggle. * @param {Event} event that fired. */ _onClickToggle(event) { this.toggle(); } /** * Handle mouseneter. * @param {Event} event that fired. */ _onMouseEnter(event) { this.open(event.target, event.clientX); } /** * Handle mouseleave. * @param {Event} event that fired. */ _onMouseLeave(event) { this.close(); } /** * Handle touch. * @param {Event} event that fired. */ _onTouch(event) { event.stopPropagation(); this.open(); } /** * Handle touch outside. * @param {Event} event that fired. */ _onTouchOutside(event) { if (!this._element.contains(event.target)) { this.close(); } } } ================================================ FILE: src/flyout/snippets/flyout-center.html ================================================
================================================ FILE: src/flyout/snippets/flyout-right.html ================================================
================================================ FILE: src/flyout/snippets/flyout.html ================================================
================================================ FILE: src/fullscreen/_fullscreen.scss ================================================ // Make the Webkit/Blink browsers stretch like Firefox/IE11: :-ms-fullscreen::-ms-backdrop, :-webkit-full-screen { position: fixed; width: 100%; top: 0; background: none; } // Apply a color or image backdrop when an element with // a different aspect-ratio is viewed full-screen: :fullscreen::backdrop { background-color: $aui-color-black; } ================================================ FILE: src/grid/README.md ================================================ --- title: Grid --- ## Introduction The Audi UI (AUI) **grid** component is … (text follows) ### To include an AUI **grid** component: ```html ``` ================================================ FILE: src/grid/_grid.scss ================================================ // Grid layout .aui-layout { margin-left: auto; margin-right: auto; padding-left: $aui-grid-container-offset; padding-right: $aui-grid-container-offset; } // Grid container .aui-grid { margin-left: #{$aui-grid-gutters * -1}; box-sizing: border-box; // Clearfix &::after { content: ' '; display: block; clear: both; } } // Grid cells .aui-cell { float: left; width: 100%; padding-left: $aui-grid-gutters; @for $i from 1 through $aui-grid-columns { &--#{$i} { width: 100% / $aui-grid-columns * $i; } } &--spacing-left { padding-left: $aui-grid-gutters * 4; } } // Nested grids .aui-grid { @for $nested from 2 through $aui-grid-columns - 1 { &--nested-#{$nested} { .aui-cell { $width-of-twelve: $aui-grid-columns / $nested * 100%; width: $width-of-twelve; @for $i from 1 through $aui-grid-columns { &--#{$i} { width: $width-of-twelve / $aui-grid-columns * $i; } } } } } } ================================================ FILE: src/header/README.md ================================================ ## Introduction The Audi UI (AUI) **Header** component is … (text follows) ### To include an AUI **Header** component: ```html ``` ================================================ FILE: src/header/_header.scss ================================================ .aui-header { // REVIEW position:sticky currently not working. See also JS. // We use position:sticky for smoother behavior on iOS. // Browser which didn't support it will just ignore it. // position: sticky; z-index: $aui-zindex-header; top: 0; font-size: modular-scale(-2); height: unit(14); &__content { display: flex; flex-flow: row wrap; align-items: center; height: unit(14); transition: box-shadow linear .15s; } &--grid &__content { padding: 0 $aui-grid-container-offset; } &.is-sticky &__content { // If the Browser didn't supports position:sticky, JS will toggle .is-sticky // class to handle positioning. z-index: $aui-zindex-header; position: fixed; top: 0; left: 0; width: 100%; @include shadow; } } ================================================ FILE: src/header/header.js ================================================ import Component from '../component/component'; import ScrollObserver from '../util/scroll-observer'; const SELECTOR_COMPONENT = '.aui-js-header'; const CLASS_STICKYABLE = 'aui-header--sticky'; const CLASS_IS_STICKY = 'is-sticky'; /** * Class constructor for Header AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Header extends Component { /** * Upgrades all Header AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Header(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); // If Header ist not sticky, there is nothing todo. if (!this._element.classList.contains(CLASS_STICKYABLE)) { return; } // REVIEW position:sticky currently not working. See also SCSS. // If browser supports position:sticky, it will handle positioning and // we can skip here. // if (window.getComputedStyle(this._element).position.indexOf('sticky') !== -1) { // return; // } this._scrollObserver = new ScrollObserver(); this._scrollObserver.scrolled.add(this._scrollHandler = () => this.checkStickiness()); this._sticky = false; this.checkStickiness(); } /** * Dispose component. */ dispose() { super.dispose(); this._scrollObserver.resized.remove(this._scrollHandler); this._resizeObserver.resized.remove(this._resizedHandler); } /** * Check if position.top is negative. If so stick otherwise release component. */ checkStickiness() { if (this._element.getBoundingClientRect().top <= 0) { if (!this._sticky) { this.stick(); } } else { if (this._sticky) { this.release(); } } } /** * Stick component to top of viewport in adding sticky class. */ stick() { if (!this._sticky) { this._element.classList.add(CLASS_IS_STICKY); } this._sticky = true; } /** * Release component and position not fixed in removing sticky class. */ release() { if (this._sticky) { this._element.classList.remove(CLASS_IS_STICKY); } this._sticky = false; } } ================================================ FILE: src/header/snippets/header-sticky.html ================================================
================================================ FILE: src/index.js ================================================ // TODO Add ComponentHandler.upgradeAllRegistered components e.g. to update them when all fonts are loaded. // TODO Perform a `Cutting the mustard` test once. audiui-head.js // TODO Outsource dependencies Tether, nouislider, bezier-easing /** * Import all AUI components. */ import Alert from './alert/alert'; import Audioplayer from './audioplayer/audioplayer'; import Breadcrumb from './breadcrumb/breadcrumb'; import Checkbox from './checkbox/checkbox'; // import Dropdown from './dropdown/dropdown'; import Flyout from './flyout/flyout'; import Header from './header/header'; import Modal from './modal/modal'; import Nav from './nav/nav'; import Notification from './notification/notification'; import Pagination from './pagination/pagination'; import Player from './player/player'; import Popover from './popover/popover'; import Progress from './progress/progress'; import Radio from './radio/radio'; import Response from './response/response'; import Select from './select/select'; import Slider from './slider/slider'; import Indicator from './indicator/indicator'; import Spinner from './spinner/spinner'; import Textfield from './textfield/textfield'; import Tooltip from './tooltip/tooltip'; /** * Export all AUI components to make them accessible through npm. * @example * import {Alert} from 'audi-ui'; * Alert.upgradeElements(); */ export { Alert, Audioplayer, Breadcrumb, Checkbox, // Dropdown, Flyout, Header, Modal, Nav, Notification, Pagination, Player, Popover, Progress, Radio, Response, Select, Slider, Indicator, Spinner, Textfield, Tooltip } /** * Export Component Handler as default to have access to all components. * @example * import auiHandler from 'audi-ui'; * auiHandler.upgradeAllElements(); */ class ComponentHandler { constructor() { /** * Performs a "Cutting the mustard" test. If the browser supports the features * tested, adds a aui-js class to the element. */ if ('classList' in document.createElement('div') && 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) { document.documentElement.classList.add('aui-js'); } this.upgradeAllElements(); } upgradeAllElements() { Alert.upgradeElements(); Audioplayer.upgradeElements(); Breadcrumb.upgradeElements(); Checkbox.upgradeElements(); // Dropdown.upgradeElements(); Flyout.upgradeElements(); Header.upgradeElements(); // Modal.upgradeElements(); Nav.upgradeElements(); Notification.upgradeElements(); Pagination.upgradeElements(); Player.upgradeElements(); Popover.upgradeElements(); // Progress.upgradeElements(); Radio.upgradeElements(); Response.upgradeElements(); Select.upgradeElements(); Slider.upgradeElements(); Indicator.upgradeElements(); // Spinner.upgradeElements(); Textfield.upgradeElements(); Tooltip.upgradeElements(); } } const componentHandler = new ComponentHandler(); export default componentHandler; ================================================ FILE: src/index.scss ================================================ // Import variables and util @import 'variables'; @import 'functions'; @import 'mixins'; // Import components @import "alert/alert"; @import "audioplayer/audioplayer"; @import "animation/animation"; @import "breakpoint/breakpoint"; @import "badge/badge"; @import "breadcrumb/breadcrumb"; @import "button/button"; @import "button-group/button-group"; @import "card/card"; @import "checkbox/checkbox"; @import "color/color"; @import "draggable/draggable"; @import "dropzone/dropzone"; // @import "dropdown/dropdown"; @import "figure/figure"; @import "fieldset/fieldset"; @import "flyout/flyout"; @import "grid/grid"; @import "header/header"; @import "list/list"; @import "modal/modal"; @import "nav/nav"; @import "notification/notification"; @import "pager/pager"; @import "pagination/pagination"; @import "player/player"; @import "popover/popover"; @import "progress/progress"; @import "radio/radio"; @import "response/response"; @import "select/select"; @import "slider/slider"; @import "indicator/indicator"; @import "spinner/spinner"; @import "sr-only/sr-only"; @import "switch/switch"; @import "table/table"; @import "textfield/textfield"; @import "tooltip/tooltip"; @import "typography/typography"; @import "visibility/visibility"; // Import color themes @import "themes"; ================================================ FILE: src/indicator/_indicator-themes.scss ================================================ $aui-indicator-color-light: rgba(#fff, 0.2) !default; $aui-indicator-color-hover-light: $aui-color-gray50 !default; $aui-indicator-color-active-light: $aui-color-black !default; $aui-indicator-color-image: rgba($aui-color-gray70, 0.5) !default; $aui-indicator-color-hover-image: $aui-color-gray50 !default; $aui-indicator-color-active-image: $aui-color-black !default; .aui-indicator { &.aui-theme-light { .aui-indicator__action, .aui-indicator__action:visited { background: $aui-indicator-color-light; } .aui-indicator__action:hover { background: $aui-indicator-color-hover-light; } .aui-indicator__indicator { background: $aui-indicator-color-active-light; } } &.aui-theme-image { .aui-indicator__action, .aui-indicator__action:visited { background: $aui-indicator-color-image; } .aui-indicator__action:hover { background: $aui-indicator-color-hover-image; } .aui-indicator__indicator { background: $aui-indicator-color-active-image; } } } ================================================ FILE: src/indicator/_indicator.scss ================================================ $aui-indicator-color: $aui-color-gray80 !default; $aui-indicator-color-hover: $aui-color-gray40 !default; $aui-indicator-color-active: $aui-color-black !default; $aui-indicator-dot-width: 32px !default; $aui-indicator-dot-spacing: 4px !default; $aui-indicator-height: 4px !default; $aui-indicator-action-height: 2px !default; $aui-indicator-trigger-width: 40px !default; $aui-indicator-trigger-height: 40px !default; .aui-indicator { display: inline-block; position: relative; font-family: serif; margin-left: -$aui-indicator-dot-spacing; line-height: $aui-indicator-height; &__items { padding-left: 0; list-style: none; @include clearfix; } &__item { float: left; margin-left: unit(1); } &__trigger { display: flex; align-items: center; width: $aui-indicator-trigger-width; height: $aui-indicator-trigger-height; padding: 0 $aui-indicator-dot-spacing 0 0; &:hover { .aui-indicator__dot { background: $aui-indicator-color-hover; } } } &__dot { pointer-events: none; display: block; width: $aui-indicator-dot-width; height: $aui-indicator-action-height; overflow: hidden; text-indent: 100%; white-space: nowrap; text-decoration: none; outline: 0; transition: background 0.15s linear; } &__dot, &__dot:visited { background: $aui-indicator-color; } &__indicator { display: block; position: absolute; top: calc(50% - 1px); left: $aui-indicator-dot-spacing; transform: translate(0, -50%); width: $aui-indicator-dot-width; height: $aui-indicator-height; background: $aui-indicator-color-active; z-index: 1; transition: left 0.3s $aui-easing; pointer-events: none; } &--shadow &__dot { box-shadow: 0 0 8px $aui-color-gray40; } } ================================================ FILE: src/indicator/indicator.js ================================================ import Component from '../component/component'; import clamp from '../util/clamp'; const SELECTOR_COMPONENT = '.aui-js-indicator'; const CLASS_ITEM = 'aui-indicator__item'; const CLASS_DOT = 'aui-indicator__dot'; const CLASS_TRIGGER = 'aui-indicator__trigger'; const CLASS_INDICATOR = 'aui-indicator__indicator'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for Indicator AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Indicator extends Component { /** * Upgrades all Indicator AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Indicator(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._dots = Array.from(this._element.querySelectorAll(`.${CLASS_DOT}`)); this._triggers = Array.from(this._element.querySelectorAll(`.${CLASS_TRIGGER}`)); this._listItems = Array.from(this._element.querySelectorAll(`.${CLASS_ITEM}`)); this._indicator = document.createElement('span'); this._indicator.classList.add(CLASS_INDICATOR); this._element.appendChild(this._indicator); this._element.addEventListener('click', this.clickHandler = (event) => this._onClick(event)); } /** * Handle click. * @param {Event} event The event that fired. * @private */ _onClick(event) { if (!event.target.classList.contains(CLASS_TRIGGER)) { return; } event.preventDefault(); this.selectDot(event.target); } /** * Select item with given dot element. * @param {HTMLElement} dotElement Dot child element of the list item to select. * @private */ selectDot(dotElement) { if (dotElement) { // Find index const listItem = dotElement.parentNode; const index = this._listItems.indexOf(listItem); this.select(index); } } /** * Select item. * @param {Integer} index Zero-based index of the list item to select. * @private */ select(index = 0) { index = clamp(index, 0, this._dots.length - 1); const activeItem = this._dots[index]; // Update dots this._dots.forEach(item => { item.classList.remove(CLASS_IS_ACTIVE); }); activeItem.classList.add(CLASS_IS_ACTIVE); // Update indicator position const rectContainer = this._element.getBoundingClientRect(); const rectTarget = activeItem.getBoundingClientRect(); const indicatorLeft = rectTarget.left - rectContainer.left; this._indicator.style.left = `${indicatorLeft}px`; } } ================================================ FILE: src/indicator/snippets/indicator-image.html ================================================
================================================ FILE: src/indicator/snippets/indicator.html ================================================
================================================ FILE: src/list/README.md ================================================ --- title: List --- ## Introduction The Audi UI (AUI) **list** component is … (text follows) ### To include an AUI **list** component: ```html ``` ================================================ FILE: src/list/_list.scss ================================================ $aui-list-style-position: unit(5) !default; .aui-list { counter-reset: li; margin-left: 0; padding-left: 0; list-style: none; @include aui-responsive-type(0, 1.5); &__item { margin-left: $aui-list-style-position; & + & { margin-top: unit(3); } &::before { display: inline-block; width: $aui-list-style-position; margin-left: #{$aui-list-style-position * -1}; color: $aui-color-gray50; } } &--arrow &__item::before { content: '›'; } &--number &__item::before { content: counter(li); counter-increment: li; } } .aui-color-text-light { .aui-list__item::before { color: rgba(#fff, 0.6); } } ================================================ FILE: src/modal/README.md ================================================ ## Introduction The Audi UI (AUI) **Modal** component is … (text follows) ### To include an AUI **Modal** component: ```html ``` ================================================ FILE: src/modal/_modal.scss ================================================ $aui-modal-close-size: 45px !default; // sync with JS $aui-modal-close-size-large: 81px !default; // sync with JS $aui-modal-content-padding-x: $aui-grid-container-offset !default; $aui-modal-content-padding-y: unit(6.5) !default; $aui-modal-dialog-padding: unit(8) !default; $aui-modal-dialog-offset: unit(5) !default; $aui-modal-duration: .4s !default; $aui-modal-delay: .4s !default; $aui-modal-content-translate-y: 10px !default; $aui-modal-breakpoint: map-get($aui-breakpoint, xsmall) !default; $aui-modal-morph-duration: .4s !default; $aui-modal-max-width: 1200px !default; // $aui-modal-background: $aui-color-gray20 !default; $aui-modal-background: $aui-color-white !default; $aui-modal-close-color: $aui-color-white !default; $aui-modal-close-color-dark: $aui-color-gray40 !default; $aui-modal-close-hover-color: $aui-color-gray80 !default; $aui-modal-close-hover-color-dark: $aui-color-black !default; /** * Prevent scrolling of body, when modal is open. * Added to body by JS. */ .aui-modal-open { overflow: hidden; } /** * Modal container stretched to viewport size. */ .aui-modal { position: fixed; top: 0; left: 0; width: 0; height: 0; outline: 0; // Prevent Chrome on Windows from adding a focus outline. For details, see https://github.com/twbs/bootstrap/pull/10951. z-index: $aui-zindex-modal; overflow: hidden; &.is-active { right: 0; bottom: 0; width: auto; height: auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; } } /** * Modal dialog */ .aui-modal-dialog { display: flex; flex-flow: row; justify-content: center; position: relative; min-height: 100vh; opacity: 0; transition: opacity $aui-modal-duration $aui-easing; background-color: $aui-modal-background; &__body { display: flex; flex-flow: column; justify-content: center; // vertical, because of `flex-direction: column` position: relative; min-width: 1px; max-width: 100%; min-height: 100vh; padding: $aui-modal-content-padding-y $aui-modal-content-padding-x; } &__body--full { padding: 0; } &__content { max-width: 100%; } &__close { position: fixed; top: rem(6); right: rem(6); width: $aui-modal-close-size; height: $aui-modal-close-size; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; @include aui-remove-tap-highlight; transition: color .3s $aui-easing; color: $aui-modal-close-color; &:hover { color: $aui-modal-close-hover-color; } &--dark { color: $aui-modal-close-color-dark; &:hover { color: $aui-modal-close-hover-color-dark; } } } } .aui-modal-close-icon-large, .aui-modal-close-icon-small { display: block; stroke-width: 1px; } .aui-modal-close-icon-large { display: none; } /** * Styles when modal is open: */ .aui-modal-open .aui-modal.is-active { .aui-modal-dialog { opacity: 1; transition-delay: $aui-modal-delay; } .aui-modal-dialog--morph { transition-delay: 0s; .aui-modal-dialog__body { transition-delay: 0s; } } } /** * Responsive adaptions: */ @media (min-width: $aui-modal-breakpoint) { .aui-modal-dialog__body { width: 62.5%; max-width: $aui-modal-max-width; } .aui-modal-dialog--fullpage, .aui-modal-dialog--window { .aui-modal-dialog__close { top: 0; right: 0; width: $aui-modal-close-size-large; height: $aui-modal-close-size-large; } } .aui-modal-dialog--fullpage { .aui-modal-dialog__body { padding-left: 0; padding-right: 0; } } .aui-modal-dialog--window, .aui-modal-dialog--layer { background-color: transparent; } .aui-modal-dialog--window { .aui-modal-dialog__body { width: 80%; padding-left: $aui-modal-close-size-large; padding-right: $aui-modal-close-size-large; background-color: $aui-modal-background; } } .aui-modal-dialog--layer { padding: 0 $aui-modal-content-padding-x; .aui-modal-dialog__body { padding: $aui-modal-content-padding-y 0; } .aui-modal-dialog__content { transform: translateY(0); background-color: $aui-modal-background; } .aui-modal-dialog__content { padding: $aui-modal-dialog-padding; } &:not(.aui-modal-dialog--morph) .aui-modal-dialog__body { transform: translateY($aui-modal-content-translate-y); transition: transform $aui-modal-duration $aui-easing; } .aui-modal-dialog__close { position: absolute; } } .aui-modal-dialog--layer .aui-modal-dialog__body--full, .aui-modal-dialog__body--full { padding: 0; } .aui-modal-close-icon-small { display: none; } .aui-modal-close-icon-large { display: block; } /** * Styles when modal is open: */ .aui-modal-open .aui-modal.is-active { .aui-modal-dialog { opacity: 1; transition-delay: $aui-modal-delay; } .aui-modal-dialog__content { transform: translateY(0); transition-delay: $aui-modal-delay; } .aui-modal-dialog--layer .aui-modal-dialog__body { transform: translateY(0); transition-delay: $aui-modal-delay; } } } /** * Modal morph * Created by JS */ .aui-modal-morph { position: absolute; opacity: 0; background-color: $aui-modal-background; transition-property: top, left, width, height, opacity; transition-duration: $aui-modal-duration; transition-timing-function: $aui-easing; z-index: $aui-zindex-modal-morph; &.is-morphing { opacity: 1; } } /** * Modal backdrop * Created by JS */ .aui-modal-backdrop { opacity: 0; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: $aui-color-gray10; transition: opacity .6s $aui-easing; z-index: $aui-zindex-modal-backdrop; } .aui-modal-open .aui-modal-backdrop { opacity: 1; } ================================================ FILE: src/modal/modal-default.js ================================================ import ModalDialog from '../modal/modal-dialog'; import ResizeObserver from '../util/resize-observer'; import transitionendEvent from '../util/transition-end-event'; const CLASS_MODAL_IS_OPEN = 'aui-modal-open'; const CLASS_WINDOW = 'aui-modal-dialog--window'; const CLASS_DIALOG_BODY = 'aui-modal-dialog__body'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for ModalDefault AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class ModalDefault extends ModalDialog { /** * Opens this modal. * @param {HTMLElement} trigger The element which opens the modal. */ open(trigger) { super.open(); this._trigger = trigger; // Make modal element visible this._element.classList.add(CLASS_IS_ACTIVE); this._element.scrollTop = 0; this._addBackdrop(); // If dialog acts as window, we have to reposition the close button to // stick with the dialog. if (this._element.querySelector(`.${CLASS_WINDOW}`) && this._closeButton) { if (this._resizeObserver === undefined) { this._resizeObserver = new ResizeObserver(); this._dialogBody = this._element.querySelector(`.${CLASS_DIALOG_BODY}`); } this._resizeObserver.resized.add(this._resizedHandler = () => this._repositionCloseButton()); this._repositionCloseButton(); } window.requestAnimationFrame(() => this._prepareOpenTransition()); } /** * Prepare the open transition. */ _prepareOpenTransition() { // Loops until modal is really visible. // That's required to make transitions work as aspected. if (this._element.offsetWidth > 0) { // Start opening animation this._body.classList.add(CLASS_MODAL_IS_OPEN); } else { window.requestAnimationFrame(() => this._prepareOpenTransition()); } } /** * Closes this modal. */ close() { if (this._backdrop) { this._backdrop.removeEventListener(transitionendEvent, this._backdropCloseTransitionendHandler); transitionendEvent && this._backdrop.addEventListener(transitionendEvent, this._backdropCloseTransitionendHandler = (event) => this._onBackdropCloseTransitionend(event)); } if (this._resizeObserver) { this._resizeObserver.resized.remove(this._resizedHandler); } this._body.classList.remove(CLASS_MODAL_IS_OPEN); } /** * Reposition close button with dialog */ _repositionCloseButton() { const rect = this._dialogBody.getBoundingClientRect(); const right = rect.right - rect.width; // Only reposition if the window is positioned center, otherwise respect // CSS styling: if (right > 0) { this._closeButton.style.right = `${right}px`; } else { this._closeButton.style.right = ''; } } } ================================================ FILE: src/modal/modal-dialog.js ================================================ import Component from '../component/component'; import transitionendEvent from '../util/transition-end-event'; const CLOSE_BUTTON_SIZE_SMALL = 45; const CLOSE_BUTTON_SIZE_LARGE = 81; const CLOSE_ICON_SIZE_SMALL = 17; const CLOSE_ICON_SIZE_LARGE = 31; const CLASS_BACKDROP = 'aui-modal-backdrop'; const CLASS_CLOSE = 'aui-modal-dialog__close'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for ModalDialog AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class ModalDialog extends Component { /** * Initialize component */ init() { super.init(); this._body = document.querySelector('body'); this._closeButton = this._element.querySelector(`.${CLASS_CLOSE}`); if (this._closeButton) { this._addCloseButton(this._closeButton); } } /** * Opens this modal. */ open() { if (this._element.parentNode !== this._body) { this._body.appendChild(this._element); } } /** * Handle transition end event * @param {Event} event which was fired. */ _onBackdropCloseTransitionend(event) { if (event.target === event.currentTarget) { this._backdrop.removeEventListener(transitionendEvent, this._backdropCloseTransitionendHandler); this._element.classList.remove(CLASS_IS_ACTIVE); this._removeBackdrop(); } } /** * Adds a semi-transparent backdrop element behind the modal. */ _addBackdrop() { if (!this._backdrop) { this._backdrop = document.createElement('div'); this._backdrop.classList.add(CLASS_BACKDROP); this._body.appendChild(this._backdrop); } } /** * Removes the backdrop element behind modal. */ _removeBackdrop() { if (this._backdrop) { this._body.removeChild(this._backdrop); this._backdrop = null; } } /** * Adds close button * @param {HTMLElement} container to append close icon to. */ _addCloseButton(container) { let diagonalHalf = (Math.sqrt(2) * CLOSE_ICON_SIZE_SMALL) / 2; let btnSize = CLOSE_BUTTON_SIZE_SMALL; const small = this.createSvgNode( 'svg', { class: 'aui-modal-close-icon-small', viewBox: `0 0 ${btnSize} ${btnSize}` }); let group = this.createSvgNode( 'g', { transform: `translate(${btnSize / 2}, ${btnSize / 2})` }); group.appendChild(this.createSvgNode('line', { x1: '0', y1: -diagonalHalf, x2: '0', y2: diagonalHalf, stroke: 'currentColor', transform: 'rotate(-45, 0, 0)' })); group.appendChild(this.createSvgNode('line', { x1: '0', y1: -diagonalHalf, x2: '0', y2: diagonalHalf, stroke: 'currentColor', transform: 'rotate(45, 0, 0)' })); small.appendChild(group); container.appendChild(small); diagonalHalf = (Math.sqrt(2) * CLOSE_ICON_SIZE_LARGE) / 2; btnSize = CLOSE_BUTTON_SIZE_LARGE; const large = this.createSvgNode( 'svg', { 'class': 'aui-modal-close-icon-large', 'viewBox': `0 0 ${btnSize} ${btnSize}` }); group = this.createSvgNode( 'g', { transform: `translate(${btnSize / 2}, ${btnSize / 2})` }); group.appendChild(this.createSvgNode('line', { x1: '0', y1: -diagonalHalf, x2: '0', y2: diagonalHalf, stroke: 'currentColor', transform: 'rotate(-45, 0, 0)' })); group.appendChild(this.createSvgNode('line', { x1: '0', y1: -diagonalHalf, x2: '0', y2: diagonalHalf, stroke: 'currentColor', transform: 'rotate(45, 0, 0)' })); large.appendChild(group); container.appendChild(large); } } ================================================ FILE: src/modal/modal-morph.js ================================================ import ModalDialog from '../modal/modal-dialog'; import transitionendEvent from '../util/transition-end-event'; const CLASS_MODAL_IS_OPEN = 'aui-modal-open'; const CLASS_CONTENT = 'aui-modal-dialog__content'; const CLASS_MORPH_DIALOG = 'aui-modal-morph'; const CLASS_IS_ACTIVE = 'is-active'; const CLASS_IS_MORPHING = 'is-morphing'; /** * Class constructor for ModalMorph AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class ModalMorph extends ModalDialog { /** * Initialize component */ init() { super.init(); this._content = this._element.querySelector(`.${CLASS_CONTENT}`); } /** * Open modal * @param {HTMLElement} trigger The element which opens the modal. */ open(trigger) { console.log('Open morphing modal'); super.open(); this._trigger = trigger; // Make modal element visible this._element.classList.add(CLASS_IS_ACTIVE); this._element.scrollTop = 0; this._addBackdrop(); window.requestAnimationFrame(() => this._prepareOpenTransition()); } _prepareOpenTransition() { const rect = this._trigger.getBoundingClientRect(); // Apply bounding rect to start with to morphing element this._morph = this._getMorphElement(rect); // Start opening animation window.requestAnimationFrame(() => this._startOpenTransition()); } _startOpenTransition() { const rect = this._content.getBoundingClientRect(); // Apply bounding rect to end on to morphing element this._applyBoundingRectToElement(this._morph, rect); transitionendEvent && this._element.addEventListener(transitionendEvent, this._boundTransitionendElementIn = (event) => this._onTransitionendElementIn(event)); this._morph.classList.add(CLASS_IS_MORPHING); this._body.classList.add(CLASS_MODAL_IS_OPEN); } _onTransitionendElementIn(event) { this._element.removeEventListener(transitionendEvent, this._boundTransitionendElementIn); this._morph.classList.remove(CLASS_IS_MORPHING); } /** * Close modal */ close() { console.log('close'); if (this._backdrop) { this._backdrop.removeEventListener(transitionendEvent, this._backdropCloseTransitionendHandler); transitionendEvent && this._backdrop.addEventListener(transitionendEvent, this._backdropCloseTransitionendHandler = (event) => this._onBackdropCloseTransitionend(event)); } this._element.removeEventListener(transitionendEvent, this._boundTransitionendElementIn); const rect = this._content.getBoundingClientRect(); this._applyBoundingRectToElement(this._morph, rect); this._morph.classList.add(CLASS_IS_MORPHING); transitionendEvent && this._morph.addEventListener(transitionendEvent, this._boundTransitionendMorphOut = (event) => this._onTransitionendMorphOut(event)); window.requestAnimationFrame(() => this._startCloseTransition()); } _startCloseTransition() { const rect = this._trigger.getBoundingClientRect(); this._applyBoundingRectToElement(this._morph, rect); this._body.classList.remove(CLASS_MODAL_IS_OPEN); } _onTransitionendMorphOut(event) { this._morph.removeEventListener(transitionendEvent, this._boundTransitionendMorphOut); this.removeChild(this._morph); this._morph = null; } _onMorpBodyCloseTransitionend(event) { if (event.target === event.currentTarget) { this._morphBody.removeEventListener(transitionendEvent, this._morpBodyCloseTransitionendHandler); this._morphBody.removeAttribute('style'); this._content.classList.remove(CLASS_IS_MORPHING); } } _applyBoundingRectToElement(element, rect) { element.style.top = `${Math.round(rect.top + window.pageYOffset)}px`; element.style.left = `${Math.round(rect.left)}px`; element.style.width = `${Math.round(rect.width)}px`; element.style.height = `${Math.round(rect.height)}px`; } _getMorphElement(rect) { if (!this._morph) { this._morph = this.createElement('div', [CLASS_MORPH_DIALOG]); this._applyBoundingRectToElement(this._morph, rect); this._body.append(this._morph); } return this._morph; } } ================================================ FILE: src/modal/modal.js ================================================ import Component from '../component/component'; import ModalDefault from '../modal/modal-default'; import ModalMorph from '../modal/modal-morph'; const SELECTOR_COMPONENT = '.aui-js-modal'; const CLASS_MORPH = 'aui-modal--morph'; let modalComponents; let currentModal; /** * Class constructor for Modal AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Modal extends Component { /** * Upgrades all Modal AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Modal(element)); } }); modalComponents = components; return components; }; /** * Get a modal component by element ID. * @param {string} id The id attribute of the components HTML element. * @returns {Modal} Returns a modal with the given ID. */ static getModalById(id) { for (var i = 0; i < modalComponents.length; i++) { if (modalComponents[i].id === id) { return modalComponents[i]; } } } /** * Close current modal. */ static closeCurrentModal() { if (currentModal) { currentModal.close(); currentModal = null; } } /** * Returns modifier `morph` */ static get MODIFIER_MORPH() { return CLASS_MORPH; } /** * Returns modifier `default` */ static get MODIFIER_DEFAULT() { return ''; } /** * Initialize component */ init() { super.init(); this._id = this._element.getAttribute('id'); // Initialize with appropriate decorator depending on modifier, // represented by according CSS class: if (this._element.classList.contains(CLASS_MORPH)) { this._decorator = new ModalMorph(this._element); } else { this._decorator = new ModalDefault(this._element); } } /** * Opens this modal. * @param {HTMLElement} trigger The element which opens the modal. */ open(trigger) { currentModal = this; this._decorator.open(trigger); } /** * Closes this modal. */ close() { currentModal = null; this._decorator.close(); } /** * @returns {string} Returns the ID of the modal */ get id() { return this._id; } } ================================================ FILE: src/modal/snippets/modal-layer.html ================================================ ================================================ FILE: src/modal/snippets/modal-morphing-layer.html ================================================ ================================================ FILE: src/modal/snippets/modal-window.html ================================================ ================================================ FILE: src/modal/snippets/modal.html ================================================ ================================================ FILE: src/nav/README.md ================================================ ## Introduction The Audi UI (AUI) **Nav** component is … (text follows) ### To include an AUI **Nav** component: ```html ``` ================================================ FILE: src/nav/_nav-themes.scss ================================================ %aui-nav-theme-light { // Colors $aui-nav-textcolor: rgba(#fff, .5); $aui-nav-textcolor-active: $aui-color-white; $aui-nav-list-separator-color: rgba(#fff, .2); $aui-nav-paddle-background: $aui-color-black; $aui-nav-tab-color: $aui-color-black ; $aui-nav-tab-background: $aui-color-gray90; $aui-nav-dropdown-textcolor: $aui-nav-textcolor; $aui-nav-dropdown-textcolor-active: $aui-nav-textcolor-active; $aui-nav-dropdown-panel-color: $aui-color-gray20; $aui-nav-dropdown-separator-color: rgba(#fff, .2); color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; .aui-nav__action { &.is-active, &:hover { color: $aui-nav-textcolor-active; fill: $aui-nav-textcolor-active; stroke: $aui-nav-textcolor-active; } &, &.is-disabled { color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; } } .aui-nav__indicator { background: $aui-nav-textcolor-active; } .aui-nav__paddle-left, .aui-nav__paddle-right { // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-nav-textcolor)}'); } } .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } &.aui-nav--tab { .aui-nav__action.is-active { color: $aui-nav-tab-color; } .aui-nav__indicator { background: $aui-nav-tab-background; } } /** * Modifier: List */ &.aui-nav--list { .aui-nav__item + .aui-nav__item { border-color: $aui-nav-list-separator-color; } } /** * Modifier: Dropdown */ &.aui-nav--dropdown { color: $aui-nav-dropdown-textcolor; // Dropdown toggle added by JS .aui-nav__toggle { color: $aui-nav-textcolor-active; } .aui-nav__toggle-label { // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-nav-dropdown-textcolor)}'); } } .aui-nav__item { &:not(:last-child) { border-color: $aui-nav-dropdown-separator-color; } } .aui-nav__panel { background: $aui-nav-dropdown-panel-color; @include shadow-dark; } } .aui-nav__underline { background: $aui-nav-dropdown-textcolor; } &.is-sticky .aui-nav__toggle { @include shadow-dark; } } .aui-nav { /** * Theme: black */ &.aui-theme-black { @extend %aui-nav-theme-light; } /** * Theme: warmsilver */ &.aui-theme-warmsilver { @extend %aui-nav-theme-light; $aui-nav-paddle-background: $aui-color-warmsilver; .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } } /** * Theme: silver */ &.aui-theme-silver { @extend %aui-nav-theme-light; $aui-nav-paddle-background: $aui-color-silver; .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } } /** * Theme: red */ &.aui-theme-red { @extend %aui-nav-theme-light; $aui-nav-paddle-background: $aui-color-red; .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } } /** * Theme: gray95 */ &.aui-theme-gray95 { $aui-nav-paddle-background: $aui-color-gray95; .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } } /** * TODO Remove in final version. * Theme: gray */ &.aui-theme-gray10-gray20 { $aui-nav-textcolor: rgba(#fff, .5); $aui-nav-textcolor-active: $aui-color-white; $aui-nav-paddle-background: $aui-color-gray10; $aui-nav-tab-color: $aui-color-white; $aui-nav-tab-background: $aui-color-gray20; color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; .aui-nav__action { &.is-active, &:hover { color: $aui-nav-textcolor-active; fill: $aui-nav-textcolor-active; stroke: $aui-nav-textcolor-active; } &, &.is-disabled { color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; } } .aui-nav__indicator { background: $aui-nav-textcolor-active; } .aui-nav__paddle-left, .aui-nav__paddle-right { // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-arrow($aui-nav-textcolor)}'); } } .aui-nav__paddle-left { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 1) 40%,rgba($aui-nav-paddle-background, 0) 100%); } .aui-nav__paddle-right { background: linear-gradient(to right, rgba($aui-nav-paddle-background, 0) 0%,rgba($aui-nav-paddle-background, 1) 60%); } &.aui-nav--tab { .aui-nav__action.is-active { color: $aui-nav-tab-color; } .aui-nav__indicator { background: $aui-nav-tab-background; } } } } ================================================ FILE: src/nav/_nav.scss ================================================ // Colors //$aui-nav-textcolor: rgba(#000, .5) !default; $aui-nav-textcolor: $aui-color-gray20 !default; $aui-nav-textcolor-active: $aui-color-black !default; $aui-nav-textcolor-disabled: $aui-color-gray70 !default; $aui-nav-list-separator-color: $aui-color-gray85 !default; $aui-nav-tab-background: $aui-color-gray90 !default; $aui-nav-dropdown-textcolor: $aui-nav-textcolor !default; $aui-nav-dropdown-textcolor-active: $aui-nav-textcolor-active !default; $aui-nav-dropdown-panel-color: $aui-color-gray90 !default; $aui-nav-dropdown-separator-color: $aui-color-gray85 !default; $aui-nav-layout-break: -1 !default; $aui-nav-dropdown-sticky-background: $aui-color-white; // Common settings $aui-nav-font-size: unit(4) !default; $aui-nav-default-height: unit(9) !default; $aui-nav-item-spacing: unit(8) !default; // Modification: Small $aui-nav-small-font-size: unit(3) !default; $aui-nav-small-default-height: unit(7) !default; $aui-nav-small-item-spacing: unit(6) !default; $aui-nav-small-tab-item-padding-x: unit(4) !default; $aui-nav-small-tab-item-padding-y: unit(3.5) !default; $aui-nav-small-tab-height: $aui-nav-small-font-size + 2 * $aui-nav-small-tab-item-padding-y !default; // Modification: Pills $aui-nav-tab-item-padding-x: unit(5) !default; $aui-nav-tab-item-padding-y: unit(4.5) !default; $aui-nav-tab-height: $aui-nav-font-size + 2 * $aui-nav-tab-item-padding-y !default; // Modification: Dropdown $aui-nav-dropdown-toogle-arrow-width: 13px !default; $aui-nav-dropdown-sticky-padding-x: $aui-grid-container-offset !default; $aui-nav-dropdown-sticky-padding-y: unit(4.5) !default; $aui-nav-dropdown-sticky-height: $aui-nav-font-size + 2* $aui-nav-dropdown-sticky-padding-y !default; .aui-nav { position: relative; font-weight: $aui-font-weight-normal; font-size: $aui-nav-font-size; line-height: 1; color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; } .aui-nav__items { padding-left: 0; list-style: none; } .aui-nav__action { display: block; width: 100%; z-index: 1; font-family: $aui-font-default; position: relative; padding: #{($aui-nav-default-height - $aui-nav-font-size) / 2} 0; vertical-align: baseline; text-align: left; transition-property: color, background, fill, stroke; transition-duration: .15s; transition-timing-function: linear; cursor: pointer; &.is-active, &:hover { color: $aui-nav-textcolor-active; fill: $aui-nav-textcolor-active; stroke: $aui-nav-textcolor-active; } &, &.is-disabled { color: $aui-nav-textcolor; fill: $aui-nav-textcolor; stroke: $aui-nav-textcolor; } &, &.is-disabled, &:active, &:focus { outline: 0; border: 0; background: none; @include aui-remove-tap-highlight; } > span { position: relative; } .audiicon { position: relative; margin-right: .75em; vertical-align: middle; } &.is-disabled { cursor: not-allowed; color: $aui-nav-textcolor-disabled; fill: $aui-nav-textcolor-disabled; stroke: $aui-nav-textcolor-disabled; //opacity: .3; } } /** * Modifier: List */ .aui-nav--list { .aui-nav__action { padding: unit(3) 0; } .aui-nav__item { display: block; } .aui-nav__item + .aui-nav__item { border-top: 1px solid $aui-nav-list-separator-color; } .aui-nav__action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } /** * Modifier: Bar and Tab */ .aui-nav--bar, .aui-nav--tab { font-family: $aui-font-extended; font-variation-settings: $aui-font-extended-width; overflow: hidden; height: $aui-nav-default-height; // NOTE // Define a viewport width up to we use dropdown layout, // instead of the origin bar/ tab layout. // JS will read `content` value and switch the layout on window resize. @if $aui-nav-layout-break > 0 { &::after { content: '#{$aui-nav-layout-break}'; position: absolute; top: 0; left: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; } } .aui-nav__panel { position: relative; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 50px; // Hide Scrollbars box-sizing: content-box; } .aui-nav__items { display: flex; width: 100%; flex-flow: row nowrap; align-items: flex-start; white-space: nowrap; } .aui-nav__item { flex: 0 0 auto; padding: 0 #{$aui-nav-item-spacing / 2}; &:first-child { padding-left: 0; } &:last-child { padding-right: 0; } } .aui-nav__action { display: inline-block; width: auto; font-family: inherit; &.is-active { transition-delay: .15s; } } } // Active indicator added by JS .aui-nav__indicator { pointer-events: none; display: block; position: absolute; top: $aui-nav-default-height; left: 0; width: 1px; height: 2px; background: $aui-nav-textcolor-active; opacity: 0; transform: translateY(-100%); } // Paddles added by JS .aui-nav__paddle-left, .aui-nav__paddle-right { content: ''; display: block; position: absolute; top: 0; width: $aui-nav-item-spacing; height: 100%; z-index: 2; border: 0; outline: 0; overflow: hidden; transition: opacity .15s linear; // Arrow icon &::after { content: ''; display: inline-block; position: absolute; top: 50%; width: 8px; height: 13px; background: url('data:image/svg+xml,#{aui-svg-arrow($aui-nav-textcolor)}') center center no-repeat; transform: translateY(-50%); } &:disabled { width: 0; opacity: 0; } } .aui-nav__paddle-left { left: 0; background: linear-gradient(to right, rgba(#fff,1) 40%,rgba(#fff,0) 100%); &::after { left: 0; transform: translateY(-50%) rotate(180deg); } } .aui-nav__paddle-right { right: 0; background: linear-gradient(to right, rgba(#fff,0) 0%,rgba(#fff,1) 60%); &::after { right: 0; } } .is-animated .aui-nav__indicator { opacity: 1; transition: left .3s $aui-easing, width .3s $aui-easing, opacity .3s $aui-easing; } .aui-nav--overlap { margin-top: #{$aui-nav-default-height * -1}; } .aui-nav--small { height: $aui-nav-small-default-height; font-size: $aui-nav-small-font-size; font-family: $aui-font-default; .aui-nav__item { padding: 0 #{$aui-nav-small-item-spacing / 2}; &:first-child { padding-left: 0; } &:last-child { padding-right: 0; } } .aui-nav__action { padding: #{($aui-nav-small-default-height - $aui-nav-small-font-size) / 2} 0; } .aui-nav__indicator { top: $aui-nav-small-default-height; } } .aui-nav--tab { height: $aui-nav-tab-height; .aui-nav__item { padding-left: 0; padding-right: 0; } .aui-nav__action { padding: $aui-nav-tab-item-padding-y $aui-nav-tab-item-padding-x; } .aui-nav__indicator { top: 0; height: 100%; transform: none; background: $aui-nav-tab-background; } &.aui-nav--small { height: $aui-nav-small-tab-height; .aui-nav__action { padding: $aui-nav-small-tab-item-padding-y $aui-nav-small-tab-item-padding-x; } } &.aui-nav--overlap { margin-top: #{$aui-nav-tab-height * -1}; } } /** * Modifier: dropdown */ .aui-nav--dropdown { color: $aui-nav-dropdown-textcolor; &.is-active { z-index: $aui-zindex-dropdown; } // Dropdown toggle added by JS .aui-nav__toggle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; padding: unit(2.5) 0; width: 100%; border: 0; background: none; outline: none; line-height: 1; text-align: left; color: $aui-nav-textcolor-active; } .aui-nav__toggle-label { display: block; position: relative; pointer-events: none; padding-right: #{$aui-nav-dropdown-toogle-arrow-width + 5px}; // Arrow icon &::after { $_height: 8px; content: ''; display: block; position: absolute; top: 50%; right: 0; width: $aui-nav-dropdown-toogle-arrow-width; height: $_height; margin-top: ($_height / -2); // background: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-dropdown-arrow-color)}') center center no-repeat; transition-property: transform, background; transition-duration:0.25s; transition-timing-function: $aui-easing; } } &.is-active .aui-nav__toggle-label::after { transform: rotate(180deg); } // Underline added by JS .aui-nav__underline { display: block; position: relative; top: -1px; height: 1px; background: $aui-nav-dropdown-textcolor; z-index: 1; &::after { content: ''; display: block; opacity: 0; position: absolute; top: 1px; width: 100%; height: 1px; background: inherit; transition: opacity .25s linear; } } &.is-active .aui-nav__underline::after { opacity: 1; } .aui-nav__panel { position: absolute; top: 100%; width: 100%; opacity: 0; visibility: hidden; background: $aui-nav-dropdown-panel-color; @include shadow; transition: opacity .3s, visibility .3s; transition-timing-function: $aui-easing; z-index: $aui-zindex-dropdown; } &.is-active .aui-nav__panel { visibility: visible; opacity: 1; } .aui-nav__items { max-height: 0; overflow: hidden; padding: unit(2) 0; transition: max-height 0s .3s; } &.is-active .aui-nav__items { // max-height:auto cannot be transitioned. // Use a very high number instead (something bigger than the panel will ever get). max-height: 10000px; transition-delay: 0s; } .aui-nav__item { opacity: 0; margin: 0 unit(5); transform: translateY(10%); transition-property: transform, opacity; transition-duration: .3s; transition-timing-function: $aui-easing; transition-delay: 0s; // increasing transition-delay set by JS &:not(:last-child) { border-bottom: 1px solid $aui-nav-dropdown-separator-color; } } &.is-active .aui-nav__item { opacity: 1; transform: translateY(0); } .aui-nav__action { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: unit(5) 0; } &.aui-nav--sticky { // We use position:sticky for smoother behavior on iOS. // Browser which didn't support it will just ignore it. position: sticky; top: 0; z-index: $aui-zindex-nav-sticky; } &.aui-nav--sticky .aui-nav__toggle { background: $aui-nav-dropdown-sticky-background; } &.is-sticky .aui-nav__toggle { padding: $aui-nav-dropdown-sticky-padding-y $aui-nav-dropdown-sticky-padding-x; @include shadow; z-index: $aui-zindex-nav-dropdown-toggle; } &.is-sticky .aui-nav__toggle { // If the Browser didn't supports position:sticky, JS will toggle .is-sticky // class to handle positioning. position: fixed; top: 0; left: 0; width: 100%; } &.is-sticky .aui-nav__panel { position: fixed; top: $aui-nav-dropdown-sticky-height; left: 0; } &.is-sticky .aui-nav__underline { opacity: 0; } &.is-sticky .aui-nav__item { margin-left: $aui-nav-dropdown-sticky-padding-x; margin-right: $aui-nav-dropdown-sticky-padding-x; } } ================================================ FILE: src/nav/nav-bar.js ================================================ import Component from '../component/component'; import ResizeObserver from '../util/resize-observer'; import ScrollObserverElement from '../util/scroll-observer-element'; import limit from '../util/limit'; const SELECTOR_COMPONENT = '.aui-js-nav'; const CLASS_PANEL = 'aui-nav__panel'; const CLASS_ACTION = 'aui-nav__action'; const CLASS_INDICATOR = 'aui-nav__indicator'; const CLASS_PADDLES = 'aui-nav__paddles'; const CLASS_PADDLE_LEFT = 'aui-nav__paddle-left'; const CLASS_PADDLE_RIGHT = 'aui-nav__paddle-right'; const CLASS_IS_ACTIVE = 'is-active'; const CLASS_IS_ANIMATED = 'is-animated'; const SHOW_INDICATOR_DELAY = 0.25; // in seconds; Delay after which, the indicator fades in. const INDICATOR_HIDDEN_X = -20; // Position of indicator when it's hidden, e.g. on page load. const INDICATOR_HIDDEN_WIDTH = 10; // Width of indicator when it's hidden, e.g. on page load. const SCROLL_THRESHOLD = 20; // in px; How far to scroll, before paddles are visible. const SCROLL_PADDING = 10; // in px; const SCROLL_EASING = 0.2; /** * Class constructor for NavBar AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class NavBar extends Component { /** * Upgrades all NavBar AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new NavBar(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); // Refer elements this._panel = this._element.querySelector(`.${CLASS_PANEL}`); this._actionElements = Array.from(this._element.querySelectorAll(`.${CLASS_ACTION}`)); // Add indicator (line underneath action elements) this._indicator = document.createElement('span'); this._indicator.classList.add(CLASS_INDICATOR); this._panel.appendChild(this._indicator); // Add paddles (gradient and buttons on the left/right, when scrolling is required) this._paddles = document.createElement('div'); this._paddles.classList.add(CLASS_PADDLES); this._element.appendChild(this._paddles); this._paddleLeft = this._addPaddle(CLASS_PADDLE_LEFT); this._paddleRight = this._addPaddle(CLASS_PADDLE_RIGHT); // Watch window resizing this._resizeObserver = new ResizeObserver(); this._resizeObserver.resized.add(this._resizedHandler = () => this.update()); // Watch scrolling of wrapper element this._scrollObserver = new ScrollObserverElement(this._panel); this._scrollObserver.scrolled.add(this._scrollHandler = () => this._onScrollElement()); this._onScrollElement(); // Add event handler this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event)); // Set initial action element active this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); // Delay fade in of indicator setTimeout(() => { this._element.classList.add(CLASS_IS_ANIMATED); }, SHOW_INDICATOR_DELAY * 1000); } /** * Dispose component. */ dispose() { super.dispose(); this._panel.scrollLeft = 0; this._scrollActive = false; this._resizeObserver.resized.remove(this._resizedHandler); this._scrollObserver.scrolled.remove(this._scrollHandler); this.removeChild(this._indicator); this.removeChild(this._paddles); this._element.removeEventListener('click', this._clickHandler); this._element.classList.remove(CLASS_IS_ANIMATED); } /** * Updates inidcator position and visibility of paddles. */ update() { this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); this._updatePaddleVisibility(); } /** * Set an action element at given index active. * @param {index} index The index of action element to set active. */ setActiveByIndex(index) { let i = limit(index, 0, this._actionElements.length); this.setActive(this._actionElements[i]); } /** * Set an action element active. * @param {HTMLElement} activeTarget The action element to set active. */ setActive(activeTarget) { // TODO: Optimize like in nav-list this._actionElements.forEach(item => { item.classList.remove(CLASS_IS_ACTIVE); }); let indicatorLeft = INDICATOR_HIDDEN_X; let indicatorWidth = INDICATOR_HIDDEN_WIDTH; if (activeTarget) { activeTarget.classList.add(CLASS_IS_ACTIVE); let containerBounds = this._element.getBoundingClientRect(); let rectTarget = activeTarget.getBoundingClientRect(); indicatorLeft = rectTarget.left - containerBounds.left + this._panel.scrollLeft; indicatorWidth = activeTarget.offsetWidth; } this._indicator.style.left = `${indicatorLeft}px`; this._indicator.style.width = `${indicatorWidth}px`; this._index = null; for (var i = 0; i < this._actionElements.length; i++) { if (this._actionElements[i] === activeTarget) { this._index = i; break; } } } /** * Scroll to the next visible action element on the left. */ scrollLeft() { this.scroll(-1); } /** * Scroll to the next visible action element on the right. */ scrollRight() { this.scroll(1); } /** * Scroll to the next visible action element on the left or right. * @param {number} dir The direction to scroll to: -1=>left, 1=>right. */ scroll(dir) { let containerBounds = this._element.getBoundingClientRect(); let elementBounds; let left = 0; let right = this._panel.offsetWidth; let scroll = 0; if (dir < 0) { // Scroll to previous element for (let i = this._actionElements.length - 1; i > 0; i--) { let element = this._actionElements[i]; elementBounds = element.getBoundingClientRect(); let elementLeft = elementBounds.left - containerBounds.left; if (elementLeft < left) { scroll = Math.ceil(elementLeft + this._panel.scrollLeft - SCROLL_PADDING); break; } } } else { // Scroll to next element for (let i = 0; i < this._actionElements.length; i++) { let element = this._actionElements[i]; elementBounds = element.getBoundingClientRect(); let elementRight = elementBounds.left - containerBounds.left + element.offsetWidth; if (elementRight > right) { scroll = Math.ceil(elementRight + this._panel.scrollLeft + SCROLL_PADDING - right); break; } } } this._animateScroll(scroll); } /** * Scroll to the next visible action element on the left or right. * @param {number} scroll position to scroll to. * @private */ _animateScroll(scroll) { this._scrollStart = this._panel.scrollLeft; this._scrollDelta = scroll - this._scrollStart; this._scrollRatio = 0; this._scrollActive = true; window.requestAnimationFrame(() => this._animateScrollTick()); } /** * Scroll animation tick. * @private */ _animateScrollTick() { let ratio = 1 - this._scrollRatio; ratio *= SCROLL_EASING; this._scrollRatio += ratio; if (ratio < 0.001) { this._scrollRatio = 1; } this._panel.scrollLeft = this._scrollStart + this._scrollDelta * this._scrollRatio; if (this._scrollActive && this._scrollRatio !== 1) { window.requestAnimationFrame(() => this._animateScrollTick()); } } /** * Adds a paddle element. * @param {string} cssClass to add to element. * @returns {HTMLElement} the created paddle element. * @private */ _addPaddle(cssClass) { let paddle = document.createElement('button'); paddle.setAttribute('type', 'button'); paddle.classList.add(cssClass); this._paddles.appendChild(paddle); return paddle; } /** * Update visibility of paddles depending on scroll position. * @private */ _updatePaddleVisibility() { if (this._scrollObserver.scrollLeft - SCROLL_THRESHOLD > 0) { this._paddleLeft.disabled = false; } else { this._paddleLeft.disabled = true; } if (this._scrollObserver.scrollLeft + this._element.offsetWidth + SCROLL_THRESHOLD < this._panel.scrollWidth) { this._paddleRight.disabled = false; } else { this._paddleRight.disabled = true; } } /** * Handle scroll of element. * @private */ _onScrollElement() { this._updatePaddleVisibility(); } /** * Handle click of element. * @param {Event} event The event that fired. * @private */ _onClick(event) { if (event.target === this._paddleLeft) { event.preventDefault(); this.scrollLeft(); } else if (event.target === this._paddleRight) { event.preventDefault(); this.scrollRight(); } else { // Find closest action element let currentElement = event.target; while (currentElement !== event.currentTarget) { if (currentElement.classList.contains(CLASS_ACTION)) { if (!currentElement.disabled) { this.setActive(currentElement); } break; } currentElement = currentElement.parentNode; } } } /** * Returns index. * @returns {number} the index of current active action element. */ get index() { return this._index; } /** * Returns length. * @returns {number} the number of action elements. */ get length() { return this._actionElements.length; } } ================================================ FILE: src/nav/nav-dropdown.js ================================================ import Component from '../component/component'; import Sticky from '../sticky/sticky'; import limit from '../util/limit'; import isNone from '../util/is-none'; const SELECTOR_COMPONENT = '.aui-js-nav'; const CLASS_PANEL = 'aui-nav__panel'; const CLASS_UNDERLINE = 'aui-nav__underline'; const CLASS_ITEM = 'aui-nav__item'; const CLASS_ACTION = 'aui-nav__action'; const CLASS_TOGGLE = 'aui-nav__toggle'; const CLASS_TOGGLE_LABEL = 'aui-nav__toggle-label'; const CLASS_STICKY = 'aui-nav--sticky'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for NavDropdown AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class NavDropdown extends Component { /** * Upgrades all NavDropdown AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new NavDropdown(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); this._index = 0; // Refer elements this._panel = this._element.querySelector(`.${CLASS_PANEL}`); this._actions = Array.from(this._element.querySelectorAll(`.${CLASS_ACTION}`)); // Set transition delays for item elements Array.from(this._element.querySelectorAll(`.${CLASS_ITEM}`)).forEach((element, index) => { element.style.transitionDelay = element.style.webkitTransitionDelay = `${0.1 + 0.05 * index}s`; }); // Add toggle element this._toggle = this.createElement('button', [CLASS_TOGGLE], { type: 'button' }); this._element.appendChild(this._toggle); this._toggleLabel = this.createElement('span', [CLASS_TOGGLE_LABEL]); this._toggle.appendChild(this._toggleLabel); // Add underline element this._underline = this.createElement('div', [CLASS_UNDERLINE]); this._element.appendChild(this._underline); // Check if component is sticky if (this._element.classList.contains(CLASS_STICKY)) { this._stickyHandler = new Sticky(this._element); } // Add event handler this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event)); // Set initial action element active this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); } /** * Dispose component. */ dispose() { super.dispose(); this._actions.forEach((element, index) => { element.style.transitionDelay = ''; }); this.removeChild(this._toggle); this.removeChild(this._underline); this._element.removeEventListener('click', this._clickHandler); } /** * Updates inidcator position and visibility of paddles. */ update() { this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); } /** * Toggle active state. * @param {boolean} force If is true, open panel, and if it is false, close it. */ toggle(force) { this._element.classList.toggle(CLASS_IS_ACTIVE, force); } /** * Set an action element at given index active. * @param {index} index The index of action element to set active. */ setActiveByIndex(index) { let i = limit(index, 0, this._actions.length); this.setActive(this._actions[i]); } /** * Set an action element active. * @param {HTMLElement} activeTarget The action element to set active. */ setActive(activeTarget) { // TODO: Optimize like in nav-list // Remove active class from all action elements this._actions.forEach(item => { item.classList.remove(CLASS_IS_ACTIVE); }); // If no action element is active, pick the first one if (isNone(activeTarget)) { activeTarget = this._actions[0]; } // Apply active class to action element and mirror innerHTML to toggle activeTarget.classList.add(CLASS_IS_ACTIVE); this._toggleLabel.innerHTML = activeTarget.innerHTML; // Update active index this._index = null; for (var i = 0; i < this._actions.length; i++) { if (this._actions[i] === activeTarget) { this._index = i; break; } } } /** * Handle click of element. * @param {Event} event The event that fired. * @private */ _onClick(event) { if (event.target === this._toggle) { this.toggle(); } else { // Find closest action element let currentElement = event.target; while (currentElement !== event.currentTarget) { if (currentElement.classList.contains(CLASS_ACTION)) { this.setActive(currentElement); this.toggle(); break; } currentElement = currentElement.parentNode; } } } /** * Returns index. * @returns {number} the index of current active action element. */ get index() { return this._index; } /** * Returns length. * @returns {number} the number of action elements. */ get length() { return this._actions.length; } } ================================================ FILE: src/nav/nav-list.js ================================================ import Component from '../component/component'; import limit from '../util/limit'; const SELECTOR_COMPONENT = '.aui-js-nav'; const CLASS_ACTION = 'aui-nav__action'; const CLASS_IS_ACTIVE = 'is-active'; /** * Class constructor for NavList AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class NavList extends Component { /** * Upgrades all NavList AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new NavList(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); // Refer elements this._actionElements = Array.from(this._element.querySelectorAll(`.${CLASS_ACTION}`)); // Add event handler this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event)); // Set initial action element active this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); } /** * Dispose component. */ dispose() { super.dispose(); this._element.removeEventListener('click', this._clickHandler); } /** * Updates inidcator position and visibility of paddles. */ update() { this.setActive(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); } /** * Set an action element at given index active. * @param {index} index The index of action element to set active. */ setActiveByIndex(index) { const i = limit(index, 0, this._actionElements.length); this.setActive(this._actionElements[i]); } /** * Set an action element active. * @param {HTMLElement} activeTarget The action element to set active. */ setActive(activeTarget) { this._actionElements.forEach((item, index) => { const active = (item === activeTarget); item.classList.toggle(CLASS_IS_ACTIVE, active); if (active) { this._index = index; } }); } /** * Handle click of element. * @param {Event} event The event that fired. * @private */ _onClick(event) { // Find closest action element let currentElement = event.target; while (currentElement !== event.currentTarget) { if (currentElement.classList.contains(CLASS_ACTION)) { if (!currentElement.disabled) { this.setActive(currentElement); } break; } currentElement = currentElement.parentNode; } } /** * Returns index. * @returns {number} the index of current active action element. */ get index() { return this._index; } /** * Returns length. * @returns {number} the number of action elements. */ get length() { return this._actionElements.length; } } ================================================ FILE: src/nav/nav.js ================================================ import Component from '../component/component'; import NavBar from '../nav/nav-bar'; import NavDropdown from '../nav/nav-dropdown'; import NavList from '../nav/nav-list'; import ResizeObserver from '../util/resize-observer'; const SELECTOR_COMPONENT = '.aui-js-nav'; const CLASS_LIST = 'aui-nav--list'; const CLASS_BAR = 'aui-nav--bar'; const CLASS_TAB = 'aui-nav--tab'; const CLASS_DROPDOWN = 'aui-nav--dropdown'; /** * Class constructor for Nav AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Nav extends Component { /** * Upgrades all Nav AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Nav(element)); } }); return components; }; /** * Returns modifier `list` */ static get MODIFIER_LIST() { return CLASS_LIST; } /** * Returns modifier `bar` */ static get MODIFIER_BAR() { return CLASS_BAR; } /** * Returns modifier `tab` */ static get MODIFIER_TAB() { return CLASS_TAB; } /** * Returns modifier `dropdown` */ static get MODIFIER_DROPDOWN() { return CLASS_DROPDOWN; } /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); // Initialize with appropriate decorator depending on modifier, // represented by according CSS class: if (this._element.classList.contains(CLASS_BAR)) { this._originModifier = Nav.MODIFIER_BAR; } else if (this._element.classList.contains(CLASS_TAB)) { this._originModifier = Nav.MODIFIER_TAB; } else if (this._element.classList.contains(CLASS_DROPDOWN)) { this._originModifier = Nav.MODIFIER_DROPDOWN; } else if (this._element.classList.contains(CLASS_LIST)) { this._originModifier = Nav.MODIFIER_LIST; } this._layoutBreakpoint = parseInt(window.getComputedStyle(this._element, ':after').getPropertyValue('content').replace(/['"]+/g, '')); if (this._layoutBreakpoint > 0 && (this._originModifier === Nav.MODIFIER_BAR || this._originModifier === Nav.MODIFIER_TAB)) { this._resizeObserver = new ResizeObserver(); this._resizeObserver.resized.add(this._boundResize = () => this._resized()); this._resized(); } else { this.setModifier(this._originModifier); } } /** * Dispose component. */ dispose() { super.dispose(); if (this._decorator) { this._decorator.dispose(); } } /** * Updates inidcator position and visibility of paddles. */ update() { if (this._decorator) { this._decorator.update(); } } /** * Set modifier to switch style of Nav Component. * @param {string} modifier name. * @throws Will throw an error, if the given modifier is not supported. */ setModifier(modifier) { if (this._modifier === modifier) { return; } if (this._decorator) { this._decorator.dispose(); } this._element.classList.remove(CLASS_LIST, CLASS_BAR, CLASS_TAB, CLASS_DROPDOWN); switch (modifier) { case Nav.MODIFIER_BAR: this._element.classList.add(CLASS_BAR); this._decorator = new NavBar(this._element); break; case Nav.MODIFIER_TAB: this._element.classList.add(CLASS_TAB); this._decorator = new NavBar(this._element); break; case Nav.MODIFIER_DROPDOWN: this._element.classList.add(CLASS_DROPDOWN); this._decorator = new NavDropdown(this._element); break; case Nav.MODIFIER_LIST: this._element.classList.add(CLASS_LIST); this._decorator = new NavList(this._element); break; default: throw new Error(`Modifier '${modifier}' for Nav component not supported.`); } this._modifier = modifier; } /** * Handle resize signal. */ _resized() { const viewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); if (this._originModifier === Nav.MODIFIER_BAR || this._originModifier === Nav.MODIFIER_TAB) { if (viewportWidth >= this._layoutBreakpoint) { this.setModifier(this._originModifier); } else { this.setModifier(Nav.MODIFIER_DROPDOWN); } } } /** * Returns index. * @returns {number} the index of current active action element. */ get index() { return this._decorator ? this._decorator.index : undefined; } /** * Returns length. * @returns {number} the number of action elements. */ get length() { return this._decorator ? this._decorator.length : undefined; } } ================================================ FILE: src/nav/snippets/nav-bar-small.html ================================================ ================================================ FILE: src/nav/snippets/nav-bar.html ================================================ ================================================ FILE: src/nav/snippets/nav-dropdown-sticky.html ================================================ ================================================ FILE: src/nav/snippets/nav-dropdown.html ================================================ ================================================ FILE: src/nav/snippets/nav-list-icons.html ================================================ ================================================ FILE: src/nav/snippets/nav-list-large-icons.html ================================================ ================================================ FILE: src/nav/snippets/nav-tab-overlap.html ================================================ ================================================ FILE: src/nav/snippets/nav-tab-small.html ================================================ ================================================ FILE: src/nav/snippets/nav-tab.html ================================================ ================================================ FILE: src/nav/snippets/nav.html ================================================ ================================================ FILE: src/notification/_notification.scss ================================================ $close-btn-size: 17px !default; $text-padding-x: unit(3) !default; $text-padding-y: unit(3) !default; $container-offset-x: unit(3) !default; $container-offset-y: unit(3) !default; $opening-duration: .4s !default; $closing-duration: .4s !default; .aui-notification { position: relative; width: #{rem(320) - 2 * $container-offset-x}; @include aui-responsive-type(-1, 1.5); transform: translateY(30px); transition: height $closing-duration $aui-easing $closing-duration, margin $closing-duration $aui-easing $closing-duration, opacity $closing-duration $aui-easing, visibility $closing-duration $aui-easing, transform $closing-duration $aui-easing, box-shadow $closing-duration $aui-easing; margin-bottom: unit(1); opacity: 0; visibility: hidden; &-container { position: fixed; right: $container-offset-x; top: $container-offset-y; z-index: $aui-notification-zindex; } &__content { position: relative; margin-right: #{$close-btn-size + 10px}; padding: $text-padding-y #{$text-padding-x * 2} $text-padding-y $text-padding-x; } &__close { position: absolute; top: $text-padding-y; right: $text-padding-x; width: $close-btn-size; height: $close-btn-size; background: url('data:image/svg+xml,#{aui-svg-close($aui-color-dark)}') center center no-repeat; cursor: pointer; vertical-align: middle; outline: none; box-sizing: border-box; border: none; @include aui-remove-tap-highlight; } &.aui-color-text-light &__close, &.aui-color-text-warning &__close { background-image: url('data:image/svg+xml,#{aui-svg-close($aui-color-light)}'); } &.is-open { transform: translateY(0); opacity: 1; visibility: visible; @include shadow-dark; transition-duration: $opening-duration; } &.is-closed { transform: translateY(0); overflow: hidden; height: 0 !important; } } ================================================ FILE: src/notification/notification.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-notification'; const CLASS_CONTENT = 'aui-notification__content'; const CLASS_CLOSE_BUTTON = 'aui-notification__close'; const CLASS_IS_CLOSED = 'is-closed'; const CLASS_IS_OPEN = 'is-open'; const ATTR_CLOSE = 'data-close'; /** * Class constructor for Notification AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Notification extends Component { /** * Upgrades all Notification AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Notification(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._content = this._element.querySelector(`.${CLASS_CONTENT}`); if (!this._content) { this._content = document.createElement('div'); this._content.classList.add(CLASS_CONTENT); this._element.appendChild(this._content); } // Add close button this._closeButton = document.createElement('button'); this._closeButton.setAttribute('type', 'button'); this._closeButton.classList.add(CLASS_CLOSE_BUTTON); this._element.appendChild(this._closeButton); this.open(); } open() { this._element.addEventListener('click', this._clickHandler = (event) => this._onClick(event)); this.checkOpeningPreparation(); } checkOpeningPreparation() { clearTimeout(this.openingTimeout); this._element.classList.add(CLASS_IS_OPEN); this._element.classList.remove(CLASS_IS_CLOSED); } close() { this._element.removeEventListener('click', this._clickHandler); this._element.style.height = `${this._element.offsetHeight}px`; this._element.style.marginTop = '0px'; this._element.style.marginBottom = '0px'; this.checkClosingPreparation(); } checkClosingPreparation() { clearTimeout(this.openingTimeout); if (window.getComputedStyle(this._element).height && this._element.style.height) { this._element.classList.remove(CLASS_IS_OPEN); this._element.classList.add(CLASS_IS_CLOSED); } else { window.requestAnimationFrame(() => this.checkClosingPreparation()); } } _onClick(event) { if (event.target.classList.contains(CLASS_CLOSE_BUTTON) || event.target.hasAttribute(ATTR_CLOSE)) { this.close(); } } } ================================================ FILE: src/notification/snippets/notification-light.html ================================================
The Death Star plans are not in the main computer. Where are those transmissions you intercepted? What have you done with those plans? We intercepted no transmissions.
================================================ FILE: src/notification/snippets/notification.html ================================================
The Death Star plans are not in the main computer. Where are those transmissions you intercepted? What have you done with those plans? We intercepted no transmissions.
================================================ FILE: src/pager/README.md ================================================ ## Introduction The Audi UI (AUI) **Pager** component is … (text follows) ### To include an AUI **Pager** component: ```html ``` ================================================ FILE: src/pager/_pager-themes.scss ================================================ $aui-pager-color: $aui-color-gray50; $aui-pager-color-active: $aui-color-white; .aui-pager { &.aui-theme-light { color: $aui-pager-color; .aui-pager__current { color: $aui-pager-color-active; } .aui-pager__next:hover:not(.is-disabled), .aui-pager__prev:hover:not(.is-disabled) { color: $aui-pager-color-active; } } } ================================================ FILE: src/pager/_pager.scss ================================================ $aui-pager-color: $aui-color-gray40 !default; $aui-pager-color-active: $aui-color-black !default; .aui-pager { list-style: none; padding-left: 0; font-weight: $aui-font-weight-normal; color: $aui-pager-color; &__item { display: inline-block; } &__current { color: $aui-pager-color-active; } &__next, &__prev { transition: color .15s linear; } &__prev { margin-right: 1em; } &__next { margin-left: 1em; } &__next-icon, &__prev-icon { display: inline-block; width: .5em; height: .8125em; text-indent: 100%; overflow: hidden; transition: transform .15s cubic-bezier(0.75, 0.02, 0.5, 1); background-size: contain; background-repeat: no-repeat; background-position: center; svg { @include icon; } } &__prev-icon { transform: translateY(em(1)) rotate(180deg); } &__next:hover:not(.is-disabled), &__prev:hover:not(.is-disabled) { color: $aui-pager-color-active; } &__prev:hover:not(.is-disabled) { .aui-pager__prev-icon { transform: translateX(-4px) translateY(em(1)) rotate(180deg); } } &__next:hover:not(.is-disabled) { .aui-pager__next-icon { transform: translateX(4px); } } &__next, &__prev { &.is-disabled { cursor: not-allowed; opacity: .30; pointer-events: none; } } } ================================================ FILE: src/pager/snippets/pager-minimal.html ================================================ ================================================ FILE: src/pager/snippets/pager-pagination.html ================================================ ================================================ FILE: src/pager/snippets/pager.html ================================================ ================================================ FILE: src/pagination/_pagination-themes.scss ================================================ $aui-pagination-color: $aui-color-gray50; $aui-pagination-color-active: $aui-color-white; .aui-pagination { &.aui-theme-light { color: $aui-pagination-color; .aui-pagination__link.is-active, .aui-pagination__link:hover:not(.is-disabled), .aui-pagination__next:hover:not(.is-disabled), .aui-pagination__prev:hover:not(.is-disabled), { color: $aui-pagination-color-active; } .aui-pagination__indicator { background: $aui-pagination-color-active; } } } ================================================ FILE: src/pagination/_pagination.scss ================================================ $aui-pagination-color: $aui-color-gray40 !default; $aui-pagination-color-active: $aui-color-black !default; .aui-pagination { position: relative; height: unit(7); @include typo-body; font-weight: $aui-font-weight-normal; color: $aui-pagination-color; &__items { display: block; list-style: none; padding-left: 0; @include clearfix; } &__item { display: block; margin: 0 0.75rem; float: left; &:first-child { margin-left: 0; } &:last-child { margin-right: 0; } } &__ellipsis, &__link, &__next, &__prev { transition: color .15s linear; } &__link.is-active, &__link:hover:not(.is-disabled), &__next:hover:not(.is-disabled), &__prev:hover:not(.is-disabled) { color: $aui-pagination-color-active; } &__prev:hover:not(.is-disabled) { .aui-pagination__prev-icon { transform: translateX(-4px) translateY(em(1)) rotate(180deg); } } &__next:hover:not(.is-disabled) { .aui-pagination__next-icon { transform: translateX(4px) translateY(em(1)); } } &__next-icon, &__prev-icon { display: inline-block; width: .5em; height: .8125em; text-indent: 100%; overflow: hidden; transform: translateY(em(1)); transition: transform .15s cubic-bezier(0.75, 0.02, 0.5, 1); background-size: contain; background-repeat: no-repeat; background-position: center; svg { @include icon; } } &__prev-icon { transform: translateY(em(1)) rotate(180deg); } &__indicator { pointer-events: none; display: block; position: absolute; bottom: 0; left: 0; width: 1px; height: 2px; background: $aui-pagination-color-active; z-index: 1; opacity: 0; } .is-animated &__indicator { opacity: 1; transition: left .3s $aui-easing, width .3s $aui-easing, opacity .3s $aui-easing; } [displaytype^='stepless'] &__indicator { display: none; } [pageCount^='0'] &__indicator { display: none; } &__link, &__next, &__prev { &.is-disabled { cursor: not-allowed; opacity: .30; pointer-events: none; } } } ================================================ FILE: src/pagination/pagination.js ================================================ import Component from '../component/component'; import ResizeObserver from '../util/resize-observer'; const SELECTOR_COMPONENT = '.aui-js-pagination'; const CLASS_ITEM = 'aui-pagination__link'; const CLASS_INDICATOR = 'aui-pagination__indicator'; const CLASS_IS_ACTIVE = 'is-active'; const CLASS_IS_ANIMATED = 'is-animated'; const CLASS_IS_DISABLED = 'is-disabled'; /** * Class constructor for Pagination AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Pagination extends Component { /** * Upgrades all Pagination AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Pagination(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); this._resizeObserver = new ResizeObserver(); this._resizeObserver.resized.add(this._boundResized = () => this.update()); this._items = Array.from(this._element.querySelectorAll(`.${CLASS_ITEM}`)); this._indicator = document.createElement('span'); this._indicator.classList.add(CLASS_INDICATOR); this._element.appendChild(this._indicator); this._element.addEventListener('click', this._boundClick = (event) => this._onClick(event)); this._repositionIndicator(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); setTimeout(() => { this._element.classList.add(CLASS_IS_ANIMATED); }, 250); } /** * Dispose component */ dispose() { super.dispose(); this._element.classList.remove(CLASS_IS_ANIMATED); this._element.removeEventListener('click', this._boundClick); this._resizeObserver.resized.remove(this._boundResized); if (this._indicator) { this.removeChild(this._indicator); } } /** * Update component. */ update() { this._repositionIndicator(this._element.querySelector(`.${CLASS_IS_ACTIVE}`)); } /** * Reposition indicator of `active` page. * @param {HTMLElement} linkElement that is going to be `active`. * @private */ _repositionIndicator(linkElement) { if (!linkElement) return; this._items.forEach(item => { item.classList.remove(CLASS_IS_ACTIVE); }); linkElement.classList.add(CLASS_IS_ACTIVE); // Indicator position const rectContainer = this._element.getBoundingClientRect(); const rectTarget = linkElement.getBoundingClientRect(); const indicatorLeft = rectTarget.left - rectContainer.left + this._element.scrollLeft; this._indicator.style.left = `${indicatorLeft}px`; this._indicator.style.width = `${linkElement.offsetWidth}px`; } /** * Handle click. * @param {Event} event The event that fired. * @private */ _onClick(event) { if (event.target.classList.contains(CLASS_ITEM) && !event.target.classList.contains(CLASS_IS_DISABLED)) { this._repositionIndicator(event.target); } } } ================================================ FILE: src/pagination/snippets/pagination.html ================================================ ================================================ FILE: src/player/README.md ================================================ ## Introduction The Audi UI (AUI) **player** component is … (text follows) ### To include an AUI **player** component: ```html ``` ================================================ FILE: src/player/_player.scss ================================================ $aui-player-font-size: 12px !default; $aui-player-chrome-height: 60px !default; $aui-player-chrome-seeking-height: 101px !default; .aui-player { position: relative; overflow: hidden; width: 100%; height: 0; padding-bottom: #{100% / 16 * 9}; color: $aui-color-white; background-color: $aui-color-black; background-position: center; background-repeat: no-repeat; background-size: cover; &-related-container { z-index: 1; display: flex; align-items: center; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(#000, .5); overflow: hidden; } &-related-container__replay { position: absolute; left: 5%; bottom: 19px; .audiicon { width: 100%; height: 100%; } } &-related-grid { display: flex; flex-flow: row nowrap; width: 90%; margin: 0 auto; overflow: hidden; &__cell { display: block; flex: 1 1 auto; width: 1px; margin: 0 unit(1) 0 0; &:last-child { margin-right: 0; } } } &-related-content { display: block; width: 100%; padding: 0; outline: none; color: inherit; background: none; border: 0 none; @include aui-font-size-line-height(-2, 1.2); font-weight: $aui-font-weight-normal; letter-spacing: -0.015em; text-align: left; cursor: pointer; &__image { display: block; width: 100%; height: auto; } &__title { display: block; margin-top: unit(2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-wrap: normal; padding-right: unit(4); } } &__overlay { position: absolute; background: rgba(#000, .5); top: 0; bottom: 0; left: 0; right: 0; } &__large-button { $icon-size-large: 44px; position: absolute; left: 50%; top: 50%; width: $icon-size-large; height: $icon-size-large; border: 1px solid $aui-color-white; transform: translate(-50%, -50%); .audiicon { position: absolute; left: #{($icon-size-large - $aui-icon-size-small) / 2}; top: #{($icon-size-large - $aui-icon-size-small) / 2}; width: $aui-icon-size-small; height: $aui-icon-size-small; } } &__large-button, &__overlay { transition: opacity .2s linear .5s; } &.is-playing &__large-button, &.is-playing &__overlay { opacity: 0; } &:hover &__large-button, &:hover &__overlay { transition: opacity .2s linear; opacity: 1; } &__chrome { z-index: 3; display: flex; flex-flow: row nowrap; align-items: center; position: absolute; left: 0; bottom: 0; width: 100%; height: $aui-player-chrome-height; padding: 0 5%; font-size: rem($aui-player-font-size); transform: translateY(100%); transition: transform .4s $aui-easing; &::after { content: ''; display: block; position: absolute; bottom: 0; left: 0; width: 100%; height: $aui-player-chrome-height; background-color: rgba(#000, .6); transition: height .2s $aui-easing .1s; z-index: -1; } } &__current-time, &__duration, &__fullscreen, &__mute, &__play { flex: 0 0 auto; } &__progress-control { flex: 1 1 auto; } &__current-time, &__duration { transform: translateY(em(1, $aui-player-font-size)); } &__current-time { margin-left: unit(2); margin-right: unit(1); &:first-child { margin-left: 0; } } &__duration { margin-left: unit(1); margin-right: unit(2); &:last-child { margin-right: 0; } } &__progress-control { position: relative; height: 100%; } &__progress-holder { position: absolute; top: 50%; width: 100%; height: 1px; background-color: $aui-color-gray30; } &__progress { position: absolute; left: 0; top: 0; width: 100%; height: 100%; &--loading { background-color: $aui-color-gray50; } &--progress { background-color: $aui-color-white; } } &__mute + &__fullscreen { margin-left: unit(2); } &__playhead { position: absolute; left: 0; top: 0; width: unit(3); height: unit(3); border: 1px solid $aui-color-white; border-radius: 50%; transform: translate(-50%, -50%); background-color: $aui-color-gray20; z-index: 1; } &__seek-holder { position: absolute; top: 0; left: 0; width: 0; height: 100%; opacity: 0; transition: opacity .2s linear; } &__seek-marker { position: absolute; top: #{unit(3) / -2}; right: 0; width: 1px; height: unit(3); background-color: $aui-color-white; } &__seek-time { position: absolute; bottom: 7px; right: 0; line-height: 2em; transform: translateX(50%); z-index: 1; } &__preview { display: none; position: absolute; right: 0; transform: translateX(50%); opacity: 0; transition: opacity .2s linear; } &__preview-image { width: 80px; height: 0; padding-bottom: 56.25%; background-position: center; background-size: cover; } // Icons &__icon-exit-fullscreen, &__icon-pause, &__icon-replay, &__icon-unmute { display: none; } &--preview { .aui-player__preview, .aui-player__seek-time { bottom: 17px; } .aui-player__preview { display: block; } } /** * States */ &.is-controlled &__chrome, &:hover &__chrome { transform: translateY(0); } &.is-seeking { .aui-player__seek-holder { opacity: 1; transition-delay: .1s; } .aui-player__preview { opacity: 1; transition-delay: .1s; } } &.is-seeking.aui-player--preview { .aui-player__chrome::after { height: $aui-player-chrome-seeking-height; transition-delay: 0s; } } &.is-mute { .aui-player__icon-mute { display: none; } .aui-player__icon-unmute { display: inline-block; } } &.is-playing { .aui-player__icon-play { display: none; } .aui-player__icon-pause { display: inline-block; } } &.is-complete { .aui-player__icon-pause, .aui-player__icon-play { display: none; } .aui-player__icon-replay { display: inline-block; } } &.is-fullscreen, &:fullscreen { .aui-player__icon-enter-fullscreen { visibility: hidden; } .aui-player__icon-exit-fullscreen { visibility: visible; } } /** * Responsiveness */ @include aui-respond-to(xsmall) { &__large-button { $icon-size-large: 72px; width: $icon-size-large; height: $icon-size-large; .audiicon { left: #{($icon-size-large - $aui-icon-size-large) / 2}; top: #{($icon-size-large - $aui-icon-size-large) / 2}; width: $aui-icon-size-large; height: $aui-icon-size-large; } .audiicon-small { visibility: hidden; } .audiicon-large { visibility: visible; } } } $aui-player-chrome-height: 120px; $aui-player-chrome-seeking-height: 182px; @include aui-respond-to(large) { &__chrome { font-size: rem(16); height: $aui-player-chrome-height; &::after { height: $aui-player-chrome-height; } .aui-button--icon { width: $aui-icon-system-size-large; height: $aui-icon-system-size-large; .audiicon { left: -1px; top: -1px; width: $aui-icon-size-large; height: $aui-icon-size-large; } .audiicon-small { visibility: hidden; } .audiicon-large { visibility: visible; } } } &__current-time { margin-left: unit(10); margin-right: unit(5); } &__duration { margin-left: unit(5); margin-right: unit(10); } &__mute + &__fullscreen { margin-left: unit(5); } &__playhead { width: unit(5); height: unit(5); } &__seek-time { bottom: 20px; } &__seek-marker { top: #{unit(5) / -2}; height: unit(5); } &__preview-image { // width: 112px; // height: 63px; width: 128px; height: 72px; // width: 144px; // height: 81px; // width: 160px; // height: 90px; } &-related-container__replay { bottom: 38px; width: 44px; height: 44px; } .audiicon-small { visibility: hidden; } .audiicon-large { visibility: visible; } &.aui-player--preview { .aui-player__preview, .aui-player__seek-time { bottom: 31px; } } &.is-seeking.aui-player--preview { .aui-player__chrome::after { height: $aui-player-chrome-seeking-height; } } } @include aui-respond-to(large) { &-related-content { font-family: $aui-font-extended; font-variation-settings: $aui-font-extended-width; @include aui-font-size-line-height(-1, 1.4); } } $aui-player-chrome-seeking-height: 200px; @include aui-respond-to(large) { &-related-content { @include aui-font-size-line-height(0, 1.4); } &__preview-image { width: 160px; height: 90px; } &.is-seeking.aui-player--preview { .aui-player__chrome::after { height: $aui-player-chrome-seeking-height; } } } } ================================================ FILE: src/player/player.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-player'; const SELECTOR_PROGRESS_CONTROL = '.aui-player__progress-control'; const SELECTOR_SEEK_HOLDER = '.aui-player__seek-holder'; const SELECTOR_PREVIEW = '.aui-player__preview'; const CLASS_SEEKING = 'is-seeking'; /** * Class constructor for Player AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Player extends Component { /** * Upgrades all Player AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Player(element)); } }); return components; }; constructor(element) { super(element); this._progressControl = this._element.querySelector(SELECTOR_PROGRESS_CONTROL); if (this._progressControl) { this._progressControl.addEventListener('mouseover', this.progressControlOverListener = event => this.progressControlOverHandler(event)); this._progressControl.addEventListener('mouseout', this.progressControlOutListener = event => this.progressControlOutHandler(event)); this._seekHolder = this._progressControl.querySelector(SELECTOR_SEEK_HOLDER); } this._preview = this._element.querySelector(SELECTOR_PREVIEW); } progressControlOverHandler(event) { this._progressControl.removeEventListener('mousemove', this.moveListener); this._progressControl.addEventListener('mousemove', this.progressControlMoveListener = event => this.progressControlMoveHandler(event)); this._element.classList.add(CLASS_SEEKING); this.updateSeek(event.clientX); } progressControlMoveHandler(event) { this.updateSeek(event.clientX); } progressControlOutHandler(event) { this._element.classList.remove(CLASS_SEEKING); } updateSeek() { // Translate trigger position x to ratio of progress control width let boundings = this._progressControl.getBoundingClientRect(), offsetX = event.clientX - boundings.left, ratio = offsetX / this._progressControl.offsetWidth, ratioPercentStr; ratio = Math.max(0, Math.min(ratio, 1)); ratioPercentStr = `${ratio * 100}%` this._seekHolder.style.width = ratioPercentStr; } } ================================================ FILE: src/player/snippets/player_chrome.html ================================================
00:00
00:00
00:00
================================================ FILE: src/player/snippets/player_large-button.html ================================================ ================================================ FILE: src/player/snippets/player_overlay.html ================================================
================================================ FILE: src/player/snippets/player_related-container.html ================================================ ================================================ FILE: src/player/snippets/player_video-container.html ================================================
================================================ FILE: src/popover/README.md ================================================ ## Introduction The Audi UI (AUI) **Popover** component is … (text follows) ### To include an AUI **Popover** component: ```html ``` ## Configuration options The AUI CSS classes and attributes apply various predefined visual and behavioral enhancements to the popover. The tables below lists the available classes/attributes and their effects. | AUI class | Effect | Remarks | |-----------|--------|---------| | `aui-popover` | Defines button as an AUI button component | Required | | `aui-js-popover` | Assigns basic AUI behavior to popover | Required | | AUI attribute | Type | Default | Description | |---------------|------|---------|-------------| | `for` | String | null | ID of element which toggles popover. | | `data-placement` | String | 'top' | How to position the popover: top, right, bottom, left. | | `data-arrow-color` | String | null | A valid value used for fill attribute of arrow shape. See https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint; As default the background-color of the `aui-popover__content` element is used as fill. | ================================================ FILE: src/popover/_popover.scss ================================================ $aui-popover-arrow-size: 10px !default; $aui-popover-offset: 2px !default; $aui-popover-offset-window: 4% !default; $aui-popover-content-margin: $aui-popover-offset + $aui-popover-arrow-size !default; /** * Prevent zooming of body, when popover is open. * Added to body by JS. */ .aui-popover-is-open { overflow-x: hidden; } .aui-popover { display: block; position: absolute; top: 0; left: 0; padding: $aui-popover-offset; width: 0; height: 0; font-size: unit(3.5); line-height: unit(5); text-align: left; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .15s linear, visibility .15s linear; z-index: $aui-zindex-popover; &.aui-tether-enabled { // width: 100% - $aui-popover-offset-window; width: 90vw; max-width: 22em; height: auto; overflow: visible; visibility: visible; } &__content { position: relative; @include shadow; } &__content:not([class^="aui-color-"]):not([class*=" aui-color-"]) { // NOTE Add a color class to element to define a background-color, // otherwise fall back to white as default. background-color: $aui-color-white; } &__text { display: block; position: relative; padding: unit(4); // Overlay arrow icon: background-color: inherit; z-index: 1; } &__media { display: block; position: relative; width: 100%; height: auto; z-index: 1; } &__arrow { display: block; position: absolute; top: 50%; left: 50%; // Because we draw a diamond square ◆ double the size: width: $aui-popover-arrow-size * 2; height: $aui-popover-arrow-size * 2; fill: $aui-color-white; transform: translate(-50%, -50%); } &__arrow-shape { display: block; } // Element attached top &.aui-tether-element-attached-top { margin-top: $aui-popover-content-margin; .aui-popover__arrow { top: 0; } } // Element attached bottom &.aui-tether-element-attached-bottom { margin-top: -$aui-popover-content-margin; .aui-popover__arrow { top: 100%; } } // Element attached left &.aui-tether-element-attached-left { padding-left: $aui-popover-content-margin; .aui-popover__arrow { left: 0; } } // Element attached right &.aui-tether-element-attached-right { padding-right: $aui-popover-content-margin; .aui-popover__arrow { left: 100%; } } // Pinned left (and element attached middle) // HACK fix positioning of Tether &.aui-tether-element-attached-middle.aui-tether-pinned-right { left: 0 !important; // [1] padding-right: $aui-popover-content-margin; .aui-popover__arrow { left: 100%; } } // Pinned right (and element attached middle) // HACK [1] fix positioning of Tether &.aui-tether-element-attached-middle.aui-tether-pinned-left { right: 0; // [1] left: auto !important; // [1] padding-left: $aui-popover-content-margin; .aui-popover__arrow { left: 0; } } /** * States */ &.is-shown { opacity: 1; visibility: visible; transition-duration: .25s; } } ================================================ FILE: src/popover/popover.js ================================================ import Component from '../component/component'; import reflow from '../util/reflow'; import closest from '../util/closest'; import transitionend from '../util/transition-end-event'; import Tether from 'tether'; const SELECTOR_COMPONENT = '.aui-js-popover'; const SELECTOR_DISMISS = '[data-dismiss="popover"]'; const CLASS_ARROW = 'aui-popover__arrow'; const CLASS_ARROW_SHAPE = 'aui-popover__arrow-shape'; const CLASS_ACTIVE = 'is-active'; const CLASS_SHOWN = 'is-shown'; const CLASS_POPOVER_IS_OPEN = 'aui-popover-is-open'; const ARROW_SIZE = 20; const AttachmentMap = { top: 'bottom center', right: 'middle left', bottom: 'top center', left: 'middle right' } /** * Class constructor for Popover AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Popover extends Component { /** * Upgrades all Popover AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Popover(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); this._body = document.querySelector('body'); this._id = this._element.getAttribute('id'); this._trigger = document.getElementById(this._element.getAttribute('for')); this._tether = null; const placement = this._element.hasAttribute('data-placement') ? this._element.getAttribute('data-placement') : 'top'; this._attachement = AttachmentMap[placement.toLowerCase()]; const content = this._element.querySelector('.aui-popover__content'); const arrowColor = this._element.hasAttribute('data-arrow-color') ? this._element.getAttribute('data-arrow-color') : window.getComputedStyle(content).backgroundColor; this._arrow = this._addArrow(content, arrowColor); if (this._trigger) { this._trigger.addEventListener('click', this._boundClickHandler = (event) => this.toggle(event)); } } /** * Dispose component */ dispose() { super.dispose(); this.hide(); this.removeChild(this._arrow); if (this._trigger) { this._trigger.removeEventListener('click', this._boundClickHandler); } } /** * Toggle show/hide Popover * @param {Event} event Click event of trigger element (optional) */ toggle(event) { const performToggle = () => { if (!this._element.classList.contains(CLASS_ACTIVE) && this._tether) { this.show(); } else { this.hide(); } }; if (event) { event.preventDefault(); if (this._tether === null) { this._tether = new Tether({ element: this._element, target: event.currentTarget, attachment: this._attachement, classPrefix: 'aui-tether', // NOTE We set an offset in CSS, because this offset wouln't be // flipped as it should: // https://github.com/HubSpot/tether/issues/106 offset: '0 0', constraints: [{ to: 'window', pin: ['left', 'right'], attachment: 'together' }], optimizations: { gpu: false } }); reflow(this._element); // REVIEW Do we need this anymore? this._tether.position(); } performToggle(); } else { performToggle(); } } /** * Show Popover */ show() { this._body.classList.add(CLASS_POPOVER_IS_OPEN); this._element.classList.add(CLASS_ACTIVE); this._element.classList.add(CLASS_SHOWN); setTimeout(() => { window.addEventListener('click', this._boundWindowClickHandler = (event) => this._onClickOutside(event)); }) } /** * Hide Popover */ hide() { this._element.classList.remove(CLASS_SHOWN); this._element.addEventListener(transitionend, this._boundAnimationendHandler = (event) => this._onHideComplete(event)); window.removeEventListener('click', this._boundWindowClickHandler); } /** * Clean up Tether instance * @private */ _cleanupTether() { if (this._tether) { this._tether.destroy(); this._tether = null; } this._element.removeAttribute('style'); } /** * Handle click of window. * @param {Event} event The event that fired. * @private */ _onClickOutside(event) { // Hide if target dismisses Popover if (closest(event.target, SELECTOR_DISMISS, this._element)) { this.hide(); // Hide if target is not inside Popover and is not a trigger element } else if (!this._element.contains(event.target) && event.target !== this._trigger) { this.hide(); } } /** * Handle hide transition complete. * @param {Event} event The event that fired. * @private */ _onHideComplete(event) { this._body.classList.remove(CLASS_POPOVER_IS_OPEN); this._element.classList.remove(CLASS_ACTIVE); this._element.removeEventListener(transitionend, this._boundAnimationendHandler); this._cleanupTether(); } /** * Adds an arrow SVG element * * * @param {HTMLElement} parent element to append arrow to. * @param {string} color used as value of fill property. * @returns {HTMLElement} the added arrow element. */ _addArrow(parent, color) { const element = document.createElement('span'); element.classList.add(CLASS_ARROW); const svg = this.createSvgNode('svg', { class: CLASS_ARROW_SHAPE, width: ARROW_SIZE, height: ARROW_SIZE, viewBox: `0 0 ${ARROW_SIZE} ${ARROW_SIZE}` }); // Draw a diamond square ◆ const path = this.createSvgNode('path', { d: `M${ARROW_SIZE / 2} 0 L ${ARROW_SIZE} ${ARROW_SIZE / 2} L ${ARROW_SIZE / 2} ${ARROW_SIZE} L 0 ${ARROW_SIZE / 2} Z`, fill: color }); svg.appendChild(path); element.appendChild(svg); parent.appendChild(element); return element; } } ================================================ FILE: src/popover/snippets/popover-dark.html ================================================ ================================================ FILE: src/popover/snippets/popover-image.html ================================================ ================================================ FILE: src/popover/snippets/popover.html ================================================ ================================================ FILE: src/progress/_progress-themes.scss ================================================ $aui-progress-color: rgba(#fff, .3); .aui-progress { &.aui-theme-light { background: $aui-progress-color; } } ================================================ FILE: src/progress/_progress.scss ================================================ $aui-progress-color: $aui-color-gray90 !default; $aui-progress-color-progress: $aui-color-progressive-red !default; .aui-progress { position: relative; height: unit(1); background: $aui-progress-color; overflow: hidden; &__bar { display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; background: $aui-progress-color-progress; transform-origin: 0% 0%; } &--continuous &__bar { animation: aui-progress 1s cubic-bezier(0.85, 0, 1, 1) 0s infinite normal none running; } } @keyframes aui-progress { 0% { transform: translateX(0%) scaleX(0); } 50% { transform: translateX(20%) scaleX(0.5); animation-timing-function: cubic-bezier(0, 0, 0, 1); } 100% { transform: translateX(100%) scaleX(0.5); } } ================================================ FILE: src/progress/progress.js ================================================ import Component from '../component/component'; import limit from '../util/limit'; const SELECTOR_COMPONENT = '.aui-js-progress'; const CLASS_CONTINUOUS = 'aui-progress--continuous'; const CLASS_BAR = 'aui-progress__bar'; const CLASS_IS_PENDING = 'is-pending'; const CLASS_IS_LOADING = 'is-loading'; const CLASS_IS_COMPLETE = 'is-complete'; /** * Class constructor for Progress AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Progress extends Component { /** * Upgrades all Progress AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Progress(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._continuous = this._element.classList.contains(CLASS_CONTINUOUS); // Add bar elements: this._bar = document.createElement('span'); this._bar.classList.add(CLASS_BAR); this._element.appendChild(this._bar); this.progress(0); } progress(ratio) { ratio = limit(ratio, 0, 1); this._progress = ratio; if (!this._continuous) { this._bar.style.width = `${this._progress * 100}%`; } this.updateClasses(); } updateClasses() { if (this._progress === 0) { this._element.classList.add(CLASS_IS_PENDING); } else { this._element.classList.remove(CLASS_IS_PENDING); } if (this._progress > 0 && this._progress < 1) { this._element.classList.add(CLASS_IS_LOADING); } else { this._element.classList.remove(CLASS_IS_LOADING); } if (this._progress === 1) { this._element.classList.add(CLASS_IS_COMPLETE); } else { this._element.classList.remove(CLASS_IS_COMPLETE); } } } ================================================ FILE: src/progress/snippets/continuous-progress.html ================================================
================================================ FILE: src/progress/snippets/progress.html ================================================
================================================ FILE: src/radio/README.md ================================================ ## Introduction The Audi UI (AUI) **radio** component is … (text follows) ### To include an AUI **radio** component: ================================================ FILE: src/radio/_radio-themes.scss ================================================ $aui-radio-light-color-text: $aui-color-gray95 !default; $aui-radio-light-color-text-hover: $aui-color-white !default; $aui-radio-light-color-border: $aui-color-gray50 !default; $aui-radio-light-color-border-hover: $aui-color-white !default; $aui-radio-light-color-tick: rgba(#fff, 0.2) !default; $aui-radio-light-color-tick-active: $aui-color-black !default; .aui-radio { /** * Theme: light */ &.aui-theme-light { color: $aui-radio-light-color-text; .aui-radio__box { border-color: $aui-radio-light-color-border; } .aui-radio__tick { background: $aui-radio-light-color-tick; } // Hover state &:hover:not(.is-disabled) { color: $aui-radio-light-color-text-hover; .aui-radio__box { border-color: $aui-radio-light-color-border-hover; } } // Focus state .aui-radio__input:focus ~ .aui-radio__box { @include shadow-focus-light; } // Checked state &.is-checked .aui-radio__tick { background: $aui-radio-light-color-tick-active; } } } ================================================ FILE: src/radio/_radio.scss ================================================ $aui-radio-box-width: 1.5em !default; $aui-radio-tick-scale: 8 / 12 / $aui-circle-smoothing-factor !default; $aui-radio-tick-scale-hover: 10 / 12 / $aui-circle-smoothing-factor !default; $aui-radio-tick-scale-active: 1 / $aui-circle-smoothing-factor !default; $aui-radio-tick-size: .75em * $aui-circle-smoothing-factor !default; $aui-radio-text-spacing: 1em !default; $aui-radio-color-text: $aui-color-gray20 !default; $aui-radio-color-text-hover: $aui-color-black !default; $aui-radio-color-border: $aui-color-gray50 !default; $aui-radio-color-border-hover: $aui-color-black !default; $aui-radio-color-tick: $aui-color-gray85 !default; $aui-radio-color-tick-active: $aui-color-black !default; .aui-radio { display: inline-block; position: relative; font-weight: $aui-font-weight-normal; line-height: $aui-field-line-height; color: $aui-radio-color-text; cursor: pointer; @include aui-remove-tap-highlight; .aui-js & { padding-left: $aui-radio-box-width + $aui-radio-text-spacing; } .aui-js &__input { // Visually hide input @extend %aui-hidden-input; } &__hint { display: block; margin-top: unit(2); font-size: rem(13); line-height: unit(5); } &__box { display: none; overflow: hidden; position: absolute; top: 0; left: 0; width: $aui-radio-box-width; height: $aui-radio-box-width; border: 1px solid $aui-radio-color-border; border-radius: 50%; transition: box-shadow .15s linear, border .15s linear; cursor: pointer; pointer-events: none; z-index: 1; .aui-js & { display: inline-block; } } &__tick { display: block; position: absolute; top: 50%; left: 50%; width: $aui-radio-tick-size; height: $aui-radio-tick-size; transform: translate(-50%, -50%) scale($aui-radio-tick-scale, $aui-radio-tick-scale); border-radius: 50%; background: $aui-radio-color-tick; transition: transform .15s $aui-easing, background .15s linear; pointer-events: none; } // Hover state &:hover:not(.is-disabled) { color: $aui-radio-color-text-hover; .aui-radio__box { border-color: $aui-radio-color-border-hover; } .aui-radio__tick { transform: translate(-50%, -50%) scale($aui-radio-tick-scale-hover, $aui-radio-tick-scale-hover); } } // Focus state // &__input:focus ~ .aui-radio__box { // @include shadow-focus; // } // Disabled state &.is-disabled { //opacity: $aui-field-disabled-opacity; color: $aui-color-gray40; cursor: not-allowed; } // Checked state &.is-checked &__tick { background: $aui-radio-color-tick-active; transform: translate(-50%, -50%) scale($aui-radio-tick-scale-active, $aui-radio-tick-scale-active); } } ================================================ FILE: src/radio/radio.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-radio'; const CLASS_INPUT = 'aui-radio__input'; const CLASS_LABEL = 'aui-radio__label'; const CLASS_BOX = 'aui-radio__box'; const CLASS_TICK = 'aui-radio__tick'; const CLASS_IS_FOCUS = 'is-focused'; const CLASS_IS_CHECKED = 'is-checked'; const CLASS_IS_DISABLED = 'is-disabled'; let _radios; /** * Class constructor for Radio AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Radio extends Component { /** * Upgrades all Radio AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Radio(element)); } }); _radios = components; return components; }; init() { super.init(); this._input = this._element.querySelector(`.${CLASS_INPUT}`); this._input.addEventListener('change', this._changeHandler = (event) => this._onChange(event)); this._input.addEventListener('focus', this._focusHandler = (event) => this._onFocus(event)); this._input.addEventListener('blur', this._blurHandler = (event) => this._onBlur(event)); // Insert box with tick after label element: this._label = this._element.querySelector(`.${CLASS_LABEL}`); let box = document.createElement('span'); box.classList.add(CLASS_BOX); this._label.parentNode.insertBefore(box, this._label.nextSibling); let tick = document.createElement('span'); tick.classList.add(CLASS_TICK); box.appendChild(tick); this.groupName = this._input.getAttribute('name'); this.updateClasses(); } updateClasses() { this.checkDisabled(); this.checkToggleState(); this.checkFocus(); } /** * Check the disabled state and update field accordingly. */ checkDisabled() { if (this._input.disabled) { this._element.classList.add(CLASS_IS_DISABLED); } else { this._element.classList.remove(CLASS_IS_DISABLED); } } /** * Check the toggle state and update field accordingly. */ checkToggleState() { // Remove all graphical 'is-active' states before re-applying to actual clicked radio button Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(e => { e.classList.remove(CLASS_IS_CHECKED); }); if (this._input.checked) { this._element.classList.add(CLASS_IS_CHECKED); } else { this._element.classList.remove(CLASS_IS_CHECKED); } } /** * Check the focus state and update field accordingly. */ checkFocus() { if (Boolean(this._element.querySelector(':focus'))) { this._element.classList.add(CLASS_IS_FOCUS); } else { this._element.classList.remove(CLASS_IS_FOCUS); } } /** * Enable radio. */ enable() { this._input.disabled = false; this.updateClasses(); } /** * Disable radio. */ disable() { this._input.disabled = true; this.updateClasses(); } /** * Check radio. */ check() { this._input.checked = true; this.updateClasses(); } /** * Uncheck radio. */ uncheck() { this._input.checked = false; this.updateClasses(); } /** * Dispose component */ dispose() { super.dispose(); this._input.removeEventListener('change', this._changeHandler); this._input.removeEventListener('focus', this._focusHandler); this._input.removeEventListener('blur', this._blurHandler); this._element.removeChild(this._element.querySelector(`.${CLASS_BOX}`)); } /** * Handle change event. * @param {Event} event that fired. */ _onChange(event) { this.updateClasses(); // Since other radio buttons don't get change events, we need to look for // them to update their classes. for (var i = 0; i < _radios.length; i++) { var button = _radios[i]; // Different name == different group, so no point updating those. if (button._input.getAttribute('name') === this.groupName) { button.updateClasses(); } } } // TODO Find out why unfocus is triggered on mousedown _onFocus(event) { this._element.classList.add(CLASS_IS_FOCUS); } _onBlur(event) { this._element.classList.remove(CLASS_IS_FOCUS); } /** * Getter and Setter */ get input() { return this._input; } get checked() { return this._input.checked = true; } set checked(value) { if (value) { this.check(); } else { this.uncheck(); } } get disabled() { return this._input.disabled = true; } set disabled(value) { if (value) { this.disable(); } else { this.enable(); } } } ================================================ FILE: src/radio/snippets/radio-checked-disabled.html ================================================ ================================================ FILE: src/radio/snippets/radio-checked.html ================================================ ================================================ FILE: src/radio/snippets/radio-disabled.html ================================================ ================================================ FILE: src/radio/snippets/radio.html ================================================ ================================================ FILE: src/requirements.scss ================================================ // The Audi-UI Kit is made to work alongside a CSS cross browser normalization. // Our suggestion to do so is Normalize.css. It makes browsers render all // elements more consistently and in line with modern standards. It precisely // targets only the styles that need normalizing. // https://necolas.github.io/normalize.css/ @import '../node_modules/normalize.css/normalize'; // The Audi UI Kit assumes {box-sizing: border-box} *, *::before, *::after { box-sizing: inherit; } html { box-sizing: border-box; // For a better rendering of the Audi Type: -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } // Additional resets: h1, h2, h3, h4, h5, h6, p, ol, ul, table { font-size: inherit; font-weight: inherit; line-height: inherit; margin: 0; } a { color: inherit; text-decoration: none; } i, em { // Because there's no italic font style of Audi Type font-style: normal; } ================================================ FILE: src/response/README.md ================================================ ## Introduction The Audi UI (AUI) **response** component is … (text follows) ### To include an AUI **response** component: ```html ``` ================================================ FILE: src/response/_response.scss ================================================ $aui-response-duration: 0.6s !default; .aui-response { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none; &__effect { $size: 40px; content: ''; display: block; position: absolute; width: $size; height: $size; margin: ($size / -2) 0 0 ($size / -2); border-radius: 50%; &--large { $size: 60px; width: $size; height: $size; margin: ($size / -2) 0 0 ($size / -2); } } &--masked { overflow: hidden; } &.is-animating &__effect { animation: aui-response-dark $aui-response-duration $aui-easing both; } &.aui-theme-light.is-animating &__effect, .aui-button.aui-theme-light &.is-animating &__effect { animation: aui-response-light $aui-response-duration $aui-easing both; } } /** * Invert effect, when used with Primary Button */ .aui-button--primary .aui-response.is-animating .aui-response__effect { animation: aui-response-light $aui-response-duration $aui-easing both; } .aui-button--primary.aui-theme-light .aui-response.is-animating .aui-response__effect { animation: aui-response-dark $aui-response-duration $aui-easing both; } /** * Animations */ @keyframes aui-response-dark { 0% { opacity: 1; box-shadow: inset 0 0 0 30px rgba($aui-color-gray60, 0.3); transform: scale3d(0.01, 0.01, 1); } 100% { opacity: 0; box-shadow: inset 0 0 0 1px rgba($aui-color-gray60, 1); transform: scale3d(1.7, 1.7, 1); } } @keyframes aui-response-light { 0% { opacity: 1; box-shadow: inset 0 0 0 30px rgba($aui-color-white, 0.3); transform: scale3d(0.01, 0.01, 1); } 100% { opacity: 0; box-shadow: inset 0 0 0 1px rgba($aui-color-white, 0.7); transform: scale3d(1.7, 1.7, 1); } } ================================================ FILE: src/response/response.js ================================================ import Component from '../component/component'; import animationEndEvent from '../util/animation-end-event'; const SELECTOR_COMPONENT = '.aui-js-response'; const CLASS_BUTTON_PRIMARY = 'aui-button--primary'; const CLASS_BUTTON_SECONDARY = 'aui-button--secondary'; const CLASS_BUTTON_ICON = 'aui-button--icon'; const CLASS_BUTTON_FLOATING = 'aui-button--floating'; const CLASS_RESPONSE = 'aui-response'; const CLASS_RESPONSE_MASKED = 'aui-response--masked'; const CLASS_EFFECT = 'aui-response__effect'; const CLASS_EFFECT_LARGE = 'aui-response__effect--large'; const CLASS_IS_ANIMATING = 'is-animating'; const CLASS_IS_DISABLED = 'is-disabled'; /** * Class constructor for Response AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Response extends Component { /** * Upgrades all Response AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Response(element)); } }); return components; }; /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component */ init() { super.init(); let boxedButton = this._element.classList.contains(CLASS_BUTTON_PRIMARY) || this._element.classList.contains(CLASS_BUTTON_SECONDARY) || this._element.classList.contains(CLASS_BUTTON_FLOATING); this._useTriggerX = boxedButton || !this._element.classList.contains(CLASS_BUTTON_ICON); this._useTriggerY = boxedButton; this._masked = boxedButton; this._large = boxedButton; this._responseContainer = document.createElement('span'); this._responseContainer.classList.add(CLASS_RESPONSE); if (this._masked) { this._responseContainer.classList.add(CLASS_RESPONSE_MASKED); } this._element.appendChild(this._responseContainer); this._responseEffect = document.createElement('span'); this._responseEffect.classList.add(CLASS_EFFECT); if (this._large) { this._responseEffect.classList.add(CLASS_EFFECT_LARGE); } this._responseContainer.appendChild(this._responseEffect); this._element.addEventListener('mousedown', this._mousedownHandler = (event) => this._onMousedown(event)); animationEndEvent && this._responseEffect.addEventListener(animationEndEvent, this._animationendHandler = (event) => this._onAnimationend(event)); } /** * Dispose component */ dispose() { super.dispose(); this._element.removeEventListener('mousedown', this._mousedownHandler); if (animationEndEvent && this._responseEffect) { this._responseEffect.removeEventListener(animationEndEvent, this._animationendHandler); } this._element.removeChild(this._responseContainer); } /** * Handle mousedown of element. * @param {Event} event The event that fired. * @private */ _onMousedown(event) { // Get cross-browser offsetX, offsetY let target = event.currentTarget || event.srcElement, rect = target.getBoundingClientRect(), offsetX = event.clientX - rect.left, offsetY = event.clientY - rect.top; if (!target.classList.contains(CLASS_IS_DISABLED)) { this._responseEffect.style.left = this._useTriggerX ? `${offsetX}px` : '50%'; this._responseEffect.style.top = this._useTriggerY ? `${offsetY}px` : '50%'; this._responseContainer.classList.add(CLASS_IS_ANIMATING); } } /** * Handle animationend of element. * @param {Event} event The event that fired. * @private */ _onAnimationend(event) { this._responseContainer.classList.remove(CLASS_IS_ANIMATING); } } ================================================ FILE: src/select/_select-themes.scss ================================================ $aui-select-light-color: $aui-color-gray95 !default; $aui-select-light-color-secondary: $aui-color-gray50 !default; $aui-select-light-border: $aui-color-gray50 !default; $aui-select-light-border-hover: $aui-color-black !default; $aui-select-light-border-focus: $aui-color-black !default; $aui-select-light-border-dirty: $aui-color-black !default; $aui-select-light-color-arrow: $aui-field-placeholder-color-light !default; $aui-select-light-color-arrow-dirty: $aui-select-light-color !default; $aui-select-light-panel-background: $aui-color-black !default; .aui-select { /** * Theme: light */ &.aui-theme-light { .aui-select__input { color: $aui-field-placeholder-color-light; border-color: $aui-select-light-border; // HACK IE: Use placeholder color, if default value is selected. &::-ms-value { color: $aui-field-placeholder-color-light; } } .aui-select__label { color: $aui-field-placeholder-color-light; } // Arrow icon &::after { background: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-select-light-color-arrow)}') center center no-repeat; } .aui-select__focus-line { background: $aui-select-light-border-hover; } .aui-select__description, .aui-select__error { color: $aui-select-light-color-secondary; } .aui-select__error { color: $aui-field-error-color; } /** * States */ // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-select__input:hover { border-color: $aui-select-light-border-hover; } } // Dirty state &.is-dirty { // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-select-light-color-arrow-dirty)}'); } .aui-select__input { border-color: $aui-select-light-border-dirty; color: $aui-select-light-color; // Style color on IE10+ when selected &::-ms-value { color: $aui-select-light-color; } } } // Invalid state &.is-invalid { &, .aui-select__label, &:not(.is-dirty) .aui-select__input { color: $aui-field-error-color; } // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-field-error-color)}'); } .aui-select__input { border-color: $aui-field-error-color; } .aui-select__focus-line { background: $aui-field-error-color; } } } } ================================================ FILE: src/select/_select.scss ================================================ $aui-select-arrow-width: 13px; $aui-select-arrow-top-default: $aui-field-default-height * .525; // Center with label $aui-select-color: $aui-color-dark; $aui-select-color-secondary: $aui-color-gray40; $aui-select-border: $aui-color-gray50; $aui-select-border-hover: $aui-color-black; $aui-select-border-focus: $aui-color-black; $aui-select-border-dirty: $aui-color-black; $aui-select-color-arrow: $aui-field-placeholder-color; $aui-select-color-arrow-dirty: $aui-select-color; .aui-select { display: block; position: relative; margin: 0; padding: 0; padding-top: $aui-field-floating-label-padding; font-size: 1rem; line-height: $aui-field-line-height; box-sizing: border-box; &:hover { .aui-select__focus-line { background: $aui-select-border-hover; } } &__input { display: block; margin: 0; padding-right: #{rem($aui-select-arrow-width) + unit(2)}; width: 100%; min-height: $aui-field-default-height; font-family: $aui-font-default; font-size: inherit; font-weight: $aui-font-weight-normal; line-height: inherit; color: $aui-field-placeholder-color; background: none; border: none; border-bottom: 1px solid $aui-select-border; border-radius: 0; box-shadow: none; transition: color, border; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; appearance: none; outline: 0; // HACK IE: Remove arrow. &::-ms-expand { display: none; } // HACK [1] IE: Remove blue background when selected. // HACK [2] IE: Use placeholder color, if default value is selected. &::-ms-value { background: none; // [1] color: $aui-field-placeholder-color; // [2] } // HACK Firefox, IE: Fix styling on backgrounds other than white. option { color: $aui-select-color; background: white; &:disabled { color: $aui-field-placeholder-color; } } // NOTE Don't use this kind of a hack to remove the dotted outline in Mozilla. // color: transparent; // text-shadow: 0 0 0 #333; } // HACK Firefox: Fix vertical aligment. // https://bugzilla.mozilla.org/show_bug.cgi?id=610733 @-moz-document url-prefix() { .aui-select__input { padding-top: (9 / 16 * 1em); } } &__label { display: block; position: absolute; top: $aui-field-label-y; right: 0; bottom: 0; left: 0; width: 100%; color: $aui-field-placeholder-color; font-size: inherit; font-weight: $aui-font-weight-normal; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition-property: top, font-size, color, opacity; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; opacity: 1; pointer-events: none; } // Arrow icon &::after { content: ''; display: block; position: absolute; //top: $aui-select-arrow-top-default; top: $aui-select-arrow-top-default + $aui-field-floating-label-padding; right: 0; width: $aui-select-arrow-width; height: 8px; background: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-select-color-arrow)}') center center no-repeat; transform: translateY(-50%); transition: background .25s linear; pointer-events: none; } // Focus line will be injected by JS &__focus-line { display: block; position: relative; width: 100%; margin-top: -1px; height: 1px; background: $aui-select-border; opacity: 1; transition-property: background; transition-duration: $aui-field-transition-duration; } &__description { display: block; color: $aui-select-color-secondary; transition: color $aui-field-transition-duration linear; margin-top: unit(3.5); font-size: rem(13); line-height: $aui-field-error-line-height; } &__error { display: flex; align-items: center; line-height: $aui-field-error-line-height; margin-top: unit(3.5); font-size: rem(13); color: $aui-field-error-color; &::before { content: ''; display: inline-block; margin-right: rem(16px); width: 40px; height: 24px; background: url('data:image/svg+xml,#{aui-svg-caution($aui-field-error-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2); width: 24px; height: 24px; } } } /** * Variant: floating-label */ // &.aui-select--floating-label { // // padding-top: $aui-field-floating-label-padding; // // Arrow icon // &::after { // top: $aui-select-arrow-top-default + $aui-field-floating-label-padding; // } // } .aui-js &.aui-select--floating-label &__label { top: $aui-field-label-y + $aui-field-floating-label-padding + 0.0925rem; } &.aui-select--floating-label { .aui-select__input { opacity: 0; &:focus, &:not(:focus) { opacity: 1; } } // Arrow icon &::after { top: $aui-select-arrow-top-default + $aui-field-floating-label-padding; } } /** * States */ // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-select__input:hover { border-color: $aui-select-border-hover; } } // Focus state &.is-focused { .aui-select__label { opacity: 0; } &.aui-select--floating-label .aui-select__label { top: 0; font-size: .75rem; opacity: 1; } .aui-select__input { outline: none; box-shadow: none; border-color: $aui-select-border-focus; } .aui-select__focus-line { //opacity: 1; opacity: 0; } } // Disabled state &.is-disabled { //opacity: $aui-field-disabled-opacity; color: $aui-color-gray40; cursor: not-allowed; .aui-select__input { cursor: not-allowed; } .aui-select__focus-line { opacity: 1; } } // Dirty state &.is-dirty { &::after { // Arrow icon background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-select-color-arrow-dirty)}'); } .aui-select__label { opacity: 0; } &.aui-select--floating-label .aui-select__label { top: 0; font-size: .75rem; opacity: 1; } .aui-select__input { border-color: $aui-select-border-dirty; color: $aui-select-color; // Style color on IE10+ when selected &::-ms-value { color: $aui-select-color; } } } // Invalid state &.is-invalid { &, &:not(.is-dirty) .aui-select__input, .aui-select__label { color: $aui-field-error-color; } // Arrow icon &::after { background-image: url('data:image/svg+xml,#{aui-svg-dropdown-arrow($aui-field-error-color)}'); } .aui-select__input { border-color: $aui-field-error-color; } .aui-select__focus-line { background: $aui-field-error-color; } } } ================================================ FILE: src/select/select.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-select'; const CLASS_INPUT = 'aui-select__input'; const CLASS_LABEL = 'aui-select__label'; const CLASS_FOCUS_LINE = 'aui-select__focus-line'; const CLASS_IS_FOCUS = 'is-focused'; const CLASS_IS_DIRTY = 'is-dirty'; const CLASS_IS_DISABLED = 'is-disabled'; /** * Class constructor for Select AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Select extends Component { /** * Upgrades all Select AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Select(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._label = this._element.querySelector(`.${CLASS_LABEL}`); this._input = this._element.querySelector(`.${CLASS_INPUT}`); this._input.addEventListener('change', this._changeHandler = (event) => this._onChange(event)); this._input.addEventListener('focus', this._focusHandler = (event) => this._onFocus(event)); this._input.addEventListener('blur', this._blurHandler = (event) => this._onBlur(event)); this._input.addEventListener('reset', this._resetHandler = (event) => this._onReset(event)); // Insert thick focus line after select element: let focusLine = document.createElement('span'); focusLine.classList.add(CLASS_FOCUS_LINE); this._label.parentNode.insertBefore(focusLine, this._label.nextSibling); this.updateClasses(); } updateClasses() { this.checkDisabled(); this.checkDirty(); this.checkFocus(); } /** * Check the disabled state and update field accordingly. */ checkDisabled() { if (this._input.disabled) { this._element.classList.add(CLASS_IS_DISABLED); } else { this._element.classList.remove(CLASS_IS_DISABLED); } } /** * Check the dirty state and update field accordingly. */ checkDirty() { // console.log('value', this._input.value, typeof this._input.value); // console.log('options', this._input.options[this._input.selectedIndex].disabled); if (!this._input.options[this._input.selectedIndex].disabled) { this._element.classList.add(CLASS_IS_DIRTY); } else { this._element.classList.remove(CLASS_IS_DIRTY); } } /** * Check the focus state and update field accordingly. */ checkFocus() { if (Boolean(this._element.querySelector(':focus'))) { this._element.classList.add(CLASS_IS_FOCUS); } else { this._element.classList.remove(CLASS_IS_FOCUS); } } /** * Disable text field. */ disable() { this._input.disabled = true; this.updateClasses(); } /** * Event Handler */ _onChange(event) { this.updateClasses(); } _onFocus(event) { this._element.classList.add(CLASS_IS_FOCUS); } _onBlur(event) { this._element.classList.remove(CLASS_IS_FOCUS); } _onReset(event) { this.updateClasses(); } } ================================================ FILE: src/select/snippets/select-disabled.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/select/snippets/select-invalid.html ================================================
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/select/snippets/select.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/slider/_slider-themes.scss ================================================ .aui-slider { /** * Theme: black */ &.aui-theme-black { $aui-slider-color-text: $aui-color-gray80; $aui-slider-color-track: $aui-color-gray20; $aui-slider-color-track-active: $aui-color-white; $aui-slider-color-thumb: $aui-color-black; $aui-slider-color-thumb-border: $aui-color-gray50; $aui-slider-color-thumb-border-hover: $aui-slider-color-track-active; color: $aui-slider-color-text; .aui-slider__target { &::after { background: $aui-slider-color-track; } } .aui-slider__connect { &::after { background: $aui-slider-color-track-active; } } .aui-slider__handle { background: $aui-slider-color-thumb; border-color: $aui-slider-color-thumb-border; } &:not(.is-disabled) .aui-slider__handle:hover { border-color: $aui-slider-color-thumb-border-hover; } } /** * Theme: silver */ &.aui-theme-silver { $aui-slider-color-text: $aui-color-black; $aui-slider-color-track: #c1c1c1; $aui-slider-color-track-active: $aui-color-white; $aui-slider-color-thumb: $aui-color-silver; $aui-slider-color-thumb-border: #d9d9d9; $aui-slider-color-thumb-border-hover: $aui-slider-color-track-active; color: $aui-slider-color-text; .aui-slider__target { &::after { background: $aui-slider-color-track; } } .aui-slider__connect { &::after { background: $aui-slider-color-track-active; } } .aui-slider__handle { background: $aui-slider-color-thumb; border-color: $aui-slider-color-thumb-border; } &:not(.is-disabled) .aui-slider__handle:hover { border-color: $aui-slider-color-thumb-border-hover; } } /** * Theme: warmsilver */ &.aui-theme-warmsilver { $aui-slider-color-text: $aui-color-black; $aui-slider-color-track: #c5c1ba; $aui-slider-color-track-active: $aui-color-white; $aui-slider-color-thumb: $aui-color-warmsilver; $aui-slider-color-thumb-border: #dbd8d4; $aui-slider-color-thumb-border-hover: $aui-slider-color-track-active; color: $aui-slider-color-text; .aui-slider__target { &::after { background: $aui-slider-color-track; } } .aui-slider__connect { &::after { background: $aui-slider-color-track-active; } } .aui-slider__handle { background: $aui-slider-color-thumb; border-color: $aui-slider-color-thumb-border; } &:not(.is-disabled) .aui-slider__handle:hover { border-color: $aui-slider-color-thumb-border-hover; } } } ================================================ FILE: src/slider/_slider.scss ================================================ /** * NOTE * The Slider AUI component relies on the 3rd party library * noUiSlider by Leon Gersen * @see https://refreshless.com/nouislider/ */ $aui-slider-handle-size: unit(6) !default; $aui-slider-handle-offset: $aui-slider-handle-size / 2; $aui-slider-track-size: 2px; $aui-slider-color-text: $aui-color-gray20 !default; $aui-slider-color-disabled: $aui-color-gray40 !default; $aui-slider-color-track: $aui-color-gray80 !default; $aui-slider-color-track-active: $aui-color-black !default; $aui-slider-color-thumb: $aui-color-white !default; $aui-slider-color-thumb-border: $aui-color-gray50 !default; $aui-slider-color-thumb-border-hover: $aui-slider-color-track-active !default; .aui-slider { position: relative; padding: 0; min-height: $aui-slider-handle-size; color: $aui-slider-color-text; display: flex; flex-direction: column; &__label { order: -2; font-size: rem(12); color: $aui-slider-color-disabled; margin-bottom: 1rem; } &__rangeOutput { order: -1; position: relative; align-self: center; font-size: modular-scale(-1); } /** * Customized noUiSlider Styles */ // Functional styling &__target, &__target * { -webkit-touch-callout: none; -webkit-tap-highlight-color: $aui-color-black; touch-action: none; user-select: none; box-sizing: border-box; } &__target { position: relative; direction: ltr; } &__base { width: 100%; height: 100%; position: relative; z-index: 1; } &__connect { position: absolute; right: 0; top: 0; left: 0; bottom: 0; } &__origin { position: absolute; height: 0; width: 0; } &__handle { position: relative; z-index: 1; } &__state-tap &__connect, &__state-tap &__origin { transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; } &__state-drag * { cursor: inherit !important; } // Painting and performance // Browsers can paint handles in their own layer. &__base, &__handle { transform: translate3d(0, 0, 0); } // Slider size and handle placement &__horizontal { height: $aui-slider-track-size; } &__vertical { // width: 18px; width: $aui-slider-track-size; } // Styling &__target { margin: 0 $aui-slider-handle-offset; height: $aui-slider-handle-size; &::after { content: ''; display: block; position: absolute; top: 50%; left: 0; right: 0; height: $aui-slider-track-size; margin: 0 #{$aui-slider-handle-offset * -1}; transform: translateY(-50%); background: $aui-slider-color-track; } } &__connect { &::after { content: ''; display: block; position: absolute; top: 50%; left: 0; right: 0; height: $aui-slider-track-size; transform: translateY(-50%); background: $aui-slider-color-track-active; } } &.aui-slider--single &__connect::after{ margin-left: #{$aui-slider-handle-offset * -1}; } // Handles and cursors &__draggable { cursor: ew-resize; } &__vertical &__draggable { cursor: ns-resize; } &__handle { position: relative; width: $aui-slider-handle-size; height: $aui-slider-handle-size; background: $aui-slider-color-thumb; border-radius: 50%; border: 1px solid $aui-slider-color-thumb-border; transform: translateX(-50%); transition: border .15s linear; cursor: pointer; } &.aui-slider--output &__origin::before{ position: absolute; top: -35px; transform: translateX(-50%); font-size: modular-scale(-1); display: block; content: attr(data-before); } &:not(.is-disabled) &__handle:hover { border-color: $aui-slider-color-thumb-border-hover; } &__active { } &__handle[disabled], [disabled] &__handle, [disabled] &__target { cursor: not-allowed; } // Base &__pips, &__pips * { box-sizing: border-box; } &__pips { position: absolute; color: #999; } // Values &__value { position: absolute; text-align: center; } &__value-sub { color: #ccc; font-size: 10px; } &__range { display: flex; justify-content: space-between; font-size: rem(12); } // Markings &__marker { position: absolute; background: #CCC; } &__marker-sub { background: #AAA; } &__marker-large { background: #AAA; } // Horizontal layout &__pips-horizontal { padding: 10px 0; height: 80px; top: 100%; left: 0; width: 100%; } &__value-horizontal { transform: translate3d(-50%, 50%, 0); } &__marker-horizontal.aui-slider__marker { margin-left: -1px; width: 2px; height: 5px; } &__marker-horizontal.aui-slider__marker-sub { height: 10px; } &__marker-horizontal.aui-slider__marker-large { height: 15px; } // Vertical layout &__pips-vertical { padding: 0 10px; height: 100%; top: 0; left: 100%; } &__value-vertical { transform: translate3d(0, 50%, 0); padding-left: 25px; } &__marker-vertical.aui-slider__marker { width: 5px; height: 2px; margin-top: -1px; } &__marker-vertical.aui-slider__marker-sub { width: 10px; } &__marker-vertical.aui-slider__marker-large { width: 15px; } &__tooltip { display: block; position: absolute; border: 1px solid #D9D9D9; border-radius: 3px; background: #fff; color: #000; padding: 5px; text-align: center; } &__horizontal &__tooltip { transform: translate(-50%, 0); left: 50%; bottom: 120%; } &__vertical &__tooltip { transform: translate(0, -50%); top: 50%; right: 120%; } /** * Variants */ &--output { .aui-slider__label { margin-bottom: 2rem; } } /** * States */ // Disabled state &.is-disabled { //opacity: $aui-field-disabled-opacity; cursor: not-allowed; .aui-slider__connect::after { background-color: $aui-color-gray70; } .aui-slider__target::after { background-color: $aui-color-gray90; } .aui-slider__handle, .aui-slider__draggable { cursor: not-allowed; } } } ================================================ FILE: src/slider/slider.js ================================================ /** * NOTE Slider AUI components rely on the 3rd party library noUiSlider. * @see https://github.com/leongersen/noUiSlider */ import Component from '../component/component'; import limit from '../util/limit'; import mapLinear from '../util/map-linear'; import ResizeObserver from '../util/resize-observer'; import noUiSlider from 'nouislider'; const SELECTOR_COMPONENT = '.aui-js-slider'; const SELECTOR_HIDDEN_FIELD = '.aui-slider__hidden-field'; const SELECTOR_OUTPUT = '.aui-slider__output'; const SELECTOR_RANGE_OUTPUT = '.aui-slider__rangeOutput'; const SELECTOR_RANGE_MIN = '.aui-slider__range-min'; const SELECTOR_RANGE_MAX = '.aui-slider__range-max'; const SELECTOR_ORIGIN = '.aui-slider__origin'; const CLASS_COMPONENT = 'aui-slider'; const CLASS_IS_DISABLED = 'is-disabled'; const EVENT_NAMESPACE = CLASS_COMPONENT; /** * Class constructor for Slider AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Slider extends Component { /** * Upgrades all Slider AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Slider(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); // Save reference to component elements this._hiddenField = this._element.querySelector(SELECTOR_HIDDEN_FIELD); this._output = this._element.querySelector(SELECTOR_OUTPUT); this._rangeOutput = this._element.querySelector(SELECTOR_RANGE_OUTPUT); this._rangeMinOutput = this._element.querySelector(SELECTOR_RANGE_MIN); this._rangeMaxOutput = this._element.querySelector(SELECTOR_RANGE_MAX); // Create slider container element this._slider = document.createElement('div'); this._element.insertBefore(this._slider, this._element.firstChild); // Parse and save start and range values: this._value = this._parseData(this._hiddenField.value); this._rangeMin = this._parseData(this._element.getAttribute('data-min')); this._rangeMax = this._parseData(this._element.getAttribute('data-max')); // Create noUiSlider instance noUiSlider.create(this._slider, { // Set the start value defined in the hidden field. // https://refreshless.com/nouislider/slider-options/#section-start start: this._value, // Set the range as defined in the data attributes // https://refreshless.com/nouislider/slider-values/#section-range range: { min: this._rangeMin, max: this._rangeMax }, // If there are two handles, set the bar between the handles, but not // between the handles and the sliders edges. If there is only one handle, // set the bar from the slider edge to the handle. // https://refreshless.com/nouislider/slider-options/#section-Connect connect: this._value.length > 1 ? true : [true, false], // Define behaviour depending on number of handles // https://refreshless.com/nouislider/behaviour-option/ behaviour: this._value.length > 1 ? 'tap-drag' : 'tap', // Use AUI namespace for css classes // https://refreshless.com/nouislider/more/#section-styling cssPrefix: `${CLASS_COMPONENT}__` }); this._slider.noUiSlider.on(`update.${EVENT_NAMESPACE}`, (values, handle, unencoded, tap, positions) => this._onUpdate(values, handle, unencoded, tap, positions)); if (this._output || this._rangeOutput) { this._resizeObserver = new ResizeObserver(); this._rangeMinOutput.innerHTML = this._rangeMin; this._rangeMaxOutput.innerHTML = this._rangeMax; } if (this._element.classList.contains(CLASS_IS_DISABLED)) { this.disable(); } } /** * Dispose component */ dispose() { if (this._slider) { this._slider.noUiSlider.off(`.${EVENT_NAMESPACE}`); } if (this._resizeObserver) { this._resizeObserver.resized.remove(this._resizedHandler); this._resizeObserver = null; } } /** * Enable component */ enable() { this._element.classList.remove(CLASS_IS_DISABLED); this._slider.removeAttribute('disabled'); } /** * Disable component */ disable() { this._element.classList.add(CLASS_IS_DISABLED); this._slider.setAttribute('disabled', true); } /** * Handle on update * @param {Array} values Current slider values * @param {Integer} handle Handle that caused the event 0 or 1 * @param {Array} unencoded Slider values without formatting * @param {boolean} tap Event was caused by the user tapping the slider * @param {Array} positions Left offset of the handles in relation to the slider */ _onUpdate(values, handle, unencoded, tap, positions) { if (this._hiddenField) { this._hiddenField.value = unencoded; } // Display slider value above slider handle if (this._output) { this._origin = this._element.querySelector(SELECTOR_ORIGIN); this._origin.setAttribute('data-before', parseInt(values[0])); } // Position output to center of slider handles if (this._rangeOutput) { this._rangeOutput.innerHTML = values.length > 1 ? `${parseInt(values[0])} to ${parseInt(values[1])}` : `${parseInt(values[0])}`; } } /** * Center output bewteen handles. */ // _centerOutput() { // const unencoded = this._slider.noUiSlider.get(); // const sliderAverage = typeof unencoded === 'object' // ? unencoded.reduce((previousValue, currentValue) => { // return previousValue + parseFloat(currentValue); // }, 0) / unencoded.length // : parseFloat(unencoded); // const maxRight = this._element.offsetWidth - this._rangeOutput.offsetWidth; // const handleSize = this._slider.offsetHeight; // const position = mapLinear(sliderAverage, this._rangeMin, this._rangeMax, 0, 1) * this._slider.offsetWidth - this._rangeOutput.offsetWidth / 2 + handleSize / 2; // this._rangeOutput.style.left = `${limit(position, 0, maxRight)}px`; // } /** * Parse data to use with noUiSlider * Returns given value as array of floats * "0,100" => [0,100] * @param {string} value Current slider values * @returns {Array} values as floats */ _parseData(value) { return value && value.split(',').map(element => parseFloat(element)); } } ================================================ FILE: src/slider/snippets/slider-disabled.html ================================================
Slider label
================================================ FILE: src/slider/snippets/slider-output.html ================================================
Slider label
min
max
================================================ FILE: src/slider/snippets/slider-range-disabled.html ================================================
Slider label
min
max
================================================ FILE: src/slider/snippets/slider-range.html ================================================
Slider label
min
max
================================================ FILE: src/spinner/_spinner-themes.scss ================================================ $aui-spinner-color: rgba(#fff, .6); .aui-spinner { &.aui-theme-light { stroke: $aui-spinner-color; } } ================================================ FILE: src/spinner/_spinner.scss ================================================ /** * NOTE * All animations happen in JS. */ $aui-spinner-color: $aui-color-gray90 !default; $aui-spinner-color-progress: $aui-color-progressive-red !default; $aui-spinner-size: rem(92) !default; $aui-spinner-size-continuous: rem(48) !default; .aui-spinner { display: inline-block; position: relative; width: $aui-spinner-size; height: $aui-spinner-size; stroke: $aui-spinner-color; font-size: 1rem; &__svg { overflow: visible !important; // fix cut off edges width: 100%; height: 100%; } &__path { stroke-miterlimit: 10; stroke-width: 4px; fill: none; } &__path--progress { stroke: $aui-spinner-color-progress; stroke-width: 4px; } &__value { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; font-family: $aui-font-extended; font-variation-settings: $aui-font-extended-width; font-size: 1rem; line-height: 1; text-align: center; } &--continuous { width: $aui-spinner-size-continuous; height: $aui-spinner-size-continuous; } } ================================================ FILE: src/spinner/snippets/continuous-spinner.html ================================================
================================================ FILE: src/spinner/snippets/spinner.html ================================================
================================================ FILE: src/spinner/spinner.js ================================================ import Component from '../component/component'; import ObjectResize from '../util/object-resize'; import limit from '../util/limit'; import bezierEasing from 'bezier-easing'; const SELECTOR_COMPONENT = '.aui-js-spinner'; const CLASS_CONTINUOUS = 'aui-spinner--continuous'; const CLASS_SHAPE = 'aui-spinner__svg'; const CLASS_PATH = 'aui-spinner__path'; const CLASS_PATH_PROGRESS = 'aui-spinner__path--progress'; const CLASS_GROUP = 'aui-spinner__group'; const CLASS_GROUP_BASE_PATH = 'aui-spinner__group-base'; const CLASS_GROUP_PROGRESS_PATH = 'aui-spinner__group-progress'; const CLASS_VALUE = 'aui-spinner__value'; const CLASS_IS_PENDING = 'is-pending'; const CLASS_IS_LOADING = 'is-loading'; const CLASS_IS_COMPLETE = 'is-complete'; const SIZE = 48; const RADIUS = 22; const STROKE_WIDTH = 3; const LOOP_ANIMATION_DURATION = 1.5; const LOOP_ANIMATION = [ { dashLength: 0, dashOffset: 0, rotate: 0, },{ dashLength: 0.65, dashOffset: -1, rotate: 360, } ]; /** * Class constructor for Spinner AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Spinner extends Component { /** * Upgrades all Spinner AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Spinner(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._objectResize = new ObjectResize(this._element, this.resize, this); this._continuous = this._element.classList.contains(CLASS_CONTINUOUS); // Add value element, if required: if (!this._continuous) { this._value = document.createElement('span'); this._value.classList.add(CLASS_VALUE); this._element.appendChild(this._value); } // Add SVG graphic: // // // // // // let shape = this.createSvgNode('svg', { class: CLASS_SHAPE, viewBox: `0 0 ${SIZE} ${SIZE}`, }); let group = this.createSvgNode('g', {class: CLASS_GROUP}); let groupCircle1 = this.createSvgNode('g', {class: CLASS_GROUP_BASE_PATH}); let groupCircle2 = this.createSvgNode('g', {class: CLASS_GROUP_PROGRESS_PATH}); let circle1 = this.createSvgNode('circle', { class: CLASS_PATH, cx: 0, cy: 0, r: RADIUS }); let circle2 = this.createSvgNode('circle', { class: `${CLASS_PATH} ${CLASS_PATH_PROGRESS}`, cx: 0, cy: 0, r: RADIUS, transform: 'rotate(-90)', }); groupCircle1.appendChild(circle1); groupCircle2.appendChild(circle2); group.appendChild(groupCircle1); group.appendChild(groupCircle2); shape.appendChild(group); this._element.appendChild(shape); this._shape = shape; this._group = group; this._progressPath = circle2; this._basePath = circle1; this._groupProgress = groupCircle2; this._easing = bezierEasing(0.75, 0.02, 0.5, 1); this._easingDasharray = bezierEasing(0.4, 0, 0, 1); this._progressPath.style.strokeOpacity = 0; this.resize(); this.progress(0); } progress(ratio) { ratio = limit(ratio, 0, 1); this._progress = ratio; const pathLength = this._getCircleLength(this._progressPath); if (!this._continuous) { this._progressPath.style.strokeDasharray = this._progress === 1 ? 'none' : `${this._progress * pathLength}, ${pathLength}`; this._progressPath.style.strokeOpacity = this._progress === 0 ? 0 : 1; } if (this._value) { this._value.innerHTML = `${Math.round(this._progress * 100)}`; } this._updateClasses(); } loop() { if (this._continuous) { this._progressPath.style.strokeOpacity = 1; window.requestAnimationFrame(timestamp => this._animateLoop(timestamp)); } } stop() {} resize() { const size = this._element.offsetWidth; const radius = (size - STROKE_WIDTH) / 2; this._shape.setAttributeNS(null, 'viewBox', `${size / -2} ${size / -2} ${size} ${size}`); this._basePath.setAttributeNS(null, 'r', `${radius}`); this._progressPath.setAttributeNS(null, 'r', `${radius}`); } // TODO Optimize calculations; wording. _animateLoop(timestamp) { if (!this._loopStart) { this._loopStart = timestamp; } // The progress in seconds 0 <= progress <= LOOP_ANIMATION_DURATION let progress = (timestamp - this._loopStart) / 1000; // The progress ratio between 0 <= progressRatio <= 1 let progressRatio = (progress / LOOP_ANIMATION_DURATION); if (progressRatio > 1 || progressRatio === 0) { this._animationEndSet = false; progress = 0; progressRatio = 0; this._loopStart = timestamp; this._dashLengthStart = LOOP_ANIMATION[0].dashLength; this._dashOffsetStart = LOOP_ANIMATION[0].dashOffset; this._dashLengthEnd = LOOP_ANIMATION[1].dashLength; this._dashOffsetEnd = LOOP_ANIMATION[1].dashOffset; } const ease = this._easing(progressRatio); const pathLength = this._getCircleLength(this._progressPath); this._dashLengthRatio = this._dashLengthStart + (this._dashLengthEnd - this._dashLengthStart) * this._easingDasharray(progressRatio); this._dashOffsetRatio = this._dashOffsetStart + (this._dashOffsetEnd - this._dashOffsetStart) * ease; this._rotate = LOOP_ANIMATION[1].rotate * ease; const dashLength = pathLength * this._dashLengthRatio; const dashOffset = pathLength * this._dashOffsetRatio; this._progressPath.style.strokeDasharray = `${dashLength}, ${pathLength}`; this._progressPath.style.strokeDashoffset = `${dashOffset}`; // this._group.setAttributeNS(null, 'transform', `rotate(${this._rotate})`); this._groupProgress.setAttributeNS(null, 'transform', `rotate(${this._rotate})`); window.requestAnimationFrame(timestamp => this._animateLoop(timestamp)); } _updateClasses() { if (this._progress === 0) { this._element.classList.add(CLASS_IS_PENDING); } else { this._element.classList.remove(CLASS_IS_PENDING); } if (this._progress > 0 && this._progress < 1) { this._element.classList.add(CLASS_IS_LOADING); } else { this._element.classList.remove(CLASS_IS_LOADING); } if (this._progress === 1) { this._element.classList.add(CLASS_IS_COMPLETE); } else { this._element.classList.remove(CLASS_IS_COMPLETE); } } _getCircleLength(circle) { const r = circle.getAttribute('r'); return 2 * Math.PI * r; } } ================================================ FILE: src/sr-only/README.md ================================================ ## Introduction The Audi UI (AUI) **sr-only** component hides an element to all devices except screen readers. ### To include an AUI **sr-only** component:  1. Code whatever element you want to hide. ```html Hide to all devices except screen readers ```  2. Add AUI class, to the element using the `class` attribute. ```html Hidden to all devices except screen readers ``` The sr-only component is ready for use. ================================================ FILE: src/sr-only/_sr-only.scss ================================================ // Screen reader only, Credits: // http://getbootstrap.com/css/#helper-classes-screen-readers .aui-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; } ================================================ FILE: src/sticky/sticky.js ================================================ import Component from '../component/component'; import ScrollObserver from '../util/scroll-observer'; const CLASS_IS_STICKY = 'is-sticky'; /** * Class constructor for Sticky AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Sticky extends Component { /** * Constructor * @constructor * @param {HTMLElement} element The element of the AUI component. */ constructor(element) { super(element); } /** * Initialize component. */ init() { super.init(); // If browser supports position:sticky, it will handle positioning and // we can skip here. if (window.getComputedStyle(this._element).position.indexOf('sticky') !== -1) { return; } this._scrollObserver = new ScrollObserver(); this._scrollObserver.scrolled.add(this._scrollHandler = () => this.checkStickiness()); this._sticky = false; this.checkStickiness(); } /** * Dispose component. */ dispose() { super.dispose(); this.release(); this._scrollObserver.resized.remove(this._scrollHandler); this._resizeObserver.resized.remove(this._resizedHandler); } /** * Check if position.top is negative. If so stick otherwise release component. */ checkStickiness() { if (this._element.getBoundingClientRect().top <= 0) { if (!this._sticky) { this.stick(); } } else { if (this._sticky) { this.release(); } } } /** * Stick component to top of viewport in adding sticky class. */ stick() { if (!this._sticky) { this._element.classList.add(CLASS_IS_STICKY); } this._sticky = true; } /** * Release component and position not fixed in removing sticky class. */ release() { if (this._sticky) { this._element.classList.remove(CLASS_IS_STICKY); } this._sticky = false; } } ================================================ FILE: src/switch/README.md ================================================ --- title: Switch --- ## Introduction The Audi UI (AUI) **switch** component is … (text follows) ### To include an AUI **switch** component: ```html ``` ================================================ FILE: src/switch/_switch-themes.scss ================================================ $aui-switch-light-color-text: $aui-color-gray95 !default; $aui-switch-light-color-text-hover: $aui-color-white !default; $aui-switch-light-color-text-inactive: $aui-color-gray50 !default; $aui-switch-light-color-track-border: $aui-color-gray50 !default; $aui-switch-light-color-track-border-hover: $aui-color-white !default; $aui-switch-light-color-thumb: rgba(#fff, 0.2) !default; $aui-switch-light-color-thumb-active: $aui-color-black !default; .aui-switch { /** * Theme: light */ &.aui-theme-light { .aui-switch__text { color: $aui-switch-light-color-text; } .aui-switch__track { border-color: $aui-switch-light-color-track-border; } .aui-switch__thumb { background: $aui-switch-light-color-thumb; } &.aui-switch--equal { .aui-switch__text--right { color: $aui-switch-light-color-text-inactive; } .aui-switch__thumb { background: $aui-switch-light-color-thumb-active; } } // Hover state &:hover:not(.is-disabled) { .aui-switch__text { color: $aui-switch-light-color-text-hover; } .aui-switch__track { border-color: $aui-switch-light-color-track-border-hover; } } &.aui-switch--equal:hover:not(.is-disabled) .aui-switch__text--right { color: $aui-switch-light-color-text-inactive; } &.aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--left { color: $aui-switch-light-color-text-inactive; } &.aui-switch--equal:hover:not(.is-disabled) .aui-switch__input:checked ~ .aui-switch__text--right { color: $aui-switch-light-color-text-hover; } // Focus state .aui-switch__input:focus ~ .aui-switch__track { @include shadow-focus-light; } // Checked state .aui-switch__input:checked ~ .aui-switch__track .aui-switch__thumb { background: $aui-switch-light-color-thumb-active; } &.aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--left { color: $aui-switch-light-color-text-inactive; } &.aui-switch--equal .aui-switch__input:checked ~ .aui-switch__text--right { color: $aui-switch-light-color-text; } } } ================================================ FILE: src/switch/_switch.scss ================================================ //$aui-switch-track-width: 2.9em !default; $aui-switch-track-width: 3.63em !default; //$aui-switch-track-height: 1.6em !default; $aui-switch-track-height: 2em !default; $aui-switch-track-spacing: 1em !default; $aui-switch-thumb-scale: 1 / $aui-circle-smoothing-factor !default; $aui-switch-thumb-scale-hover: 8 / 10 / $aui-circle-smoothing-factor !default; $aui-switch-thumb-scale-active: 1 / $aui-circle-smoothing-factor !default; $aui-switch-thumb-size: 1.63em * $aui-circle-smoothing-factor !default; //$aui-switch-thumb-size: 26px !default; $aui-switch-color-text: $aui-color-gray20 !default; $aui-switch-color-text-hover: $aui-color-black !default; $aui-switch-color-text-inactive: $aui-color-gray40 !default; $aui-switch-color-track-background: $aui-color-gray85; $aui-switch-color-track-background-active: $aui-color-green; $aui-switch-color-track-border: $aui-color-gray40 !default; $aui-switch-color-track-border-hover: $aui-color-black !default; $aui-switch-color-thumb: $aui-color-white !default; $aui-switch-color-thumb-active: $aui-color-white !default; .aui-switch { cursor: pointer; display: flex; align-items: center; position: relative; font-weight: $aui-font-weight-normal; height: $aui-switch-track-height; // Because track is positioned `absolute`, the element would have a width of 0 // when there's no text label. min-width: $aui-switch-track-width; cursor: pointer; @include aui-remove-tap-highlight; // Ensure positioning of track, when there's no text label. &::after { content: '.'; display: inline-block; width: 0; visibility: hidden; } // Visually hide input .aui-switch__input { @extend %aui-hidden-input; } &__text { display: inline-block; padding-left: #{$aui-switch-track-width + $aui-switch-track-spacing}; color: $aui-switch-color-text; transition: all 250ms $aui-easing; } &__track { display: inline-block; position: absolute; // top: .125em; left: 0; width: $aui-switch-track-width; height: $aui-switch-track-height; // border: 1px solid $aui-switch-color-track-border; border-radius: #{$aui-switch-track-height / 2}; vertical-align: middle; background-color: $aui-switch-color-track-background; transition: all .15s linear, border .15s linear; } &__thumb { display: inline-block; position: absolute; z-index: 10; top: 50%; //left: .75em; left: 1em; width: $aui-switch-thumb-size; height: $aui-switch-thumb-size; border-radius: 50%; transform: translate(-50%, -50%) scale($aui-switch-thumb-scale, $aui-switch-thumb-scale); background: $aui-switch-color-thumb; transition: transform .15s $aui-easing, left .3s $aui-easing, background .3s $aui-easing; } &__indicator { position: absolute; top: 50%; transform: translateY(-50%); &--on { //left: 1.75em; width: 1px; height: 8px; background-color: $aui-color-white; transition: transform .15s $aui-easing, opacity .15s $aui-easing; } &--off { width: 6px; height: 6px; border-radius: 50%; border: 1px solid $aui-color-gray50; right: 0.75em; transition: transform .15s $aui-easing, opacity .15s $aui-easing; } } /** * Variant: text-left */ &--text-left { .aui-switch__text { padding-left: 0; padding-right: #{$aui-switch-track-width + $aui-switch-track-spacing}; } .aui-switch__track { left: auto; right: 0; } } /** * Variant: equal */ &--equal { display: inline-flex; .aui-switch__text { padding-left: 0; padding-right: 0; flex: 1 1 auto; order: 1; } .aui-switch__text--left { margin-right: $aui-switch-track-spacing; } .aui-switch__text--right { order: 3; color: $aui-switch-color-text-inactive; margin-left: $aui-switch-track-spacing; } .aui-switch__track { position: relative; // top: auto; left: auto; flex: 0 0 $aui-switch-track-width; order: 2; } .aui-switch__thumb { background: $aui-switch-color-thumb-active; transform: translate(-50%, -50%) scale($aui-switch-thumb-scale-active, $aui-switch-thumb-scale-active); } } /** * States */ // Hover state &:hover:not(.is-disabled) { .aui-switch__text { color: $aui-switch-color-text-hover; } .aui-switch__track { border-color: $aui-switch-color-track-border-hover; .aui-switch__thumb { transform: translate(-50%, -50%) scale($aui-switch-thumb-scale-hover, $aui-switch-thumb-scale-hover); } } } &--equal:hover:not(.is-disabled) .aui-switch__text--right { color: $aui-switch-color-text-inactive; } &--equal:hover:not(.is-disabled) &__input:checked ~ .aui-switch__text--left { color: $aui-switch-color-text-inactive; } &--equal:hover:not(.is-disabled) &__input:checked ~ .aui-switch__text--right { color: $aui-switch-color-text-hover; } // Focus state // &__input:focus ~ .aui-switch__track { // @include shadow-focus; // } // Disabled state &.is-disabled { opacity: $aui-field-disabled-opacity; cursor: not-allowed; } // Checked state &__input:checked ~ &__track { background: $aui-switch-color-track-background-active; } &__input:checked ~ &__track { .aui-switch__indicator--on { //left: 1.05em; opacity: 1; transform: translate(1.05em, -50%); } .aui-switch__indicator--off { transform: translate(-0.7em, -50%); //right: 0.75em; opacity: 0; } } // Unchecked state &__input:not(:checked) ~ &__track { .aui-switch__indicator--on { opacity: 0; transform: translate(1.75em, -50%); } .aui-switch__indicator--off { opacity: 1; transform: translate(0, -50%); } } &__input:checked ~ &__track &__thumb { background: $aui-switch-color-thumb-active; transform: translate(-50%, -50%) scale($aui-switch-thumb-scale-active, $aui-switch-thumb-scale-active); //left: 2.125em; left: 2.65em; } &--equal &__input:checked ~ .aui-switch__text--left { color: $aui-switch-color-text-inactive; } &--equal &__input:checked ~ .aui-switch__text--right { color: $aui-switch-color-text; } } ================================================ FILE: src/switch/snippets/switch-checked-disabled.html ================================================ ================================================ FILE: src/switch/snippets/switch-checked.html ================================================ ================================================ FILE: src/switch/snippets/switch-disabled.html ================================================ ================================================ FILE: src/switch/snippets/switch-equal-checked-disabled.html ================================================ ================================================ FILE: src/switch/snippets/switch-equal-disabled.html ================================================ ================================================ FILE: src/switch/snippets/switch-equal.html ================================================ ================================================ FILE: src/switch/snippets/switch-text-left-disabled.html ================================================ ================================================ FILE: src/switch/snippets/switch-text-left.html ================================================ ================================================ FILE: src/switch/snippets/switch-without-text.html ================================================ ================================================ FILE: src/switch/snippets/switch.html ================================================ ================================================ FILE: src/table/README.md ================================================ ## Introduction The Audi UI (AUI) **table** component is … (text follows) ### To include an AUI **table** component: ================================================ FILE: src/table/_table-themes.scss ================================================ $aui-table-border-color-light: $aui-color-white !default; $aui-table-background-color-light: rgba(#fff, .2); .aui-table { /** * Theme: light */ &.aui-theme-light { table { border-color: $aui-table-border-color-light; } th { border-top-color: $aui-table-border-color-light; } td { border-top-color: $aui-table-border-color-light; } .aui-table__cell--colored { background-color: $aui-table-background-color-light; } .aui-table__cell--last-row td::after { border-color: $aui-table-border-color-light; } } } ================================================ FILE: src/table/_table.scss ================================================ $aui-table-border-width-title: 3px !default; $aui-table-border-width: 1px !default; $aui-table-border-color: $aui-color-black !default; $aui-table-background-color: $aui-color-gray85 !default; $aui-table-gutters: unit(2) !default; $aui-table-cell-padding-x: unit(3) !default; $aui-table-cell-padding-y: unit(4) !default; .aui-table { width: calc(100% + #{2 * $aui-table-gutters}); margin-left: #{$aui-table-gutters * -1}; overflow: auto; overflow-y: hidden; table { border-collapse: separate; border-spacing: $aui-table-gutters; border-color: $aui-table-border-color; } caption { font-weight: $aui-font-weight-bold; text-align: left; padding: $aui-table-cell-padding-y $aui-table-gutters; } tr { vertical-align: top; } th { border-top: $aui-table-border-width-title solid $aui-table-border-color; font-weight: $aui-font-weight-bold; text-align: left; } th, td { padding: $aui-table-cell-padding-y $aui-table-cell-padding-x #{$aui-table-cell-padding-y - $aui-table-gutters} 0; } td { border-top: $aui-table-border-width solid $aui-table-border-color; } &__cell--colored { background-color: $aui-table-background-color; } &__cell--last-row { td { position: relative; &::after { content: ''; display: block; position: absolute; bottom: #{$aui-table-gutters * -1}; left: 0; right: 0; border-bottom: $aui-table-border-width solid $aui-table-border-color; } } } &--stretched { table { width: 100%; } } &--padded { th, td { padding: $aui-table-cell-padding-y $aui-table-cell-padding-x; } } &--responsive { thead, tfoot { display: none; // Hide as table headers will be displayed in on mobiles } tr { border-top: $aui-table-border-width-title solid $aui-table-border-color; padding-bottom: $aui-table-cell-padding-y * 2; } tr, td { float: left; width: 100%; } td { padding-bottom: $aui-table-cell-padding-y; &:before { content: attr(data-label); // Use 'data-label' as header text on mobiles float: left; font-weight: $aui-font-weight-bold; hyphens: auto; padding-right: $aui-table-cell-padding-x; width: 50%; word-break: break-word } } .aui-table__cell--last-row-responsive { border-bottom: $aui-table-border-width-title solid $aui-table-border-color; } @include aui-respond-to(large) { td { padding-bottom: #{$aui-table-cell-padding-y - $aui-table-gutters}; &:before { content: none; // Hide 'data-label' attribute } } thead, tr, td, tfoot { float: none; width: auto; } th, td { display: table-cell; } thead { display: table-header-group; } tr { display: table-row; } tfoot { display: table-footer-group; } .aui-table__cell--last-row-responsive { td { border-bottom: $aui-table-border-width solid $aui-table-border-color; padding-bottom: $aui-table-cell-padding-y; } } } } } ================================================ FILE: src/table/snippets/table-colored.html ================================================
Table caption
Header 1 Header 2 Header 3 Header 4
Row1, Column1 Row1, Column2 Row1, Column3 Row1, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
================================================ FILE: src/table/snippets/table-nonsemantic.html ================================================
Header 1
Header 2
Header 3
Header 4
Row1 Column1
Row1 Column2
Row1 Column3
Row1 Column4
Row2 Column1
Row2 Column2
Row2 Column3
Row2 Column4
Row3 Column1
Row3 Column2
Row3 Column3
Row3 Column4
================================================ FILE: src/table/snippets/table-responsive.html ================================================
Table caption
Header 1 Header 2 Header 3 Header 4
Row1, Column1 Row1, Column2 Row1, Column3 Row1, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
Row3, Column1 Row3, Column2 Row3, Column3 Row3, Column4
================================================ FILE: src/table/snippets/table-stretched-responsive.html ================================================
Table caption
Header 1 Header 2 Header 3 Header 4
Row1, Column1 Row1, Column2 Row1, Column3 Row1, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
Row3, Column1 Row3, Column2 Row3, Column3 Row3, Column4
================================================ FILE: src/table/snippets/table-stretched.html ================================================
Table caption
Header 1 Header 2 Header 3 Header 4
Footer 1 Footer 2 Footer 3 Footer 4
Row1, Column1 Row1, Column2 Row1, Column3 Row1, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
Row2, Column1 Row2, Column2 Row2, Column3 Row2, Column4
================================================ FILE: src/textfield/README.md ================================================ ## Introduction The Audi UI (AUI) **textfield** component is … (text follows) ### To include an AUI **textfield** component: ================================================ FILE: src/textfield/_textfield-themes.scss ================================================ .aui-textfield { /** * Theme: light */ &.aui-theme-light { $aui-textfield-color: $aui-color-gray95; $aui-textfield-color-secondary: $aui-color-gray50; $aui-textfield-border: $aui-color-gray50; $aui-textfield-border-hover: $aui-color-black; $aui-textfield-border-focus: $aui-color-black; $aui-textfield-border-dirty: $aui-color-black; $aui-textfield-valid-tick-color: $aui-color-black; stroke: $aui-textfield-color; .aui-textfield__field { border-color: $aui-textfield-border; } .aui-textfield__input { color: $aui-field-placeholder-color-light; } .aui-textfield__label { color: $aui-field-placeholder-color-light; } .aui-textfield__focus-line { background: $aui-textfield-border-hover; } .aui-textfield__counter, .aui-textfield__description, .aui-textfield__error, .aui-textfield__valid { color: $aui-textfield-color-secondary; } .aui-textfield__valid { &::before { background: url('data:image/svg+xml,#{aui-svg-tick($aui-textfield-valid-tick-color)}') center center no-repeat; } } .aui-textfield__error { color: $aui-field-error-color; } /** * States */ // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-textfield__field:hover { border-bottom-color: $aui-textfield-border-hover; } } // Focus state &.is-focused { .aui-textfield__field { border-bottom-color: $aui-textfield-border-focus; } } // Dirty state &.is-dirty { .aui-textfield__field { border-bottom-color: $aui-textfield-border-dirty; } .aui-textfield__input { color: $aui-textfield-color; } } // Invalid state &.is-invalid { &, &:not(.is-dirty) .aui-textfield__input, .aui-textfield__counter, .aui-textfield__label { color: $aui-field-error-color; } .aui-textfield__field { border-color: $aui-field-error-color; } .aui-textfield__focus-line { background: $aui-field-error-color; } } } } ================================================ FILE: src/textfield/_textfield.scss ================================================ $aui-textfield-max-lines: 0 !default; $aui-textfield-icon-top-default: $aui-field-default-height * .5 !default; // Center with label $aui-textfield-color: $aui-color-gray20 !default; $aui-textfield-color-secondary: $aui-color-gray40 !default; $aui-textfield-border: $aui-color-gray50 !default; $aui-textfield-border-hover: $aui-color-gray50 !default; $aui-textfield-border-focus: $aui-color-black !default; $aui-textfield-border-dirty: $aui-color-black !default; $aui-textfield-valid-tick-color: $aui-color-black !default; $aui-textfield-input-padding-y: (8 / 16 * 1em) !default; $aui-textfield-floating-label-active-label-top: 0 !default; $aui-textfield-floating-label-active-label-opacity: 1 !default; $aui-textfield-floating-label-active-label-font-size: $aui-field-floating-label-font-size !default; //$aui-textfield-multiline-padding-top: (21 / 16 * 1em) !default; $aui-textfield-multiline-padding-top: (13 / 16 * 1em) !default; $aui-textfield-multiline-padding-x: (10 / 16 * 1em) !default; $aui-textfield-multiline-active-label-top: (10 / 16 * 1em) !default; $aui-textfield-multiline-active-label-font-size: $aui-field-floating-label-font-size !default; $aui-textfield-multiline-active-label-opacity: 1 !default; $aui-textfield-multiline-active-field-padding-top: (20 / 16 * 1em) !default; .aui-textfield { display: block; position: relative; margin: 0; padding: $aui-field-floating-label-padding 0 0; font-size: 1rem; line-height: $aui-field-line-height; stroke: $aui-textfield-color; &__input { display: block; margin: 0; padding: $aui-textfield-input-padding-y 0; width: 100%; min-height: $aui-field-default-height; font-family: $aui-font-default; font-size: inherit; font-weight: $aui-font-weight-normal; line-height: inherit; text-align: left; color: $aui-field-placeholder-color; background: none; border: none; transition: color $aui-field-transition-duration $aui-easing; resize: none; outline: 0; border-radius: 0; @if $aui-textfield-max-lines > 0 { max-height: $aui-field-line-height * $aui-textfield-max-lines; } } &__field { position: relative; border-bottom: 1px solid $aui-textfield-border; transition-property: border, padding; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; } &__label { display: block; position: absolute; top: 0; left: 0; width: 100%; color: $aui-field-placeholder-color; font-size: $aui-textfield-floating-label-active-label-font-size; font-weight: $aui-font-weight-normal; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; transition-property: top, font-size, color, opacity; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; pointer-events: none; &-optional { font-size: rem(13); padding-left: 4px; color: $aui-color-gray40; } } // Focus line will be injected by JS &__focus-line { display: block; position: relative; width: 100%; margin-top: -2px; height: 1px; background: $aui-textfield-border-hover; opacity: 0; transition-property: opacity, background; transition-duration: $aui-field-transition-duration; } &__counter, &__description, &__error, &__valid { display: block; color: $aui-textfield-color-secondary; transition: color $aui-field-transition-duration linear; margin-top: unit(2); font-size: rem(13); line-height: $aui-field-error-line-height; } &__counter { position: relative; height: $aui-field-error-line-height; } &__counter-value { display: block; position: absolute; top: 0; right: 0; } &__counter ~ &__description, &__counter ~ &__error { margin-top: $aui-field-error-line-height * -1; padding-right: 4em; } &__valid { position: relative; &::before { content: ''; display: inline-block; margin-right: rem(16px); width: 12px; height: 12px; background: url('data:image/svg+xml,#{aui-svg-tick($aui-textfield-valid-tick-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2); } } } &__error { display: flex; align-items: center; font-size: rem(13); color: $aui-field-error-color; &::before { content: ''; display: inline-block; margin-right: rem(16px); width: 24px; min-width: 24px; height: 24px; background: url('data:image/svg+xml,#{aui-svg-caution($aui-field-error-color)}') center center no-repeat; @include aui-respond-to('large') { margin-right: unit(2); } } } .audiicon { position: absolute; top: $aui-textfield-icon-top-default; left: 0; transform: translateY(-50%); } .aui-js & { padding-top: 0; .aui-textfield__label { top: $aui-field-label-y; font-size: inherit; } } /** * Variant: floating-label */ &.aui-textfield--floating-label &__field { padding-top: $aui-field-floating-label-padding; } .aui-js &.aui-textfield--floating-label &__label { top: $aui-field-label-y + $aui-field-floating-label-padding; font-size: inherit; } /** * Variant: multiline */ &.aui-textfield--multiline { transition-property: padding; transition-duration: $aui-field-transition-duration; transition-timing-function: $aui-easing; } &.aui-textfield--multiline &__field { padding-top: $aui-textfield-multiline-active-field-padding-top; border: 1px solid $aui-textfield-border; } &.aui-textfield--multiline &__label { top: 10px; left: 10px; } &.aui-textfield--multiline &__input { padding-left: $aui-textfield-multiline-padding-x; padding-right: $aui-textfield-multiline-padding-x; } .aui-js &.aui-textfield--multiline { padding-top: $aui-textfield-multiline-padding-top; } .aui-js &.aui-textfield--multiline &__field { padding-top: $aui-textfield-multiline-active-field-padding-top - $aui-textfield-multiline-padding-top; } .aui-js &.aui-textfield--multiline &__label { top: 7px; } /** * Variant: icon */ &--icon { .aui-textfield__input, .aui-textfield__label { padding-left: unit(12); @include aui-respond-to(large) { padding-left: unit(8); } } } /** * States */ // Hover state &:not(.is-disabled):not(.is-invalid) { .aui-textfield__field:hover { border-bottom-color: $aui-textfield-border-hover; } } // Focus state &.is-focused { .aui-textfield__label { opacity: 0; } &.aui-textfield--floating-label .aui-textfield__label { top: $aui-textfield-floating-label-active-label-top; font-size: $aui-textfield-floating-label-active-label-font-size; opacity: $aui-textfield-floating-label-active-label-opacity; } &.aui-textfield--multiline { padding-top: 0; } &.aui-textfield--multiline .aui-textfield__field { padding-top: $aui-textfield-multiline-active-field-padding-top; } &.aui-textfield--multiline .aui-textfield__label { top: $aui-textfield-multiline-active-label-top; font-size: $aui-textfield-multiline-active-label-font-size; opacity: $aui-textfield-multiline-active-label-opacity; } .aui-textfield__field { border-bottom-color: $aui-textfield-border-focus; } .aui-textfield__input { outline: none; box-shadow: none; } .aui-textfield__focus-line { opacity: 1; } } // Disabled state &.is-disabled { //opacity: $aui-field-disabled-opacity; color: $aui-color-gray40; cursor: not-allowed; .aui-textfield__input { cursor: not-allowed; border-color: $aui-color-gray70; } .aui-textfield__label { color: $aui-color-gray40; } .aui-textfield__focus-line { opacity: 0; } } // Dirty state &.is-dirty { .aui-textfield__label { opacity: 0; } &.aui-textfield--floating-label .aui-textfield__label { top: $aui-textfield-floating-label-active-label-top; font-size: $aui-textfield-floating-label-active-label-font-size; opacity: $aui-textfield-floating-label-active-label-opacity; } &.aui-textfield--multiline { padding-top: 0; } &.aui-textfield--multiline .aui-textfield__field { padding-top: $aui-textfield-multiline-active-field-padding-top; } &.aui-textfield--multiline .aui-textfield__label { top: $aui-textfield-multiline-active-label-top; font-size: $aui-textfield-multiline-active-label-font-size; opacity: $aui-textfield-multiline-active-label-opacity; } .aui-textfield__field { border-bottom-color: $aui-textfield-border-dirty; } .aui-textfield__input { color: $aui-textfield-color; } } // Invalid state &.is-invalid { &, &:not(.is-dirty) .aui-textfield__input, .aui-textfield__counter, .aui-textfield__label { color: $aui-field-error-color; } .aui-textfield__field { border-color: $aui-field-error-color; } .aui-textfield__focus-line { background: $aui-field-error-color; } } } ================================================ FILE: src/textfield/snippets/textfield-disabled.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-floating-label.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-icon.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-invalid.html ================================================
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/textfield/snippets/textfield-multiline-counter.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-multiline-disabled.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-multiline-invalid.html ================================================
Error messages that reassure users can make it easy for them to correct their mistakes and continue with the form.
================================================ FILE: src/textfield/snippets/textfield-multiline.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/snippets/textfield-valid.html ================================================
Well done, young padawan.
================================================ FILE: src/textfield/snippets/textfield.html ================================================
If the customer doesn’t understand the label itself or is just unsure of its meaning, an additional description can help squash any uncertainty.
================================================ FILE: src/textfield/textfield.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-textfield'; const CLASS_FIELD = 'aui-textfield__field'; const CLASS_INPUT = 'aui-textfield__input'; const CLASS_LABEL = 'aui-textfield__label'; const CLASS_FOCUS_LINE = 'aui-textfield__focus-line'; const CLASS_COUNTER = 'aui-textfield__counter'; const CLASS_COUNTER_VALUE = 'aui-textfield__counter-value'; const CLASS_IS_FOCUS = 'is-focused'; const CLASS_IS_DIRTY = 'is-dirty'; const CLASS_IS_INVALID = 'is-invalid'; const CLASS_IS_DISABLED = 'is-disabled'; const CLASS_IS_EQUAL_MAX_CHARS = 'is-equal-max-length'; const CLASS_IS_GREATER_MAX_CHARS = 'is-greater-max-length'; const ATTR_AUTOSIZE = 'data-autosize'; /** * Class constructor for Textfield AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Textfield extends Component { /** * Upgrades all Textfield AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Textfield(element)); } }); return components; }; constructor(element) { super(element); } init() { super.init(); this._input = this._element.querySelector(`.${CLASS_INPUT}`); this._input.addEventListener('input', this._inputHandler = (event) => this._onInput(event)); this._input.addEventListener('focus', this._focusHandler = (event) => this._onFocus(event)); this._input.addEventListener('blur', this._blurHandler = (event) => this._onBlur(event)); this._input.addEventListener('change', this._changeHandler = (event) => this._onChange(event)); this._input.addEventListener('reset', this._resetHandler = (event) => this._onReset(event)); // Insert counter if data attribute 'count' is present: if (this._element.getAttribute('data-count')) { this._maxChars = parseInt(this._element.getAttribute('data-count')) || 0; this._label = this._element.querySelector(`.${CLASS_FIELD}`); this._counter = document.createElement('span'); this._counter.classList.add(CLASS_COUNTER); this._label.parentNode.insertBefore(this._counter, this._label.nextSibling); this._counterValue = document.createElement('span'); this._counterValue.classList.add(CLASS_COUNTER_VALUE); this._counterValue.innerHTML = this._maxChars; this._counter.appendChild(this._counterValue); this._hasCounter = true; } // Insert thick focus line after label element: this._label = this._element.querySelector(`.${CLASS_LABEL}`); let focusLine = document.createElement('span'); focusLine.classList.add(CLASS_FOCUS_LINE); this._label.parentNode.insertBefore(focusLine, this._label.nextSibling); // If textarea should adjust height to content if (this._element.hasAttribute(ATTR_AUTOSIZE) && this._element.getAttribute(ATTR_AUTOSIZE) !== 'false') { let style = window.getComputedStyle(this._input); this._inputPadding = parseInt(style.paddingTop) + parseInt(style.paddingBottom) || 0; this._inputBorder = parseInt(style.borderTop) + parseInt(style.borderBottom) || 0; this._input.addEventListener('keyup', this._keyupHandler = event => this._onKeyup(event)); this._autosize = true; } this.updateClasses(); } update() { this.updateClasses(); this.updateCounter(); if (this._autosize) { this.adjustHeightToContent(); } } updateClasses() { this.checkDisabled(); this.checkDirty(); this.checkFocus(); } updateCounter() { if (this._counterValue) { let numChars = this._input.value.length; let remainingChars = this._maxChars - numChars; this._counterValue.innerHTML = remainingChars; if (remainingChars === 0) { this._element.classList.add(CLASS_IS_EQUAL_MAX_CHARS); } else { this._element.classList.remove(CLASS_IS_EQUAL_MAX_CHARS); } if (remainingChars < 0) { this._element.classList.add(CLASS_IS_GREATER_MAX_CHARS); this._element.classList.add(CLASS_IS_INVALID); } else { this._element.classList.remove(CLASS_IS_GREATER_MAX_CHARS); this._element.classList.remove(CLASS_IS_INVALID); } } } /** * Check the disabled state and update field accordingly. */ checkDisabled() { if (this._input.disabled) { this._element.classList.add(CLASS_IS_DISABLED); } else { this._element.classList.remove(CLASS_IS_DISABLED); } } /** * Check the dirty state and update field accordingly. */ checkDirty() { if (this._input.value && this._input.value.length > 0) { this._element.classList.add(CLASS_IS_DIRTY); } else { this._element.classList.remove(CLASS_IS_DIRTY); } } /** * Check the focus state and update field accordingly. */ checkFocus() { if (Boolean(this._element.querySelector(':focus'))) { this._element.classList.add(CLASS_IS_FOCUS); } else { this._element.classList.remove(CLASS_IS_FOCUS); } } /** * Resize textarea */ adjustHeightToContent() { let htmlTop = window.pageYOffset; let bodyTop = document.body.scrollTop; let originalHeight = this._input.style.height; this._input.style.height = 'auto'; if (this._input.scrollHeight === 0) { // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM. this._input.style.height = originalHeight; return; } this._input.style.height = `${this._input.scrollHeight + this._inputBorder}px`; // prevents scroll position jump document.documentElement.scrollTop = htmlTop; document.body.scrollTop = bodyTop; } /** * Disable text field. */ disable() { this._input.disabled = true; this.updateClasses(); } /** * Dispose component */ dispose() { super.dispose(); this._input.removeEventListener('input', this._inputHandler); this._input.removeEventListener('focus', this._focusHandler); this._input.removeEventListener('blur', this._blurHandler); this._input.removeEventListener('change', this._changeHandler); this._input.removeEventListener('reset', this._resetHandler); super.removeChild(this._element.querySelector(`.${CLASS_FOCUS_LINE}`)); super.removeChild(this._element.querySelector(`.${CLASS_COUNTER}`)); } /** * Event Handler */ _onInput(event) { this.update(); } _onFocus(event) { this.update(); } _onBlur(event) { this.update(); } _onChange(event) { this.update(); } _onReset(event) { this.update(); } _onKeyup(event) { this.updateCounter(); if (this._autosize) { this.adjustHeightToContent(); } } /** * Getter and Setter */ get input() { return this._input; } get autoSize() { return this._autosize; } set autoSize(value) { return this._autosize = Boolean(value); } } ================================================ FILE: src/tooltip/README.md ================================================ ## Introduction The Audi UI (AUI) **tooltip** component is an enhanced version of the standard HTML tooltip as produced by the `title` attribute. A tooltip consists of text and/or an image that clearly communicates additional information about an element when the user hovers over or, in a touch-based UI, touches the element. The AUI tooltip component is pre-styled to provide a vivid, attractive visual element that displays related but typically non-essential content, e.g., a definition, clarification, or brief instruction. Tooltips are a ubiquitous feature of most user interfaces, regardless of a site's content or function. Their design and use is an important factor in the overall user experience. See the tooltip component's [Audi UI specifications page](http://www.audi.com/) for details. ### To include an AUI **tooltip** component:  1. Code an element, such as a `
`, `

`, or ``, and style it as desired; this will be the tooltip's target. Include an `id` attribute and unique value to link the container to its tooltip. ```html

HTML

```  2. Following the target element, code a second element, such as a `
`, `

`, or ``; this will be the tooltip itself. Include a `for` attribute whose value matches that of the target's `id`. ```html

HTML

HyperText Markup Language ```  3. Add one or more AUI classes, separated by spaces, to the tooltip element using the `class` attribute. ```html

HTML

HyperText Markup Language ``` The tooltip component is ready for use. #### Examples A target with a simple text tooltip. ```html

A tooltip consists of text and/or an image.

Tooltips are a ubiquitous feature of most user interfaces. ``` ## Configuration options The AUI CSS classes apply various predefined visual enhancements to the tooltip. The table below lists the available classes and their effects. | AUI class | Effect | Remarks | |-----------|--------|---------| | `aui-tooltip` | Defines a container as an AUI tooltip | Required on tooltip container element | | `aui-js-tooltip` | Assigns basic AUI behavior to tooltip element | Required | | `aui-tooltip__text` | Defines element as text | Optional | | `aui-tooltip__media` | Defines element as media such as an image | Optional | | `aui-tooltip--dark` | Use dark theme | Optional | ================================================ FILE: src/tooltip/_tooltip.scss ================================================ $aui-tooltip-open-duration: .25s; $aui-tooltip-close-duration: .15s; .aui-tooltip { pointer-events: none; display: block; position: fixed; top: -1000px; left: -1000px; max-width: $aui-layout-min-width; font-size: .875rem; line-height: unit(5); color: $aui-color-body; background: $aui-color-white; @include shadow; opacity: 0; visibility: hidden; transition-property: opacity, visibility; transition-duration: $aui-tooltip-close-duration; transition-timing-function: linear; &__triangle { display: block; position: absolute; top: 0; left: 50%; background: inherit; &::after { $_size: 16px; content: ''; display: block; position: absolute; left: #{$_size / -2}; top: #{$_size / -2}; width: $_size; height: $_size; transform: rotate(45deg); transform-origin: center; background: inherit; } } &__text { display: inline-block; padding: unit(3) unit(5); } &__media { position: relative; z-index: 1; display: block; width: 100%; height: auto; } /** * Variant: Dark */ &--dark { color: $aui-color-white; background: $aui-color-gray30; } /** * States */ &.is-active { opacity: 1; visibility: visible; transition-duration: $aui-tooltip-open-duration; z-index: $aui-zindex-tooltip; } &.is-top &__triangle { top: auto; bottom: 0; } } ================================================ FILE: src/tooltip/snippets/tooltip-dark.html ================================================

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis nostrud exercitation ullamco laborisnisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ================================================ FILE: src/tooltip/snippets/tooltip-image-dark.html ================================================

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ================================================ FILE: src/tooltip/snippets/tooltip-image.html ================================================

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ================================================ FILE: src/tooltip/snippets/tooltip.html ================================================

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ================================================ FILE: src/tooltip/tooltip.js ================================================ import Component from '../component/component'; const SELECTOR_COMPONENT = '.aui-js-tooltip'; const CLASS_TRIANGLE = 'aui-tooltip__triangle'; const CLASS_IS_UPGRADED = 'is-upgraded'; const CLASS_IS_ACTIVE = 'is-active'; const CLASS_IS_TOP = 'is-top'; const OFFSET_VIEWPORT_X = 10; const OFFSET_TARGET_TOP = 12; const OFFSET_TARGET_BOTTOM = 12; const OPEN_DELAY = 400; /** * Class constructor for Tooltip AUI component. * Implements AUI component design pattern defined at: * https://github.com/... * * @param {HTMLElement} element The element that will be upgraded. */ export default class Tooltip extends Component { /** * Upgrades all Tooltip AUI components. * @returns {Array} Returns an array of all newly upgraded components. */ static upgradeElements() { let components = []; Array.from(document.querySelectorAll(SELECTOR_COMPONENT)).forEach(element => { if (!Component.isElementUpgraded(element)) { components.push(new Tooltip(element)); } }); return components; }; /** * Initialize component */ init() { super.init(); let forId = this._element.getAttribute('for'); if (forId) { this._trigger = document.getElementById(forId); } if (this._trigger) { // Add triangle shape this._triangle = document.createElement('span'); this._triangle.classList.add(CLASS_TRIANGLE); this._element.appendChild(this._triangle); // Prevent accidental text selection on Android if (!this._trigger.hasAttribute('tabindex')) { this._trigger.setAttribute('tabindex', '0'); } this._trigger.addEventListener('mouseenter', this._boundMouseenter = (event) => this._onTriggerEnter(event)); this._trigger.addEventListener('mouseleave', this._boundMouseleave = (event) => this._onTriggerLeave(event)); this._trigger.addEventListener('focusin', this._boundfocusin = (event) => this._onTriggerEnter(event)); this._trigger.addEventListener('focusout', this._boundfocusout = (event) => this._onTriggerLeave(event)); this._trigger.addEventListener('touchstart', this._boundTouchstart = (event) => this._onTriggerEnter(event)); window.addEventListener('touchend', this._boundTouchendWindow = (event) => this._onTriggerLeaveOutside(event)); } } /** * Dispose component */ dispose() { this._trigger.removeEventListener('mouseenter', this._boundMouseenter); this._trigger.removeEventListener('mouseleave', this._boundMouseleave); this._trigger.removeEventListener('mousemove', this._boundMouseMove); this._trigger.removeEventListener('focusin', this._boundfocusin); this._trigger.removeEventListener('focusout', this._boundfocusout); this._trigger.removeEventListener('touchstart', this._boundTouchstart); window.removeEventListener('touchend', this._boundTouchendWindow); window.removeEventListener('scroll', this._boundScrollWindow); this._element.classList.remove(CLASS_IS_TOP, CLASS_IS_ACTIVE, CLASS_IS_UPGRADED); this._element.removeAttribute('style'); this._element.removeChild(this._triangle); } /** * Open tooltip * @param {HTMLElement} trigger element that opens the tooltip. * @param {number} clientX the x-coordinate of trigger (mouse/touch). */ open(trigger, clientX) { if (!trigger) { return; } const rect = trigger.getBoundingClientRect(); this._element.style.left = `0px`; this._element.style.top = `0px`; clientX = clientX || rect.left + rect.width / 2; const triggerX = clientX - rect.left; const yTop = rect.top - this._element.offsetHeight - OFFSET_TARGET_TOP; const yBottom = rect.bottom + OFFSET_TARGET_BOTTOM + 2; let x = rect.left + rect.width / 2 - this._element.offsetWidth / 2; let y = yBottom; let triangleX = 0; this._element.classList.remove(CLASS_IS_TOP); x = rect.left + triggerX - this._element.offsetWidth / 2; if (x < OFFSET_VIEWPORT_X) { x = OFFSET_VIEWPORT_X; } // If tooltip would be out of viewport on the right if (x + this._element.offsetWidth > window.innerWidth - OFFSET_VIEWPORT_X) { x = window.innerWidth - OFFSET_VIEWPORT_X - this._element.offsetWidth; } // If viewport height isn't large enough, place tooltip on top if possible if (yBottom + this._element.offsetHeight > window.innerHeight - OFFSET_VIEWPORT_X) { y = yTop; this._element.classList.add(CLASS_IS_TOP); } triangleX = triggerX + rect.left - x; this._element.classList.add(CLASS_IS_ACTIVE); this._element.style.left = `${x}px`; this._element.style.top = `${y}px`; this._triangle.style.left = `${triangleX}px`; this._scrolled = false; window.addEventListener('scroll', this._boundScrollWindow = (event) => this._onScrollWindow(event)); } /** * Close tooltip. */ close() { clearTimeout(this.openTimeout); window.removeEventListener('scroll', this._boundScrollWindow); this._element.classList.remove(CLASS_IS_ACTIVE); } /** * Handle enter event. * @param {Event} event that fired. */ _onTriggerEnter(event) { // this.open(event.target, event.clientX); this.openPositionX = event.clientX; this._trigger.addEventListener('mousemove', this._boundMouseMove = (event) => this._onTriggerMove(event)); clearTimeout(this.openTimeout); this.openTimeout = setTimeout(() => { this._trigger.removeEventListener('mousemove', this._boundMouseMove); this.open(event.target, this.openPositionX); }, OPEN_DELAY); } /** * Handle mousemove event. * @param {Event} event that fired. */ _onTriggerMove(event) { this.openPositionX = event.clientX; } /** * Handle leave event. * @param {Event} event that fired. */ _onTriggerLeave(event) { this.close(); } /** * Handle leave outside event. * @param {Event} event that fired. */ _onTriggerLeaveOutside(event) { console.log('leaveoutside', event); if (!this._element.contains(event.target) && !this._trigger.contains(event.target)) { console.log('-> close'); this.close(); }; } /** * Handle scroll event. * @param {Event} event that fired. */ _onScrollWindow(event) { window.removeEventListener('scroll', this._boundScrollWindow); if (!this._scrolled) { this.close(); this._scrolled = true; } } } ================================================ FILE: src/typography/README.md ================================================ --- title: Typography --- ## Introduction The Audi UI (AUI) **typography** component is … (text follows) ### To include an AUI **typography** component: ```html ``` ================================================ FILE: src/typography/_typography.scss ================================================ html { @include aui-responsive-type(0, 1.75); } body { font-family: $aui-font-default; font-weight: $aui-font-weight-light; color: $aui-color-body; } .aui-headline { &-1, &-2, &-3, &-4, &-5 { font-family: $aui-font-extended; font-variation-settings: $aui-font-extended-width; font-weight: $aui-font-weight-normal; letter-spacing: -0.015em; &--bold { font-weight: $aui-font-weight-bold; } } &-6 { font-family: $aui-font-default; } &-1 { @include aui-responsive-type(8, 1.1); font-weight: $aui-font-weight-bold; color: $aui-color-black; &--normal { font-weight: $aui-font-weight-normal; } } .aui-color-text-light &-1 { color: $aui-color-white; } &-2 { @include aui-responsive-type(5, 1.2); } &-3 { @include aui-responsive-type(2, 1.2); } &-4 { @include aui-responsive-type(1, 1.2); } &-5 { @include aui-responsive-type(0, 1.3333); } &-6 { @include aui-responsive-type(0, 1.5); font-weight: $aui-font-weight-bold; &--normal { font-weight: $aui-font-weight-normal; } } } .aui-shortread { @include aui-responsive-type(0, 1.5); } .aui-color-text-light { .aui-accentuated { &::before { border-top-color: $aui-color-white; } } } .aui-caption { @include aui-responsive-type(-1, 1.5); } .aui-big { @include aui-responsive-type(1, 1.75); } .aui-small { @include aui-responsive-type(-2, 1.5); } .aui-blockquote { margin: 0; font-weight: normal; @include aui-responsive-type(1, 1.5); } .aui-textlink { padding-bottom: 0.06125em; border-bottom: 1px solid $aui-color-gray50; color: inherit; font-weight: $aui-font-weight-normal; transition: color 0.3s linear, border 0.3s linear; &:hover { color: $aui-color-black; border-bottom-color: $aui-color-black; } &:focus { outline: none; } } .aui-color-text-light { .aui-textlink { border-bottom-color: rgba(#fff, 0.3); &:hover { color: $aui-color-white; border-bottom-color: $aui-color-white; } } } ================================================ FILE: src/typography/snippets/headline-1.html ================================================

Headline 1
second line


Headline 1
second line

================================================ FILE: src/typography/snippets/headline-2.html ================================================

Headline 2
second line


Headline 2
second line

================================================ FILE: src/typography/snippets/headline-3.html ================================================

Headline 3
second line


Headline 3
second line

================================================ FILE: src/typography/snippets/headline-4.html ================================================

Headline 4
second line


Headline 4
second line

================================================ FILE: src/typography/snippets/headline-5.html ================================================

Headline 5
second line


Headline 5
second line

================================================ FILE: src/typography/snippets/headline-6.html ================================================

Headline 6
second line


Headline 6
second line

================================================ FILE: src/typography/snippets/list-arrow.html ================================================
  • List with arrow
  • Second topic
  • Third topic
================================================ FILE: src/typography/snippets/list-bullet.html ================================================
  • List with bullet
  • Second topic
  • Third topic
================================================ FILE: src/typography/snippets/list-number.html ================================================
  1. List numbered
  2. Second topic
  3. Third topic
================================================ FILE: src/typography/snippets/paragraph-big.html ================================================

This little one isn't worth the effort. Come let me buy you something…

================================================ FILE: src/typography/snippets/paragraph-caption.html ================================================

The second Death Star, was a massive battle station with enough firepower to destroy an entire planet.

================================================ FILE: src/typography/snippets/paragraph-shortread.html ================================================

And, now Your Highness, we will discuss the location of your hidden Rebel base.

================================================ FILE: src/typography/snippets/paragraph-small.html ================================================

This little one isn't worth the effort. Come let me buy you something…

================================================ FILE: src/typography/snippets/paragraph.html ================================================

Hello, sir. I am See-Threepio, human-cyborg relations. My facilities are at your... Well, really! What's wrong with the Falcon? Hyperdrive. I'll get my people to work on it. Good. You know, that ship saved my life quite a few times. She's the fastest hunk of junk in the galaxy. How's the gas mine? Is it paying off for you? Oh, not as well as I'd like. We're a small outpost and not very self-sufficient. And I've had supply problems of every kind. I've had labor difficulties... What's so funny? You. Listen to you - you sound like a businessman, a responsible leader. Who'd have thought that, huh? You know, seeing you sure brings back a few things. Yeah. Yeah, I'm responsible these days. It's the price you pay for being successful.

================================================ FILE: src/typography/snippets/textlink.html ================================================ Lorem ipsum dolor sit amet, consetetur sadipscing elitr. I am a link. At vero eos et accusam et justo duo dolores et ea rebum. ================================================ FILE: src/util/_units.scss ================================================ /** * Returns multiple unit * @param {number (unitless)} $multiple * @return {number (rem)} */ @function unit($multiple: 1) { @return $aui-base-unit * $multiple / $aui-rem-base * 1rem; } /** * Convert pixels to ems * eg. for a relational value of 12px write em(12) when the parent is equal * the em-base (defined in $audui-config). * If the parent is another value say 24px write em(12, 24) * @param {number (px)} $val * @param {number} $base * @return {number (em)} */ @function em($val, $base: $aui-rem-base) { $val: strip-units($val); $base: strip-units($base); @return ($val / $base) * 1em; } /** * Convert pixels to rems * Assumes that the defined em-base is the font-size of * @param {number (px)} $val * @param {number} $base * @return {number (rem)} */ @function rem($val) { $val: strip-units($val); $base: strip-units($aui-rem-base); @return ($val / $base) * 1rem; } /** * Strips the unit from a number. * @param {number (with unit)} $value * @return {number (unitless)} */ @function strip-units($value) { @return ($value / ($value * 0 + 1)); } ================================================ FILE: src/util/animation-end-event.js ================================================ // From Modernizr function whichAnimationEvent() { let type; let element = document.createElement('fakeelement'); let animations = { 'animation': 'animationend', 'OAnimation': 'oAnimationEnd', 'MozAnimation': 'animationend', 'WebkitAnimation': 'webkitAnimationEnd' } for (type in animations) { if (element.style[type] !== undefined) { return animations[type]; } } } const ANIMATION_EVENT = whichAnimationEvent(); export default ANIMATION_EVENT; ================================================ FILE: src/util/clamp.js ================================================ /** * Clamps `number` within the inclusive `lower` and `upper` bounds. * * @since 4.0.0 * @category Number * @param {number} number The number to clamp. * @param {number} lower The lower bound. * @param {number} upper The upper bound. * @returns {number} Returns the clamped number. * @example * * clamp(-10, -5, 5) * // => -5 * * clamp(10, -5, 5) * // => 5 */ export default function clamp(number, lower, upper) { number = +number; lower = +lower; upper = +upper; lower = lower === lower ? lower : 0; upper = upper === upper ? upper : 0; if (number === number) { number = number <= upper ? number : upper; number = number >= lower ? number : lower; } return number; } ================================================ FILE: src/util/closest.js ================================================ /** * Get the first element that matches the selector by testing the element itself * and traversing up through its ancestors in the DOM tree. * @param {HTMLElement} element to search wherefrom * @param {string} selector A string containing a selector expression to match elements against. * @param {HTMLElement} context A DOM element within which a matching element may be found. * @returns {HTMLElement} found element or null */ export default function closest(element, selector, context) { let matchesFn; ['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'].some(function(fn) { if (typeof document.body[fn] === 'function') { matchesFn = fn; return true; } return false; }); let parent; // traverse parents parent = element; while (parent) { if (parent && parent[matchesFn](selector)) { return parent; } if (parent === context) { return null; } parent = parent.parentElement; } return null; } ================================================ FILE: src/util/is-none.js ================================================ /** * Check if value is either `undefined` or `null`. * @param {*} value to check. * @returns {boolean} true if value is `undefined` or `null`. */ export default function isNone(value) { return (value === undefined || value === null); } ================================================ FILE: src/util/limit.js ================================================ /** * Limits a value to x >= min and x <= max. * @param {number} x The value to limit. * @param {number} min The value to limit. * @param {number} max The value to limit. * @returns {number} The limited value. */ export default function limit(x, min, max) { if (x > max) x = max; if (x < min) x = min; return x; } ================================================ FILE: src/util/map-linear.js ================================================ /** * Linear mapping from range to range * @param {number} x The value to map * @param {number} a1 First endpoint of the range * @param {number} a2 Final endpoint of the range * @param {number} b1 First endpoint of the range * @param {number} b2 Final endpoint of the range * @returns {number} The mapped value. */ export default function mapLinear(x, a1, a2, b1, b2) { return b1 + (x - a1) * (b2 - b1) / (a2 - a1); } ================================================ FILE: src/util/matches.js ================================================ export default function matches(element, selector) { return (element.matches || element.matchesSelector || element.msMatchesSelector || element.mozMatchesSelector || element.webkitMatchesSelector || element.oMatchesSelector).call(element, selector); }; ================================================ FILE: src/util/object-resize.js ================================================ export default class ObjectResize { constructor(parent, callback, callbackScope) { let isIE = navigator.userAgent.match(/Trident/); // NOTE // this._parent.style.position != 'static' // this._parent.style.display = 'block' this._parent = parent; this._helperElement = document.createElement('object'); this._helperElement.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1; border: 0px; opacity: 0;'); this._helperElement.setAttribute('border', '0'); this._helperElement.onload = () => this._onLoad(); this._helperElement.type = 'text/html'; if (isIE) { this._parent.appendChild(this._helperElement); } this._helperElement.data = 'about:blank'; if (!isIE) { this._parent.appendChild(this._helperElement); } this._callback = callback; this._callbackScope = callbackScope; this._ticking = false; } _onLoad(event) { this._helperElement.contentDocument.defaultView.addEventListener('resize', this._resizeHandler = (event) => this._onResize(event)); } _onResize(event) { if (!this._ticking) { window.requestAnimationFrame(() => { this._ticking = false; this._callback.call(this._callbackScope); }); } this._ticking = true; } dispose() { this._helperElement.contentDocument.defaultView.removeEventListener('resize', this._resizeHandler); this._parent.removeChild(this._helperElement); } } // (function() { // var attachEvent = document.attachEvent; // var isIE = navigator.userAgent.match(/Trident/); // var requestFrame = (function() { // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || // function(fn) { // return window.setTimeout(fn, 20); // }; // return function(fn) { // return raf(fn); // }; // })(); // // var cancelFrame = (function() { // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || // window.clearTimeout; // return function(id) { // return cancel(id); // }; // })(); // // function resizeListener(e) { // var win = e.target || e.srcElement; // if (win.__resizeRAF__) cancelFrame(win.__resizeRAF__); // win.__resizeRAF__ = requestFrame(function() { // var trigger = win.__resizeTrigger__; // trigger.__resizeListeners__.forEach(function(fn) { // fn.call(trigger, e); // }); // }); // } // // function objectLoad(e) { // this.contentDocument.defaultView.__resizeTrigger__ = this.__resizeElement__; // this.contentDocument.defaultView.addEventListener('resize', resizeListener); // } // // window.addResizeListener = function(element, fn) { // if (!element.__resizeListeners__) { // element.__resizeListeners__ = []; // if (attachEvent) { // element.__resizeTrigger__ = element; // element.attachEvent('onresize', resizeListener); // } else { // if (getComputedStyle(element).position === 'static') element.style.position = 'relative'; // var obj = element.__resizeTrigger__ = document.createElement('object'); // obj.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;'); // obj.__resizeElement__ = element; // obj.onload = objectLoad; // obj.type = 'text/html'; // if (isIE) element.appendChild(obj); // obj.data = 'about:blank'; // if (!isIE) element.appendChild(obj); // } // } // element.__resizeListeners__.push(fn); // }; // // window.removeResizeListener = function(element, fn) { // element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1); // if (!element.__resizeListeners__.length) { // if (attachEvent) element.detachEvent('onresize', resizeListener); // else { // element.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', resizeListener); // element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__); // } // } // } // })(); ================================================ FILE: src/util/reflow.js ================================================ /** * Trigger a reflow * @param {HTMLElement} element to trigger a reflow. */ export default function reflow(element) { new Function('bs', 'return bs')(element.offsetHeight); } ================================================ FILE: src/util/resize-observer.js ================================================ import Signal from '../util/signal'; let instance = null; export default class ResizeObserver { constructor() { if (!instance) { instance = this; this.init(); } return instance; } init() { this._ticking = false; this.resized = new Signal(); window.addEventListener('resize', this._resizeHandler = (event) => this._onResize(event)); } _onResize(event) { if (!this._ticking) { window.requestAnimationFrame(() => { this._ticking = false; this.resized.dispatch(); }); } this._ticking = true; } } ================================================ FILE: src/util/scroll-observer-element.js ================================================ import Signal from '../util/signal'; const SCROLL_END_THRESHOLD = 100; // in ms export default class ScrollObserverElement { constructor(element) { this._element = element; this._scrollX = this._element.scrollLeft; this._scrollY = this._element.scrollTop; this._ticking = false; this.scrolled = new Signal(); this.scrollEnded = new Signal(); this._element.addEventListener('scroll', this._scrollHandler = (event) => this._onScroll(event)); } _onScroll(event) { this._scrollX = event.target.scrollLeft; this._scrollY = event.target.scrollTop; if (!this._ticking) { window.requestAnimationFrame(() => { this._ticking = false; this.scrolled.dispatch(this._scrollX, this._scrollY); clearTimeout(this._scrollEndTimeout); this._scrollEndTimeout = setTimeout(() => { this.scrollEnded.dispatch(this._scrollX, this._scrollY); }, SCROLL_END_THRESHOLD); }); } this._ticking = true; } get scrollLeft() { return this._scrollX; } get scrollTop() { return this._scrollY; } } ================================================ FILE: src/util/scroll-observer.js ================================================ import Signal from '../util/signal'; let instance = null; const SCROLL_END_THRESHOLD = 100; // in ms export default class ScrollObserver { constructor() { if (!instance) { instance = this; this.init(); } return instance; } init() { this._scrollX = 0; this._scrollY = 0; this._ticking = false; this.scrolled = new Signal(); this.scrollEnded = new Signal(); window.addEventListener('scroll', this.scrollHandler = (event) => this.onScroll(event)); } onScroll(event) { this._scrollX = window.scrollX; this._scrollY = window.scrollY; if (!this._ticking) { window.requestAnimationFrame(() => { this._ticking = false; this.scrolled.dispatch(this._scrollX, this._scrollY); clearTimeout(this._scrollEndTimeout); this._scrollEndTimeout = setTimeout(() => { this.scrollEnded.dispatch(this._scrollX, this._scrollY); }, SCROLL_END_THRESHOLD); }); } this._ticking = true; } get scrollX() { return this._scrollX; } get scrollY() { return this._scrollY; } } ================================================ FILE: src/util/signal.js ================================================ // TODO Fork https://github.com/thomaseckhardt/js-signals translate to ES6 class SignalBinding { constructor(signal, listener, isOnce, priority) { // Handler function bound to the signal. this._listener = listener; // If binding should be executed just once. this._isOnce = isOnce; // Reference to Signal object that listener is currently bound to. this._signal = signal; // Listener priority this._priority = priority || 0; // If binding is active and should be executed. this._active = true; } _isBound() { return (!!this._signal && !!this._listener); } /** * Call listener passing arbitrary parameters. * If binding was added using `Signal.addOnce()` it will be automatically * removed from signal dispatch queue, this method is used internally for * the signal dispatch. * @param {Array} Array of parameters that should be passed to the listener * @return {*} Value returned by the listener. */ execute(params) { let handlerReturn; if (this._active && !!this._listener) { handlerReturn = this._listener.apply(this._context, params); if (this._isOnce) { this.detach(); } } return handlerReturn; } /** * Detach binding from signal. * - alias to: mySignal.remove(myBinding.getListener()); * @return {Function|null} Handler function bound to the signal or `null` if binding was previously detached. */ detach() { return this._isBound() ? this._signal.remove(this._listener) : null; } get isOnce() { return this._isOnce; } get listener() { return this._listener; } get signal() { return this._signal; } get priority() { return this._priority; } dispose() { delete this._signal; delete this._listener; } toString() { return '[SignalBinding isOnce:' + this._isOnce + ', isBound:' + this.isBound() + ', active:' + this._active + ']'; } } class Signal { constructor() { this._bindings = []; this._prevParams = null; this._active = true; } /** * Add a listener to the signal. * @param {Function} listener Signal handler function. * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) * @return {SignalBinding} An Object representing the binding between the Signal and listener. */ add(listener, priority) { this._validateListener(listener, 'add'); return this._registerListener(listener, false, priority); } addOnce(listener, priority) { this._validateListener(listener, 'addOnce'); return this._registerListener(listener, true, priority); } remove(listener) { this._validateListener(listener, 'remove'); var i = this._indexOfListener(listener); if (i !== -1) { this._bindings[i].dispose(); //no reason to a SignalBinding exist if it isn't attached to a signal this._bindings.splice(i, 1); } return listener; } removeAll() { let n = this._bindings.length; while (n--) { this._bindings[n].dispose(); } this._bindings.length = 0; } has(listener) { return this._indexOfListener(listener) !== -1; } dispatch() { if (!this._active) { return; } let n = this._bindings.length; if (!n) { return; } let params = Array.prototype.slice.call(arguments); let bindings; bindings = this._bindings.slice(); //clone array in case add/remove items during dispatch //execute all callbacks until end of the list or until a callback returns `false` or stops propagation //reverse loop since listeners with higher priority will be added at the end of the list do { n--; } while (bindings[n] && bindings[n].execute(params) !== false); } dispose() { this.removeAll(); delete this._bindings; delete this._prevParams; } _registerListener(listener, isOnce, priority) { let prevIndex = this._indexOfListener(listener); let binding; if (prevIndex !== -1) { binding = this._bindings[prevIndex]; if (binding.isOnce() !== isOnce) { throw new Error(`You cannot add${isOnce ? '' : 'Once'}() then add${!isOnce ? '' : 'Once'}() the same listener without removing the relationship first.`); } } else { binding = new SignalBinding(this, listener, isOnce, priority); this._addBinding(binding); } if (this.memorize && this._prevParams) { binding.execute(this._prevParams); } return binding; } _validateListener(listener, fnName) { if (typeof listener !== 'function') { throw new Error(`listener is a required param of ${fnName}() and should be a Function.`); } } _indexOfListener(listener) { let n = this._bindings.length; let current; while (n--) { current = this._bindings[n]; if (current.listener === listener) { return n; } } return -1; } _addBinding(binding) { var n = this._bindings.length; do { --n; } while (this._bindings[n] && binding.priority <= this._bindings[n].priority); this._bindings.splice(n + 1, 0, binding); } } export default Signal; ================================================ FILE: src/util/transition-end-event.js ================================================ // From Modernizr function whichTransitionEvent() { var t; var el = document.createElement('fakeelement'); var transitions = { 'transition': 'transitionend', 'OTransition': 'oTransitionEnd', 'MozTransition': 'transitionend', 'WebkitTransition': 'webkitTransitionEnd' } for (t in transitions) { if (el.style[t] !== undefined) { return transitions[t]; } } } const TRANSITION_EVENT = whichTransitionEvent(); export default TRANSITION_EVENT; ================================================ FILE: src/visibility/README.md ================================================ --- title: Visibility --- ## Introduction The Audi UI (AUI) **breakpoint** component is … (text follows) ### To include an AUI **breakpoint** component: ```html ``` ================================================ FILE: src/visibility/_visibility.scss ================================================ .aui-visible { display: block !important; &-inline { display: inline !important; } &-inline-block { display: inline-block !important; } } .aui-hidden { display: none !important; } @if $aui-visibility { @each $breakpoint-name in $aui-visibility{ .aui-visible-#{$breakpoint-name}, .aui-visible-#{$breakpoint-name}-inline, .aui-visible-#{$breakpoint-name}-inline-block { display: none !important; } @include aui-respond-to($breakpoint-name) { .aui-visible-#{$breakpoint-name} { display: block !important; } .aui-visible-#{$breakpoint-name}-inline { display: inline !important; } .aui-visible-#{$breakpoint-name}-inline-block { display: inline-block !important; } .aui-hidden-#{$breakpoint-name} { display: none !important; } } } } ================================================ FILE: test/visual/js/test.js ================================================ // Add DOM4 support, https://github.com/WebReflection/dom4 import 'dom4'; // Add Babel polyfill for ES2015, https://babeljs.io/docs/usage/polyfill/ import 'babel-polyfill'; // import FontFaceObserver from 'fontfaceobserver'; // Import all components from Audi UI library import { Alert, Audioplayer, Breadcrumb, Checkbox, Dropdown, Flyout, Header, Modal, Nav, Notification, Pagination, Player, Popover, Progress, Radio, Response, Select, Slider, Indicator, Spinner, Textfield, Tooltip } from '../../../src/index'; // Upgrade all Audi UI components let alertComponents = Alert.upgradeElements(); let breadcrumbComponents = Breadcrumb.upgradeElements(); Audioplayer.upgradeElements(); Checkbox.upgradeElements(); // Dropdown.upgradeElements(); Flyout.upgradeElements(); Header.upgradeElements(); Modal.upgradeElements(); let navComponents = Nav.upgradeElements(); Notification.upgradeElements(); let paginationComponents = Pagination.upgradeElements(); Player.upgradeElements(); Popover.upgradeElements(); let progressComponents = Progress.upgradeElements(); Radio.upgradeElements(); Response.upgradeElements(); Select.upgradeElements(); Slider.upgradeElements(); Indicator.upgradeElements(); let spinnerComponents = Spinner.upgradeElements(); Textfield.upgradeElements(); Tooltip.upgradeElements(); // Import test stuff: import URI from 'urijs'; // ---------------------------------------------------------------------------- // Load SVG sprite with Audi Icons // ---------------------------------------------------------------------------- Array.from(document.querySelectorAll('[data-svg-sprite]')).forEach(element => { const src = element.getAttribute('data-svg-sprite'); if (typeof src === 'string' && src.length > 0) { let ajax = new XMLHttpRequest(); ajax.open('GET', src, true); ajax.responseType = 'document'; ajax.onload = function(event) { element.removeAttribute('data-src'); try { element.appendChild(ajax.responseXML.documentElement); } catch (e) { console.log(e); } }; ajax.send(); } }); // ---------------------------------------------------------------------------- // Demo Spinner and Progress components: // ---------------------------------------------------------------------------- let progress = 0; function demoLoaderProgress() { progress += 0.01; for (var i = 0; i < spinnerComponents.length; i++) { spinnerComponents[i].progress(progress); } for (var i = 0; i < progressComponents.length; i++) { progressComponents[i].progress(progress); } if (progress < 1) { window.requestAnimationFrame(() => demoLoaderProgress()); } else { progress = 0; setTimeout(() => demoLoaderProgress(), 4000); } } setTimeout(() => { for (var i = 0; i < spinnerComponents.length; i++) { spinnerComponents[i].loop(); } }, 2000); setTimeout(() => demoLoaderProgress(), 2000); // ---------------------------------------------------------------------------- // Demo Spinner and Progress components: // ---------------------------------------------------------------------------- Array.from(document.querySelectorAll('[data-toggle="modal"]')).forEach(element => { element.addEventListener('click', (event) => { let modal = Modal.getModalById(element.getAttribute('data-target')); if (modal) { modal.open(event.currentTarget); } }); }); Array.from(document.querySelectorAll('[data-dismiss="modal"]')).forEach(element => { element.addEventListener('click', (event) => { Modal.closeCurrentModal(); }); }); // ---------------------------------------------------------------------------- // Update components after font 'Audi Type' was loaded: // ---------------------------------------------------------------------------- let fontFaceObserverScreen = new FontFaceObserver('AudiTypeScreen'); fontFaceObserverScreen.load().then(function() { paginationComponents.forEach(component => { component.update(); }); breadcrumbComponents.forEach(component => { component.update(); }); alertComponents.forEach(component => { component.update(); }); }, function() { // Error handling: Font is not available or timeout. console.warn('Warning: AudiTypeScreen not available.'); }); let fontFaceObserverExtended = new FontFaceObserver('AudiTypeExtended'); fontFaceObserverExtended.load().then(function() { navComponents.forEach(component => { component.update(); }); }, function() { // Error handling: Font is not available or timeout. console.warn('Warning: AudiTypeExtended not available.'); }); // ---------------------------------------------------------------------------- // Color switch: // ---------------------------------------------------------------------------- if (document.getElementById('change-color')) { var textColors = { 'white': 'dark', 'black': 'light', 'silver': 'light', 'warmsilver': 'light', 'red': 'light', 'image': 'dark', 'imagedark': 'light', }; function colorChange(val) { var invert = (textColors[val] !== 'dark'); $('body') .removeClass(function(index, css) { return (css.match(/\baui-color-\S+/g) || []).join(' '); }) .addClass('aui-color-' + val) .removeClass(function(index, css) { return (css.match(/\baui-color-text-\S+/g) || []).join(' '); }) .addClass('aui-color-text-' + textColors[val]); $('.test-section .aui-spinner').toggleClass('is-inverted', invert); $('.test-section .aui-progress').toggleClass('is-inverted', invert); var component; var componentsWithTheme = [ 'breadcrumb', 'slider', 'dropdown', 'nav', ]; for (var i = 0; i < componentsWithTheme.length; i++) { component = componentsWithTheme[i]; $('.test-section .aui-' + component).toggleClass('aui-theme-black', val === 'black'); $('.test-section .aui-' + component).toggleClass('aui-theme-silver', val === 'silver'); $('.test-section .aui-' + component).toggleClass('aui-theme-warmsilver', val === 'warmsilver'); $('.test-section .aui-' + component).toggleClass('aui-theme-red', val === 'red'); } var componentsTextWithTheme = [ 'button', 'draggable-list', 'dropzone', 'pager', 'pagination', 'slidernav', 'textfield', 'flyout', 'spinner', 'progress', 'switch', 'radio', 'checkbox', 'fieldset', 'select', 'table', ]; for (var i = 0; i < componentsTextWithTheme.length; i++) { component = componentsTextWithTheme[i]; $('.test-section .aui-' + component).each(function(element, index){ if (!$(this).hasClass('aui-theme-image')) { $(this).toggleClass('aui-theme-light', invert); } }); } } $('#change-color').on('change', function(event) { colorChange($(this).val()); }); var uri = URI(window.location.href); var color = uri.query(true).color; if (color !== undefined) { if (['black', 'silver', 'warmsilver', 'red'].indexOf(color) >= 0) { $('#change-color').val(color); } } colorChange($('#change-color').val()); } ================================================ FILE: test/visual/pages/_layouts/default.nunjucks ================================================ {% import 'pages/_shared/section.nunjucks' as section %} {% block title %}Audi UI Test{% endblock %} {% block head %}{% endblock %} {% block outside %}{% endblock %} {% block body %}
{% block page %}{% endblock %}
{% endblock %}
{% block javascript %}{% endblock %} ================================================ FILE: test/visual/pages/_layouts/page-color.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% block page %}
{% include 'pages/_shared/nav.nunjucks' %}
{% include 'pages/_shared/color-control.nunjucks' %}
{% block main %}{% endblock %}
{% endblock %} ================================================ FILE: test/visual/pages/_layouts/page.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% block page %}
{% include 'pages/_shared/nav.nunjucks' %}
{% block main %}{% endblock %}
{% endblock %} ================================================ FILE: test/visual/pages/_macros/helpers.nunjucks ================================================ {% macro sprite(id, viewBox, classes) %} {% set viewBox = viewBox or "0 0 1 1"%} {% endmacro %} ================================================ FILE: test/visual/pages/_macros/icon.nunjucks ================================================ {% macro sprite(name, spriteUrl, classes = '', large = false, smart = false) %} {% set size = (24 if smart else (48 if large else 24)) %} {% set id = name + ('' if smart else ('-large' if large else '-small')) %} {% set classes = classes + (' audiicon--smart' if smart else '') %} {% set classes = classes + (' audiicon--large' if large else '') %} {# TODO aria-hidden="true" or role="presentation" #} {% endmacro %} ================================================ FILE: test/visual/pages/_macros/section.nunjucks ================================================ {% macro header(label) %}

{{ label }}

{% endmacro %} ================================================ FILE: test/visual/pages/_shared/color-control.nunjucks ================================================
================================================ FILE: test/visual/pages/_shared/demo-content.nunjucks ================================================

The New Yorker

Samuel Delany and the Past and Future of Science Fiction

In 1968, Samuel Delany attended the third annual Nebula Awards, presented by the Science Fiction and Fantasy Writers of America (SFWA). At the ceremony that night, “an eminent member of the SFWA,” as Delany later put it, gave a speech about changes in science fiction, a supposed shift away from old-fashioned storytelling to “pretentious literary nonsense,” or something along those lines. At the previous Nebula Awards, the year before, Delany had won best novel for “Babel-17,” in which an invented language has the power to destroy (his book shared the award with Daniel Keyes’s “Flowers for Algernon”), and earlier on that evening in 1968, Delany had again won best novel, for “The Einstein Intersection,” which tells of an abandoned Earth colonized by aliens, who elevate the popular culture of their new planet into divine myths. Sitting at his table, listening to the speech, Delany realized that he was one of its principal targets. Minutes later, he won another award, this time in the short-story category, for “Aye, and Gomorrah … ,” a tale of neutered space explorers who are fetishized back on Earth. As he made his way back to his seat after accepting the award, Isaac Asimov took Delany by the arm, pulled him close, and, as Delany (who goes by the nickname Chip) recalled in his essay “Racism and Science Fiction,” said: “You know, Chip, we only voted you those awards because you’re Negro … !”

“Delany said he was dismayed by all this, but not surprised. “The context changes, he told me, but the rhetoric remains the same.”
From the beginning, Delany, in his fiction, has pushed across the traditional boundaries of science fiction, embraced the other, and questioned received ideas about sex and intimacy.
Photograph by Michael S. Writz / Philadelphia Inquirer / MCT / Landov

It was meant to be a Joke

It was meant to be a joke, Delany immediately recognized; Asimov was trying, Delany later wrote, “to cut through the evening’s many tensions” with “a self-evidently tasteless absurdity.” The award wasn’t meant to decide what science fiction should be, conventional or experimental, pulpy or avant garde. After all, where else but science fiction should experiments take place? It must be—wink, wink—that Delany’s being black is the reason he won.

Delany was born in 1942, in Harlem. His mother was a library clerk and his father owned a funeral home. He started writing in his teens, and he turned to science fiction not because he viewed the genre as particularly open to a young black man from Harlem but because, he said, “I read it. It was in front of me.” He married the poet Marilyn Hacker, in 1961, and soon after she took a job at Ace Books, an important publisher of paperback science fiction and fantasy. Hacker dropped one of Delany’s novels into a slush pile under a pen name. In 1962, Ace published the manuscript as “The Jewels of Aptor.” (That work is being reprinted this month alongside two other early novels, in a collection titled “A, B, C: Three Short Novels.”) Delany became something of a wunderkind in the science-fiction world. “You are accepted,” he says, “by the genre that can accept you.”

Out Loud:
Women in Science Fiction

No matter how he upends conventions, though, one rarely gets the sense that Delany is trying to shock his readers. “There is nothing in ‘Through the Valley of the Nest of Spiders’ that you can't find on Google in five minutes,” he told me.

Watch:

Just because such acts are not often talked about in polite company does not mean they don’t exist, he said.

Out Loud: Women in Science Fiction
Dhalgren
================================================ FILE: test/visual/pages/_shared/nav.nunjucks ================================================ ================================================ FILE: test/visual/pages/_shared/section.nunjucks ================================================ {% macro header(label) %}

{{ label }}

{% endmacro %} ================================================ FILE: test/visual/pages/audioplayer/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Basic audioplayer') }}
{% include 'audioplayer/snippets/audioplayer-basic.html' %}
{#
{{ section.header('Audioplayer with downloadable content & mute functionality') }}
{% include 'audioplayer/snippets/audioplayer-download.html' %}
{{ section.header('Audioplayer with playlist functionality') }}
{% include 'audioplayer/snippets/audioplayer-playlist.html' %}
{{ section.header('Audioplayer with volume control button') }}
{% include 'audioplayer/snippets/audioplayer-volume-control.html' %}
{{ section.header('Audioplayer with small cover') }}
{% include 'audioplayer/snippets/audioplayer-cover-small.html' %}
#} {% endblock %} ================================================ FILE: test/visual/pages/button/floating.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block page %} {% include 'button/snippets/button-floating.html' %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} {% block javascript %} {% endblock %} ================================================ FILE: test/visual/pages/button/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %} {#
{{ section.header('Button') }}
{% include 'button/snippets/button.html' %}

Bold

{% include 'button/snippets/button-bold.html' %}

Disabled state

{% include 'button/snippets/button-disabled.html' %}
#}
{{ section.header('Button text style') }}
{% include 'button/snippets/button-text.html' %}

Disabled state

{% include 'button/snippets/button-text-disabled.html' %}
{{ section.header('Button primary style') }}
{% include 'button/snippets/button-primary.html' %}

Disabled state

{% include 'button/snippets/button-primary-disabled.html' %}
{{ section.header('Button primary style with icon') }}
{% include 'button/snippets/button-primary-with-icon.html' %}

Disabled state

{% include 'button/snippets/button-primary-with-icon-disabled.html' %}
{{ section.header('Button primary style with icon on the right') }}
{% include 'button/snippets/button-primary-with-icon-right.html' %}

Disabled state

{% include 'button/snippets/button-primary-with-icon-right-disabled.html' %}
{{ section.header('Button secondary style') }}
{% include 'button/snippets/button-secondary.html' %}

Disabled state

{% include 'button/snippets/button-secondary-disabled.html' %}
{{ section.header('Button secondary style with icon') }}
{% include 'button/snippets/button-secondary-with-icon.html' %}

Disabled state

{% include 'button/snippets/button-secondary-with-icon-disabled.html' %}
{{ section.header('Button secondary style with icon on the right') }}
{% include 'button/snippets/button-secondary-with-icon-right.html' %}

Disabled state

{% include 'button/snippets/button-secondary-with-icon-right-disabled.html' %}
{{ section.header('Button icon style with small system icon') }}
{% include 'button/snippets/button-icon.html' %}

Disabled state

{% include 'button/snippets/button-icon-disabled.html' %}
{{ section.header('Button icon style with large system icon') }}
{% include 'button/snippets/button-icon-large.html' %}

Disabled state

{% include 'button/snippets/button-icon-large-disabled.html' %}
{{ section.header('Floating button with icon') }}
The Floating Button is fixed to the bottom right of the viewport. {% include 'button/snippets/button-floating.html' %}
Floating Button demo page
Sticky and stretched button demo page
{#
{{ section.header('Special examples like multiline buttons') }}
#} {% endblock %} ================================================ FILE: test/visual/pages/button/sticky.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block page %} {% include 'button/snippets/button-primary-sticky.html' %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} {% block javascript %} {% endblock %} ================================================ FILE: test/visual/pages/button-group/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Button Group of two Text Buttons') }}
{% include 'button-group/snippets/button-group-two-text.html' %}
{{ section.header('Button Group of two Secondary Buttons') }}
{% include 'button-group/snippets/button-group-two-secondary.html' %}
{{ section.header('Button Group of Primary and Secondary Button') }}
{% include 'button-group/snippets/button-group-primary-secondary.html' %}
{{ section.header('Special Button Group of (System) Icon Buttons') }}
{% include 'button-group/snippets/button-group-icons.html' %}
{% endblock %} ================================================ FILE: test/visual/pages/card/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Card with cover image ( element)') }}
{{ section.header('Card') }}

Small text

Headline

This is a short text for this card. Image with max-width.

{% include 'card/snippets/card-actions.html' %}
{{ section.header('Card') }}

Grow and shrink

Use align-right and align-center on card content to align Button Group as you want.

December

24

Your Confi­guration

30.02.2025

{% include 'button/snippets/button-icon-large.html' %} {% include 'button/snippets/button-icon-large.html' %}
NPR

WRWA / 88.7 FM

{% include 'button/snippets/button-icon-large.html' %}
{% endblock %} ================================================ FILE: test/visual/pages/draganddrop/dropzone-fullpage.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block page %} {% include 'dropzone/snippets/dropzone-fullpage.html' %} {% include 'pages/_shared/demo-content.nunjucks' %} {% endblock %} ================================================ FILE: test/visual/pages/draganddrop/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Draggable') }}
{% include 'draggable/snippets/draggable-list.html' %}

While active dragging

{% include 'draggable/snippets/draggable-list-active.html' %}
{{ section.header('Dropzone') }}
{% include 'dropzone/snippets/dropzone.html' %} {#

While active dragging

Full-page dropzone #}
{% endblock %} ================================================ FILE: test/visual/pages/form/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %} {# #}
{{ section.header('Select') }}
{% include 'select/snippets/select.html' %}

Invalid

{% include 'select/snippets/select-invalid.html' %}

Disabled

{% include 'select/snippets/select-disabled.html' %}
{{ section.header('Fieldset with Selects') }}
{% include 'fieldset/snippets/fieldset-selects.html' %}

Invalid state

{% include 'fieldset/snippets/fieldset-selects-invalid.html' %}
{{ section.header('Textfield') }}
{% include 'textfield/snippets/textfield-floating-label.html' %}

Invalid state

{% include 'textfield/snippets/textfield-invalid.html' %}

Valid state

{% include 'textfield/snippets/textfield-valid.html' %}

Disabled state

{% include 'textfield/snippets/textfield-disabled.html' %}
{{ section.header('Textfield with Icon') }}
{% include 'textfield/snippets/textfield-icon.html' %}
{{ section.header('Multiline Textfield') }}
{% include 'textfield/snippets/textfield-multiline.html' %}

Invalid state

{% include 'textfield/snippets/textfield-multiline-invalid.html' %}

Disabled state

{% include 'textfield/snippets/textfield-multiline-disabled.html' %}
{{ section.header('Multiline Textfield with Counter') }}
{% include 'textfield/snippets/textfield-multiline-counter.html' %}
{{ section.header('Fieldset with Textfields') }}
{% include 'fieldset/snippets/fieldset-textfields.html' %}

Invalid state

{% include 'fieldset/snippets/fieldset-textfields-invalid.html' %}
{{ section.header('Checkbox') }}

Default and Checked

{% include 'checkbox/snippets/checkbox.html' %}
{% include 'checkbox/snippets/checkbox-checked.html' %}

Invalid states

{% include 'checkbox/snippets/checkbox-invalid.html' %}
{% include 'checkbox/snippets/checkbox-checked-invalid.html' %}

Disabled states

{% include 'checkbox/snippets/checkbox-disabled.html' %}
{% include 'checkbox/snippets/checkbox-checked-disabled.html' %}
{{ section.header('Radio') }}

Default and Checked

Disabled states

{% include 'radio/snippets/radio.html' %}
{% include 'radio/snippets/radio-disabled.html' %}
{% include 'radio/snippets/radio-checked.html' %}
{% include 'radio/snippets/radio-checked-disabled.html' %}
{{ section.header('Fieldset with Radios') }}
{% include 'fieldset/snippets/fieldset-radios.html' %}

Invalid state

{% include 'fieldset/snippets/fieldset-radios-invalid.html' %}
{{ section.header('Slider') }}
{% include 'slider/snippets/slider-output.html' %}

Disabled state

{% include 'slider/snippets/slider-disabled.html' %}

Range Slider

{% include 'slider/snippets/slider-range.html' %}

Range Slider disabled state

{% include 'slider/snippets/slider-range-disabled.html' %}
{#
{{ section.header('Alignment Test') }}
{% include 'textfield/snippets/textfield-floating-label.html' %}
{% include 'select/snippets/select.html' %}
{% include 'dropdown/snippets/dropdown.html' %}
#} {% endblock %} ================================================ FILE: test/visual/pages/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% block main %}
Audi UI Demo Page
{% endblock %} ================================================ FILE: test/visual/pages/loading/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Spinner') }}
{% include 'spinner/snippets/spinner.html' %}
{{ section.header('Continuous Spinner') }}
{% include 'spinner/snippets/continuous-spinner.html' %}
{{ section.header('Progress') }}
{% include 'progress/snippets/progress.html' %}
{{ section.header('Continuous Progress') }}
{% include 'progress/snippets/continuous-progress.html' %}
{% endblock %} ================================================ FILE: test/visual/pages/modal/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %} {% include 'modal/snippets/modal.html' %} {% include 'modal/snippets/modal-window.html' %} {% include 'modal/snippets/modal-layer.html' %} {% include 'modal/snippets/modal-morphing-layer.html' %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/navigation/header.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block main %}

The New Yorker

Samuel Delany and the Past and Future of Science Fiction

In 1968, Samuel Delany attended the third annual Nebula Awards, presented by the Science Fiction and Fantasy Writers of America (SFWA). At the ceremony that night, “an eminent member of the SFWA,” as Delany later put it, gave a speech about changes in science fiction, a supposed shift away from old-fashioned storytelling to “pretentious literary nonsense,” or something along those lines. At the previous Nebula Awards, the year before, Delany had won best novel for “Babel-17,” in which an invented language has the power to destroy (his book shared the award with Daniel Keyes’s “Flowers for Algernon”), and earlier on that evening in 1968, Delany had again won best novel, for “The Einstein Intersection,” which tells of an abandoned Earth colonized by aliens, who elevate the popular culture of their new planet into divine myths. Sitting at his table, listening to the speech, Delany realized that he was one of its principal targets. Minutes later, he won another award, this time in the short-story category, for “Aye, and Gomorrah … ,” a tale of neutered space explorers who are fetishized back on Earth. As he made his way back to his seat after accepting the award, Isaac Asimov took Delany by the arm, pulled him close, and, as Delany (who goes by the nickname Chip) recalled in his essay “Racism and Science Fiction,” said: “You know, Chip, we only voted you those awards because you’re Negro … !”

{% include 'header/snippets/header-sticky.html' %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} {% block javascript %}{% endblock %} ================================================ FILE: test/visual/pages/navigation/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Flyout') }}

left

{% include 'flyout/snippets/flyout.html' %}

center

{% include 'flyout/snippets/flyout-center.html' %}

right

{% include 'flyout/snippets/flyout-right.html' %}
{# #} {# #} {# #} {% endblock %} ================================================ FILE: test/visual/pages/notification/alert-animate.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block outside %} {% include 'alert/snippets/alert-animate.html' %} {% endblock %} {% block page %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/notification/alert-danger.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block outside %} {% include 'alert/snippets/alert-danger.html' %} {% endblock %} {% block page %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/notification/alert-sticky.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block outside %} {% include 'alert/snippets/alert-sticky.html' %} {% endblock %} {% block page %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/notification/alert-success.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block outside %} {% include 'alert/snippets/alert-success.html' %} {% endblock %} {% block page %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/notification/alert-warning.nunjucks ================================================ {% extends 'pages/_layouts/default.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% block outside %} {% include 'alert/snippets/alert-warning.html' %} {% endblock %} {% block page %}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/notification/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Alert Component') }}
{{ section.header('Notification Component') }}
(See top right corner.)
{% include 'notification/snippets/notification.html' %} {% include 'notification/snippets/notification-light.html' %} {% include 'notification/snippets/notification.html' %} {% include 'notification/snippets/notification-light.html' %}
{{ section.header('Badge Component') }}

Generic badge

{# {% include 'badge/snippets/badge-small.html' %} #} {% include 'badge/snippets/badge-single-digit.html' %} {% include 'badge/snippets/badge.html' %} {% include 'badge/snippets/badge-small-text.html' %} {# {% include 'badge/snippets/badge-success.html' %} {% include 'badge/snippets/badge-warning.html' %} {% include 'badge/snippets/badge-danger.html' %} #} {#

Badges on black

99 {% include 'badge/snippets/badge-danger.html' %}
#}

Show/hide badge

{% include 'badge/snippets/badge-hidden.html' %}

Generic small badge

{% include 'badge/snippets/badge-small.html' %}
{% include 'badge/snippets/badge-small-label.html' %}
{% include 'badge/snippets/badge-small-label-small.html' %}
{% include 'badge/snippets/badge-small-icon.html' %}

Signal badge

{% include 'badge/snippets/badge-signal-yellow.html' %}
{% include 'badge/snippets/badge-signal-green.html' %}
{% include 'badge/snippets/badge-signal-red.html' %}

Charging badge

{% include 'badge/snippets/badge-charging-blue.html' %}
{% include 'badge/snippets/badge-charging-green.html' %}
{% endblock %} {% block javascript %} {% endblock %} ================================================ FILE: test/visual/pages/pagination/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Indicator') }}
{% include 'indicator/snippets/indicator.html' %}

Image theme with shadow

{# {% include 'indicator/snippets/indicator-image.html' %} #}
{% include 'indicator/snippets/indicator.html' %}
{{ section.header('Pager') }}

Normal Pager

{% include 'pager/snippets/pager.html' %}

Minimal Pager

{% include 'pager/snippets/pager-minimal.html' %}

Pager with pagination

{% include 'pager/snippets/pager-pagination.html' %}
{{ section.header('Pagination') }}
{% include 'pagination/snippets/pagination.html' %}
{% endblock %} ================================================ FILE: test/visual/pages/player/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Player with chrome') }}
{% include 'player/snippets/player_video-container.html' %} {% include 'player/snippets/player_chrome.html' %}

Complete state (and without preview)

{% include 'player/snippets/player_video-container.html' %} {% include 'player/snippets/player_chrome.html' %}
{{ section.header('Player with large button') }}
{% include 'player/snippets/player_video-container.html' %} {% include 'player/snippets/player_overlay.html' %} {% include 'player/snippets/player_large-button.html' %}

Complete state

{% include 'player/snippets/player_video-container.html' %} {% include 'player/snippets/player_overlay.html' %} {% include 'player/snippets/player_large-button.html' %}
{% endblock %} {% block javascript %} {% endblock %} ================================================ FILE: test/visual/pages/popover/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Popover') }}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

{% include 'popover/snippets/popover.html' %}
{% include 'popover/snippets/popover-image.html' %}
{% include 'popover/snippets/popover-dark.html' %}
{{ section.header('Popover placement') }}
{% include 'pages/_shared/demo-content.nunjucks' %}
{% endblock %} ================================================ FILE: test/visual/pages/switch/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Switch') }}
{% include 'switch/snippets/switch.html' %}

Disabled state

{% include 'switch/snippets/switch-disabled.html' %}
{{ section.header('Switch checked') }}
{% include 'switch/snippets/switch-checked.html' %}

Disabled state

{% include 'switch/snippets/switch-checked-disabled.html' %}
{{ section.header('Switch with text on the left') }}
{% include 'switch/snippets/switch-text-left.html' %}

Disabled state

{% include 'switch/snippets/switch-text-left-disabled.html' %}
{{ section.header('Switch without text') }}
{% include 'switch/snippets/switch-without-text.html' %} (Just some text to control positioning.)
{#
{{ section.header('Switch with equal options') }}
{% include 'switch/snippets/switch-equal.html' %}

Disabled state

{% include 'switch/snippets/switch-equal-disabled.html' %}

Checked and disabled state

{% include 'switch/snippets/switch-equal-checked-disabled.html' %}
#} {% endblock %} ================================================ FILE: test/visual/pages/table/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Table stretched to 100% width') }}
{% include 'table/snippets/table-stretched.html' %}
{{ section.header('Table with responsive behaviour') }}
{% include 'table/snippets/table-responsive.html' %}
{{ section.header('Table stretched to 100% width with responsive behaviour') }}
{% include 'table/snippets/table-stretched-responsive.html' %}
{{ section.header('Table with colored and padded cells') }}
{% include 'table/snippets/table-colored.html' %}
{% endblock %} ================================================ FILE: test/visual/pages/tooltip/index.nunjucks ================================================ {% extends 'pages/_layouts/page.nunjucks' %} {% import 'pages/_macros/icon.nunjucks' as icon %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Tooltip on light background') }}
{% include 'tooltip/snippets/tooltip.html' %}
{% include 'tooltip/snippets/tooltip-dark.html' %}
{{ section.header('Tooltip with images on light background') }}
{% include 'tooltip/snippets/tooltip-image.html' %}
{% include 'tooltip/snippets/tooltip-image-dark.html' %}
{{ section.header('Tooltip on dark background') }}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis nostrud exercitation ullamco laborisnisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
{{ section.header('Tooltip with image on dark background') }}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
{% endblock %} ================================================ FILE: test/visual/pages/typography/index.nunjucks ================================================ {% extends 'pages/_layouts/page-color.nunjucks' %} {% import 'pages/_macros/section.nunjucks' as section %} {% block main %}
{{ section.header('Headline 1') }}
{% include 'typography/snippets/headline-1.html'%}
{{ section.header('Headline 2') }}
{% include 'typography/snippets/headline-2.html'%}
{{ section.header('Headline 3') }}
{% include 'typography/snippets/headline-3.html'%}
{{ section.header('Headline 4') }}
{% include 'typography/snippets/headline-4.html'%}
{{ section.header('Headline 5') }}
{% include 'typography/snippets/headline-5.html'%}
{{ section.header('Headline 6') }}
{% include 'typography/snippets/headline-6.html'%}
{{ section.header('Paragraphs') }}
{% include 'typography/snippets/paragraph.html'%}

Shortread

{% include 'typography/snippets/paragraph-shortread.html'%}

Big text

{% include 'typography/snippets/paragraph-big.html'%}

Small text

{% include 'typography/snippets/paragraph-small.html'%}

Caption

{% include 'typography/snippets/paragraph-caption.html'%}
{{ section.header('List with arrows') }}
{% include 'typography/snippets/list-arrow.html'%}
{{ section.header('List numbered') }}
{% include 'typography/snippets/list-number.html'%}
{% endblock %} ================================================ FILE: test/visual/scss/components/align.scss ================================================ .align-right { text-align: right; } .align-center { text-align: center; } ================================================ FILE: test/visual/scss/components/color.scss ================================================ .aui-color { &-image, &-imagedark { background-attachment: fixed; background-repeat: no-repeat; background-position: center; background-size: cover; } &-image { background-image: url('../content/image.jpg'); } &-imagedark { background-image: url('../content/image-dark.jpg'); } } ================================================ FILE: test/visual/scss/components/control.scss ================================================ .test-control { padding: 1em; @include fontfamily; font-family: $aui-font-default; font-size: 12px; font-weight: 400; line-height: normal; background-color: lighten(#bbb4ae, 20%); color: $demo-highlight; background: rgba($demo-highlight, 0.5); border-bottom: 1px solid rgba($demo-highlight, 0.25); &__setting { font-family: $aui-font-default; display: inline-block; margin-right: 36px; } } ================================================ FILE: test/visual/scss/components/header.scss ================================================ .test-header { } ================================================ FILE: test/visual/scss/components/main.scss ================================================ .test-main { display: block; padding: unit(10) 0 unit(20); } ================================================ FILE: test/visual/scss/components/nav.scss ================================================ .test-nav { display: flex; flex-flow: row wrap; margin: 0; padding: 0; @include fontfamily; font-size: 12px; font-weight: 400; line-height: normal; list-style: none; background: $demo-highlight; border-bottom: 1px solid rgba($demo-highlight, 0.25); &__item { flex: 1 0 auto; } &__action { display: block; padding: .25em 1em; margin: 1px; color: $aui-color-white; background: rgba(0, 0, 0, 0.1); text-align: center; font-family: $aui-font-default; &:hover { background: $aui-color-gray20; } } } ================================================ FILE: test/visual/scss/components/section.scss ================================================ .test-section { // margin-left: auto; // margin-right: auto; // padding-left: $aui-grid-container-offset; // padding-right: $aui-grid-container-offset; @extend .aui-layout; padding-top: unit(10); &__title { padding: unit(4) 0 calc(#{unit(1)} - 1px); margin-bottom: unit(4); padding: unit(1) unit(2); font-family: $aui-font-default; font-size: 12px; font-weight: bold; line-height: unit(4); color: white; background: $demo-highlight; } &__headline { display: block; padding: unit(4) 0 calc(#{unit(1)} - 1px); margin-top: unit(4); margin-bottom: unit(4); padding: unit(1) unit(2); font-family: $aui-font-default; font-size: 12px; font-weight: bold; line-height: unit(4); color: white; background: rgba($demo-highlight, 0.5); } & + & { margin-top: unit(30); } } ================================================ FILE: test/visual/scss/components/snippet.scss ================================================ .test-snippet { &-title { margin: unit(6) 0 calc(#{unit(4)} - 1px); @include fontfamily; font-size: 12px; font-weight: bold; line-height: unit(4); color: white; background: rgba($demo-highlight, .5); padding: unit(1) unit(2); } &-divider { height: unit(4); } } ================================================ FILE: test/visual/scss/components/spacing.scss ================================================ .margin { @for $i from 1 through 10 { &-top-#{$i} { margin-top: unit($i) !important; } &-bottom-#{$i} { margin-bottom: unit($i) !important; } &-vertical-#{$i} { margin-top: unit($i) !important; margin-bottom: unit($i) !important; } } } .leader { $steps: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100; @each $i in $steps { &-#{$i} { margin-top: unit($i) !important; } } } .trailer { $steps: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100; @each $i in $steps { &-#{$i} { margin-bottom: unit($i) !important; } } } .leader-padding { $steps: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100; @each $i in $steps { &-#{$i} { padding-top: unit($i) !important; } } } .trailer-padding { $steps: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100; @each $i in $steps { &-#{$i} { padding-bottom: unit($i) !important; } } } ================================================ FILE: test/visual/scss/mixins.scss ================================================ @mixin fontfamily { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; } ================================================ FILE: test/visual/scss/test.scss ================================================ // Import Audi Type: $auditype-font-src: '../fonts'; @import '/node_modules/@audi/audi-type/dist/css/audi-type.css'; // Import Audi Icon: @import '/node_modules/@audi/audi-icon/dist/css/audi-icon.css'; // Import library requirements: @import '../../../src/requirements'; // Import Audi UI library: @import '../../../src/index'; // Import and define demo stuff: $demo-highlight: #0096ED; $demo-highlight-opacity: 1; @import 'mixins'; @import 'components/align'; @import 'components/color'; @import 'components/control'; @import 'components/header'; @import 'components/main'; @import 'components/nav'; @import 'components/section'; @import 'components/snippet'; @import 'components/spacing';