-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #565 from cocopon/v4
Version 4.0.0
- Loading branch information
Showing
476 changed files
with
14,962 additions
and
9,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
@import './plugin'; | ||
@use './tp'; | ||
|
||
.#{$prefix}-test { | ||
@extend %button; | ||
@extend %input; | ||
@extend %monitor; | ||
.#{tp.$prefix}-test { | ||
@extend %tp-button; | ||
@extend %tp-input; | ||
@extend %tp-monitor; | ||
|
||
transition-duration: $fold-transition-duration; | ||
background-color: tp.cssVar('input-bg'); | ||
color: tp.cssVar('input-fg'); | ||
transition-duration: tp.$fold-transition-duration; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Entry point for plugins | ||
|
||
@forward './common/defs'; | ||
|
||
@forward './view/placeholder/button'; | ||
@forward './view/placeholder/container'; | ||
@forward './view/placeholder/folder'; | ||
@forward './view/placeholder/input'; | ||
@forward './view/placeholder/list'; | ||
@forward './view/placeholder/monitor'; | ||
@forward './view/placeholder/texts'; | ||
@forward './view/placeholder/theme'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,128 +1,74 @@ | ||
// Geometry | ||
$separator-width: 2px; | ||
$slider-knob-size: 12px; | ||
|
||
// Z-index | ||
$z-index-picker: 1000; | ||
|
||
@mixin themeVariable($in-name, $ex-name, $value) { | ||
--#{$in-name}: var(--#{$prefix}-#{$ex-name}, #{$value}); | ||
} | ||
|
||
%themeVariables { | ||
$base-hue: 230; | ||
$color-exdark: hsl($base-hue, 7%, 0%); | ||
$color-dark: hsl($base-hue, 7%, 17%); | ||
$color-light: hsl($base-hue, 7%, 70%); | ||
$color-exlight: hsl($base-hue, 7%, 75%); | ||
$bg-color: $color-dark; | ||
$fg-color: $color-exlight; | ||
@use 'sass:map'; | ||
@use 'sass:string'; | ||
|
||
@include themeVariable( | ||
'font-family', | ||
'font-family', | ||
('Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace) | ||
); | ||
// TODO: Rename | ||
@include themeVariable('bs-br', 'base-border-radius', 6px); | ||
@include themeVariable('cnt-h-p', 'container-horizontal-padding', 4px); | ||
@include themeVariable('cnt-v-p', 'container-vertical-padding', 4px); | ||
@include themeVariable('elm-br', 'element-border-radius', 2px); | ||
@include themeVariable('bld-s', 'blade-spacing', 4px); | ||
@include themeVariable('bld-us', 'blade-unit-size', 20px); | ||
$prefix: 'tp'; | ||
|
||
// Base | ||
@include themeVariable('bs-bg', 'base-background-color', $bg-color); | ||
@include themeVariable('bs-sh', 'base-shadow-color', rgba(black, 0.2)); | ||
// Classes for view states | ||
$disabled: #{$prefix}-v-disabled; | ||
$first: #{$prefix}-v-fst; | ||
$hidden: #{$prefix}-v-hidden; | ||
$last: #{$prefix}-v-lst; | ||
$very-first: #{$prefix}-v-vfst; | ||
$very-last: #{$prefix}-v-vlst; | ||
|
||
// Button | ||
@include themeVariable('btn-bg', 'button-background-color', $color-light); | ||
@include themeVariable( | ||
'btn-bg-a', | ||
'button-background-color-active', | ||
lighten($color-light, 15%) | ||
); | ||
@include themeVariable( | ||
'btn-bg-f', | ||
'button-background-color-focus', | ||
lighten($color-light, 10%) | ||
); | ||
@include themeVariable( | ||
'btn-bg-h', | ||
'button-background-color-hover', | ||
lighten($color-light, 5%) | ||
); | ||
@include themeVariable('btn-fg', 'button-foreground-color', $bg-color); | ||
|
||
// Container | ||
@include themeVariable( | ||
'cnt-bg', | ||
'container-background-color', | ||
rgba($fg-color, 0.1) | ||
); | ||
@include themeVariable( | ||
'cnt-bg-a', | ||
'container-background-color-active', | ||
rgba($fg-color, 0.25) | ||
); | ||
@include themeVariable( | ||
'cnt-bg-f', | ||
'container-background-color-focus', | ||
rgba($fg-color, 0.2) | ||
); | ||
@include themeVariable( | ||
'cnt-bg-h', | ||
'container-background-color-hover', | ||
rgba($fg-color, 0.15) | ||
); | ||
@include themeVariable('cnt-fg', 'container-foreground-color', $fg-color); | ||
|
||
// Input | ||
@include themeVariable( | ||
'in-bg', | ||
'input-background-color', | ||
rgba($fg-color, 0.1) | ||
); | ||
@include themeVariable( | ||
'in-bg-a', | ||
'input-background-color-active', | ||
rgba($fg-color, 0.25) | ||
); | ||
@include themeVariable( | ||
'in-bg-f', | ||
'input-background-color-focus', | ||
rgba($fg-color, 0.2) | ||
); | ||
@include themeVariable( | ||
'in-bg-h', | ||
'input-background-color-hover', | ||
rgba($fg-color, 0.15) | ||
); | ||
@include themeVariable('in-fg', 'input-foreground-color', $fg-color); | ||
// Common Sass variables | ||
$fold-transition-duration: 0.2s; | ||
$separator-width: 2px; | ||
$slider-knob-size: 12px; | ||
$z-index-picker: 1000; | ||
|
||
// Label | ||
@include themeVariable( | ||
'lbl-fg', | ||
'label-foreground-color', | ||
rgba($fg-color, 0.7) | ||
); | ||
// CSS variables | ||
// Use short names to reduce file size | ||
$css-vars: ( | ||
'base-bg': 'bs-bg', | ||
'base-border-radius': 'bs-br', | ||
'base-font': 'bs-ff', | ||
'base-shadow': 'bs-sh', | ||
'blade-border-radius': 'bld-br', | ||
'blade-h-padding': 'bld-hp', | ||
'blade-value-width': 'bld-vw', | ||
'button-bg': 'btn-bg', | ||
'button-bg-active': 'btn-bg-a', | ||
'button-bg-focus': 'btn-bg-f', | ||
'button-bg-hover': 'btn-bg-h', | ||
'button-fg': 'btn-fg', | ||
'container-bg': 'cnt-bg', | ||
'container-bg-active': 'cnt-bg-a', | ||
'container-bg-focus': 'cnt-bg-f', | ||
'container-bg-hover': 'cnt-bg-h', | ||
'container-fg': 'cnt-fg', | ||
'container-h-padding': 'cnt-hp', | ||
'container-unit-size': 'cnt-usz', | ||
'container-unit-spacing': 'cnt-usp', | ||
'container-v-padding': 'cnt-vp', | ||
'groove-fg': 'grv-fg', | ||
'input-bg': 'in-bg', | ||
'input-bg-active': 'in-bg-a', | ||
'input-bg-focus': 'in-bg-f', | ||
'input-bg-hover': 'in-bg-h', | ||
'input-fg': 'in-fg', | ||
'label-fg': 'lbl-fg', | ||
'monitor-bg': 'mo-bg', | ||
'monitor-fg': 'mo-fg', | ||
); | ||
|
||
// Monitor | ||
@include themeVariable( | ||
'mo-bg', | ||
'monitor-background-color', | ||
rgba($color-exdark, 0.2) | ||
); | ||
@include themeVariable( | ||
'mo-fg', | ||
'monitor-foreground-color', | ||
rgba($fg-color, 0.7) | ||
); | ||
@function cssVar($name) { | ||
$short-name: map.get($css-vars, $name); | ||
@if $short-name == null { | ||
@error 'Short CSS variable for \'#{$name}\' not found.'; | ||
} | ||
@return string.unquote('var(--' + $short-name + ')'); | ||
} | ||
|
||
// Groove | ||
@include themeVariable( | ||
'grv-fg', | ||
'groove-foreground-color', | ||
rgba($fg-color, 0.1) | ||
); | ||
// Reset user agent style | ||
%tp-resetUserAgent { | ||
appearance: none; | ||
background-color: transparent; | ||
border-width: 0; | ||
font-family: inherit; | ||
font-size: inherit; | ||
font-weight: inherit; | ||
margin: 0; | ||
outline: none; | ||
padding: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.