Compare commits

...

31 Commits

Author SHA1 Message Date
Vinícius Biavatti
6a021ecc2a 2.1.2 2023-07-19 18:36:33 +01:00
Vinícius Biavatti
11b967ce01 Build 2023-07-19 18:32:56 +01:00
Vinícius Biavatti
9136b760e1 DateTime format parse refactor 2023-07-19 18:32:19 +01:00
Vini
967676f680
Merge pull request #44 from AHgPuK/master
Fix DateTime day
2023-07-19 18:11:35 +01:00
Andrey Hohutkin
4b55c4bf40 Fix DateTime 2023-06-05 01:15:59 +03:00
Andrey Hohutkin
42410c8df6 Bump dist 2023-06-04 23:02:26 +03:00
Andrey Hohutkin
63ec97008e Fix DateTime 2023-06-04 23:01:22 +03:00
Andrey Hohutkin
8634bf7d06 Fix gulp-saas 2023-06-04 23:01:05 +03:00
Vinicius Reif Biavatti
47346e644f
Merge pull request #40 from ellisgl/master
Update gulp sass version to 5.0.0
2022-11-20 00:15:57 +00:00
Ellis
1a57113418
Merge pull request #11 from ellisgl/dependabot/npm_and_yarn/tar-4.4.19
Bump tar from 4.4.8 to 4.4.19
2022-11-17 19:15:02 -06:00
dependabot[bot]
2cd1d447d6
Bump tar from 4.4.8 to 4.4.19
Bumps [tar](https://github.com/npm/node-tar) from 4.4.8 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.8...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-18 01:13:36 +00:00
Ellis
6737521e9b
Merge pull request #10 from ellisgl/dependabot/npm_and_yarn/scss-tokenizer-and-gulp-sass--removed
Bump scss-tokenizer and gulp-sass
2022-11-17 19:13:05 -06:00
dependabot[bot]
bdd69a01cf
Bump scss-tokenizer and gulp-sass
Removes [scss-tokenizer](https://github.com/sasstools/scss-tokenizer). It's no longer used after updating ancestor dependency [gulp-sass](https://github.com/dlmanning/gulp-sass). These dependencies need to be updated together.


Removes `scss-tokenizer`

Updates `gulp-sass` from 4.1.0 to 5.1.0
- [Release notes](https://github.com/dlmanning/gulp-sass/releases)
- [Changelog](https://github.com/dlmanning/gulp-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dlmanning/gulp-sass/compare/v4.1.0...v5.1.0)

---
updated-dependencies:
- dependency-name: scss-tokenizer
  dependency-type: indirect
- dependency-name: gulp-sass
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 15:27:56 +00:00
Ellis
07ade28249
Merge branch 'master' into master 2022-11-15 09:25:08 -06:00
Ellis
a6e9681786
Merge pull request #7 from ellisgl/dependabot/npm_and_yarn/minimatch-3.0.8
Bump minimatch from 3.0.4 to 3.0.8
2022-11-15 09:16:57 -06:00
Ellis
411e55d1d3
Merge pull request #6 from ellisgl/dependabot/npm_and_yarn/copy-props-2.0.5
Bump copy-props from 2.0.4 to 2.0.5
2022-11-15 09:16:32 -06:00
Ellis
6a17830db6
Merge pull request #5 from ellisgl/dependabot/npm_and_yarn/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7
2022-11-15 09:16:05 -06:00
dependabot[bot]
2e3bead772
Bump minimatch from 3.0.4 to 3.0.8
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.0.8.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.0.8)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 15:14:50 +00:00
dependabot[bot]
d14d9e008e
Bump copy-props from 2.0.4 to 2.0.5
Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/gulpjs/copy-props/releases)
- [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5)

---
updated-dependencies:
- dependency-name: copy-props
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 22:54:39 +00:00
Vinicius Reif Biavatti
ba06c7aeaf
Update README.md 2022-05-30 19:15:54 +01:00
Vinicius Reif Biavatti
4625c61827
Update issue templates 2022-05-27 16:45:43 +01:00
Vinicius Reif Biavatti
8963a09efe
Update issue templates 2022-05-27 16:45:14 +01:00
Vinicius Reif Biavatti
6df61105ee
Update issue templates 2022-05-27 16:44:08 +01:00
Vinicius Reif Biavatti
37a6c722c1
Update issue templates 2022-05-27 13:16:55 +01:00
Vinicius Reif Biavatti
9f8fca52c7
Update issue templates 2022-05-27 13:11:40 +01:00
Vinicius Reif Biavatti
dcf2049a30
Update issue templates 2022-05-27 13:10:20 +01:00
Vinicius Reif Biavatti
82bba2c921
Update issue templates 2022-05-27 13:09:29 +01:00
Vinicius Reif Biavatti
88c877db2c
Update issue templates 2022-05-27 13:07:35 +01:00
Vinicius Reif Biavatti
52c6470142
Update issue templates 2022-05-27 13:05:48 +01:00
Vinicius Reif Biavatti
c9662dd9b1
Merge pull request #33 from q00u/patch-1
Grammar in readme
2021-12-20 16:57:38 +00:00
dependabot[bot]
16217e8f7f
Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 01:24:54 +00:00
11 changed files with 4584 additions and 3895 deletions

View File

@ -0,0 +1,39 @@
---
name: Showcase Proposal
about: Proposal to publish a new content into wiki's Showcase page.
title: Proposal of showcase project - PROJECT_NAME
labels: showcase
assignees: ''
---
> Showcase proposal template
> Note: "*" fields are mandatory.
> Project Name: The name of the project that will be used as title of the section of the showcase.
Project Name *:
> Project Description: The description of the project that will be used as a paragraph after the title of the showcase.
Project Description *:
> Project Author: The author of the project that will be informed after the project description. (Keep if blank to don't show the author)
Project Author:
> Project Links: Links to access the project showcase. These links will be shown after project description.
Project Links:
> Project Images: Images of the project (can be the images with legends, or the links to it).
Project Images *:
> Additional Information: Other relevant information.
Additional Information:
> Feedback: If you want to give a feedback to the project, or a suggestion, please, enjoy this field!
Feedback:

View File

@ -0,0 +1,19 @@
---
name: Showcase Removal
about: Remove a published content from wiki's Showcase page.
title: Removal of showcase project - PROJECT_NAME
labels: showcase
assignees: ''
---
> Remove showcase project template
> "*" fields are mandatory.
> Project Name: The name of the project to be removed from showcase page.
Project Name *:
> Reason: The reason for removal
Reason *:

View File

@ -10,6 +10,8 @@
Text-based user interface CSS library Text-based user interface CSS library
<br> <br>
<a href="https://github.com/vinibiavatti1/TuiCss/wiki"><strong>-- Documentation --</strong></a> <a href="https://github.com/vinibiavatti1/TuiCss/wiki"><strong>-- Documentation --</strong></a>
<br>
<a href="https://github.com/vinibiavatti1/TuiCss/wiki/Showcase"><strong>-- Showcase --</strong></a>
<br><br> <br><br>
<a href="https://badge.fury.io/js/tuicss"> <a href="https://badge.fury.io/js/tuicss">
<img src="https://badge.fury.io/js/tuicss.svg" alt="npm version badge"> <img src="https://badge.fury.io/js/tuicss.svg" alt="npm version badge">

1961
dist/tuicss.css vendored

File diff suppressed because it is too large Load Diff

14
dist/tuicss.js vendored
View File

@ -116,18 +116,20 @@ function datetimeController() {
// parse out the date and time into constants. // parse out the date and time into constants.
const today = new Date(); const today = new Date();
const month = (today.getMonth() + '').length === 2 ? today.getMonth() + 1 : '0' + (today.getMonth() + 1); const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = (today.getDay() + '').length === 2 ? today.getDay() + 1 : '0' + (today.getDay() + 1); const day = today.getDate().toString().padStart(2, '0');
const year = today.getFullYear() + ''; const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
const hour = (today.getHours() + '').length === 2 ? today.getHours() : '0' + today.getHours(); const year = today.getFullYear().toString();
const hour = today.getHours().toString().padStart(2, '0');
const hour12 = (parseInt(hour) + 24) % '12' || '12'; const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = (today.getMinutes() + '').length === 2 ? today.getMinutes() : '0' + today.getMinutes(); const minute = today.getMinutes().toString().padStart(2, '0');
const second = (today.getSeconds() + '').length === 2 ? today.getSeconds() : '0' + today.getSeconds(); const second = today.getSeconds().toString().padStart(2, '0');
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM'; const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
// Replace based on the format. // Replace based on the format.
format = format.replace('M', month); format = format.replace('M', month);
format = format.replace('d', day); format = format.replace('d', day);
format = format.replace('e', dayOfWeek);
format = format.replace('y', year); format = format.replace('y', year);
format = format.replace('H', hour); format = format.replace('H', hour);
format = format.replace('h', hour12); format = format.replace('h', hour12);

2
dist/tuicss.min.css vendored

File diff suppressed because one or more lines are too long

2
dist/tuicss.min.js vendored
View File

@ -1 +1 @@
function domReady(t){document.addEventListener("DOMContentLoaded",t),"interactive"!==document.readyState&&"complete"!==document.readyState||t()}function tabsController(){const t=document.getElementsByClassName("tui-tab");if(!t.length)return;for(const e of t)e.addEventListener("click",function(e){if(e.target.classList.contains("disabled"))return;for(const e of t)e.classList.remove("active");const o=document.getElementsByClassName("tui-tab-content");if(!o)throw"No tab content elements found.";for(const t of o)t.style.display="none";const n=e.target.getAttribute("data-tab-content");if(n){const t=document.getElementById(n);if(!t)throw'No tab content element with id "'+n+'" found.';t.style.display="block"}e.target.classList.add("active")});const e=document.querySelector(".tui-tab.active");e?e.click():t[0].click()}function datetimeController(){const t=document.getElementsByClassName("tui-datetime");function e(){for(const e of t){if(null===e)continue;let t=e.getAttribute("data-format");const o=new Date,n=2===(o.getMonth()+"").length?o.getMonth()+1:"0"+(o.getMonth()+1),a=2===(o.getDay()+"").length?o.getDay()+1:"0"+(o.getDay()+1),s=o.getFullYear()+"",c=2===(o.getHours()+"").length?o.getHours():"0"+o.getHours(),l=(parseInt(c)+24)%"12"||"12",i=2===(o.getMinutes()+"").length?o.getMinutes():"0"+o.getMinutes(),d=2===(o.getSeconds()+"").length?o.getSeconds():"0"+o.getSeconds(),r=parseInt(c)>=12?"PM":"AM";t=(t=(t=(t=(t=(t=(t=(t=t.replace("M",n)).replace("d",a)).replace("y",s)).replace("H",c)).replace("h",l)).replace("m",i)).replace("s",d)).replace("a",r),e.innerHTML=t}}t.length&&(e(),setTimeout(()=>{setInterval(e,1e3)},1e3-(new Date).getMilliseconds()))}function sidenavController(){const t=document.querySelector(".tui-sidenav-button");t&&t.addEventListener("click",()=>{const t=document.querySelector(".tui-sidenav");if(!t)throw"No sidenav element found.";t.classList.contains("active")?t.classList.remove("active"):t.classList.add("active")})}function modalController(){const t=document.querySelector(".tui-overlap");if(!t)return;const e=document.getElementsByClassName("tui-modal-button");for(const o of e)o.addEventListener("click",e=>{t.classList.add("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.add("active")}});const o=document.getElementsByClassName("tui-modal-close-button");if(e.length>0&&!o.length)throw"No modal close buttons found.";for(const e of o)e.addEventListener("click",e=>{t.classList.remove("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.remove("active")}})}domReady(function(){tabsController(),datetimeController(),sidenavController(),modalController()}); function domReady(t){document.addEventListener("DOMContentLoaded",t),"interactive"!==document.readyState&&"complete"!==document.readyState||t()}function tabsController(){const t=document.getElementsByClassName("tui-tab");if(!t.length)return;for(const e of t)e.addEventListener("click",function(e){if(e.target.classList.contains("disabled"))return;for(const e of t)e.classList.remove("active");const o=document.getElementsByClassName("tui-tab-content");if(!o)throw"No tab content elements found.";for(const t of o)t.style.display="none";const n=e.target.getAttribute("data-tab-content");if(n){const t=document.getElementById(n);if(!t)throw'No tab content element with id "'+n+'" found.';t.style.display="block"}e.target.classList.add("active")});const e=document.querySelector(".tui-tab.active");e?e.click():t[0].click()}function datetimeController(){const t=document.getElementsByClassName("tui-datetime");function e(){for(const e of t){if(null===e)continue;let t=e.getAttribute("data-format");const o=new Date,n=(o.getMonth()+1).toString().padStart(2,"0"),a=o.getDate().toString().padStart(2,"0"),c=(o.getDay()+1).toString().padStart(2,"0"),s=o.getFullYear().toString(),i=o.getHours().toString().padStart(2,"0"),l=(parseInt(i)+24)%"12"||"12",r=o.getMinutes().toString().padStart(2,"0"),d=o.getSeconds().toString().padStart(2,"0"),u=parseInt(i)>=12?"PM":"AM";t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("M",n)).replace("d",a)).replace("e",c)).replace("y",s)).replace("H",i)).replace("h",l)).replace("m",r)).replace("s",d)).replace("a",u),e.innerHTML=t}}t.length&&(e(),setTimeout(()=>{setInterval(e,1e3)},1e3-(new Date).getMilliseconds()))}function sidenavController(){const t=document.querySelector(".tui-sidenav-button");t&&t.addEventListener("click",()=>{const t=document.querySelector(".tui-sidenav");if(!t)throw"No sidenav element found.";t.classList.contains("active")?t.classList.remove("active"):t.classList.add("active")})}function modalController(){const t=document.querySelector(".tui-overlap");if(!t)return;const e=document.getElementsByClassName("tui-modal-button");for(const o of e)o.addEventListener("click",e=>{t.classList.add("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.add("active")}});const o=document.getElementsByClassName("tui-modal-close-button");if(e.length>0&&!o.length)throw"No modal close buttons found.";for(const e of o)e.addEventListener("click",e=>{t.classList.remove("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.remove("active")}})}domReady(function(){tabsController(),datetimeController(),sidenavController(),modalController()});

View File

@ -1,5 +1,6 @@
const { series, src, dest } = require('gulp'); const { series, src, dest } = require('gulp');
const sass = require('gulp-sass'); // const sass = require('gulp-sass');
const sass = require('gulp-sass')(require('sass'));
const gulpClean = require('gulp-clean'); const gulpClean = require('gulp-clean');
const gulpMinify = require('gulp-minify'); const gulpMinify = require('gulp-minify');
const cleanCss = require('gulp-clean-css'); const cleanCss = require('gulp-clean-css');

4698
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "tuicss", "name": "tuicss",
"version": "2.1.1", "version": "2.1.2",
"description": "TuiCss is a library for developing Web applications that uses text-based user interface applications (TUI) as a style", "description": "TuiCss is a library for developing Web applications that uses text-based user interface applications (TUI) as a style",
"keywords": [ "keywords": [
"tui", "tui",
@ -35,6 +35,7 @@
"gulp-copy": "^4.0.1", "gulp-copy": "^4.0.1",
"gulp-minify": "^3.1.0", "gulp-minify": "^3.1.0",
"gulp-rename": "^2.0.0", "gulp-rename": "^2.0.0",
"gulp-sass": "^4.1.0" "gulp-sass": "^5.1.0",
"sass": "^1.62.1"
} }
} }

View File

@ -116,18 +116,20 @@ function datetimeController() {
// parse out the date and time into constants. // parse out the date and time into constants.
const today = new Date(); const today = new Date();
const month = (today.getMonth() + '').length === 2 ? today.getMonth() + 1 : '0' + (today.getMonth() + 1); const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = (today.getDay() + '').length === 2 ? today.getDay() + 1 : '0' + (today.getDay() + 1); const day = today.getDate().toString().padStart(2, '0');
const year = today.getFullYear() + ''; const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
const hour = (today.getHours() + '').length === 2 ? today.getHours() : '0' + today.getHours(); const year = today.getFullYear().toString();
const hour = today.getHours().toString().padStart(2, '0');
const hour12 = (parseInt(hour) + 24) % '12' || '12'; const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = (today.getMinutes() + '').length === 2 ? today.getMinutes() : '0' + today.getMinutes(); const minute = today.getMinutes().toString().padStart(2, '0');
const second = (today.getSeconds() + '').length === 2 ? today.getSeconds() : '0' + today.getSeconds(); const second = today.getSeconds().toString().padStart(2, '0');
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM'; const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
// Replace based on the format. // Replace based on the format.
format = format.replace('M', month); format = format.replace('M', month);
format = format.replace('d', day); format = format.replace('d', day);
format = format.replace('e', dayOfWeek);
format = format.replace('y', year); format = format.replace('y', year);
format = format.replace('H', hour); format = format.replace('H', hour);
format = format.replace('h', hour12); format = format.replace('h', hour12);