Skip to content

Commit f62d296

Browse files
committed
Merge branch 'master' of https://github.com/dgvai/laravel-adminlte-components into release
2 parents 64d97cb + 36f79b2 commit f62d296

26 files changed

+3218
-4
lines changed

README.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This package contains [Laravel Blade Components](https://laravel.com/docs/7.x/bl
1717
- [AdminLTE Blade Components for Laravel 7+](#adminlte-blade-components-for-laravel-7)
1818
- [Contents](#contents)
1919
- [Installation](#installation)
20+
- [Extract Plugins](#extract-plugins)
2021
- [Configurations](#configurations)
2122
- [Components](#components)
2223
- [Widgets](#widgets)
@@ -38,6 +39,7 @@ This package contains [Laravel Blade Components](https://laravel.com/docs/7.x/bl
3839
- [DATE-RANGE](#date-range)
3940
- [INPUT-SWITCH](#input-switch)
4041
- [INPUT-TAG](#input-tag)
42+
- [INPUT-SLIDER](#input-slider)
4143
- [SELECT](#select)
4244
- [SELECT2](#select2)
4345
- [SELECT-ICON](#select-icon)
@@ -58,11 +60,122 @@ You can install the package via composer:
5860
composer require dgvai/laravel-adminlte-components
5961
```
6062

63+
## Extract Plugins
64+
``` bash
65+
php artisan vendor:publish --tag=adminlte-dg-plugins
66+
```
67+
6168
## Configurations
6269
You can use this package, stand alone with AdminLTE installed in your app. You just need to add an ``@yield('js')`` at the bottom of your <kbd>master</kbd> blade layout.
6370

6471
Or, if you use [jeroennoten/Laravel-AdminLTE](https://github.com/jeroennoten/Laravel-AdminLTE) package, then you do not need to add anything at ``master``. I will prefer to use this package.
6572

73+
Use this in the [jeroennoten/Laravel-AdminLTE](https://github.com/jeroennoten/Laravel-AdminLTE) config:
74+
```php
75+
[
76+
'name' => 'AdminLTE-Components-DG',
77+
'active' => true,
78+
'files' => [
79+
[
80+
'type' => 'css',
81+
'asset' => true,
82+
'location' => '/vendor/dg-plugins/select2/css/select2.min.css',
83+
],
84+
[
85+
'type' => 'css',
86+
'asset' => true,
87+
'location' => '/vendor/dg-plugins/select2/css/select2-bootstrap4.min.css',
88+
],
89+
[
90+
'type' => 'js',
91+
'asset' => true,
92+
'location' => '/vendor/dg-plugins/select2/js/select2.min.js',
93+
],
94+
[
95+
'type' => 'js',
96+
'asset' => true,
97+
'location' => '/vendor/dg-plugins/bs-custom-file-input/bs-custom-file-input.min.js',
98+
],
99+
[
100+
'type' => 'js',
101+
'asset' => true,
102+
'location' => '/vendor/dg-plugins/moment/moment.min.js',
103+
],
104+
[
105+
'type' => 'css',
106+
'asset' => true,
107+
'location' => '/vendor/dg-plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css',
108+
],
109+
[
110+
'type' => 'js',
111+
'asset' => true,
112+
'location' => '/vendor/dg-plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js',
113+
],
114+
[
115+
'type' => 'css',
116+
'asset' => true,
117+
'location' => '/vendor/dg-plugins/summernote/summernote-bs4.css',
118+
],
119+
[
120+
'type' => 'js',
121+
'asset' => true,
122+
'location' => '/vendor/dg-plugins/summernote/summernote-bs4.min.js',
123+
],
124+
[
125+
'type' => 'css',
126+
'asset' => true,
127+
'location' => '/vendor/dg-plugins/bs-select/css/bootstrap-select.min.css',
128+
],
129+
[
130+
'type' => 'js',
131+
'asset' => true,
132+
'location' => '/vendor/dg-plugins/bs-select/js/bootstrap-select.min.js',
133+
],
134+
[
135+
'type' => 'css',
136+
'asset' => true,
137+
'location' => '/vendor/dg-plugins/bootstrap-tags-input/bootstrap-tagsinput.css',
138+
],
139+
[
140+
'type' => 'js',
141+
'asset' => true,
142+
'location' => '/vendor/dg-plugins/bootstrap-tags-input/bootstrap-tagsinput.js',
143+
],
144+
[
145+
'type' => 'js',
146+
'asset' => true,
147+
'location' => '/vendor/dg-plugins/daterangepicker/daterangepicker.js',
148+
],
149+
[
150+
'type' => 'css',
151+
'asset' => true,
152+
'location' => '/vendor/dg-plugins/daterangepicker/daterangepicker.css',
153+
],
154+
[
155+
'type' => 'css',
156+
'asset' => true,
157+
'location' => '/vendor/dg-plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css',
158+
],
159+
[
160+
'type' => 'js',
161+
'asset' => true,
162+
'location' => '/vendor/dg-plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js',
163+
],
164+
[
165+
'type' => 'css',
166+
'asset' => true,
167+
'location' => '/vendor/dg-plugins/bootstrap-slider/css/bootstrap-slider.min.css',
168+
],
169+
[
170+
'type' => 'js',
171+
'asset' => true,
172+
'location' => '/vendor/dg-plugins/bootstrap-slider/js/bootstrap-slider.min.js',
173+
],
174+
],
175+
],
176+
177+
```
178+
66179
## Components
67180

68181
### Widgets
@@ -392,6 +505,7 @@ $(()=>{
392505
| title | Input Title | Filter Range | string |
393506
| icon | Icon | far fa-calendar-alt | string |
394507
| topclass | class along with 'fomr-group' | null | string |
508+
| inputclass | class along with 'filter button' | null | string |
395509
| init | The initial position of range, (0-5) * | 2 | integer |
396510
| callback | The JS callback function to run on change filter | null | string (js) |
397511

@@ -448,6 +562,34 @@ $(()=>{
448562
| required | is required? | false | boolean |
449563
| max | max tag count | 10 | integer |
450564

565+
#### INPUT-SLIDER
566+
**REQUIRES**
567+
[bootstrap-slider](https://github.com/seiyria/bootstrap-slider)
568+
569+
**USAGE**
570+
```html
571+
<x-dg-input-slider id="myID"/>
572+
```
573+
574+
**ALL AVAILABLE ATTRIBUTES**
575+
| ATTRIBUTE | DETAILS | DEFAULT | TYPE |
576+
|-------------|---------------------------------|-------------|---------|
577+
| id | Input ID | none | string |
578+
| name | Input name | null | string |
579+
| label | Input Label | Input Label | string |
580+
| topclass | class along with 'fomr-group' | null | string |
581+
| inputclass | class along with 'form-control' | null | string |
582+
| disabled | is disabled? | false | boolean |
583+
| required | is required? | false | boolean |
584+
| min | minimum | 0 | signed int |
585+
| max | maximum | 100 | signed int |
586+
| value | value | null | string |
587+
| color | blue, green, red, teal, yellow, purple | blue | string |
588+
| tick | Enable Tick? | false | boolean |
589+
| ticks | Ticks : [0, 10, 20, ...] | null | string |
590+
| tickLabels | Tick Labels : ["low", "medium", "high" ...] | null | string |
591+
| vertical | Is vertical? | false | boolean |
592+
451593

452594
#### SELECT
453595

src/BladeAdminLTEServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ private function publishers()
2222
$this->publishes([
2323
__DIR__.'/resources/components' => base_path('resources/views/vendor/adminlte-components'),
2424
], 'adminlte-dg-components');
25+
26+
$this->publishes([
27+
__DIR__.'/assets' => public_path('vendor/dg-plugins'),
28+
], 'adminlte-dg-plugins');
2529
}
2630

2731
private function loadComponents()
@@ -44,6 +48,7 @@ private function loadComponents()
4448
Blade::component('dg-submit', Components\Submit::class);
4549
Blade::component('dg-text-editor', Components\TextEditor::class);
4650
Blade::component('dg-date-range', Components\DateRange::class);
51+
Blade::component('dg-input-slider', Components\InputSlider::class);
4752

4853
/**
4954
* WIDGETS

src/Components/DateRange.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@
66

77
class DateRange extends Component
88
{
9-
public $topclass, $title, $icon, $id;
9+
public $topclass, $inputclass, $title, $icon, $id;
1010
public $init;
1111
public $callback;
1212

1313
public function __construct(
1414
$id, $topclass = null, $title = 'Filter Range', $icon = 'far fa-calendar-alt',
15-
$init = 2, $callback = null
15+
$init = 2, $callback = null, $inputclass = null
1616
)
1717
{
1818
$this->id = $id;
1919
$this->topclass = $topclass;
20+
$this->inputclass = $inputclass;
2021
$this->title = $title;
2122
$this->icon = $icon;
2223
$this->init = $init;

src/Components/InputSlider.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
namespace DGvai\BladeAdminLTE\Components;
4+
5+
use Illuminate\View\Component;
6+
7+
class InputSlider extends Component
8+
{
9+
public $id, $name, $label;
10+
public $topclass, $inputclass;
11+
public $value, $disabled, $required;
12+
public $min, $max, $step, $vertical;
13+
public $tick, $ticks, $tickLabels;
14+
public $color;
15+
16+
public function __construct(
17+
$id, $name = null,
18+
$label = 'Input Label',
19+
$topclass = null, $inputclass = null,
20+
$value = null,$disabled = false, $required = false,
21+
$min = 0, $max = 100, $step = 1, $vertical = false,
22+
$tick = false, $ticks = null, $tickLabels = null,
23+
$color = 'blue'
24+
)
25+
{
26+
$this->id = $id;
27+
$this->name = $name;
28+
$this->label = $label;
29+
$this->topclass = $topclass;
30+
$this->inputclass = $inputclass;
31+
$this->required = $required;
32+
$this->disabled = $disabled;
33+
$this->value = $value;
34+
$this->min = $min;
35+
$this->max = $max;
36+
$this->step = $step;
37+
$this->vertical = $vertical;
38+
$this->tick = $tick;
39+
$this->ticks = $ticks;
40+
$this->tickLabels = $tickLabels;
41+
$this->color = $color;
42+
}
43+
44+
public function render()
45+
{
46+
return view('xdg::input-slider');
47+
}
48+
}

src/assets/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)