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.
@@ -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 o,jsx as n,jsxs as e}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 s}from"react";import{Button as c}from"./Button.js";import{Floating as d}from"./Floating.js";import{Icon as a}from"./Icon.js";import{Input as p}from"./Input.js";function m(o){return"string"==typeof o?o:o.value}function u(u){let{autoScroll:w=!0,buttons:_,className:f,color:h="default",disabled:D,displayText:y,icon:g,iconRotation:v,iconSpin:N,iconOnly:C,menuWidth:b,noChevron:x,onClick:j,onSelected:k,options:I=[],over:S,placeholder:T="Select...",searchInput:B,selected:A,fluid:E,width:K=15}=u,[L,O]=s(!1),[$,F]=s(""),M=i(null),U=I.findIndex(o=>m(o)===A)||0;function W(o){let n=o;n=o<U?o<2?0:o-2:o>I.length-3?I.length-1:o-2;let e=M.current,t=e?.children[n];e&&t&&(e.scrollTop=t.offsetTop)}function q(o){let n;if(I.length<1||D)return;let e=I.length-1;n=U<0?"next"===o?e:0:"next"===o?U===e?0:U+1:0===U?e:U-1,L&&w&&W(n),k?.(m(I[n]))}let z=$?I.filter(o=>("string"==typeof o?o:o.displayText||m(o)).toString().toLowerCase().includes($.toLowerCase())):I,G=S?"top":"bottom";return C&&(G=`${G}-start`),e("div",{className:r(["Dropdown",E&&"Dropdown--fluid"]),children:[n(d,{allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:n("div",{className:"Dropdown__menu",ref:M,children:0===z.length?n("div",{className:"Dropdown__menu--entry",children:"No options"}):z.map(o=>{let e=m(o);return n("div",{className:r(["Dropdown__menu--entry",A===e&&"selected"]),onClick:()=>{k?.(e),F("")},onKeyDown:o=>{o.key===t.Enter&&(k?.(e),F(""))},children:"string"==typeof o?o:o.displayText},e)})}),contentAutoWidth:!b,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:b?l(b):void 0},disabled:D,onMounted:()=>{L&&w&&-1!==U&&W(U)},onOpenChange:O,placement:G,children:B?n(p,{className:r(["Dropdown__input",f]),placeholder:y?.toString()||T,disabled:D,value:$,alwaysUpdate:!0,onChange:F}):e("div",{className:r(["Dropdown__control",`Button--color--${h}`,D&&"Button--disabled",C&&"Dropdown__control--icon-only",f]),onClick:o=>{(!D||L)&&j?.(o)},onKeyDown:o=>{o.key!==t.Enter||D||j?.(o)},style:{width:l(K)},children:[g&&n(a,{className:"Dropdown__icon",name:g,rotation:v,spin:N}),!C&&e(o,{children:[n("span",{className:"Dropdown__selected-text",children:y||A&&m(A)||T}),!x&&n(a,{className:r(["Dropdown__icon","Dropdown__icon--arrow",S&&"over",L&&"open"]),name:"chevron-down"})]})]})}),_&&e(o,{children:[n(c,{className:"Dropdown__button",disabled:D,icon:"chevron-left",onClick:()=>{q("previous")}}),n(c,{className:"Dropdown__button",disabled:D,icon:"chevron-right",onClick:()=>{q("next")}})]})]})}export{u as Dropdown};
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 Props = {
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 r,autoUpdate as i,flip as a,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,isValidElement as v,useEffect as w,useState as F}from"react";function b(b){let x,{allowedOutsideClasses:y,animationDuration:O,children:R,closeAfterInteract:j,content:k,contentAutoWidth:z,contentClasses:E,contentOffset:M=6,contentStyles:P,disabled:S,hoverDelay:q,hoverOpen:I,hoverSafePolygon:N,handleOpen:$,onMounted:A,placement:B,preventPortal:D,stopChildPropagation:G,onOpenChange:H}=b,[J,K]=F(!1),{refs:L,floatingStyles:Q,context:T}=g({middleware:[l(M),a({padding:6}),c(),z&&d({apply({rects:e,elements:t}){t.floating.style.width=`${e.reference.width}px`}})],onOpenChange(e){K(e),H?.(e)},open:J,placement:B||"bottom",transform:!1,whileElementsMounted:(e,t,n)=>(void 0!==A&&A(),i(e,t,n,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1}))}),{isMounted:U,status:V}=u(T,{duration:O||200}),W=p(T,{ancestorScroll:!0,outsidePress:e=>!y||e.target instanceof Element&&!e.target.closest(y)}),X=m(T,{enabled:!S}),Y=f(T,{enabled:!S,restMs:q||200,handleClose:N?s({requireIntent:!1}):null}),Z=void 0!==$,{getReferenceProps:_,getFloatingProps:ee}=h(Z?[]:[W,I?Y:X]),et=_({ref:L.setReference,...G&&{onClick:e=>e.stopPropagation()}}),en=ee({onClick:()=>{j&&T.onOpenChange(!1)},ref:L.setFloating});w(()=>{Z&&T.onOpenChange($)},[$]),x=v(R)?C(R,et):t("div",{...et,children:R});let eo=t("div",{className:o(["Floating",!O&&"Floating--animated",E]),"data-position":T.placement,"data-transition":V,style:{...Q,...P},...en,children:k});return n(e,{children:[x,U&&!!k&&(D?eo:t(r,{id:"tgui-root",children:eo}))]})}export{b as Floating};
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
@@ -71,5 +71,5 @@
71
71
  "test": "bun test"
72
72
  },
73
73
  "type": "module",
74
- "version": "5.10.0"
74
+ "version": "5.11.0"
75
75
  }
package/styles/base.scss CHANGED
@@ -1,29 +1,112 @@
1
1
  /**
2
- * @deprecated Use css-variables
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
- @use "sass:color";
6
- @use "sass:math";
11
+ :root {
12
+ /* Font */
13
+ --font-size: 12px;
14
+ --font-family: Verdana, Geneva, sans-serif;
15
+ --font-family-mono: Consolas, monospace;
7
16
 
8
- $color-fg: hsl(0, 0%, 100%) !default;
9
- $color-bg: var(--color-base) !default;
10
- $color-bg-section: var(--color-section) !default;
11
- $color-bg-grad-spread: var(--base-gradient-spread) !default;
12
- $color-bg-start: var(--color-base-start) !default;
13
- $color-bg-end: var(--color-base-end) !default;
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
- $cursor-default: var(--cursor-default) !default;
16
- $cursor-hover: var(--cursor-pointer) !default;
17
- $cursor-disabled: var(--cursor-default) !default;
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
- $unit: 12px;
20
- $font-size: 1 * $unit !default;
21
- $border-radius: 0.16em !default;
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
- @function em($px) {
24
- @return 1em * math.div($px, $unit);
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
- @function rem($px) {
28
- @return 1rem * math.div($px, $unit);
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
  }
@@ -1,40 +1,122 @@
1
1
  /**
2
- * Copyright (c) 2020 Aleksej Komarov
3
- * SPDX-License-Identifier: MIT
2
+ * TGUI
3
+ * Main Colors
4
4
  *
5
- * @deprecated Use css-variables
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
- // Base colors
13
- $black: var(--color-black) !default;
14
- $white: var(--color-white) !default;
15
- $red: var(--color-red) !default;
16
- $orange: var(--color-orange) !default;
17
- $yellow: var(--color-yellow) !default;
18
- $olive: var(--color-olive) !default;
19
- $green: var(--color-green) !default;
20
- $teal: var(--color-teal) !default;
21
- $blue: var(--color-blue) !default;
22
- $violet: var(--color-violet) !default;
23
- $purple: var(--color-purple) !default;
24
- $pink: var(--color-pink) !default;
25
- $brown: var(--color-brown) !default;
26
- $grey: var(--color-grey) !default;
27
- $light-grey: var(--color-light-grey) !default;
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
- $primary: var(--color-primary) !default;
30
- $good: var(--color-good) !default;
31
- $average: var(--color-average) !default;
32
- $bad: var(--color-bad) !default;
33
- $label: var(--color-label) !default;
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,3 @@
1
- @use "../base";
2
1
  @use "../colors";
3
2
 
4
3
  @mixin button-color() {
@@ -1,4 +1,4 @@
1
- @use "../base";
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: base.em(14px);
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: base.em(12px);
34
- line-height: base.em(16px);
35
- height: base.em(22px);
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
- &__control {
40
- @include button.button-color();
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: base.em(22px);
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: base.em(200px);
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: base.em(12px);
99
- line-height: base.em(16px);
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 "../base";
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: base.em(12px);
10
- line-height: base.em(17px);
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: base.em(17px);
78
+ height: fn.em(17px);
79
79
  }
80
80
 
81
81
  .MenuBar__Separator {
@@ -1,4 +1,4 @@
1
- @use "../base";
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 base.em(10px),
16
- var(--notice-box-stripes) base.em(10px) base.em(20px)
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 "../base";
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: base.em(17px);
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: base.em(3px);
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: base.em(12px);
58
- line-height: base.em(17px);
59
- height: base.em(17px);
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,3 @@
1
- @use "../base";
2
1
  @use "../colors";
3
2
 
4
3
  .ProgressBar {
@@ -1,4 +1,4 @@
1
- @use "../base";
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: base.em(14px);
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: base.em(13px);
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: base.em(12px);
115
+ font-size: fn.em(12px);
116
116
  }
117
117
 
118
118
  .Section--flex {
@@ -1,5 +1,3 @@
1
- @use "../base";
2
-
3
1
  .Slider {
4
2
  cursor: e-resize;
5
3
  user-select: none;
@@ -1,4 +1,4 @@
1
- @use "../base";
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: base.em(250px);
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;
@@ -12,12 +12,32 @@
12
12
  @return math.div($value, $value * 0 + 1);
13
13
  }
14
14
 
15
- // Increases perceptual color lightness.
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
- // Decreases perceptual color lightness.
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
@@ -1,8 +1,8 @@
1
1
  @use "sass:meta";
2
2
 
3
3
  // CSS Variables
4
- @use "./vars-colors";
5
- @use "./vars-values";
4
+ @use "./base";
5
+ @use "./colors";
6
6
  @use "./vars-components";
7
7
 
8
8
  // Core styles
@@ -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(
@@ -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
- }
@@ -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
- }