Compare commits

...

106 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
Phoenix G
cce4321cb7
Grammar in readme
* eligible -> legible; mistaken word
* checked also -> also checked; natural flow (optional)
* use -> using; gerund form, since it follows 'start'
* the TuiCss -> TuiCss; unnecessary article (optional)
* On the other hand -> Alternatively; you are not comparing contrasting viewpoints
* contribute for -> contribute to; Not a mistake, since there is a list of things _for_ this project, but we don't say 'contribute for' (optional)
2021-11-30 15:03:29 -08:00
Vinicius Reif Biavatti
12fede6337
Merge pull request #32 from kopiro/patch-1
Fixed respoitory typo
2021-11-23 12:44:25 +00:00
Flavio De Stefano
6d5d6d4eae
Fixed respoitory typo 2021-11-17 19:43:18 +01:00
Vinicius Reif Biavatti
8bba5df891
Merge pull request #31 from vinibiavatti1/develop
Develop to Master
2021-10-05 18:31:46 +01:00
Vinicius Reif Biavatti
01738c4d14
Merge branch 'master' into develop 2021-10-05 18:31:35 +01:00
dependabot[bot]
9906cb9e4e 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-10-05 18:24:30 +01:00
Vinicius Reif Biavatti
87b08691a7
Merge pull request #27 from vinibiavatti1/dependabot/npm_and_yarn/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7
2021-10-05 18:22:27 +01:00
Vinícius Biavatti
1a917e286d fixed setinterval memory leak bug;
fixed media queries not imported;
created mobile example;
2021-10-05 18:20:26 +01: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
dependabot[bot]
20e3203587
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-11 10:42:54 +00:00
Vinícius Biavatti
70fa065f3f Update some examples and version 2021-06-04 19:56:27 +01:00
Vinícius Biavatti
aae4aa10e8 Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2021-06-04 19:20:36 +01:00
Vinícius Biavatti
ad00f3b0a4 added resource images for new features 2021-06-04 19:20:20 +01:00
Vinícius Biavatti
fc5c9aec58 added resource images for new features 2021-06-04 19:19:07 +01:00
Vinicius Reif Biavatti
b7ef555db5
Merge pull request #25 from vinibiavatti1/develop
Develop to Master
2021-06-04 19:13:43 +01:00
Vinicius Reif Biavatti
5dbfa6dccf
Merge branch 'master' into develop 2021-06-04 19:13:33 +01:00
Vinicius Reif Biavatti
b214b7edb7
Merge pull request #21 from vinibiavatti1/dependabot/npm_and_yarn/y18n-3.2.2
Bump y18n from 3.2.1 to 3.2.2
2021-06-04 19:09:15 +01:00
Vinicius Reif Biavatti
dfa31f3d68
Merge pull request #23 from vinibiavatti1/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.20 to 4.17.21
2021-06-04 19:08:36 +01:00
Vinícius Biavatti
5066e216bb Update dependencies version 2021-06-04 19:07:03 +01:00
Vinicius Reif Biavatti
d8add7642d
Merge pull request #22 from ellisgl/master
Package updates.
2021-06-04 19:00:25 +01:00
dependabot[bot]
3b92c8b92b
Bump lodash from 4.17.20 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-10 12:25:12 +00:00
Ellis
b1c1466ae2
Merge pull request #3 from ellisgl/dependabot/npm_and_yarn/hosted-git-info-2.8.9
Bump hosted-git-info from 2.8.4 to 2.8.9
2021-05-08 15:30:32 -05:00
Ellis
4ed8daf5f7
Merge pull request #1 from ellisgl/dependabot/npm_and_yarn/yargs-parser-5.0.1
Bump yargs-parser from 5.0.0 to 5.0.1
2021-05-08 15:29:54 -05:00
dependabot[bot]
44aa556f2d
Bump hosted-git-info from 2.8.4 to 2.8.9
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.4 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-08 20:24:51 +00:00
dependabot[bot]
c8a12f96c8
Bump yargs-parser from 5.0.0 to 5.0.1
Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/v5.0.1/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs-parser/compare/v5.0.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-08 20:24:41 +00:00
dependabot[bot]
83adac6c0a
Bump y18n from 3.2.1 to 3.2.2
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 01:31:57 +00:00
Vinícius Biavatti
d91cd6a15a Border radius fix, forecast example, disabled classes, tabs example, buttons example 2021-01-06 20:34:44 +00:00
Vinicius Reif Biavatti
120b5d8ce1
Merge pull request #14 from vinibiavatti1/develop
Develop
2020-12-31 19:11:01 +00:00
vinibiavatti
2fcb4261e9 Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2020-12-31 19:09:37 +00:00
vinibiavatti
4e8cbbab79 Changed version 2020-12-31 19:09:26 +00:00
Vinicius Reif Biavatti
e70a06ccf4
Update README.md 2020-12-31 19:07:59 +00:00
vinibiavatti
01d76178df Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2020-12-31 18:53:45 +00:00
vinibiavatti
c217b0a499 gulp rename update 2020-12-31 18:53:34 +00:00
Vinicius Reif Biavatti
2594e1252c
Update README.md 2020-12-31 18:44:08 +00:00
Vinicius Reif Biavatti
2ad89f2a9a
Update README.md 2020-12-31 18:43:55 +00:00
Vinicius Reif Biavatti
e110177a79
Update README.md 2020-12-31 18:40:58 +00:00
Vinicius Reif Biavatti
2b45410389
Update README.md 2020-12-31 18:40:40 +00:00
Vinicius Reif Biavatti
4502b3a16a
Update README.md 2020-12-31 18:39:47 +00:00
vinibiavatti
94ab44a568 Add contributing.md 2020-12-31 17:35:10 +00:00
vinibiavatti
eb471ba142 Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2020-12-31 17:27:13 +00:00
vinibiavatti
49a78e22d6 update package 2020-12-31 17:26:59 +00:00
Vinicius Reif Biavatti
579b0dcfb7
Update README.md 2020-12-31 17:10:48 +00:00
Vinicius Reif Biavatti
f98dd2abf9
Update README.md 2020-12-31 17:08:10 +00:00
vinibiavatti
20b1670d56 Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2020-12-31 16:56:42 +00:00
vinibiavatti
e91dfcf5e5 Changed the keywords of package 2020-12-31 16:56:28 +00:00
Vinicius Reif Biavatti
ba740a766b
Update README.md 2020-12-28 13:28:08 +00:00
Vinicius Reif Biavatti
139be101a4
Update README.md 2020-12-28 13:26:16 +00:00
vinibiavatti
1007d5c1a0 Merge branch 'develop' of https://github.com/vinibiavatti1/TuiCss into develop 2020-12-28 13:23:38 +00:00
vinibiavatti
993dd0d2f3 Demo image updated 2020-12-28 13:23:28 +00:00
Vinicius Reif Biavatti
a2a39a113e
Update README.md 2020-12-28 12:47:00 +00:00
Vinicius Reif Biavatti
f7faecd33e
Update README.md 2020-12-28 12:45:32 +00:00
Vinicius Reif Biavatti
5a415e1bd7
Update README.md 2020-12-28 12:39:54 +00:00
vinibiavatti
c08398bf63 Created logo 2020-12-28 12:38:56 +00:00
vinibiavatti
4fd7f76200 Chart (Part 1) 2020-12-28 00:35:22 +00:00
vinibiavatti
6dff41b95a Removed Jquery from example pages 2020-12-27 23:27:24 +00:00
Vinicius Reif Biavatti
64b94b4f2c
Merge pull request #8 from ellisgl/issue-7
#7  Convert to vanilla JS (ES6+). No more jQuery.
2020-12-27 23:11:28 +00:00
vinibiavatti
d15e6415a8 Chart feature (Part 1) 2020-12-27 23:01:10 +00:00
ellisgl
de578dd6d4 issue-7 Add IntelliJ directory to git ignore. 2020-12-18 13:46:25 -06:00
ellisgl
ec84e8f727 issue-7 More docs. Throw some errors. Optimizations to save a couple CPU cycles. 2020-12-18 13:31:02 -06:00
ellisgl
b1c098a1dc issue-7 Add missing tab content element. 2020-12-18 13:30:19 -06:00
ellisgl
4825bed608 issue-7 Fixes. 2020-12-18 11:33:29 -06:00
ellisgl
bdb456fcb5 issue-7 Remove jQuery. 2020-12-18 11:32:39 -06:00
ellisgl
be3b8b8501 issue-7 Remove jQuery. 2020-12-18 11:32:26 -06:00
ellisgl
76f6f1df6a issue-7 Remove jQuery. 2020-12-18 11:31:58 -06:00
ellisgl
d8ef5f0425 issue-7 Remove jQuery. 2020-12-18 10:50:51 -06:00
ellisgl
2cfcb82555 issue-7 Update main JS be to be vanilla ES6+. No jQuery. 2020-12-18 10:50:23 -06:00
ellisgl
5ae67e05c9 issue-7 Update packages. 2020-12-18 09:42:17 -06:00
Vinicius Reif Biavatti
845713b822
Merge pull request #4 from vinibiavatti1/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-12-16 23:47:43 +00:00
Vinicius Reif Biavatti
9ca30ca6a8
Merge pull request #5 from vinibiavatti1/dependabot/npm_and_yarn/node-sass-4.14.1
Bump node-sass from 4.12.0 to 4.14.1
2020-12-16 23:47:32 +00:00
Vinicius Reif Biavatti
ac9de80e9e
Merge pull request #6 from vinibiavatti1/dependabot/npm_and_yarn/ini-1.3.7
Bump ini from 1.3.5 to 1.3.7
2020-12-16 23:47:18 +00:00
Vinicius Reif Biavatti
c0634cf10b
Update README.md 2020-12-16 00:53:46 +00:00
dependabot[bot]
e7b988cce2
Bump ini from 1.3.5 to 1.3.7
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 19:57:47 +00:00
dependabot[bot]
c9c57746bb
Bump node-sass from 4.12.0 to 4.14.1
Bumps [node-sass](https://github.com/sass/node-sass) from 4.12.0 to 4.14.1.
- [Release notes](https://github.com/sass/node-sass/releases)
- [Changelog](https://github.com/sass/node-sass/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sass/node-sass/compare/v4.12.0...v4.14.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-04 18:31:20 +00:00
dependabot[bot]
2275806f41
Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-18 04:37:05 +00:00
Vinicius Reif Biavatti
56b2c99882
Merge pull request #3 from vinibiavatti1/add-license-1
Create LICENSE.md
2019-09-17 13:51:24 -03:00
Vinicius Reif Biavatti
4c4e254c6a
Create LICENSE.md 2019-09-17 13:50:46 -03:00
55 changed files with 6027 additions and 3907 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 *:

1
.gitignore vendored
View File

@ -1 +1,2 @@
node_modules node_modules
.idea

60
CHANGELOG.md Normal file
View File

@ -0,0 +1,60 @@
# TuiCss ChangeLog
### This is the change log of TuiCss. Here you can find the documentations of the feature of each released version
#### 2.1.1
Bugs
- Fixed memory leak due to setinterval for clocks: https://github.com/vinibiavatti1/TuiCss/pull/29
- Imported media queries classes to tuicss.scss: https://github.com/vinibiavatti1/TuiCss/issues/30
Examples
- Created the mobile example
#### 2.1.0
- .disabled classes
- Fixed the default radius border of inputs
- Removed pointer events of checkbox and radio button
- Tabs and buttons example pages
- Remove padding of inputs
- .no-border util
- Forecast example
#### 2.0.0
- Jquery removed (Now use vanilla Javascript)
- Chart example page
- Readme update
- Changelog markdown
- Chart component
- NPM Package
#### 1.0.0
- Utilities
- Examples
- DOS font
- Wiki documentation
- Button component
- Checkbox component
- Divider component
- Dropdown component
- Fieldset component
- Input component
- Navbar component
- Panel component
- Progressbar component
- Radio component
- Scrollbar component
- Sidenav component
- Statusbar component
- Table component
- Tablegrid component
- Tabs component
- Textarea component
- Window component
- Screen component
- Datetime component
- Shortcut component
- Shadow component
- Background component
- Border component
- Grid component
- Modal component

1
CONTRIBUTING.md Normal file
View File

@ -0,0 +1 @@
Click [here](https://github.com/vinibiavatti1/TuiCss/wiki/Contributing) to access the contributing page on the wiki!

21
LICENSE.md Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Vinicius Reif Biavatti
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,9 +1,37 @@
# TuiCss <p align="center">
### Text-based user interface CSS framework <a href="https://github.com/vinibiavatti1/TuiCss">
<img src="https://raw.githubusercontent.com/vinibiavatti1/TuiCss/develop/resources/TUICSS%20Logo%20160x160%20transparent.png" />
</a>
</p>
TuiCss is a framework focused to create web applications using an interface based in ASCII table, like MS-DOS applications. This kind of interface is very eligible because the ultra-contrast colors used and the less effects of the elements. The main framework thats is following to develop TuiCss is <a href="https://en.wikipedia.org/wiki/Turbo_Vision">Turbo Vision Framework</a> with some techniques with [box-drawing characters](https://en.wikipedia.org/wiki/Box-drawing_character), but some others frameworks were checked too, like [curses](https://en.wikipedia.org/wiki/Curses_(programming_library)), [ncurses](https://en.wikipedia.org/wiki/Ncurses), [Newt](https://en.wikipedia.org/wiki/Newt_(programming_library)), etc. Check the examples page in the wiki to see some creations! <h3 align="center">TuiCss</h3>
<img src="https://i.ibb.co/zhJMy1h/Tui-Css-home.png" width="600"> <p align="center">
Text-based user interface CSS library
<br>
<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>
<a href="https://badge.fury.io/js/tuicss">
<img src="https://badge.fury.io/js/tuicss.svg" alt="npm version badge">
</a>
</p>
### About
TuiCss is a library focused to create web applications using an interface based on ASCII table, like the old MS-DOS applications. This kind of interface is very legible because the ultra-contrast colors used and because the reduced effects used on the components in the view. The base of this project is <a href="https://en.wikipedia.org/wiki/Turbo_Vision">Turbo Vision Framework</a>, but some other frameworks were also checked to introduce some features to TuiCss, like [curses](https://en.wikipedia.org/wiki/Curses_(programming_library)), [ncurses](https://en.wikipedia.org/wiki/Ncurses), [Newt](https://en.wikipedia.org/wiki/Newt_(programming_library)), etc. Check the examples page in the wiki to stay on top of some creations, or check the getting started page to start using this library!
<img src="https://raw.githubusercontent.com/vinibiavatti1/TuiCss/develop/resources/TUICSS%20Demo.png" width="676">
### Getting Started
To start to use TuiCss in your project, you can just download the repository content and import the files that are in the dist folder with the html directives. Alternatively, you can install the package with NPM using the following command:
```bash
$ npm install tuicss
```
For more details, visit the [Getting Started Page](https://github.com/vinibiavatti1/TuiCss/wiki/Getting-Started) in the repository wiki.
### Documentation ### Documentation
Check the [repository wiki](https://github.com/vinibiavatti1/TuiCss/wiki) to access the documentation, getting started, components index, examples, styles, or to know how to contribute for this project. Check the [repository wiki](https://github.com/vinibiavatti1/TuiCss/wiki) to access the documentation, components index, examples, styles, or to know how to contribute to this project.

2251
dist/tuicss.css vendored

File diff suppressed because it is too large Load Diff

266
dist/tuicss.js vendored
View File

@ -1,78 +1,174 @@
/** /**
* Init * Replacement for jQuery's $(document).ready() function.
* This is handy in making sure stuff fires after the DOM is ready to be touched.
* Stolen from:https://stackoverflow.com/a/53601942/344028
*
* @param fn Callback.
*/ */
$(document).ready(function() { function domReady(fn) {
tabsController(); // If we're early to the party
datetimeController(); document.addEventListener('DOMContentLoaded', fn);
sidenavController();
modalController(); // If late; I mean on time.
}); if (document.readyState === 'interactive' || document.readyState === 'complete') {
fn();
}
}
/** /**
* TuiTabs controller * TuiTabs controller
*/ */
function tabsController() { function tabsController() {
$(".tui-tab").click(function(event) { // Get all the tab elements (typically li tags).
$(".tui-tab-content").hide(); const tabs = document.getElementsByClassName('tui-tab');
let tabContentid = $(this).attr('data-tab-content');
$(`#${tabContentid}`).show(); if (!tabs.length) {
$(".tui-tab").removeClass("active"); // No tabs found, return early and save a couple CPU cycles.
$(this).addClass("active"); return;
}
for (const tab of tabs) {
// Add click listeners to them.
tab.addEventListener('click', function (e) {
// Check if the clicked tab is disabled
if(e.target.classList.contains("disabled")) {
return;
}
// Remove the 'active' class from any and all tabs.
for (const otherTab of tabs) {
otherTab.classList.remove('active');
}
// Get the content element.
const tabContents = document.getElementsByClassName('tui-tab-content');
if (tabContents) {
for (const tabContent of tabContents) {
// Hide all tab contents.
tabContent.style.display = 'none';
}
} else {
throw 'No tab content elements found.'
}
// Get the id of the tab contents we want to show.
const tabContentId = e.target.getAttribute('data-tab-content');
if (tabContentId) {
const tabContent = document.getElementById(tabContentId);
if (tabContent) {
// Show the tab contents.
tabContent.style.display = 'block';
} else {
throw 'No tab content element with id "' + tabContentId + '" found.';
}
}
// We are not going to throw an error here, since we could make the tab do something else that a tab
// normally wouldn't do.
// Set the clicked tab to have the 'active' class so we can use it in the next part.
e.target.classList.add('active');
}); });
$('.tui-tab.active').click(); }
// Grab the first tab with the active class.
const activeTab = document.querySelector('.tui-tab.active');
if (activeTab) {
// Now click it 'click' it.
activeTab.click();
} else {
// Nothing found, just click the first tab foud.
tabs[0].click()
}
} }
/** /**
* Date field controller * Date/time field controller
*/ */
function datetimeController() { function datetimeController() {
// Get date/time elements.
const clocks = document.getElementsByClassName('tui-datetime');
if(!$(".tui-datetime").length) return; if (!clocks.length) {
// No date time elements found, return early and save a couple CPU cycles.
return;
}
// Kick off our clock interval stuff.
datetimeInterval(); datetimeInterval();
// Synchronize time and set interval to control the clocks
setTimeout(() => {
setInterval(datetimeInterval, 1000); setInterval(datetimeInterval, 1000);
}, 1000 - new Date().getMilliseconds());
function datetimeInterval() { function datetimeInterval() {
let today = new Date(); for (const clock of clocks) {
if (clock === null) {
continue;
}
$(".tui-datetime").each(function() { // Get the format we want to display in the element.
let clock = $(this); let format = clock.getAttribute('data-format');
let format = clock.attr("data-format"); // parse out the date and time into constants.
const today = new Date();
const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = today.getDate().toString().padStart(2, '0');
const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
const year = today.getFullYear().toString();
const hour = today.getHours().toString().padStart(2, '0');
const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = today.getMinutes().toString().padStart(2, '0');
const second = today.getSeconds().toString().padStart(2, '0');
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
let month = (today.getMonth() + "").length == 2 ? today.getMonth() + 1 : "0" + (today.getMonth() + 1); // Replace based on the format.
let day = (today.getDay() + "").length == 2 ? today.getDay() + 1 : "0" + (today.getDay() + 1); format = format.replace('M', month);
let year = today.getFullYear(); format = format.replace('d', day);
let hour = (today.getHours() + "").length == 2 ? today.getHours() : "0" + today.getHours(); format = format.replace('e', dayOfWeek);
let hour12 = (parseInt(hour) + 24) % 12 || 12; format = format.replace('y', year);
let minute = (today.getMinutes() + "").length == 2 ? today.getMinutes() : "0" + today.getMinutes(); format = format.replace('H', hour);
let second = (today.getSeconds() + "").length == 2 ? today.getSeconds() : "0" + today.getSeconds(); format = format.replace('h', hour12);
let ampm = parseInt(hour) >= 12 ? "PM" : "AM"; format = format.replace('m', minute);
format = format.replace('s', second);
format = format.replace('a', ampm);
format = format.replace("M", month); // Show it in the element.
format = format.replace("d", day); clock.innerHTML = format;
format = format.replace("y", year); }
format = format.replace("H", hour);
format = format.replace("h", hour12);
format = format.replace("m", minute);
format = format.replace("s", second);
format = format.replace("a", ampm);
clock.html(format);
});
} }
} }
/** /**
* Sidenav Controller * Sidenav Controller
* There should only side navigation element at the moment.
*/ */
function sidenavController() { function sidenavController() {
$(".tui-sidenav-button").click(function() { // Get the side navigation button (there should be only one, but if not, we are getting the first one).
let sidenav = $(".tui-sidenav"); const sideNavButton = document.querySelector('.tui-sidenav-button');
if(sidenav.hasClass("active")) {
$(".tui-sidenav").removeClass("active"); if (!sideNavButton) {
// No side navigation button found, return early and save a couple CPU cycles.
return;
}
// Add the click event listener to the buttons.
sideNavButton.addEventListener('click', () => {
// Get the side navigation element (there should be only one, but if not, we are getting the first one).
const sideNav = document.querySelector('.tui-sidenav');
if (sideNav) {
if (sideNav.classList.contains('active')) {
sideNav.classList.remove('active');
} else { } else {
$(".tui-sidenav").addClass("active"); sideNav.classList.add('active');
}
} else {
throw 'No sidenav element found.'
} }
}); });
} }
@ -81,14 +177,80 @@ function sidenavController() {
* Modal controller * Modal controller
*/ */
function modalController() { function modalController() {
$(".tui-modal-button").click(function() { // Get the overlap (overlay) element (there should be only one, but if not, we are getting the first one).
$(".tui-overlap").addClass("active"); const tuiOverlap = document.querySelector('.tui-overlap');
let modalId = $(this).attr("data-modal");
$(`#${modalId}`).addClass("active"); if (!tuiOverlap) {
// No overlap found element, return early and save a couple CPU cycles.
return;
}
// Find modal buttons.
const modalButtons = document.getElementsByClassName('tui-modal-button');
for (const modalButton of modalButtons) {
// Add the click event listener to the buttons.
modalButton.addEventListener('click', (e) => {
// Show the overlap.
tuiOverlap.classList.add('active');
// Get the display element for the modal.
const modalId = e.target.getAttribute('data-modal');
if (modalId) {
const modal = document.getElementById(modalId);
if (modal) {
// Show it.
modal.classList.add('active');
} else {
throw 'No modal element with id of "' + modalId + '" found.';
}
} else {
throw 'Modal close button data-modal attribute is empty or not set.'
}
}); });
$(".tui-modal-close-button").click(function() { }
$(".tui-overlap").removeClass("active");
let modalId = $(this).attr("data-modal"); // Find the close modal buttons.
$(`#${modalId}`).removeClass("active"); const modalCloseButtons = document.getElementsByClassName('tui-modal-close-button');
if (modalButtons.length > 0 && !modalCloseButtons.length) {
// A modal without a close button, is a bad modal.
throw 'No modal close buttons found.'
}
for (const modalCloseButton of modalCloseButtons) {
// Add the click event listener to the buttons.
modalCloseButton.addEventListener('click', (e) => {
// Hide the the overlap.
tuiOverlap.classList.remove('active');
// Get the display element id for the modal.
const modalId = e.target.getAttribute('data-modal');
if (modalId) {
// Get the modal element.
const modal = document.getElementById(modalId);
if (modal) {
// Hide it.
modal.classList.remove('active');
} else {
throw 'No modal element with id of "' + modalId + '" found.';
}
} else {
throw 'Modal close button data-modal attribute is empty or not set.'
}
}); });
}
} }
/**
* Init: This is at the bottom to make sure it is fired correctly.
*/
domReady(function () {
tabsController();
datetimeController();
sidenavController();
modalController();
});

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 tabsController(){$(".tui-tab").click(function(t){$(".tui-tab-content").hide();let e=$(this).attr("data-tab-content");$(`#${e}`).show(),$(".tui-tab").removeClass("active"),$(this).addClass("active")}),$(".tui-tab.active").click()}function datetimeController(){function t(){let t=new Date;$(".tui-datetime").each(function(){let e=$(this),a=e.attr("data-format"),n=2==(t.getMonth()+"").length?t.getMonth()+1:"0"+(t.getMonth()+1),l=2==(t.getDay()+"").length?t.getDay()+1:"0"+(t.getDay()+1),i=t.getFullYear(),o=2==(t.getHours()+"").length?t.getHours():"0"+t.getHours(),c=(parseInt(o)+24)%12||12,s=2==(t.getMinutes()+"").length?t.getMinutes():"0"+t.getMinutes(),r=2==(t.getSeconds()+"").length?t.getSeconds():"0"+t.getSeconds(),u=parseInt(o)>=12?"PM":"AM";a=(a=(a=(a=(a=(a=(a=(a=a.replace("M",n)).replace("d",l)).replace("y",i)).replace("H",o)).replace("h",c)).replace("m",s)).replace("s",r)).replace("a",u),e.html(a)})}$(".tui-datetime").length&&(t(),setInterval(t,1e3))}function sidenavController(){$(".tui-sidenav-button").click(function(){$(".tui-sidenav").hasClass("active")?$(".tui-sidenav").removeClass("active"):$(".tui-sidenav").addClass("active")})}function modalController(){$(".tui-modal-button").click(function(){$(".tui-overlap").addClass("active");let t=$(this).attr("data-modal");$(`#${t}`).addClass("active")}),$(".tui-modal-close-button").click(function(){$(".tui-overlap").removeClass("active");let t=$(this).attr("data-modal");$(`#${t}`).removeClass("active")})}$(document).ready(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

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>BIOS Example</title> <title>BIOS Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>
@ -25,22 +24,22 @@
<tbody> <tbody>
<tr> <tr>
<td rowspan="2" width="60%" class="blue-168-text"> <td rowspan="2" width="60%" class="blue-168-text">
<br>System Time.........:<input type="text" class="tui-input white-168 black-text" value="[09:21:30]" style="width: 135px" /> <br>System Time.........:<input type="text" class="tui-input white-168 black-text" value="[09:21:30]" style="width: 150px" />
<br>System Date.........:<input type="text" class="tui-input white-168 black-text" value="[15/09/1994]" style="width: 135px" /> <br>System Date.........:<input type="text" class="tui-input white-168 black-text" value="[15/09/1994]" style="width: 150px" />
<br> <br>
<br>Legacy Diskette A...:<input type="text" class="tui-input white-168 black-text" value="[1.44/1.25 MB]" style="width: 135px" />] <br>Legacy Diskette A...:<input type="text" class="tui-input white-168 black-text" value="[1.44/1.25 MB]" style="width: 150px" />
<br>Legacy Diskette B...:<input type="text" class="tui-input white-168 black-text" value="[disabeld]" style="width: 135px" /> <br>Legacy Diskette B...:<input type="text" class="tui-input white-168 black-text" value="[disabeld]" style="width: 150px" />
<br> <br>
<br>Primary Master......:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 135px" /> <br>Primary Master......:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 150px" />
<br>Primary Slave.......:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 135px" /> <br>Primary Slave.......:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 150px" />
<br>Secondary Master....:<input type="text" class="tui-input white-168 black-text" value="[CD-ROM]" style="width: 135px" /> <br>Secondary Master....:<input type="text" class="tui-input white-168 black-text" value="[CD-ROM]" style="width: 150px" />
<br>Secondary Slave.....:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 135px" /> <br>Secondary Slave.....:<input type="text" class="tui-input white-168 black-text" value="[None]" style="width: 150px" />
<br> <br>
<br>Keyboard Features...:<input type="text" class="tui-input white-168 black-text" value="[Enter]" style="width: 135px" /> <br>Keyboard Features...:<input type="text" class="tui-input white-168 black-text" value="[Enter]" style="width: 150px" />
<br> <br>
<br>System Memory.......:<input type="text" class="tui-input white-168 black-text" value="[640 KB]" style="width: 135px" /> <br>System Memory.......:<input type="text" class="tui-input white-168 black-text" value="[640 KB]" style="width: 150px" />
<br>Extended Memory.....:<input type="text" class="tui-input white-168 black-text" value="[3568410 KB]" style="width: 135px" /> <br>Extended Memory.....:<input type="text" class="tui-input white-168 black-text" value="[3568410 KB]" style="width: 150px" />
<br>Boot-time Diagnostic:<input type="text" class="tui-input white-168 black-text" value="[Enabled]" style="width: 135px" /> <br>Boot-time Diagnostic:<input type="text" class="tui-input white-168 black-text" value="[Enabled]" style="width: 150px" />
</td> </td>
<td width="40%" class="center">Item Specified Help</td> <td width="40%" class="center">Item Specified Help</td>
</tr> </tr>
@ -52,6 +51,8 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="tui-tab-content tui-content" id="tab-2-content">
</div>
<div class="tui-statusbar absolute cyan-168"> <div class="tui-statusbar absolute cyan-168">
<ul> <ul>
<li><a href="#!"><span class="white-255-text">F1</span> Help</a></li> <li><a href="#!"><span class="white-255-text">F1</span> Help</a></li>

34
examples/buttons.html Normal file
View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en" class="tui-bg-blue-black">
<head>
<meta charset="UTF-8">
<title>Buttons Example</title>
<script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css">
<style>
.tui-button {
width: 100% !important;
margin-bottom: 20px;
}
</style>
</head>
<style>
</style>
<body>
<div class="center" style="margin-top: 100px;">
<div class="tui-window blue-168" style="width: 200px;">
<fieldset class="tui-fieldset">
<legend>Buttons</legend>
<button class="tui-button">Button</button><br>
<input type="button" class="tui-button" value="Input" /><br>
<a href="#!" class="tui-button">Anchor</a><br>
<button class="tui-button orange-168 white-text">Custom</button><br>
<button class="tui-button red-168 disabled" disabled>Disabled</button><br>
<button class="tui-button" style="margin-bottom: 5px;">Focused</button><br>
</fieldset>
</div>
</div>
</body>
</html>

91
examples/chart.html Normal file
View File

@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en" class="tui-bg-blue-black">
<head>
<meta charset="UTF-8">
<title>Chart Example</title>
<script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css">
</head>
<body class="center">
<div style="margin-top: 50px"></div>
<div class="tui-window black-168 left-align">
<fieldset class="tui-fieldset">
<legend class="">Vertical Chart</legend>
<div class="tui-chart-vertical" style="width: 500px; height: 200px;">
<div class="tui-chart-display">
<div class="tui-chart-value red-168 animated" style="height: 80%;">80%</div>
<div class="tui-chart-value green-168" style="height: 30%;">30%</div>
<div class="tui-chart-value blue-168" style="height: 50%;">50%</div>
<div class="tui-chart-value yellow-168" style="height: 90%;">90%</div>
<div class="tui-chart-value purple-168" style="height: 60%;">60%</div>
<div class="tui-chart-value orange-168" style="height: 100%;">100%</div>
<div class="tui-chart-value cyan-168" style="height: 10%;">10%</div>
<div class="tui-chart-value red-168" style="height: 75%;">75%</div>
</div>
<div class="tui-chart-y-axis">
<div class="tui-chart-legend">100%</div>
<div class="tui-chart-legend">80%</div>
<div class="tui-chart-legend">60%</div>
<div class="tui-chart-legend">40%</div>
<div class="tui-chart-legend">20%</div>
</div>
<div class="tui-chart-x-axis">
<div class="tui-chart-legend">s1</div>
<div class="tui-chart-legend">s2</div>
<div class="tui-chart-legend">s3</div>
<div class="tui-chart-legend">s4</div>
<div class="tui-chart-legend">s5</div>
<div class="tui-chart-legend">s6</div>
<div class="tui-chart-legend">s7</div>
<div class="tui-chart-legend">s8</div>
</div>
</div>
</fieldset>
</div>
<br><br>
<div class="tui-window black-168 left-align">
<fieldset class="tui-fieldset">
<legend class="">Horizontal Chart</legend>
<div class="tui-chart-horizontal" style="width: 500px; height: 200px;">
<div class="tui-chart-display">
<div class="tui-chart-value red-168" style="width: 80%;">80%</div>
<div class="tui-chart-value green-168" style="width: 60%;">60%</div>
<div class="tui-chart-value blue-168" style="width: 100%;">100%</div>
</div>
<div class="tui-chart-y-axis">
<div class="tui-chart-legend">2018</div>
<div class="tui-chart-legend">2019</div>
<div class="tui-chart-legend">2020</div>
</div>
<div class="tui-chart-x-axis">
<div class="tui-chart-legend">25%</div>
<div class="tui-chart-legend">50%</div>
<div class="tui-chart-legend">75%</div>
<div class="tui-chart-legend">100%</div>
</div>
</div>
</fieldset>
</div>
<br><br>
<div class="tui-window black-168 left-align">
<fieldset class="tui-fieldset">
<legend class="">Chart (no axis legend)</legend>
<div class="tui-chart-vertical" style="width: 500px; height: 200px;">
<div class="tui-chart-display no-x-axis no-y-axis">
<div class="tui-chart-value red-168 animated" style="height: 50%;">50%</div>
<div class="tui-chart-value green-168" style="height: 70%;">70%</div>
<div class="tui-chart-value blue-168" style="height: 30%;">30%</div>
<div class="tui-chart-value yellow-168" style="height: 100%;">100%</div>
</div>
</div>
</fieldset>
</div>
<br><br>
</body>
</html>

172
examples/forecast.html Normal file
View File

@ -0,0 +1,172 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Forecast Example</title>
<script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css">
<style>
th, td {
padding: 10px!important;
border: none!important;
}
.tui-progress-bar {
margin-bottom: -4px;
}
</style>
</head>
<body>
<div class="tui-screen-800-600 bordered black-255" style="padding: 2px;">
<div class="red-168 full-width white-text" style="padding: 0px 10px;">
FORECAST 1.0
</div>
<br>
<table class="tui-table full-width no-border">
<thead class="white-255-text tui-border-double orange-168-border" style="margin-bottom: 5px;">
<tr class="left-align">
<th>#</th>
<th>LOCATION</th>
<th>TEMPERATURE</th>
<th>STATUS</th>
</tr>
</thead>
<tbody class="tui-border-double orange-168-border">
<tr>
<td class="red-168-text">1</td>
<td>Lisbon</td>
<td>
<span class="green-168-text">&nbsp;8.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 58%"></span>
</div>
]
</td>
<td class="blue-255-text">COLD</td>
</tr>
<tr>
<td class="red-168-text">2</td>
<td>Vancouver</td>
<td>
<span class="green-168-text">&nbsp;9.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 59%"></span>
</div>
]
</td>
<td class="blue-255-text">COLD</td>
</tr>
<tr>
<td class="red-168-text">3</td>
<td>Rio</td>
<td>
<span class="green-168-text">31.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 81%"></span>
</div>
]
</td>
<td class="yellow-255-text">WARM</td>
</tr>
<tr>
<td class="red-168-text">4</td>
<td>Sydney</td>
<td>
<span class="green-168-text">22.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 72%"></span>
</div>
]
</td>
<td class="yellow-255-text">WARM</td>
</tr>
<tr>
<td class="red-168-text">5</td>
<td>New York</td>
<td>
<span class="green-168-text">&nbsp;7.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 57%"></span>
</div>
]
</td>
<td class="blue-255-text">COLD</td>
</tr>
<tr>
<td class="red-168-text">6</td>
<td>London</td>
<td>
<span class="green-168-text">&nbsp;6.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 56%"></span>
</div>
]
</td>
<td class="blue-255-text">COLD</td>
</tr>
<tr>
<td class="red-168-text">7</td>
<td>Paris</td>
<td>
<span class="green-168-text">&nbsp;4.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 54%"></span>
</div>
]
</td>
<td class="cyan-255-text">VERY COLD</td>
</tr>
<tr>
<td class="red-168-text">8</td>
<td>Casablanca</td>
<td>
<span class="green-168-text">17.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 67%"></span>
</div>
]
</td>
<td class="green-168-text">NORMAL</td>
</tr>
<tr>
<td class="red-168-text">9</td>
<td>Reykjavik</td>
<td>
<span class="green-168-text">-1.0</span>
[
<div class="tui-progress-bar inline-block tui-bg-red-black" style="width: 350px;">
<span class="tui-progress red-255" style="width: 49%"></span>
</div>
]
</td>
<td class="cyan-255-text">VERY COLD</td>
</tr>
</tbody>
</table>
<div class="purple-168 full-width white-text" style="padding: 0px 10px; margin-top: 2px;">
<span class="red-168">HIGH</span>: Rio 31.0<br>
<span class="cyan-168">LESS</span>: Reykjavik -1.0
</div>
<br>
<div class="tui-window full-width no-shadow black">
<fieldset class="tui-fieldset center">
<button class="tui-button left">Previous</button>
<span class="center">9/201 records</span>
<button class="tui-button right">Next</button>
</fieldset>
</div>
<div class="red-168 full-width white-text" style="padding: 0px 10px;">
FORECAST 1.0
</div>
</div>
</body>
</html>

View File

@ -1,15 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="tui-bg-blue-black"> <html lang="en" class="tui-bg-blue-black tui-cursor">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Inputs Example</title> <title>Input Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
<style> <style>
.tui-input { .tui-input {
width: 300px; width: 430px;
} }
</style> </style>
</head> </head>
@ -19,6 +18,7 @@
<fieldset class="tui-fieldset"> <fieldset class="tui-fieldset">
<legend class="center">Form</legend> <legend class="center">Form</legend>
Text.......: <input class="tui-input" value="text" /><br> Text.......: <input class="tui-input" value="text" /><br>
Disabled...: <input class="tui-input disabled" disabled value="disabled" /><br>
Number.....: <input class="tui-input" type="number" value="25" /><br> Number.....: <input class="tui-input" type="number" value="25" /><br>
Password...: <input class="tui-input" type="password" value="12345" /><br> Password...: <input class="tui-input" type="password" value="12345" /><br>
Color......: <input class="tui-input" type="color" value="#00FF00" /><br> Color......: <input class="tui-input" type="color" value="#00FF00" /><br>
@ -26,6 +26,11 @@
<option>First</option> <option>First</option>
<option>Second</option> <option>Second</option>
<option>Third</option> <option>Third</option>
<optgroup label="Group">
<option>First</option>
<option>Second</option>
<option>Third</option>
</optgroup>
</select><br> </select><br>
Date.......: <input class="tui-input" type="date" value="2019-01-01" /><br> Date.......: <input class="tui-input" type="date" value="2019-01-01" /><br>
Time.......: <input class="tui-input" type="datetime-local" value="2019-01-01T12:00" /> Time.......: <input class="tui-input" type="datetime-local" value="2019-01-01T12:00" />
@ -40,8 +45,8 @@
<input type="checkbox" /> <input type="checkbox" />
<span></span> <span></span>
</label> </label>
<label class="tui-checkbox">Third <label class="tui-checkbox disabled">Disabled
<input type="checkbox" /> <input type="checkbox" disabled />
<span></span> <span></span>
</label> </label>
</fieldset> </fieldset>
@ -56,14 +61,17 @@
<input type="radio" name="radio" /> <input type="radio" name="radio" />
<span></span> <span></span>
</label> </label>
<label class="tui-radio">Third <label class="tui-radio disabled">Disabled
<input type="radio" name="radio" /> <input type="radio" name="radio" disabled />
<span></span> <span></span>
</label> </label>
</fieldset> </fieldset>
<br> <br>
Textarea<br> Textarea<br>
<textarea class="tui-input" style="width: 100%"></textarea> <textarea class="tui-input" style="width: 100%">Content ...</textarea>
<br>
Disabled Textarea<br>
<textarea class="tui-input disabled" disabled style="width: 100%">Disabled</textarea>
<br> <br>
Multiple<br> Multiple<br>
<select multiple class="tui-input" style="width: 100%"> <select multiple class="tui-input" style="width: 100%">
@ -71,6 +79,11 @@
<option>First</option> <option>First</option>
<option>Second</option> <option>Second</option>
<option>Third</option> <option>Third</option>
<optgroup label="Group">
<option>First</option>
<option>Second</option>
<option>Third</option>
</optgroup>
</select><br> </select><br>
File <input class="tui-input full-width" type="file" /> File <input class="tui-input full-width" type="file" />
</fieldset> </fieldset>

171
examples/mobile.html Normal file
View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html lang="en" class="no-tui-scroll">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mobile Example</title>
<script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css">
<style>
.content {
padding: 40px 0px;
}
.post-img {
width: 100%;
border: 4px solid black;
}
.add-btn {
bottom: 0px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
z-index: 999;
width: 50px;
height: 50px;
}
.post {
margin-bottom: 5px;
width: 100%;
}
</style>
</head>
<body class="tui-bg-blue-black relative">
<!-- Sidenav -->
<nav class="tui-sidenav absolute">
<ul>
<li>
<a href="#!">
<span class="red-168-text">P</span>rofile
<span class="tui-shortcut">ctrl+p</span>
</a>
</li>
<li>
<a href="#!">
<span class="red-168-text">S</span>earch
<span class="tui-shortcut">ctrl+s</span>
</a>
</li>
<li>
<a href="#!">
S<span class="red-168-text">t</span>ory
<span class="tui-shortcut">ctrl+t</span>
</a>
</li>
</ul>
</nav>
<!-- Navbar -->
<nav class="tui-nav">
<span class="tui-datetime" data-format="h:m:s a"></span>
<ul>
<li class="tui-sidenav-button red-168-text"></li>
<li class="tui-dropdown hide-on-med-and-down">
<span class="red-168-text">P</span>rofile
<div class="tui-dropdown-content">
<ul>
<li>
<a href="#!">
<span class="red-168-text">A</span>vatar
</a>
</li>
<li>
<a href="#!">
P<span class="red-168-text">r</span>eferences
<span class="tui-shortcut">F3</span>
</a>
</li>
<li class="tui-dropdown block">
<span class="right"></span>
<span class="red-168-text">M</span>ore
<div class="tui-dropdown-content">
<ul>
<li>
<a href="#!">
<span class="red-168-text">I</span>diom
</a>
</li>
<li>
<a href="#!">
<span class="red-168-text">B</span>locked Users
</a>
</li>
</ul>
</div>
</li>
<div class="tui-black-divider"></div>
<li>
<a href="#!">
<span class="red-168-text">S</span>tories
<span class="tui-shortcut">F10</span>
</a>
</li>
</ul>
</div>
</li>
<li class="tui-dropdown hide-on-med-and-down">
<span class="red-168-text">H</span>elp
</li>
</ul>
</nav>
<!-- Edit panel -->
<div class="content container">
<div class="row">
<div class="col s12 m12 l12 white-text center">
<h3>InstaTui</h3>
<hr>
The best old-school social network<br>
<span class="orange-255 black-text hide-on-small-only">(Try this in a mobile view)</span>
<span class="green-255 black-text hide-on-med-and-up">(√ Mobile view)</span>
</div>
</div>
<div class="row">
<div class="col s12 m4 l4">
<div class="post tui-window">
<fieldset class="tui-fieldset">
John Due says:
<hr>
<img class="post-img" src="resources/winxp.png" />
The winxp bg is amazing!
</fieldset>
</div>
</div>
<div class="col s12 m4 l4">
<div class="post tui-window">
<fieldset class="tui-fieldset">
Jane Due says:
<hr>
<img class="post-img" src="resources/disks.png" />
Bought my first 2 PC games!
</fieldset>
</div>
</div>
<div class="col s12 m4 l4">
<div class="post tui-window">
<fieldset class="tui-fieldset">
Astronaut says:
<hr>
<img class="post-img" src="resources/step.png" />
One small step for man one giant leap for mankind
</fieldset>
</div>
</div>
</div>
</div>
<!-- Status bar -->
<div class="tui-statusbar fixed" style="bottom: 0px;">
<ul>
<li class="right" style="margin-right: 10px;"><a href="#!">Search</a></li>
<li><a href="#!">Profile</a></li>
</ul>
</div>
<button class="tui-button red-168 white-255-text fixed add-btn">+</button>
</body>
</html>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Modal Example</title> <title>Modal Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>PC Startup Example</title> <title>PC Startup Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>
@ -34,6 +33,9 @@
Detecting Secondary Master ...: Skip<br> Detecting Secondary Master ...: Skip<br>
Detecting Secondaty Slave ....: None Detecting Secondaty Slave ....: None
</div> </div>
<div id="session-5" style="display: none">
<br>Found virus! The PC cannot be started. I'm Sorry :(
</div>
<div class="tui-statusbar absolute black white-text"> <div class="tui-statusbar absolute black white-text">
<ul> <ul>
<li style="margin-left: 0px">Press <b>DEL</b> to enter SETUP, <b>Alt+F2</b> to enter EZ flash utility <li style="margin-left: 0px">Press <b>DEL</b> to enter SETUP, <b>Alt+F2</b> to enter EZ flash utility
@ -46,11 +48,16 @@
</div> </div>
</body> </body>
<script> <script>
$(document).ready(function() { window.onload = function() {
setTimeout(function() { $("#session-1").show(); }, 300); setTimeout(function() { showSession("session-1"); }, 300);
setTimeout(function() { $("#session-2").show(); }, 400); setTimeout(function() { showSession("session-2"); }, 400);
setTimeout(function() { $("#session-3").show(); }, 450); setTimeout(function() { showSession("session-3"); }, 450);
setTimeout(function() { $("#session-4").show(); }, 870); setTimeout(function() { showSession("session-4"); }, 870);
}); setTimeout(function() { showSession("session-5"); }, 1500);
};
function showSession(id) {
const session = document.getElementById(id);
session.style.display = "block";
}
</script> </script>
</html> </html>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Pocket Calculator Example</title> <title>Pocket Calculator Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>
@ -43,11 +42,11 @@
</div> </div>
<script> <script>
function digit(digit) { function digit(digit) {
let val = $("#display").val(); let val = document.getElementById("display").value;
$("#display").val(digit + "" + val); document.getElementById("display").value = digit + "" + val;
} }
function clearDisplay() { function clearDisplay() {
$("#display").val(""); document.getElementById("display").value = "";
} }
</script> </script>
</body> </body>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Progress Example</title> <title>Progress Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Register Example</title> <title>Register Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
<style> <style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
examples/resources/step.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Scandisk Example</title> <title>Scandisk Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
<style> <style>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Table Example</title> <title>Table Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
<style> <style>

40
examples/tabs.html Normal file
View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en" class="tui-bg-blue-black">
<head>
<meta charset="UTF-8">
<title>Tabs Example</title>
<script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css">
</head>
<style>
</style>
<body>
<div class="center" style="margin-top: 100px; margin-bottom: 100px;">
<div class="tui-panel white-168" style="width: 400px;">
<div class="tui-tabs red-168">
<ul>
<li><a class="tui-tab active" data-tab-content="tab-1-content">Tab 1</a></li>
<li><a class="tui-tab" data-tab-content="tab-2-content">Tab 2</a></li>
<li><a class="tui-tab disabled" data-tab-content="tab-3-content">Disabled</a></li>
</ul>
</div>
<div class="content black-255-text">
<div class="tui-tab-content" id="tab-1-content">
<h3>Content 1</h3>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit incidunt ullam nemo ad id. Temporibus, impedit reiciendis quidem ea quasi fugiat! Illum unde eaque porro sint voluptates corporis reiciendis tempora?
</div>
<div class="tui-tab-content" id="tab-2-content">
<h3>Content 2</h3>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit incidunt ullam nemo ad id.
</div>
<div class="tui-tab-content" id="tab-3-content">
<h3>Content 3</h3>
You could not see it!
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Turbo Vision Example</title> <title>Turbo Vision Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
</head> </head>

View File

@ -4,7 +4,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Window and Panels Example</title> <title>Window and Panels Example</title>
<script src="plugins/jquery-3.4.1.min.js"></script>
<script src="../dist/tuicss.min.js"></script> <script src="../dist/tuicss.min.js"></script>
<link rel="stylesheet" href="../dist/tuicss.min.css"> <link rel="stylesheet" href="../dist/tuicss.min.css">
<style> <style>
@ -157,8 +156,7 @@ int main()
About About
</div> </div>
<div class="tui-panel-content"> <div class="tui-panel-content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.<br> TuiCss v2.0.0 Made with ♥
Curabitur id vestibulum libero, id fermentum lorem.
<br><br> <br><br>
<div class="center"> <div class="center">
<button class="tui-button white-255" style="width: 80px">OK</button> <button class="tui-button white-255" style="width: 80px">OK</button>

View File

@ -1,6 +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');
@ -13,13 +13,14 @@ function clean() {
.pipe(gulpClean()); .pipe(gulpClean());
} }
// Compile scss // Compile scss and copy to dist folder (.css)
function sassCompile() { function sassCompile() {
return src('src/tuicss.scss') return src('src/tuicss.scss')
.pipe(sass()) .pipe(sass())
.pipe(dest(distPath)); .pipe(dest(distPath));
} }
// Minify css and copy to dist folder (.min.css)
function minifyCss() { function minifyCss() {
return src(distPath + '/tuicss.css') return src(distPath + '/tuicss.css')
.pipe(cleanCss()) .pipe(cleanCss())
@ -29,11 +30,13 @@ function minifyCss() {
.pipe(dest(distPath)); .pipe(dest(distPath));
} }
// Copy js script to dist folder (.js)
function copyScript() { function copyScript() {
return src('src/js/tuicss.js') return src('src/js/tuicss.js')
.pipe(dest(distPath)); .pipe(dest(distPath));
} }
// Minify js script and copy to dist folder (.min.js)
function minifyJs() { function minifyJs() {
return src(distPath + '/tuicss.js') return src(distPath + '/tuicss.js')
.pipe(gulpMinify({ .pipe(gulpMinify({
@ -44,16 +47,19 @@ function minifyJs() {
.pipe(dest(distPath)); .pipe(dest(distPath));
} }
// Copy images to dist folder (/images)
function copyImages() { function copyImages() {
return src('src/images/*') return src('src/images/*')
.pipe(dest(distPath + "/images")); .pipe(dest(distPath + "/images"));
} }
// Copy fonts to dist folder (/fonts)
function copyFonts() { function copyFonts() {
return src('src/fonts/*') return src('src/fonts/*')
.pipe(dest(distPath + "/fonts")); .pipe(dest(distPath + "/fonts"));
} }
// Export
exports.default = series(clean, sassCompile, minifyCss, copyScript, minifyJs, copyImages, copyFonts); exports.default = series(clean, sassCompile, minifyCss, copyScript, minifyJs, copyImages, copyFonts);

4625
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,18 @@
{ {
"name": "tuicss", "name": "tuicss",
"version": "1.0.0", "version": "2.1.2",
"description": "TuiCss is a framework made to develop text-based user interface applications (TUI)", "description": "TuiCss is a library for developing Web applications that uses text-based user interface applications (TUI) as a style",
"keywords": [ "keywords": [
"TUI", "tui",
"Text based user interface", "text based user interface",
"Turbo vision", "frontend",
"TuiCss" "css",
"frameword",
"turbo vision",
"tuicss",
"ncurses",
"msdos",
"ascii"
], ],
"main": "dist/tuicss.min.css", "main": "dist/tuicss.min.css",
"scripts": { "scripts": {
@ -25,10 +31,11 @@
"devDependencies": { "devDependencies": {
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-clean": "^0.4.0", "gulp-clean": "^0.4.0",
"gulp-clean-css": "^4.2.0", "gulp-clean-css": "^4.3.0",
"gulp-copy": "^4.0.1", "gulp-copy": "^4.0.1",
"gulp-minify": "^3.1.0", "gulp-minify": "^3.1.0",
"gulp-rename": "^1.4.0", "gulp-rename": "^2.0.0",
"gulp-sass": "^4.0.2" "gulp-sass": "^5.1.0",
"sass": "^1.62.1"
} }
} }

BIN
resources/TUICSS Demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

BIN
resources/TUICSS Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

BIN
resources/TuiCss Form.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
resources/TuiCss Tabs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
resources/forecast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
resources/tuicss mobile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -10,7 +10,11 @@
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
box-shadow: 10px 10px black; box-shadow: 10px 10px black;
border-radius: 0px;
@include disable-select; @include disable-select;
&.disabled {
text-decoration: line-through;
}
} }
.tui-button:active { .tui-button:active {
background-color: rgb(0, 168, 168)!important; background-color: rgb(0, 168, 168)!important;

112
src/components/chart.scss Normal file
View File

@ -0,0 +1,112 @@
/* Chart container */
.tui-chart-vertical {
position: relative;
background-color: black;
}
.tui-chart-horizontal {
position: relative;
background-color: black;
}
/* Chart display */
.tui-chart-vertical .tui-chart-display {
display: flex;
position: absolute;
top: 0px;
left: 50px;
right: 0px;
bottom: 30px;
align-items: flex-end;
border-bottom: 2px solid white;
border-left: 2px solid white;
&.no-x-axis {
bottom: 0px;
}
&.no-y-axis {
left: 0px;
}
}
.tui-chart-horizontal .tui-chart-display {
display: flex;
position: absolute;
flex-direction: column;
top: 0px;
left: 50px;
right: 0px;
bottom: 30px;
align-items: stretch;
border-bottom: 2px solid white;
border-left: 2px solid white;
&.no-x-axis {
bottom: 0px;
}
&.no-y-axis {
left: 0px;
}
}
/* Chart X axis */
.tui-chart-x-axis {
display: flex;
position: absolute;
height: 30px;
left: 50px;
right: 0px;
bottom: 0px;
line-height: 30px;
}
/* Chart Y axis */
.tui-chart-y-axis {
display: flex;
flex-direction: column;
position: absolute;
top: 0px;
left: 0px;
bottom: 30px;
width: 50px;
}
/* Chart legends */
.tui-chart-vertical .tui-chart-x-axis .tui-chart-legend {
flex: 0 1 100%;
text-align: center;
}
.tui-chart-vertical .tui-chart-y-axis .tui-chart-legend {
flex: 1;
text-align: right;
padding-right: 2px;
display: flex;
align-items: flex-start;
justify-content: flex-end;
}
.tui-chart-horizontal .tui-chart-x-axis .tui-chart-legend {
flex: 0 1 100%;
text-align: right;
}
.tui-chart-horizontal .tui-chart-y-axis .tui-chart-legend {
flex: 1;
text-align: right;
padding-right: 2px;
display: flex;
align-items: center;
justify-content: flex-end;
}
/* Chart value */
.tui-chart-vertical .tui-chart-display .tui-chart-value {
flex: 0 1 100%;
text-align: center;
overflow: hidden;
}
.tui-chart-horizontal .tui-chart-display .tui-chart-value {
flex: 1;
text-align: right;
display: flex;
align-items: center;
align-content: flex-start;
justify-content: flex-end;
overflow: hidden;
}

View File

@ -8,6 +8,9 @@
color: white; color: white;
padding-left: 30px; padding-left: 30px;
@include disable-select; @include disable-select;
&.disabled {
color: rgb(168, 168, 168)
}
} }
.tui-checkbox input { .tui-checkbox input {
position: absolute; position: absolute;
@ -15,6 +18,7 @@
cursor: pointer; cursor: pointer;
top: 0px; top: 0px;
left: 0px; left: 0px;
pointer-events: none;
} }
.tui-checkbox span { .tui-checkbox span {
position: absolute; position: absolute;

View File

@ -1,3 +1,5 @@
@import '../mixins.scss';
.tui-fieldset { .tui-fieldset {
border: 6px white double; border: 6px white double;
padding: 12px; padding: 12px;
@ -36,6 +38,7 @@
cursor: pointer; cursor: pointer;
outline:0; outline:0;
padding: 2px; padding: 2px;
@include disable-select;
&.left { &.left {
right: initial; right: initial;

View File

@ -3,7 +3,11 @@
color: white; color: white;
outline:0; outline:0;
border: none; border: none;
padding: 1px; border-radius: 0px;
&.disabled {
background-color: rgb(168, 168, 168);
color: black;
}
} }
.tui-input:focus { .tui-input:focus {
background-color: rgb(255, 255, 0)!important; background-color: rgb(255, 255, 0)!important;

View File

@ -8,6 +8,9 @@
color: white; color: white;
padding-left: 30px; padding-left: 30px;
@include disable-select; @include disable-select;
&.disabled {
color: rgb(168, 168, 168)
}
} }
.tui-radio input { .tui-radio input {
position: absolute; position: absolute;
@ -15,6 +18,7 @@
cursor: pointer; cursor: pointer;
top: 0px; top: 0px;
left: 0px; left: 0px;
pointer-events: none;
} }
.tui-radio span { .tui-radio span {
position: absolute; position: absolute;

View File

@ -15,6 +15,7 @@
.tui-screen-800-600, .tui-screen-800-600,
.tui-screen-1024-768 { .tui-screen-1024-768 {
position: relative; position: relative;
overflow: hidden;
&.bordered{ &.bordered{
border: 2px solid black; border: 2px solid black;
} }

View File

@ -20,6 +20,9 @@
background-color: rgb(168, 168, 168); background-color: rgb(168, 168, 168);
color: rgb(0, 0, 168); color: rgb(0, 0, 168);
} }
&.disabled {
text-decoration: line-through;
}
} }
.tui-tab-content { .tui-tab-content {
display: none; display: none;

View File

@ -4,4 +4,8 @@
padding: 0px; padding: 0px;
color: rgb(255, 255, 0); color: rgb(255, 255, 0);
outline: none; outline: none;
&.disabled {
background-color: rgb(168, 168, 168);
color: black;
}
} }

View File

@ -1,78 +1,174 @@
/** /**
* Init * Replacement for jQuery's $(document).ready() function.
* This is handy in making sure stuff fires after the DOM is ready to be touched.
* Stolen from:https://stackoverflow.com/a/53601942/344028
*
* @param fn Callback.
*/ */
$(document).ready(function() { function domReady(fn) {
tabsController(); // If we're early to the party
datetimeController(); document.addEventListener('DOMContentLoaded', fn);
sidenavController();
modalController(); // If late; I mean on time.
}); if (document.readyState === 'interactive' || document.readyState === 'complete') {
fn();
}
}
/** /**
* TuiTabs controller * TuiTabs controller
*/ */
function tabsController() { function tabsController() {
$(".tui-tab").click(function(event) { // Get all the tab elements (typically li tags).
$(".tui-tab-content").hide(); const tabs = document.getElementsByClassName('tui-tab');
let tabContentid = $(this).attr('data-tab-content');
$(`#${tabContentid}`).show(); if (!tabs.length) {
$(".tui-tab").removeClass("active"); // No tabs found, return early and save a couple CPU cycles.
$(this).addClass("active"); return;
}
for (const tab of tabs) {
// Add click listeners to them.
tab.addEventListener('click', function (e) {
// Check if the clicked tab is disabled
if(e.target.classList.contains("disabled")) {
return;
}
// Remove the 'active' class from any and all tabs.
for (const otherTab of tabs) {
otherTab.classList.remove('active');
}
// Get the content element.
const tabContents = document.getElementsByClassName('tui-tab-content');
if (tabContents) {
for (const tabContent of tabContents) {
// Hide all tab contents.
tabContent.style.display = 'none';
}
} else {
throw 'No tab content elements found.'
}
// Get the id of the tab contents we want to show.
const tabContentId = e.target.getAttribute('data-tab-content');
if (tabContentId) {
const tabContent = document.getElementById(tabContentId);
if (tabContent) {
// Show the tab contents.
tabContent.style.display = 'block';
} else {
throw 'No tab content element with id "' + tabContentId + '" found.';
}
}
// We are not going to throw an error here, since we could make the tab do something else that a tab
// normally wouldn't do.
// Set the clicked tab to have the 'active' class so we can use it in the next part.
e.target.classList.add('active');
}); });
$('.tui-tab.active').click(); }
// Grab the first tab with the active class.
const activeTab = document.querySelector('.tui-tab.active');
if (activeTab) {
// Now click it 'click' it.
activeTab.click();
} else {
// Nothing found, just click the first tab foud.
tabs[0].click()
}
} }
/** /**
* Date field controller * Date/time field controller
*/ */
function datetimeController() { function datetimeController() {
// Get date/time elements.
const clocks = document.getElementsByClassName('tui-datetime');
if(!$(".tui-datetime").length) return; if (!clocks.length) {
// No date time elements found, return early and save a couple CPU cycles.
return;
}
// Kick off our clock interval stuff.
datetimeInterval(); datetimeInterval();
// Synchronize time and set interval to control the clocks
setTimeout(() => {
setInterval(datetimeInterval, 1000); setInterval(datetimeInterval, 1000);
}, 1000 - new Date().getMilliseconds());
function datetimeInterval() { function datetimeInterval() {
let today = new Date(); for (const clock of clocks) {
if (clock === null) {
continue;
}
$(".tui-datetime").each(function() { // Get the format we want to display in the element.
let clock = $(this); let format = clock.getAttribute('data-format');
let format = clock.attr("data-format"); // parse out the date and time into constants.
const today = new Date();
const month = (today.getMonth() + 1).toString().padStart(2, '0');
const day = today.getDate().toString().padStart(2, '0');
const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
const year = today.getFullYear().toString();
const hour = today.getHours().toString().padStart(2, '0');
const hour12 = (parseInt(hour) + 24) % '12' || '12';
const minute = today.getMinutes().toString().padStart(2, '0');
const second = today.getSeconds().toString().padStart(2, '0');
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
let month = (today.getMonth() + "").length == 2 ? today.getMonth() + 1 : "0" + (today.getMonth() + 1); // Replace based on the format.
let day = (today.getDay() + "").length == 2 ? today.getDay() + 1 : "0" + (today.getDay() + 1); format = format.replace('M', month);
let year = today.getFullYear(); format = format.replace('d', day);
let hour = (today.getHours() + "").length == 2 ? today.getHours() : "0" + today.getHours(); format = format.replace('e', dayOfWeek);
let hour12 = (parseInt(hour) + 24) % 12 || 12; format = format.replace('y', year);
let minute = (today.getMinutes() + "").length == 2 ? today.getMinutes() : "0" + today.getMinutes(); format = format.replace('H', hour);
let second = (today.getSeconds() + "").length == 2 ? today.getSeconds() : "0" + today.getSeconds(); format = format.replace('h', hour12);
let ampm = parseInt(hour) >= 12 ? "PM" : "AM"; format = format.replace('m', minute);
format = format.replace('s', second);
format = format.replace('a', ampm);
format = format.replace("M", month); // Show it in the element.
format = format.replace("d", day); clock.innerHTML = format;
format = format.replace("y", year); }
format = format.replace("H", hour);
format = format.replace("h", hour12);
format = format.replace("m", minute);
format = format.replace("s", second);
format = format.replace("a", ampm);
clock.html(format);
});
} }
} }
/** /**
* Sidenav Controller * Sidenav Controller
* There should only side navigation element at the moment.
*/ */
function sidenavController() { function sidenavController() {
$(".tui-sidenav-button").click(function() { // Get the side navigation button (there should be only one, but if not, we are getting the first one).
let sidenav = $(".tui-sidenav"); const sideNavButton = document.querySelector('.tui-sidenav-button');
if(sidenav.hasClass("active")) {
$(".tui-sidenav").removeClass("active"); if (!sideNavButton) {
// No side navigation button found, return early and save a couple CPU cycles.
return;
}
// Add the click event listener to the buttons.
sideNavButton.addEventListener('click', () => {
// Get the side navigation element (there should be only one, but if not, we are getting the first one).
const sideNav = document.querySelector('.tui-sidenav');
if (sideNav) {
if (sideNav.classList.contains('active')) {
sideNav.classList.remove('active');
} else { } else {
$(".tui-sidenav").addClass("active"); sideNav.classList.add('active');
}
} else {
throw 'No sidenav element found.'
} }
}); });
} }
@ -81,14 +177,80 @@ function sidenavController() {
* Modal controller * Modal controller
*/ */
function modalController() { function modalController() {
$(".tui-modal-button").click(function() { // Get the overlap (overlay) element (there should be only one, but if not, we are getting the first one).
$(".tui-overlap").addClass("active"); const tuiOverlap = document.querySelector('.tui-overlap');
let modalId = $(this).attr("data-modal");
$(`#${modalId}`).addClass("active"); if (!tuiOverlap) {
// No overlap found element, return early and save a couple CPU cycles.
return;
}
// Find modal buttons.
const modalButtons = document.getElementsByClassName('tui-modal-button');
for (const modalButton of modalButtons) {
// Add the click event listener to the buttons.
modalButton.addEventListener('click', (e) => {
// Show the overlap.
tuiOverlap.classList.add('active');
// Get the display element for the modal.
const modalId = e.target.getAttribute('data-modal');
if (modalId) {
const modal = document.getElementById(modalId);
if (modal) {
// Show it.
modal.classList.add('active');
} else {
throw 'No modal element with id of "' + modalId + '" found.';
}
} else {
throw 'Modal close button data-modal attribute is empty or not set.'
}
}); });
$(".tui-modal-close-button").click(function() { }
$(".tui-overlap").removeClass("active");
let modalId = $(this).attr("data-modal"); // Find the close modal buttons.
$(`#${modalId}`).removeClass("active"); const modalCloseButtons = document.getElementsByClassName('tui-modal-close-button');
if (modalButtons.length > 0 && !modalCloseButtons.length) {
// A modal without a close button, is a bad modal.
throw 'No modal close buttons found.'
}
for (const modalCloseButton of modalCloseButtons) {
// Add the click event listener to the buttons.
modalCloseButton.addEventListener('click', (e) => {
// Hide the the overlap.
tuiOverlap.classList.remove('active');
// Get the display element id for the modal.
const modalId = e.target.getAttribute('data-modal');
if (modalId) {
// Get the modal element.
const modal = document.getElementById(modalId);
if (modal) {
// Hide it.
modal.classList.remove('active');
} else {
throw 'No modal element with id of "' + modalId + '" found.';
}
} else {
throw 'Modal close button data-modal attribute is empty or not set.'
}
}); });
}
} }
/**
* Init: This is at the bottom to make sure it is fired correctly.
*/
domReady(function () {
tabsController();
datetimeController();
sidenavController();
modalController();
});

View File

@ -65,6 +65,9 @@
.no-padding { .no-padding {
padding: 0px!important; padding: 0px!important;
} }
.no-border {
border: none!important;
}
.content { .content {
padding: 12px; padding: 12px;
} }
@ -78,3 +81,7 @@
.cursor-default { .cursor-default {
cursor: default !important; cursor: default !important;
} }
.disabled {
cursor: not-allowed!important;
}

View File

@ -1,5 +1,6 @@
/* Styles */ /* Styles */
@import './styles/global.scss'; @import './styles/global.scss';
@import './styles/media.scss';
@import './styles/color.scss'; @import './styles/color.scss';
@import './styles/util.scss'; @import './styles/util.scss';
@ -30,3 +31,4 @@
@import './components/border.scss'; @import './components/border.scss';
@import './components/grid.scss'; @import './components/grid.scss';
@import './components/modal.scss'; @import './components/modal.scss';
@import './components/chart.scss';