├── src ├── helper │ ├── _index.styl │ ├── no.styl │ └── add.styl ├── core │ ├── _index.styl │ ├── typography.styl │ ├── defaults.styl │ └── normalize.styl ├── grid │ ├── _index.styl │ ├── row.styl │ ├── container.styl │ ├── grid.styl │ └── column.styl ├── util │ ├── _index.styl │ ├── colors.styl │ ├── mixins.styl │ ├── functions.styl │ ├── variables.styl │ └── elements-mixins.styl └── components │ ├── radio.styl │ ├── breadcrumb.styl │ ├── icon.styl │ ├── form.styl │ ├── file.styl │ ├── _index.styl │ ├── textarea.styl │ ├── calendar.styl │ ├── datepicker.styl │ ├── tabs.styl │ ├── pagination.styl │ ├── alert.styl │ ├── input.styl │ ├── avatar.styl │ ├── input-icons.styl │ ├── loading.styl │ ├── dropdown.styl │ ├── progress.styl │ ├── input-group.styl │ ├── label.styl │ ├── input-tag.styl │ ├── accordion.styl │ ├── checkbox.styl │ ├── buttons.styl │ ├── navbar.styl │ ├── switcher.styl │ ├── modal.styl │ ├── slider.styl │ ├── tooltip.styl │ ├── nav.styl │ ├── table.styl │ ├── button.styl │ └── select.styl ├── .eslintrc ├── .npmignore ├── extensions ├── .npmignore ├── _utils │ ├── async.js │ ├── call.js │ ├── stringToDOM.js │ ├── hide.js │ ├── show.js │ ├── select.js │ ├── getClosestValue.js │ ├── wrap.js │ ├── isElementClosest.js │ ├── throttle.js │ ├── debounce.js │ └── toArray.js ├── datepicker │ ├── .npmignore │ ├── yarn.lock │ ├── package.json │ ├── index.html │ ├── README.md │ └── src │ │ └── datepicker.js ├── slider │ ├── package.json │ ├── yarn.lock │ ├── README.md │ ├── index.html │ └── src │ │ └── slider.js ├── switcher │ ├── package.json │ ├── README.md │ ├── src │ │ └── switcher.js │ └── index.html ├── table │ ├── package.json │ ├── src │ │ ├── sortable.js │ │ ├── paginator.js │ │ └── table.js │ ├── index.html │ └── README.md ├── navbar │ ├── package.json │ ├── index.html │ ├── README.md │ └── src │ │ └── navbar.js ├── modal │ ├── package.json │ ├── src │ │ └── modal.js │ ├── README.md │ └── index.html ├── package.json ├── select │ ├── package.json │ ├── README.md │ ├── index.html │ └── src │ │ └── select.js ├── accordion │ ├── package.json │ ├── README.md │ ├── src │ │ └── accordion.js │ └── index.html ├── dropdown │ ├── package.json │ ├── src │ │ └── dropdown.js │ ├── README.md │ └── index.html └── README.md ├── blexar.styl ├── .gitignore ├── .babelrc ├── scripts ├── watcher.js ├── config.js ├── styles.js └── extensions.js ├── LICENSE ├── README.md └── package.json /src/helper/_index.styl: -------------------------------------------------------------------------------- 1 | @import 'add' 2 | @import 'no' -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "standard" 4 | ] 5 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | Icon 3 | node_modules 4 | /test 5 | yarn.lock 6 | extensions -------------------------------------------------------------------------------- /src/core/_index.styl: -------------------------------------------------------------------------------- 1 | @import 'normalize' 2 | @import 'typography' 3 | @import 'defaults' 4 | 5 | -------------------------------------------------------------------------------- /src/grid/_index.styl: -------------------------------------------------------------------------------- 1 | @import 'container' 2 | @import 'column' 3 | @import 'grid' 4 | @import 'row' -------------------------------------------------------------------------------- /src/grid/row.styl: -------------------------------------------------------------------------------- 1 | .row 2 | @extends .grid 3 | width: 100% 4 | justify-content: inherit 5 | margin: 0 6 | -------------------------------------------------------------------------------- /extensions/.npmignore: -------------------------------------------------------------------------------- 1 | .* 2 | Icon/r 3 | node_modules 4 | */**/node_modules 5 | yarn.lock 6 | */**/src 7 | */**/index.html 8 | _utils -------------------------------------------------------------------------------- /extensions/_utils/async.js: -------------------------------------------------------------------------------- 1 | export default function async (callback) { 2 | setTimeout(() => callback(), 1000 / 60); 3 | } 4 | -------------------------------------------------------------------------------- /src/util/_index.styl: -------------------------------------------------------------------------------- 1 | @import 'functions' 2 | @import 'variables' 3 | @import 'colors' 4 | @import 'mixins' 5 | @import 'elements-mixins' 6 | 7 | -------------------------------------------------------------------------------- /extensions/datepicker/.npmignore: -------------------------------------------------------------------------------- 1 | /build 2 | /docs 3 | /src/stylus 4 | /static 5 | .eslintrc.json 6 | .gitignore 7 | yarn.lock 8 | gulpfile.js 9 | node_modules -------------------------------------------------------------------------------- /extensions/_utils/call.js: -------------------------------------------------------------------------------- 1 | export default function call (func, args = null) { 2 | if (typeof func === 'function') { 3 | func(args); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /extensions/_utils/stringToDOM.js: -------------------------------------------------------------------------------- 1 | export default function stringToDOM (string) { 2 | return document.createRange().createContextualFragment(string).firstElementChild; 3 | } 4 | -------------------------------------------------------------------------------- /blexar.styl: -------------------------------------------------------------------------------- 1 | /** 2 | * core 3 | */ 4 | @import 'src/util/_index' 5 | @import 'src/core/_index' 6 | @import 'src/grid/_index' 7 | @import 'src/components/_index' 8 | @import 'src/helper/_index' 9 | -------------------------------------------------------------------------------- /extensions/_utils/hide.js: -------------------------------------------------------------------------------- 1 | export default function hide (el) { 2 | el.classList.remove('is-visible'); 3 | el.classList.add('is-hidden'); 4 | el.setAttribute('aria-hidden', 'true'); 5 | } 6 | -------------------------------------------------------------------------------- /extensions/_utils/show.js: -------------------------------------------------------------------------------- 1 | export default function show (el) { 2 | el.classList.add('is-visible'); 3 | el.classList.remove('is-hidden'); 4 | el.setAttribute('aria-hidden', 'false'); 5 | } 6 | -------------------------------------------------------------------------------- /extensions/_utils/select.js: -------------------------------------------------------------------------------- 1 | export default function select (element) { 2 | if (typeof element === 'string') { 3 | return document.querySelector(element); 4 | } 5 | return element; 6 | } 7 | -------------------------------------------------------------------------------- /extensions/_utils/getClosestValue.js: -------------------------------------------------------------------------------- 1 | export default function getClosestValue (array, value) { 2 | return array.reduce((prev, curr) => { 3 | return Math.abs(curr - value) < Math.abs(prev - value) ? curr : prev 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /extensions/_utils/wrap.js: -------------------------------------------------------------------------------- 1 | export default function wrap (el, wrapper) { 2 | // insert wrapper before el in the DOM tree 3 | el.parentNode.insertBefore(wrapper, el); 4 | 5 | // move el into wrapper 6 | wrapper.appendChild(el); 7 | } 8 | -------------------------------------------------------------------------------- /extensions/slider/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/slider", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "dist/slider.js", 6 | "module": "dist/slider.esm.js", 7 | "keywords": [], 8 | "license": "MIT" 9 | } 10 | -------------------------------------------------------------------------------- /extensions/switcher/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/switcher", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "dist/switcher.js", 6 | "module": "dist/switcher.esm.js", 7 | "author": "", 8 | "license": "MIT" 9 | } 10 | -------------------------------------------------------------------------------- /extensions/table/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/table", 3 | "version": "0.0.0", 4 | "description": "Blexar framework table extension.", 5 | "main": "dist/table.js", 6 | "modules": "dist/table.js", 7 | "author": "", 8 | "license": "MIT" 9 | } 10 | -------------------------------------------------------------------------------- /extensions/_utils/isElementClosest.js: -------------------------------------------------------------------------------- 1 | export default function isElementClosest (element, wrapper) { 2 | while (element !== document && element !== null) { 3 | if (element === wrapper) return true; 4 | element = element.parentNode; 5 | } 6 | return false; 7 | } 8 | -------------------------------------------------------------------------------- /extensions/slider/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | color-fns@^0.0.4: 6 | version "0.0.4" 7 | resolved "https://registry.yarnpkg.com/color-fns/-/color-fns-0.0.4.tgz#065f20675ba0ec923580759dcd0f1d172f8df612" 8 | -------------------------------------------------------------------------------- /extensions/datepicker/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | date-fns@^2.0.0-alpha.7: 6 | version "2.0.0-alpha.7" 7 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.0.0-alpha.7.tgz#245ad16f95764eababfb2c0a41fd5d033c20e57a" 8 | -------------------------------------------------------------------------------- /extensions/navbar/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/navbar", 3 | "version": "0.0.0", 4 | "description": "Adaptive navbar that move navbar elements to dropdown menu based on pre-order priorities.", 5 | "main": "dist/navbar.js", 6 | "keywords": [ 7 | "navbar" 8 | ], 9 | "license": "MIT" 10 | } 11 | -------------------------------------------------------------------------------- /extensions/datepicker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/datepicker", 3 | "main": "dist/datepicker.js", 4 | "module": "dist/datepicker.esm.js", 5 | "version": "0.0.0", 6 | "maintainers": [ 7 | { 8 | "name": "Abdelrahman3D", 9 | "email": "abdelrahman3d@gmail.com" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Test foloder 9 | test/ 10 | 11 | # Dependency directories 12 | node_modules/ 13 | 14 | # Yarn Integrity file 15 | .yarn-integrity 16 | 17 | # macOS folder icon 18 | Icon/ 19 | 20 | # dit folders 21 | dist 22 | */**/dist -------------------------------------------------------------------------------- /extensions/modal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/modal", 3 | "version": "0.0.0", 4 | "description": "Blexar framework modal extension", 5 | "main": "dist/modal.js", 6 | "module": "dist/modal.es.js", 7 | "keywords": [ 8 | "modal", 9 | "es6" 10 | ], 11 | "author": "", 12 | "license": "MIT" 13 | } 14 | -------------------------------------------------------------------------------- /src/components/radio.styl: -------------------------------------------------------------------------------- 1 | .radio 2 | @extends .checkbox 3 | 4 | &-input 5 | border-radius: 10em 6 | 7 | &:after 8 | width: 30% 9 | height: 30% 10 | border: none 11 | border-radius: 10em 12 | background: $white 13 | transform: none 14 | 15 | input.radio 16 | @extends .radio-input -------------------------------------------------------------------------------- /extensions/_utils/throttle.js: -------------------------------------------------------------------------------- 1 | export default function throttle (callback, limit) { 2 | let wait = false; 3 | return () => { 4 | if (!wait) { 5 | callback.apply(this, arguments); 6 | wait = true; 7 | setTimeout(() => { 8 | wait = false; 9 | }, limit); 10 | } 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /extensions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/extensions", 3 | "version": "0.0.2", 4 | "license": "MIT", 5 | "keywords": [], 6 | "maintainers": [ 7 | { 8 | "name": "Abdelrahman3D", 9 | "email": "abdelrahman3d@gmail.com" 10 | } 11 | ], 12 | "dependencies": { 13 | "color-fns": "0.0.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "env", 5 | { 6 | "modules": false 7 | } 8 | ] 9 | ], 10 | "plugins": [ 11 | "external-helpers", 12 | "transform-class-properties", 13 | [ "transform-object-rest-spread", 14 | { 15 | "useBuiltIns": true 16 | } 17 | ] 18 | ] 19 | } -------------------------------------------------------------------------------- /extensions/select/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eidtor", 3 | "version": "0.0.1", 4 | "description": "ES6 select", 5 | "main": "dist/select.js", 6 | "dependencies": {}, 7 | "author": "", 8 | "license": "MIT", 9 | "keywords": [], 10 | "maintainers": [ 11 | { 12 | "name": "Abdelrahman3D", 13 | "email": "abdelrahman3d@gmail.com" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /extensions/accordion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/accordion", 3 | "version": "0.0.0", 4 | "description": "Blexar framework accordion extension", 5 | "main": "dist/accordion.js", 6 | "module": "dist/accordion.esm.js", 7 | "author": "", 8 | "license": "MIT", 9 | "maintainers": [ 10 | { 11 | "name": "Abdelrahman3D", 12 | "email": "abdelrahman3d@gmail.com" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /extensions/dropdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@blexar/dropdown", 3 | "version": "0.0.0", 4 | "description": "Blexar framework dropdown menu extension", 5 | "author": "", 6 | "main": "dist/js/dropdown.js", 7 | "module": "dist/js/dropdown.esm.js", 8 | "license": "MIT", 9 | "keywords": [], 10 | "maintainers": [ 11 | { 12 | "name": "Abdelrahman3D", 13 | "email": "abdelrahman3d@gmail.com" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /extensions/_utils/debounce.js: -------------------------------------------------------------------------------- 1 | export default function debounce (func, immediate = false) { 2 | let timeout; 3 | return function () { 4 | let later = () => { 5 | timeout = null; 6 | if (!immediate) func(...arguments); 7 | }; 8 | let callNow = immediate && !timeout; 9 | window.cancelAnimationFrame(timeout); 10 | timeout = window.requestAnimationFrame(later); 11 | if (callNow) func(...arguments); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/breadcrumb.styl: -------------------------------------------------------------------------------- 1 | .breadcrumb 2 | display: flex 3 | list-style: none 4 | margin: 0 5 | padding: 0 6 | // generate size modifiers 7 | generateSizes() 8 | 9 | li 10 | margin-top: 0 11 | 12 | .breadcrumb-divider 13 | padding: 0 $padding 14 | color: $gray 15 | _icon-color: $gray 16 | 17 | .breadcrumb-item 18 | color: $primary 19 | 20 | &.is-active 21 | color: $slategray 22 | font-weight: $font-weight-semi-bold 23 | -------------------------------------------------------------------------------- /src/grid/container.styl: -------------------------------------------------------------------------------- 1 | .container 2 | width: $container-mobile 3 | margin: auto 4 | padding-left: $gutter 5 | padding-right: $gutter 6 | 7 | +tablet() 8 | width: $container-tablet 9 | 10 | +desktop() 11 | width: $container-desktop 12 | 13 | +widescreen() 14 | width: $container-widescreen 15 | 16 | +ultrawide() 17 | width: $container-ultrawide 18 | 19 | .container-full 20 | width: 100% 21 | padding-left: $gutter-full 22 | padding-right: $gutter-full -------------------------------------------------------------------------------- /extensions/_utils/toArray.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts an array-like object to an array. 3 | */ 4 | export default function toArray (arrayLike, mappingFn) { 5 | if (Array.from) { 6 | return Array.from(arrayLike, mappingFn); 7 | } 8 | 9 | const array = []; 10 | const shouldMap = typeof mappingFn === 'function'; 11 | const length = arrayLike.length; 12 | for (let i = 0; i < length; i++) { 13 | array.push(shouldMap ? mappingFn(arrayLike[i]) : arrayLike[i]); 14 | } 15 | 16 | return array; 17 | } 18 | -------------------------------------------------------------------------------- /src/helper/no.styl: -------------------------------------------------------------------------------- 1 | .no 2 | &-padding 3 | padding: 0 !important 4 | &-paddingTop 5 | padding-top: 0 !important 6 | &-paddingBottom 7 | padding-bottom: 0 !important 8 | &-paddingRight 9 | padding-right: 0 !important 10 | &-paddingLeft 11 | padding-left: 0 !important 12 | 13 | &-margin 14 | margin: 0 !important 15 | &-marginTop 16 | margin-top: 0 !important 17 | &-marginBottom 18 | margin-bottom: 0 !important 19 | &-marginRight 20 | margin-right: 0 !important 21 | &-marginLeft 22 | margin-left: 0 !important -------------------------------------------------------------------------------- /src/components/icon.styl: -------------------------------------------------------------------------------- 1 | .icon 2 | display: inline-block 3 | vertical-align: middle 4 | line-height: inherit 5 | font-size: 1em 6 | width: 1em 7 | height: 1em 8 | &:not(:last-child) 9 | margin-{$dir-end}: $margin 10 | 11 | // generate color modifiers 12 | for color in $modifiers-color 13 | $color = lookup('$' + color) 14 | &.is-{color} 15 | _icon-color: $color 16 | 17 | // generate size modifiers 18 | for size in $modifiers-size 19 | $size = lookup('$size-' + size) 20 | &.is-{size} 21 | width: $size 22 | height: $size 23 | -------------------------------------------------------------------------------- /src/components/form.styl: -------------------------------------------------------------------------------- 1 | .form 2 | &.is-inline 3 | .field 4 | display: flex 5 | 6 | .field 7 | margin-bottom: ($margin * 2) 8 | >:last-child 9 | margin-bottom: 0 10 | 11 | .field-label 12 | font-weight: $font-weight-semi-bold 13 | display: block 14 | margin-bottom: $margin 15 | margin-top: $margin 16 | 17 | .field-text 18 | display: block 19 | font-size: 0.75em 20 | margin-bottom: $margin 21 | color: $gray 22 | // generate color modifiers 23 | for color in $modifiers-color 24 | $accent = lookup('$' + color) 25 | &.is-{color} 26 | color: $accent -------------------------------------------------------------------------------- /src/components/file.styl: -------------------------------------------------------------------------------- 1 | .file 2 | margin-bottom: $margin 3 | padding: $padding ($padding * 1.5) 4 | width: 100% 5 | border: 1px solid $gray 6 | border-radius: $border-radius 7 | line-height: $element-lineheight 8 | display: inline-block 9 | cursor: pointer 10 | color: $dark 11 | _icon-color: $dark 12 | 13 | // generate size modifiers 14 | generateSizes() 15 | 16 | // generate color modifiers 17 | for color in $modifiers-color 18 | $accent = lookup('$' + color) 19 | $text = isLight(color) ? $black : $white 20 | &.is-{color} 21 | _file-color: $accent $text 22 | 23 | 24 | .file-input 25 | display: none -------------------------------------------------------------------------------- /scripts/watcher.js: -------------------------------------------------------------------------------- 1 | const { buildStyles } = require('./styles'); 2 | const { buildScripts } = require('./extensions'); 3 | const bs = require('browser-sync').create(); 4 | 5 | bs.watch('*/**/*.html').on('change', bs.reload); 6 | 7 | bs.watch('*/**/*.styl', function (event, file) { 8 | if (event === 'change') { 9 | buildStyles(); 10 | bs.reload(); 11 | } 12 | }); 13 | 14 | bs.watch('*/**/src/*.js', function (event, file) { 15 | if (event === 'change') { 16 | const fileName = file.match(/(\w+).js$/)[1]; 17 | buildScripts('umd', fileName); 18 | bs.reload(); 19 | } 20 | }); 21 | 22 | bs.init({ 23 | server: true 24 | }); 25 | -------------------------------------------------------------------------------- /src/components/_index.styl: -------------------------------------------------------------------------------- 1 | @import 'button' 2 | @import 'buttons' 3 | @import 'label' 4 | @import 'icon' 5 | @import 'input' 6 | @import 'input-tag' 7 | @import 'input-group' 8 | @import 'input-icons' 9 | @import 'file' 10 | @import 'checkbox' 11 | @import 'radio' 12 | @import 'switcher' 13 | @import 'table' 14 | @import 'textarea' 15 | @import 'tooltip' 16 | @import 'nav' 17 | @import 'select' 18 | @import 'dropdown' 19 | @import 'modal' 20 | @import 'navbar' 21 | @import 'pagination' 22 | @import 'accordion' 23 | @import 'calendar' 24 | @import 'datepicker' 25 | @import 'slider' 26 | @import 'loading' 27 | @import 'progress' 28 | @import 'avatar' 29 | @import 'form' 30 | @import 'alert' 31 | @import 'tabs' 32 | @import 'breadcrumb' 33 | -------------------------------------------------------------------------------- /src/components/textarea.styl: -------------------------------------------------------------------------------- 1 | .textarea 2 | display: block 3 | margin-bottom: $margin 4 | padding: $padding 5 | min-width: 100% 6 | max-width: 100% 7 | outline: none 8 | border-width: $border 9 | border-style: solid 10 | border-radius: $border-radius 11 | text-align: $dir-start 12 | line-height: 1.2 13 | _textarea-color: $gray $primary 14 | 15 | // generate size modifiers 16 | generateSizes() 17 | 18 | // generate color modifiers 19 | for color in $modifiers-color 20 | $color = lookup('$' + color) 21 | &.is-{color} 22 | _textarea-color: $color 23 | 24 | &:disabled, &.is-disabled 25 | cursor: not-allowed 26 | background: $gray 27 | color: $white 28 | pointer-events: none 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/components/calendar.styl: -------------------------------------------------------------------------------- 1 | .calendar 2 | padding: $padding 3 | border-radius: $border-radius 4 | background-color: $white 5 | border-spacing: 0 6 | text-align: center 7 | 8 | generateSizes() 9 | 10 | td 11 | padding: 0.25em 12 | border-width: $border 13 | border-style: solid 14 | border-color: $white 15 | border-radius: $border-radius 16 | cursor: pointer 17 | 18 | &.is-previous, 19 | &.is-following 20 | color: $gray 21 | 22 | &.is-active 23 | border-color: $primary 24 | background-color: $primary 25 | color: $white 26 | 27 | &:hover, 28 | &:focus 29 | border-color: $primary 30 | 31 | th 32 | padding: 10px 5px 33 | color: $slategray 34 | font-size: 0.7em 35 | -------------------------------------------------------------------------------- /src/helper/add.styl: -------------------------------------------------------------------------------- 1 | .u 2 | &-sticky 3 | position: sticky 4 | top: $margin 5 | 6 | &-float-right 7 | float: right 8 | 9 | &-float-left 10 | float: left 11 | 12 | &-flex 13 | display: flex 14 | 15 | &-justify-center 16 | justify-content: center 17 | 18 | &-justify-end 19 | justify-content: flex-end 20 | 21 | &-justify-start 22 | justify-content: flex-start 23 | 24 | &-justify-around 25 | justify-content: space-around 26 | 27 | &-justify-between 28 | justify-content: space-between 29 | 30 | &-align-center 31 | align-items: center 32 | 33 | &-align-end 34 | align-items: flex-end 35 | 36 | &-align-start 37 | align-items: flex-start 38 | 39 | &-align-baseline 40 | align-items: baseline 41 | 42 | &-align-stretch 43 | align-items: stretch 44 | -------------------------------------------------------------------------------- /src/components/datepicker.styl: -------------------------------------------------------------------------------- 1 | .datepicker 2 | margin-bottom: $margin 3 | padding: $padding multiple($padding, 1.5) 4 | width: 100% 5 | border: $border solid $black 6 | border-radius: $border-radius 7 | generateSizes() 8 | 9 | &-control 10 | display: flex 11 | justify-content: space-between 12 | align-items: center 13 | width: 100% 14 | padding: 0 $padding 15 | 16 | select, 17 | input 18 | padding: 5px 10px 19 | width: 50% 20 | border-width: 0 0 $border 0 21 | border-color: $white 22 | color: $slategray 23 | border-radius: 0 24 | background-color: transparent 25 | text-align: center 26 | text-align-last: center 27 | font-size: 0.8em 28 | -webkit-appearance: none 29 | 30 | &:hover, 31 | &:focus 32 | outline: 0 33 | border-color: $black 34 | -------------------------------------------------------------------------------- /src/util/colors.styl: -------------------------------------------------------------------------------- 1 | /** 2 | * colors 3 | */ 4 | $magenta ?= #F2248F 5 | $blue ?= #2451F2 6 | $cyan ?= #3D8EF2 7 | $green ?= #36D9B0 8 | $yellow ?= #FFCF0D 9 | $orange ?= #FF6F00 10 | $red ?= #F22435 11 | $aqua ?= #00FCFE 12 | 13 | /** 14 | * Graysacle 15 | */ 16 | $black ?= #000000 17 | $dark ?= #383555 18 | $slategray ?= #9D99BC 19 | $gray ?= #E9E8F2 20 | $light ?= #F6F5FD 21 | $white ?= #FFFFFF 22 | 23 | /** 24 | * theme colors 25 | */ 26 | $primary ?= $blue 27 | $secondary ?= $magenta 28 | $danger ?= $red 29 | $success ?= $green 30 | $warning ?= $yellow 31 | $info ?= $cyan 32 | $link ?= $blue 33 | $link-hover ?= $black 34 | 35 | /** 36 | * Gradient colors 37 | */ 38 | $grad-direction ?= 45deg 39 | $grad-primary ?= $blue, $magenta 40 | $grad-secondary ?= $magenta, $orange 41 | $grad-success ?= $green, $magenta 42 | $grad-danger ?= $red, $magenta 43 | $grad-warning ?= $yellow, $green 44 | $grad-info ?= $aqua, $blue 45 | -------------------------------------------------------------------------------- /extensions/modal/src/modal.js: -------------------------------------------------------------------------------- 1 | import select from '../../_utils/select'; 2 | import show from '../../_utils/show'; 3 | import hide from '../../_utils/hide'; 4 | 5 | /** 6 | * modal class 7 | */ 8 | export default class Modal { 9 | constructor(selector, button) { 10 | this.el = select(selector); 11 | this.button = select(button); 12 | this.init(); 13 | } 14 | 15 | init() { 16 | this.panel = this.el.querySelector('.modal-panel'); 17 | this.dismiss = this.el.querySelector('.modal-dismiss'); 18 | this.animating = false; 19 | 20 | this.initEvents(); 21 | hide(this.el); 22 | } 23 | 24 | initEvents() { 25 | this.button.addEventListener('click', () => show(this.el), false); 26 | this.dismiss.addEventListener('click', () => hide(this.el), false); 27 | 28 | this.el.addEventListener('click', (event) => { 29 | if (event.target === this.el) hide(this.el); 30 | }, false); 31 | } 32 | } -------------------------------------------------------------------------------- /src/components/tabs.styl: -------------------------------------------------------------------------------- 1 | .tabs 2 | display: flex 3 | list-style: none 4 | margin: 0 5 | padding: ($padding * 2) 0 6 | border-bottom: 1px solid $gray 7 | li 8 | margin: 0 9 | a 10 | border-top-right-radius: $border-radius 11 | border-top-left-radius: $border-radius 12 | padding: ($padding * 2) 13 | background-color: $white 14 | color: $slategray 15 | _icon-color: $slategray 16 | .icon 17 | margin-right: 0 18 | 19 | .is-active a 20 | a:hover 21 | border-bottom: 2px solid $primary 22 | color: $primary 23 | _icon-color: $primary 24 | 25 | &.is-centered 26 | justify-content: center 27 | &.is-end 28 | justify-content: flex-end 29 | 30 | &.is-boxed 31 | a 32 | border: 1px solid transparent 33 | border-bottom: 0 34 | .is-active a 35 | a:hover 36 | border: 1px solid $gray 37 | border-bottom-color: transparent -------------------------------------------------------------------------------- /scripts/config.js: -------------------------------------------------------------------------------- 1 | const babel = require('rollup-plugin-babel'); 2 | const resolve = require('rollup-plugin-node-resolve'); 3 | const replace = require('rollup-plugin-replace'); 4 | 5 | const { version } = require('../package.json'); 6 | 7 | module.exports = { 8 | extensions: [ 9 | 'dropdown', 10 | 'slider', 11 | 'datepicker', 12 | 'accordion', 13 | 'modal', 14 | 'navbar', 15 | 'select', 16 | 'switcher', 17 | 'table' 18 | ], 19 | script: { 20 | banner: 21 | `/** 22 | * v${version} 23 | * (c) ${new Date().getFullYear()} Baianat 24 | * @license MIT 25 | */`, 26 | uglifyOptions: { 27 | toplevel: true, 28 | compress: true, 29 | mangle: true 30 | }, 31 | inputOptions: { 32 | plugins: [ 33 | replace({ __VERSION__: version }), 34 | babel(), 35 | resolve() 36 | ] 37 | } 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /src/components/pagination.styl: -------------------------------------------------------------------------------- 1 | .pagination 2 | display: flex 3 | align-items: top 4 | margin: $margin 0 5 | flex-wrap: wrap 6 | 7 | &-item, &-next, &-prev, &-first, &-last 8 | position: relative 9 | display: inline-flex 10 | justify-content: center 11 | align-items: center 12 | width: 2em 13 | height: 2em 14 | outline-width: 0 15 | outline-offset: 0 16 | border: none 17 | text-decoration: none 18 | cursor: pointer 19 | background: $white 20 | font-size: inherit 21 | _icon-color: $black 22 | @extends $normal 23 | 24 | &.is-active, &:active, &:hover:not(.is-disabled) 25 | color: $primary 26 | _icon-color: $primary 27 | 28 | &.is-disabled 29 | border-color: $gray 30 | color: $gray 31 | _icon-color: $gray 32 | 33 | &:focus 34 | outline-color: 0 35 | 36 | .icon 37 | width: 1.4em 38 | height: 1.4em 39 | 40 | generateSizes() -------------------------------------------------------------------------------- /src/components/alert.styl: -------------------------------------------------------------------------------- 1 | .alert 2 | position: relative 3 | display: flex 4 | align-items: center 5 | padding: 0.75em 6 | border-radius: 1.5em 7 | margin-bottom: $margin 8 | _alert-color: $gray $dark 9 | 10 | // generate color modifiers 11 | for color in $modifiers-color 12 | $accent = lookup('$' + color) 13 | $text = isLight(color) ? $black : $white 14 | 15 | &.is-{color} 16 | _alert-color: $accent $text 17 | 18 | &.is-outlined 19 | background-color: transparent 20 | border-style: solid 21 | border-width: $border 22 | 23 | &.is-float 24 | box-shadow: boxShadow(large) 25 | 26 | .alert-dismiss 27 | margin-{$dir-start}: $margin 28 | padding: 0 29 | border: 0 30 | background-color: transparent 31 | cursor: pointer 32 | _icon-color: inherit 33 | 34 | &:focus 35 | outline: none 36 | 37 | &:hover 38 | _icon-color: $primary 39 | 40 | .alert-content 41 | flex: 1 1 0% -------------------------------------------------------------------------------- /extensions/datepicker/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |A datepicker allows users to select specific date
16 |Awesome content!
55 |Awesome content!
62 |A navabar is the main element to navigate across the website
16 |A table used to organize data
16 || Name | 21 |Info | 22 |Price | 23 |Action | 24 |
|---|---|---|---|
| Total | 30 ||||
| Name | 48 |Info | 49 |Price | 50 |Action | 51 |
|---|