mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 11:34:21 +00:00
0.15.0
This commit is contained in:
parent
46ca8c3834
commit
7e37a9087e
35 changed files with 150 additions and 73 deletions
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
/*! For license information please see bundle.00d3e.esm.js.LICENSE.txt */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
docs/bundle.4bee5.esm.js
Normal file
3
docs/bundle.4bee5.esm.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/bundle.4bee5.esm.js.LICENSE.txt
Normal file
1
docs/bundle.4bee5.esm.js.LICENSE.txt
Normal file
|
@ -0,0 +1 @@
|
|||
/*! For license information please see bundle.4bee5.esm.js.LICENSE.txt */
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle.00d3e.esm.js","sourceRoot":""}
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle.4bee5.esm.js","sourceRoot":""}
|
3
docs/bundle.b3411.js
Normal file
3
docs/bundle.b3411.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/bundle.b3411.js.map
Normal file
1
docs/bundle.b3411.js.map
Normal file
File diff suppressed because one or more lines are too long
1
docs/bundle.e7fa4.css
Normal file
1
docs/bundle.e7fa4.css
Normal file
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang="it"><head><meta charset="utf-8"><title>bluelib</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>body{background-color:#0d193b;color:#a0ccff}</style><link rel="manifest" href="/manifest.json"><link href="/bundle.2e581.css" rel="preload" as="style" onload="this.rel='stylesheet'"><noscript><link rel="stylesheet" href="/bundle.2e581.css"></noscript></head><body><script type="__PREACT_CLI_DATA__">{"preRenderData":{"url":"/"}}</script><script nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" src="/bundle.00d3e.esm.js" type="module"></script><script nomodule="" src="/polyfills.ac517.js"></script><script nomodule="" defer="defer" src="/bundle.123eb.js"></script></body></html>
|
||||
<!DOCTYPE html><html lang="it"><head><meta charset="utf-8"><title>bluelib</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>body{background-color:#0d193b;color:#a0ccff}</style><link rel="manifest" href="/manifest.json"><link href="/bundle.e7fa4.css" rel="preload" as="style" onload="this.rel='stylesheet'"><noscript><link rel="stylesheet" href="/bundle.e7fa4.css"></noscript></head><body><script type="__PREACT_CLI_DATA__">{"preRenderData":{"url":"/"}}</script><script nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" src="/bundle.4bee5.esm.js" type="module"></script><script nomodule="" src="/polyfills.ac517.js"></script><script nomodule="" defer="defer" src="/bundle.b3411.js"></script></body></html>
|
|
@ -1 +1 @@
|
|||
{"/":{"bundle.2e581.css":{"type":"style","weight":1},"bundle.00d3e.esm.js":{"type":"script","weight":1}},"/Sample":{"bundle.2e581.css":{"type":"style","weight":1},"bundle.00d3e.esm.js":{"type":"script","weight":1},"route-Sample.chunk.9bef0.esm.js":{"type":"script","weight":0.9},"route-Sample.chunk.ed931.css":{"type":"style","weight":0.9}}}
|
||||
{"/":{"bundle.e7fa4.css":{"type":"style","weight":1},"bundle.4bee5.esm.js":{"type":"script","weight":1}},"/Sample":{"bundle.e7fa4.css":{"type":"style","weight":1},"bundle.4bee5.esm.js":{"type":"script","weight":1},"route-Sample.chunk.b1d11.esm.js":{"type":"script","weight":0.9},"route-Sample.chunk.ed931.css":{"type":"style","weight":0.9}}}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"version":3,"sources":[],"names":[],"mappings":"","file":"route-Sample.chunk.9bef0.esm.js","sourceRoot":""}
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","file":"route-Sample.chunk.b1d11.esm.js","sourceRoot":""}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
docs/route-Sample.chunk.df4d6.js.map
Normal file
1
docs/route-Sample.chunk.df4d6.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": false,
|
||||
"name": "bluelib",
|
||||
"version": "0.14.5",
|
||||
"version": "0.15.0",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"source": "src/index.js",
|
||||
"main": "dist/index.js",
|
||||
|
|
7
src/components/Bluelib.js
Normal file
7
src/components/Bluelib.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
import theme from './Bluelib.less';
|
||||
|
||||
export default function(props) {
|
||||
return (
|
||||
<div class={theme.bluelib}>{props.children}</div>
|
||||
)
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
@import "constants.less";
|
||||
@import "mixins.less";
|
||||
@import "../styles/constants.less";
|
||||
@import "../styles/mixins.less";
|
||||
|
||||
.bluelib {
|
||||
background-color: @bg;
|
||||
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
|
||||
input:not([type="checkbox"]):not([type="radio"]) {
|
||||
.bordered(@fg; @bg);
|
||||
.input-text(@fg, @bg, @disabledfg, @disabledbg);
|
||||
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
|
@ -56,12 +56,7 @@
|
|||
}
|
||||
|
||||
button, input[type="button"], input[type="submit"] {
|
||||
.bordered(@fg; @bg);
|
||||
|
||||
:not([disabled]) {
|
||||
.hoverable(@fg; @bg);
|
||||
.clickable(@fg; @bg);
|
||||
}
|
||||
.input-btn(@fg, @bg, @disabledfg, @disabledbg);
|
||||
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
|
@ -1,7 +1,7 @@
|
|||
import FormRow from "./FormRow";
|
||||
import style from "./FormRow.less";
|
||||
import concatClass from "../../utils/concatClass";
|
||||
import theme from "../../styles/theme.less";
|
||||
import theme from "../Bluelib.less";
|
||||
|
||||
export default function (props) {
|
||||
return (
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import concatClass from "../../utils/concatClass";
|
||||
import style from "./FormRow.less";
|
||||
import theme from "../../styles/theme.less"
|
||||
|
||||
export default function (props) {
|
||||
let color = null;
|
||||
if(props.disabled) {
|
||||
color = theme.disabled;
|
||||
color = style.disabled;
|
||||
}
|
||||
else if(props.validity) {
|
||||
color = theme[props.validity.validity];
|
||||
color = style[props.validity.validity];
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@import "../../styles/constants.less";
|
||||
@import "../../styles/main.less";
|
||||
|
||||
.label {
|
||||
width: 100%;
|
||||
|
@ -41,3 +41,31 @@
|
|||
.contentschild {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-row(@hfg; @hbg; @hdfg; @hdbg) {
|
||||
color: @hfg;
|
||||
|
||||
input:not([type="checkbox"]):not([type="radio"]) {
|
||||
.input-text(@hfg; @hbg; @hdfg; @hdbg) !important;
|
||||
}
|
||||
|
||||
button, input[type="button"], input[type="submit"] {
|
||||
.input-btn(@hfg; @hbg; @hdfg; @hdbg) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.ok {
|
||||
.form-row(@okfg; @okbg; @disabledfg; @disabledbg);
|
||||
}
|
||||
|
||||
.warning {
|
||||
.form-row(@warningfg; @warningbg; @disabledfg; @disabledbg);
|
||||
}
|
||||
|
||||
.error {
|
||||
.form-row(@errorfg; @errorbg; @disabledfg; @disabledbg);
|
||||
}
|
||||
|
||||
.disabled {
|
||||
.form-row(@disabledfg; @disabledbg; @disabledfg; @disabledbg);
|
||||
}
|
9
src/components/Layout/Unmargin.js
Normal file
9
src/components/Layout/Unmargin.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
import style from "./Unmargin.less";
|
||||
|
||||
export default function(props) {
|
||||
return (
|
||||
<div class={style.unmargin}>
|
||||
{props.children}
|
||||
</div>
|
||||
)
|
||||
}
|
14
src/components/Layout/Unmargin.less
Normal file
14
src/components/Layout/Unmargin.less
Normal file
|
@ -0,0 +1,14 @@
|
|||
.unmargin {
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
|
@ -8,42 +8,40 @@
|
|||
min-width: 256px;
|
||||
}
|
||||
|
||||
.box-mixin(@color) {
|
||||
border: 2px solid fade(@color, 10%);
|
||||
color: @color;
|
||||
background-color: fade(@color, 2%);
|
||||
}
|
||||
|
||||
.default {
|
||||
border: 2px solid fade(@fg, 10%);
|
||||
color: @fg;
|
||||
.box-mixin(@fg);
|
||||
}
|
||||
|
||||
.red {
|
||||
border: 2px solid fade(@red, 10%);
|
||||
color: @red;
|
||||
.box-mixin(@red);
|
||||
}
|
||||
|
||||
.orange {
|
||||
border: 2px solid fade(@orange, 10%);
|
||||
color: @orange;
|
||||
.box-mixin(@orange);
|
||||
}
|
||||
|
||||
.yellow {
|
||||
border: 2px solid fade(@yellow, 10%);
|
||||
color: @yellow;
|
||||
.box-mixin(@yellow);
|
||||
}
|
||||
|
||||
.lime {
|
||||
border: 2px solid fade(@lime, 10%);
|
||||
color: @lime;
|
||||
.box-mixin(@lime);
|
||||
}
|
||||
|
||||
.cyan {
|
||||
border: 2px solid fade(@cyan, 10%);
|
||||
color: @cyan;
|
||||
.box-mixin(@cyan);
|
||||
}
|
||||
|
||||
.blue {
|
||||
border: 2px solid fade(@blue, 10%);
|
||||
color: @blue;
|
||||
.box-mixin(@blue);
|
||||
}
|
||||
|
||||
.magenta {
|
||||
border: 2px solid fade(@magenta, 10%);
|
||||
color: @magenta;
|
||||
.box-mixin(@magenta);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
import Box from "./Box";
|
||||
import Unmargin from "../Layout/Unmargin";
|
||||
|
||||
export default function(props) {
|
||||
return (
|
||||
<Box color={props.color} class={props.class}>
|
||||
<Unmargin>
|
||||
<h3>
|
||||
{props.title}
|
||||
</h3>
|
||||
<div>
|
||||
{props.children}
|
||||
</div>
|
||||
</Unmargin>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import Section from "./components/Panels/Section";
|
|||
import Split from "./components/Layout/Split";
|
||||
import stripTabs from "./utils/stripTabs";
|
||||
import TablePanel from "./components/Panels/TablePanel";
|
||||
import theme from "./styles/theme.less";
|
||||
import theme from "./components/Bluelib.less";
|
||||
import Timer from "./components/Elements/Timer";
|
||||
import Todo from "./components/Elements/Todo";
|
||||
import useFormValidator from "./hooks/useFormValidator";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import theme from "../styles/theme.less";
|
||||
import FormInput from "../components/Forms/FormInput";
|
||||
import FormButton from "../components/Forms/FormButton";
|
||||
import {BoxColors} from "../components/Panels/Box";
|
||||
|
@ -20,11 +19,12 @@ import {
|
|||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import Validity from "../enums/Validity";
|
||||
import style from "./Sample.less";
|
||||
import Bluelib from "../components/Bluelib";
|
||||
|
||||
|
||||
export default function (props) {
|
||||
return (
|
||||
<div class={theme.bluelib}>
|
||||
<Bluelib>
|
||||
<h1>
|
||||
bluelib {process.env.RELEASE}
|
||||
</h1>
|
||||
|
@ -149,6 +149,6 @@ export default function (props) {
|
|||
}}>[AVVIA ANNICHILIMENTO]</FormButton>
|
||||
</Panel>
|
||||
</Section>
|
||||
</div>
|
||||
</Bluelib>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
@import "constants.less";
|
||||
@import "mixins.less";
|
||||
@import "./constants.less";
|
||||
@import "./mixins.less";
|
||||
|
|
|
@ -5,20 +5,46 @@
|
|||
border: 1px solid fade(@hfg, 10%);
|
||||
}
|
||||
|
||||
/// A hoverable element
|
||||
.hoverable(@hfg, @hbg) {
|
||||
&:hover, &.hover {
|
||||
.hover(@hfg; @hbg) {
|
||||
background-color: overlay(fade(@hfg, 10%), @hbg);
|
||||
border: 1px solid @hfg;
|
||||
color: screen(@hfg, #808080);
|
||||
}
|
||||
}
|
||||
|
||||
/// A clickable element
|
||||
.clickable(@hfg, @hbg) {
|
||||
&:active, &.active {
|
||||
.active(@hfg; @hbg) {
|
||||
background-color: overlay(rgba(255, 255, 255, 0.2), @hbg);
|
||||
border: 1px solid white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.input-text(@hfg; @hbg; @hdfg; @hdbg) {
|
||||
&:enabled {
|
||||
.bordered(@hfg; @hbg);
|
||||
|
||||
&:hover, &:focus {
|
||||
.hover(@hfg; @hbg);
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
.bordered(@hdfg, @hdbg);
|
||||
}
|
||||
}
|
||||
|
||||
.input-btn(@hfg; @hbg; @hdfg; @hdbg) {
|
||||
&:enabled {
|
||||
.bordered(@hfg; @hbg);
|
||||
|
||||
&:hover, &:focus {
|
||||
.hover(@hfg; @hbg);
|
||||
}
|
||||
|
||||
&:active {
|
||||
.active(@hfg; @hbg);
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
.bordered(@hdfg, @hdbg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue