hash,date,author,commit_message,is_merge,masked_commit_message,type,git_diff be41cb9cf4330535651067d66b92dd2bbacecb05,2023-08-19 00:15:11,John Leider,docs: multiple updates to settings and the app bar,False,multiple updates to settings and the app bar,docs,"diff --git a/packages/docs/src/components/app/bar/JobsLink.vue b/packages/docs/src/components/app/bar/JobsLink.vue index 140500dbad4..601f96a5032 100644 --- a/packages/docs/src/components/app/bar/JobsLink.vue +++ b/packages/docs/src/components/app/bar/JobsLink.vue @@ -1,31 +1,20 @@ diff --git a/packages/docs/src/components/app/settings/options/ApiOption.vue b/packages/docs/src/components/app/settings/options/ApiOption.vue index 5193a73c207..40904fd2c7e 100644 --- a/packages/docs/src/components/app/settings/options/ApiOption.vue +++ b/packages/docs/src/components/app/settings/options/ApiOption.vue @@ -1,15 +1,25 @@ -``` - -## Usage - -Let's try a real world example with a `v-dialog` component. that you want to convert to a **full-screen** dialog on mobile devices. To track this we would need to determine the same of the screen relative to the value we are comparing to. In the following snippet we use the `mounted` and `beforeDestroy` lifecycle hooks to bind a _scroll_ listener to the `window`. - -```html - - - -``` - -Even opting to use the [v-resize](/directives/resizing/) directive would require unnecessary boilerplate. Instead, let's access the **mobile** property of the `$vuetify.breakpoint` object. This will return boolean value of `true` or `false` depending upon if the current viewport is larger or smaller than the **mobile-breakpoint** option. - -```html - - - -``` - -The breakpoint service is _dynamic_ and updates when Vuetify **initially** boots and when the viewport is **resized**. - -### Breakpoint service object - -The following is the public signature for the breakpoint service: - -```ts -{ - // Breakpoints - xs: boolean - sm: boolean - md: boolean - lg: boolean - xl: boolean - - // Conditionals - xsOnly: boolean - smOnly: boolean - smAndDown: boolean - smAndUp: boolean - mdOnly: boolean - mdAndDown: boolean - mdAndUp: boolean - lgOnly: boolean - lgAndDown: boolean - lgAndUp: boolean - xlOnly: boolean - - // true if screen width < mobileBreakpoint - mobile: boolean - mobileBreakpoint: number - - // Current breakpoint name (e.g. 'md') - name: string - - // Dimensions - height: number - width: number - - // Thresholds - // Configurable through options - { - xs: number - sm: number - md: number - lg: number - } - - // Scrollbar - scrollBarWidth: number -} -``` - -Access these properties within Vue files by referencing `$vuetify.breakpoint.`; where property corresponds to a value listed in the [Breakpoint service](#breakpoint-service-object) object. In the following snippet we log the current viewport **width** to the console once the component fires the mounted lifecycle hook: - -```html - - - -``` - -While the `$vuetify` object supports SSR (Server-Side Rendering) including platforms such as NUXT, the breakpoint service detects the _height and width_ `window` values as **0**. This sets the initial breakpoint size to **xs** and in some cases can cause the layout to _snap_ in place when the client side is hydrated in NUXT. In the upcoming section we demonstrate how to use `boolean` breakpoint values in the *template and script* tags of Vue components. - -### Breakpoint conditionals - -The breakpoint and conditional values return a `boolean` that is derived from the current viewport size. Additionally, the breakpoint service mimics the [Vuetify Grid](/components/grids) naming conventions and has access to properties such as `xlOnly`, `xsOnly`, `mdAndDown`, and others. In the following example we change the minimum height of `v-sheet` to **300** when on the _extra small_ breakpoint and only show rounded corners on extra small screens: - -```html - - - -``` - -These *conditional values* enable responsive functionality to Vuetify features that don't support responsive by default or at all. In the next section we customize the **default** breakpoint values used in both _JavaScript and CSS_. - -### Mobile breakpoints - - - **New in v2.3.0+** - - -The **mobileBreakpoint** option accepts breakpoint names (*xs, sm, md, lg, xl*) as a valid configuration option. Once set, the provided value is _propagated_ to supporting components such as [v-navigation-drawer](/components/navigation-drawers/). - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -export default new Vuetify({ - breakpoint: { - mobileBreakpoint: 'sm' // This is equivalent to a value of 960 - }, -}) -``` - -Individual components can override their inherited **default** values by using the **mobile-breakpoint** property. In the following example we force `v-banner` into a *mobile state* when the viewport size is less than _1024px_: - -```html - -``` - -In the next section we explore how to customize the **thresholds** that determine size breaks. - -### Thresholds - - - This section modifies the `$grid-breakpoints` SASS variable. More information on setup is available on the [SASS variables](/customization/sass-variables/) page. - - -The **thresholds** option modifies the values used for *viewport calculations*. The following snippet overrides *xs through lg* breakpoints and increases **scrollBarWidth** to _24_. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -export default new Vuetify({ - breakpoint: { - thresholds: { - xs: 340, - sm: 540, - md: 800, - lg: 1280, - }, - scrollBarWidth: 24, - }, -}) -``` - -You may notice that there is no `xl` property on the **breakpoint service**; this is intentional. Viewport calculations always start at _0_ and work their way up. A value of _340_ for the `xs` threshold means that a window size of _0 to 340_ is considered to be an *extra small* screen. - -To propagate these changes to *css helper classes* we need to update the `$grid-breakpoints` SASS variable with our new values. On **large and extra-large** screens we *subtract* width of the browser's scrollbar from the defined breakpoints. - -```scss -// styles/variables.scss - -$grid-breakpoints: ( - 'xs': 0, - 'sm': 340px, - 'md': 540px, - 'lg': 800px - 24px, - 'xl': 1280px - 24px -); -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/global-config.md b/packages/docs-next/src/pages/de-DE/customization/global-config.md deleted file mode 100644 index 916fe249620..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/global-config.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -meta: - title: Global Configuration - description: Vuetify.config is an object containing global configuration options that modify the bootstrapping of your project. - keywords: vuetify config, global config, global vuetify config, configure vuetify options -related: - - /customization/accessibility/ - - /customization/a-la-carte/ - - /customization/presets/ ---- - -# Global Configuration - -Vuetify.config is an object containing global configuration options that modify bootstrapping options. - - - -## silent - -This option suppresses *all* Vuetify logs and warnings. - -* **Type:** `boolean` -* **Default:** `false` - -```js -// src/plugins/vuetify.js - -import Vuetify from 'vuetify/lib' - -Vuetify.config.silent = true -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/icons.md b/packages/docs-next/src/pages/de-DE/customization/icons.md deleted file mode 100644 index 2cc9b60e980..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/icons.md +++ /dev/null @@ -1,614 +0,0 @@ ---- -meta: - title: Icons - description: Vuetify supports Material Design Icons, Font awesome and other icon sets through prefixes and global options. - keywords: vue icon component, iconfont, icon libraries, vuetify icons -related: - - /components/icons/ - - /components/buttons/ - - /components/avatars/ ---- - -# Icons - -Vuetify comes bootstrapped with support for Material Design Icons, Material Icons, Font Awesome 4 and Font Awesome 5. By default, applications will default to use [Material Design Icons](https://materialdesignicons.com/). - - - -## Usage - -In order to change your font library, add the `iconfont` option during instantiation. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'mdiSvg', // 'mdi' || 'mdiSvg' || 'md' || 'fa' || 'fa4' || 'faSvg' - }, -}) -``` - -Using a predefined option will pre-fill defaults based upon the selected preset. This will overwrite the defaults of components that have default **icon** values. For more information, view the default [icon preset values](https://github.com/vuetifyjs/vuetify/tree/master/packages/vuetify/src/services/icons/presets). - -## Installing iconfonts - -You are required to include the specified icon library (even if using default). This can be done by including a CDN link or importing the icon library into your application - -### Material Design Icons - -This is the default icon font for Vuetify. You can include it through a CDN: - -```html - -``` - -Or as a local dependency: - -```bash -$ yarn add @mdi/js -D -// OR -$ npm install @mdi/js -D -``` - -```js -// src/plugins/vuetify.js - -import '@mdi/font/css/materialdesignicons.css' // Ensure you are using css-loader -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'mdi', // default - only for display purposes - }, -}) -``` - -### Material Design Icons - JS SVG - -Use the SVG Path's as designated in [@mdi/js](https://www.npmjs.com/package/@mdi/js). This is the recommended installation when optimizing your application for production. You **ONLY** need to include this if you plan on using more than the default icons. - -```bash -$ yarn add @mdi/js -D -// OR -$ npm install @mdi/js -D -``` - -Specify the **mdiSvg** iconfont: - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'mdiSvg', - }, -}) -``` - -You can custom import only the icons you use granting a much smaller bundle size. - -```html - - - - - -``` - -### Material Icons - -Installation is the same as the above. For projects without a build process, it is recommended to import the icons from CDN - -```html - -``` - -Alternatively, it is possible to install locally using yarn or npm. Keep in mind that this is not an official google repository and may not receive updates - -```bash -$ yarn add material-design-icons-iconfont -D -// OR -$ npm install material-design-icons-iconfont -D -``` - -Once you have installed the package, import it into your main entry js file. This is typically the `main.js`, `index.js` or `app.js` located in your `src/` folder. If you are using an SSR application, you may have a `client.js` or `entry-client.js` file. - -```js -// src/plugins/vuetify.js - -import 'material-design-icons-iconfont/dist/material-design-icons.css' // Ensure you are using css-loader -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'md', - }, -}) -``` - -### Font Awesome 4 Icons - -Same as above. Installing FontAwesome through cdn is the easiest way to check it out within your project: - -```html - -``` - -Installing FontAwesome**4** is the same as its newer version, just from a different repository. You will be targeting the `font-awesome` repo as opposed to `@fortawesome` one. - -```bash -$ yarn add font-awesome@4.7.0 -D -// OR -$ npm install font-awesome@4.7.0 -D -``` - -Don't forget, your project will need to recognize css. If you are using webpack, install and setup the [css loader](https://github.com/webpack-contrib/css-loader). - -```js -// src/plugins/vuetify.js - -import 'font-awesome/css/font-awesome.min.css' // Ensure you are using css-loader -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'fa4', - }, -}) -``` - -### Font Awesome 5 Icons - -The easiest way to get started with **FontAwesome** is to use a cdn. Within the head of your main `index.html` place this snippet: - -```html - -``` - -To install locally you can pull in the [Free](https://fontawesome.com/) version of **FontAwesome** using your preferred package manager: - -```bash -$ yarn add @fortawesome/fontawesome-free -D -// OR -$ npm install @fortawesome/fontawesome-free -D -``` - -Within your main entry point, simply import the package's **all.css**. If you are using a configured webpack project, you will need to setup support for `.css` files using the webpack [css loader](https://github.com/webpack-contrib/css-loader). If you are already using [Vue CLI](https://cli.vuejs.org/), this is done for you automatically. - -```js -// src/plugins/vuetify.js - -import '@fortawesome/fontawesome-free/css/all.css' // Ensure you are using css-loader -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'fa', - }, -}) -``` - -### Font Awesome SVG Icons - -Add required dependencies. - -```bash -$ yarn add @fortawesome/fontawesome-svg-core @fortawesome/vue-fontawesome @fortawesome/free-solid-svg-icons -D -// or -$ npm install @fortawesome/fontawesome-svg-core @fortawesome/vue-fontawesome @fortawesome/free-solid-svg-icons -D -``` - -Then add globally `font-awesome-icon` component and set `faSvg` as iconfont in Vuetify config. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import { library } from '@fortawesome/fontawesome-svg-core' -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' -import { fas } from '@fortawesome/free-solid-svg-icons' - -Vue.component('font-awesome-icon', FontAwesomeIcon) // Register component globally -library.add(fas) // Include needed icons - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'faSvg', - }, -}) -``` - -## Using custom icons - -Let's say your application calls for a custom icon in a Vuetify component. Instead of creating a wrapper component or manually defining the specific icon each time a component appears, you can configure it at a global level. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'fa', - values: { - cancel: 'fas fa-ban', - menu: 'fas fa-ellipsis-v', - }, - }, -}) -``` - -If you are using a icon library that does not have a preset, you can create a custom one. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -const MY_ICONS = { - complete: '...', - cancel: '...', - close: '...', - delete: '...', // delete (e.g. v-chip close) - clear: '...', - success: '...', - info: '...', - warning: '...', - error: '...', - prev: '...', - next: '...', - checkboxOn: '...', - checkboxOff: '...', - checkboxIndeterminate: '...', - delimiter: '...', // for carousel - sort: '...', - expand: '...', - menu: '...', - subgroup: '...', - dropdown: '...', - radioOn: '...', - radioOff: '...', - edit: '...', - ratingEmpty: '...', - ratingFull: '...', - ratingHalf: '...', - loading: '...', - first: '...', - last: '...', - unfold: '...', - file: '...', -} - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - values: MY_ICONS, - }, -}) -``` - -## Reusable custom icons - -Vuetify will _automatically_ merge any icon strings provided into the pool of available presets. This allows you to create custom strings that can be utilized in your application by simply referencing the **global icons**. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - iconfont: 'mdi', // default - values: { - product: 'mdi-dropbox', - support: 'mdi-lifebuoy', - steam: 'mdi-steam-box', - pc: 'mdi-desktop-classic', - xbox: 'mdi-xbox', - playstation: 'mdi-playstation', - switch: 'mdi-nintendo-switch', - }, - }, -}) -``` - -This can help ensure your application is always using a specific icon given a provided string. Here are a few ways that you can use `` with this system. - -```html - - - - - -``` - -## Custom components - -You can utilize the same icon strings in your own custom components. Any time **$vuetify.icons** (or shortcut **$**) is passed in through _v-text_, _v-html_ or as text, `` will look up that specified value. This allows you to create customized solutions that are easy to build and easy to manage. - -```html - - - - - -``` - -### Font Awesome Pro Icons - -You can utilize component icons with Font Awesome Pro to select individual icon weights: - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -import { library } from '@fortawesome/fontawesome-svg-core' -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' -import { faBars } from '@fortawesome/pro-light-svg-icons' -import { faVuejs } from '@fortawesome/free-brands-svg-icons' - -Vue.component('font-awesome-icon', FontAwesomeIcon) -library.add(faBars, faVuejs) - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - values: { - // set menu to light (default is solid) - menu: { - component: FontAwesomeIcon, - props: { - icon: ['fal', 'bars'], - }, - }, - // reusable custom icon - vuejs: { - component: FontAwesomeIcon, - props: { - icon: ['fab', 'vuejs'], - }, - }, - }, - }, -}) -``` - -## Component icons - -Instead of provided icon fonts presets you can use your own component icons. You also can switch icons that are used in Vuetify component with your own. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import IconComponent from './IconComponent.vue' - -Vue.use(Vuetify) - -export default new Vuetify({ - icons: { - values: { - product: { - component: IconComponent, // you can use string here if component is registered globally - props: { // pass props to your component if needed - name: 'product', - }, - }, - }, - }, -}) -``` - -If you want your SVG icon to inherit colors and scale correctly - be sure add the following css to it: - -```stylus -.your-svg-icon - fill: currentColor -``` - -## Missing Material Icons - -Some material icons are missing by default. For example, `person` and `person_outline` are available, but `visibility_outline` isn't, while `visibility` is. To use missing material icons, include the font below (remove another material font if already registered). - -```html - -``` - -You can add your custom component. Let me assume it is **@/components/MaterialIcon.vue**. - -```html - - - -``` - -Then you need to register the exact material icons you want. - -```js -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import MaterialIcon from '@/components/MaterialIcon' - -function missingMaterialIcons(ids) { - const icons = {} - for (const id of ids) { - for (const suffix of ['fill', 'outline', 'two-tone', 'round', 'sharp']) { - const name = `${id}_${suffix}` - icons[name] = { - component: MaterialIcon, - props: { - name - } - } - } - } - return icons -} - -Vue.use(Vuetify, { - // iconfont: 'md', - icons: { - values: { - ...missingMaterialIcons(['visibility', 'visibility_off']) - // This will enable 'visibility_outline', 'visibility_off_round' and so on. - } - } -}) -``` - -Finally you can use the material icons like this. - -```html - - - - -$visibility_outline -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/internationalization.md b/packages/docs-next/src/pages/de-DE/customization/internationalization.md deleted file mode 100644 index c5bb995332d..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/internationalization.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -meta: - title: Internationalization (i18n) - description: Vuetify supports language Internationalization (i18n) from a wide range of locales and easily integrates vue-i18n. - keywords: i18n, language, internationalization -related: - - /customization/accessibility/ - - /customization/rtl/ ---- - -# Internationalization - i18n - -Vuetify supports language Internationalization (i18n) of its components. When bootstrapping your application you can specify available locales and the currently active locale with the **current** option. The **lang** service also supports easy integration with [vue-i18n](#vue-i-18-n). - - - -## Getting started - -To set the available locales or the current locale, supply the `lang` option when installing Vuetify. The provided `locales` property will be merged with the already existing locales. You can change the locale during runtime through the `$vuetify` object on the Vue instance. - -Currently Vuetify provides translations in the following languages: - -- **af** - Afrikaans (Afrikaans) -- **ar** - Arabic (اللغة العربية) -- **ca** - Catalan (català) -- **cs** - Czech (čeština) -- **de** - German (Deutsch) -- **el** - Greek (Ελληνικά) -- **en** - English -- **es** - Spanish (Español) -- **et** - Estonian (eesti) -- **fa** - Persian (فارسی) -- **fi** - Finnish (suomi) -- **fr** - French (Français) -- **he** - Hebrew (עברית) -- **hr** - Croatian (hrvatski jezik) -- **hu** - Hungarian (magyar) -- **id** - Indonesian (Indonesian) -- **it** - Italian (Italiano) -- **ja** - Japanese (日本語) -- **ko** - Korean (한국어) -- **lt** - Lithuanian (lietuvių kalba) -- **lv** - Latvian (latviešu valoda) -- **nl** - Dutch (Nederlands) -- **no** - Norwegian (Norsk) -- **pl** - Polish (język polski) -- **pt** - Portuguese (Português) -- **ro** - Romanian (Română) -- **ru** - Russian (Русский) -- **sk** - Slovak (slovenčina) -- **sl** - Slovene (slovenski jezik) -- **srCyrl** - Serbian (српски језик) -- **sv** - Swedish (svenska) -- **th** - Thai (ไทย) -- **tr** - Turkish (Türkçe) -- **uk** - Ukrainian (Українська) -- **zhHans** - Chinese (中文) -- **zhHant** - Chinese (中文) - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -// Translation provided by Vuetify (javascript) -import zhHans from 'vuetify/es5/locale/zh-Hans' - -// Translation provided by Vuetify (typescript) -import pl from 'vuetify/src/locale/pl' - -// Your own translation file -import sv from './i18n/vuetify/sv' - -Vue.component('my-component', { - methods: { - changeLocale () { - this.$vuetify.lang.current = 'sv' - }, - }, -}) - -export default new Vuetify({ - lang: { - locales: { zhHans, pl, sv }, - current: 'zhHans', - }, -}) -``` - -## API - -- [internationalization](../../api/internationalization) - -## Caveats - - - Vuetify provides only a basic translation function `t`. It is recommended for more advanced internationalization functions to make use of Vuetify's integration with [vue-i18n](#vue-i-18-n) - - -## Creating a translation - -To create your own translation, use the code below. You will inherit Vuetify's translations, but also can add your own. Alternatively, you can copy and paste the content of `vuetify/src/locale/en.ts`, but it'll require manual file syncing during updates. - -```ts -import { en } from 'vuetify/src/locale' - -export default { - ...en, - - key1: ""key 1 internationalization"", - key2: ""key 2 internationalization"", - - namespace: { - key3: ""key 3 internationalization"" - } -} -``` - -## Custom components - -If you are building custom Vuetify components that need to hook into the internationalization engine, you can use the `t` function which is part of the `$vuetify.lang` API. - -```html - - - -``` - -## Vue i18n - -If you are using the vue-i18n package, you can very easily integrate it with Vuetify. This allows you to keep all of your translations in one place. Simply create an entry for $vuetify within your messages and add the corresponding language changes. Then hook up vue-i18n to Vuetify by supplying a custom translation function (as seen in the example below). For a complete list of all available keys, [navigate here](#create-a-translation). - -An important note when using external localization plugins is that vuetify will not automatically fall back to using english if no localization exists for the current locale. So be sure to supply the plugin with the english localizations as well as your own. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import VueI18n from 'vue-i18n' - -Vue.use(Vuetify) -Vue.use(VueI18n) - -const messages = { - en: { - $vuetify: { - dataIterator: { - rowsPerPageText: 'Items per page:', - pageText: '{0}-{1} of {2}', - }, - }, - }, - sv: { - $vuetify: { - dataIterator: { - rowsPerPageText: 'Element per sida:', - pageText: '{0}-{1} av {2}', - }, - }, - }, -} - -// Create VueI18n instance with options -const i18n = new VueI18n({ - locale: 'sv', // set locale - messages, // set locale messages -}) - -export default new Vuetify({ - lang: { - t: (key, ...params) => i18n.t(key, params), - }, -}) -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/presets.md b/packages/docs-next/src/pages/de-DE/customization/presets.md deleted file mode 100644 index 1aa6da07f61..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/presets.md +++ /dev/null @@ -1,335 +0,0 @@ ---- -meta: - title: Presets - description: Presets are Vue CLI plugins that drastically alter the look and feel of your Vuetify application. - keywords: vuetify presets, custom material design -related: - - /customization/theme/ - - /customization/sass-variables/ - - /styles/colors/ ---- - -# Presets - -For version 2 of the Material Design specification, Google created [Material studies](https://material.io/design/material-studies/about-our-material-studies.html) in order to explore real-world design limitations through fictional apps, each with their own unique properties and use cases. Vuetify presets integrate these studies through pre-configured framework options, SASS variables and custom styles that instantly change the look and feel of your application. - -## Default preset - -The default Vuetify preset provides all framework services with baseline values. Each object key corresponds to a service on the `$vuetify` object and can be overwritten via a **preset** or custom **user options** in the Vuetify constructor. - -```js -// Styles -import '../../styles/main.sass' - -// Locale -import { en } from '../../locale' - -// Types -import { VuetifyPreset } from 'vuetify/types/services/presets' - -export const preset: VuetifyPreset = { - breakpoint: { - scrollBarWidth: 16, - thresholds: { - xs: 600, - sm: 960, - md: 1280, - lg: 1920, - }, - }, - icons: { - iconfont: 'mdi', - values: {}, - }, - lang: { - current: 'en', - locales: { en }, - t: undefined as any, - }, - rtl: false, - theme: { - dark: false, - default: 'light', - disable: false, - options: { - cspNonce: undefined, - customProperties: undefined, - minifyTheme: undefined, - themeCache: undefined, - }, - themes: { - light: { - primary: '#1976D2', - secondary: '#424242', - accent: '#82B1FF', - error: '#FF5252', - info: '#2196F3', - success: '#4CAF50', - warning: '#FB8C00', - }, - dark: { - primary: '#2196F3', - secondary: '#424242', - accent: '#FF4081', - error: '#FF5252', - info: '#2196F3', - success: '#4CAF50', - warning: '#FB8C00', - }, - }, - }, -} -``` - -## Material Studies - -[Material Design](https://material.io/) is an opinionated visual language that can be overwhelming to work with when implementing highly customized designs. The new studies showcase the _flexibility_ of Material Theming and walk you through just how easy it is to create **unique** applications without the default Material appearance. - -Vuetify presets are an in progress feature that will be enhanced over time as Vuetify gains new functionality - -There are currently a total of **7 Material Studies** to choose from, each that have a corresponding preset plugin: - -* [Basil](https://material.io/design/material-studies/basil.html) -* [Crane](https://material.io/design/material-studies/crane.html) -* [Fortnightly](https://material.io/design/material-studies/fortnightly.html) -* [Owl](https://material.io/design/material-studies/owl.html) -* [Rally](https://material.io/design/material-studies/rally.html) -* [Reply](https://material.io/design/material-studies/reply.html) -* [Shrine](https://material.io/design/material-studies/shrine.html) - -### Installation - -In your console run the following command vue add vuetify-preset-{name}— where `{name}` corresponds to one of the available [Material Studies](#material-studies). Once the plugin is installed, your **vuetify.js** file will be updated to include the selected preset. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import { preset } from 'vue-cli-plugin-vuetify-preset-basil/preset' - -Vue.use(Vuetify) - -export default new Vuetify({ - preset, - rtl: true, - theme: { dark: true }, -}) -``` - -To start development, in the command line type yarn serve or npm run serve. The Vuetify service plugin will bootstrap into Vue CLI and automatically apply all of the variable and style changes from the preset. For more information on how the generator and service plugins' work, checkout the [Plugin Development Guide](#plugin-development-guide). - -### Merging strategy - -Vuetify options are merged from the top down—_Defaults, Preset and User_. The [default](https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/presets/default/index.ts) preset is first merged with a provided **preset** property in the Vuetify constructor options. If applicable, user supplied options will then be merged with the global defaults and preset. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import { preset } from 'vue-cli-plugin-vuetify-preset-shrine/preset' - -Vue.use(Vuetify) - -const options = { - breakpoint: { scrollbarWidth: 12 }, - theme: { - themes: { - light: { primary: 'blue' }, - }, - }, -} - -export default new Vuetify({ - // The provided global preset is first merged with defaults - preset, - // User options are then merged, overwriting defaults and the global preset - ...options, -}) -``` - -## Limitations - -Due to the [studies](https://material.io/design/material-studies/about-our-material-studies.html) being more visual than technical, presets are our _best-guess_ implementation. In many cases, styles and functionality must be inferred due to lack of information within the study's guidelines. There are also situations in which part of a study _**can not**_ or _**will not**_ be supported: - -* It requires changes to the framework -* It's not currently possible with CSS -* We haven't figured out how to support it yet - -### Google fonts - -When you install a preset, it will update your main **public/index.html** file with only the fonts and weights it needs. For example, a study may only require `400,500,600` font weights. This would cause some helper classes in Vuetify to not work; e.g. `font-weight-thin` requires _300_ font weight. Weights can always be later modified by updating the font link in your `public.html`. - -```html - - - - -``` - -### Compilation time - -In order to update SASS variables in Vuetify, styles are recompiled during development and when your application is built for production. This _will_ increase your initial compilation time and _will_ be triggered any time you edit a **variables** file. If your application isn't affected by any of the [Vuetify loader limitations](/customization/a-la-carte/#limitations), you can opt to import Vuetify from `vuetify/lib/framework`. This can decrease compilation time by up to _50%_. - -```js -// src/plugins/vuetify.js - -// CORRECT -import Vuetify from 'vuetify/lib/framework' - -// INCORRECT -import Vuetify, { VRow } from 'vuetify/lib/framework' - -export default new Vuetify() -``` - -## Plugin development guide - -A Vuetify preset is a npm package that provides framework wide options and custom styling using Vue CLI. It consists of a SASS variables file, a CSS overrides file and the Vue CLI [Generator](https://cli.vuejs.org/dev-guide/generator-api.html) and [Plugin Service](https://cli.vuejs.org/dev-guide/plugin-api.html). Some of the features offered by presets are: - -* configures framework options with **pre-defined** values — can use any combination of the available [Vuetify options](#default-preset) -* injects **custom SASS variables** for configuring existing Vuetify functionality; e.g. components. Presets use the [Vue CLI Plugin API](https://cli.vuejs.org/dev-guide/plugin-api.html#plugin-api) to hoist SASS variables during compilation -* provides **global overrides** for styling that is not coverable through variables -* a _streamlined approach_ to modifying a Vuetify application's style and options - -```bash -# Vuetify preset plugin structure -. -├── generator.js # generator (optional) -├── index.js # service plugin -└── preset - ├── index.js # preset object - ├── overrides.sass # global overrides - └── variables.scss # SASS variables -``` - -A custom preset **can not** itself contain a _preset_ property. - -### Features - -#### Generator - -This file is a Vue CLI [Generator](https://cli.vuejs.org/dev-guide/generator-api.html) that updates the **vuetify.js** file in your application to include the defined preset. - -```js -// Imports -const { - generatePreset, - injectGoogleFontLink, -} = require('@vuetify/cli-plugin-utils') - -// Updates the Vuetify object with provided preset -module.exports = api => generatePreset(api, 'preset-name', () => { - // Invoked after the generator has completed. - // A common use-case is adding font links - - // Will automatically apply the default font-weights - // 100,300,400,500,700,900 - injectGoogleFontLink(api, 'Rubik') - - // Will only use the defined font-weights - injectGoogleFontLink(api, 'Roboto:100,300,700') - - // Works the same as the above, but accepts multiple values - injectGoogleFontLink(api, [ - 'Rubik', - 'Roboto:100,300,700', - ]) -}) -``` - -#### Entry file - -This file is a Vue CLI [Plugin Service](https://cli.vuejs.org/dev-guide/plugin-api.html) that hooks into your application when running `yarn serve` or `npm run serve`. The `injectSassVariables` method injects the target file's variables into all SASS/SCSS files. - -```js -// Imports -const { injectSassVariables } = require('@vuetify/cli-plugin-utils') - -// Bootstraps Vue CLI with the target SASS variables -module.exports = api => injectSassVariables( - api, - // Path to the variables file - 'path/to/preset-plugin-variables.scss', - // Modules to inject variables - ['vue-modules', 'vue', 'normal-modules', 'normal'], // default -) -``` - -#### Vuetify options - -This contains the framework configuration options that are passed to the Vuetify constructor. These options combine with any user supplied values and the [framework defaults](#default-preset). - -```js -// preset/index.js - -require('./overrides.sass') - -const preset = { - theme: { - themes: { - light: { - primary: '#5D1049', - secondary: '#E30425', - accent: '#720D5D', - error: '#F57C00', - }, - }, - }, -} - -module.exports = { preset } -``` - -#### SASS variables - -This is a SASS/SCSS variables file which will overwrite existing framework values. You can find more information about available variables on the [Vuetify SASS Variables](/customization/sass-variables/#variable-api) documentation page or within the API section of a component. - -```scss -// preset/variables.scss - -// Shrine specific variables -$shrine-chip-border-radius: 4px; -$shrine-chip-border: thin solid black; -$shrine-chip-font-weight: 900; -$shrine-chip-padding: 0 8px; - -// Preset variables -$body-font-family: 'Work Sans', sans-serif; -$border-radius-root: 6px; -$headings: ( - 'h1': ( - 'font-family': 'Roboto', sans-serif; - 'letter-spacing': 0 - ) -); -$material-light: ( - 'cards': #E0E0E0, - 'text': ( - 'primary': rgba(0, 0, 0, .76), - 'secondary': grey - ) -); -``` - -#### CSS overrides - -This is a catch all for style modifications that do not have corresponding variables to target. This is useful when you need to add new CSS properties to existing components. - -```sass -// preset/overrides.sass - -@import './variables.scss' - -.theme--light - .v-chip - border-radius: $shrine-chip-border-radius - border: $shrine-chip-border - font-weight: $shrine-chip-font-weight - padding: $shrine-chip-padding - +elevation(0) -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/rtl.md b/packages/docs-next/src/pages/de-DE/customization/rtl.md deleted file mode 100644 index 261f245d0b1..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/rtl.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -meta: - title: RTL - bidirectionality - description: Vuetify is configurable and compatible with RTL languages. - keywords: rtl, right-to-left, bidirectionality -related: - - /customization/accessibility/ - - /customization/internationalization/ ---- - -# RTL - bidirectionality - -Vuetify supports RTL **(right to left)** languages and can be activated by using the **rtl** option when bootstrapping your application. You can find additional information about [implementing bidirectionality](https://material.io/design/usability/bidirectionality.html) on the specification site. - - - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - rtl: true, -}) -``` - - - -You can also change this dynamically at any point by modifying the **rtl** value on the vuetify object. - -```html - - - - - -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/sass-variables.md b/packages/docs-next/src/pages/de-DE/customization/sass-variables.md deleted file mode 100644 index f8122320548..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/sass-variables.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -meta: - title: SASS variables - description: Customize Vuetify's internal styles by modifying SASS variables. - keywords: sass variables, scss variables, modifying Vuetify styles -related: - - /styles/colors/ - - /customization/theme/ - - /customization/presets/ ---- - -# SASS variables - -Vuetify uses **SASS/SCSS** to craft the style and appearance of all aspects of the framework. Utilizing the _sass/scss data option_ of your `vue.config.js` file, you can optionally pass in custom variables to overwrite the global defaults. A list of available variables is located within each component's API section and in the [Variable API](#variable-api) of this page. This functionality is automatically handled by [vue-cli-plugin-vuetify](https://github.com/vuetifyjs/vue-cli-plugin-vuetify). - - - - - - Note: SASS/SCSS variables are only supported using [A-la-carte installation](/customization/a-la-carte). This is automatically setup when using the **vue-cli-plugin-vuetify** plugin. - - - -## Vue CLI install - -If you have not installed Vuetify, check out the [quick-start guide](/getting-started/quick-start#vue-cli-3-install). Once installed, create a folder called `sass`, `scss` or `styles` in your src directory with a file named `variables.scss` or `variables.sass`. The **vuetify-loader** will automatically bootstrap your variables into Vue CLI's compilation process, overwriting the framework defaults. - -When you run yarn serve, the vuetify-cli-plugin will automatically hoist the global Vuetify variables to all of your sass/scss files. When making changes to individual component variables, you will still need to manually include its variables file. You can find an example of a [custom variables](#example-variable-file) file below. - -## Nuxt install - -Coming soon. If you are interested in collaborating on this section, please reach out to _johnleider_ in the [community](https://community.vuetifyjs.com). - -## Webpack install - -This section assumes you have already followed our Webpack guide on the [Quick start](/getting-started/quick-start#webpack-install) page. The option can vary depending upon the version of [sass-loader](https://github.com/webpack-contrib/sass-loader) you are use using. Ensure that you use the proper syntax when setting up the SASS/SCSS data options as they have different line endings. You can find more information about [additionalData](https://github.com/webpack-contrib/sass-loader#additionaldata) or [prependData](https://github.com/webpack-contrib/sass-loader/tree/v8.0.0#prependdata) on sass-loader's Github page. - -```js -// webpack.config.js - -module.exports = { - module: { - rules: [ - // SASS has different line endings than SCSS - // and cannot use semicolons in the markup - { - test: /\.sass$/, - use: [ - 'vue-style-loader', - 'css-loader', - { - loader: 'sass-loader', - // Requires sass-loader@^7.0.0 - options: { - // This is the path to your variables - data: ""@import '@/styles/variables.scss'"" - }, - // Requires sass-loader@^8.0.0 - options: { - // This is the path to your variables - prependData: ""@import '@/styles/variables.scss'"" - }, - // Requires sass-loader@^9.0.0 - options: { - // This is the path to your variables - additionalData: ""@import '@/styles/variables.scss'"" - }, - }, - ], - }, - // SCSS has different line endings than SASS - // and needs a semicolon after the import. - { - test: /\.scss$/, - use: [ - 'vue-style-loader', - 'css-loader', - { - loader: 'sass-loader', - // Requires sass-loader@^7.0.0 - options: { - // This is the path to your variables - data: ""@import '@/styles/variables.scss';"" - }, - // Requires sass-loader@^8.0.0 - options: { - // This is the path to your variables - prependData: ""@import '@/styles/variables.scss';"" - }, - // Requires sass-loader@^9.0.0 - options: { - // This is the path to your variables - additionalData: ""@import '@/styles/variables.scss';"" - }, - }, - ], - }, - ], - }, -} -``` - -## Variable API - -There are many SASS/SCSS variables that can be customized across the entire Vuetify framework. Below is an example of a custom **variables** file. You can find more information about available [variables](#variable-api) below: - - - **TODO:** Setup API section - - -## Example variable file - -Below is an example of what a variable file looks like: - -```scss -// src/sass/variables.scss - -// Globals -$body-font-family: 'Work Sans', serif; -$border-radius-root: 6px; -$font-size-root: 14px; - -// Variables must come before the import -$btn-letter-spacing: 0; -$btn-font-weight: 400; -$list-item-title-font-size: 0.929rem; -$list-item-dense-title-font-size: 0.929rem; -$list-item-dense-title-font-weight: initial; -$fab-icon-sizes: ( - 'small': 20 -); -$btn-sizes: ( - 'default': 41, - 'large': 54 -); - -$headings: ( - 'h1': ( - 'size': 3.3125rem, - 'line-height': 1.15em - ), - 'h2': ( - 'size': 2.25rem, - 'line-height': 1.5em - ) -); -``` - -## Usage in components - -There are two ways to import and use Vuetify variables within your components, both which provide the same outcome. The first method is to import the default framework styles file: This is the preferred method if you are using [Presets](/customization/presets) or **not** using a variables file at all. - -```html - -``` - -The second method is to import your project's _specific_ variables file. This is recommended if you are using your own variables file to import the global Vuetify styles. Keep in mind, it _does not matter_ which syntax you use, SASS or SCSS, when importing and using variable files. - -```html - -``` - -## Caveats - -When using sass variables, there are a few considerations to be aware of. - -### Duplicated CSS - -Importing a regular stylesheet into a `variables` file will cause massive style duplication. In the following snippet, we have an `overrides.sass` file to modify the **text-transform** CSS property of [v-btn](/components/buttons/). - -```sass -// src/styles/overrides.sass - -.v-btn - text-transform: capitalize -``` - -The following snippet is an example of what **NOT** to do. - -```scss -// src/styles/variables.scss - -// The following import will cause style duplication -@import './overrides.sass'; - -$card-border-radius: 6px; -$headings: ( - 'h1': ( - 'font-size': 2rem - ) -); -``` - -### Compilation time - -When using variables, the initial compilation of your application will increase. This is due to the fact that styles are updated in real time whenever you make a modification to a hoisted variable file. This is only experienced with the initial compilation step and can be improved by changing where you import Vuetify from. Keep in mind this _will not_ work if your application is affected by any of the [Vuetify loader limitations](/customization/a-la-carte#limitations); your application will still work, but not receive the performance increase. - -```js -// src/plugins/vuetify.js - -// CORRECT -import Vuetify from 'vuetify/lib/framework' - -// INCORRECT -import Vuetify, { VRow } from 'vuetify/lib/framework' - -export default new Vuetify() -``` - - diff --git a/packages/docs-next/src/pages/de-DE/customization/theme.md b/packages/docs-next/src/pages/de-DE/customization/theme.md deleted file mode 100644 index 0dcfec45f88..00000000000 --- a/packages/docs-next/src/pages/de-DE/customization/theme.md +++ /dev/null @@ -1,374 +0,0 @@ ---- -meta: - title: Premium Themes - description: Setup your application's theme and supplemental colors in a flash. - keywords: themes -related: - - /styles/colors/ - - /styles/transitions/ - - /getting-started/pre-made-layouts/ ---- - -# Premium Themes - -Easily change the colors of your application programmatically. Rebuild the default stylesheet and customize various aspects of the framework for your particular needs. - - - -## Theme generator - -Discover and generate new color themes for your **Vuetify** applications using our [Theme Generator](https://theme-generator.vuetifyjs.com) tool. - -## Light and dark - -Vuetify supports both **light** and **dark** variants of the Material Design spec. This designation starts at the root application component, `v-app` and is supported by majority of components. By default, your application will use the **light** theme, but this can be easily overwritten by adding the **dark** option in the theme service. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -export default new Vuetify({ - theme: { - dark: true, - }, -}) -``` - -When you designate a component as light or dark, all of its children will inherit and apply the same unless otherwise specified. You can manually turn **dark** on and off by changing `this.$vuetify.theme.dark` to **true** or **false**. - -## Customizing - -By default, Vuetify has a standard theme applied for all components. - -```js -{ - primary: '#1976D2', - secondary: '#424242', - accent: '#82B1FF', - error: '#FF5252', - info: '#2196F3', - success: '#4CAF50', - warning: '#FFC107', -} -``` - -This can be easily changed. Simply pass a **theme** property to the Vuetify constructor. You can choose to modify all or only some of the theme properties, with the remaining inheriting from the default. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -const vuetify = new Vuetify({ - theme: { - themes: { - light: { - primary: '#3f51b5', - secondary: '#b0bec5', - accent: '#8c9eff', - error: '#b71c1c', - }, - }, - }, -}) -``` - -You can also use the pre-defined material colors. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -import colors from 'vuetify/lib/util/colors' - -const vuetify = new Vuetify({ - theme: { - themes: { - light: { - primary: colors.purple, - secondary: colors.grey.darken1, - accent: colors.shades.black, - error: colors.red.accent3, - }, - dark: { - primary: colors.blue.lighten3, - }, - }, - }, -}) -``` - -By default, the theme service will use your application's primary color for **anchor** tags. You can override this by adding an anchor property to the theme: - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -const vuetify = new Vuetify({ - theme: { - themes: { - light: { - primary: '#3f51b5', - secondary: '#b0bec5', - anchor: '#8c9eff', - }, - }, - }, -}) - -export default vuetify -``` - -Under the hood, Vuetify will generate css classes based upon these values that will be accessible in the DOM. These classes will follow the same markup as other helper classes, `primary` or `secondary--text` for example. If you supply an entire color object (as in `colors.purple` above), the lighten/darken variations will be used directly instead of being generated. - -These values will also be made available on the instance **$vuetify** object under the **theme** property. This allows you to _dynamically_ modify your theme. Behind the scenes, Vuetify will regenerate and update your theme classes, seamlessly updating your application. - -```js -// Light theme -this.$vuetify.theme.themes.light.primary = '#4caf50' - -// Dark theme -this.$vuetify.theme.themes.dark.primary = '#4caf50' -``` - -### Custom theme variants - -While Vuetify automatically generates _lighten_ and _darken_ variants for theme colors, you may want to control this yourself. Simply pass a theme object that contains the variants that you wish to modify. Anything not provided will still be generated for you. - -```js -// src/plugins/vuetify/theme.js - -import colors from 'vuetify/lib/util/colors' - -export default { - primary: { - base: colors.purple.base, - darken1: colors.purple.darken2, - }, - secondary: colors.indigo, - // All keys will generate theme styles, - // Here we add a custom `tertiary` color - tertiary: colors.pink.base, -} -``` - -You can now import your custom theme object and apply it to Vuetify - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' -import light from './theme' - -Vue.use(Vuetify) - -export default new Vuetify({ - theme: { - themes: { light }, - }, -}) -``` - -Below is a full list of the overwritable keys on the theme object: - -```ts -interface ParsedThemeItem { - base: string - lighten5: string - lighten4: string - lighten3: string - lighten2: string - lighten1: string - darken1: string - darken2: string - darken3: string - darken4: string - - [name: string]: string -} -``` - -### Disable theme - -You can disable theme functionality by using the **disable** property with a value of **true**. This will prevent the creation of the Vuetify stylesheet. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -const vuetify = new Vuetify({ - theme: { disable: true }, -}) -``` - -## Options - -Vuetify generates theme styles at run-time for SPA's and server side for SSR applications. The generated styles will be placed in a ` -``` - -### CSP nonce - -Pages with the `script-src` or `style-src` CSP rules enabled may require a **nonce** to be specified for embedded style tags. - -```html - -Content-Security-Policy: script-src 'self' 'nonce-dQw4w9WgXcQ' - - -Content-Security-Policy: style-src 'self' 'nonce-dQw4w9WgXcQ' -``` - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -export default new Vuetify({ - theme: { - options: { - cspNonce: 'dQw4w9WgXcQ', - }, - }, -}) -``` - -### Variations - -When Vuetify generates your *application's theme*, it creates **9 variants** for each color. For majority of users, these variants are rarely used. This is an **opt in** feature that will be __false by default__ in the next major version. - -```js -// src/plugins/vuetify.js - -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -export default new Vuetify({ - theme: { - options: { variations: false }, - }, -}) -``` - -## Theme Provider - -The Vuetify theme system is propagated through the [provide](https://vuejs.org/v2/api/#provide-inject) functionality in Vue. There may be situations in which you need to manually change the provided theme (dark or light). - -### API - -- [v-theme-provider](../../api/v-theme-provider) - -### Usage - -In this example, the bottom card inherits from the root of **$vuetify.theme.dark**. - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/click-outside.md b/packages/docs-next/src/pages/de-DE/directives/click-outside.md deleted file mode 100644 index f911860b135..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/click-outside.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -meta: - title: Click outside directive, - description: The v-click-outside directive calls a function when something outside of the target element is clicked on., - keyword: click outside, click directive, vue click directive, vuetify click directives -related: - - /components/dialogs/ - - /directives/intersect/ - - /components/api-explorer/ ---- - -# Click outside - -The `v-click-outside` directive calls a function when something outside of the target element is clicked on. This is used internally by components like `v-menu` and `v-dialog`. - - - -## Usage - -The `v-click-outside` directive allows you to provide a handler to be invoked when the user clicks outside of the target element. - - - -## API - -- [v-click-outside](../../api/v-click-outside) - -## Examples - -### Options - -#### Close on outside click - -Optionally provide a `closeOnOutsideClick` handler that returns `true` or `false`. This function determines whether the outside click function is invoked or not. - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/intersect.md b/packages/docs-next/src/pages/de-DE/directives/intersect.md deleted file mode 100644 index 5d6fb79a37b..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/intersect.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -meta: - title: Intersection observer directive - description: The intersection observer directive utilizes the Intersection observer API. It allows you to determine when elements are visible on the screen. - keywords: intersect, vuetify intersect directive, intersection observer directive -related: - - /components/cards/ - - /components/images/ - - /components/api-explorer/ ---- - -# Intersection observer - -The `v-intersect` directive utilizes the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). It provides an easy-to-use interface for detecting when elements are visible within the user's viewport. This is also used for the [v-lazy](/components/lazy) component. - - - -## Usage - -Scroll the window and watch the colored dot. Notice as the [v-card](/components/cards) comes into view that it changes from error to success. - - - -## API - -- [v-intersect](../../api/v-intersect) - -## Caveats - - - While the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) is not available in IE11 by default, it can be implemented using a [polyfill](https://github.com/w3c/IntersectionObserver) - - -## Examples - -### Props - -#### Options - -The `v-intersect` directive accepts options. Available options can be found in the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). Below is an example using the `threshold` option. - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/mutate.md b/packages/docs-next/src/pages/de-DE/directives/mutate.md deleted file mode 100644 index 1686660d230..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/mutate.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -meta: - title: Mutation observer directive - description: The mutation observer directive utilizes the Mutation observer API. It allows you to determine when elements are updated. - keywords: mutate, vuetify mutate directive, mutation observer directive -related: - - /components/sheets/ - - /components/images/ - - /components/api-explorer/ ---- - -# Mutation observer - -The `v-mutate` directive utilizes the [Mutation Observer API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). It provides an easy to use interface for detecting when elements are updated. - - - -## Usage - -By default the `v-mutate` directive will enable all available options in the [Mutation Observer API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). This can be modified in one of two ways. You can either pass in object with keys for **handler** and **options** or use the `modifier` property of the directive, `v-mutate.attr.sub=""onMutate""` - - - -## API - -- [v-mutate](../../api/v-mutate) - -## Examples - -### Options - -#### Modifiers - -The `v-mutate` directive accepts modifiers for all of the available options in the [Mutation Observer API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). For brevity, abbreviations are used—**attr** (attributes), **child** (childList), **sub** (subtree) and **char** (characterData). - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/resize.md b/packages/docs-next/src/pages/de-DE/directives/resize.md deleted file mode 100644 index dae375a9d36..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/resize.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -meta: - title: Resize directive - description: The resize directive provides the ability to conditionally invoke functions when the screen is resized. - keywords: resize, vuetify resize directive, vue resize directive, window resize directive -related: - - /customization/breakpoints/ - - /components/grids/ - - /styles/flex/ ---- - -# Resize directive - -The `v-resize` directive can be used for calling specific functions when the window resizes. - - - -## Usage - -Resize your window and observe the values change.. - - - -## API - -- [v-resize](../../api/v-resize) - - diff --git a/packages/docs-next/src/pages/de-DE/directives/ripple.md b/packages/docs-next/src/pages/de-DE/directives/ripple.md deleted file mode 100644 index b617ec63725..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/ripple.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -meta: - title: Ripple directive - description: The ripple directive adds touch and click feedback to any element in the form of a water ripple. - keywords: ripples, ink, vuetify ripple directive, vue ripple directive -related: - - /components/buttons/ - - /components/expansion-panels/ - - /styles/transitions/ ---- - -# Ripple directive - -The `v-ripple` directive is used to show action from a user. It can be applied to any block level element. Numerous components come with the ripple directive built in, such as the `v-btn`, `v-tabs-item` and many more. - - - -## Usage - -Basic ripple functionality can be enabled just by using `v-ripple` directive on a component or an HTML element - - - -## API - -- [v-ripple](../../api/v-ripple) - -## Examples - -### Options - -#### Center - -When a `center` option is used ripple will always originate from the center of the target. - - - -### Misc - -#### Custom color - -Using a helper class, you can change the color of the ripple. - - - -#### Ripple in components - -Some components provide the `ripple` prop that allows you to control the ripple effect. You can turn it off or customize the behaviour by using `class` or `center` options. - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/scroll.md b/packages/docs-next/src/pages/de-DE/directives/scroll.md deleted file mode 100644 index 36798a9b1f2..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/scroll.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -meta: - title: Scroll directive - description: The scroll directive gives you the ability to conditionally invoke methods when the screen or an element are scrolled. - keywords: scroll, vuetify scroll directive, vue scroll directive, window scroll directive -related: - - /styles/scroll/ - - /directives/touch-support/ ---- - -# Scroll directive - -The `v-scroll` directive allows you to provide callbacks when the window, specified target or element itself (with `.self` modifier) is scrolled. - - - -## Usage - -The default behavior is to bind to the window. If no additional configuration options are needed, you can simply pass your callback function. - - - -## API - -- [v-scroll](../../api/v-scroll) - -## Examples - -### Options - -#### Self - -`v-scroll` targets the `window` by default but can also watch the element it's being bound to. In the following example we use the **self** modifier, `v-scroll.self`, to watch the [`v-card`](/components/cards) element specifically. This causes the method `onScroll` to invoke as you scroll the card contents; incrementing the counter. - - - -#### Target - -For a more fine tuned approach, you can designate the target to bind the scroll event listener. - - - - diff --git a/packages/docs-next/src/pages/de-DE/directives/touch.md b/packages/docs-next/src/pages/de-DE/directives/touch.md deleted file mode 100644 index ba154598792..00000000000 --- a/packages/docs-next/src/pages/de-DE/directives/touch.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -meta: - title: Touch directive - description: The touch directive provides an interface for responding to various user touch actions. - keywords: touch, vuetify touch directive, vue touch directive, mobile touch directive -related: - - /styles/scroll/ ---- - -# Touch directive - -The `v-touch` directive allows you to capture swipe gestures and apply directional callbacks. - - - -## Usage - -On a mobile device, try swiping in various directions. - - - -## API - -- [v-touch](../../api/v-touch) - - diff --git a/packages/docs-next/src/pages/de-DE/getting-started/beginners-guide.md b/packages/docs-next/src/pages/de-DE/getting-started/beginners-guide.md deleted file mode 100644 index 19ae3e488da..00000000000 --- a/packages/docs-next/src/pages/de-DE/getting-started/beginners-guide.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -meta: - title: Beginner's guide - description: How to use Vuetify as a beginner. - keywords: vuetify, beginner, vue, framework, guide, vuetify beginner, starting vuetify, vuetify guide ---- - -# Beginner's Guide - -The purpose of the Vuetify Beginner's Guide is to provide a comprehensive and diverse approach to welcoming beginner to intermediate level web developers into the Vuetify Ecosystem. - - - -We aim to accomplish this by having a broad variety of contributors creating content including (but not limited to): - -* Blog Posts covering Vuetify specific and ecosystem topics -* Tutorials that teach how to use Vuetify effectively -* A glossary that covers essential terms with examples as needed - ---- - -## Disclaimer - -All content is reviewed by the Vuetify Core Team as well as Webdev beginners. We encourage feedback if further clarification, or a deeper dive into any and all concepts presented within this guide. - -If you would like to contribute to the Beginner's Guide, come chat with us in the [Discord Community](https://discord.com/invite/s93b7Fv). - - diff --git a/packages/docs-next/src/pages/de-DE/getting-started/browser-support.md b/packages/docs-next/src/pages/de-DE/getting-started/browser-support.md deleted file mode 100644 index aab52832127..00000000000 --- a/packages/docs-next/src/pages/de-DE/getting-started/browser-support.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -meta: - title: Browser support - description: Vuetify is a progressive framework that supports all evergreen browsers and IE11 / Safari with polyfill. - keywords: vuetify browser support -related: - - /getting-started/quick-start/ - - /introduction/frequently-asked-questions/ - - /customization/sass-variables/ ---- - -# Browser support - -Vuetify is a progressive framework that attempts to push web development to the next level. In order to best accomplish this task, some sacrifices had to be made in terms of support for older versions of Internet Explorer. This is not an exhaustive list of compatible browsers, but the main targeted ones. - - - -## Browsers - -| Browser | Status | -| ------------------------------- | ----------------------- | -| Chromium (Chrome, Edge Insider) | Supported | -| Edge | Supported | -| Firefox | Supported | -| Safari 10+ | Supported | -| IE11/Safari 9 | Supported with polyfill | -| IE9 / IE10 | Not supported | - -## IE11 and Safari 9 support - -Vuetify utilizes features of ES2015/2017 that require the need to use polyfills for **Internet Explorer 11** and **Safari 9/10**. If you are using Vue CLI, this is done automatically for you. Otherwise, in your project directory, you can install `babel-polyfill`: - -```bash -yarn add babel-polyfill -# OR -npm install babel-polyfill --save -``` - -It is important to include the plugin as early as possible within your main **index.js** file. If using a Vuetify SSR package, this will apply to the **client-entry.js** file - -```js -// src/main.js - -import 'babel-polyfill' -import Vue from 'vue' -import vuetify from '@/plugins/vuetify' - -new Vue({ - vuetify, -}).$mount('#app') -``` - -It is recommended that you use `babel-preset-env` with the corresponding polyfill to ensure only the necessary polyfills are added to your application. For more information on `babel-preset-env`, [visit the documentation](https://babeljs.io/docs/en/next/babel-preset-env.html). - -```bash -yarn add @babel/preset-env -D -# OR -npm install @babel/preset-env -D -``` - -Once installed, add the preset to your `.babelrc` or `babel.config.js` - -```json -// .babelrc - -{ - ""presets"": [""@babel/preset-env""] -} -``` - -```js -// babel.config.js - -module.exports = { - presets: ['@babel/preset-env'] -} -``` - -Unfortunately Vue CLI doesn't automatically bring IE11 compatibility in which you may encounter various errors (such as Symbol is not defined). To assist in resolving these errors you may need to manually add `transpileDependencies` parameter in `vue.config.js`. - -Due to Internet Explorer's limited support for `