├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── _config.yml ├── composer.json ├── config └── popper.php ├── docs └── welcome.gif ├── resources ├── css │ ├── danger.css │ ├── google.css │ ├── info.css │ ├── light-border.css │ ├── light.css │ ├── success.css │ ├── theme.css │ ├── translucent.css │ └── warning.css ├── js │ ├── index.all.min.js │ └── popper.min.js └── views │ └── assets.blade.php └── src ├── Facades └── Popper.php ├── Popper.php └── PopperServiceProvider.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | /node_modules 3 | /vendor 4 | npm-debug.log 5 | yarn-error.log -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Anderson Carpi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Popper 2 | 3 | This package provides an easy way to add tooltips in your Laravel blade views. Powered by Popper.js and Tippy.js. 4 | With this, you will not lose time getting them done. Install and use, out of the box. 5 | 6 | ![Laravel Popper](docs/welcome.gif) 7 | 8 | 9 | ## Install 10 | 11 | First things, first... Use composer to install the package: 12 | 13 | ``` 14 | composer require andcarpi/laravel-popper 15 | ``` 16 | 17 | ## Setup 18 | 19 | When composer finish his job, add the Service Provider and the facade to your app.config in the config folder: 20 | 21 | > Skip this if you use Laravel 5.5 and above. 22 | 23 | ``` 24 | 'providers' => [ 25 | // ... 26 | // List of Service Providers... 27 | // ... 28 | andcarpi\Popper\PopperServiceProvider::class, 29 | ], 30 | 31 | 'aliases' => [ 32 | // ... 33 | // List of Facades Aliases... 34 | // ... 35 | 'Popper' => andcarpi\Popper\Facades\Popper::class, 36 | ], 37 | 38 | 39 | ``` 40 | 41 | ## Usage 42 | 43 | To use Popper in your view, you need to inject the assets needed! 44 | Use ``@include('popper::assets')`` in the views you need tooltips, right before the body closing tag. 45 | > ps: If you have a Master View, add the assets on it :) 46 | 47 | ``` 48 | @include('popper::assets') 49 | 50 | ``` 51 | 52 | Now, it's time to use it. To generate a simple tooltip, just use the Popper facade inside any html element. 53 | 54 | ``` 55 | I'm a Span 64 | ``` 65 | 66 | ## Configuration 67 | 68 | ### Custom Tooltip Options 69 | 70 | You can change the Tooltip default options publishing and editing the config file. 71 | 72 | ``` 73 | php artisan vendor:publish --provider="andcarpi\Popper\PopperServiceProvider" --tag=config 74 | ``` 75 | 76 | The file will be placed inside your config folder. 77 | 78 | Each option is self-explanatory, and you can modify the default behavior of all the tooltips you generate. 79 | 80 | ### Single Tooltip Options 81 | 82 | Each tooltip can be customized using functions. They can also be chained! 83 | 84 | - Enable Arrows in the tooltip 85 | ``` 86 | {{ Popper::arrow()->pop('Tooltip with arrow!'); }} 87 | {{ Popper::arrow('round')->pop('Tooltip with a rounded arrow!'); }} 88 | ``` 89 | 90 | - Modify Tooltip Placement 91 | ``` 92 | {{ Popper::placement('bottom', 'start')->pop('Bottom Tooltip!'); //position, alignment }} 93 | {{ Popper::position('left')->pop('Left Tooltip!'); // top, right, bottom, left }} 94 | {{ Popper::alignment('end')->pop('Tooltip with end alignment!'); // start, center, end }} 95 | ``` 96 | 97 | - Modify Tooltip distance from the element 98 | ``` 99 | //Use integers! 100 | {{ Popper::distance(50)->pop('Tooltip far away!'); }} 101 | ``` 102 | 103 | - Modify Tooltip size 104 | ``` 105 | {{ Popper::size('small')->pop('Small tooltip!'); // 'small', 'regular', 'large' }} 106 | ``` 107 | 108 | - Modify Tooltip Triggers (What will make tooltip appear) 109 | ``` 110 | // 1st param is mouseenter, 2nd is focus, 3rd is click 111 | {{ Popper::trigger(true, true, false)->pop('This tooltip appears onmouseover and onfocus!'); }} 112 | ``` 113 | 114 | - Modify Tooltip Show and Hide Delay 115 | ``` 116 | // Use integer values! 117 | {{ Popper::delay(500,0)->pop('500ms to appear, but vanishes instantly!'); }} 118 | ``` 119 | 120 | - Modify Tooltip Theme 121 | ``` 122 | // 'light', 'lightborder', 'google', 'translucent', 'success', 'danger', 'warning', 'info' 123 | // For the success, danger, warning, info, you can also use the Helpers (see next info) 124 | // If you are using themes, enable themes at the config file! 125 | {{ Popper::theme('light')->pop('Light Theming!'); }} 126 | ``` 127 | 128 | - Simple Success, Danger, Warning, Info Popup Helpers 129 | ``` 130 | {{ Popper::success('Success Message!") }} 131 | {{ Popper::danger('Danger Message!") }} 132 | {{ Popper::warning('Warning Message!") }} 133 | {{ Popper::info('Info Message!") }} 134 | ``` 135 | 136 | - Enable Tooltip Interactivity 137 | ``` 138 | {{ Popper::interactive()->pop('Select this text!'); }} 139 | ``` 140 | 141 | - Options Chain! 142 | ``` 143 | {{ Popper::arrow()->size('large')->distance(50)->position('bottom')->pop('Arrow, Large, Far and at Bottom!'); }} 144 | ``` 145 | 146 | ## 147 | 148 | This package is powered by [Pooper.js](https://popper.js.org/) and [Tippy.js](https://atomiks.github.io/tippyjs/) 149 | 150 | ## License 151 | 152 | Laravel Popper is open-sourced software licensed under the MIT License (MIT). Please see [License File](LICENSE) for more information. 153 | 154 | #### Todo 155 | 156 | [x] Danger / Warning / Success , etc pops 157 | 158 | [] Custom Theming 159 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "andcarpi/laravel-popper", 3 | "type": "library", 4 | "license": "MIT", 5 | "description": "A Easy to use Laravel Package, that allows you to generate tooltips in your blade views.", 6 | "keywords": [ 7 | "laravel", 8 | "laravel-package", 9 | "popper", 10 | "tippy", 11 | "tooltip", 12 | "blade", 13 | "view" 14 | ], 15 | "authors": [ 16 | { 17 | "name": "Anderson Carpi", 18 | "email": "kustelac@yahoo.com.br" 19 | } 20 | ], 21 | "minimum-stability": "dev", 22 | "require": { 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "andcarpi\\Popper\\": "src/" 27 | } 28 | }, 29 | "extra": { 30 | "laravel": { 31 | "providers": [ 32 | "andcarpi\\Popper\\PopperServiceProvider" 33 | ], 34 | "aliases": { 35 | "Popper": "andcarpi\\Popper\\Facades\\Popper" 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/popper.php: -------------------------------------------------------------------------------- 1 | [ 14 | 'active' => true, 15 | 'mode' => 'cdn', 16 | 'cdn' => 'https://unpkg.com/popper.js@1', 17 | 'asset' => 'vendor/laravel-popper/popper.min.js', 18 | ], 19 | 'tippy' => [ 20 | 'active' => true, 21 | 'mode' => 'cdn', 22 | 'cdn' => 'https://unpkg.com/tippy.js@4', 23 | 'asset' => 'vendor/laravel-popper/index.all.min.js', 24 | ], 25 | 26 | /* 27 | * Path location to the themes files. 28 | * Popper will only inject the used themes. 29 | */ 30 | 'themes-path' => base_path().'/vendor/andcarpi/laravel-popper/resources/css/', 31 | 32 | /* 33 | * If you have problems with small tooltips, you probably using bootstrap 3. 34 | * Activate this configuration to inject some fixing css to your views. 35 | */ 36 | 'fix-bs3' => false, 37 | 38 | /* 39 | * Values to use for all the tooltips, change if you want 40 | * You can also use the class config helpers to customize them 41 | */ 42 | 'defaultConfig' => [ 43 | 44 | /* 45 | * Tooltip Arrow pointing the parent element 46 | * 47 | * Active true to have an arrow at the tooltip, false to not 48 | * 49 | * Type can be 'sharp' or 'round' 50 | */ 51 | 'arrow' => [ 52 | 'active' => false, 53 | 'type' => 'sharp', 54 | ], 55 | 56 | /* 57 | * Tooltip placement based on the element 58 | * 59 | * Position can be: 'top', 'right', 'left' or 'bottom' 60 | * 61 | * Alignment will align based on the axis it is positioned. 62 | * Values: 'start', 'center', 'end' 63 | * 64 | */ 65 | 'placement' => [ 66 | 'position' => 'top', 67 | 'alignment' => 'center', 68 | ], 69 | 70 | /* 71 | * Tooltip theme 72 | * Values: 'dark', 'light', 'google', 'light-border' 73 | */ 74 | 'theme' => 'dark', 75 | 76 | /* 77 | * What will trigger the Tooltip 78 | * 79 | */ 80 | 'trigger' => [ 81 | 'mouseenter' => true, 82 | 'focus' => true, 83 | 'click' => false, 84 | ], 85 | 86 | /* 87 | * Tooltip size 88 | * 89 | * Values: 'small', 'regular', 'large' 90 | */ 91 | 'size' => 'regular', 92 | 93 | /* 94 | * The distance the tooltip will have from the parent element 95 | * 96 | * Must be an integer 97 | */ 98 | 'distance' => 10, 99 | 100 | /* 101 | * Tooltip animation when showing/hiding and the animation duration 102 | * 103 | * Modes available are 'shift-away', 'shift-toward', 'scale', 'fade' 104 | * 105 | * Show and Hide duration must be integers 106 | */ 107 | 'animation' => [ 108 | 'mode' => 'shift-away', 109 | 'show_duration' => 275, 110 | 'hide_duration' => 250, 111 | ], 112 | 113 | /* 114 | * Time to wait before the Tooltip Show and Hide 115 | * 116 | * Must be integer 117 | */ 118 | 'delay' => [ 119 | 'show' => 0, 120 | 'hide' => 20, 121 | ], 122 | 123 | /* 124 | * Enable the user to interact with the tooltip, to copy, or click elements. 125 | */ 126 | 'interactive' => false, 127 | ], 128 | ]; 129 | -------------------------------------------------------------------------------- /docs/welcome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andcarpi/laravel-popper/fd01cbc60a62acd71ff4205ae7a03820b1a9951c/docs/welcome.gif -------------------------------------------------------------------------------- /resources/css/danger.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.danger-theme{background-color:#f66;padding:.25rem .4375rem;font-size:.8125rem;font-weight:600}.tippy-tooltip.danger-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #f66;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.danger-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #f66;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.danger-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #f66;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.danger-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #f66;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.danger-theme .tippy-backdrop{background-color:#f66}.tippy-tooltip.danger-theme .tippy-roundarrow{fill:#f66}.tippy-tooltip.danger-theme[data-animatefill]{background-color:initial}.tippy-tooltip.danger-theme[data-size=small]{font-size:.75rem;padding:.1875rem .375rem}.tippy-tooltip.danger-theme[data-size=large]{font-size:1rem;padding:.375rem .75rem} -------------------------------------------------------------------------------- /resources/css/google.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.google-theme{background-color:#505355;padding:.25rem .4375rem;font-size:.8125rem;font-weight:600}.tippy-tooltip.google-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #505355;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.google-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #505355;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.google-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #505355;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.google-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #505355;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.google-theme .tippy-backdrop{background-color:#505355}.tippy-tooltip.google-theme .tippy-roundarrow{fill:#505355}.tippy-tooltip.google-theme[data-animatefill]{background-color:initial}.tippy-tooltip.google-theme[data-size=small]{font-size:.75rem;padding:.1875rem .375rem}.tippy-tooltip.google-theme[data-size=large]{font-size:1rem;padding:.375rem .75rem} -------------------------------------------------------------------------------- /resources/css/info.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.info-theme{background-color:#64b5f6;padding:.25rem .4375rem;font-size:.8125rem;font-weight:600}.tippy-tooltip.info-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #64b5f6;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.info-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #64b5f6;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.info-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #64b5f6;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.info-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #64b5f6;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.info-theme .tippy-backdrop{background-color:#64b5f6}.tippy-tooltip.info-theme .tippy-roundarrow{fill:#64b5f6}.tippy-tooltip.info-theme[data-animatefill]{background-color:initial}.tippy-tooltip.info-theme[data-size=small]{font-size:.75rem;padding:.1875rem .375rem}.tippy-tooltip.info-theme[data-size=large]{font-size:1rem;padding:.375rem .75rem} -------------------------------------------------------------------------------- /resources/css/light-border.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.light-border-theme{background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,8,16,.15);color:#26323d;box-shadow:0 3px 14px -.5px rgba(0,8,16,.08)}.tippy-tooltip.light-border-theme .tippy-backdrop{background-color:#fff}.tippy-tooltip.light-border-theme .tippy-arrow:after,.tippy-tooltip.light-border-theme .tippy-arrow:before,.tippy-tooltip.light-border-theme .tippy-roundarrow:after,.tippy-tooltip.light-border-theme .tippy-roundarrow:before{content:'';position:absolute;z-index:-1}.tippy-tooltip.light-border-theme .tippy-roundarrow{fill:#fff}.tippy-tooltip.light-border-theme .tippy-roundarrow:after{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEuNDE0IiB2aWV3Qm94PSIwIDAgMTggNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCA3czIuMDIxLS4wMTUgNS4yNTMtNC4yMThDNi41ODQgMS4wNTEgNy43OTcuMDA3IDkgMGMxLjIwMy0uMDA3IDIuNDE2IDEuMDM1IDMuNzYxIDIuNzgyQzE2LjAxMiA3LjAwNSAxOCA3IDE4IDd6IiBmaWxsPSIjMzMzIiBmaWxsLW9wYWNpdHk9Ii4yMzUiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==);background-size:18px 7px;width:18px;height:7px;left:0;top:0;fill:rgba(0,8,16,.15)}.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-roundarrow:after{top:1px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow{border-top-color:#fff}.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow:after{border-top:7px solid #fff;top:-7px}.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow:before{border-top:7px solid rgba(0,8,16,.2);bottom:-1px}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-roundarrow:after{top:-1px}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow{border-bottom-color:#fff}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow:after{border-bottom:7px solid #fff;bottom:-7px}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow:before{border-bottom:7px solid rgba(0,8,16,.2);bottom:-6px}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-roundarrow:after{left:1px;top:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow{border-left-color:#fff}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow:after{border-left:7px solid #fff;left:-7px}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow:before{border-left:7px solid rgba(0,8,16,.2);left:-6px}.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-roundarrow:after{left:-1px;top:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow{border-right-color:#fff}.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow:after{border-right:7px solid #fff;right:-7px}.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow:before{border-right:7px solid rgba(0,8,16,.2);right:-6px}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow,.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-roundarrow,.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow,.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-roundarrow{-webkit-transform:translateX(-1px);transform:translateX(-1px)}.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow:after,.tippy-tooltip.light-border-theme[x-placement^=bottom] .tippy-arrow:before,.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow:after,.tippy-tooltip.light-border-theme[x-placement^=top] .tippy-arrow:before{left:-7px;border-left:7px solid transparent;border-right:7px solid transparent}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow,.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-roundarrow,.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow,.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-roundarrow{-webkit-transform:translateY(-1px);transform:translateY(-1px)}.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow:after,.tippy-tooltip.light-border-theme[x-placement^=left] .tippy-arrow:before,.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow:after,.tippy-tooltip.light-border-theme[x-placement^=right] .tippy-arrow:before{top:-7px;border-top:7px solid transparent;border-bottom:7px solid transparent} -------------------------------------------------------------------------------- /resources/css/light.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.light-theme{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-tooltip.light-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #fff;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.light-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #fff;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.light-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #fff;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.light-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #fff;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.light-theme .tippy-backdrop{background-color:#fff}.tippy-tooltip.light-theme .tippy-roundarrow{fill:#fff}.tippy-tooltip.light-theme[data-animatefill]{background-color:initial} -------------------------------------------------------------------------------- /resources/css/success.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.success-theme{background-color:#66bb6a;padding:.25rem .4375rem;font-size:.8125rem;font-weight:600}.tippy-tooltip.success-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #66bb6a;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.success-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #66bb6a;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.success-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #66bb6a;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.success-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #66bb6a;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.success-theme .tippy-backdrop{background-color:#66bb6a}.tippy-tooltip.success-theme .tippy-roundarrow{fill:#66bb6a}.tippy-tooltip.success-theme[data-animatefill]{background-color:initial}.tippy-tooltip.success-theme[data-size=small]{font-size:.75rem;padding:.1875rem .375rem}.tippy-tooltip.success-theme[data-size=large]{font-size:1rem;padding:.375rem .75rem} -------------------------------------------------------------------------------- /resources/css/theme.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.custom-theme { 2 | background-color: rgb(255, 102, 102); 3 | padding: .25rem .4375rem; 4 | font-size: .8125rem; 5 | font-weight: 600 6 | } 7 | 8 | .tippy-tooltip.custom-theme[x-placement^=top] .tippy-arrow { 9 | border-top: 8px solid rgb(255, 102, 102); 10 | border-right: 8px solid transparent; 11 | border-left: 8px solid transparent 12 | } 13 | 14 | .tippy-tooltip.custom-theme[x-placement^=bottom] .tippy-arrow { 15 | border-bottom: 8px solid rgb(255, 102, 102); 16 | border-right: 8px solid transparent; 17 | border-left: 8px solid transparent 18 | } 19 | 20 | .tippy-tooltip.custom-theme[x-placement^=left] .tippy-arrow { 21 | border-left: 8px solid rgb(255, 102, 102); 22 | border-top: 8px solid transparent; 23 | border-bottom: 8px solid transparent 24 | } 25 | 26 | .tippy-tooltip.custom-theme[x-placement^=right] .tippy-arrow { 27 | border-right: 8px solid rgb(255, 102, 102); 28 | border-top: 8px solid transparent; 29 | border-bottom: 8px solid transparent 30 | } 31 | 32 | .tippy-tooltip.custom-theme .tippy-backdrop { 33 | background-color: rgb(255, 102, 102) 34 | } 35 | 36 | .tippy-tooltip.custom-theme .tippy-roundarrow { 37 | fill: rgb(255, 102, 102) 38 | } 39 | 40 | .tippy-tooltip.custom-theme[data-animatefill] { 41 | background-color: initial 42 | } 43 | 44 | .tippy-tooltip.custom-theme[data-size=small] { 45 | font-size: .75rem; 46 | padding: .1875rem .375rem 47 | } 48 | 49 | .tippy-tooltip.custom-theme[data-size=large] { 50 | font-size: 1rem; 51 | padding: .375rem .75rem 52 | } -------------------------------------------------------------------------------- /resources/css/translucent.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.translucent-theme{background-color:rgba(0,0,0,.7)}.tippy-tooltip.translucent-theme[x-placement^=top] .tippy-arrow{border-top:7px solid rgba(0,0,0,.7);border-right:7px solid transparent;border-left:7px solid transparent}.tippy-tooltip.translucent-theme[x-placement^=bottom] .tippy-arrow{border-bottom:7px solid rgba(0,0,0,.7);border-right:7px solid transparent;border-left:7px solid transparent}.tippy-tooltip.translucent-theme[x-placement^=left] .tippy-arrow{border-left:7px solid rgba(0,0,0,.7);border-top:7px solid transparent;border-bottom:7px solid transparent}.tippy-tooltip.translucent-theme[x-placement^=right] .tippy-arrow{border-right:7px solid rgba(0,0,0,.7);border-top:7px solid transparent;border-bottom:7px solid transparent}.tippy-tooltip.translucent-theme .tippy-backdrop{background-color:rgba(0,0,0,.7)}.tippy-tooltip.translucent-theme .tippy-roundarrow{fill:rgba(0,0,0,.7)}.tippy-tooltip.translucent-theme[data-animatefill]{background-color:initial} -------------------------------------------------------------------------------- /resources/css/warning.css: -------------------------------------------------------------------------------- 1 | .tippy-tooltip.warning-theme{color: #666600;background-color:#ffe082;padding:.25rem .4375rem;font-size:.8125rem;font-weight:600}.tippy-tooltip.warning-theme[x-placement^=top] .tippy-arrow{border-top:8px solid #ffe082;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.warning-theme[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #ffe082;border-right:8px solid transparent;border-left:8px solid transparent}.tippy-tooltip.warning-theme[x-placement^=left] .tippy-arrow{border-left:8px solid #ffe082;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.warning-theme[x-placement^=right] .tippy-arrow{border-right:8px solid #ffe082;border-top:8px solid transparent;border-bottom:8px solid transparent}.tippy-tooltip.warning-theme .tippy-backdrop{background-color:#ffe082}.tippy-tooltip.warning-theme .tippy-roundarrow{fill:#ffe082}.tippy-tooltip.warning-theme[data-animatefill]{background-color:initial}.tippy-tooltip.warning-theme[data-size=small]{font-size:.75rem;padding:.1875rem .375rem}.tippy-tooltip.warning-theme[data-size=large]{font-size:1rem;padding:.375rem .75rem} -------------------------------------------------------------------------------- /resources/js/index.all.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):(t=t||self).tippy=e(t.Popper)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e-1}function F(t){return t instanceof Element}function j(t){return!(!t||!N(t,"isVirtual"))||F(t)}function U(t,e){return"function"==typeof t?t.apply(null,e):t}function W(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function R(){return document.createElement("div")}function J(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function G(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function K(t,a){var r=e({},a,{content:U(a.content,[t])},a.ignoreAttributes?{}:function(t){return _.reduce(function(e,a){var r=(t.getAttribute("data-tippy-".concat(a))||"").trim();if(!r)return e;if("content"===a)e[a]=r;else try{e[a]=JSON.parse(r)}catch(t){e[a]=r}return e},{})}(t));return(r.arrow||i)&&(r.animateFill=!1),r}function Q(t,e){Object.keys(t).forEach(function(t){if(!N(e,t))throw new Error("[tippy]: `".concat(t,"` is not a valid option"))})}function Z(t,e){t.innerHTML=F(e)?e.innerHTML:e}function $(t,e){if(F(e.content))Z(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function tt(t){return{tooltip:t.querySelector(X),backdrop:t.querySelector(T),content:t.querySelector(Y),arrow:t.querySelector(I)||t.querySelector(S)}}function et(t){t.setAttribute("data-inertia","")}function at(t){var e=R();return"round"===t?(e.className=C,Z(e,'')):e.className=E,e}function rt(){var t=R();return t.className=A,t.setAttribute("data-state","hidden"),t}function nt(t,e){t.setAttribute("tabindex","-1"),e.setAttribute("data-interactive","")}function it(t,e,a){var r=i&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](r,a)}function ot(t){var e=t.getAttribute(y);return e?e.split("-")[0]:""}function pt(t,e,a){a.split(" ").forEach(function(a){t.classList[e](a+"-theme")})}function st(t,e){var a=R();a.className=g,a.id="tippy-".concat(t),a.style.zIndex=""+e.zIndex,a.style.position="absolute",a.style.top="0",a.style.left="0",e.role&&a.setAttribute("role",e.role);var r=R();r.className=w,r.style.maxWidth=e.maxWidth+("number"==typeof e.maxWidth?"px":""),r.setAttribute("data-size",e.size),r.setAttribute("data-animation",e.animation),r.setAttribute("data-state","hidden"),pt(r,"add",e.theme);var n=R();return n.className=k,n.setAttribute("data-state","hidden"),e.interactive&&nt(a,r),e.arrow&&r.appendChild(at(e.arrowType)),e.animateFill&&(r.appendChild(rt()),r.setAttribute("data-animatefill","")),e.inertia&&et(r),$(n,e),r.appendChild(n),a.appendChild(r),a}function ct(t,e,a){var r=tt(t),n=r.tooltip,i=r.content,o=r.backdrop,p=r.arrow;t.style.zIndex=""+a.zIndex,n.setAttribute("data-size",a.size),n.setAttribute("data-animation",a.animation),n.style.maxWidth=a.maxWidth+("number"==typeof a.maxWidth?"px":""),a.role?t.setAttribute("role",a.role):t.removeAttribute("role"),e.content!==a.content&&$(i,a),!e.animateFill&&a.animateFill?(n.appendChild(rt()),n.setAttribute("data-animatefill","")):e.animateFill&&!a.animateFill&&(n.removeChild(o),n.removeAttribute("data-animatefill")),!e.arrow&&a.arrow?n.appendChild(at(a.arrowType)):e.arrow&&!a.arrow&&n.removeChild(p),e.arrow&&a.arrow&&e.arrowType!==a.arrowType&&n.replaceChild(at(a.arrowType),p),!e.interactive&&a.interactive?nt(t,n):e.interactive&&!a.interactive&&function(t,e){t.removeAttribute("tabindex"),e.removeAttribute("data-interactive")}(t,n),!e.inertia&&a.inertia?et(n):e.inertia&&!a.inertia&&function(t){t.removeAttribute("data-inertia")}(n),e.theme!==a.theme&&(pt(n,"remove",e.theme),pt(n,"add",a.theme))}var lt=1,dt=[];function ft(a,r){var i,o,c,h,g,w=K(a,r);if(!w.multiple&&a._tippy)return null;var k,A,E,C,X,Y=!1,T=!1,I=!1,S=!1,z=[],M=D(ht,w.interactiveDebounce),H=lt++,V=st(H,w),_=tt(V),j={id:H,reference:a,popper:V,popperChildren:_,popperInstance:null,props:w,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:Tt,set:It,setContent:function(t){It({content:t})},show:St,hide:Ot,enable:function(){j.state.isEnabled=!0},disable:function(){j.state.isEnabled=!1},destroy:function(t){if(j.state.isDestroyed)return;T=!0,j.state.isMounted&&Ot(0);bt(),delete a._tippy;var e=j.props.target;e&&t&&F(a)&&d(a.querySelectorAll(e)).forEach(function(t){t._tippy&&t._tippy.destroy()});j.popperInstance&&j.popperInstance.destroy();T=!1,j.state.isDestroyed=!0}};return a._tippy=j,V._tippy=j,ut(),w.lazy||Ct(),w.showOnInit&&Lt(),!w.a11y||w.target||(!F(X=$())||l.call(X,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")&&!X.hasAttribute("disabled"))||$().setAttribute("tabindex","0"),V.addEventListener("mouseenter",function(t){j.props.interactive&&j.state.isVisible&&"mouseenter"===i&&Lt(t,!0)}),V.addEventListener("mouseleave",function(){j.props.interactive&&"mouseenter"===i&&document.addEventListener("mousemove",M)}),j;function R(){document.removeEventListener("mousemove",yt)}function Z(){document.body.removeEventListener("mouseleave",Xt),document.removeEventListener("mousemove",M),dt=dt.filter(function(t){return t!==M})}function $(){return j.props.triggerTarget||a}function et(){document.addEventListener("click",Yt,!0)}function at(){document.removeEventListener("click",Yt,!0)}function rt(){return[j.popperChildren.tooltip,j.popperChildren.backdrop,j.popperChildren.content]}function nt(){var t=j.props.followCursor;return t&&"focus"!==i||O&&"initial"===t}function pt(t,e){var a=j.popperChildren.tooltip;function r(t){t.target===a&&(it(a,"remove",r),e())}if(0===t)return e();it(a,"remove",E),it(a,"add",r),E=r}function mt(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];$().addEventListener(t,e,a),z.push({eventType:t,handler:e,options:a})}function ut(){j.props.touchHold&&!j.props.target&&(mt("touchstart",vt,u),mt("touchend",xt,u)),j.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)if(j.props.target)switch(t){case"mouseenter":mt("mouseover",wt),mt("mouseout",kt);break;case"focus":mt("focusin",wt),mt("focusout",kt);break;case"click":mt(t,wt)}else switch(mt(t,vt),t){case"mouseenter":mt("mouseleave",xt);break;case"focus":mt(n?"focusout":"blur",gt)}})}function bt(){z.forEach(function(t){var e=t.eventType,a=t.handler,r=t.options;$().removeEventListener(e,a,r)}),z=[]}function yt(t){var r=o=t,n=r.clientX,i=r.clientY;if(C){var p=m(t.target,function(t){return t===a}),s=a.getBoundingClientRect(),c=j.props.followCursor,l="horizontal"===c,d="vertical"===c,f=B(["top","bottom"],ot(V)),u=V.getAttribute(y),b=!!u&&!!u.split("-")[1],v=f?V.offsetWidth:V.offsetHeight,h=v/2,x=f?0:b?v:h,g=f?b?v:h:0;!p&&j.props.interactive||(j.popperInstance.reference=e({},j.popperInstance.reference,{referenceNode:a,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:f?v:0,height:f?0:v,top:(l?s.top:i)-x,bottom:(l?s.bottom:i)+x,left:(d?s.left:n)-g,right:(d?s.right:n)+g}}}),j.popperInstance.update()),"initial"===c&&j.state.isVisible&&R()}}function vt(t){j.state.isEnabled&&!At(t)&&(j.state.isVisible||(i=t.type,t instanceof MouseEvent&&(o=t,dt.forEach(function(e){return e(t)}))),"click"===t.type&&!1!==j.props.hideOnClick&&j.state.isVisible?Xt():Lt(t))}function ht(t){var e=f(t.target,L)===V,r=m(t.target,function(t){return t===a});e||r||function(t,e,a,r){if(!t)return!0;var n=a.clientX,i=a.clientY,o=r.interactiveBorder,p=r.distance,s=e.top-i>("top"===t?o+p:o),c=i-e.bottom>("bottom"===t?o+p:o),l=e.left-n>("left"===t?o+p:o),d=n-e.right>("right"===t?o+p:o);return s||c||l||d}(ot(V),V.getBoundingClientRect(),t,j.props)&&(Z(),Xt())}function xt(t){if(!At(t))return j.props.interactive?(document.body.addEventListener("mouseleave",Xt),document.addEventListener("mousemove",M),void dt.push(M)):void Xt()}function gt(t){t.target===$()&&(j.props.interactive&&t.relatedTarget&&V.contains(t.relatedTarget)||Xt())}function wt(t){f(t.target,j.props.target)&&Lt(t)}function kt(t){f(t.target,j.props.target)&&Xt()}function At(t){var e="ontouchstart"in window,a=B(t.type,"touch"),r=j.props.touchHold;return e&&O&&r&&!a||O&&!r&&a}function Et(){!S&&A&&(S=!0,function(t){t.offsetHeight}(V),A())}function Ct(){var r=j.props.popperOptions,n=j.popperChildren,i=n.tooltip,o=n.arrow,p=q(r,"preventOverflow");function s(t){j.props.flip&&!j.props.flipOnUpdate&&(t.flipped&&(j.popperInstance.options.placement=t.placement),W(j.popperInstance.modifiers,!1)),i.setAttribute(y,t.placement),!1!==t.attributes[v]?i.setAttribute(v,""):i.removeAttribute(v),k&&k!==t.placement&&I&&(i.style.transition="none",requestAnimationFrame(function(){i.style.transition=""})),k=t.placement,I=j.state.isVisible;var a=ot(V),r=i.style;r.top=r.bottom=r.left=r.right="",r[a]=-(j.props.distance-10)+"px";var n=p&&void 0!==p.padding?p.padding:b,o="number"==typeof n,s=e({top:o?n:n.top,bottom:o?n:n.bottom,left:o?n:n.left,right:o?n:n.right},!o&&n);s[a]=o?n+j.props.distance:(n[a]||0)+j.props.distance,j.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=s,C=s}var c=e({eventsEnabled:!1,placement:j.props.placement},r,{modifiers:e({},r?r.modifiers:{},{preventOverflow:e({boundariesElement:j.props.boundary,padding:b},p),arrow:e({element:o,enabled:!!o},q(r,"arrow")),flip:e({enabled:j.props.flip,padding:j.props.distance+b,behavior:j.props.flipBehavior},q(r,"flip")),offset:e({offset:j.props.offset},q(r,"offset"))}),onCreate:function(t){s(t),Et(),r&&r.onCreate&&r.onCreate(t)},onUpdate:function(t){s(t),Et(),r&&r.onUpdate&&r.onUpdate(t)}});j.popperInstance=new t(a,V,c)}function Lt(t,a){if(Tt(),!j.state.isVisible){if(j.props.target)return function(t){if(t){var a=f(t.target,j.props.target);a&&!a._tippy&&ft(a,e({},j.props,{content:U(r.content,[a]),appendTo:r.appendTo,target:"",showOnInit:!0}))}}(t);if(Y=!0,t&&!a&&j.props.onTrigger(j,t),j.props.wait)return j.props.wait(j,t);nt()&&!j.state.isMounted&&(j.popperInstance||Ct(),document.addEventListener("mousemove",yt)),et();var n=P(j.props.delay,0,p.delay);n?c=setTimeout(function(){St()},n):St()}}function Xt(){if(Tt(),!j.state.isVisible)return R(),void at();Y=!1;var t=P(j.props.delay,1,p.delay);t?h=setTimeout(function(){j.state.isVisible&&Ot()},t):g=requestAnimationFrame(function(){Ot()})}function Yt(t){if(!j.props.interactive||!V.contains(t.target)){if($().contains(t.target)){if(O)return;if(j.state.isVisible&&B(j.props.trigger,"click"))return}!0===j.props.hideOnClick&&(Tt(),Ot())}}function Tt(){clearTimeout(c),clearTimeout(h),cancelAnimationFrame(g)}function It(t){Q(t=t||{},p),bt();var r=j.props,n=K(a,e({},j.props,{},t,{ignoreAttributes:!0}));n.ignoreAttributes=N(t,"ignoreAttributes")?t.ignoreAttributes||!1:r.ignoreAttributes,j.props=n,ut(),Z(),M=D(ht,n.interactiveDebounce),ct(V,r,n),j.popperChildren=tt(V),j.popperInstance&&(s.some(function(e){return N(t,e)&&t[e]!==r[e]})?(j.popperInstance.destroy(),Ct(),j.state.isVisible&&j.popperInstance.enableEventListeners(),j.props.followCursor&&o&&yt(o)):j.popperInstance.update())}function St(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P(j.props.duration,0,p.duration[1]);if(!j.state.isDestroyed&&j.state.isEnabled&&(!O||j.props.touch)&&!$().hasAttribute("disabled")&&!1!==j.props.onShow(j)){et(),V.style.visibility="visible",j.state.isVisible=!0,j.props.interactive&&$().classList.add(x);var e=rt();J(e.concat(V),0),A=function(){if(j.state.isVisible){var r=nt();r&&o?yt(o):r||j.popperInstance.update(),j.popperChildren.backdrop&&(j.popperChildren.content.style.transitionDelay=Math.round(t/12)+"ms"),j.props.sticky&&function(){J([V],n?0:j.props.updateDuration);var t=a.getBoundingClientRect();!function e(){var r=a.getBoundingClientRect();t.top===r.top&&t.right===r.right&&t.bottom===r.bottom&&t.left===r.left||j.popperInstance.scheduleUpdate(),t=r,j.state.isMounted&&requestAnimationFrame(e)}()}(),J([V],j.props.updateDuration),J(e,t),G(e,"visible"),function(t,e){pt(t,e)}(t,function(){j.props.aria&&$().setAttribute("aria-".concat(j.props.aria),V.id),j.props.onShown(j),j.state.isShown=!0})}},function(){S=!1;var t=nt();j.popperInstance?(W(j.popperInstance.modifiers,j.props.flip),t||(j.popperInstance.reference=a,j.popperInstance.enableEventListeners()),j.popperInstance.scheduleUpdate()):(Ct(),t||j.popperInstance.enableEventListeners());var e=j.props.appendTo,r="parent"===e?a.parentNode:U(e,[a]);r.contains(V)||(r.appendChild(V),j.props.onMount(j),j.state.isMounted=!0)}()}}function Ot(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P(j.props.duration,1,p.duration[1]);if(!j.state.isDestroyed&&(j.state.isEnabled||T)&&(!1!==j.props.onHide(j)||T)){at(),V.style.visibility="hidden",j.state.isVisible=!1,j.state.isShown=!1,I=!1,j.props.interactive&&$().classList.remove(x);var e=rt();J(e,t),G(e,"hidden"),function(t,e){pt(t,function(){!j.state.isVisible&&V.parentNode&&V.parentNode.contains(V)&&e()})}(t,function(){Y||R(),j.props.aria&&$().removeAttribute("aria-".concat(j.props.aria)),j.popperInstance.disableEventListeners(),j.popperInstance.options.placement=j.props.placement,V.parentNode.removeChild(V),j.props.onHidden(j),j.state.isMounted=!1})}}}var mt=!1;function ut(t,a){Q(a||{},p),mt||(document.addEventListener("touchstart",z,u),window.addEventListener("blur",V),mt=!0);var r,n=e({},p,{},a);r=t,"[object Object]"!=={}.toString.call(r)||r.addEventListener||function(t){var e={isVirtual:!0,attributes:t.attributes||{},contains:function(){},setAttribute:function(e,a){t.attributes[e]=a},getAttribute:function(e){return t.attributes[e]},removeAttribute:function(e){delete t.attributes[e]},hasAttribute:function(e){return e in t.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){t.classList.classNames[e]=!0},remove:function(e){delete t.classList.classNames[e]},contains:function(e){return e in t.classList.classNames}}};for(var a in e)t[a]=e[a]}(t);var i=function(t){if(j(t))return[t];if(t instanceof NodeList)return d(t);if(Array.isArray(t))return t;try{return d(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var a=e&&ft(e,n);return a&&t.push(a),t},[]);return j(t)?i[0]:i}return ut.version="4.3.5",ut.defaults=p,ut.setDefaults=function(t){Object.keys(t).forEach(function(e){p[e]=t[e]})},ut.hideAll=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.exclude,a=t.duration;d(document.querySelectorAll(L)).forEach(function(t){var r,n=t._tippy;if(n){var i=!1;e&&(i=(r=e)._tippy&&!l.call(r,L)?n.reference===e:t===e.popper),i||n.hide(a)}})},ut.group=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.delay,n=void 0===r?t[0].props.delay:r,i=a.duration,o=void 0===i?0:i,p=!1;function s(t){p=t,f()}function c(e){e._originalProps.onShow(e),t.forEach(function(t){t.set({duration:o}),t.state.isVisible&&t.hide()}),s(!0)}function l(t){t._originalProps.onHide(t),s(!1)}function d(t){t._originalProps.onShown(t),t.set({duration:t._originalProps.duration})}function f(){t.forEach(function(t){t.set({onShow:c,onShown:d,onHide:l,delay:p?[0,Array.isArray(n)?n[1]:n]:n,duration:p?o:t._originalProps.duration})})}t.forEach(function(t){t._originalProps?t.set(t._originalProps):t._originalProps=e({},t.props)}),f()},a&&setTimeout(function(){d(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&ut(t,{content:e})})}),function(t){if(a){var e=document.createElement("style");e.type="text/css",e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var r=document.head,n=r.querySelector("style,link");n?r.insertBefore(e,n):r.appendChild(e)}}('.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px);transform:perspective(700px) translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) rotateX(60deg);transform:perspective(700px) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px);transform:perspective(700px) translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) rotateX(-60deg);transform:perspective(700px) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px);transform:perspective(700px) translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) rotateY(-60deg);transform:perspective(700px) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px);transform:perspective(700px) translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) rotateY(60deg);transform:perspective(700px) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:initial}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-roundarrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}'),ut}); 2 | //# sourceMappingURL=index.all.min.js.map -------------------------------------------------------------------------------- /resources/js/popper.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) Federico Zivolo 2019 3 | Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT). 4 | */var e='undefined'!=typeof window&&'undefined'!=typeof document;const t=['Edge','Trident','Firefox'];let o=0;for(let n=0;n{t||(t=!0,window.Promise.resolve().then(()=>{t=!1,e()}))}}function i(e){let t=!1;return()=>{t||(t=!0,setTimeout(()=>{t=!1,e()},o))}}const r=e&&window.Promise;var p=r?n:i;function d(e){return e&&'[object Function]'==={}.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];const o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}function f(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function a(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}const{overflow:t,overflowX:o,overflowY:n}=s(e);return /(auto|scroll|overlay)/.test(t+n+o)?e:a(f(e))}const l=e&&!!(window.MSInputMethodContext&&document.documentMode),m=e&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?l:10===e?m:l||m}function c(e){if(!e)return document.documentElement;const t=h(10)?document.body:null;let o=e.offsetParent||null;for(;o===t&&e.nextElementSibling;)o=(e=e.nextElementSibling).offsetParent;const n=o&&o.nodeName;return n&&'BODY'!==n&&'HTML'!==n?-1!==['TH','TD','TABLE'].indexOf(o.nodeName)&&'static'===s(o,'position')?c(o):o:e?e.ownerDocument.documentElement:document.documentElement}function u(e){const{nodeName:t}=e;return'BODY'!==t&&('HTML'===t||c(e.firstElementChild)===e)}function g(e){return null===e.parentNode?e:g(e.parentNode)}function b(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;const o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);const{commonAncestorContainer:p}=r;if(e!==p&&t!==p||n.contains(i))return u(p)?p:c(p);const d=g(e);return d.host?b(d.host,t):b(e,g(t).host)}function w(e,t='top'){const o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){const t=e.ownerDocument.documentElement,n=e.ownerDocument.scrollingElement||t;return n[o]}return e[o]}function y(e,t,o=!1){const n=w(t,'top'),i=w(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function E(e,t){const o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e[`border${o}Width`],10)+parseFloat(e[`border${n}Width`],10)}function x(e,t,o,n){return Math.max(t[`offset${e}`],t[`scroll${e}`],o[`client${e}`],o[`offset${e}`],o[`scroll${e}`],h(10)?parseInt(o[`offset${e}`])+parseInt(n[`margin${'Height'===e?'Top':'Left'}`])+parseInt(n[`margin${'Height'===e?'Bottom':'Right'}`]):0)}function v(e){const t=e.body,o=e.documentElement,n=h(10)&&getComputedStyle(o);return{height:x('Height',t,o,n),width:x('Width',t,o,n)}}var O=Object.assign||function(e){for(var t,o=1;oO({key:e},d[e],{area:B(d[e])})).sort((e,t)=>t.area-e.area),f=s.filter(({width:e,height:t})=>e>=o.clientWidth&&t>=o.clientHeight),a=0t[e])}function M(e,t,o){o=o.split('-')[0];const n=k(e),i={width:n.width,height:n.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',d=r?'left':'top',s=r?'height':'width',f=r?'width':'height';return i[p]=t[p]+t[s]/2-n[s]/2,i[d]=o===d?t[d]-n[f]:t[A(d)],i}function F(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function I(e,t,o){if(Array.prototype.findIndex)return e.findIndex((e)=>e[t]===o);const n=F(e,(e)=>e[t]===o);return e.indexOf(n)}function R(e,t,o){const n=void 0===o?e:e.slice(0,I(e,'name',o));return n.forEach((e)=>{e['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');const o=e['function']||e.fn;e.enabled&&d(o)&&(t.offsets.popper=L(t.offsets.popper),t.offsets.reference=L(t.offsets.reference),t=o(t,e))}),t}function U(){if(this.state.isDestroyed)return;let e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=W(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=H(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=R(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}function Y(e,t){return e.some(({name:e,enabled:o})=>o&&e===t)}function V(e){const t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1);for(let n=0;n{e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function X(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=_(this.reference,this.state))}function J(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Q(e,t){Object.keys(t).forEach((o)=>{let n='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&J(t[o])&&(n='px'),e.style[o]=t[o]+n})}function Z(e,t){Object.keys(t).forEach(function(o){const n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}function $(e){return Q(e.instance.popper,e.styles),Z(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Q(e.arrowElement,e.arrowStyles),e}function ee(e,t,o,n,i){const r=W(i,t,e,o.positionFixed),p=H(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),Q(t,{position:o.positionFixed?'fixed':'absolute'}),o}function te(e,t){const{popper:o,reference:n}=e.offsets,{round:i,floor:r}=Math,p=(e)=>e,d=i(n.width),s=i(o.width),f=-1!==['left','right'].indexOf(e.placement),a=-1!==e.placement.indexOf('-'),l=t?f||a||d%2==s%2?i:r:p,m=t?i:p;return{left:l(1==d%2&&1==s%2&&!a&&t?o.left-1:o.left),top:m(o.top),bottom:m(o.bottom),right:l(o.right)}}const oe=e&&/Firefox/i.test(navigator.userAgent);function ne(e,t){const{x:o,y:n}=t,{popper:i}=e.offsets,r=F(e.instance.modifiers,(e)=>'applyStyle'===e.name).gpuAcceleration;void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');const p=void 0===r?t.gpuAcceleration:r,d=c(e.instance.popper),s=S(d),f={position:i.position},a=te(e,2>window.devicePixelRatio||!oe),l='bottom'===o?'top':'bottom',m='right'===n?'left':'right',h=V('transform');let u,g;if(g='bottom'==l?'HTML'===d.nodeName?-d.clientHeight+a.bottom:-s.height+a.bottom:a.top,u='right'==m?'HTML'===d.nodeName?-d.clientWidth+a.right:-s.width+a.right:a.left,p&&h)f[h]=`translate3d(${u}px, ${g}px, 0)`,f[l]=0,f[m]=0,f.willChange='transform';else{const e='bottom'==l?-1:1,t='right'==m?-1:1;f[l]=g*e,f[m]=u*t,f.willChange=`${l}, ${m}`}const b={"x-placement":e.placement};return e.attributes=O({},b,e.attributes),e.styles=O({},f,e.styles),e.arrowStyles=O({},e.offsets.arrow,e.arrowStyles),e}function ie(e,t,o){const n=F(e,({name:e})=>e===t),i=!!n&&e.some((e)=>e.name===o&&e.enabled&&e.orderi[m]&&(e.offsets.popper[a]+=r[a]+h-i[m]),e.offsets.popper=L(e.offsets.popper);const c=r[a]+r[d]/2-h/2,u=s(e.instance.popper),g=parseFloat(u[`margin${f}`],10),b=parseFloat(u[`border${f}Width`],10);let w=c-e.offsets.popper[a]-g-b;return w=Math.max(Math.min(i[d]-h,w),0),e.arrowElement=o,e.offsets.arrow={[a]:Math.round(w),[l]:''},e}function pe(e){if('end'===e)return'start';return'start'===e?'end':e}var de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'];const se=de.slice(3);function fe(e,t=!1){const o=se.indexOf(e),n=se.slice(o+1).concat(se.slice(0,o));return t?n.reverse():n}const ae={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'};function le(e,t){if(Y(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;const o=P(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed);let n=e.placement.split('-')[0],i=A(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ae.FLIP:p=[n,i];break;case ae.CLOCKWISE:p=fe(n);break;case ae.COUNTERCLOCKWISE:p=fe(n,!0);break;default:p=t.behavior;}return p.forEach((d,s)=>{if(n!==d||p.length===s+1)return e;n=e.placement.split('-')[0],i=A(n);const f=e.offsets.popper,a=e.offsets.reference,l=Math.floor,m='left'===n&&l(f.right)>l(a.left)||'right'===n&&l(f.left)l(a.top)||'bottom'===n&&l(f.top)l(o.right),u=l(f.top)l(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&u||'bottom'===n&&g,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&u||!w&&'end'===r&&g),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&g||!w&&'end'===r&&u),x=y||E;(m||b||x)&&(e.flipped=!0,(m||b)&&(n=p[s+1]),x&&(r=pe(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=O({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=R(e.instance.modifiers,e,'flip'))}),e}function me(e){const{popper:t,reference:o}=e.offsets,n=e.placement.split('-')[0],i=Math.floor,r=-1!==['top','bottom'].indexOf(n),p=r?'right':'bottom',d=r?'left':'top',s=r?'width':'height';return t[p]i(o[p])&&(e.offsets.popper[d]=i(o[p])),e}function he(e,t,o,n){var i=Math.max;const r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),p=+r[1],d=r[2];if(!p)return e;if(0===d.indexOf('%')){let e;switch(d){case'%p':e=o;break;case'%':case'%r':default:e=n;}const i=L(e);return i[t]/100*p}if('vh'===d||'vw'===d){let e;return e='vh'===d?i(document.documentElement.clientHeight,window.innerHeight||0):i(document.documentElement.clientWidth,window.innerWidth||0),e/100*p}return p}function ce(e,t,o,n){const i=[0,0],r=-1!==['right','left'].indexOf(n),p=e.split(/(\+|\-)/).map((e)=>e.trim()),d=p.indexOf(F(p,(e)=>-1!==e.search(/,|\s/)));p[d]&&-1===p[d].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');const s=/\s*,\s*|\s+/;let f=-1===d?[p]:[p.slice(0,d).concat([p[d].split(s)[0]]),[p[d].split(s)[1]].concat(p.slice(d+1))];return f=f.map((e,n)=>{const i=(1===n?!r:r)?'height':'width';let p=!1;return e.reduce((e,t)=>''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t),[]).map((e)=>he(e,i,t,o))}),f.forEach((e,t)=>{e.forEach((o,n)=>{J(o)&&(i[t]+=o*('-'===e[n-1]?-1:1))})}),i}function ue(e,{offset:t}){const{placement:o,offsets:{popper:n,reference:i}}=e,r=o.split('-')[0];let p;return p=J(+t)?[+t,0]:ce(t,n,i,r),'left'===r?(n.top+=p[0],n.left-=p[1]):'right'===r?(n.top+=p[0],n.left+=p[1]):'top'===r?(n.left+=p[0],n.top-=p[1]):'bottom'===r&&(n.left+=p[0],n.top+=p[1]),e.popper=n,e}function ge(e,t){let o=t.boundariesElement||c(e.instance.popper);e.instance.reference===o&&(o=c(o));const n=V('transform'),i=e.instance.popper.style,{top:r,left:p,[n]:d}=i;i.top='',i.left='',i[n]='';const s=P(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);i.top=r,i.left=p,i[n]=d,t.boundaries=s;const f=t.priority;let a=e.offsets.popper;const l={primary(e){let o=a[e];return a[e]s[e]&&!t.escapeWithReference&&(n=Math.min(a[o],s[e]-('right'===e?a.width:a.height))),{[o]:n}}};return f.forEach((e)=>{const t=-1===['left','top'].indexOf(e)?'secondary':'primary';a=O({},a,l[t](e))}),e.offsets.popper=a,e}function be(e){const t=e.placement,o=t.split('-')[0],n=t.split('-')[1];if(n){const{reference:t,popper:i}=e.offsets,r=-1!==['bottom','top'].indexOf(o),p=r?'left':'top',d=r?'width':'height',s={start:{[p]:t[p]},end:{[p]:t[p]+t[d]-i[d]}};e.offsets.popper=O({},i,s[n])}return e}function we(e){if(!ie(e.instance.modifiers,'hide','preventOverflow'))return e;const t=e.offsets.reference,o=F(e.instance.modifiers,(e)=>'preventOverflow'===e.name).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right{},onUpdate:()=>{},modifiers:Ee};class ve{constructor(e,t,o={}){this.scheduleUpdate=()=>requestAnimationFrame(this.update),this.update=p(this.update.bind(this)),this.options=O({},ve.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=t&&t.jquery?t[0]:t,this.options.modifiers={},Object.keys(O({},ve.Defaults.modifiers,o.modifiers)).forEach((e)=>{this.options.modifiers[e]=O({},ve.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map((e)=>O({name:e},this.options.modifiers[e])).sort((e,t)=>e.order-t.order),this.modifiers.forEach((e)=>{e.enabled&&d(e.onLoad)&&e.onLoad(this.reference,this.popper,this.options,e,this.state)}),this.update();const n=this.options.eventsEnabled;n&&this.enableEventListeners(),this.state.eventsEnabled=n}update(){return U.call(this)}destroy(){return j.call(this)}enableEventListeners(){return G.call(this)}disableEventListeners(){return X.call(this)}}ve.Utils=('undefined'==typeof window?global:window).PopperUtils,ve.placements=de,ve.Defaults=xe;export default ve; 5 | //# sourceMappingURL=popper.min.js.map 6 | -------------------------------------------------------------------------------- /resources/views/assets.blade.php: -------------------------------------------------------------------------------- 1 | @if(Popper::hasThemes() or config('popper.fix-bs3')) 2 | 3 | @if(config('popper.fix-bs3')) 4 | 5 | @endif 6 | {{ Popper::injectThemes() }} 7 | @endif 8 | @if(! Config::has('popper')) 9 | 10 | 11 | @else 12 | {{--POPPER--}} 13 | @if(config('popper.popper.active')) 14 | 15 | @endif 16 | {{--TIPPY--}} 17 | @if(config('popper.tippy.active')) 18 | 19 | @endif 20 | @endif -------------------------------------------------------------------------------- /src/Facades/Popper.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'active' => false, 18 | 'type' => 'sharp', 19 | ], 20 | 'placement' => [ 21 | 'position' => 'top', 22 | 'alignment' => 'center', 23 | ], 24 | 'theme' => 'dark', 25 | 'trigger' => [ 26 | 'mouseenter' => true, 27 | 'focus' => true, 28 | 'click' => false, 29 | ], 30 | 'size' => 'regular', 31 | 'distance' => 10, 32 | 'animation' => [ 33 | 'mode' => 'shift-away', 34 | 'show_duration' => 275, 35 | 'hide_duration' => 250, 36 | ], 37 | 'delay' => [ 38 | 'show' => 0, 39 | 'hide' => 20, 40 | ], 41 | 'interactive' => false, 42 | ]; 43 | 44 | /* 45 | * Themes used 46 | */ 47 | private $themes = []; 48 | 49 | private $themePath; 50 | 51 | /** 52 | * Configuration options. 53 | * 54 | * @var array 55 | */ 56 | public $config; 57 | 58 | protected $text; 59 | 60 | public function __construct() 61 | { 62 | $this->text = ''; 63 | $this->setDefaultConfig(); 64 | $this->themePath = File::isDirectory(config('popper.themes-path')) ? 65 | config('popper.themes-path') : 66 | base_path().'/vendor/andcarpi/laravel-popper/resources/css/'; 67 | } 68 | 69 | /** 70 | * Set the default config based on the config file. 71 | */ 72 | protected function setDefaultConfig() 73 | { 74 | if (File::exists(config_path('popper.php'))) { 75 | $this->config = config('popper.defaultConfig'); 76 | } else { 77 | $this->config = $this->defaultconfig; 78 | } 79 | } 80 | 81 | /** 82 | * Checks if config is default. 83 | * @param string $option1 84 | * @param string $option2 85 | * @return bool 86 | */ 87 | protected function isDefault(string $option1, string $option2 = null) 88 | { 89 | if ($option2) { 90 | return $this->config[$option1][$option2] == $this->defaultconfig[$option1][$option2]; 91 | } 92 | 93 | return $this->config[$option1] == $this->defaultconfig[$option1]; 94 | } 95 | 96 | /** 97 | * Defines the Tooltip Text. 98 | * @param string $text 99 | */ 100 | public function text(string $text) 101 | { 102 | $this->text = $text; 103 | } 104 | 105 | /** 106 | * Enable arrow on the tooltip pointing to the element. 107 | * 108 | * @param string $style 109 | * @return Popper 110 | */ 111 | public function arrow($style = 'sharp') 112 | { 113 | $this->config['arrow']['active'] = true; 114 | $this->config['arrow']['type'] = (in_array($style, ['sharp', 'round'])) ? $style : 'sharp'; 115 | 116 | return $this; 117 | } 118 | 119 | /** 120 | * Modify the default Show and Hide timing. 121 | * 122 | * @param int $show 123 | * @param int $hide 124 | * @return Popper 125 | */ 126 | public function delay(int $show = 0, int $hide = 20) 127 | { 128 | $this->config['delay']['show'] = $show; 129 | $this->config['delay']['hide'] = $hide; 130 | 131 | return $this; 132 | } 133 | 134 | /** 135 | * Modify the default tooltip distance. 136 | * 137 | * @param int $distance 138 | * @return Popper 139 | */ 140 | public function distance(int $distance = 10) 141 | { 142 | $this->config['distance'] = $distance; 143 | 144 | return $this; 145 | } 146 | 147 | /** 148 | * Modify the default tooltip size. 149 | * 150 | * @param string $size 151 | * @return Popper 152 | */ 153 | public function size(string $size = 'regular') 154 | { 155 | $this->config['size'] = (in_array($size, ['small', 'regular', 'large'])) ? $size : 'regular'; 156 | 157 | return $this; 158 | } 159 | 160 | /** 161 | * Modify the default tooltip theme. 162 | * 163 | * @param string $theme 164 | * @return Popper 165 | */ 166 | public function theme(string $theme = 'dark') 167 | { 168 | $this->config['theme'] = (in_array($theme, ['dark', 'light', 'light-border', 'google', 'translucent', 'danger', 'warning', 'info', 'success'])) ? $theme : 'dark'; 169 | 170 | return $this; 171 | } 172 | 173 | /** 174 | * Modify the default tooltip placement. 175 | * 176 | * @param string $position 177 | * @param string $alignment 178 | * @return Popper 179 | */ 180 | public function placement(string $position = 'top', $alignment = 'center') 181 | { 182 | $this->position($position); 183 | $this->alignment($alignment); 184 | 185 | return $this; 186 | } 187 | 188 | /** 189 | * Modify the default tooltip position. 190 | * 191 | * @param string $position 192 | * @return Popper 193 | */ 194 | public function position(string $position = 'top') 195 | { 196 | $this->config['placement']['position'] = (in_array($position, ['top', 'right', 'left', 'bottom'])) ? $position : 'top'; 197 | 198 | return $this; 199 | } 200 | 201 | /** 202 | * Modify the default tooltip alignment. 203 | * 204 | * @param string $alignment 205 | * @return Popper 206 | */ 207 | public function alignment(string $alignment = 'center') 208 | { 209 | $this->config['placement']['alignment'] = (in_array($alignment, ['center', 'start', 'end'])) ? $alignment : 'center'; 210 | 211 | return $this; 212 | } 213 | 214 | /** 215 | * Modify the default tooltip animation. 216 | * 217 | * @param string $mode 218 | * @param int $show_duration 219 | * @param int $hide_duration 220 | * @return Popper 221 | */ 222 | public function animate(string $mode = 'shift-away', int $show_duration = 275, int $hide_duration = 250) 223 | { 224 | $this->config['animation']['mode'] = (in_array($mode, ['shift-away', 'shift-toward', 'scale', 'fade'])) ? $mode : 'shift-away'; 225 | $this->config['animation']['show_duration'] = $show_duration; 226 | $this->config['animation']['hide_duration'] = $hide_duration; 227 | 228 | return $this; 229 | } 230 | 231 | /** 232 | * Modify the tooltip triggers. 233 | * 234 | * @param bool $mouseenter 235 | * @param bool $focus 236 | * @param bool $click 237 | * @return Popper 238 | */ 239 | public function trigger(bool $mouseenter = true, bool $focus = true, bool $click = false) 240 | { 241 | if ($mouseenter or $focus or $click) { 242 | $this->config['trigger']['mouseenter'] = $mouseenter; 243 | $this->config['trigger']['focus'] = $focus; 244 | $this->config['trigger']['click'] = $click; 245 | } 246 | 247 | return $this; 248 | } 249 | 250 | /** 251 | * Modify the tooltip triggers. 252 | * 253 | * @param bool $mouseenter 254 | * @param bool $focus 255 | * @param bool $click 256 | * @return Popper 257 | */ 258 | public function interactive() 259 | { 260 | $this->config['interactive'] = true; 261 | return $this; 262 | } 263 | 264 | /* 265 | * Return true if any Popper used a theme 266 | */ 267 | public function hasThemes() 268 | { 269 | return count($this->themes) > 0; 270 | } 271 | 272 | /* 273 | * Return css injection for the used themes 274 | */ 275 | public function injectThemes() 276 | { 277 | if ($this->hasThemes()) { 278 | $scripts = ''; 286 | return new HtmlString($scripts); 287 | } 288 | } 289 | 290 | private function generateOptions() 291 | { 292 | $options = ''; 293 | 294 | //ARROW 295 | if ($this->config['arrow']['active']) { 296 | $options .= ' data-tippy-arrow="true"'; 297 | $options .= $this->isDefault('arrow', 'type') ? '' : ' data-tippy-arrowType="'.$this->config['arrow']['type'].'"'; 298 | } 299 | 300 | //DISTANCE 301 | $options .= $this->isDefault('distance') ? '' : ' data-tippy-distance="'.$this->config['distance'].'"'; 302 | 303 | //SIZE 304 | $options .= $this->isDefault('size') ? '' : ' data-tippy-size="'.$this->config['size'].'"'; 305 | 306 | //THEME 307 | if (! $this->isDefault('theme')) { 308 | $options .= ' data-tippy-theme="'.$this->config['theme'].'"'; 309 | if (! in_array($this->config['theme'], $this->themes)) { 310 | $this->themes[] = $this->config['theme']; 311 | } 312 | } 313 | 314 | //PLACEMENT 315 | if ($this->isDefault('placement', 'position')) { 316 | $options .= $this->isDefault('placement', 'alignment') ? '' : ' data-tippy-placement="'.$this->config['placement']['position'].'-'.$this->config['placement']['alignment'].'"'; 317 | } else { 318 | $options .= $this->isDefault('placement', 'alignment') ? ' data-tippy-placement="'.$this->config['placement']['position'].'"' : ' data-tippy-placement="'.$this->config['placement']['position'].'-'.$this->config['placement']['alignment'].'"'; 319 | } 320 | 321 | //TRIGGER 322 | if (! $this->isDefault('trigger')) { 323 | $options .= ' data-tippy-trigger="'; 324 | $options .= $this->config['trigger']['mouseenter'] ? 'mouseenter' : ''; 325 | $options .= $this->config['trigger']['focus'] ? ' focus' : ''; 326 | $options .= $this->config['trigger']['click'] ? ' click' : ''; 327 | $options .= '"'; 328 | } 329 | 330 | //DELAY 331 | if (! $this->isDefault('delay')) { 332 | $options .= ' data-tippy-delay="'; 333 | if ($this->config['delay']['show'] == $this->config['delay']['hide']) { 334 | $options .= $this->config['delay']['show'].'"'; 335 | } else { 336 | $options .= '['.$this->config['delay']['show'].','.$this->config['delay']['hide'].']"'; 337 | } 338 | } 339 | 340 | //ANIMATION MODE 341 | if (! $this->isDefault('animation', 'mode')) { 342 | $options .= ' data-tippy-animation="'.$this->config['animation']['mode'].'"'; 343 | } 344 | if (! $this->isDefault('animation', 'show_duration') or ! $this->isDefault('animation', 'hide_duration')) { 345 | $options .= ' data-tippy-duration="['.$this->config['animation']['show_duration'].','.$this->config['animation']['hide_duration'].']"'; 346 | } 347 | 348 | //INTERACTIVITY 349 | if (! $this->isDefault('interactive')) { 350 | $options .= ' data-tippy-interactive="true"'; 351 | } 352 | 353 | return $options; 354 | } 355 | 356 | public function pop(string $text) 357 | { 358 | $this->text = $text; 359 | if (trim($this->text) != '') { 360 | $tooltip = ' data-tippy="'.$this->text.'"'; 361 | 362 | $tooltip .= $this->generateOptions(); 363 | 364 | $this->setDefaultConfig(); 365 | 366 | return new HtmlString($tooltip); 367 | } 368 | 369 | return ''; 370 | } 371 | 372 | public function danger(string $text) 373 | { 374 | return $this->theme('danger')->pop($text); 375 | } 376 | 377 | public function warning(string $text) 378 | { 379 | return $this->theme('warning')->pop($text); 380 | } 381 | 382 | public function info(string $text) 383 | { 384 | return $this->theme('info')->pop($text); 385 | } 386 | 387 | public function success(string $text) 388 | { 389 | return $this->theme('success')->pop($text); 390 | } 391 | } 392 | -------------------------------------------------------------------------------- /src/PopperServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind('popper', function () { 18 | return new Popper(); 19 | }); 20 | } 21 | 22 | /** 23 | * Bootstrap services. 24 | * 25 | * @return void 26 | */ 27 | public function boot() 28 | { 29 | $this->publishes([ 30 | __DIR__.'/../config/popper.php' => config_path('popper.php'), 31 | ], 'config'); 32 | 33 | $this->publishes([ 34 | __DIR__.'/../resources/js' => public_path('vendor/laravel-popper'), 35 | ], 'assets'); 36 | 37 | $this->loadViewsFrom(__DIR__.'/../resources/views', 'popper'); 38 | 39 | Blade::directive('popper', function ($text) { 40 | return \andcarpi\Popper\Facades\Popper::pop($text); 41 | }); 42 | } 43 | } 44 | --------------------------------------------------------------------------------