First release

This commit is contained in:
Owen Quinlan 2021-07-02 19:29:34 +10:00
commit fa6c85266e
2339 changed files with 761050 additions and 0 deletions

6
node_modules/nes.css/scss/form/_index.scss generated vendored Normal file
View file

@ -0,0 +1,6 @@
@charset "utf-8";
@import "inputs.scss";
@import "radios.scss";
@import "checkboxes.scss";
@import "selects.scss";

106
node_modules/nes.css/scss/form/checkboxes.scss generated vendored Normal file
View file

@ -0,0 +1,106 @@
.nes-checkbox {
// prettier-ignore
$checkbox: (
(1,1,1,1,1,1,1,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,0,0,0,0,0,0,1,0,0),
(1,1,1,1,1,1,1,1,0,0),
);
// prettier-ignore
$checkbox-checked: (
(1,1,1,1,1,1,1,0,1,1),
(1,0,0,0,0,0,0,1,1,1),
(1,0,0,0,0,0,1,1,0,0),
(1,1,0,0,0,1,1,0,0,0),
(1,1,1,0,1,1,0,1,0,0),
(1,0,1,1,1,0,0,1,0,0),
(1,0,0,1,0,0,0,1,0,0),
(1,1,1,1,1,1,1,1,0,0)
);
// prettier-ignore
$checkbox-focus: (
(2,2,2,2,2,2,2,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,0,0,0,0,0,0,2,0,0),
(2,2,2,2,2,2,2,2,0,0),
);
// prettier-ignore
$checkbox-checked-focus: (
(2,2,2,2,2,2,2,0,1,1),
(2,0,0,0,0,0,0,1,1,1),
(1,0,0,0,0,0,1,1,0,0),
(1,1,0,0,0,1,1,0,0,0),
(2,1,1,0,1,1,0,2,0,0),
(2,0,1,1,1,0,0,2,0,0),
(2,0,0,1,0,0,0,2,0,0),
(2,2,2,2,2,2,2,2,0,0)
);
$colors: ($base-color, map-get($default-colors, "shadow"));
$colors-checkbox-dark: ($color-white, map-get($default-colors, "shadow"));
margin-left: 28px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
@include visually-hidden();
& + span {
position: relative;
cursor: $cursor-click-url, pointer;
}
& + span::before,
&:checked + span::before {
position: absolute;
top: -3px;
left: -28px;
content: "";
}
// prettier-ignore
& + span::before { /* stylelint-disable-line no-descending-specificity */
@include pixelize(2px, $checkbox, $colors);
}
// prettier-ignore
&:focus + span::before { /* stylelint-disable-line no-descending-specificity */
@include pixelize(2px, $checkbox-focus, $colors);
}
&:checked + span::before {
@include pixelize(2px, $checkbox-checked, $colors);
}
&:checked:focus + span::before {
@include pixelize(2px, $checkbox-checked-focus, $colors);
}
&.is-dark {
+ span {
color: $color-white;
}
// prettier-ignore
+ span::before { /* stylelint-disable-line no-descending-specificity */
color: $color-white;
}
&:checked + span::before {
@include pixelize(2px, $checkbox-checked-focus, $colors-checkbox-dark);
color: $color-white;
}
&:checked:focus + span::before {
@include pixelize(2px, $checkbox-checked-focus, $colors-checkbox-dark);
color: $color-white;
}
}
}

75
node_modules/nes.css/scss/form/inputs.scss generated vendored Normal file
View file

@ -0,0 +1,75 @@
.nes-input,
.nes-textarea {
@mixin border-style($border, $outline) {
@include compact-border-image($border);
outline-color: $outline;
}
@include compact-rounded-corners();
width: calc(100% - #{2 * $border-size});
padding: 0.5rem 1rem;
margin: 4px;
background-clip: padding-box;
&.is-dark {
@include border-style(map-get($default-colors, "normal"), map-get($default-colors, "hover"));
color: $background-color;
background-color: $base-color;
}
&.is-success {
@include border-style(map-get($success-colors, "normal"), map-get($success-colors, "hover"));
}
&.is-warning {
@include border-style(map-get($warning-colors, "normal"), map-get($warning-colors, "hover"));
}
&.is-error {
@include border-style(map-get($error-colors, "normal"), map-get($error-colors, "hover"));
}
}
.nes-field {
> label {
display: block;
}
.nes-input,
.nes-textarea {
display: block;
}
&.is-inline {
display: flex;
align-items: center;
> label {
flex-basis: 0;
flex-grow: 1;
margin: 0;
margin-right: 1.5rem;
text-align: right;
}
.nes-input,
.nes-textarea {
flex-basis: 0;
flex-grow: 5;
}
}
}
@media screen and (max-width: 768px) {
.nes-field.is-inline {
display: block;
> label {
margin-bottom: 0.5rem; // reboot.css:label
text-align: left;
}
.nes-input {
max-width: 100%;
}
}
}

76
node_modules/nes.css/scss/form/radios.scss generated vendored Normal file
View file

@ -0,0 +1,76 @@
.nes-radio {
// prettier-ignore
$radio: (
(1,1,0,0,0,0),
(1,1,1,1,0,0),
(1,1,1,1,1,0),
(1,1,1,1,1,1),
(1,1,1,1,1,0),
(1,1,1,1,0,0),
(1,1,0,0,0,0),
);
// prettier-ignore
$radio-checked-focus: (
(2,2,0,0,0,0),
(2,2,2,2,0,0),
(2,2,2,2,2,0),
(2,2,2,2,2,2),
(2,2,2,2,2,0),
(2,2,2,2,0,0),
(2,2,0,0,0,0),
);
$colors: ($base-color, map-get($default-colors, "shadow"));
$colors-radio-dark: ($color-white, map-get($default-colors, "shadow"));
margin-right: 20px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
@include visually-hidden();
& + span {
position: relative;
cursor: $cursor-click-url, pointer;
}
&:checked + span::before {
position: absolute;
top: -2px;
left: -20px;
content: "";
@include pixelize(2px, $radio, $colors);
}
&:checked:hover,
&:checked:focus {
& + span::before {
animation: blink 1s infinite steps(1);
}
}
&:checked:focus + span::before {
@include pixelize(2px, $radio-checked-focus, $colors);
}
&.is-dark {
+ span {
color: $color-white;
}
// prettier-ignore
+ span::before { /* stylelint-disable-line no-descending-specificity */
color: $color-white;
}
&:checked + span::before {
@include pixelize(2px, $radio-checked-focus, $colors-radio-dark);
color: $color-white;
}
&:checked:focus + span::before {
@include pixelize(2px, $radio-checked-focus, $colors-radio-dark);
color: $color-white;
}
}
}

70
node_modules/nes.css/scss/form/selects.scss generated vendored Normal file
View file

@ -0,0 +1,70 @@
.nes-select {
// prettier-ignore
$dropdown: (
(1,1,1,1,1,1,1),
(1,1,1,1,1,1,1),
(0,1,1,1,1,1,0),
(0,1,1,1,1,1,0),
(0,0,1,1,1,0,0),
(0,0,0,1,0,0,0),
);
$colors: ($base-color, map-get($default-colors, "shadow"));
position: relative;
width: calc(100% - #{2 * $border-size});
margin: 4px;
select {
@include compact-rounded-corners();
width: 100%;
padding: 0.5rem 2.5rem 0.5rem 1rem;
cursor: $cursor-click-url, pointer;
border-radius: 0;
outline-color: map-get($default-colors, "hover");
-webkit-appearance: none;
appearance: none;
&:invalid {
color: map-get($disabled-colors, shadow);
}
}
&.is-dark select {
color: $background-color;
background-color: $base-color;
}
&::after {
@include pixelize(3px, $dropdown, $colors);
position: absolute;
top: calc(50% - 11px);
right: 36px;
pointer-events: none;
content: "";
}
// prettier-ignore
$types:
"success" map-get($success-colors, "normal") map-get($success-colors, "hover"),
"warning" map-get($warning-colors, "normal") map-get($warning-colors, "hover"),
"error" map-get($error-colors, "normal") map-get($error-colors, "hover"),
"dark" map-get($default-colors, "normal") map-get($default-colors, "hover");
@each $type in $types {
&.is-#{nth($type, 1)} {
$color: nth($type, 2);
&::after {
color: $color;
}
select {
@include compact-border-image($color);
outline-color: nth($type, 3);
}
}
}
}