[
  {
    "path": ".editorconfig",
    "content": "; This file is for unifying the coding style for different editors and IDEs.\n; More information at http://editorconfig.org\n\nroot = true\n\n[*]\ncharset = utf-8\nindent_size = 4\nindent_style = space\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Path-based git attributes\n# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html\n\n# Ignore all test and documentation with \"export-ignore\".\n/.gitattributes     export-ignore\n/.gitignore         export-ignore\n/.travis.yml        export-ignore\n/phpunit.xml.dist   export-ignore\n/tests              export-ignore\n"
  },
  {
    "path": ".gitignore",
    "content": "# Crap\n*.log\n.sass-cache\n.Spotlight-V100\n.Trashes\n.DS_Store\n.DS_Store?\nehthumbs.db\nThumbs.db\n\n# IDE\n*.sublime-*\n*.idea\n.idea\n\n# Project\nbuild\ncomposer.lock\ndocs\nvendor\n"
  },
  {
    "path": ".styleci.yml",
    "content": "preset: laravel\n\ndisabled:\n  - single_class_element_per_statement\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: php\n\nphp:\n  - 7.2\n  - 7.3\n\nenv:\n  - LARAVEL_VERSION=5.7.*\n  - LARAVEL_VERSION=5.8.*\n  - LARAVEL_VERSION=^6.0\n  - LARAVEL_VERSION=^7.0\n\nbefore_script:\n  - travis_retry composer self-update\n  - composer require laravel/framework:${LARAVEL_VERSION}\n  - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source\n\nscript:\n  - php vendor/bin/phpunit --coverage-text\n"
  },
  {
    "path": "LICENSE.md",
    "content": "# The MIT License (MIT)\n\nCopyright (c) Appstract\n\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be included in\n> all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n> THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Laravel Bootstrap Components\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/appstract/laravel-bootstrap-components.svg?style=flat-square)](https://packagist.org/packages/appstract/laravel-bootstrap-components)\n[![Total Downloads](https://img.shields.io/packagist/dt/appstract/laravel-bootstrap-components.svg?style=flat-square)](https://packagist.org/packages/appstract/laravel-bootstrap-components)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n\nEasily use Bootstrap 4 components as Laravel components. \n\nYou can help with adding components by creating a pull request.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require appstract/laravel-bootstrap-components\n```\n\n## Usage\n\nExamples:\n```blade\n@component('bootstrap::modal')\n    This is the content of the modal\n@endcomponent\n\n@component('bootstrap::progress', ['value' => 75]) \n    // Extra bars\n@endcomponent\n```\n\nMore components and documentation [in the wiki](https://github.com/appstract/laravel-bootstrap-components/wiki).\n\n## Contributing\n\nContributions are very welcome! If you want to add a component, please keep the following in mind when creating a pull request:\n\n- Have a look at the existing components for examples.\n- Customization of the component (like custom classes and options for the component).\n- Provide some docs in the [wiki](https://github.com/appstract/laravel-bootstrap-components/wiki).\n\n[Thanks to all the contributors](https://github.com/appstract/laravel-bootstrap-components/graphs/contributors)\n\n## About Appstract\n\nAppstract is a small team from The Netherlands. We create (open source) tools for webdevelopment and write about related subjects on [Medium](https://medium.com/appstract). You can [follow us on Twitter](https://twitter.com/teamappstract), [buy us a beer](https://www.paypal.me/teamappstract/10) or [support us on Patreon](https://www.patreon.com/appstract).\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n"
  },
  {
    "path": "composer.json",
    "content": "{\n    \"name\": \"appstract/laravel-bootstrap-components\",\n    \"description\": \"Bootstrap components for Laravel\",\n    \"keywords\": [\n        \"appstract\",\n        \"laravel-bootstrap-components\"\n    ],\n    \"homepage\": \"https://github.com/appstract/laravel-bootstrap-components\",\n    \"license\": \"MIT\",\n    \"authors\": [\n        {\n            \"name\": \"Gijs Jorissen\",\n            \"email\": \"mail@appstract.nl\",\n            \"homepage\": \"https://appstract.nl\",\n            \"role\": \"Developer\"\n        },\n        {\n            \"name\": \"Olav van Schie\",\n            \"email\": \"mail@appstract.nl\",\n            \"homepage\": \"https://appstract.nl\",\n            \"role\": \"Developer\"\n        },\n        {\n            \"name\": \"Bob Krijnen\",\n            \"email\": \"mail@appstract.nl\",\n            \"homepage\": \"https://appstract.nl\",\n            \"role\": \"Developer\"\n        },\n        {\n            \"name\": \"Teun de Kleijne\",\n            \"email\": \"mail@appstract.nl\",\n            \"homepage\": \"https://appstract.nl\",\n            \"role\": \"Developer\"\n        }\n    ],\n    \"require\": {\n        \"php\": \"^7.1.3\",\n        \"laravel/framework\": \">=5.7\",\n        \"appstract/laravel-blade-directives\": \"^1.8\"\n    },\n    \"require-dev\": {\n        \"phpunit/phpunit\": \"^5.7\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"Appstract\\\\BootstrapComponents\\\\\": \"src\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Appstract\\\\BootstrapComponents\\\\Test\\\\\": \"tests\"\n        }\n    },\n    \"scripts\": {\n        \"test\": \"vendor/bin/phpunit\"\n    },\n    \"config\": {\n        \"sort-packages\": true\n    },\n    \"extra\": {\n        \"laravel\": {\n            \"providers\": [\n                \"Appstract\\\\BootstrapComponents\\\\BootstrapComponentsServiceProvider\"\n            ]\n        }\n    }\n}\n"
  },
  {
    "path": "phpunit.xml.dist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit bootstrap=\"vendor/autoload.php\"\n         backupGlobals=\"false\"\n         backupStaticAttributes=\"false\"\n         colors=\"true\"\n         verbose=\"true\"\n         convertErrorsToExceptions=\"true\"\n         convertNoticesToExceptions=\"true\"\n         convertWarningsToExceptions=\"true\"\n         processIsolation=\"false\"\n         stopOnFailure=\"false\">\n    <testsuites>\n        <testsuite name=\"Appstract Test Suite\">\n            <directory>tests</directory>\n        </testsuite>\n    </testsuites>\n    <filter>\n        <whitelist>\n            <directory suffix=\".php\">src/</directory>\n        </whitelist>\n    </filter>\n    <logging>\n        <log type=\"tap\" target=\"build/report.tap\"/>\n        <log type=\"junit\" target=\"build/report.junit.xml\"/>\n        <log type=\"coverage-html\" target=\"build/coverage\" charset=\"UTF-8\" yui=\"true\" highlight=\"true\"/>\n        <log type=\"coverage-text\" target=\"build/coverage.txt\"/>\n        <log type=\"coverage-clover\" target=\"build/logs/clover.xml\"/>\n    </logging>\n</phpunit>\n"
  },
  {
    "path": "resources/views/alert.blade.php",
    "content": "<div\n    class=\"\n        alert alert-{{ $type }}\n        {{ $class ?? '' }}\n        @istrue($dismissible, 'alert-dismissible')\n        @istrue($animate, 'fade show')\n    \"\n    role=\"alert\"\n>\n    @istrue($dismissible)\n        <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n            <span aria-hidden=\"true\">&times;</span>\n        </button>\n    @endistrue\n\n    {{ $slot }}\n</div>\n"
  },
  {
    "path": "resources/views/badge.blade.php",
    "content": "<span\n    class=\"\n        badge\n        badge-{{ $type }}\n        {{ $class ?? '' }}\n        @istrue($pill, 'badge-pill')\n    \"\n>\n    {{ $slot }}\n</span>\n"
  },
  {
    "path": "resources/views/breadcrumb.blade.php",
    "content": "<nav class=\"breadcrumb {{ $class ?? '' }}\">\n    {{ $slot }}\n</nav>\n"
  },
  {
    "path": "resources/views/button-group.blade.php",
    "content": "<div\n    class=\"btn-group {{ $class ?? '' }}\"\n    role=\"group\"\n>\n    {{ $slot }}\n</div>\n"
  },
  {
    "path": "resources/views/card.blade.php",
    "content": "<div\n    class=\"card {{ $class ?? '' }}\"\n>\n    @isset($header)\n        <div class=\"card-header\">\n            {!! $header !!}\n        </div>\n    @endisset\n\n    {{ $slot }}\n\n    @isset($footer)\n        <div class=\"card-footer\">\n            {!! $footer !!}\n        </div>\n    @endisset\n</div>\n"
  },
  {
    "path": "resources/views/carousel.blade.php",
    "content": "<div\n    id=\"{{ $id ?? 'carousel' }}\"\n    class=\"carousel slide {{ $class ?? '' }}\"\n    data-ride=\"carousel\"\n>\n    @istrue($indicators)\n        <ol class=\"carousel-indicators\">\n            @isset($items)\n                @foreach($items as $item)\n                    <li data-target=\"#{{ $id ?? 'carousel' }}\" data-slide-to=\"{{ $loop->index }}\"></li>\n                @endforeach\n            @else\n                {!! $indicators !!}\n            @endisset\n        </ol>\n    @endistrue\n\n    <div class=\"carousel-inner\" role=\"listbox\">\n        @isset($items)\n            @foreach($items as $item)\n                <div class=\"carousel-item @istrue($loop->first, 'active')\">{{ $item }}</div>\n            @endforeach\n        @endisset\n\n        {{ $slot }}\n    </div>\n\n    @istrue($controls)\n        <a class=\"carousel-control-prev\" href=\"#{{ $id ?? 'carousel' }}\" role=\"button\" data-slide=\"prev\">\n            <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n            <span class=\"sr-only\">Previous</span>\n        </a>\n\n        <a class=\"carousel-control-next\" href=\"#{{ $id ?? 'carousel' }}\" role=\"button\" data-slide=\"next\">\n            <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n            <span class=\"sr-only\">Next</span>\n        </a>\n    @endistrue\n</div>\n"
  },
  {
    "path": "resources/views/figure.blade.php",
    "content": "<figure class=\"figure {{ $class ?? '' }}\">\n    {{ $slot }}\n\n    @isset($caption)\n        <figcaption class=\"figure-caption\">{!! $caption !!}</figcaption>\n    @endisset\n</figure>\n"
  },
  {
    "path": "resources/views/input-group.blade.php",
    "content": "<div class=\"input-group {{ $class ?? '' }}\">\n\t{{ $slot }}\n</div>\n"
  },
  {
    "path": "resources/views/jumbotron.blade.php",
    "content": "<div\n    class=\"\n        jumbotron\n        {{ $class ?? '' }}\n        @istrue($fullwidth, 'jumbotron-fluid')\n    \"\n>\n    @istrue($fullwidth, '<div class=\"container\">')\n\n    @isset($heading)\n        <h1 class=\"display-3\">{!! $heading !!}</h1>\n    @endisset\n\n    {{ $slot }}\n\n    @istrue($fullwidth, '</div>')\n</div>\n"
  },
  {
    "path": "resources/views/list-group.blade.php",
    "content": "<ul class=\"list-group {{ $class ?? '' }}\">\n    @isset($items)\n        @foreach($items as $item)\n            <li class=\"list-group-item\">{{ $item }}</li>\n        @endforeach\n    @endisset\n\n    {{ $slot }}\n</ul>\n"
  },
  {
    "path": "resources/views/modal.blade.php",
    "content": "<div\n    class=\"modal {{ $animation ?? 'fade' }} {{ $class ?? '' }}\"\n    id=\"{{ $id ?? 'modal' }}\"\n>\n    <div class=\"modal-dialog\" role=\"document\">\n        <div class=\"modal-content\">\n            @isset($title)\n                <div class=\"modal-header\">\n                    <h5 class=\"modal-title\">{{ $title }}</h5>\n\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                        <span aria-hidden=\"true\">&times;</span>\n                    </button>\n                </div>\n            @endisset\n\n            <div class=\"modal-body\">\n                {{ $slot }}\n            </div>\n\n            @isset($footer)\n                <div class=\"modal-footer\">\n                    {{ $footer }}\n                </div>\n            @endisset\n        </div>\n    </div>\n</div>\n"
  },
  {
    "path": "resources/views/pagination.blade.php",
    "content": "<nav aria-label=\"Page navigation\">\n    <ul class=\"pagination {{ $class ?? '' }}\">\n        {{ $slot }}\n    </ul>\n</nav>\n"
  },
  {
    "path": "resources/views/progress.blade.php",
    "content": "<div class=\"progress\">\n    <div\n        class=\"progress-bar {{ $class ?? '' }}\"\n        role=\"progressbar\"\n        style=\"width: {{ $value }}%\"\n        aria-valuenow=\"{{ $value }}\"\n        aria-valuemin=\"{{ $min ?? 0 }}\"\n        aria-valuemax=\"{{ $max ?? 100 }}\"\n    ></div>\n\n    {{ $slot }}\n</div>\n"
  },
  {
    "path": "resources/views/render/pagination.blade.php",
    "content": "<nav aria-label=\"Page navigation\">\n    @php\n        $paginator = $paginator->toArray();\n    @endphp\n\n    <ul class=\"pagination {{ $class ?? '' }}\">\n        @istrue($arrows)\n            <li class=\"page-item\">\n                <a class=\"page-link\" href=\"{{ $paginator['prev_page_url'] }}\" aria-label=\"Previous\">\n                    <span aria-hidden=\"true\">&laquo;</span>\n                    <span class=\"sr-only\">Previous</span>\n                </a>\n            </li>\n        @endistrue\n\n        @foreach($elements[0] as $page => $link)\n            <li class=\"page-item @if($paginator['current_page'] == $page) active @endif\">\n                <a class=\"page-link\" href=\"{{ $link }}\">{!! $page !!}</a>\n            </li>\n        @endforeach\n\n        @istrue($arrows)\n            <li class=\"page-item\">\n                <a class=\"page-link\" href=\"{{ $paginator['next_page_url'] }}\" aria-label=\"Next\">\n                    <span aria-hidden=\"true\">&raquo;</span>\n                    <span class=\"sr-only\">Next</span>\n                </a>\n            </li>\n        @endistrue\n    </ul>\n</nav>\n"
  },
  {
    "path": "resources/views/table.blade.php",
    "content": "<table class=\"table table-responsive {{ $class ?? '' }}\">\n    {{ $slot }}\n</table>\n"
  },
  {
    "path": "src/BootstrapComponentsClass.php",
    "content": "<?php\n\nnamespace Appstract\\BootstrapComponents;\n\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Support\\Collection;\n\nclass BootstrapComponentsClass\n{\n    /*\n     * Render pagination buttons\n     *\n     * @param       $items\n     * @param int   $page\n     * @param int   $perPage\n     * @param       $path\n     * @param array $componentOptions\n     */\n    public function pagination($items, $page = 1, $perPage = 25, $path = '', array $componentOptions = [])\n    {\n        $items = $items instanceof Collection ? $items : Collection::make($items);\n\n        $paginator = (new LengthAwarePaginator($items, $items->count(), (int) $perPage, (int) $page))\n            ->withPath($path);\n\n        return $paginator->render('bootstrap::render.pagination', $componentOptions);\n    }\n}\n"
  },
  {
    "path": "src/BootstrapComponentsFacade.php",
    "content": "<?php\n\nnamespace Appstract\\BootstrapComponents;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass BootstrapComponentsFacade extends Facade\n{\n    /**\n     * Get the registered name of the component.\n     *\n     * @return string\n     */\n    protected static function getFacadeAccessor()\n    {\n        return BootstrapComponentsClass::class;\n    }\n}\n"
  },
  {
    "path": "src/BootstrapComponentsServiceProvider.php",
    "content": "<?php\n\nnamespace Appstract\\BootstrapComponents;\n\nuse Appstract\\BladeDirectives\\BladeDirectivesServiceProvider;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass BootstrapComponentsServiceProvider extends ServiceProvider\n{\n    /**\n     * Bootstrap the application services.\n     */\n    public function boot()\n    {\n        $this->loadViewsFrom(__DIR__.'/../resources/views', 'bootstrap');\n\n        if ($this->app->runningInConsole()) {\n            $this->publishes([\n                __DIR__.'/../resources/views' => resource_path('views/vendor/bootstrap'),\n            ], 'views');\n        }\n    }\n\n    /**\n     * Register the application services.\n     */\n    public function register()\n    {\n        $this->app->register(BladeDirectivesServiceProvider::class);\n    }\n}\n"
  },
  {
    "path": "tests/ExampleTest.php",
    "content": "<?php\n\nnamespace Appstract\\BootstrapComponents\\Test;\n\nclass ExampleTest extends \\PHPUnit_Framework_TestCase\n{\n    /** @test */\n    public function true_is_true()\n    {\n        $this->assertTrue(true);\n    }\n}\n"
  }
]