tema-design
Advanced tools
Comparing version 1.0.23 to 1.0.24
@@ -9,3 +9,3 @@ function onFocusAdded(node) { | ||
function onFocusLose(node) { | ||
if(!node.parentNode) { return; } | ||
if(!node.parentNode || ['input', 'textarea'].indexOf(node.nodeName.toLowerCase()) == -1) { return; } | ||
let currentClass = node.parentNode.className; | ||
@@ -20,4 +20,4 @@ node.parentNode.className = currentClass.replace(/\sactive/gi, '').replace(/\sfilled/gi, ''); | ||
if(!root.querySelectorAll) { return; } | ||
root.querySelectorAll('input').forEach(elm => onFocusLose(elm)); | ||
root.querySelectorAll('textarea').forEach(elm => onFocusLose(elm)); | ||
let nodes = root.querySelectorAll('input,textarea'); | ||
for(let i = 0; i < nodes.length; i ++) { onFocusLose(nodes.item(i)) }; | ||
} | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "tema-design", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"description": "Design system source used into thinkseg group systems", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -89,2 +89,13 @@ /******/ (function(modules) { // webpackBootstrap | ||
/***/ "../js/collapsible.js": | ||
/*!****************************!*\ | ||
!*** ../js/collapsible.js ***! | ||
\****************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
eval("let collapsibleEffect = function() {\n let collapsibleContainers = document.querySelectorAll('.collapsible-container');\n collapsibleContainers.forEach(function (collapsibleContainer) {\n let collapsibleTitle = collapsibleContainer.querySelector('.collapsible-title'),\n collapsibleIcon = collapsibleContainer.querySelector('#collapsible-icon'),\n collapsibleContent = collapsibleContainer.querySelector('.collapsible-content');\n\n if (collapsibleContainer.classList.contains('collapsible-disabled')) {\n collapsibleIcon.classList.remove( 'ds-icon-arrow-down' );\n }\n else {\n collapsibleTitle.addEventListener('click', function () {\n if (collapsibleContent != null) {\n if (collapsibleContent.classList.contains('ds-hide')) {\n collapsibleContent.classList.remove('ds-hide');\n collapsibleIcon.classList.remove('ds-icon-arrow-down');\n collapsibleIcon.classList.add('ds-icon-arrow-up');\n }\n else {\n collapsibleContent.classList.add('ds-hide');\n collapsibleIcon.classList.remove('ds-icon-arrow-up');\n collapsibleIcon.classList.add('ds-icon-arrow-down');\n }\n }\n });\n }\n })\n}\n\nmodule.exports = collapsibleEffect;\n\n\n//# sourceURL=webpack:///../js/collapsible.js?"); | ||
/***/ }), | ||
/***/ "../js/form.js": | ||
@@ -97,6 +108,40 @@ /*!*********************!*\ | ||
eval("function onFocusAdded(node) {\n if(['input', 'textarea'].indexOf(node.nodeName.toLowerCase()) === -1) {\n return;\n }\n node.parentNode.className += ' active';\n}\n\nfunction onFocusLose(node) {\n if(!node.parentNode) { return; }\n let currentClass = node.parentNode.className;\n node.parentNode.className = currentClass.replace(/\\sactive/gi, '').replace(/\\sfilled/gi, '');\n if(node.value) {\n node.parentNode.className += ' filled';\n }\n}\n\nfunction syncFields(root) {\n if(!root.querySelectorAll) { return; }\n root.querySelectorAll('input').forEach(elm => onFocusLose(elm));\n}\n\nwindow.addEventListener('focus', e => onFocusAdded(document.activeElement), true);\nwindow.addEventListener('blur', e => onFocusLose(e.target), true);\nwindow.addEventListener('DOMNodeInserted', e => syncFields(e.target), false);\nwindow.addEventListener('DOMContentLoaded', e => syncFields(document), false);\n\n\n//# sourceURL=webpack:///../js/form.js?"); | ||
eval("function onFocusAdded(node) {\n if(['input', 'textarea'].indexOf(node.nodeName.toLowerCase()) === -1) {\n return;\n }\n node.parentNode.className += ' active';\n}\n\nfunction onFocusLose(node) {\n if(!node.parentNode || ['input', 'textarea'].indexOf(node.nodeName.toLowerCase()) == -1) { return; }\n let currentClass = node.parentNode.className;\n node.parentNode.className = currentClass.replace(/\\sactive/gi, '').replace(/\\sfilled/gi, '');\n if(node.value) {\n node.parentNode.className += ' filled';\n }\n}\n\nfunction syncFields(root) {\n if(!root.querySelectorAll) { return; }\n let nodes = root.querySelectorAll('input,textarea');\n for(let i = 0; i < nodes.length; i ++) { onFocusLose(nodes.item(i)) };\n}\n\nwindow.addEventListener('focus', e => onFocusAdded(document.activeElement), true);\nwindow.addEventListener('blur', e => onFocusLose(e.target), true);\nwindow.addEventListener('DOMNodeInserted', e => syncFields(e.target), false);\nwindow.addEventListener('DOMContentLoaded', e => syncFields(document), false);\n\nmodule.exports = {\n syncFields,\n onFocusLose\n};\n\n\n//# sourceURL=webpack:///../js/form.js?"); | ||
/***/ }), | ||
/***/ "../js/menu.js": | ||
/*!*********************!*\ | ||
!*** ../js/menu.js ***! | ||
\*********************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
eval("var loadMenu = function () {\n let searchIcon = document.getElementById('search-icon-menu');\n hamburguerMenu = document.getElementById('mobile-menu'),\n overlayBackground = document.getElementById('back-menu'),\n overlayBackgroundDesktop = document.getElementById('back-menu-large'),\n menu = document.getElementById('header-menu'),\n adminBar = document.querySelector('.admin-bar'),\n menuParent = document.querySelectorAll('.parent-links');\n\n // all elements that have invoked functions \n // must be set to load the menu correctly\n if ([searchIcon, hamburguerMenu, overlayBackground,\n overlayBackgroundDesktop, menu].some(vari => !vari)) {\n return;\n }\n\n searchIcon.addEventListener('click', function () {\n if (searchIcon.classList.contains('ds-icon-search')) {\n searchIcon.classList.remove('ds-icon-search');\n searchIcon.classList.add('ds-icon-close');\n } else {\n searchIcon.classList.remove('ds-icon-close');\n searchIcon.classList.add('ds-icon-search');\n }\n }, false);\n\n hamburguerMenu.addEventListener(\"change\", function () {\n if (hamburguerMenu.checked) {\n overlayBackground.classList.add('active-back-menu');\n } else {\n overlayBackground.classList.remove('active-back-menu');\n }\n }, false);\n\n menu.addEventListener(\"mouseover\", function () {\n overlayBackgroundDesktop.classList.add('active-back-menu');\n });\n\n menu.addEventListener(\"mouseout\", function () {\n overlayBackgroundDesktop.classList.remove('active-back-menu');\n });\n\n menuParent.forEach(function (singleParent) {\n singleParent.addEventListener('click', function (event) {\n event.preventDefault();\n let parent = this.parentElement,\n subMenu = this.nextElementSibling;\n if (subMenu !== null) {\n if (subMenu.classList.contains('ds-hide')) {\n subMenu.classList.remove('ds-hide');\n singleParent.children[0].classList.add('ds-icon-arrow-up');\n singleParent.children[0].classList.remove('ds-icon-arrow-down');\n singleParent.classList.add('parent-dashed');\n }\n else {\n subMenu.classList.add('ds-hide');\n singleParent.children[0].classList.remove('ds-icon-arrow-up');\n singleParent.children[0].classList.add('ds-icon-arrow-down');\n singleParent.classList.remove('parent-dashed');\n }\n }\n }, false);\n });\n\n window.onscroll = function (e) {\n let scrollY = window.pageYOffset || document.documentElement.scrollTop,\n topbar = document.getElementById(\"topbar\"),\n height = -topbar.clientHeight;\n if (scrollY <= Math.max(this.lastScroll, 50) || this.loaded === undefined) {\n if (adminBar !== null) {\n topbar.style.top = '32px'\n } else {\n topbar.style.top = '0'\n }\n } else {\n topbar.style.top = '-110px'\n }\n this.lastScroll = scrollY;\n this.loaded = true;\n }\n}\n\nloadMenu();\n\nmodule.exports = loadMenu;\n\n\n//# sourceURL=webpack:///../js/menu.js?"); | ||
/***/ }), | ||
/***/ "../js/tabs.js": | ||
/*!*********************!*\ | ||
!*** ../js/tabs.js ***! | ||
\*********************/ | ||
/*! exports provided: default */ | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
"use strict"; | ||
eval("__webpack_require__.r(__webpack_exports__);\nconst enableTab = (drawer, index) => {\n const nodes = drawer.querySelectorAll('[data-tab]');\n\n // disable all\n nodes.forEach(node => node.classList.remove('active'));\n\n // enable by tab id\n const active = drawer.querySelector('[data-tab=\"' + (index + 1) + '\"]');\n if (active) {\n active.classList.add('active');\n }\n};\n\nconst tabsNavigator = () => {\n const btns = document.querySelectorAll('ul.tab-navigator li');\n const indicator = document.querySelector('ul.tab-navigator .indicator');\n const drawer = document.querySelector('.navigator-drawer');\n\n if (btns.length && indicator && drawer) {\n let indi = 0;\n const width = btns[0].offsetWidth; // indicator size based on li-s\n\n // on init, check if there is a data-current-tab on indicator (initial state)\n if (indicator.dataset.currentTab) {\n indi = parseInt(indicator.dataset.currentTab);\n }\n\n // set initial indicator size/position\n indicator.style.width = width + 'px';\n indicator.style.marginLeft = (indi * width) + 'px';\n\n // enable first/default tab\n enableTab(drawer, indi);\n\n btns.forEach(btn => {\n btn.addEventListener('click', evt => {\n // get element's data-tab\n const tab = parseInt(btn.dataset.tab) - 1;\n\n // set indicator margin\n indicator.style.marginLeft = tab * width + 'px';\n\n // save the state for next init (in case of resize, for example)\n indicator.dataset.currentTab = tab;\n\n // activate current tab\n enableTab(drawer, tab);\n });\n });\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (tabsNavigator);\n\n\n//# sourceURL=webpack:///../js/tabs.js?"); | ||
/***/ }), | ||
/***/ "../js/waveEffect.js": | ||
/*!***************************!*\ | ||
!*** ../js/waveEffect.js ***! | ||
\***************************/ | ||
/*! no static exports found */ | ||
/***/ (function(module, exports) { | ||
eval("const waveEffect = (evt, btn) => {\n const newRound = document.createElement('div');\n const x = btn.offsetWidth / 2;\n const y = btn.offsetHeight / 2;\n\n newRound.className = 'material-circle';\n btn.appendChild(newRound);\n\n newRound.style.left = x + \"px\";\n newRound.style.top = y + \"px\";\n newRound.className += \" animated\";\n\n setTimeout(() => {\n newRound.remove();\n }, 750);\n};\n\ndocument.addEventListener('click', evt => {\n const btn = evt.target.closest('.wave-effect');\n if (btn) {\n waveEffect(evt, btn);\n }\n});\n\n\n\n//# sourceURL=webpack:///../js/waveEffect.js?"); | ||
/***/ }), | ||
/***/ "./js/navigation.js": | ||
@@ -110,3 +155,3 @@ /*!**************************!*\ | ||
"use strict"; | ||
eval("__webpack_require__.r(__webpack_exports__);\nlet loadContent = function(hash, target) {\n if(!target.touched) {\n target.defaultHTML = target.innerHTML;\n }\n\n if(hash === '') {\n target.innerHTML = target.defaultHTML;\n return;\n }\n\n let url = `/${hash.replace('#', '')}.html`;\n\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.onreadystatechange = () => {\n if (request.readyState != 4 || request.status != 200) return;\n target.innerHTML = request.responseText;\n target.touched = true;\n };\n\n request.send();\n};\n\nlet hashNavigation = (container) => {\n window.addEventListener(\"hashchange\", () => {\n loadContent(location.hash, container);\n }, false);\n\n if(location.hash !== '') {\n loadContent(location.hash, container);\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hashNavigation);\n\n\n//# sourceURL=webpack:///./js/navigation.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\nlet loadContent = function(hash, target, callback) {\n if(!target.touched) {\n target.defaultHTML = target.innerHTML;\n }\n\n if(hash === '') {\n target.innerHTML = target.defaultHTML;\n return;\n }\n\n let url = `/${hash.replace('#', '')}.html`;\n\n let request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n request.onreadystatechange = () => {\n if (request.readyState != 4 || request.status != 200) return;\n target.innerHTML = request.responseText;\n target.touched = true;\n \n callback();\n };\n\n request.send();\n};\n\nlet hashNavigation = (container, callback = () => {}) => {\n window.addEventListener(\"hashchange\", () => {\n loadContent(location.hash, container, callback);\n }, false);\n\n if(location.hash !== '') {\n loadContent(location.hash, container, callback);\n }\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hashNavigation);\n\n\n//# sourceURL=webpack:///./js/navigation.js?"); | ||
@@ -123,3 +168,3 @@ /***/ }), | ||
"use strict"; | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _scss_site_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scss/site.scss */ \"./scss/site.scss\");\n/* harmony import */ var _scss_site_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scss_site_scss__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navigation */ \"./js/navigation.js\");\n/* harmony import */ var _js_form__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../js/form */ \"../js/form.js\");\n/* harmony import */ var _js_form__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_js_form__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\nlet contentContainer = document.querySelector('#content');\nObject(_navigation__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(contentContainer);\n\n\n//# sourceURL=webpack:///./js/site.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navigation */ \"./js/navigation.js\");\n/* harmony import */ var _js_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../js/tabs */ \"../js/tabs.js\");\n/* harmony import */ var _js_waveEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../js/waveEffect */ \"../js/waveEffect.js\");\n/* harmony import */ var _js_waveEffect__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_js_waveEffect__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _js_collapsible__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../js/collapsible */ \"../js/collapsible.js\");\n/* harmony import */ var _js_collapsible__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_js_collapsible__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _scss_site_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../scss/site.scss */ \"./scss/site.scss\");\n/* harmony import */ var _scss_site_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_scss_site_scss__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _js_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../js/menu */ \"../js/menu.js\");\n/* harmony import */ var _js_menu__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_js_menu__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _js_form__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../js/form */ \"../js/form.js\");\n/* harmony import */ var _js_form__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_js_form__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\nlet contentContainer = document.querySelector('#content');\nObject(_navigation__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(contentContainer, () => {\n Object(_js_tabs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])()\n _js_collapsible__WEBPACK_IMPORTED_MODULE_3___default()()\n});\n\nwindow.addEventListener('resize', () => {\n Object(_js_tabs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])();\n});\n\n\n//# sourceURL=webpack:///./js/site.js?"); | ||
@@ -126,0 +171,0 @@ /***/ }), |
@@ -49,3 +49,3 @@ const path = require('path'); | ||
plugins: [ | ||
new MiniCssExtractPlugin({filename: "../css/[name].css", chunkFilename: "../css/[id].css"}), | ||
new MiniCssExtractPlugin({filename: "../css/[name].[chunkhash].css", chunkFilename: "../css/[id].css"}), | ||
new CopyPlugin([ | ||
@@ -52,0 +52,0 @@ { from: '../static', to: '../../static' } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
587944
70
7200