mirror of
https://github.com/tabler/tabler.git
synced 2026-08-25 20:34:25 +04:00
Merge branch 'dev' into dev-badges
This commit is contained in:
@@ -19,6 +19,5 @@
|
||||
{% assign el = 'span' %}
|
||||
{% if link %}{% assign el = 'a' %}{% endif %}
|
||||
<{{ el }} class="avatar{% if include['size'] %} avatar-{{ include['size'] }}{% endif %}{% if include.thumb %} avatar-thumb{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.shape %} {{ include.shape }}{% endif %}{% if include.color %} bg-{{ include.color }}-lt{% endif %}"{% if src %} style="background-image: url({{ site.base }}/{{ src }})"{% endif %}>{% if include.status %}
|
||||
<span class="badge bg-{{ include.status }}">{% if include.status-text %}{{ include.status-text }}{% elsif include.status-icon %}{% include ui/icon.html icon=include.status-icon class="avatar-status-icon" %}{% endif %}</span>
|
||||
{% endif %}{% if placeholder %}{{ placeholder }}{% elsif include.icon %} {% include ui/icon.html icon=include.icon class="avatar-icon" %}{% endif %}</{{ el }}>
|
||||
<span class="badge bg-{{ include.status }}">{% if include.status-text %}{{ include.status-text }}{% elsif include.status-icon %}{% include ui/icon.html icon=include.status-icon class="avatar-status-icon" %}{% endif %}</span>{% endif %}{% if placeholder %}{{ placeholder }}{% elsif include.icon %} {% include ui/icon.html icon=include.icon class="avatar-icon" %}{% endif %}</{{ el }}>
|
||||
{% endremoveemptylines %}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% assign e = include.element | default: 'a' %}
|
||||
<{{ e }}{% if e == 'a' %} href="{{ href }}"{% endif %}{% if include.type %} type="{{ include.type }}"{% endif %} class="btn{% if include.height %} btn-{{ include.height }}{% endif %}{% if color %} btn-{% if include.outline %}outline-{% endif %}{{ color }}{% endif %}{% if include.disabled %} disabled{% endif %}{% if include.square %} btn-square{% endif %}{% if include.pill %} btn-pill{% endif %}{% if include['size'] %} btn-{{ include['size'] }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.block %} btn-block{% endif %}{% if include.link %} btn-link{% endif %}{% if include.icon-only %} btn-icon{% endif %}"{% if include.external %} target="_blank" rel="noreferrer"{% endif %}{% if include.modal %} data-toggle="modal" data-target="#modal-{{ include.modal }}"{% endif %}{% if include.icon-only %} aria-label="{{ include.text | default: "Button" }}"{% endif %}>
|
||||
<{{ e }}{% if e == 'a' %} href="{{ href }}"{% endif %}{% if include.type %} type="{{ include.type }}"{% endif %} class="btn{% if include.height %} btn-{{ include.height }}{% endif %}{% if color %} btn-{% if include.outline %}outline-{% endif %}{{ color }}{% endif %}{% if include.disabled %} disabled{% endif %}{% if include.square %} btn-square{% endif %}{% if include.loading %} btn-loading{% endif %}{% if include.pill %} btn-pill{% endif %}{% if include['size'] %} btn-{{ include['size'] }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.block %} btn-block{% endif %}{% if include.link %} btn-link{% endif %}{% if include.icon-only %} btn-icon{% endif %}"{% if include.external %} target="_blank" rel="noreferrer"{% endif %}{% if include.modal-id %} data-toggle="modal" data-target="#modal-{{ include.modal-id }}"{% endif %}{% if include.icon-only %} aria-label="{{ include.text | default: "Button" }}"{% endif %}>
|
||||
{% if include.spinner %}
|
||||
{% include ui/spinner.html color=false size="sm" class=spinner-class element="span" %}{% endif %}
|
||||
{% if include.icon %}{% include ui/icon.html icon=include.icon use-svg=true color=include.icon-color %}{% endif %}
|
||||
@@ -28,4 +28,4 @@
|
||||
{% if include.icon-right %}{% include ui/icon.html icon=include.icon-right use-svg=true right=true %}{% endif %}
|
||||
{% endunless %}
|
||||
</{{ e }}>
|
||||
{% endremoveemptylines %}
|
||||
{% endremoveemptylines %}
|
||||
@@ -1,25 +1,26 @@
|
||||
<div class="dropdown-menu{% if include.right %} dropdown-menu-right{% endif %}{% if include.show %} position-relative d-inline-block{% endif %}{% if include.arrow %} dropdown-menu-arrow{% endif %}{% if include.dark %} bg-dark text-white{% endif %}{% if include.class %} {{ include.class }}{% endif %}">
|
||||
{% if include.check or include.radio %}
|
||||
{% for i in (1..3) %}
|
||||
<label class="dropdown-item"><input class="form-check-input m-0 mr-2" type="{% if include.radio %}radio{% else %}checkbox{% endif %}"> Option {{ i }}</label>
|
||||
{% endfor %}
|
||||
{% elsif include.type == 'text' %}
|
||||
{% if include.check or include.radio %}
|
||||
{% for i in (1..3) %}
|
||||
<label class="dropdown-item"><input class="form-check-input m-0 mr-2" type="{% if include.radio %}radio{% else %}checkbox{% endif %}"> Option {{ i }}</label>
|
||||
{% endfor %}
|
||||
{% elsif include.type == 'text' %}
|
||||
|
||||
{% else %}
|
||||
{% if include.header %}<span class="dropdown-header">Dropdown header</span>{% endif %}
|
||||
<a class="dropdown-item" href="#">
|
||||
{% if include.icons %}{% include ui/icon.html icon="settings" %} {% endif %}
|
||||
Action
|
||||
{% if include.badge %}<span class="badge bg-primary ml-auto">12</span>{% endif %}
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
{% if include.icons %}{% include ui/icon.html icon="edit" %} {% endif %}Another action
|
||||
</a>
|
||||
{% if include.active %}<a class="dropdown-item active" href="#">{% if include.icons %}{% include ui/icon.html icon="activity" %} {% endif %}Active action</a>{% endif %}
|
||||
{% if include.disabled %}<a class="dropdown-item disabled" href="#">{% if include.icons %}{% include ui/icon.html icon="user-x" %} {% endif %}Disabled action</a>{% endif %}
|
||||
{% if include.separated %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">{% if include.icons %}{% include ui/icon.html icon="plus" class="dropdown-icon" %} {% endif %}Separated link</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if include.header %}<span class="dropdown-header">Dropdown header</span>{% endif %}
|
||||
<a class="dropdown-item" href="#">
|
||||
{% if include.icons %}{% include ui/icon.html icon="settings" class="dropdown-item-icon" %} {% endif %}
|
||||
Action
|
||||
{% if include.badge %}<span class="badge bg-primary ml-auto">12</span>{% endif %}
|
||||
</a>
|
||||
<a class="dropdown-item" href="#">
|
||||
{% if include.icons %}{% include ui/icon.html icon="edit" class="dropdown-item-icon" %} {% endif %}Another action
|
||||
{% if include.badge %}<span class="badge bg-green ml-auto"></span>{% endif %}
|
||||
</a>
|
||||
{% if include.active %}<a class="dropdown-item active" href="#">{% if include.icons %}{% include ui/icon.html icon="activity" class="dropdown-item-icon" %} {% endif %}Active action</a>{% endif %}
|
||||
{% if include.disabled %}<a class="dropdown-item disabled" href="#">{% if include.icons %}{% include ui/icon.html icon="user-x" class="dropdown-item-icon" %} {% endif %}Disabled action</a>{% endif %}
|
||||
{% if include.separated %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">{% if include.icons %}{% include ui/icon.html icon="plus" class="dropdown-icon" class="dropdown-item-icon" %} {% endif %}Separated link</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
<div class="empty-action">
|
||||
{% assign button-text = include.button-text | default: "Search again" %}
|
||||
{% assign button-icon = include.button-icon | default: "search" %}
|
||||
{% include ui/button.html text=button-text color="primary" icon=button-icon href="index.html" %}
|
||||
{% include ui/button.html text=button-text color="primary" icon=button-icon href="." %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="form-file">
|
||||
<input type="file" class="form-file-input" id="customFile">
|
||||
<label class="form-file-label" for="customFile">
|
||||
<span class="form-file-text">Choose file...</span>
|
||||
<span class="form-file-button">Browse</span>
|
||||
</label>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="input-group{% if include.class %} {{ include.class }}{% endif %}">
|
||||
<div class="input-group{% if include.flat %} input-group-flat{% endif %}{% if include.class %} {{ include.class }}{% endif %}">
|
||||
{% if include.prepend %}
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
|
||||
@@ -4,16 +4,17 @@
|
||||
{% capture_once scripts %}
|
||||
<script>
|
||||
(function () {
|
||||
const $elem = $('[data-mask]');
|
||||
|
||||
if ($elem) {
|
||||
$elem.each(function () {
|
||||
IMask($(this).get(0), {
|
||||
mask: $(this).attr('data-mask'),
|
||||
lazy: $(this).attr('data-mask-visible') === 'true',
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Input mask
|
||||
*/
|
||||
var maskElementList = [].slice.call(document.querySelectorAll('[data-mask]'))
|
||||
maskElementList.map(function (maskEl) {
|
||||
console.log('maskEl', maskEl);
|
||||
return new IMask(maskEl, {
|
||||
mask: maskEl.dataset.mask,
|
||||
lazy: maskEl.dataset['mask-visible'] === 'true'
|
||||
})
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
{% endcapture_once %}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% capture_global modals %}
|
||||
<div class="modal modal-blur fade" id="modal-{{ modal-id }}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-dialog{% unless include.top %} modal-dialog-centered{% endunless %}" role="document">
|
||||
<div class="modal-content">
|
||||
{% include parts/modals/{{ modal-id }}.html %}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ include.title | default: 'Modal title' }}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
{% include ui/icon.html icon="x" %}
|
||||
</button>
|
||||
</div>
|
||||
@@ -4,10 +4,10 @@
|
||||
<li class="page-item{% if include.prev-description %} page-prev{% endif %} disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">
|
||||
{% if include.prev-description %}
|
||||
<div class="page-item-subtitle">Previous</div>
|
||||
<div class="page-item-subtitle">previous</div>
|
||||
<div class="page-item-title">{{ include.prev-description }}</div>
|
||||
{% else %}
|
||||
{% if include.icons %}{% include ui/icon.html icon="chevron-left" %}{% else %}{% include ui/icon.html icon="chevron-left" %} Prev{% endif %}
|
||||
{% if include.icons %}{% include ui/icon.html icon="chevron-left" %}{% else %}{% include ui/icon.html icon="chevron-left" %} prev{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
@@ -20,10 +20,10 @@
|
||||
<a class="page-link" href="#">
|
||||
|
||||
{% if include.next-description %}
|
||||
<div class="page-item-subtitle">Next</div>
|
||||
<div class="page-item-subtitle">next</div>
|
||||
<div class="page-item-title">{{ include.next-description }}</div>
|
||||
{% else %}
|
||||
{% if include.icons %}{% include ui/icon.html icon="chevron-right" %}{% else %}Next {% include ui/icon.html icon="chevron-right" %}{% endif %}
|
||||
{% if include.icons %}{% include ui/icon.html icon="chevron-right" %}{% else %}next {% include ui/icon.html icon="chevron-right" %}{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<div class="ribbon{% if include.top %} ribbon-top{% endif %}{% if include.left %} ribbon-left{% endif %}{% if include.bottom %} ribbon-bottom{% endif %}{% if include.bookmark %} ribbon-bookmark{% endif %}{% if include.color %} bg-{{ include.color }}{% endif %}">{% if include.text %}{{ include.text }}{% else %}{% include ui/icon.html icon="star" class="icon-filled" use-svg=true %}{% endif %}</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
{% assign type = include.type %}
|
||||
{% assign type = include.type | default: 'bar' %}
|
||||
{% assign id = 0 | random_id %}
|
||||
{% assign color = include.color | default: 'blue' %}
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
height: 40,
|
||||
stroke: "{{ color | tabler_color }}",
|
||||
strokeWidth: 2,
|
||||
fill: {% if type == 'pie' %}["{{ color | default: 'blue' | tabler_color }}", "{{ 'gray-200' | tabler_color }}"]{% elsif type == 'bar' %}["{{ color | tabler_color }}"]{% else %}"transparent"{% endif %},
|
||||
fill: {% if type == 'pie' %}["{{ color | default: 'blue' | tabler_color }}", "{{ 'border-color' | tabler_color }}"]{% elsif type == 'line' %}["{{ color | append: '-100' | tabler_color }}"]{% else %}"transparent"{% endif %},
|
||||
padding: .2,
|
||||
innerRadius: 17,
|
||||
{% if type == 'pie' %}innerRadius: 17,{% endif %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user