Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
187 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Popover } from 'bootstrap'; | ||
|
||
|
||
/* | ||
Core popovers | ||
*/ | ||
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')); | ||
popoverTriggerList.map(function (popoverTriggerEl) { | ||
let options = { | ||
delay: {show: 50, hide: 50}, | ||
html: popoverTriggerEl.getAttribute('data-bs-html') === "true" ?? false, | ||
placement: popoverTriggerEl.getAttribute('data-bs-placement') ?? 'auto' | ||
}; | ||
return new Popover(popoverTriggerEl, options); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Switch icons | ||
*/ | ||
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]')); | ||
switchesTriggerList.map(function (switchTriggerEl) { | ||
switchTriggerEl.addEventListener('click', (e) => { | ||
e.stopPropagation(); | ||
|
||
switchTriggerEl.classList.toggle('active'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,10 @@ | ||
//Vendor | ||
|
||
import 'bootstrap/dist/js/bootstrap.bundle'; | ||
|
||
import './autosize'; | ||
import './input-mask'; | ||
import './dropdown'; | ||
import './tooltip'; | ||
import './popover'; | ||
import './switch-icon'; | ||
import './toast'; | ||
|
||
(function() { | ||
/** | ||
*/ | ||
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | ||
tooltipTriggerList.map(function (tooltipTriggerEl) { | ||
let options = { | ||
delay: {show: 50, hide: 50}, | ||
html: tooltipTriggerEl.getAttribute("data-bs-html") === "true" ?? false, | ||
placement: tooltipTriggerEl.getAttribute('data-bs-placement') ?? 'auto' | ||
}; | ||
return new bootstrap.Tooltip(tooltipTriggerEl, options); | ||
}); | ||
|
||
/** | ||
*/ | ||
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')); | ||
popoverTriggerList.map(function (popoverTriggerEl) { | ||
let options = { | ||
delay: {show: 50, hide: 50}, | ||
html: popoverTriggerEl.getAttribute('data-bs-html') === "true" ?? false, | ||
placement: popoverTriggerEl.getAttribute('data-bs-placement') ?? 'auto' | ||
}; | ||
return new bootstrap.Popover(popoverTriggerEl, options); | ||
}); | ||
|
||
let dropdownTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="dropdown"]')); | ||
dropdownTriggerList.map(function (dropdownTriggerEl) { | ||
return new bootstrap.Dropdown(dropdownTriggerEl); | ||
}); | ||
|
||
|
||
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]')); | ||
switchesTriggerList.map(function (switchTriggerEl) { | ||
switchTriggerEl.addEventListener('click', (e) => { | ||
e.stopPropagation(); | ||
|
||
switchTriggerEl.classList.toggle('active'); | ||
}); | ||
}); | ||
|
||
let toastsTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]')); | ||
toastsTriggerList.map(function (toastTriggerEl) { | ||
return new bootstrap.Toast(toastTriggerEl); | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Toast } from 'bootstrap'; | ||
|
||
/* | ||
Toasts | ||
*/ | ||
let toastsTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="toast"]')); | ||
toastsTriggerList.map(function (toastTriggerEl) { | ||
return new Toast(toastTriggerEl); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Tooltip } from 'bootstrap'; | ||
|
||
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | ||
tooltipTriggerList.map(function (tooltipTriggerEl) { | ||
let options = { | ||
delay: {show: 50, hide: 50}, | ||
html: tooltipTriggerEl.getAttribute("data-bs-html") === "true" ?? false, | ||
placement: tooltipTriggerEl.getAttribute('data-bs-placement') ?? 'auto' | ||
}; | ||
return new Tooltip(tooltipTriggerEl, options); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{% assign value = include.value | default: '2020-06-20' %} | ||
{% assign placeholder = include.placeholder | default: 'Select a date' %} | ||
{% assign id = include.id %} | ||
|
||
{% if id %} | ||
|
||
{% capture input %} | ||
<input class="form-control{% if include.class %} {{ include.class }}{% endif %}"{% if placeholder %} placeholder="{{ placeholder }}"{% endif %} id="datepicker-{{ id }}" value="{{ value }}"/> | ||
{% endcapture %} | ||
|
||
|
||
{% if include.inline %} | ||
<div class="datepicker-inline" id="datepicker-{{ id }}"></div> | ||
{% elsif include.layout == 'icon' %} | ||
<div class="input-icon{% if include.class %} {{ include.class }}{% endif %}"> | ||
{{ input | replace: include.class, '' }} | ||
<span class="input-icon-addon">{% include ui/icon.html icon="calendar" %}</span> | ||
</div> | ||
{% elsif include.layout == 'icon-prepend' %} | ||
<div class="input-icon{% if include.class %} {{ include.class }}{% endif %}"> | ||
<span class="input-icon-addon">{% include ui/icon.html icon="calendar" %}</span> | ||
{{ input | replace: include.class, '' }} | ||
</div> | ||
{% else %} | ||
{{ input }} | ||
{% endif %} | ||
|
||
{% capture script %} | ||
<script> | ||
// @formatter:off | ||
document.addEventListener("DOMContentLoaded", function () { | ||
{% if jekyll.environment == 'development' %} | ||
window.tabler_datepicker = window.tabler_datepicker || {}; | ||
{% endif %} | ||
|
||
window.Litepicker && ({% if jekyll.environment == 'development' %}window.tabler_datepicker["datepicker-{{ id }}"] = {% endif %}new Litepicker({ | ||
element: document.getElementById('datepicker-{{ id }}'), | ||
buttonText: { | ||
previousMonth: '{% capture icon %}{% include ui/icon.html icon="chevron-left" %}{% endcapture %}{{ icon | strip }}', | ||
nextMonth: '{% capture icon %}{% include ui/icon.html icon="chevron-right" %}{% endcapture %}{{ icon | strip }}', | ||
}, | ||
{% if include.inline %}inlineMode: true,{% endif %} | ||
})); | ||
|
||
}); | ||
// @formatter:on | ||
</script> | ||
{% endcapture %} | ||
|
||
{% if include.show-scripts %} | ||
{{ script }} | ||
{% else %} | ||
{% capture_global scripts %} | ||
{{ script }} | ||
{% endcapture_global %} | ||
{% endif %} | ||
|
||
{% endif %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.