From 0cdc6c6e510548cb9e17122200ef2d6dddb7b7d9 Mon Sep 17 00:00:00 2001 From: Benjamin David Date: Mon, 6 May 2019 17:17:24 +0200 Subject: [PATCH 1/2] Added `chevron-left` and `chevron-right` icons --- dist/craftui.cjs.js | 2 +- dist/craftui.css | 16 ++++++++-------- dist/craftui.es.js | 2 +- dist/craftui.js | 2 +- dist/craftui.min.css | 2 +- dist/craftui.min.css.map | 2 +- dist/craftui.min.js | 2 +- dist/craftui.min.js.map | 2 +- src/sprites/icons.js | 2 ++ src/sprites/icons.svg | 12 ++++++++++++ 10 files changed, 29 insertions(+), 15 deletions(-) diff --git a/dist/craftui.cjs.js b/dist/craftui.cjs.js index 9e18e70..51a549f 100644 --- a/dist/craftui.cjs.js +++ b/dist/craftui.cjs.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); -var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; +var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Chevron Left\n \n \n \n Chevron Right\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; var CraftIcons = { install: function install() { diff --git a/dist/craftui.css b/dist/craftui.css index 8ba230c..db7c840 100644 --- a/dist/craftui.css +++ b/dist/craftui.css @@ -857,14 +857,6 @@ button.c-btn .c-btn-content { display: inline-block; } -.c-dropdown .c-dropdown-input select.w-full { - width: 100%; -} - -.c-dropdown .is-invalid select { - border-color: #e3342f; -} - body.ltr .c-checkbox input { margin-right: .5rem; } @@ -873,6 +865,14 @@ body.rtl .c-checkbox input { margin-left: .5rem; } +.c-dropdown .c-dropdown-input select.w-full { + width: 100%; +} + +.c-dropdown .is-invalid select { + border-color: #e3342f; +} + .c-icon { display: inline-block; vertical-align: middle; diff --git a/dist/craftui.es.js b/dist/craftui.es.js index 7c66680..40ba3bf 100644 --- a/dist/craftui.es.js +++ b/dist/craftui.es.js @@ -1,4 +1,4 @@ -var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; +var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Chevron Left\n \n \n \n Chevron Right\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; var CraftIcons = { install: function install() { diff --git a/dist/craftui.js b/dist/craftui.js index b74d22d..15251d5 100644 --- a/dist/craftui.js +++ b/dist/craftui.js @@ -4,7 +4,7 @@ (factory((global.CraftUi = {}))); }(this, (function (exports) { 'use strict'; - var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; + var iconsSvg = "\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Chevron Left\n \n \n \n Chevron Right\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; var CraftIcons = { install: function install() { diff --git a/dist/craftui.min.css b/dist/craftui.min.css index bee2ef3..b11f6d1 100644 --- a/dist/craftui.min.css +++ b/dist/craftui.min.css @@ -1,7 +1,7 @@ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:sans-serif}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,p,pre{margin:0}button{background:transparent;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset{margin:0;padding:0}ol,ul{margin:0}*,:after,:before{border:0 solid #dae1e7}img{border-style:solid}textarea{resize:vertical}img{max-width:100%;height:auto}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:inherit;opacity:.5}input:-ms-input-placeholder,input::-ms-input-placeholder,textarea:-ms-input-placeholder,textarea::-ms-input-placeholder{color:inherit;opacity:.5}input::placeholder,textarea::placeholder{color:inherit;opacity:.5}[role=button],button{cursor:pointer}table{border-collapse:collapse}.c-field{margin-bottom:1rem}.c-field.mono input,.c-field.mono textarea{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.invalid-feedback{color:#e3342f;font-size:.875rem;margin-top:.5rem;margin-bottom:1rem}.instructions{color:#8f98a3}label{display:inline-block;margin-bottom:.25rem}.c-field .checkbox{margin-right:.5rem}select{border-width:1px;border-color:#dae1e7;background-color:#fff;height:calc(2.25rem + 2px)}input[type=email],input[type=number],input[type=password],input[type=tel],input[type=text],input[type=url],textarea{background-color:#fff;border-width:1px;border-color:#b8c2cc;padding:.5rem;border-radius:.25rem;display:block}input[type=email]:disabled,input[type=email][readonly],input[type=number]:disabled,input[type=number][readonly],input[type=password]:disabled,input[type=password][readonly],input[type=tel]:disabled,input[type=tel][readonly],input[type=text]:disabled,input[type=text][readonly],input[type=url]:disabled,input[type=url][readonly],textarea:disabled,textarea[readonly]{background-color:#f8fafc}input[type=email].is-invalid,input[type=number].is-invalid,input[type=password].is-invalid,input[type=tel].is-invalid,input[type=text].is-invalid,input[type=url].is-invalid,textarea.is-invalid{border-color:#e3342f}input[type=number]{width:60px} .c-btn,a.c-btn,button.c-btn{padding:.5rem 1rem;border-radius:.25rem;background-color:#f1f5f8;color:#22292f;text-decoration:none;border:1px solid #f1f5f8}.c-btn:not(.outline),a.c-btn:not(.outline),button.c-btn:not(.outline){-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.1);box-shadow:0 2px 4px 0 rgba(0,0,0,.1)}.c-btn:not([disabled]):hover,a.c-btn:not([disabled]):hover,button.c-btn:not([disabled]):hover{cursor:pointer;background-color:#b8c2cc;border-color:#b8c2cc;text-decoration:none}.c-btn:not([disabled]):active,a.c-btn:not([disabled]):active,button.c-btn:not([disabled]):active{cursor:pointer;background-color:#8795a1;border-color:#8795a1}.c-btn.block,a.c-btn.block,button.c-btn.block{width:100%;margin-top:.5rem;margin-bottom:.5rem}.c-btn.small,a.c-btn.small,button.c-btn.small{font-size:.875rem}.c-btn.small .c-icon,a.c-btn.small .c-icon,button.c-btn.small .c-icon{width:12px;height:12px}.c-btn.large,a.c-btn.large,button.c-btn.large{font-size:1.125rem;padding-top:.75rem;padding-bottom:.75rem}.c-btn.danger:not(.outline) .c-icon,.c-btn.primary:not(.outline) .c-icon,a.c-btn.danger:not(.outline) .c-icon,a.c-btn.primary:not(.outline) .c-icon,button.c-btn.danger:not(.outline) .c-icon,button.c-btn.primary:not(.outline) .c-icon{fill:#fff}.c-btn.primary:not(.outline),a.c-btn.primary:not(.outline),button.c-btn.primary:not(.outline){background-color:#3490dc;border-color:#3490dc;color:#fff}.c-btn.primary:not(.outline):not([disabled]):hover,a.c-btn.primary:not(.outline):not([disabled]):hover,button.c-btn.primary:not(.outline):not([disabled]):hover{background-color:#2779bd;border-color:#2779bd}.c-btn.primary:not(.outline):not([disabled]):active,a.c-btn.primary:not(.outline):not([disabled]):active,button.c-btn.primary:not(.outline):not([disabled]):active{background-color:#1c3d5a;border-color:#1c3d5a}.c-btn.danger,a.c-btn.danger,button.c-btn.danger{background-color:#e3342f;border-color:#e3342f;color:#fff}.c-btn.danger:not([disabled]):hover,a.c-btn.danger:not([disabled]):hover,button.c-btn.danger:not([disabled]):hover{background-color:#cc1f1a;border-color:#cc1f1a}.c-btn.danger:not([disabled]):active,a.c-btn.danger:not([disabled]):active,button.c-btn.danger:not([disabled]):active{background-color:#621b18;border-color:#621b18}.c-btn[disabled],a.c-btn[disabled],button.c-btn[disabled]{opacity:.5;cursor:default}.c-btn.outline,a.c-btn.outline,button.c-btn.outline{background-color:transparent}.c-btn.outline.primary,a.c-btn.outline.primary,button.c-btn.outline.primary{color:#3490dc}.c-btn.outline.primary:not([disabled]):hover,a.c-btn.outline.primary:not([disabled]):hover,button.c-btn.outline.primary:not([disabled]):hover{color:#fff;background-color:#3490dc}.c-btn.outline.primary:not([disabled]):active,a.c-btn.outline.primary:not([disabled]):active,button.c-btn.outline.primary:not([disabled]):active{color:#fff;background-color:#1c3d5a}.c-btn.outline.danger,a.c-btn.outline.danger,button.c-btn.outline.danger{color:#e3342f}.c-btn.outline.danger:not([disabled]):hover,a.c-btn.outline.danger:not([disabled]):hover,button.c-btn.outline.danger:not([disabled]):hover{color:#fff;background-color:#e3342f}.c-btn.outline.danger:not([disabled]):active,a.c-btn.outline.danger:not([disabled]):active,button.c-btn.outline.danger:not([disabled]):active{color:#fff;background-color:#621b18}.c-btn.outline .c-icon,a.c-btn.outline .c-icon,button.c-btn.outline .c-icon{fill:currentColor}.c-btn.loading,a.c-btn.loading,button.c-btn.loading{position:relative}.c-btn.loading:not(.outline).danger .c-spinner>.animation,.c-btn.loading:not(.outline).primary .c-spinner>.animation,a.c-btn.loading:not(.outline).danger .c-spinner>.animation,a.c-btn.loading:not(.outline).primary .c-spinner>.animation,button.c-btn.loading:not(.outline).danger .c-spinner>.animation,button.c-btn.loading:not(.outline).primary .c-spinner>.animation{border-color:#fff}.c-btn.loading.outline.primary .c-spinner>.animation,a.c-btn.loading.outline.primary .c-spinner>.animation,button.c-btn.loading.outline.primary .c-spinner>.animation{border-color:#3490dc}.c-btn.loading.outline.danger .c-spinner>.animation,a.c-btn.loading.outline.danger .c-spinner>.animation,button.c-btn.loading.outline.danger .c-spinner>.animation{border-color:#e3342f}.c-btn.loading .c-spinner,a.c-btn.loading .c-spinner,button.c-btn.loading .c-spinner{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.c-btn.loading .c-btn-content,a.c-btn.loading .c-btn-content,button.c-btn.loading .c-btn-content{visibility:hidden}.c-btn .c-icon,a.c-btn .c-icon,button.c-btn .c-icon{vertical-align:middle}body.ltr .c-btn:not(.c-btn-icon) .c-icon,body.ltr a.c-btn:not(.c-btn-icon) .c-icon,body.ltr button.c-btn:not(.c-btn-icon) .c-icon{margin-right:.25rem}body.rtl .c-btn:not(.c-btn-icon) .c-icon,body.rtl a.c-btn:not(.c-btn-icon) .c-icon,body.rtl button.c-btn:not(.c-btn-icon) .c-icon{margin-left:.25rem}.c-btn .c-btn-content,a.c-btn .c-btn-content,button.c-btn .c-btn-content{display:inline-block} -.c-dropdown .c-dropdown-input select.w-full{width:100%}.c-dropdown .is-invalid select{border-color:#e3342f} body.ltr .c-checkbox input{margin-right:.5rem}body.rtl .c-checkbox input{margin-left:.5rem} +.c-dropdown .c-dropdown-input select.w-full{width:100%}.c-dropdown .is-invalid select{border-color:#e3342f} .c-icon{display:inline-block;vertical-align:middle;position:relative;fill:currentColor;top:-2px;width:18px;height:18px}.c-icon.size-sm{width:.75rem;height:.75rem}.c-icon.size-base{width:1rem;height:1rem}.c-icon.size-lg{width:1.25rem;height:1.25rem}.c-icon.size-xl{width:1.5rem;height:1.5rem}.c-icon.size-2xl{width:1.75rem;height:1.75rem}.c-icon.size-3xl{width:2.25rem;height:2.25rem}.c-icon.size-4xl{width:3rem;height:3rem}.c-icon.size-5xl{width:4rem;height:4rem} .c-lightswitch .c-lightswitch-input label{position:relative;display:block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:46px;height:30px}.c-lightswitch .c-lightswitch-input label input{position:absolute;opacity:0}.c-lightswitch .c-lightswitch-input label .slider{position:absolute;top:0;right:0;bottom:0;left:0;cursor:pointer;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.c-lightswitch .c-lightswitch-input label .slider:before{position:absolute;background-color:#fff;content:"";height:26px;width:26px;bottom:2px;-webkit-transition:.1s;transition:.1s}body.ltr .c-lightswitch .c-lightswitch-input label .slider:before{left:2px}body.rtl .c-lightswitch .c-lightswitch-input label .slider:before{right:2px}.c-lightswitch .c-lightswitch-input label input:checked+.slider{background-color:#38c172}.c-lightswitch .c-lightswitch-input label input:active+.slider,.c-lightswitch .c-lightswitch-input label input:focus+.slider{-webkit-box-shadow:0 0 0 2px rgba(52,144,220,.5);box-shadow:0 0 0 2px rgba(52,144,220,.5)}.c-lightswitch .c-lightswitch-input label input:checked+.slider:before{-webkit-transform:translateX(16px);transform:translateX(16px)}.c-lightswitch .c-lightswitch-input label .slider.round{border-radius:34px}.c-lightswitch .c-lightswitch-input label .slider.round:before{border-radius:50%}.c-lightswitch .c-lightswitch-input label.disabled{opacity:.4}.c-lightswitch .c-lightswitch-input label.disabled .slider{cursor:default} body.ltr .c-radio input{margin-right:.5rem}body.rtl .c-radio input{margin-left:.5rem}.c-radio .instructions{color:#8795a1;font-size:.875rem} diff --git a/dist/craftui.min.css.map b/dist/craftui.min.css.map index 555384f..dec51cb 100644 --- a/dist/craftui.min.css.map +++ b/dist/craftui.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["dist/styles.scss","dist/","dist/Btn.vue?rollup-plugin-vue=styles.0.css","dist/Dropdown.vue?rollup-plugin-vue=styles.0.css","dist/Checkbox.vue?rollup-plugin-vue=styles.0.css","dist/Icon.vue?rollup-plugin-vue=styles.0.css","dist/Lightswitch.vue?rollup-plugin-vue=styles.0.css","dist/Radio.vue?rollup-plugin-vue=styles.0.css","dist/Spinner.vue?rollup-plugin-vue=styles.0.css","dist/Textbox.vue?rollup-plugin-vue=styles.0.css"],"names":[],"mappings":"AACA,4EAAA,AAAoB,KAApB,iBAAA,AAAoB,6BAAA,CAApB,AAAoB,KAApB,QAAoB,CAApB,AAAoB,KAApB,aAAoB,CAApB,AAAoB,GAApB,cAAA,AAAoB,cAAA,CAApB,AAAoB,GAApB,+BAAA,AAAoB,uBAApB,AAAoB,SAApB,AAAoB,gBAAA,CAApB,AAAoB,IAApB,gCAAA,AAAoB,aAAA,CAApB,AAAoB,EAApB,4BAAoB,CAApB,AAAoB,YAApB,mBAAA,AAAoB,0BAApB,AAAoB,yCAApB,AAAoB,gCAAA,CAApB,AAAoB,SAApB,kBAAoB,CAApB,AAAoB,cAApB,gCAAA,AAAoB,aAAA,CAApB,AAAoB,MAApB,aAAoB,CAApB,AAAoB,QAApB,cAAA,AAAoB,cAApB,AAAoB,kBAApB,AAAoB,uBAAA,CAApB,AAAoB,IAApB,aAAoB,CAApB,AAAoB,IAApB,SAAoB,CAApB,AAAoB,IAApB,iBAAoB,CAApB,AAAoB,sCAApB,oBAAA,AAAoB,eAApB,AAAoB,iBAApB,AAA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AAA,CMA6I;ACA7I,WPAA,oBAAA,COAiC,sBAAsB,wCAAA,AAAsC,gCAAA,WAAW,YAAY,kBAAkB,6BAA6B,uCAAuC,wCAAwC,wBAAwB,wBAAwB,CAAC,yBAAyB,WAAW,WAAW,CAAC,yBAAyB,WAAW,YAAY,gBAAgB,CAAC,qBAAmB,GAAG,4BAAA,AAAmB,mBAAA,CAAC,GAAG,gCAAA,AAAuB,uBAAA,CAAC,CAArE,AAAsE,aAAnD,GAAG,4BAAA,AAAmB,mBAAA,CAAC,GAAG,gCAAA,AAAuB,uBAAA,CAAC,CAAC;ACA1d,oBRAA,iBAAA,CQAsC,2CRAtC,UAAA,CQAiG,mCRAjG,aAAA,CQA2J,yBRA3J,gBAAA,CQAkM,kCAAkC,oBAAoB,CAAC,kCAAkC,mBAAmB,CAAC,kCRA/S,kBAAA,iBAAA,gBAAA,CQAwX,mCRAxX,aAAA,CQA8a,qCRA9a,aAAA,CQAwe,kCRAxe,aAAA,CQA4hB","file":"dist/craftui.min.css","sourcesContent":["@charset \"UTF-8\";\n@tailwind preflight;\n/* Fields */\n.c-field {\n margin-bottom: 1rem; }\n\n.c-field.mono input,\n.c-field.mono textarea {\n @apply .font-mono; }\n\n.invalid-feedback {\n @apply .text-red .text-sm .mt-2 .mb-4; }\n\n.instructions {\n color: #8f98a3; }\n\nlabel {\n @apply .inline-block .mb-1; }\n\n.c-field .checkbox {\n @apply .mr-2; }\n\nselect {\n @apply .border .border-grey-light .bg-white;\n height: calc(2.25rem + 2px); }\n\n/* Inputs */\ninput[type=\"email\"],\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"tel\"],\ninput[type=\"url\"],\ninput[type=\"number\"],\ntextarea {\n @apply .bg-white .border .border-grey .p-2 .rounded .block; }\n input[type=\"email\"]:disabled, input[type=\"email\"][readonly],\n input[type=\"text\"]:disabled,\n input[type=\"text\"][readonly],\n input[type=\"password\"]:disabled,\n input[type=\"password\"][readonly],\n input[type=\"tel\"]:disabled,\n input[type=\"tel\"][readonly],\n input[type=\"url\"]:disabled,\n input[type=\"url\"][readonly],\n input[type=\"number\"]:disabled,\n input[type=\"number\"][readonly],\n textarea:disabled,\n textarea[readonly] {\n @apply .bg-grey-lightest; }\n input[type=\"email\"].is-invalid,\n input[type=\"text\"].is-invalid,\n input[type=\"password\"].is-invalid,\n input[type=\"tel\"].is-invalid,\n input[type=\"url\"].is-invalid,\n input[type=\"number\"].is-invalid,\n textarea.is-invalid {\n @apply .border-red; }\n\ninput[type=\"number\"] {\n width: 60px; }\n\n/*\nKeep it light, don't import Tailwind’s utilities.\n@tailwind utilities;\n*/\n",null,".c-btn,a.c-btn,button.c-btn{@apply .px-4 .py-2 .rounded .bg-grey-lighter .text-black .no-underline .border .border-solid .border-grey-lighter;}.c-btn:not(.outline),a.c-btn:not(.outline),button.c-btn:not(.outline){@apply .shadow;}.c-btn:not([disabled]):hover,a.c-btn:not([disabled]):hover,button.c-btn:not([disabled]):hover{@apply .cursor-pointer .bg-grey .border-grey .no-underline;}.c-btn:not([disabled]):active,a.c-btn:not([disabled]):active,button.c-btn:not([disabled]):active{@apply .cursor-pointer .bg-grey-dark .border-grey-dark;}.c-btn.block,a.c-btn.block,button.c-btn.block{@apply .w-full .my-2;}.c-btn.small,a.c-btn.small,button.c-btn.small{@apply .text-sm;}.c-btn.small .c-icon,a.c-btn.small .c-icon,button.c-btn.small .c-icon{width:12px;height:12px}.c-btn.large,a.c-btn.large,button.c-btn.large{@apply .text-lg .py-3;}.c-btn.danger:not(.outline) .c-icon,.c-btn.primary:not(.outline) .c-icon,a.c-btn.danger:not(.outline) .c-icon,a.c-btn.primary:not(.outline) .c-icon,button.c-btn.danger:not(.outline) .c-icon,button.c-btn.primary:not(.outline) .c-icon{fill:#fff}.c-btn.primary:not(.outline),a.c-btn.primary:not(.outline),button.c-btn.primary:not(.outline){@apply .bg-blue .border-blue .text-white;}.c-btn.primary:not(.outline):not([disabled]):hover,a.c-btn.primary:not(.outline):not([disabled]):hover,button.c-btn.primary:not(.outline):not([disabled]):hover{@apply .bg-blue-dark .border-blue-dark;}.c-btn.primary:not(.outline):not([disabled]):active,a.c-btn.primary:not(.outline):not([disabled]):active,button.c-btn.primary:not(.outline):not([disabled]):active{@apply .bg-blue-darker .border-blue-darker;}.c-btn.danger,a.c-btn.danger,button.c-btn.danger{@apply .bg-red .border-red .text-white;}.c-btn.danger:not([disabled]):hover,a.c-btn.danger:not([disabled]):hover,button.c-btn.danger:not([disabled]):hover{@apply .bg-red-dark .border-red-dark;}.c-btn.danger:not([disabled]):active,a.c-btn.danger:not([disabled]):active,button.c-btn.danger:not([disabled]):active{@apply .bg-red-darker .border-red-darker;}.c-btn[disabled],a.c-btn[disabled],button.c-btn[disabled]{@apply .opacity-50 .cursor-default;}.c-btn.outline,a.c-btn.outline,button.c-btn.outline{@apply .bg-transparent;}.c-btn.outline.primary,a.c-btn.outline.primary,button.c-btn.outline.primary{@apply .text-blue;}.c-btn.outline.primary:not([disabled]):hover,a.c-btn.outline.primary:not([disabled]):hover,button.c-btn.outline.primary:not([disabled]):hover{@apply .text-white .bg-blue;}.c-btn.outline.primary:not([disabled]):active,a.c-btn.outline.primary:not([disabled]):active,button.c-btn.outline.primary:not([disabled]):active{@apply .text-white .bg-blue-darker;}.c-btn.outline.danger,a.c-btn.outline.danger,button.c-btn.outline.danger{@apply .text-red;}.c-btn.outline.danger:not([disabled]):hover,a.c-btn.outline.danger:not([disabled]):hover,button.c-btn.outline.danger:not([disabled]):hover{@apply .text-white .bg-red;}.c-btn.outline.danger:not([disabled]):active,a.c-btn.outline.danger:not([disabled]):active,button.c-btn.outline.danger:not([disabled]):active{@apply .text-white .bg-red-darker;}.c-btn.outline .c-icon,a.c-btn.outline .c-icon,button.c-btn.outline .c-icon{@apply .fill-current;}.c-btn.loading,a.c-btn.loading,button.c-btn.loading{@apply .relative;}.c-btn.loading:not(.outline).danger .c-spinner>.animation,.c-btn.loading:not(.outline).primary .c-spinner>.animation,a.c-btn.loading:not(.outline).danger .c-spinner>.animation,a.c-btn.loading:not(.outline).primary .c-spinner>.animation,button.c-btn.loading:not(.outline).danger .c-spinner>.animation,button.c-btn.loading:not(.outline).primary .c-spinner>.animation{@apply .border-white;}.c-btn.loading.outline.primary .c-spinner>.animation,a.c-btn.loading.outline.primary .c-spinner>.animation,button.c-btn.loading.outline.primary .c-spinner>.animation{@apply .border-blue;}.c-btn.loading.outline.danger .c-spinner>.animation,a.c-btn.loading.outline.danger .c-spinner>.animation,button.c-btn.loading.outline.danger .c-spinner>.animation{@apply .border-red;}.c-btn.loading .c-spinner,a.c-btn.loading .c-spinner,button.c-btn.loading .c-spinner{@apply .absolute .pin .flex .justify-center .items-center;}.c-btn.loading .c-btn-content,a.c-btn.loading .c-btn-content,button.c-btn.loading .c-btn-content{@apply .invisible;}.c-btn .c-icon,a.c-btn .c-icon,button.c-btn .c-icon{@apply .align-middle;}body.ltr .c-btn:not(.c-btn-icon) .c-icon,body.ltr a.c-btn:not(.c-btn-icon) .c-icon,body.ltr button.c-btn:not(.c-btn-icon) .c-icon{margin-right:.25rem}body.rtl .c-btn:not(.c-btn-icon) .c-icon,body.rtl a.c-btn:not(.c-btn-icon) .c-icon,body.rtl button.c-btn:not(.c-btn-icon) .c-icon{margin-left:.25rem}.c-btn .c-btn-content,a.c-btn .c-btn-content,button.c-btn .c-btn-content{@apply .inline-block;}",".c-dropdown .c-dropdown-input select.w-full{@apply .w-full;}.c-dropdown .is-invalid select{@apply .border-red;}","body.ltr .c-checkbox input{margin-right:.5rem}body.rtl .c-checkbox input{margin-left:.5rem}",".c-icon{@apply .inline-block .align-middle .relative .fill-current;top:-2px;width:18px;height:18px}.c-icon.size-sm{width:.75rem;height:.75rem}.c-icon.size-base{width:1rem;height:1rem}.c-icon.size-lg{width:1.25rem;height:1.25rem}.c-icon.size-xl{width:1.5rem;height:1.5rem}.c-icon.size-2xl{width:1.75rem;height:1.75rem}.c-icon.size-3xl{width:2.25rem;height:2.25rem}.c-icon.size-4xl{width:3rem;height:3rem}.c-icon.size-5xl{width:4rem;height:4rem}",".c-lightswitch .c-lightswitch-input label{@apply .relative .block .select-none;width:46px;height:30px}.c-lightswitch .c-lightswitch-input label input{@apply .absolute .opacity-0;}.c-lightswitch .c-lightswitch-input label .slider{@apply .absolute .pin .cursor-pointer;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.c-lightswitch .c-lightswitch-input label .slider:before{@apply .absolute .bg-white;content:\"\";height:26px;width:26px;bottom:2px;-webkit-transition:.1s;transition:.1s}body.ltr .c-lightswitch .c-lightswitch-input label .slider:before{left:2px}body.rtl .c-lightswitch .c-lightswitch-input label .slider:before{right:2px}.c-lightswitch .c-lightswitch-input label input:checked+.slider{background-color:#38c172}.c-lightswitch .c-lightswitch-input label input:active+.slider,.c-lightswitch .c-lightswitch-input label input:focus+.slider{box-shadow:0 0 0 2px rgba(52,144,220,.5)}.c-lightswitch .c-lightswitch-input label input:checked+.slider:before{-webkit-transform:translateX(16px);-ms-transform:translateX(16px);transform:translateX(16px)}.c-lightswitch .c-lightswitch-input label .slider.round{border-radius:34px}.c-lightswitch .c-lightswitch-input label .slider.round:before{border-radius:50%}.c-lightswitch .c-lightswitch-input label.disabled{opacity:.4}.c-lightswitch .c-lightswitch-input label.disabled .slider{@apply .cursor-default;}","body.ltr .c-radio input{margin-right:.5rem}body.rtl .c-radio input{margin-left:.5rem}.c-radio .instructions{@apply .text-grey-dark .text-sm;}",".c-spinner{@apply .inline-block;}.c-spinner>.animation{animation:rotator .7s linear infinite;width:20px;height:20px;border-radius:50%;border:2px solid transparent;border-top-color:transparent!important;border-left-color:transparent!important;border-right-color:#555;border-bottom-color:#555}.c-spinner.sm>.animation{width:16px;height:16px}.c-spinner.lg>.animation{width:32px;height:32px;border-width:3px}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(1turn)}}",".c-textbox .wrapper{@apply .relative;}.c-textbox .wrapper input.c-textbox.w-full{@apply .w-full;}.c-textbox .wrapper .text-red-dark{@apply .text-red-dark;}.c-textbox .wrapper .max{@apply .mt-2;}body.ltr .c-textbox .wrapper .max{padding-right:.25rem}body.rtl .c-textbox .wrapper .max{padding-left:.25rem}.c-textbox .wrapper .max.floating{@apply .absolute .text-xs .text-right;}.c-textbox .wrapper .max.text-grey{@apply .text-grey;}.c-textbox .wrapper .max.text-orange{@apply .text-orange;}.c-textbox .wrapper .max.text-red{@apply .text-red;}"]} \ No newline at end of file +{"version":3,"sources":["dist/styles.scss","dist/","dist/Btn.vue?rollup-plugin-vue=styles.0.css","dist/Checkbox.vue?rollup-plugin-vue=styles.0.css","dist/Dropdown.vue?rollup-plugin-vue=styles.0.css","dist/Icon.vue?rollup-plugin-vue=styles.0.css","dist/Lightswitch.vue?rollup-plugin-vue=styles.0.css","dist/Radio.vue?rollup-plugin-vue=styles.0.css","dist/Spinner.vue?rollup-plugin-vue=styles.0.css","dist/Textbox.vue?rollup-plugin-vue=styles.0.css"],"names":[],"mappings":"AACA,4EAAA,AAAoB,KAApB,iBAAA,AAAoB,6BAAA,CAApB,AAAoB,KAApB,QAAoB,CAApB,AAAoB,KAApB,aAAoB,CAApB,AAAoB,GAApB,cAAA,AAAoB,cAAA,CAApB,AAAoB,GAApB,+BAAA,AAAoB,uBAApB,AAAoB,SAApB,AAAoB,gBAAA,CAApB,AAAoB,IAApB,gCAAA,AAAoB,aAAA,CAApB,AAAoB,EAApB,4BAAoB,CAApB,AAAoB,YAApB,mBAAA,AAAoB,0BAApB,AAAoB,yCAApB,AAAoB,gCAAA,CAApB,AAAoB,SAApB,kBAAoB,CAApB,AAAoB,cAApB,gCAAA,AAAoB,aAAA,CAApB,AAAoB,MAApB,aAAoB,CAApB,AAAoB,QAApB,cAAA,AAAoB,cAApB,AAAoB,kBAApB,AAAoB,uBAAA,CAApB,AAAoB,IAApB,aAAoB,CAApB,AAAoB,IAApB,SAAoB,CAApB,AAAoB,IAApB,iBAAoB,CAApB,AAAoB,sCAApB,oBAAA,AAAoB,eAApB,AAAoB,iBAApB,AAAoB,QAA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A6I;ACA7I,WPAA,oBAAA,COAiC,sBAAsB,wCAAA,AAAsC,gCAAA,WAAW,YAAY,kBAAkB,6BAA6B,uCAAuC,wCAAwC,wBAAwB,wBAAwB,CAAC,yBAAyB,WAAW,WAAW,CAAC,yBAAyB,WAAW,YAAY,gBAAgB,CAAC,qBAAmB,GAAG,4BAAA,AAAmB,mBAAA,CAAC,GAAG,gCAAA,AAAuB,uBAAA,CAAC,CAArE,AAAsE,aAAnD,GAAG,4BAAA,AAAmB,mBAAA,CAAC,GAAG,gCAAA,AAAuB,uBAAA,CAAC,CAAC;ACA1d,oBRAA,iBAAA,CQAsC,2CRAtC,UAAA,CQAiG,mCRAjG,aAAA,CQA2J,yBRA3J,gBAAA,CQAkM,kCAAkC,oBAAoB,CAAC,kCAAkC,mBAAmB,CAAC,kCRA/S,kBAAA,iBAAA,gBAAA,CQAwX,mCRAxX,aAAA,CQA8a,qCRA9a,aAAA,CQAwe,kCRAxe,aAAA,CQA4hB","file":"dist/craftui.min.css","sourcesContent":["@charset \"UTF-8\";\n@tailwind preflight;\n/* Fields */\n.c-field {\n margin-bottom: 1rem; }\n\n.c-field.mono input,\n.c-field.mono textarea {\n @apply .font-mono; }\n\n.invalid-feedback {\n @apply .text-red .text-sm .mt-2 .mb-4; }\n\n.instructions {\n color: #8f98a3; }\n\nlabel {\n @apply .inline-block .mb-1; }\n\n.c-field .checkbox {\n @apply .mr-2; }\n\nselect {\n @apply .border .border-grey-light .bg-white;\n height: calc(2.25rem + 2px); }\n\n/* Inputs */\ninput[type=\"email\"],\ninput[type=\"text\"],\ninput[type=\"password\"],\ninput[type=\"tel\"],\ninput[type=\"url\"],\ninput[type=\"number\"],\ntextarea {\n @apply .bg-white .border .border-grey .p-2 .rounded .block; }\n input[type=\"email\"]:disabled, input[type=\"email\"][readonly],\n input[type=\"text\"]:disabled,\n input[type=\"text\"][readonly],\n input[type=\"password\"]:disabled,\n input[type=\"password\"][readonly],\n input[type=\"tel\"]:disabled,\n input[type=\"tel\"][readonly],\n input[type=\"url\"]:disabled,\n input[type=\"url\"][readonly],\n input[type=\"number\"]:disabled,\n input[type=\"number\"][readonly],\n textarea:disabled,\n textarea[readonly] {\n @apply .bg-grey-lightest; }\n input[type=\"email\"].is-invalid,\n input[type=\"text\"].is-invalid,\n input[type=\"password\"].is-invalid,\n input[type=\"tel\"].is-invalid,\n input[type=\"url\"].is-invalid,\n input[type=\"number\"].is-invalid,\n textarea.is-invalid {\n @apply .border-red; }\n\ninput[type=\"number\"] {\n width: 60px; }\n\n/*\nKeep it light, don't import Tailwind’s utilities.\n@tailwind utilities;\n*/\n",null,".c-btn,a.c-btn,button.c-btn{@apply .px-4 .py-2 .rounded .bg-grey-lighter .text-black .no-underline .border .border-solid .border-grey-lighter;}.c-btn:not(.outline),a.c-btn:not(.outline),button.c-btn:not(.outline){@apply .shadow;}.c-btn:not([disabled]):hover,a.c-btn:not([disabled]):hover,button.c-btn:not([disabled]):hover{@apply .cursor-pointer .bg-grey .border-grey .no-underline;}.c-btn:not([disabled]):active,a.c-btn:not([disabled]):active,button.c-btn:not([disabled]):active{@apply .cursor-pointer .bg-grey-dark .border-grey-dark;}.c-btn.block,a.c-btn.block,button.c-btn.block{@apply .w-full .my-2;}.c-btn.small,a.c-btn.small,button.c-btn.small{@apply .text-sm;}.c-btn.small .c-icon,a.c-btn.small .c-icon,button.c-btn.small .c-icon{width:12px;height:12px}.c-btn.large,a.c-btn.large,button.c-btn.large{@apply .text-lg .py-3;}.c-btn.danger:not(.outline) .c-icon,.c-btn.primary:not(.outline) .c-icon,a.c-btn.danger:not(.outline) .c-icon,a.c-btn.primary:not(.outline) .c-icon,button.c-btn.danger:not(.outline) .c-icon,button.c-btn.primary:not(.outline) .c-icon{fill:#fff}.c-btn.primary:not(.outline),a.c-btn.primary:not(.outline),button.c-btn.primary:not(.outline){@apply .bg-blue .border-blue .text-white;}.c-btn.primary:not(.outline):not([disabled]):hover,a.c-btn.primary:not(.outline):not([disabled]):hover,button.c-btn.primary:not(.outline):not([disabled]):hover{@apply .bg-blue-dark .border-blue-dark;}.c-btn.primary:not(.outline):not([disabled]):active,a.c-btn.primary:not(.outline):not([disabled]):active,button.c-btn.primary:not(.outline):not([disabled]):active{@apply .bg-blue-darker .border-blue-darker;}.c-btn.danger,a.c-btn.danger,button.c-btn.danger{@apply .bg-red .border-red .text-white;}.c-btn.danger:not([disabled]):hover,a.c-btn.danger:not([disabled]):hover,button.c-btn.danger:not([disabled]):hover{@apply .bg-red-dark .border-red-dark;}.c-btn.danger:not([disabled]):active,a.c-btn.danger:not([disabled]):active,button.c-btn.danger:not([disabled]):active{@apply .bg-red-darker .border-red-darker;}.c-btn[disabled],a.c-btn[disabled],button.c-btn[disabled]{@apply .opacity-50 .cursor-default;}.c-btn.outline,a.c-btn.outline,button.c-btn.outline{@apply .bg-transparent;}.c-btn.outline.primary,a.c-btn.outline.primary,button.c-btn.outline.primary{@apply .text-blue;}.c-btn.outline.primary:not([disabled]):hover,a.c-btn.outline.primary:not([disabled]):hover,button.c-btn.outline.primary:not([disabled]):hover{@apply .text-white .bg-blue;}.c-btn.outline.primary:not([disabled]):active,a.c-btn.outline.primary:not([disabled]):active,button.c-btn.outline.primary:not([disabled]):active{@apply .text-white .bg-blue-darker;}.c-btn.outline.danger,a.c-btn.outline.danger,button.c-btn.outline.danger{@apply .text-red;}.c-btn.outline.danger:not([disabled]):hover,a.c-btn.outline.danger:not([disabled]):hover,button.c-btn.outline.danger:not([disabled]):hover{@apply .text-white .bg-red;}.c-btn.outline.danger:not([disabled]):active,a.c-btn.outline.danger:not([disabled]):active,button.c-btn.outline.danger:not([disabled]):active{@apply .text-white .bg-red-darker;}.c-btn.outline .c-icon,a.c-btn.outline .c-icon,button.c-btn.outline .c-icon{@apply .fill-current;}.c-btn.loading,a.c-btn.loading,button.c-btn.loading{@apply .relative;}.c-btn.loading:not(.outline).danger .c-spinner>.animation,.c-btn.loading:not(.outline).primary .c-spinner>.animation,a.c-btn.loading:not(.outline).danger .c-spinner>.animation,a.c-btn.loading:not(.outline).primary .c-spinner>.animation,button.c-btn.loading:not(.outline).danger .c-spinner>.animation,button.c-btn.loading:not(.outline).primary .c-spinner>.animation{@apply .border-white;}.c-btn.loading.outline.primary .c-spinner>.animation,a.c-btn.loading.outline.primary .c-spinner>.animation,button.c-btn.loading.outline.primary .c-spinner>.animation{@apply .border-blue;}.c-btn.loading.outline.danger .c-spinner>.animation,a.c-btn.loading.outline.danger .c-spinner>.animation,button.c-btn.loading.outline.danger .c-spinner>.animation{@apply .border-red;}.c-btn.loading .c-spinner,a.c-btn.loading .c-spinner,button.c-btn.loading .c-spinner{@apply .absolute .pin .flex .justify-center .items-center;}.c-btn.loading .c-btn-content,a.c-btn.loading .c-btn-content,button.c-btn.loading .c-btn-content{@apply .invisible;}.c-btn .c-icon,a.c-btn .c-icon,button.c-btn .c-icon{@apply .align-middle;}body.ltr .c-btn:not(.c-btn-icon) .c-icon,body.ltr a.c-btn:not(.c-btn-icon) .c-icon,body.ltr button.c-btn:not(.c-btn-icon) .c-icon{margin-right:.25rem}body.rtl .c-btn:not(.c-btn-icon) .c-icon,body.rtl a.c-btn:not(.c-btn-icon) .c-icon,body.rtl button.c-btn:not(.c-btn-icon) .c-icon{margin-left:.25rem}.c-btn .c-btn-content,a.c-btn .c-btn-content,button.c-btn .c-btn-content{@apply .inline-block;}","body.ltr .c-checkbox input{margin-right:.5rem}body.rtl .c-checkbox input{margin-left:.5rem}",".c-dropdown .c-dropdown-input select.w-full{@apply .w-full;}.c-dropdown .is-invalid select{@apply .border-red;}",".c-icon{@apply .inline-block .align-middle .relative .fill-current;top:-2px;width:18px;height:18px}.c-icon.size-sm{width:.75rem;height:.75rem}.c-icon.size-base{width:1rem;height:1rem}.c-icon.size-lg{width:1.25rem;height:1.25rem}.c-icon.size-xl{width:1.5rem;height:1.5rem}.c-icon.size-2xl{width:1.75rem;height:1.75rem}.c-icon.size-3xl{width:2.25rem;height:2.25rem}.c-icon.size-4xl{width:3rem;height:3rem}.c-icon.size-5xl{width:4rem;height:4rem}",".c-lightswitch .c-lightswitch-input label{@apply .relative .block .select-none;width:46px;height:30px}.c-lightswitch .c-lightswitch-input label input{@apply .absolute .opacity-0;}.c-lightswitch .c-lightswitch-input label .slider{@apply .absolute .pin .cursor-pointer;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.c-lightswitch .c-lightswitch-input label .slider:before{@apply .absolute .bg-white;content:\"\";height:26px;width:26px;bottom:2px;-webkit-transition:.1s;transition:.1s}body.ltr .c-lightswitch .c-lightswitch-input label .slider:before{left:2px}body.rtl .c-lightswitch .c-lightswitch-input label .slider:before{right:2px}.c-lightswitch .c-lightswitch-input label input:checked+.slider{background-color:#38c172}.c-lightswitch .c-lightswitch-input label input:active+.slider,.c-lightswitch .c-lightswitch-input label input:focus+.slider{box-shadow:0 0 0 2px rgba(52,144,220,.5)}.c-lightswitch .c-lightswitch-input label input:checked+.slider:before{-webkit-transform:translateX(16px);-ms-transform:translateX(16px);transform:translateX(16px)}.c-lightswitch .c-lightswitch-input label .slider.round{border-radius:34px}.c-lightswitch .c-lightswitch-input label .slider.round:before{border-radius:50%}.c-lightswitch .c-lightswitch-input label.disabled{opacity:.4}.c-lightswitch .c-lightswitch-input label.disabled .slider{@apply .cursor-default;}","body.ltr .c-radio input{margin-right:.5rem}body.rtl .c-radio input{margin-left:.5rem}.c-radio .instructions{@apply .text-grey-dark .text-sm;}",".c-spinner{@apply .inline-block;}.c-spinner>.animation{animation:rotator .7s linear infinite;width:20px;height:20px;border-radius:50%;border:2px solid transparent;border-top-color:transparent!important;border-left-color:transparent!important;border-right-color:#555;border-bottom-color:#555}.c-spinner.sm>.animation{width:16px;height:16px}.c-spinner.lg>.animation{width:32px;height:32px;border-width:3px}@keyframes rotator{0%{transform:rotate(0)}to{transform:rotate(1turn)}}",".c-textbox .wrapper{@apply .relative;}.c-textbox .wrapper input.c-textbox.w-full{@apply .w-full;}.c-textbox .wrapper .text-red-dark{@apply .text-red-dark;}.c-textbox .wrapper .max{@apply .mt-2;}body.ltr .c-textbox .wrapper .max{padding-right:.25rem}body.rtl .c-textbox .wrapper .max{padding-left:.25rem}.c-textbox .wrapper .max.floating{@apply .absolute .text-xs .text-right;}.c-textbox .wrapper .max.text-grey{@apply .text-grey;}.c-textbox .wrapper .max.text-orange{@apply .text-orange;}.c-textbox .wrapper .max.text-red{@apply .text-red;}"]} \ No newline at end of file diff --git a/dist/craftui.min.js b/dist/craftui.min.js index b157b3e..488a01f 100644 --- a/dist/craftui.min.js +++ b/dist/craftui.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.CraftUi={})}(this,function(e){"use strict";var t={install:function(){if("undefined"!=typeof document){var e=document.createElement("div");e.style.display="none",e.innerHTML='\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',document.body.insertBefore(e,document.body.firstChild)}}};var i=function(e,t,i,n,l,c,a,o,s,r){"boolean"!=typeof a&&(s=o,o=a,a=!1);var d,h="function"==typeof i?i.options:i;if(e&&e.render&&(h.render=e.render,h.staticRenderFns=e.staticRenderFns,h._compiled=!0,l&&(h.functional=!0)),n&&(h._scopeId=n),c?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(c)},h._ssrRegister=d):t&&(d=a?function(){t.call(this,r(this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),d)if(h.functional){var u=h.render;h.render=function(e,t){return d.call(t),u(e,t)}}else{var v=h.beforeCreate;h.beforeCreate=v?[].concat(v,d):[d]}return i};var n=i({render:function(){var e,t=this,i=t.$createElement,n=t._self._c||i;return n(t.component,{tag:"component",staticClass:"c-btn",class:[(e={small:t.small,large:t.large,block:t.block,outline:t.outline,loading:t.loading},e[t.kind]=!0,e["c-btn-icon"]=t.icon&&!t.$slots.default,e)],attrs:{to:t.to,href:t.href,target:t.target,type:t.computedType,disabled:t.disabled},on:{click:function(e){return t.$emit("click")}}},[t.loading?[n("spinner")]:t._e(),t._v(" "),n("div",{staticClass:"c-btn-content"},[t.icon&&t.icon.length>0?n("icon",{attrs:{icon:t.icon}}):t._e(),t._v(" "),t._t("default")],2)],2)},staticRenderFns:[]},void 0,{name:"Btn",props:{type:{type:String,default:"button"},kind:{type:String,default:"default"},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},icon:{type:String,default:null},loading:{type:Boolean,default:!1},to:{type:String,default:null},href:{type:String,default:null},target:{type:String,default:null}},computed:{component:function(){return null!==this.to?"router-link":null!==this.href?"a":"button"},computedType:function(){return null!==this.to||null!==this.href?null:this.type}}},void 0,!1,void 0,void 0,void 0);var l=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-checkbox",attrs:{id:e.id,errors:e.errors}},[i("label",[i("input",{attrs:{type:"checkbox",id:e.id,disabled:e.disabled},domProps:{value:e.value,checked:e.state},on:{change:e.onChange}}),e._v("\n\n "+e._s(e.label)+"\n ")])])},staticRenderFns:[]},void 0,{model:{prop:"modelValue",event:"input"},props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-checkbox-id-"+this._uid}},label:{type:String,default:null},modelValue:{default:void 0},value:{type:String|Boolean,default:null}},computed:{state:function(){return void 0===this.modelValue?this.checked:Array.isArray(this.modelValue)?this.modelValue.indexOf(this.value)>-1:!!this.modelValue}},methods:{onChange:function(){this.toggle()},toggle:function(){var e;Array.isArray(this.modelValue)?(e=this.modelValue.slice(0),this.state?e.splice(e.indexOf(this.value),1):e.push(this.value)):e=!this.state,this.$emit("input",e)}},watch:{checked:function(e){e!==this.state&&this.toggle()}},mounted:function(){this.checked&&!this.state&&this.toggle()}},void 0,!1,void 0,void 0,void 0);var c=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"c-field",attrs:{id:"field-"+e.id}},[e.label?i("label",{attrs:{for:e.id}},[e._v(e._s(e.label))]):e._e(),e._v(" "),e.instructions?i("div",{staticClass:"instructions"},[i("p",[e._v(e._s(e.instructions))])]):e._e(),e._v(" "),e._t("default"),e._v(" "),e._l(e.errors,function(t,n){return e.errors?[i("div",{key:n,staticClass:"invalid-feedback"},[e._v(e._s(t))])]:e._e()})],2)},staticRenderFns:[]},void 0,{props:{errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-field-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null}}},void 0,!1,void 0,void 0,void 0);var a=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-dropdown",attrs:{id:e.id+"-label",label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"c-dropdown-input",class:{"is-invalid":e.errors&&e.errors.length>0}},[i("div",{staticClass:"select"},[i("select",{class:{"w-full":e.fullwidth},attrs:{disabled:e.disabled},domProps:{value:e.value},on:{input:function(t){return e.$emit("input",t.target[t.target.selectedIndex].value)}}},e._l(e.options,function(t,n){return i("option",{key:n,domProps:{value:t.value}},[e._v(e._s(t.label))])}),0)])])])},staticRenderFns:[]},void 0,{props:{disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},fullwidth:{type:Boolean,default:!1},id:{type:String,default:function(){return"c-dropdown-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null},options:{type:Array,default:null},value:{type:String|Number,default:null}},components:{Field:c}},void 0,!1,void 0,void 0,void 0);var o=i({render:function(){var e,t=this.$createElement,i=this._self._c||t;return i("svg",{staticClass:"c-icon",class:(e={},e["size-"+this.size]=!0,e),attrs:{viewBox:"0 0 18 18",width:"18",height:"18",role:"presentation"}},[i("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#"+this.icon}})])},staticRenderFns:[]},void 0,{props:{icon:{type:String,default:null},size:{type:String,default:"base"}}},void 0,!1,void 0,void 0,void 0);var s=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-lightswitch",attrs:{id:e.id,label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"c-lightswitch-input"},[i("label",{staticClass:"lightswitch",class:{disabled:e.disabled},attrs:{for:e.id}},[i("input",{attrs:{id:e.id,type:"checkbox",disabled:e.disabled},domProps:{checked:e.checked},on:{change:e.onChange}}),e._v(" "),i("div",{staticClass:"slider round"})])])])},staticRenderFns:[]},void 0,{props:{checked:{type:Boolean,default:null},disabled:{type:Boolean,default:null},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-lightswitch-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null}},components:{Field:c},methods:{onChange:function(e){this.$emit("update:checked",e.target.checked),this.$emit("change",e.target.checked)}}},void 0,!1,void 0,void 0,void 0);var r=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-radio",attrs:{id:e.id,errors:e.errors}},[i("label",[i("input",{attrs:{type:"radio",id:e.id,disabled:e.disabled},domProps:{value:e.value,checked:e.state},on:{change:e.onChange}}),e._v("\n\n "+e._s(e.label)+"\n ")])])},staticRenderFns:[]},void 0,{model:{prop:"modelValue",event:"input"},props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-radio-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null},modelValue:{default:void 0},value:{default:""}},computed:{state:function(){return void 0===this.modelValue?this.checked:this.modelValue===this.value}},methods:{onChange:function(){this.toggle()},toggle:function(){this.$emit("input",this.state?"":this.value)}},watch:{checked:function(e){e!==this.state&&this.toggle()}},mounted:function(){this.checked&&!this.state&&this.toggle()}},void 0,!1,void 0,void 0,void 0);var d=i({render:function(){var e,t=this.$createElement,i=this._self._c||t;return i("div",{staticClass:"c-spinner",class:(e={},e[this.size]=!0,e)},[i("div",{staticClass:"animation"})])},staticRenderFns:[]},void 0,{props:{size:{type:String,default:"base"}}},void 0,!1,void 0,void 0,void 0);function h(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0;e=e||"",t=t||"";for(var l=0,c=0,a="";l2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?function(e,t,i){return t=t.sort(function(e,t){return e.length-t.length}),function(n,l){for(var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=0;ao.length))return e(n,o,c,i)}return""}}(h,t,n)(e,t,i,n):h(e,t,i,n)}var v={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleLowerCase()}},"!":{escape:!0}};function p(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var m={Btn:n,Checkbox:l,Dropdown:a,Field:c,Icon:o,Lightswitch:s,Radio:r,Spinner:d,Textbox:i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-textbox",attrs:{id:e.id,label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"wrapper"},[i(e.computedComponent,{directives:[{name:"mask",rawName:"v-mask",value:e.mask,expression:"mask"}],ref:"input",tag:"component",class:{"w-full":!e.size,"is-invalid":e.errors&&e.errors.length>0,"text-red-dark":e.max&&e.max=20,"text-orange":e.remainingChars<20&&e.remainingChars>=0,"text-red":e.remainingChars<0}},[i("small",[e._v(e._s(e.max-e.remainingChars)+"/"+e._s(e.max))])]):e._e()],1)])},staticRenderFns:[]},void 0,{directives:{mask:{bind:function(e,t,i){if(i.context.mask)return function(e,t){var i=t.value;if((Array.isArray(i)||"string"==typeof i)&&(i={mask:i,tokens:v}),"INPUT"!==e.tagName.toLocaleUpperCase()){var n=e.getElementsByTagName("input");if(1!==n.length)throw new Error("v-mask directive requires 1 input, found "+n.length);e=n[0]}e.oninput=function(t){if(t.isTrusted){var n=e.selectionEnd,l=e.value[n-1];for(e.value=u(e.value,i.mask,!0,i.tokens);n\n\n \n Angle Double Left\n \n \n \n Angle Double Right\n \n \n \n angle-left\n \n \n \n angle-right\n \n \n \n Bars\n \n \n \n book\n \n \n \n Check\n \n \n \n Check Circle\n \n \n \n Chevron Left\n \n \n \n Chevron Right\n \n \n \n Copy\n \n \n \n Exclamation Circle\n \n \n \n Exclamation Triangle\n \n \n \n Glass Martini\n \n \n \n Handshake\n \n \n \n Heart\n \n \n \n Line Lightbulb\n \n \n \n Line Heart\n \n \n \n Image\n \n \n \n Info Circle\n \n \n \n key\n \n \n \n Line Check Circle\n \n \n \n Line Exclamation Circle\n \n \n \n Line Exclamation Triangle\n \n \n \n Line Info Circle\n \n \n \n Link\n \n \n \n Pencil\n \n \n \n Plug\n \n \n \n plus\n \n \n \n Search\n \n \n \n shopping-cart\n \n \n \n Sort Amount Down\n \n \n \n Sort Amount Up\n \n \n \n th\n \n \n \n Times\n \n \n \n User\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',document.body.insertBefore(e,document.body.firstChild)}}};var i=function(e,t,i,n,l,c,a,o,s,r){"boolean"!=typeof a&&(s=o,o=a,a=!1);var d,h="function"==typeof i?i.options:i;if(e&&e.render&&(h.render=e.render,h.staticRenderFns=e.staticRenderFns,h._compiled=!0,l&&(h.functional=!0)),n&&(h._scopeId=n),c?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(c)},h._ssrRegister=d):t&&(d=a?function(){t.call(this,r(this.$root.$options.shadowRoot))}:function(e){t.call(this,o(e))}),d)if(h.functional){var u=h.render;h.render=function(e,t){return d.call(t),u(e,t)}}else{var v=h.beforeCreate;h.beforeCreate=v?[].concat(v,d):[d]}return i};var n=i({render:function(){var e,t=this,i=t.$createElement,n=t._self._c||i;return n(t.component,{tag:"component",staticClass:"c-btn",class:[(e={small:t.small,large:t.large,block:t.block,outline:t.outline,loading:t.loading},e[t.kind]=!0,e["c-btn-icon"]=t.icon&&!t.$slots.default,e)],attrs:{to:t.to,href:t.href,target:t.target,type:t.computedType,disabled:t.disabled},on:{click:function(e){return t.$emit("click")}}},[t.loading?[n("spinner")]:t._e(),t._v(" "),n("div",{staticClass:"c-btn-content"},[t.icon&&t.icon.length>0?n("icon",{attrs:{icon:t.icon}}):t._e(),t._v(" "),t._t("default")],2)],2)},staticRenderFns:[]},void 0,{name:"Btn",props:{type:{type:String,default:"button"},kind:{type:String,default:"default"},small:{type:Boolean,default:!1},large:{type:Boolean,default:!1},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},outline:{type:Boolean,default:!1},icon:{type:String,default:null},loading:{type:Boolean,default:!1},to:{type:String,default:null},href:{type:String,default:null},target:{type:String,default:null}},computed:{component:function(){return null!==this.to?"router-link":null!==this.href?"a":"button"},computedType:function(){return null!==this.to||null!==this.href?null:this.type}}},void 0,!1,void 0,void 0,void 0);var l=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-checkbox",attrs:{id:e.id,errors:e.errors}},[i("label",[i("input",{attrs:{type:"checkbox",id:e.id,disabled:e.disabled},domProps:{value:e.value,checked:e.state},on:{change:e.onChange}}),e._v("\n\n "+e._s(e.label)+"\n ")])])},staticRenderFns:[]},void 0,{model:{prop:"modelValue",event:"input"},props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-checkbox-id-"+this._uid}},label:{type:String,default:null},modelValue:{default:void 0},value:{type:String|Boolean,default:null}},computed:{state:function(){return void 0===this.modelValue?this.checked:Array.isArray(this.modelValue)?this.modelValue.indexOf(this.value)>-1:!!this.modelValue}},methods:{onChange:function(){this.toggle()},toggle:function(){var e;Array.isArray(this.modelValue)?(e=this.modelValue.slice(0),this.state?e.splice(e.indexOf(this.value),1):e.push(this.value)):e=!this.state,this.$emit("input",e)}},watch:{checked:function(e){e!==this.state&&this.toggle()}},mounted:function(){this.checked&&!this.state&&this.toggle()}},void 0,!1,void 0,void 0,void 0);var c=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"c-field",attrs:{id:"field-"+e.id}},[e.label?i("label",{attrs:{for:e.id}},[e._v(e._s(e.label))]):e._e(),e._v(" "),e.instructions?i("div",{staticClass:"instructions"},[i("p",[e._v(e._s(e.instructions))])]):e._e(),e._v(" "),e._t("default"),e._v(" "),e._l(e.errors,function(t,n){return e.errors?[i("div",{key:n,staticClass:"invalid-feedback"},[e._v(e._s(t))])]:e._e()})],2)},staticRenderFns:[]},void 0,{props:{errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-field-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null}}},void 0,!1,void 0,void 0,void 0);var a=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-dropdown",attrs:{id:e.id+"-label",label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"c-dropdown-input",class:{"is-invalid":e.errors&&e.errors.length>0}},[i("div",{staticClass:"select"},[i("select",{class:{"w-full":e.fullwidth},attrs:{disabled:e.disabled},domProps:{value:e.value},on:{input:function(t){return e.$emit("input",t.target[t.target.selectedIndex].value)}}},e._l(e.options,function(t,n){return i("option",{key:n,domProps:{value:t.value}},[e._v(e._s(t.label))])}),0)])])])},staticRenderFns:[]},void 0,{props:{disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},fullwidth:{type:Boolean,default:!1},id:{type:String,default:function(){return"c-dropdown-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null},options:{type:Array,default:null},value:{type:String|Number,default:null}},components:{Field:c}},void 0,!1,void 0,void 0,void 0);var o=i({render:function(){var e,t=this.$createElement,i=this._self._c||t;return i("svg",{staticClass:"c-icon",class:(e={},e["size-"+this.size]=!0,e),attrs:{viewBox:"0 0 18 18",width:"18",height:"18",role:"presentation"}},[i("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#"+this.icon}})])},staticRenderFns:[]},void 0,{props:{icon:{type:String,default:null},size:{type:String,default:"base"}}},void 0,!1,void 0,void 0,void 0);var s=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-lightswitch",attrs:{id:e.id,label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"c-lightswitch-input"},[i("label",{staticClass:"lightswitch",class:{disabled:e.disabled},attrs:{for:e.id}},[i("input",{attrs:{id:e.id,type:"checkbox",disabled:e.disabled},domProps:{checked:e.checked},on:{change:e.onChange}}),e._v(" "),i("div",{staticClass:"slider round"})])])])},staticRenderFns:[]},void 0,{props:{checked:{type:Boolean,default:null},disabled:{type:Boolean,default:null},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-lightswitch-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null}},components:{Field:c},methods:{onChange:function(e){this.$emit("update:checked",e.target.checked),this.$emit("change",e.target.checked)}}},void 0,!1,void 0,void 0,void 0);var r=i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-radio",attrs:{id:e.id,errors:e.errors}},[i("label",[i("input",{attrs:{type:"radio",id:e.id,disabled:e.disabled},domProps:{value:e.value,checked:e.state},on:{change:e.onChange}}),e._v("\n\n "+e._s(e.label)+"\n ")])])},staticRenderFns:[]},void 0,{model:{prop:"modelValue",event:"input"},props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},errors:{type:Array|Boolean,default:null},id:{type:String,default:function(){return"c-radio-id-"+this._uid}},instructions:{type:String,default:null},label:{type:String,default:null},modelValue:{default:void 0},value:{default:""}},computed:{state:function(){return void 0===this.modelValue?this.checked:this.modelValue===this.value}},methods:{onChange:function(){this.toggle()},toggle:function(){this.$emit("input",this.state?"":this.value)}},watch:{checked:function(e){e!==this.state&&this.toggle()}},mounted:function(){this.checked&&!this.state&&this.toggle()}},void 0,!1,void 0,void 0,void 0);var d=i({render:function(){var e,t=this.$createElement,i=this._self._c||t;return i("div",{staticClass:"c-spinner",class:(e={},e[this.size]=!0,e)},[i("div",{staticClass:"animation"})])},staticRenderFns:[]},void 0,{props:{size:{type:String,default:"base"}}},void 0,!1,void 0,void 0,void 0);function h(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0;e=e||"",t=t||"";for(var l=0,c=0,a="";l2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?function(e,t,i){return t=t.sort(function(e,t){return e.length-t.length}),function(n,l){for(var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=0;ao.length))return e(n,o,c,i)}return""}}(h,t,n)(e,t,i,n):h(e,t,i,n)}var v={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleLowerCase()}},"!":{escape:!0}};function p(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var m={Btn:n,Checkbox:l,Dropdown:a,Field:c,Icon:o,Lightswitch:s,Radio:r,Spinner:d,Textbox:i({render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("field",{staticClass:"c-textbox",attrs:{id:e.id,label:e.label,instructions:e.instructions,errors:e.errors}},[i("div",{staticClass:"wrapper"},[i(e.computedComponent,{directives:[{name:"mask",rawName:"v-mask",value:e.mask,expression:"mask"}],ref:"input",tag:"component",class:{"w-full":!e.size,"is-invalid":e.errors&&e.errors.length>0,"text-red-dark":e.max&&e.max=20,"text-orange":e.remainingChars<20&&e.remainingChars>=0,"text-red":e.remainingChars<0}},[i("small",[e._v(e._s(e.max-e.remainingChars)+"/"+e._s(e.max))])]):e._e()],1)])},staticRenderFns:[]},void 0,{directives:{mask:{bind:function(e,t,i){if(i.context.mask)return function(e,t){var i=t.value;if((Array.isArray(i)||"string"==typeof i)&&(i={mask:i,tokens:v}),"INPUT"!==e.tagName.toLocaleUpperCase()){var n=e.getElementsByTagName("input");if(1!==n.length)throw new Error("v-mask directive requires 1 input, found "+n.length);e=n[0]}e.oninput=function(t){if(t.isTrusted){var n=e.selectionEnd,l=e.value[n-1];for(e.value=u(e.value,i.mask,!0,i.tokens);n a.length - b.length)\n return function (value, mask, masked = true) {\n var i = 0\n while (i < masks.length) {\n var currentMask = masks[i]\n i++\n var nextMask = masks[i]\n if (! (nextMask && maskit(value, nextMask, true, tokens).length > currentMask.length) ) {\n return maskit(value, currentMask, masked, tokens)\n }\n }\n return '' // empty masks\n }\n}\n","module.exports = {\n '#': {pattern: /\\d/},\n 'X': {pattern: /[0-9a-zA-Z]/},\n 'S': {pattern: /[a-zA-Z]/},\n 'A': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleUpperCase()},\n 'a': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleLowerCase()},\n '!': {escape: true}\n}\n\n// https://github.com/fernandofleury/vanilla-masker/blob/master/lib/vanilla-masker.js\n// DIGIT = \"9\",\n// ALPHA = \"A\",\n// ALPHANUM = \"S\"\n\n// https://github.com/niksmr/vue-masked-input\n// 1 - number\n// a - letter\n// A - letter, forced to upper case when entered\n// * - alphanumeric\n// # - alphanumeric, forced to upper case when entered\n// + - any character\n\n// https://github.com/probil/v-mask\n// #\tNumber (0-9)\n// A\tLetter in any case (a-z,A-Z)\n// N\tNumber or letter\n// X\tAny symbol\n\n// https://github.com/igorescobar/jQuery-Mask-Plugin/blob/master/src/jquery.mask.js#L518\n// '0': {pattern: /\\d/},\n// '9': {pattern: /\\d/, optional: true},\n// '#': {pattern: /\\d/, recursive: true},\n// 'A': {pattern: /[a-zA-Z0-9]/},\n// 'S': {pattern: /[a-zA-Z]/}\n\n// https://github.com/the-darc/string-mask\n// 0\tAny numbers\n// 9\tAny numbers (Optional)\n// #\tAny numbers (recursive)\n// A\tAny alphanumeric character\n// a\tAny alphanumeric character (Optional) Not implemented yet\n// S\tAny letter\n// U\tAny letter (All lower case character will be mapped to uppercase)\n// L\tAny letter (All upper case character will be mapped to lowercase)\n// $\tEscape character, used to escape any of the special formatting characters.\n","import masker from './masker'\nimport tokens from './tokens'\n\n// https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events#The_old-fashioned_way\nfunction event (name) {\n var evt = document.createEvent('Event')\n evt.initEvent(name, true, true)\n return evt\n}\n\nexport default function (el, binding) {\n var config = binding.value\n if (Array.isArray(config) || typeof config === 'string') {\n config = {\n mask: config,\n tokens: tokens\n }\n }\n\n if (el.tagName.toLocaleUpperCase() !== 'INPUT') {\n var els = el.getElementsByTagName('input')\n if (els.length !== 1) {\n throw new Error(\"v-mask directive requires 1 input, found \" + els.length)\n } else {\n el = els[0]\n }\n }\n\n el.oninput = function (evt) {\n if (!evt.isTrusted) return // avoid infinite loop\n /* other properties to try to diferentiate InputEvent of Event (custom)\n InputEvent (native)\n cancelable: false\n isTrusted: true\n\n composed: true\n isComposing: false\n which: 0\n\n Event (custom)\n cancelable: true\n isTrusted: false\n */\n // by default, keep cursor at same position as before the mask\n var position = el.selectionEnd\n // save the character just inserted\n var digit = el.value[position-1]\n el.value = masker(el.value, config.mask, true, config.tokens)\n // if the digit was changed, increment position until find the digit again\n while (position < el.value.length && el.value.charAt(position-1) !== digit) {\n position++\n }\n if (el === document.activeElement) {\n el.setSelectionRange(position, position)\n setTimeout(function () {\n el.setSelectionRange(position, position)\n }, 0)\n }\n el.dispatchEvent(event('input'))\n }\n\n var newDisplay = masker(el.value, config.mask, true, config.tokens)\n if (newDisplay !== el.value) {\n el.value = newDisplay\n el.dispatchEvent(event('input'))\n }\n}\n","import Btn from './Btn.vue';\nimport Checkbox from './Checkbox.vue';\nimport Dropdown from './Dropdown.vue';\nimport Field from './Field.vue';\nimport Icon from './Icon.vue';\nimport Lightswitch from './Lightswitch.vue';\nimport Radio from './Radio.vue';\nimport Spinner from './Spinner.vue';\nimport Textbox from './Textbox.vue';\n\nconst CraftComponents = {\n Btn,\n Checkbox,\n Dropdown,\n Field,\n Icon,\n Lightswitch,\n Radio,\n Spinner,\n Textbox,\n};\n\nexport default CraftComponents;","import CraftIcons from './plugins/icons'\nimport CraftComponents from './components'\n\nimport './sass/styles.scss'\n\nexport default {\n install(Vue) {\n Vue.use(CraftIcons)\n\n // Craft Components\n Object.keys(CraftComponents).forEach(name => {\n Vue.component(name, CraftComponents[name])\n })\n }\n}\n"],"names":["install","document","iconsWrapper","createElement","style","display","innerHTML","body","insertBefore","firstChild","maskit","value","mask","masked","tokens","iMask","iValue","output","length","masker","cMask","cValue","escape","pattern","test","transform","restOutput","Array","isArray","masks","sort","a","b","i","currentMask","nextMask","dynamicMask","module","v","toLocaleUpperCase","toLocaleLowerCase","event","name","evt","createEvent","initEvent","CraftComponents","Btn","Checkbox","Dropdown","Field","Icon","Lightswitch","Radio","Spinner","Textbox","el","binding","config","tagName","els","getElementsByTagName","Error","oninput","isTrusted","position","selectionEnd","digit","charAt","activeElement","setSelectionRange","setTimeout","dispatchEvent","newDisplay","Vue","use","CraftIcons","Object","keys","forEach","component"],"mappings":"gMAEe,CACXA,sBAC2B,oBAAbC,SAAyB,KACzBC,EAAeD,SAASE,cAAc,OAC5CD,EAAaE,MAAMC,QAAU,OAC7BH,EAAaI,+i0BACbL,SAASM,KAAKC,aAAaN,EAAcD,SAASM,KAAKE,52wDCRpD,SAASC,EAAQC,EAAOC,OAAMC,6DAAeC,yCAC1DH,EAAQA,GAAS,GACjBC,EAAOA,GAAQ,WACXG,EAAQ,EACRC,EAAS,EACTC,EAAS,GACNF,EAAQH,EAAKM,QAAUF,EAASL,EAAMO,QAAQ,KAE/CC,EAASL,EADTM,EAAQR,EAAKG,IAEbM,EAASV,EAAMK,GACfG,IAAWA,EAAOG,QAChBH,EAAOI,QAAQC,KAAKH,KACvBJ,GAAUE,EAAOM,UAAYN,EAAOM,UAAUJ,GAAUA,EACvDN,KAEFC,MAEIG,GAAUA,EAAOG,SAEnBF,EAAQR,IADRG,IAGEF,IAAQI,GAAUG,GAClBC,IAAWD,GAAOJ,IACtBD,aAKAW,EAAa,GACVX,EAAQH,EAA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AI1C,aACA,IAAI4C,MAAM,4CAA8CF,EAAI1C,QAElEsC,EAAKI,EAAI,GAIbJ,EAAGO,QAAU,SAAUpB,MAChBA,EAAIqB,eAeLC,EAAWT,EAAGU,aAEdC,EAAQX,EAAG7C,MAAMsD,EAAS,OAC9BT,EAAG7C,MAAQQ,EAAOqC,EAAG7C,MAAO+C,EAAO9C,MAAM,EAAM8C,EAAO5C,QAE/CmD,EAAWT,EAAG7C,MAAMO,QAAUsC,EAAG7C,MAAMyD,OAAOH,EAAS,KAAOE,GACnEF,IAEET,IAAOvD,SAASoE,gBAClBb,EAAGc,kBAAkBL,EAAUA,GAC/BM,WAAW,WACTf,EAAGc,kBAAkBL,EAAUA,IAC9B,IAELT,EAAGgB,cAAc/B,EAAM,gBAGrBgC,EAAatD,EAAOqC,EAAG7C,MAAO+C,EAAO9C,MAAM,EAAM8C,EAAO5C,QACxD2D,IAAejB,EAAG7C,QACpB6C,EAAG7C,MAAQ8D,EACXjB,EAAGgB,cAAc/B,EAAM,42CE3DZ,CACXzC,iBAAQ0E,GACJA,EAAIC,IAAIC,GAGRC,OAAOC,KAAKhC,GAAiBiC,QAAQ,SAAArC,GACjCgC,EAAIM,UAAUtC,EAAMI,EAAgBJ"} \ No newline at end of file +{"version":3,"file":"craftui.min.js","sources":["../src/plugins/icons.js","../node_modules/vue-the-mask/src/maskit.js","../node_modules/vue-the-mask/src/masker.js","../node_modules/vue-the-mask/src/dynamic-mask.js","../node_modules/vue-the-mask/src/tokens.js","../node_modules/vue-the-mask/src/directive.js","../src/components/index.js","../src/index.js"],"sourcesContent":["import iconsSvg from '../sprites/icons.svg'\n\nexport default {\n install () {\n if(typeof document !== 'undefined'){\n const iconsWrapper = document.createElement('div')\n iconsWrapper.style.display = 'none'\n iconsWrapper.innerHTML = iconsSvg\n document.body.insertBefore(iconsWrapper, document.body.firstChild)\n }\n },\n}","export default function maskit (value, mask, masked = true, tokens) {\n value = value || ''\n mask = mask || ''\n var iMask = 0\n var iValue = 0\n var output = ''\n while (iMask < mask.length && iValue < value.length) {\n var cMask = mask[iMask]\n var masker = tokens[cMask]\n var cValue = value[iValue]\n if (masker && !masker.escape) {\n if (masker.pattern.test(cValue)) {\n \toutput += masker.transform ? masker.transform(cValue) : cValue\n iMask++\n }\n iValue++\n } else {\n if (masker && masker.escape) {\n iMask++ // take the next mask char and treat it as char\n cMask = mask[iMask]\n }\n if (masked) output += cMask\n if (cValue === cMask) iValue++ // user typed the same char\n iMask++\n }\n }\n\n // fix mask that ends with a char: (#)\n var restOutput = ''\n while (iMask < mask.length && masked) {\n var cMask = mask[iMask]\n if (tokens[cMask]) {\n restOutput = ''\n break\n }\n restOutput += cMask\n iMask++\n }\n\n return output + restOutput\n}\n","import maskit from './maskit'\nimport dynamicMask from './dynamic-mask'\n// Facade to maskit/dynamicMask when mask is String or Array\nexport default function (value, mask, masked = true, tokens) {\n return Array.isArray(mask)\n ? dynamicMask(maskit, mask, tokens)(value, mask, masked, tokens)\n : maskit(value, mask, masked, tokens)\n}\n","export default function dynamicMask (maskit, masks, tokens) {\n masks = masks.sort((a, b) => a.length - b.length)\n return function (value, mask, masked = true) {\n var i = 0\n while (i < masks.length) {\n var currentMask = masks[i]\n i++\n var nextMask = masks[i]\n if (! (nextMask && maskit(value, nextMask, true, tokens).length > currentMask.length) ) {\n return maskit(value, currentMask, masked, tokens)\n }\n }\n return '' // empty masks\n }\n}\n","module.exports = {\n '#': {pattern: /\\d/},\n 'X': {pattern: /[0-9a-zA-Z]/},\n 'S': {pattern: /[a-zA-Z]/},\n 'A': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleUpperCase()},\n 'a': {pattern: /[a-zA-Z]/, transform: v => v.toLocaleLowerCase()},\n '!': {escape: true}\n}\n\n// https://github.com/fernandofleury/vanilla-masker/blob/master/lib/vanilla-masker.js\n// DIGIT = \"9\",\n// ALPHA = \"A\",\n// ALPHANUM = \"S\"\n\n// https://github.com/niksmr/vue-masked-input\n// 1 - number\n// a - letter\n// A - letter, forced to upper case when entered\n// * - alphanumeric\n// # - alphanumeric, forced to upper case when entered\n// + - any character\n\n// https://github.com/probil/v-mask\n// #\tNumber (0-9)\n// A\tLetter in any case (a-z,A-Z)\n// N\tNumber or letter\n// X\tAny symbol\n\n// https://github.com/igorescobar/jQuery-Mask-Plugin/blob/master/src/jquery.mask.js#L518\n// '0': {pattern: /\\d/},\n// '9': {pattern: /\\d/, optional: true},\n// '#': {pattern: /\\d/, recursive: true},\n// 'A': {pattern: /[a-zA-Z0-9]/},\n// 'S': {pattern: /[a-zA-Z]/}\n\n// https://github.com/the-darc/string-mask\n// 0\tAny numbers\n// 9\tAny numbers (Optional)\n// #\tAny numbers (recursive)\n// A\tAny alphanumeric character\n// a\tAny alphanumeric character (Optional) Not implemented yet\n// S\tAny letter\n// U\tAny letter (All lower case character will be mapped to uppercase)\n// L\tAny letter (All upper case character will be mapped to lowercase)\n// $\tEscape character, used to escape any of the special formatting characters.\n","import masker from './masker'\nimport tokens from './tokens'\n\n// https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events#The_old-fashioned_way\nfunction event (name) {\n var evt = document.createEvent('Event')\n evt.initEvent(name, true, true)\n return evt\n}\n\nexport default function (el, binding) {\n var config = binding.value\n if (Array.isArray(config) || typeof config === 'string') {\n config = {\n mask: config,\n tokens: tokens\n }\n }\n\n if (el.tagName.toLocaleUpperCase() !== 'INPUT') {\n var els = el.getElementsByTagName('input')\n if (els.length !== 1) {\n throw new Error(\"v-mask directive requires 1 input, found \" + els.length)\n } else {\n el = els[0]\n }\n }\n\n el.oninput = function (evt) {\n if (!evt.isTrusted) return // avoid infinite loop\n /* other properties to try to diferentiate InputEvent of Event (custom)\n InputEvent (native)\n cancelable: false\n isTrusted: true\n\n composed: true\n isComposing: false\n which: 0\n\n Event (custom)\n cancelable: true\n isTrusted: false\n */\n // by default, keep cursor at same position as before the mask\n var position = el.selectionEnd\n // save the character just inserted\n var digit = el.value[position-1]\n el.value = masker(el.value, config.mask, true, config.tokens)\n // if the digit was changed, increment position until find the digit again\n while (position < el.value.length && el.value.charAt(position-1) !== digit) {\n position++\n }\n if (el === document.activeElement) {\n el.setSelectionRange(position, position)\n setTimeout(function () {\n el.setSelectionRange(position, position)\n }, 0)\n }\n el.dispatchEvent(event('input'))\n }\n\n var newDisplay = masker(el.value, config.mask, true, config.tokens)\n if (newDisplay !== el.value) {\n el.value = newDisplay\n el.dispatchEvent(event('input'))\n }\n}\n","import Btn from './Btn.vue';\nimport Checkbox from './Checkbox.vue';\nimport Dropdown from './Dropdown.vue';\nimport Field from './Field.vue';\nimport Icon from './Icon.vue';\nimport Lightswitch from './Lightswitch.vue';\nimport Radio from './Radio.vue';\nimport Spinner from './Spinner.vue';\nimport Textbox from './Textbox.vue';\n\nconst CraftComponents = {\n Btn,\n Checkbox,\n Dropdown,\n Field,\n Icon,\n Lightswitch,\n Radio,\n Spinner,\n Textbox,\n};\n\nexport default CraftComponents;","import CraftIcons from './plugins/icons'\nimport CraftComponents from './components'\n\nimport './sass/styles.scss'\n\nexport default {\n install(Vue) {\n Vue.use(CraftIcons)\n\n // Craft Components\n Object.keys(CraftComponents).forEach(name => {\n Vue.component(name, CraftComponents[name])\n })\n }\n}\n"],"names":["install","document","iconsWrapper","createElement","style","display","innerHTML","body","insertBefore","firstChild","maskit","value","mask","masked","tokens","iMask","iValue","output","length","masker","cMask","cValue","escape","pattern","test","transform","restOutput","Array","isArray","masks","sort","a","b","i","currentMask","nextMask","dynamicMask","module","v","toLocaleUpperCase","toLocaleLowerCase","event","name","evt","createEvent","initEvent","CraftComponents","Btn","Checkbox","Dropdown","Field","Icon","Lightswitch","Radio","Spinner","Textbox","el","binding","config","tagName","els","getElementsByTagName","Error","oninput","isTrusted","position","selectionEnd","digit","charAt","activeElement","setSelectionRange","setTimeout","dispatchEvent","newDisplay","Vue","use","CraftIcons","Object","keys","forEach","component"],"mappings":"gMAEe,CACXA,sBAC2B,oBAAbC,SAAyB,KACzBC,EAAeD,SAASE,cAAc,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IC,IAAIC,GAGRC,OAAOC,KAAKhC,GAAiBiC,QAAQ,SAAArC,GACjCgC,EAAIM,UAAUtC,EAAMI,EAAgBJ"} \ No newline at end of file diff --git a/src/sprites/icons.js b/src/sprites/icons.js index 256ea5d..d9f7c92 100644 --- a/src/sprites/icons.js +++ b/src/sprites/icons.js @@ -7,6 +7,8 @@ export default [ 'book', 'check', 'check-circle', + 'chevron-left', + 'chevron-right', 'copy', 'exclamation-circle', 'exclamation-triangle', diff --git a/src/sprites/icons.svg b/src/sprites/icons.svg index 1bcbdc6..a69a660 100644 --- a/src/sprites/icons.svg +++ b/src/sprites/icons.svg @@ -32,6 +32,14 @@ Check Circle + + Chevron Left + + + + Chevron Right + + Copy @@ -171,6 +179,8 @@ + + @@ -206,4 +216,6 @@ + + From 3433cbe3103a13a895f872fc36c64e581aa0aba5 Mon Sep 17 00:00:00 2001 From: Benjamin David Date: Mon, 6 May 2019 17:22:13 +0200 Subject: [PATCH 2/2] Craft UI 0.3.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23cb70a..f405ac6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pixelandtonic/craftui", - "version": "0.3.5", + "version": "0.3.6", "main": "dist/craftui.js", "unpkg": "dist/craftui.min.js", "module": "dist/craftui.es.js",