tgui-core 5.10.0 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Dropdown.d.ts +4 -0
- package/dist/components/Dropdown.js +1 -1
- package/dist/components/Floating.d.ts +13 -11
- package/dist/components/Floating.js +1 -1
- package/package.json +1 -1
- package/styles/base.scss +103 -20
- package/styles/colors.scss +107 -40
- package/styles/components/Button.scss +0 -1
- package/styles/components/Dialog.scss +2 -2
- package/styles/components/Dropdown.scss +34 -9
- package/styles/components/MenuBar.scss +4 -4
- package/styles/components/NoticeBox.scss +3 -3
- package/styles/components/NumberInput.scss +6 -6
- package/styles/components/ProgressBar.scss +0 -1
- package/styles/components/Section.scss +4 -4
- package/styles/components/Slider.scss +0 -2
- package/styles/components/Tooltip.scss +2 -2
- package/styles/functions.scss +22 -2
- package/styles/main.scss +2 -2
- package/styles/vars-components.scss +4 -0
- package/styles/vars-colors.scss +0 -114
- package/styles/vars-values.scss +0 -111
|
@@ -32,6 +32,10 @@ type Props = {
|
|
|
32
32
|
iconRotation: number;
|
|
33
33
|
/** Whether or not the icon should spin */
|
|
34
34
|
iconSpin: boolean;
|
|
35
|
+
/** Whether we want to make the search input styled like a regular dropdown button. */
|
|
36
|
+
styledInput: boolean;
|
|
37
|
+
/** Maximum number of items to display before having to scroll */
|
|
38
|
+
maxItems: number;
|
|
35
39
|
/** Width of the dropdown menu in box units. Default: 15 */
|
|
36
40
|
menuWidth: string | number;
|
|
37
41
|
/** Whether or not the arrow on the right hand side of the dropdown button is visible */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as e,jsx as n,jsxs as o}from"react/jsx-runtime";import{KEY as t}from"../common/keys.js";import{classes as r}from"../common/react.js";import{unit as l}from"../common/ui.js";import{useRef as i,useState as d}from"react";import{Button as c}from"./Button.js";import{Floating as s}from"./Floating.js";import{Icon as a}from"./Icon.js";import{Input as u}from"./Input.js";let p=null;function m(e){return"string"==typeof e?e:e.value}function w(w){let{autoScroll:_=!0,buttons:h,className:f,color:y="default",disabled:D,displayText:v,icon:N,iconRotation:g,iconSpin:b,iconOnly:C,styledInput:x,maxItems:j,menuWidth:k,noChevron:S,onClick:B,onSelected:E,options:F=[],over:I,placeholder:M="Select...",searchInput:T,selected:K,fluid:O,width:$=15}=w,[A,L]=d(!1),[P,z]=d(""),U=i(null),V=i(!1),W=i(!1),q=i(null),G=F.findIndex(e=>m(e)===K)||0;function H(e){let n=e;n=e<G?e<2?0:e-2:e>F.length-3?F.length-1:e-2;let o=U.current,t=o?.children[n];o&&t&&(o.scrollTop=t.offsetTop)}function J(e){let n;if(F.length<1||D)return;let o=F.length-1;n=G<0?"next"===e?o:0:"next"===e?G===o?0:G+1:0===G?o:G-1,A&&_&&H(n),E?.(m(F[n]))}let Q=P?F.filter(e=>("string"==typeof e?e:e.displayText||m(e)).toString().toLowerCase().includes(P.toLowerCase())):F,R=I?"top":"bottom";C&&(R=`${R}-start`);let X=j?{"--dropdown-menu-max-height":l(Math.max(Math.min(j,25),3)*function(){if(null!==p)return p;let e=parseFloat(getComputedStyle(document.body).getPropertyValue("--font-size")),n=document.createElement("div");n.className="Dropdown__menu--entry",n.textContent="test",document.body.appendChild(n);let o=parseFloat(getComputedStyle(n).height);return document.body.removeChild(n),p=Number.isNaN(o)||0===o||Number.isNaN(e)||0===e?1.7:o/e}())}:void 0;return o("div",{className:r(["Dropdown",O&&"Dropdown--fluid",T&&x&&`Button--color--${y}`]),children:[n(s,{ref:q,allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:n("div",{className:"Dropdown__menu",ref:U,style:X,children:0===Q.length?n("div",{className:"Dropdown__menu--entry",children:"No options"}):Q.map(e=>{let o=m(e);return n("div",{className:r(["Dropdown__menu--entry",K===o&&"selected"]),onClick:()=>{V.current=!0,E?.(o),z("")},onKeyDown:e=>{e.key===t.Enter&&(V.current=!0,E?.(o),z(""))},children:"string"==typeof e?e:e.displayText},o)})}),contentAutoWidth:!k,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:k?l(k):void 0},disabled:D,onMounted:()=>{A&&_&&-1!==G&&H(G)},onOpenChange:L,placement:R,children:T?o("div",{className:"Dropdown__input-wrapper",style:{width:l($)},children:[n(u,{className:r(["Dropdown__input",x&&"Dropdown__input--styled",f]),placeholder:v?.toString()||M,disabled:D,value:P,alwaysUpdate:!0,onKeyDown:e=>{" "===e.key&&e.stopPropagation()},onEnter:()=>{W.current=!0,q.current?.close()},onChange:z,onBlur:function(e){e&&W.current&&!V.current&&Q.length>0&&(V.current=!0,E?.(m(Q[0]))),V.current=!1,W.current=!1,z("")},fluid:!0}),!S&&n("div",{className:"Dropdown__input-chevron",children:n(a,{className:r(["Dropdown__icon","Dropdown__icon--arrow",A&&"open"]),name:"chevron-down"})})]}):o("div",{className:r(["Dropdown__control",`Button--color--${y}`,D&&"Button--disabled",C&&"Dropdown__control--icon-only",f]),onClick:e=>{(!D||A)&&B?.(e)},onKeyDown:e=>{e.key!==t.Enter||D||B?.(e)},style:{width:l($)},children:[N&&n(a,{className:"Dropdown__icon",name:N,rotation:g,spin:b}),!C&&o(e,{children:[n("span",{className:"Dropdown__selected-text",children:v||K&&m(K)||M}),!S&&n(a,{className:r(["Dropdown__icon","Dropdown__icon--arrow",I&&"over",A&&"open"]),name:"chevron-down"})]})]})}),h&&o(e,{children:[n(c,{className:"Dropdown__button",disabled:D,icon:"chevron-left",onClick:()=>{J("previous")}}),n(c,{className:"Dropdown__button",disabled:D,icon:"chevron-right",onClick:()=>{J("next")}})]})]})}new MutationObserver(()=>{p=null}).observe(document.documentElement,{attributes:!0,attributeFilter:["style"]});export{w as Dropdown};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { type BooleanLike } from '../common/react.ts';
|
|
2
2
|
import { type Placement } from '@floating-ui/react';
|
|
3
3
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
4
|
-
type
|
|
4
|
+
export type FloatingHandle = {
|
|
5
|
+
/** Imperatively close the floating element. */
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* ## Floating
|
|
10
|
+
*
|
|
11
|
+
* Floating lets you position elements so that they don't go out of the bounds of the window.
|
|
12
|
+
*
|
|
13
|
+
* - [Documentation](https://floating-ui.com/docs/react) for more information.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Floating: import("react").ForwardRefExoticComponent<{
|
|
5
16
|
/** Interacting with this element will open the floating element. */
|
|
6
17
|
children: ReactNode;
|
|
7
18
|
/** The content to display like floating. */
|
|
@@ -75,13 +86,4 @@ type Props = {
|
|
|
75
86
|
* Called when mounted
|
|
76
87
|
*/
|
|
77
88
|
onMounted: () => void;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* ## Floating
|
|
81
|
-
*
|
|
82
|
-
* Floating lets you position elements so that they don't go out of the bounds of the window.
|
|
83
|
-
*
|
|
84
|
-
* - [Documentation](https://floating-ui.com/docs/react) for more information.
|
|
85
|
-
*/
|
|
86
|
-
export declare function Floating(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
export {};
|
|
89
|
+
}> & import("react").RefAttributes<FloatingHandle>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{classes as o}from"../common/react.js";import{FloatingPortal as
|
|
1
|
+
import{Fragment as e,jsx as t,jsxs as n}from"react/jsx-runtime";import{classes as o}from"../common/react.js";import{FloatingPortal as a,autoUpdate as i,flip as r,offset as l,safePolygon as s,shift as c,size as d,useClick as m,useDismiss as p,useFloating as g,useHover as f,useInteractions as h,useTransitionStatus as u}from"@floating-ui/react";import{cloneElement as C,forwardRef as F,isValidElement as v,useEffect as w,useImperativeHandle as O,useState as b}from"react";let x=F(function(F,x){let y,{allowedOutsideClasses:R,animationDuration:j,children:k,closeAfterInteract:z,content:E,contentAutoWidth:M,contentClasses:P,contentOffset:S=6,contentStyles:q,disabled:I,hoverDelay:N,hoverOpen:$,hoverSafePolygon:_,handleOpen:A,onMounted:B,placement:D,preventPortal:G,stopChildPropagation:H,onOpenChange:J}=F,[K,L]=b(!1),{refs:Q,floatingStyles:T,context:U}=g({middleware:[l(S),r({padding:6}),c(),M&&d({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})],onOpenChange(e){L(e),J?.(e)},open:K,placement:D||"bottom",transform:!1,whileElementsMounted:(e,t,n)=>(void 0!==B&&B(),i(e,t,n,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1}))});O(x,()=>({close:()=>U.onOpenChange(!1)}));let{isMounted:V,status:W}=u(U,{duration:j||200}),X=p(U,{ancestorScroll:!0,outsidePress:e=>!R||e.target instanceof Element&&!e.target.closest(R)}),Y=m(U,{enabled:!I}),Z=f(U,{enabled:!I,restMs:N||200,handleClose:_?s({requireIntent:!1}):null}),ee=void 0!==A,{getReferenceProps:et,getFloatingProps:en}=h(ee?[]:[X,$?Z:Y]),eo=et({ref:Q.setReference,...H&&{onClick:e=>e.stopPropagation()}}),ea=en({onClick:()=>{z&&U.onOpenChange(!1)},ref:Q.setFloating});w(()=>{ee&&U.onOpenChange(A)},[A]),y=v(k)?C(k,eo):t("div",{...eo,children:k});let ei=t("div",{className:o(["Floating",!j&&"Floating--animated",P]),"data-position":U.placement,"data-transition":W,style:{...T,...q},...ea,children:E});return n(e,{children:[y,V&&!!E&&(G?ei:t(a,{id:"tgui-root",children:ei}))]})});export{x as Floating};
|
package/package.json
CHANGED
package/styles/base.scss
CHANGED
|
@@ -1,29 +1,112 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* TGUI
|
|
3
|
+
* Base variables
|
|
4
|
+
*
|
|
5
|
+
* This file contains all values, like spacings, sizes, etc.
|
|
6
|
+
* You won't find any colors here, just numbers and letters.
|
|
7
|
+
*
|
|
8
|
+
* Made with love by Aylong (https://github.com/AyIong)
|
|
3
9
|
*/
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
:root {
|
|
12
|
+
/* Font */
|
|
13
|
+
--font-size: 12px;
|
|
14
|
+
--font-family: Verdana, Geneva, sans-serif;
|
|
15
|
+
--font-family-mono: Consolas, monospace;
|
|
7
16
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
/* Border thickness */
|
|
18
|
+
--border-thickness-unit: 0.5em;
|
|
19
|
+
/* 1px | 0.085em */
|
|
20
|
+
--border-thickness-tiny: calc(var(--border-thickness-unit) * 0.5 * 0.34);
|
|
21
|
+
/* 2px | 0.17em */
|
|
22
|
+
--border-thickness-small: calc(var(--border-thickness-unit) * 0.34);
|
|
23
|
+
/* 3px | 0.25em */
|
|
24
|
+
--border-thickness-medium: calc(var(--border-thickness-unit) * 0.5);
|
|
25
|
+
/* 4px | 0.33em */
|
|
26
|
+
--border-thickness-large: calc(var(--border-thickness-unit) * 0.66);
|
|
27
|
+
/* 6px | 0.5em */
|
|
28
|
+
--border-thickness-larger: var(--border-thickness-unit);
|
|
14
29
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
30
|
+
/* Border radius */
|
|
31
|
+
--border-radius-unit: 1rem;
|
|
32
|
+
/* 2px | 0.17rem */
|
|
33
|
+
--border-radius-tiny: calc(var(--border-radius-unit) * 0.25 * 0.68);
|
|
34
|
+
/* 3px | 0.25rem */
|
|
35
|
+
--border-radius-small: calc(var(--border-radius-unit) * 0.25);
|
|
36
|
+
/* 4px | 0.33rem */
|
|
37
|
+
--border-radius-medium: calc(var(--border-radius-unit) * 0.33);
|
|
38
|
+
/* 6px | 0.5rem */
|
|
39
|
+
--border-radius-large: calc(var(--border-radius-unit) * 0.5);
|
|
40
|
+
/* 10px | 0.75rem */
|
|
41
|
+
--border-radius-larger: calc(var(--border-radius-unit) * 0.75);
|
|
42
|
+
/* 12px | 1rem*/
|
|
43
|
+
--border-radius-huge: var(--border-radius-unit);
|
|
44
|
+
/* 24px | 2rem*/
|
|
45
|
+
--border-radius-giant: calc(var(--border-radius-unit) * 2);
|
|
46
|
+
/* Maximum border radius. Makes perfect circles */
|
|
47
|
+
--border-radius-circular: 99999px;
|
|
18
48
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
49
|
+
/* Spacing */
|
|
50
|
+
--space-unit: 1em;
|
|
51
|
+
/* 1px | 0.085em */
|
|
52
|
+
--space-xxs: calc(var(--space-unit) * 0.25 * 0.34);
|
|
53
|
+
/* 2px | 0.17em */
|
|
54
|
+
--space-xs: calc(var(--space-unit) * 0.25 * 0.68);
|
|
55
|
+
/* 3px | 0.25em */
|
|
56
|
+
--space-s: calc(var(--space-unit) * 0.25);
|
|
57
|
+
/* 4px | 0.33em */
|
|
58
|
+
--space-sm: calc(var(--space-unit) * 0.33);
|
|
59
|
+
/* 6px | 0.5em */
|
|
60
|
+
--space-m: calc(var(--space-unit) * 0.5);
|
|
61
|
+
/* 8px | 0.66em */
|
|
62
|
+
--space-ml: calc(var(--space-unit) * 0.66);
|
|
63
|
+
/* 10px | 0.75em */
|
|
64
|
+
--space-l: calc(var(--space-unit) * 0.75);
|
|
65
|
+
/* 12px | 1em*/
|
|
66
|
+
--space-xl: var(--space-unit);
|
|
67
|
+
/* 24px | 2em*/
|
|
68
|
+
--space-xxl: calc(var(--space-unit) * 2);
|
|
22
69
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
70
|
+
/* Transition */
|
|
71
|
+
--transition-time-unit: 1s;
|
|
72
|
+
/* 0.1s | 100ms */
|
|
73
|
+
--transition-time-fast: calc(var(--transition-time-unit) * 0.1);
|
|
74
|
+
/* 0.2s | 200ms */
|
|
75
|
+
--transition-time-medium: calc(var(--transition-time-unit) * 0.2);
|
|
76
|
+
/* 0.5s | 500ms */
|
|
77
|
+
--transition-time-slow: calc(var(--transition-time-unit) * 0.5);
|
|
78
|
+
/* 1s | 1000ms */
|
|
79
|
+
--transition-time-slowest: var(--transition-time-unit);
|
|
80
|
+
|
|
81
|
+
/* Shadows */
|
|
82
|
+
--shadow-unit: 1rem;
|
|
83
|
+
/* 0 0 0.5rem */
|
|
84
|
+
--shadow-glow-small: 0 0 calc(var(--shadow-unit) * 0.5);
|
|
85
|
+
/* 0 0 1rem */
|
|
86
|
+
--shadow-glow-medium: 0 0 var(--shadow-unit);
|
|
87
|
+
/* 0 0 2rem */
|
|
88
|
+
--shadow-glow-large: 0 0 calc(var(--shadow-unit) * 2);
|
|
89
|
+
|
|
90
|
+
/* Blur */
|
|
91
|
+
--blur-small: blur(6px);
|
|
92
|
+
--blur-medium: blur(12px);
|
|
93
|
+
--blur-large: blur(24px);
|
|
94
|
+
|
|
95
|
+
/* Adjustments */
|
|
96
|
+
/* Color lightness multiplier. + for FG - for BG */
|
|
97
|
+
--adjust-color: 5;
|
|
98
|
+
/* Color lightness multiplier when hovered */
|
|
99
|
+
--adjust-hover: 10;
|
|
100
|
+
/* Color lightness multiplier when active (clicked) */
|
|
101
|
+
--adjust-active: 7.5;
|
|
26
102
|
|
|
27
|
-
|
|
28
|
-
|
|
103
|
+
/* Cursors */
|
|
104
|
+
--cursor-default: default;
|
|
105
|
+
--cursor-pointer: pointer;
|
|
106
|
+
--cursor-grab: grab;
|
|
107
|
+
--cursor-disabled: var(--cursor-default);
|
|
108
|
+
--cursor-n-resize: n-resize;
|
|
109
|
+
--cursor-s-resize: s-resize;
|
|
110
|
+
--cursor-se-resize: se-resize;
|
|
111
|
+
--cursor-e-resize: e-resize;
|
|
29
112
|
}
|
package/styles/colors.scss
CHANGED
|
@@ -1,40 +1,122 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* TGUI
|
|
3
|
+
* Main Colors
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* This file contains all the main colors that are
|
|
6
|
+
* used elsewhere and are mixed/modified to
|
|
7
|
+
* suit the needs of the components/ui's.
|
|
8
|
+
*
|
|
9
|
+
* The main goal is to standardize colors.
|
|
10
|
+
* When adding new independent colors, you should add them here.
|
|
11
|
+
*
|
|
12
|
+
* Overwriting these variables will have an extreme impact
|
|
13
|
+
* on the global appearance of the entire TGUI, as they are used everywhere.
|
|
14
|
+
* For finer customization of components, use vars-components.scss
|
|
6
15
|
*/
|
|
7
16
|
|
|
8
17
|
@use "sass:color";
|
|
9
18
|
@use "sass:map";
|
|
10
19
|
@use "sass:meta";
|
|
11
20
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
:root {
|
|
22
|
+
/* Background colors */
|
|
23
|
+
--color-base: hsl(0, 0%, 15%);
|
|
24
|
+
--color-section: hsla(0, 0%, 0%, 0.33);
|
|
25
|
+
--color-secondary: hsl(
|
|
26
|
+
from var(--color-base) var(--secondary-hue) var(--secondary-saturation)
|
|
27
|
+
calc(l + var(--secondary-lightness-adjustment))
|
|
28
|
+
);
|
|
29
|
+
--secondary-hue: h;
|
|
30
|
+
--secondary-saturation: s;
|
|
31
|
+
--secondary-lightness-adjustment: 7.5;
|
|
32
|
+
--base-gradient-spread: 2;
|
|
33
|
+
--color-base-start: hsl(
|
|
34
|
+
from var(--color-base) h s calc(l + var(--base-gradient-spread))
|
|
35
|
+
);
|
|
36
|
+
--color-base-end: hsl(
|
|
37
|
+
from var(--color-base) h s calc(l - var(--base-gradient-spread))
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/* Scrollbar */
|
|
41
|
+
--color-scrollbar-base: var(--color-section);
|
|
42
|
+
--color-scrollbar-thumb: hsl(from var(--color-base) h s calc(l + 9.25));
|
|
43
|
+
|
|
44
|
+
/* Candystripe */
|
|
45
|
+
--candystripe-odd: hsla(0, 0%, 0%, 0.25);
|
|
46
|
+
--candystripe-even: transparent;
|
|
47
|
+
|
|
48
|
+
/* Base colors */
|
|
49
|
+
--color-red: hsl(0, 70%, 50%);
|
|
50
|
+
--color-orange: hsl(25, 90%, 50%);
|
|
51
|
+
--color-yellow: hsl(50, 97.5%, 50%);
|
|
52
|
+
--color-olive: hsl(70, 75%, 45%);
|
|
53
|
+
--color-green: hsl(140, 70%, 40%);
|
|
54
|
+
--color-teal: hsl(180, 100%, 35%);
|
|
55
|
+
--color-blue: hsl(210, 65%, 47.5%);
|
|
56
|
+
--color-violet: hsl(260, 60%, 50%);
|
|
57
|
+
--color-purple: hsl(290, 60%, 50%);
|
|
58
|
+
--color-pink: hsl(325, 70%, 50%);
|
|
59
|
+
--color-brown: hsl(25, 47.5%, 45%);
|
|
60
|
+
|
|
61
|
+
/* Additional colors */
|
|
62
|
+
--color-gold: hsl(40, 90%, 50%);
|
|
63
|
+
|
|
64
|
+
/* Grayscale colors */
|
|
65
|
+
--color-black: hsl(0, 0%, 0%);
|
|
66
|
+
--color-white: hsl(0, 0%, 100%);
|
|
67
|
+
--color-grey: hsl(0, 0%, 50%);
|
|
68
|
+
--color-light-grey: hsl(0, 0%, 66.6%);
|
|
69
|
+
--color-gray: var(--color-grey);
|
|
70
|
+
--color-light-gray: var(--color-light-grey);
|
|
71
|
+
|
|
72
|
+
/* Action colors */
|
|
73
|
+
--color-action: hsl(0, 0%, 50%);
|
|
74
|
+
--color-hover: hsl(from var(--color-action) h s l / 0.25);
|
|
75
|
+
--color-active: hsl(from var(--color-action) h s l / 0.3);
|
|
76
|
+
--color-selected: hsl(from var(--color-action) h s l / 0.4);
|
|
77
|
+
|
|
78
|
+
/* Semantic colors */
|
|
79
|
+
--primary-hue: 210;
|
|
80
|
+
--primary-saturation: 37.5%;
|
|
81
|
+
--primary-lightness: 45%;
|
|
82
|
+
--color-primary: hsl(
|
|
83
|
+
var(--primary-hue),
|
|
84
|
+
var(--primary-saturation),
|
|
85
|
+
var(--primary-lightness)
|
|
86
|
+
);
|
|
87
|
+
--color-good: hsl(95, 62.5%, 40%);
|
|
88
|
+
--color-average: hsl(32.5, 90%, 50%);
|
|
89
|
+
--color-bad: hsl(0, 72.5%, 50%);
|
|
90
|
+
--color-label: hsl(from var(--color-primary) h 17.5 57.5);
|
|
28
91
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
92
|
+
/* Text colors */
|
|
93
|
+
--color-text: var(--color-white);
|
|
94
|
+
--color-text-translucent: hsl(from var(--color-text) h s l / 0.5);
|
|
95
|
+
--color-text-translucent-light: hsl(from var(--color-text) h s l / 0.75);
|
|
96
|
+
--color-text-fixed-white: var(--color-white);
|
|
97
|
+
--color-text-fixed-black: var(--color-black);
|
|
98
|
+
|
|
99
|
+
/* Link colors */
|
|
100
|
+
--color-hyperlink: hsl(220, 100%, 70%);
|
|
101
|
+
--color-hyperlink-visited: hsl(260, 100%, 70%);
|
|
102
|
+
--color-hyperlink-new: hsl(0, 100%, 70%);
|
|
103
|
+
--color-hyperlink-new-visited: hsl(15, 100%, 70%);
|
|
104
|
+
|
|
105
|
+
/* Border */
|
|
106
|
+
--color-border: hsla(0, 0%, 100%, 0.1);
|
|
107
|
+
--color-border-dark: hsla(0, 0%, 0%, 0.33);
|
|
108
|
+
--border-primary-saturation: 100;
|
|
109
|
+
--border-primary-lightness: 75;
|
|
110
|
+
--border-primary-alpha: 0.75;
|
|
111
|
+
--color-border-primary: hsl(
|
|
112
|
+
from var(--color-primary) h var(--border-primary-saturation)
|
|
113
|
+
var(--border-primary-lightness) / var(--border-primary-alpha)
|
|
114
|
+
);
|
|
115
|
+
--color-border-secondary: hsl(from var(--color-border-primary) h s l / 1);
|
|
116
|
+
}
|
|
34
117
|
|
|
35
118
|
// Mappings of color names
|
|
36
119
|
$color-map: ();
|
|
37
|
-
|
|
38
120
|
$_gen_map: (
|
|
39
121
|
/* Base colors */ "red": var(--color-red),
|
|
40
122
|
"orange": var(--color-orange),
|
|
@@ -72,18 +154,3 @@ $color-map-keys: map.keys($_gen_map) !default;
|
|
|
72
154
|
)
|
|
73
155
|
);
|
|
74
156
|
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Background and foreground color lightness ratios
|
|
78
|
-
* @deprecated
|
|
79
|
-
*/
|
|
80
|
-
$bg-lightness: -15% !default;
|
|
81
|
-
$fg-lightness: 10% !default;
|
|
82
|
-
|
|
83
|
-
@function bg($color) {
|
|
84
|
-
@return hsl(from $color h s calc(l - var(--adjust-color)));
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
@function fg($color) {
|
|
88
|
-
@return hsl(from $color h s calc(l + var(--adjust-color)));
|
|
89
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
|
|
3
3
|
.Dialog {
|
|
4
4
|
position: fixed;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
font-family: var(--font-family-mono);
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: fn.em(14px);
|
|
17
17
|
background-color: var(--color-base);
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use "../base";
|
|
2
|
+
@use "../functions" as fn;
|
|
2
3
|
@use "./Button" as button;
|
|
3
4
|
|
|
4
5
|
.Dropdown {
|
|
@@ -30,14 +31,25 @@
|
|
|
30
31
|
overflow: hidden;
|
|
31
32
|
flex: 1;
|
|
32
33
|
font-family: var(--font-family);
|
|
33
|
-
font-size:
|
|
34
|
-
line-height:
|
|
35
|
-
height:
|
|
34
|
+
font-size: fn.em(12px);
|
|
35
|
+
line-height: fn.em(16px);
|
|
36
|
+
height: fn.em(22px);
|
|
36
37
|
border-radius: var(--button-border-radius);
|
|
38
|
+
@include button.button-color();
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
&
|
|
40
|
-
|
|
41
|
+
&__input-wrapper {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__input-chevron {
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 4px;
|
|
50
|
+
top: 50%;
|
|
51
|
+
transform: translateY(-50%);
|
|
52
|
+
pointer-events: none;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
55
|
&__selected-text {
|
|
@@ -57,7 +69,7 @@
|
|
|
57
69
|
align-content: center;
|
|
58
70
|
text-align: center;
|
|
59
71
|
height: 100%;
|
|
60
|
-
width:
|
|
72
|
+
width: fn.em(22px);
|
|
61
73
|
transition: transform var(--dropdown-transition);
|
|
62
74
|
|
|
63
75
|
&--arrow {
|
|
@@ -77,7 +89,7 @@
|
|
|
77
89
|
overflow-y: auto;
|
|
78
90
|
scrollbar-width: thin;
|
|
79
91
|
scrollbar-color: var(--color-scrollbar-thumb) transparent;
|
|
80
|
-
max-height:
|
|
92
|
+
max-height: var(--dropdown-menu-max-height);
|
|
81
93
|
padding: var(--space-sm);
|
|
82
94
|
|
|
83
95
|
&--wrapper {
|
|
@@ -95,8 +107,8 @@
|
|
|
95
107
|
white-space: nowrap;
|
|
96
108
|
text-overflow: ellipsis;
|
|
97
109
|
font-family: var(--font-family);
|
|
98
|
-
font-size:
|
|
99
|
-
line-height:
|
|
110
|
+
font-size: fn.em(12px);
|
|
111
|
+
line-height: var(--dropdown-entry-line-height);
|
|
100
112
|
padding: var(--space-xs) var(--space-m);
|
|
101
113
|
border-radius: var(--dropdown-entry-border-radius);
|
|
102
114
|
transition: background-color var(--dropdown-entry-transition);
|
|
@@ -129,3 +141,16 @@
|
|
|
129
141
|
justify-content: center;
|
|
130
142
|
max-width: 2rem;
|
|
131
143
|
}
|
|
144
|
+
|
|
145
|
+
.Dropdown__input--styled {
|
|
146
|
+
--input-background: var(--button-background);
|
|
147
|
+
--input-border-color: var(--color-border-dark);
|
|
148
|
+
--input-border-color-focus: var(--color-border-dark);
|
|
149
|
+
--input-border-disabled: var(--color-border-dark);
|
|
150
|
+
--input-color: var(--button-color);
|
|
151
|
+
--input-color-placeholder: var(--button-color);
|
|
152
|
+
|
|
153
|
+
&.Input::placeholder {
|
|
154
|
+
font-style: normal;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
|
|
3
3
|
.MenuBar {
|
|
4
4
|
display: flex;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
.MenuBar__font {
|
|
8
8
|
font-family: var(--menu-bar-font-family);
|
|
9
|
-
font-size:
|
|
10
|
-
line-height:
|
|
9
|
+
font-size: fn.em(12px);
|
|
10
|
+
line-height: fn.em(17px);
|
|
11
11
|
|
|
12
12
|
&.MenuBar__disabled {
|
|
13
13
|
color: hsl(from currentColor h s l / 0.2);
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
.MenuBar__MenuBarButton-text {
|
|
76
76
|
text-overflow: clip;
|
|
77
77
|
white-space: nowrap;
|
|
78
|
-
height:
|
|
78
|
+
height: fn.em(17px);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.MenuBar__Separator {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
@use "../colors";
|
|
3
3
|
|
|
4
4
|
.NoticeBox {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
);
|
|
13
13
|
background-image: repeating-linear-gradient(
|
|
14
14
|
-45deg,
|
|
15
|
-
transparent 0
|
|
16
|
-
var(--notice-box-stripes)
|
|
15
|
+
transparent 0 fn.em(10px),
|
|
16
|
+
var(--notice-box-stripes) fn.em(10px) fn.em(20px)
|
|
17
17
|
);
|
|
18
18
|
color: var(--notice-box-color);
|
|
19
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
|
|
3
3
|
.NumberInput {
|
|
4
4
|
cursor: var(--cursor-n-resize);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
display: inline-block;
|
|
8
8
|
text-align: right;
|
|
9
|
-
line-height:
|
|
9
|
+
line-height: fn.em(17px);
|
|
10
10
|
padding: 0 var(--space-sm);
|
|
11
11
|
margin-right: var(--space-xs);
|
|
12
12
|
background-color: var(--number-input-background);
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
position: absolute;
|
|
40
40
|
bottom: 0;
|
|
41
41
|
left: 0;
|
|
42
|
-
width:
|
|
42
|
+
width: fn.em(3px);
|
|
43
43
|
box-sizing: border-box;
|
|
44
44
|
border-bottom: var(--border-thickness-tiny) solid
|
|
45
45
|
var(--number-input-border-color-active);
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
border: 0;
|
|
55
55
|
outline: 0;
|
|
56
56
|
width: 100%;
|
|
57
|
-
font-size:
|
|
58
|
-
line-height:
|
|
59
|
-
height:
|
|
57
|
+
font-size: fn.em(12px);
|
|
58
|
+
line-height: fn.em(17px);
|
|
59
|
+
height: fn.em(17px);
|
|
60
60
|
margin: 0;
|
|
61
61
|
padding: 0 var(--space-m);
|
|
62
62
|
font-family: var(--font-family);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
|
|
3
3
|
.Section {
|
|
4
4
|
position: relative;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.Section__titleText {
|
|
24
|
-
font-size:
|
|
24
|
+
font-size: fn.em(14px);
|
|
25
25
|
font-weight: bold;
|
|
26
26
|
color: var(--section-title-color);
|
|
27
27
|
}
|
|
@@ -107,12 +107,12 @@
|
|
|
107
107
|
|
|
108
108
|
// Level 2 section title
|
|
109
109
|
.Section .Section .Section__titleText {
|
|
110
|
-
font-size:
|
|
110
|
+
font-size: fn.em(13px);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
// Level 3 section title
|
|
114
114
|
.Section .Section .Section .Section__titleText {
|
|
115
|
-
font-size:
|
|
115
|
+
font-size: fn.em(12px);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.Section--flex {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../
|
|
1
|
+
@use "../functions" as fn;
|
|
2
2
|
|
|
3
3
|
.Tooltip {
|
|
4
4
|
backdrop-filter: var(--tooltip-blur);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border-radius: var(--tooltip-border-radius);
|
|
7
7
|
box-shadow: 0.1em 0.1em 1.25em -0.1em hsla(0, 0%, 0%, 0.5);
|
|
8
8
|
color: var(--tooltip-color);
|
|
9
|
-
max-width:
|
|
9
|
+
max-width: fn.em(250px);
|
|
10
10
|
padding: var(--space-m) var(--space-l);
|
|
11
11
|
pointer-events: none;
|
|
12
12
|
text-align: left;
|
package/styles/functions.scss
CHANGED
|
@@ -12,12 +12,32 @@
|
|
|
12
12
|
@return math.div($value, $value * 0 + 1);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/* Darken color, to make it more readable if used as a background */
|
|
16
|
+
@function bg($color) {
|
|
17
|
+
@return hsl(from $color h s calc(l - var(--adjust-color)));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Lighten color, to make it more readable if used as a text */
|
|
21
|
+
@function fg($color) {
|
|
22
|
+
@return hsl(from $color h s calc(l + var(--adjust-color)));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Increases perceptual color lightness. */
|
|
16
26
|
@function lighten($color, $amount) {
|
|
17
27
|
@return color.adjust($color, $lightness: $amount * 1%, $space: hsl);
|
|
18
28
|
}
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
/* Decreases perceptual color lightness. */
|
|
21
31
|
@function darken($color, $amount) {
|
|
22
32
|
@return color.adjust($color, $lightness: -$amount * 1%, $space: hsl);
|
|
23
33
|
}
|
|
34
|
+
|
|
35
|
+
/* Converts px to em. Relies on the font-size variable. */
|
|
36
|
+
@function em($px) {
|
|
37
|
+
@return calc($px / var(--font-size) * 1em);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Converts px to rem. Relies on the font-size variable. */
|
|
41
|
+
@function rem($px) {
|
|
42
|
+
@return calc($px / var(--font-size) * 1rem);
|
|
43
|
+
}
|
package/styles/main.scss
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
*
|
|
19
19
|
* Made with love by Aylong (https://github.com/AyIong)
|
|
20
20
|
*/
|
|
21
|
+
@use "./base";
|
|
22
|
+
@use "./functions" as fn;
|
|
21
23
|
|
|
22
24
|
:root {
|
|
23
25
|
/* BlockQuote */
|
|
@@ -54,6 +56,8 @@
|
|
|
54
56
|
--divider-border: var(--border-thickness-small) solid var(--divider-color);
|
|
55
57
|
|
|
56
58
|
/* Dropdown */
|
|
59
|
+
--dropdown-menu-max-height: #{fn.em(200px)};
|
|
60
|
+
--dropdown-entry-line-height: #{fn.em(16px)};
|
|
57
61
|
--dropdown-transition: var(--transition-time-medium);
|
|
58
62
|
--dropdown-menu-color: var(--color-text);
|
|
59
63
|
--dropdown-menu-background: hsl(
|
package/styles/vars-colors.scss
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TGUI
|
|
3
|
-
* Main Colors
|
|
4
|
-
*
|
|
5
|
-
* This file contains all the main colors that are
|
|
6
|
-
* used elsewhere and are mixed/modified to
|
|
7
|
-
* suit the needs of the components/ui's.
|
|
8
|
-
*
|
|
9
|
-
* The main goal is to standardize colors.
|
|
10
|
-
* When adding new independent colors, you should add them here.
|
|
11
|
-
*
|
|
12
|
-
* Overwriting these variables will have an extreme impact
|
|
13
|
-
* on the global appearance of the entire TGUI, as they are used everywhere.
|
|
14
|
-
* For finer customization of components, use vars-components.scss
|
|
15
|
-
*
|
|
16
|
-
* Made with love by Aylong (https://github.com/AyIong)
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
:root {
|
|
20
|
-
/* Background colors */
|
|
21
|
-
--color-base: hsl(0, 0%, 15%);
|
|
22
|
-
--color-section: hsla(0, 0%, 0%, 0.33);
|
|
23
|
-
--color-secondary: hsl(
|
|
24
|
-
from var(--color-base) var(--secondary-hue) var(--secondary-saturation)
|
|
25
|
-
calc(l + var(--secondary-lightness-adjustment))
|
|
26
|
-
);
|
|
27
|
-
--secondary-hue: h;
|
|
28
|
-
--secondary-saturation: s;
|
|
29
|
-
--secondary-lightness-adjustment: 7.5;
|
|
30
|
-
--base-gradient-spread: 2;
|
|
31
|
-
--color-base-start: hsl(
|
|
32
|
-
from var(--color-base) h s calc(l + var(--base-gradient-spread))
|
|
33
|
-
);
|
|
34
|
-
--color-base-end: hsl(
|
|
35
|
-
from var(--color-base) h s calc(l - var(--base-gradient-spread))
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
/* Scrollbar */
|
|
39
|
-
--color-scrollbar-base: var(--color-section);
|
|
40
|
-
--color-scrollbar-thumb: hsl(from var(--color-base) h s calc(l + 9.25));
|
|
41
|
-
|
|
42
|
-
/* Candystripe */
|
|
43
|
-
--candystripe-odd: hsla(0, 0%, 0%, 0.25);
|
|
44
|
-
--candystripe-even: transparent;
|
|
45
|
-
|
|
46
|
-
/* Base colors */
|
|
47
|
-
--color-red: hsl(0, 70%, 50%);
|
|
48
|
-
--color-orange: hsl(25, 90%, 50%);
|
|
49
|
-
--color-yellow: hsl(50, 97.5%, 50%);
|
|
50
|
-
--color-olive: hsl(70, 75%, 45%);
|
|
51
|
-
--color-green: hsl(140, 70%, 40%);
|
|
52
|
-
--color-teal: hsl(180, 100%, 35%);
|
|
53
|
-
--color-blue: hsl(210, 65%, 47.5%);
|
|
54
|
-
--color-violet: hsl(260, 60%, 50%);
|
|
55
|
-
--color-purple: hsl(290, 60%, 50%);
|
|
56
|
-
--color-pink: hsl(325, 70%, 50%);
|
|
57
|
-
--color-brown: hsl(25, 47.5%, 45%);
|
|
58
|
-
|
|
59
|
-
/* Additional colors */
|
|
60
|
-
--color-gold: hsl(40, 90%, 50%);
|
|
61
|
-
|
|
62
|
-
/* Grayscale colors */
|
|
63
|
-
--color-black: hsl(0, 0%, 0%);
|
|
64
|
-
--color-white: hsl(0, 0%, 100%);
|
|
65
|
-
--color-grey: hsl(0, 0%, 50%);
|
|
66
|
-
--color-light-grey: hsl(0, 0%, 66.6%);
|
|
67
|
-
--color-gray: var(--color-grey);
|
|
68
|
-
--color-light-gray: var(--color-light-grey);
|
|
69
|
-
|
|
70
|
-
/* Action colors */
|
|
71
|
-
--color-action: hsl(0, 0%, 50%);
|
|
72
|
-
--color-hover: hsl(from var(--color-action) h s l / 0.25);
|
|
73
|
-
--color-active: hsl(from var(--color-action) h s l / 0.3);
|
|
74
|
-
--color-selected: hsl(from var(--color-action) h s l / 0.4);
|
|
75
|
-
|
|
76
|
-
/* Semantic colors */
|
|
77
|
-
--primary-hue: 210;
|
|
78
|
-
--primary-saturation: 37.5%;
|
|
79
|
-
--primary-lightness: 45%;
|
|
80
|
-
--color-primary: hsl(
|
|
81
|
-
var(--primary-hue),
|
|
82
|
-
var(--primary-saturation),
|
|
83
|
-
var(--primary-lightness)
|
|
84
|
-
);
|
|
85
|
-
--color-good: hsl(95, 62.5%, 40%);
|
|
86
|
-
--color-average: hsl(32.5, 90%, 50%);
|
|
87
|
-
--color-bad: hsl(0, 72.5%, 50%);
|
|
88
|
-
--color-label: hsl(from var(--color-primary) h 17.5 57.5);
|
|
89
|
-
|
|
90
|
-
/* Text colors */
|
|
91
|
-
--color-text: var(--color-white);
|
|
92
|
-
--color-text-translucent: hsl(from var(--color-text) h s l / 0.5);
|
|
93
|
-
--color-text-translucent-light: hsl(from var(--color-text) h s l / 0.75);
|
|
94
|
-
--color-text-fixed-white: var(--color-white);
|
|
95
|
-
--color-text-fixed-black: var(--color-black);
|
|
96
|
-
|
|
97
|
-
/* Link colors */
|
|
98
|
-
--color-hyperlink: hsl(220, 100%, 70%);
|
|
99
|
-
--color-hyperlink-visited: hsl(260, 100%, 70%);
|
|
100
|
-
--color-hyperlink-new: hsl(0, 100%, 70%);
|
|
101
|
-
--color-hyperlink-new-visited: hsl(15, 100%, 70%);
|
|
102
|
-
|
|
103
|
-
/* Border */
|
|
104
|
-
--color-border: hsla(0, 0%, 100%, 0.1);
|
|
105
|
-
--color-border-dark: hsla(0, 0%, 0%, 0.33);
|
|
106
|
-
--border-primary-saturation: 100;
|
|
107
|
-
--border-primary-lightness: 75;
|
|
108
|
-
--border-primary-alpha: 0.75;
|
|
109
|
-
--color-border-primary: hsl(
|
|
110
|
-
from var(--color-primary) h var(--border-primary-saturation)
|
|
111
|
-
var(--border-primary-lightness) / var(--border-primary-alpha)
|
|
112
|
-
);
|
|
113
|
-
--color-border-secondary: hsl(from var(--color-border-primary) h s l / 1);
|
|
114
|
-
}
|
package/styles/vars-values.scss
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TGUI
|
|
3
|
-
* Values Variables
|
|
4
|
-
*
|
|
5
|
-
* This file contains all values, like spacings, sizes, etc.
|
|
6
|
-
* You won't find any colors here, just numbers and letters.
|
|
7
|
-
*
|
|
8
|
-
* Made with love by Aylong (https://github.com/AyIong)
|
|
9
|
-
*/
|
|
10
|
-
:root {
|
|
11
|
-
/* Font */
|
|
12
|
-
--font-size: 12px;
|
|
13
|
-
--font-family: Verdana, Geneva, sans-serif;
|
|
14
|
-
--font-family-mono: Consolas, monospace;
|
|
15
|
-
|
|
16
|
-
/* Border thickness */
|
|
17
|
-
--border-thickness-unit: 0.5em;
|
|
18
|
-
/* 1px | 0.085em */
|
|
19
|
-
--border-thickness-tiny: calc(var(--border-thickness-unit) * 0.5 * 0.34);
|
|
20
|
-
/* 2px | 0.17em */
|
|
21
|
-
--border-thickness-small: calc(var(--border-thickness-unit) * 0.34);
|
|
22
|
-
/* 3px | 0.25em */
|
|
23
|
-
--border-thickness-medium: calc(var(--border-thickness-unit) * 0.5);
|
|
24
|
-
/* 4px | 0.33em */
|
|
25
|
-
--border-thickness-large: calc(var(--border-thickness-unit) * 0.66);
|
|
26
|
-
/* 6px | 0.5em */
|
|
27
|
-
--border-thickness-larger: var(--border-thickness-unit);
|
|
28
|
-
|
|
29
|
-
/* Border radius */
|
|
30
|
-
--border-radius-unit: 1rem;
|
|
31
|
-
/* 2px | 0.17rem */
|
|
32
|
-
--border-radius-tiny: calc(var(--border-radius-unit) * 0.25 * 0.68);
|
|
33
|
-
/* 3px | 0.25rem */
|
|
34
|
-
--border-radius-small: calc(var(--border-radius-unit) * 0.25);
|
|
35
|
-
/* 4px | 0.33rem */
|
|
36
|
-
--border-radius-medium: calc(var(--border-radius-unit) * 0.33);
|
|
37
|
-
/* 6px | 0.5rem */
|
|
38
|
-
--border-radius-large: calc(var(--border-radius-unit) * 0.5);
|
|
39
|
-
/* 10px | 0.75rem */
|
|
40
|
-
--border-radius-larger: calc(var(--border-radius-unit) * 0.75);
|
|
41
|
-
/* 12px | 1rem*/
|
|
42
|
-
--border-radius-huge: var(--border-radius-unit);
|
|
43
|
-
/* 24px | 2rem*/
|
|
44
|
-
--border-radius-giant: calc(var(--border-radius-unit) * 2);
|
|
45
|
-
/* Maximum border radius. Makes perfect circles */
|
|
46
|
-
--border-radius-circular: 99999px;
|
|
47
|
-
|
|
48
|
-
/* Spacing */
|
|
49
|
-
--space-unit: 1em;
|
|
50
|
-
/* 1px | 0.085em */
|
|
51
|
-
--space-xxs: calc(var(--space-unit) * 0.25 * 0.34);
|
|
52
|
-
/* 2px | 0.17em */
|
|
53
|
-
--space-xs: calc(var(--space-unit) * 0.25 * 0.68);
|
|
54
|
-
/* 3px | 0.25em */
|
|
55
|
-
--space-s: calc(var(--space-unit) * 0.25);
|
|
56
|
-
/* 4px | 0.33em */
|
|
57
|
-
--space-sm: calc(var(--space-unit) * 0.33);
|
|
58
|
-
/* 6px | 0.5em */
|
|
59
|
-
--space-m: calc(var(--space-unit) * 0.5);
|
|
60
|
-
/* 8px | 0.66em */
|
|
61
|
-
--space-ml: calc(var(--space-unit) * 0.66);
|
|
62
|
-
/* 10px | 0.75em */
|
|
63
|
-
--space-l: calc(var(--space-unit) * 0.75);
|
|
64
|
-
/* 12px | 1em*/
|
|
65
|
-
--space-xl: var(--space-unit);
|
|
66
|
-
/* 24px | 2em*/
|
|
67
|
-
--space-xxl: calc(var(--space-unit) * 2);
|
|
68
|
-
|
|
69
|
-
/* Transition */
|
|
70
|
-
--transition-time-unit: 1s;
|
|
71
|
-
/* 0.1s | 100ms */
|
|
72
|
-
--transition-time-fast: calc(var(--transition-time-unit) * 0.1);
|
|
73
|
-
/* 0.2s | 200ms */
|
|
74
|
-
--transition-time-medium: calc(var(--transition-time-unit) * 0.2);
|
|
75
|
-
/* 0.5s | 500ms */
|
|
76
|
-
--transition-time-slow: calc(var(--transition-time-unit) * 0.5);
|
|
77
|
-
/* 1s | 1000ms */
|
|
78
|
-
--transition-time-slowest: var(--transition-time-unit);
|
|
79
|
-
|
|
80
|
-
/* Shadows */
|
|
81
|
-
--shadow-unit: 1rem;
|
|
82
|
-
/* 0 0 0.5rem */
|
|
83
|
-
--shadow-glow-small: 0 0 calc(var(--shadow-unit) * 0.5);
|
|
84
|
-
/* 0 0 1rem */
|
|
85
|
-
--shadow-glow-medium: 0 0 var(--shadow-unit);
|
|
86
|
-
/* 0 0 2rem */
|
|
87
|
-
--shadow-glow-large: 0 0 calc(var(--shadow-unit) * 2);
|
|
88
|
-
|
|
89
|
-
/* Blur */
|
|
90
|
-
--blur-small: blur(6px);
|
|
91
|
-
--blur-medium: blur(12px);
|
|
92
|
-
--blur-large: blur(24px);
|
|
93
|
-
|
|
94
|
-
/* Adjustments */
|
|
95
|
-
/* Color lightness multiplier. + for FG - for BG */
|
|
96
|
-
--adjust-color: 5;
|
|
97
|
-
/* Color lightness multiplier wneh hovered */
|
|
98
|
-
--adjust-hover: 10;
|
|
99
|
-
/* Color lightness multiplier when active (clicked) */
|
|
100
|
-
--adjust-active: 7.5;
|
|
101
|
-
|
|
102
|
-
/* Cursors */
|
|
103
|
-
--cursor-default: default;
|
|
104
|
-
--cursor-pointer: pointer;
|
|
105
|
-
--cursor-grab: grab;
|
|
106
|
-
--cursor-disabled: var(--cursor-default);
|
|
107
|
-
--cursor-n-resize: n-resize;
|
|
108
|
-
--cursor-s-resize: s-resize;
|
|
109
|
-
--cursor-se-resize: se-resize;
|
|
110
|
-
--cursor-e-resize: e-resize;
|
|
111
|
-
}
|