reshaped 3.0.9 → 3.0.11-rc.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/CHANGELOG.md +7 -0
- package/bin/cli.js +0 -1
- package/dist/bundle.css +1 -1
- package/dist/bundle.d.ts +3 -1
- package/dist/bundle.js +10 -10
- package/dist/cjs/themes/_generator/tokens/font/font.transforms.js +6 -0
- package/dist/cjs/themes/_generator/tokens/font/font.types.d.ts +1 -0
- package/dist/cjs/themes/_generator/tokens/types.d.ts +1 -1
- package/dist/cjs/themes/_generator/utilities/color.d.ts +16 -0
- package/dist/cjs/themes/_generator/utilities/color.js +57 -7
- package/dist/cjs/themes/_generator/utilities/generateBackgroundColors.js +4 -0
- package/dist/cjs/themes/_generator/utilities/tests/color.test.js +73 -42
- package/dist/cjs/themes/figma/theme.css +1 -1
- package/dist/cjs/themes/index.d.ts +17 -0
- package/dist/cjs/themes/index.js +3 -0
- package/dist/cjs/themes/reshaped/theme.css +1 -1
- package/dist/cjs/themes/slate/theme.css +1 -1
- package/dist/cjs/types/config.d.ts +1 -0
- package/dist/components/Button/Button.module.css +1 -1
- package/dist/components/Button/tests/Button.stories.js +3 -1
- package/dist/components/DropdownMenu/DropdownMenu.module.css +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/components/MenuItem/MenuItem.module.css +1 -1
- package/dist/components/Modal/Modal.js +4 -3
- package/dist/components/Modal/tests/Modal.stories.d.ts +0 -1
- package/dist/components/Modal/tests/Modal.stories.js +0 -16
- package/dist/components/Overlay/Overlay.js +7 -7
- package/dist/components/Overlay/tests/Overlay.stories.js +3 -1
- package/dist/components/Popover/Popover.js +2 -2
- package/dist/components/Popover/Popover.types.d.ts +1 -1
- package/dist/components/Reshaped/Reshaped.css +1 -1
- package/dist/components/Resizable/Resizable.d.ts +8 -0
- package/dist/components/Resizable/Resizable.js +149 -0
- package/dist/components/Resizable/Resizable.module.css +1 -0
- package/dist/components/Resizable/Resizable.types.d.ts +29 -0
- package/dist/components/Resizable/Resizable.types.js +1 -0
- package/dist/components/Resizable/index.d.ts +2 -0
- package/dist/components/Resizable/index.js +1 -0
- package/dist/components/Resizable/tests/Resizable.stories.d.ts +15 -0
- package/dist/components/Resizable/tests/Resizable.stories.js +58 -0
- package/dist/components/ScrollArea/ScrollArea.js +4 -4
- package/dist/components/Select/Select.module.css +1 -1
- package/dist/components/Slider/Slider.types.d.ts +2 -2
- package/dist/components/Slider/Slider.utilities.js +4 -4
- package/dist/components/Slider/SliderControlled.js +11 -9
- package/dist/components/Slider/SliderThumb.js +1 -1
- package/dist/components/Slider/tests/Slider.stories.js +4 -0
- package/dist/components/Text/Text.module.css +1 -1
- package/dist/components/TextArea/TextArea.module.css +1 -1
- package/dist/components/TextField/TextField.module.css +1 -1
- package/dist/components/Toast/Toast.types.d.ts +7 -6
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/useToast.d.ts +1 -1
- package/dist/components/Tooltip/tests/Tooltip.stories.js +31 -0
- package/dist/components/_private/Flyout/Flyout.context.d.ts +3 -1
- package/dist/components/_private/Flyout/Flyout.context.js +4 -1
- package/dist/components/_private/Flyout/Flyout.types.d.ts +1 -0
- package/dist/components/_private/Flyout/FlyoutContent.js +5 -7
- package/dist/components/_private/Flyout/FlyoutControlled.js +18 -12
- package/dist/components/_private/Flyout/FlyoutTrigger.js +3 -2
- package/dist/components/_private/Flyout/tests/Flyout.stories.d.ts +2 -8
- package/dist/components/_private/Flyout/tests/Flyout.stories.js +87 -62
- package/dist/components/_private/Flyout/useFlyout.js +11 -2
- package/dist/components/_private/Portal/Portal.module.css +1 -1
- package/dist/hooks/_private/useOnClickOutside.js +5 -3
- package/dist/hooks/tests/useDrag.stories.d.ts +6 -0
- package/dist/hooks/tests/useDrag.stories.js +29 -0
- package/dist/hooks/useDrag.d.ts +17 -0
- package/dist/hooks/useDrag.js +116 -0
- package/dist/hooks/useHandlerRef.d.ts +8 -0
- package/dist/hooks/useHandlerRef.js +16 -0
- package/dist/hooks/useScrollLock.js +4 -3
- package/dist/hooks/useToggle.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/themes/_generator/tests/themes.stories.js +23 -0
- package/dist/themes/_generator/tokens/font/font.transforms.js +6 -0
- package/dist/themes/_generator/tokens/font/font.types.d.ts +1 -0
- package/dist/themes/_generator/tokens/types.d.ts +1 -1
- package/dist/themes/_generator/utilities/color.d.ts +16 -0
- package/dist/themes/_generator/utilities/color.js +54 -6
- package/dist/themes/_generator/utilities/generateBackgroundColors.js +4 -0
- package/dist/themes/figma/theme.css +1 -1
- package/dist/themes/index.d.ts +17 -0
- package/dist/themes/index.js +3 -0
- package/dist/themes/reshaped/theme.css +1 -1
- package/dist/themes/slate/theme.css +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/global.d.ts +1 -1
- package/package.json +1 -1
@@ -1,7 +1,9 @@
|
|
1
|
+
import useHandlerRef from "../useHandlerRef.js";
|
1
2
|
import React from "react";
|
2
3
|
const useOnClickOutside = (refs, handler) => {
|
4
|
+
const handlerRef = useHandlerRef(handler);
|
3
5
|
React.useEffect(() => {
|
4
|
-
if (!
|
6
|
+
if (!handlerRef.current)
|
5
7
|
return;
|
6
8
|
const handleClick = (event) => {
|
7
9
|
let isInside = false;
|
@@ -14,7 +16,7 @@ const useOnClickOutside = (refs, handler) => {
|
|
14
16
|
});
|
15
17
|
if (isInside)
|
16
18
|
return;
|
17
|
-
|
19
|
+
handlerRef.current?.(event);
|
18
20
|
};
|
19
21
|
// Using events that happen before click to handle cases when element is hidden on click
|
20
22
|
document.addEventListener("mousedown", handleClick);
|
@@ -24,6 +26,6 @@ const useOnClickOutside = (refs, handler) => {
|
|
24
26
|
document.removeEventListener("touchstart", handleClick);
|
25
27
|
};
|
26
28
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
27
|
-
}, [
|
29
|
+
}, [handlerRef, ...refs]);
|
28
30
|
};
|
29
31
|
export default useOnClickOutside;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import View from "../../components/View/index.js";
|
3
|
+
import useDrag from "../useDrag.js";
|
4
|
+
import useToggle from "../useToggle.js";
|
5
|
+
import Button from "../../components/Button/index.js";
|
6
|
+
export default { title: "Hooks/useDrag" };
|
7
|
+
function Example() {
|
8
|
+
const [state, setState] = React.useState({ x: 0, y: 0 });
|
9
|
+
const disabledToggle = useToggle();
|
10
|
+
const { ref, containerRef, active } = useDrag((args) => {
|
11
|
+
setState(args);
|
12
|
+
}, {
|
13
|
+
disabled: disabledToggle.active,
|
14
|
+
});
|
15
|
+
return (<View direction="row" gap={4}>
|
16
|
+
<View backgroundColor="neutral-faded" borderRadius="medium" width="200px" height="200px" attributes={{ ref: containerRef }}>
|
17
|
+
<View height={8} width={8} borderRadius="small" animated backgroundColor={active ? "primary" : "neutral"} attributes={{
|
18
|
+
role: "button",
|
19
|
+
tabIndex: 0,
|
20
|
+
ref,
|
21
|
+
style: { translate: `${state.x}px ${state.y}px`, cursor: active ? "grabbing" : "grab" },
|
22
|
+
}}/>
|
23
|
+
</View>
|
24
|
+
<Button onClick={disabledToggle.toggle}>
|
25
|
+
{disabledToggle.active ? "Enable" : "Disable"}
|
26
|
+
</Button>
|
27
|
+
</View>);
|
28
|
+
}
|
29
|
+
export const state = () => <Example />;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from "react";
|
2
|
+
export type UseDragCallbackArgs = {
|
3
|
+
x: number;
|
4
|
+
y: number;
|
5
|
+
triggerX: number;
|
6
|
+
triggerY: number;
|
7
|
+
};
|
8
|
+
declare const useDrag: <TriggerElement extends HTMLElement = HTMLButtonElement, ContainerElement extends HTMLElement = HTMLDivElement>(cb: (args: UseDragCallbackArgs) => void, options?: {
|
9
|
+
disabled?: boolean;
|
10
|
+
containerRef?: React.RefObject<ContainerElement>;
|
11
|
+
orientation?: "horizontal" | "vertical" | "all";
|
12
|
+
}) => {
|
13
|
+
ref: React.MutableRefObject<TriggerElement | null>;
|
14
|
+
containerRef: React.RefObject<ContainerElement>;
|
15
|
+
active: boolean;
|
16
|
+
};
|
17
|
+
export default useDrag;
|
@@ -0,0 +1,116 @@
|
|
1
|
+
"use client";
|
2
|
+
import React from "react";
|
3
|
+
import { disableUserSelect, enableUserSelect, disableScroll, enableScroll } from "../utilities/dom.js";
|
4
|
+
import useToggle from "./useToggle.js";
|
5
|
+
import useHotkeys from "./useHotkeys.js";
|
6
|
+
import * as keys from "../constants/keys.js";
|
7
|
+
import useHandlerRef from "./useHandlerRef.js";
|
8
|
+
const useDrag = (cb, options) => {
|
9
|
+
const { disabled, containerRef: passedContainerRef, orientation = "all" } = options || {};
|
10
|
+
const cbRef = useHandlerRef(cb);
|
11
|
+
const toggle = useToggle();
|
12
|
+
const triggerRef = React.useRef(null);
|
13
|
+
const internalContainerRef = React.useRef(null);
|
14
|
+
const containerRef = passedContainerRef || internalContainerRef;
|
15
|
+
const triggerCompensationRef = React.useRef({ x: 0, y: 0 });
|
16
|
+
const isVertical = orientation === "vertical" || orientation === "all";
|
17
|
+
const isHorizontal = orientation === "horizontal" || orientation === "all";
|
18
|
+
const handleKeyboard = (x, y) => {
|
19
|
+
const triggerEl = triggerRef.current;
|
20
|
+
if (!triggerEl)
|
21
|
+
return;
|
22
|
+
const container = containerRef.current ?? document.body;
|
23
|
+
const containerRect = container.getBoundingClientRect();
|
24
|
+
const triggerRect = triggerEl?.getBoundingClientRect();
|
25
|
+
const nextArgs = { x: 0, y: 0, triggerX: 0, triggerY: 0 };
|
26
|
+
if (isVertical) {
|
27
|
+
const relativeY = Math.round(triggerRect.y) - containerRect.y + y;
|
28
|
+
nextArgs.y = Math.max(0, Math.min(relativeY, containerRect.height - triggerRect.height));
|
29
|
+
nextArgs.triggerY = triggerRect.y - containerRect.y;
|
30
|
+
}
|
31
|
+
if (isHorizontal) {
|
32
|
+
const relativeX = Math.round(triggerRect.x) - containerRect.x + x;
|
33
|
+
nextArgs.x = Math.max(0, Math.min(relativeX, containerRect.width - triggerRect.width));
|
34
|
+
nextArgs.triggerX = triggerRect.x - containerRect.x;
|
35
|
+
}
|
36
|
+
cb(nextArgs);
|
37
|
+
};
|
38
|
+
useHotkeys({
|
39
|
+
[keys.LEFT]: () => isHorizontal && handleKeyboard(-20, 0),
|
40
|
+
[keys.RIGHT]: () => isHorizontal && handleKeyboard(20, 0),
|
41
|
+
[keys.UP]: () => isVertical && handleKeyboard(0, -20),
|
42
|
+
[keys.DOWN]: () => isVertical && handleKeyboard(0, 20),
|
43
|
+
}, [], {
|
44
|
+
ref: triggerRef,
|
45
|
+
disabled,
|
46
|
+
});
|
47
|
+
React.useEffect(() => {
|
48
|
+
const triggerEl = triggerRef.current;
|
49
|
+
if (!triggerEl)
|
50
|
+
return;
|
51
|
+
if (!toggle.active)
|
52
|
+
return;
|
53
|
+
const handleDrag = (event) => {
|
54
|
+
const resolvedEvent = event instanceof MouseEvent ? event : event.changedTouches[0];
|
55
|
+
const container = containerRef.current ?? document.body;
|
56
|
+
const containerRect = container.getBoundingClientRect();
|
57
|
+
const triggerRect = triggerEl.getBoundingClientRect();
|
58
|
+
const triggerX = resolvedEvent.clientX - containerRect.x;
|
59
|
+
const triggerY = resolvedEvent.clientY - containerRect.y;
|
60
|
+
// Calculate position relative to the container
|
61
|
+
const relativeX = triggerX - triggerCompensationRef.current.x;
|
62
|
+
const relativeY = triggerY - triggerCompensationRef.current.y;
|
63
|
+
cbRef.current?.({
|
64
|
+
x: isHorizontal
|
65
|
+
? Math.max(0, Math.min(relativeX, containerRect.width - triggerRect.width))
|
66
|
+
: 0,
|
67
|
+
y: isVertical
|
68
|
+
? Math.max(0, Math.min(relativeY, containerRect.height - triggerRect.height))
|
69
|
+
: 0,
|
70
|
+
triggerX: triggerRect.x - containerRect.x,
|
71
|
+
triggerY: triggerRect.y - containerRect.y,
|
72
|
+
});
|
73
|
+
};
|
74
|
+
const handleDragEnd = () => {
|
75
|
+
triggerCompensationRef.current = { x: 0, y: 0 };
|
76
|
+
toggle.deactivate();
|
77
|
+
enableUserSelect();
|
78
|
+
enableScroll();
|
79
|
+
};
|
80
|
+
document.addEventListener("touchmove", handleDrag, { passive: true });
|
81
|
+
document.addEventListener("touchend", handleDragEnd, { passive: true });
|
82
|
+
document.addEventListener("mousemove", handleDrag, { passive: true });
|
83
|
+
document.addEventListener("mouseup", handleDragEnd, { passive: true });
|
84
|
+
return () => {
|
85
|
+
document.removeEventListener("touchmove", handleDrag);
|
86
|
+
document.removeEventListener("touchend", handleDragEnd);
|
87
|
+
document.removeEventListener("mousemove", handleDrag);
|
88
|
+
document.removeEventListener("mouseup", handleDragEnd);
|
89
|
+
};
|
90
|
+
}, [toggle, isHorizontal, isVertical, containerRef, cbRef]);
|
91
|
+
React.useEffect(() => {
|
92
|
+
const triggerEl = triggerRef.current;
|
93
|
+
if (!triggerEl || disabled)
|
94
|
+
return;
|
95
|
+
const handleStart = (event) => {
|
96
|
+
const resolvedEvent = event instanceof MouseEvent ? event : event.changedTouches[0];
|
97
|
+
// Find the coordinate of the event inside the trigger
|
98
|
+
const triggerRect = triggerEl.getBoundingClientRect();
|
99
|
+
triggerCompensationRef.current = {
|
100
|
+
x: resolvedEvent.clientX - triggerRect.x,
|
101
|
+
y: resolvedEvent.clientY - triggerRect.y,
|
102
|
+
};
|
103
|
+
toggle.activate();
|
104
|
+
disableUserSelect();
|
105
|
+
disableScroll();
|
106
|
+
};
|
107
|
+
triggerEl.addEventListener("touchstart", handleStart, { passive: true });
|
108
|
+
triggerEl.addEventListener("mousedown", handleStart, { passive: true });
|
109
|
+
return () => {
|
110
|
+
triggerEl.removeEventListener("touchstart", handleStart);
|
111
|
+
triggerEl.removeEventListener("mousedown", handleStart);
|
112
|
+
};
|
113
|
+
}, [toggle, disabled]);
|
114
|
+
return { ref: triggerRef, containerRef, active: toggle.active };
|
115
|
+
};
|
116
|
+
export default useDrag;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from "react";
|
2
|
+
/**
|
3
|
+
* Hook for wrapping event handlers passed as props with a ref
|
4
|
+
* This way we can keep the instance of the ref the same and pass this ref to the effects dependency array
|
5
|
+
* While also making sure that function implementation stays up-to-date
|
6
|
+
*/
|
7
|
+
declare const useHandlerRef: <T>(cb: T) => React.RefObject<T>;
|
8
|
+
export default useHandlerRef;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import useIsomorphicLayoutEffect from "./useIsomorphicLayoutEffect.js";
|
3
|
+
/**
|
4
|
+
* Hook for wrapping event handlers passed as props with a ref
|
5
|
+
* This way we can keep the instance of the ref the same and pass this ref to the effects dependency array
|
6
|
+
* While also making sure that function implementation stays up-to-date
|
7
|
+
*/
|
8
|
+
const useHandlerRef = (cb) => {
|
9
|
+
const ref = React.useRef(cb);
|
10
|
+
// Update the callback on every render, keeping the ref instance the same
|
11
|
+
useIsomorphicLayoutEffect(() => {
|
12
|
+
ref.current = cb;
|
13
|
+
});
|
14
|
+
return ref;
|
15
|
+
};
|
16
|
+
export default useHandlerRef;
|
@@ -21,8 +21,8 @@ const useScrollLock = () => {
|
|
21
21
|
const [locked, setLocked] = React.useState(false);
|
22
22
|
const overflowStyleRef = React.useRef();
|
23
23
|
const isOverflowingRef = React.useRef(false);
|
24
|
-
const targetEl = document.body;
|
25
24
|
const lockScroll = React.useCallback(() => {
|
25
|
+
const targetEl = document.body;
|
26
26
|
const rect = targetEl.getBoundingClientRect();
|
27
27
|
isOverflowingRef.current = rect.left + rect.right < window.innerWidth;
|
28
28
|
overflowStyleRef.current = targetEl.style.overflow;
|
@@ -32,13 +32,14 @@ const useScrollLock = () => {
|
|
32
32
|
targetEl.style.paddingRight = `${scrollBarWidth}px`;
|
33
33
|
}
|
34
34
|
setLocked(true);
|
35
|
-
}, [setLocked, isOverflowingRef, overflowStyleRef
|
35
|
+
}, [setLocked, isOverflowingRef, overflowStyleRef]);
|
36
36
|
const unlockScroll = React.useCallback(() => {
|
37
|
+
const targetEl = document.body;
|
37
38
|
targetEl.style.overflow = overflowStyleRef.current || "";
|
38
39
|
if (isOverflowingRef.current)
|
39
40
|
targetEl.style.paddingRight = "";
|
40
41
|
setLocked(false);
|
41
|
-
}, [setLocked, isOverflowingRef, overflowStyleRef
|
42
|
+
}, [setLocked, isOverflowingRef, overflowStyleRef]);
|
42
43
|
return { scrollLocked: locked, lockScroll, unlockScroll };
|
43
44
|
};
|
44
45
|
export default useScrollLock;
|
package/dist/hooks/useToggle.js
CHANGED
@@ -11,6 +11,6 @@ const useToggle = (defaultValue) => {
|
|
11
11
|
const toggle = React.useCallback(() => {
|
12
12
|
setActive((active) => !active);
|
13
13
|
}, []);
|
14
|
-
return { active, activate, deactivate, toggle };
|
14
|
+
return React.useMemo(() => ({ active, activate, deactivate, toggle }), [activate, deactivate, toggle, active]);
|
15
15
|
};
|
16
16
|
export default useToggle;
|
package/dist/index.d.ts
CHANGED
@@ -75,6 +75,8 @@ export { default as RadioGroup } from "./components/RadioGroup";
|
|
75
75
|
export type { RadioGroupProps } from "./components/RadioGroup";
|
76
76
|
export { default as Reshaped } from "./components/Reshaped";
|
77
77
|
export type { ReshapedProps } from "./components/Reshaped";
|
78
|
+
export { default as Resizable } from "./components/Resizable";
|
79
|
+
export type { ResizableProps, ResizableItemProps, ResizableHandleProps, } from "./components/Resizable";
|
78
80
|
export { default as Scrim } from "./components/Scrim";
|
79
81
|
export type { ScrimProps } from "./components/Scrim";
|
80
82
|
export { default as ScrollArea } from "./components/ScrollArea";
|
@@ -102,7 +104,7 @@ export type { TextFieldProps } from "./components/TextField";
|
|
102
104
|
export { default as Timeline } from "./components/Timeline";
|
103
105
|
export type { TimelineProps, TimelineItemProps } from "./components/Timeline";
|
104
106
|
export { useToast, ToastProvider } from "./components/Toast";
|
105
|
-
export type { ToastProps, ToastProviderProps } from "./components/Toast";
|
107
|
+
export type { ToastProps, ToastProviderProps, ToastShowProps } from "./components/Toast";
|
106
108
|
export { default as Tooltip } from "./components/Tooltip";
|
107
109
|
export type { TooltipProps } from "./components/Tooltip";
|
108
110
|
export { default as View } from "./components/View";
|
package/dist/index.js
CHANGED
@@ -38,6 +38,7 @@ export { default as Progress } from "./components/Progress/index.js";
|
|
38
38
|
export { default as Radio } from "./components/Radio/index.js";
|
39
39
|
export { default as RadioGroup } from "./components/RadioGroup/index.js";
|
40
40
|
export { default as Reshaped } from "./components/Reshaped/index.js";
|
41
|
+
export { default as Resizable } from "./components/Resizable/index.js";
|
41
42
|
export { default as Scrim } from "./components/Scrim/index.js";
|
42
43
|
export { default as ScrollArea } from "./components/ScrollArea/index.js";
|
43
44
|
export { default as Select } from "./components/Select/index.js";
|
@@ -235,6 +235,20 @@ const onColorsCss = getThemeCSS("on-color", {
|
|
235
235
|
},
|
236
236
|
},
|
237
237
|
});
|
238
|
+
const onColorsCssApca = getThemeCSS("on-color-apca", {
|
239
|
+
color: {
|
240
|
+
backgroundPrimary: { hex: "#1abc9c", hexDark: "#16a085" },
|
241
|
+
backgroundPrimaryHighlighted: { hex: "#16a085", hexDark: "#1abc9c" },
|
242
|
+
},
|
243
|
+
}, {
|
244
|
+
colorContrastAlgorithm: "apca",
|
245
|
+
onColorValues: {
|
246
|
+
primary: {
|
247
|
+
hexLight: "#d1fae5",
|
248
|
+
hexDark: "#022c22",
|
249
|
+
},
|
250
|
+
},
|
251
|
+
});
|
238
252
|
export const onColors = () => (<Example>
|
239
253
|
<Example.Item title="custom on color values">
|
240
254
|
<style>{onColorsCss}</style>
|
@@ -245,4 +259,13 @@ export const onColors = () => (<Example>
|
|
245
259
|
</View>
|
246
260
|
</Theme>
|
247
261
|
</Example.Item>
|
262
|
+
<Example.Item title="custom on color values, apca">
|
263
|
+
<style>{onColorsCssApca}</style>
|
264
|
+
<Theme name="on-color-apca">
|
265
|
+
<View gap={2} direction="row">
|
266
|
+
<Button color="primary">Primary button</Button>
|
267
|
+
<Button color="critical">Critical button</Button>
|
268
|
+
</View>
|
269
|
+
</Theme>
|
270
|
+
</Example.Item>
|
248
271
|
</Example>);
|
@@ -30,6 +30,12 @@ const transformedToken = (name, token) => {
|
|
30
30
|
value: `var(${getVariableName(token.fontWeightToken, "fontWeight")})`,
|
31
31
|
});
|
32
32
|
}
|
33
|
+
result.push({
|
34
|
+
name,
|
35
|
+
tokenType: "letterSpacing",
|
36
|
+
type: "variable",
|
37
|
+
value: token.letterSpacing ? `${token.letterSpacing.px}px` : "normal",
|
38
|
+
});
|
33
39
|
return result;
|
34
40
|
};
|
35
41
|
export default transformedToken;
|
@@ -44,7 +44,7 @@ export type FullThemeDefinition = ThemeDefinition & {
|
|
44
44
|
};
|
45
45
|
export type TransformedToken = {
|
46
46
|
name: string;
|
47
|
-
tokenType: TokenType | "fontSize" | "lineHeight";
|
47
|
+
tokenType: TokenType | "fontSize" | "lineHeight" | "letterSpacing";
|
48
48
|
value: string;
|
49
49
|
type: "variable" | "media";
|
50
50
|
mode?: "light" | "dark";
|
@@ -81,9 +81,25 @@ export declare const getDarkModeColor: (hsl: HslColor) => {
|
|
81
81
|
};
|
82
82
|
export declare const getLuminanceDelta: (luminance: number) => number;
|
83
83
|
export declare function getRgbLuminance({ r, g, b }: RgbColor): number;
|
84
|
+
export declare const getOnColorWCAG: (args: {
|
85
|
+
bgHexColor: string;
|
86
|
+
lightHexColor?: string;
|
87
|
+
darkHexColor?: string;
|
88
|
+
}) => string;
|
89
|
+
export declare const getOnColorAPCA: (args: {
|
90
|
+
bgHexColor: string;
|
91
|
+
mode: "light" | "dark";
|
92
|
+
lightHexColor?: string;
|
93
|
+
darkHexColor?: string;
|
94
|
+
}) => string;
|
95
|
+
/**
|
96
|
+
* On color resolver
|
97
|
+
*/
|
84
98
|
export declare const getOnColor: (args: {
|
85
99
|
bgHexColor: string;
|
86
100
|
lightHexColor?: string;
|
87
101
|
darkHexColor?: string;
|
102
|
+
mode: "light" | "dark";
|
103
|
+
algorithm?: "wcag" | "apca";
|
88
104
|
}) => string;
|
89
105
|
export {};
|
@@ -301,29 +301,77 @@ export function getRgbLuminance({ r, g, b }) {
|
|
301
301
|
return Math.pow(y, 1 / 3) * 116 - 16;
|
302
302
|
}
|
303
303
|
}
|
304
|
+
/**
|
305
|
+
* WCAG contrast
|
306
|
+
*/
|
304
307
|
const RED = 0.2126;
|
305
308
|
const GREEN = 0.7152;
|
306
309
|
const BLUE = 0.0722;
|
307
310
|
const GAMMA = 2.4;
|
308
|
-
function
|
311
|
+
function luminanceWCAG(r, g, b) {
|
309
312
|
var a = [r, g, b].map((v) => {
|
310
313
|
v /= 255;
|
311
314
|
return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, GAMMA);
|
312
315
|
});
|
313
316
|
return a[0] * RED + a[1] * GREEN + a[2] * BLUE;
|
314
317
|
}
|
315
|
-
function
|
316
|
-
var lum1 =
|
317
|
-
var lum2 =
|
318
|
+
function contrastWCAG(rgb1, rgb2) {
|
319
|
+
var lum1 = luminanceWCAG(...rgb1);
|
320
|
+
var lum2 = luminanceWCAG(...rgb2);
|
318
321
|
var brightest = Math.max(lum1, lum2);
|
319
322
|
var darkest = Math.min(lum1, lum2);
|
320
323
|
return (brightest + 0.05) / (darkest + 0.05);
|
321
324
|
}
|
322
|
-
export const
|
325
|
+
export const getOnColorWCAG = (args) => {
|
323
326
|
const { bgHexColor, lightHexColor = "#ffffff", darkHexColor = "#000000" } = args;
|
324
327
|
const bgRgb = hexToRgb(bgHexColor);
|
325
328
|
const lightRgb = hexToRgb(lightHexColor);
|
326
|
-
return
|
329
|
+
return contrastWCAG([bgRgb.r, bgRgb.g, bgRgb.b], [lightRgb.r, lightRgb.g, lightRgb.b]) > 4.5
|
327
330
|
? lightHexColor
|
328
331
|
: darkHexColor;
|
329
332
|
};
|
333
|
+
/**
|
334
|
+
* APCA contrast
|
335
|
+
*/
|
336
|
+
function luminanceAPCA({ r, g, b }) {
|
337
|
+
return (0.2126 * Math.pow(r / 255, 2.2) +
|
338
|
+
0.7152 * Math.pow(g / 255, 2.2) +
|
339
|
+
0.0722 * Math.pow(b / 255, 2.2));
|
340
|
+
}
|
341
|
+
function contrastAPCA(backgroundLuminance, textLuminance) {
|
342
|
+
// Calculate the contrast based on APCA
|
343
|
+
let Lc = textLuminance - backgroundLuminance;
|
344
|
+
return Math.abs(Lc); // Return the absolute value of contrast
|
345
|
+
}
|
346
|
+
export const getOnColorAPCA = (args) => {
|
347
|
+
const { bgHexColor, mode, lightHexColor = "#ffffff", darkHexColor = "#000000" } = args;
|
348
|
+
const bgHexAlpha = bgHexColor.slice(7);
|
349
|
+
const bgAlpha = bgHexAlpha ? Number((parseInt(bgHexAlpha, 16) / 255).toFixed(2)) : 1;
|
350
|
+
const bgColor = hexToRgb(bgHexColor.slice(0, 7));
|
351
|
+
const baseColor = mode === "light" ? { r: 255, g: 255, b: 255 } : { r: 0, g: 0, b: 0 };
|
352
|
+
const { r, g, b } = {
|
353
|
+
r: (1 - bgAlpha) * baseColor.r + bgAlpha * bgColor.r,
|
354
|
+
g: (1 - bgAlpha) * baseColor.g + bgAlpha * bgColor.g,
|
355
|
+
b: (1 - bgAlpha) * baseColor.b + bgAlpha * bgColor.b,
|
356
|
+
};
|
357
|
+
// Calculate luminance for background and for white & black
|
358
|
+
let backgroundLuminance = luminanceAPCA({ r, g, b });
|
359
|
+
let whiteLuminance = luminanceAPCA({ r: 255, g: 255, b: 255 });
|
360
|
+
let blackLuminance = luminanceAPCA({ r: 0, g: 0, b: 0 });
|
361
|
+
// Calculate contrast
|
362
|
+
let contrastWithWhite = contrastAPCA(backgroundLuminance, whiteLuminance);
|
363
|
+
let contrastWithBlack = contrastAPCA(backgroundLuminance, blackLuminance);
|
364
|
+
// Choose the color with higher contrast
|
365
|
+
return contrastWithWhite > contrastWithBlack ? lightHexColor : darkHexColor;
|
366
|
+
};
|
367
|
+
/**
|
368
|
+
* On color resolver
|
369
|
+
*/
|
370
|
+
export const getOnColor = (args) => {
|
371
|
+
if (args.algorithm === "apca") {
|
372
|
+
return getOnColorAPCA(args);
|
373
|
+
}
|
374
|
+
else {
|
375
|
+
return getOnColorWCAG(args);
|
376
|
+
}
|
377
|
+
};
|
@@ -29,10 +29,14 @@ const generateBackgroundColors = (definition, themeOptions) => {
|
|
29
29
|
};
|
30
30
|
const hex = getOnColor({
|
31
31
|
bgHexColor: bgToken.hex,
|
32
|
+
mode: "light",
|
33
|
+
algorithm: themeOptions?.colorContrastAlgorithm,
|
32
34
|
...onColorHexMap,
|
33
35
|
});
|
34
36
|
const hexDark = getOnColor({
|
35
37
|
bgHexColor: bgToken.hexDark || bgToken.hex,
|
38
|
+
mode: "dark",
|
39
|
+
algorithm: themeOptions?.colorContrastAlgorithm,
|
36
40
|
...onColorHexMap,
|
37
41
|
});
|
38
42
|
// eslint-disable-next-line no-param-reassign
|
@@ -1 +1 @@
|
|
1
|
-
[data-rs-theme=figma]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:5.714285714285714rem;--rs-line-height-title-1:6rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-semibold);--rs-font-size-title-2:4.571428571428571rem;--rs-line-height-title-2:4.857142857142857rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-semibold);--rs-font-size-title-3:4rem;--rs-line-height-title-3:4.285714285714286rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-semibold);--rs-font-size-title-4:2.857142857142857rem;--rs-line-height-title-4:3.142857142857143rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-semibold);--rs-font-size-title-5:2.5714285714285716rem;--rs-line-height-title-5:2.857142857142857rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-semibold);--rs-font-size-title-6:1.7142857142857142rem;--rs-line-height-title-6:2rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-semibold);--rs-font-size-featured-1:1.5714285714285714rem;--rs-line-height-featured-1:2rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-font-size-featured-2:1.4285714285714286rem;--rs-line-height-featured-2:2rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-font-size-featured-3:1.2857142857142858rem;--rs-line-height-featured-3:1.7142857142857142rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-font-size-body-1:1rem;--rs-line-height-body-1:1.4285714285714286rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-font-size-body-2:0.9285714285714286rem;--rs-line-height-body-2:1.4285714285714286rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-font-size-body-3:0.7857142857142857rem;--rs-line-height-body-3:1.1428571428571428rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-font-size-caption-1:0.7857142857142857rem;--rs-line-height-caption-1:1.1428571428571428rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-font-size-caption-2:0.7142857142857143rem;--rs-line-height-caption-2:0.8571428571428571rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-unit-base:4px;--rs-unit-radius-small:4px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:#5a58f2;--rs-color-white:#fff;--rs-color-black:#000;--rs-color-on-background-primary:#fff;--rs-color-on-background-critical:#000;--rs-color-on-background-warning:#000;--rs-color-on-background-positive:#000;--rs-color-on-brand:#fff;--rs-color-rgb-white:255,255,255;--rs-color-rgb-black:0,0,0;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 1px 3px 0px rgba(0,0,0,.15);--rs-shadow-overlay:0px 10px 24px 0px rgba(0,0,0,.1),0px 2px 5px 0px rgba(0,0,0,.04)}[data-rs-theme=figma][data-rs-color-mode=light]{--rs-color-background-primary:#0d99ff;--rs-color-background-primary-faded:#e5f4ff;--rs-color-border-primary:#007be5;--rs-color-border-primary-faded:#bde3ff;--rs-color-foreground-primary:#007be5;--rs-color-background-critical:#f24822;--rs-color-background-critical-faded:#ffe2e0;--rs-color-border-critical:#dc3412;--rs-color-border-critical-faded:#ffc7c2;--rs-color-foreground-critical:#dc3412;--rs-color-background-warning:#facc15;--rs-color-background-warning-faded:#fffae9;--rs-color-border-warning:#cfa90f;--rs-color-border-warning-faded:#faedbb;--rs-color-foreground-warning:#7b6305;--rs-color-background-positive:#14ae5c;--rs-color-background-positive-faded:#daecdf;--rs-color-border-positive:#009951;--rs-color-border-positive-faded:#bbddc6;--rs-color-foreground-positive:#009951;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f5f5f5;--rs-color-border-neutral:#e6e6e6;--rs-color-border-neutral-faded:#e6e6e6;--rs-color-foreground-neutral:#191919;--rs-color-foreground-neutral-faded:#474747;--rs-color-background-disabled:#e4e4e4;--rs-color-background-disabled-faded:#f5f5f5;--rs-color-border-disabled:#e6e6e6;--rs-color-foreground-disabled:#b2b2b2;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-background-page:#fff;--rs-color-background-page-faded:#fafafa;--rs-color-background-neutral-highlighted:#d4d8e3;--rs-color-background-primary-highlighted:#007be5;--rs-color-background-positive-highlighted:#009951;--rs-color-background-critical-highlighted:#dc3412;--rs-color-rgb-background-primary:13,153,255;--rs-color-rgb-background-primary-faded:229,244,255;--rs-color-rgb-background-critical:242,72,34;--rs-color-rgb-background-critical-faded:255,226,224;--rs-color-rgb-background-warning:250,204,21;--rs-color-rgb-background-warning-faded:255,250,233;--rs-color-rgb-background-positive:20,174,92;--rs-color-rgb-background-positive-faded:218,236,223;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:245,245,245;--rs-color-rgb-background-disabled:228,228,228;--rs-color-rgb-background-disabled-faded:245,245,245;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:250,250,250;--rs-color-rgb-background-neutral-highlighted:212,216,227;--rs-color-rgb-background-primary-highlighted:0,123,229;--rs-color-rgb-background-positive-highlighted:0,153,81;--rs-color-rgb-background-critical-highlighted:220,52,18}[data-rs-theme=figma][data-rs-color-mode=dark]{--rs-color-background-primary:#0c8ce9;--rs-color-background-primary-faded:#394360;--rs-color-border-primary:#7cc4f8;--rs-color-border-primary-faded:#2a4d72;--rs-color-foreground-primary:#7cc4f8;--rs-color-background-critical:#e03e1a;--rs-color-background-critical-faded:#60332a;--rs-color-border-critical:#fca397;--rs-color-border-critical-faded:#803226;--rs-color-foreground-critical:#fca397;--rs-color-background-warning:#f1c512;--rs-color-background-warning-faded:#2c271f;--rs-color-border-warning:#b4920a;--rs-color-border-warning-faded:#3d3628;--rs-color-foreground-warning:#b4920c;--rs-color-background-positive:#198f51;--rs-color-background-positive-faded:#3d5749;--rs-color-border-positive:#79d297;--rs-color-border-positive-faded:#086338;--rs-color-foreground-positive:#79d297;--rs-color-background-neutral:#444;--rs-color-background-neutral-faded:#383838;--rs-color-border-neutral:#444;--rs-color-border-neutral-faded:#444;--rs-color-foreground-neutral:#fff;--rs-color-foreground-neutral-faded:#b2b2b2;--rs-color-background-disabled:#474747;--rs-color-background-disabled-faded:#3a3a3a;--rs-color-border-disabled:#3e3e3e;--rs-color-foreground-disabled:#656565;--rs-color-background-elevation-base:#2c2c2c;--rs-color-background-elevation-raised:#2c2c2c;--rs-color-background-elevation-overlay:#2c2c2c;--rs-color-background-page:#2c2c2c;--rs-color-background-page-faded:#1e1e1e;--rs-color-background-neutral-highlighted:#525252;--rs-color-background-primary-highlighted:#0a6dc2;--rs-color-background-positive-highlighted:#078348;--rs-color-background-critical-highlighted:#c4381c;--rs-color-rgb-background-primary:12,140,233;--rs-color-rgb-background-primary-faded:57,67,96;--rs-color-rgb-background-critical:224,62,26;--rs-color-rgb-background-critical-faded:96,51,42;--rs-color-rgb-background-warning:241,197,18;--rs-color-rgb-background-warning-faded:44,39,31;--rs-color-rgb-background-positive:25,143,81;--rs-color-rgb-background-positive-faded:61,87,73;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:68,68,68;--rs-color-rgb-background-neutral-faded:56,56,56;--rs-color-rgb-background-disabled:71,71,71;--rs-color-rgb-background-disabled-faded:58,58,58;--rs-color-rgb-background-elevation-base:44,44,44;--rs-color-rgb-background-elevation-raised:44,44,44;--rs-color-rgb-background-elevation-overlay:44,44,44;--rs-color-rgb-background-page:44,44,44;--rs-color-rgb-background-page-faded:30,30,30;--rs-color-rgb-background-neutral-highlighted:82,82,82;--rs-color-rgb-background-primary-highlighted:10,109,194;--rs-color-rgb-background-positive-highlighted:7,131,72;--rs-color-rgb-background-critical-highlighted:196,56,28}
|
1
|
+
[data-rs-theme=figma]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:5.714285714285714rem;--rs-line-height-title-1:6rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-semibold);--rs-letter-spacing-title-1:normal;--rs-font-size-title-2:4.571428571428571rem;--rs-line-height-title-2:4.857142857142857rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-semibold);--rs-letter-spacing-title-2:normal;--rs-font-size-title-3:4rem;--rs-line-height-title-3:4.285714285714286rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-semibold);--rs-letter-spacing-title-3:normal;--rs-font-size-title-4:2.857142857142857rem;--rs-line-height-title-4:3.142857142857143rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-semibold);--rs-letter-spacing-title-4:normal;--rs-font-size-title-5:2.5714285714285716rem;--rs-line-height-title-5:2.857142857142857rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-semibold);--rs-letter-spacing-title-5:normal;--rs-font-size-title-6:1.7142857142857142rem;--rs-line-height-title-6:2rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-semibold);--rs-letter-spacing-title-6:normal;--rs-font-size-featured-1:1.5714285714285714rem;--rs-line-height-featured-1:2rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-letter-spacing-featured-1:normal;--rs-font-size-featured-2:1.4285714285714286rem;--rs-line-height-featured-2:2rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-letter-spacing-featured-2:normal;--rs-font-size-featured-3:1.2857142857142858rem;--rs-line-height-featured-3:1.7142857142857142rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-letter-spacing-featured-3:normal;--rs-font-size-body-1:1rem;--rs-line-height-body-1:1.4285714285714286rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-letter-spacing-body-1:normal;--rs-font-size-body-2:0.9285714285714286rem;--rs-line-height-body-2:1.4285714285714286rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-letter-spacing-body-2:normal;--rs-font-size-body-3:0.7857142857142857rem;--rs-line-height-body-3:1.1428571428571428rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-letter-spacing-body-3:normal;--rs-font-size-caption-1:0.7857142857142857rem;--rs-line-height-caption-1:1.1428571428571428rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-letter-spacing-caption-1:normal;--rs-font-size-caption-2:0.7142857142857143rem;--rs-line-height-caption-2:0.8571428571428571rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-letter-spacing-caption-2:normal;--rs-unit-base:4px;--rs-unit-radius-small:4px;--rs-unit-radius-medium:4px;--rs-unit-radius-large:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:#5a58f2;--rs-color-white:#fff;--rs-color-black:#000;--rs-color-on-background-primary:#fff;--rs-color-on-background-critical:#000;--rs-color-on-background-warning:#000;--rs-color-on-background-positive:#000;--rs-color-on-brand:#fff;--rs-color-rgb-white:255,255,255;--rs-color-rgb-black:0,0,0;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 1px 3px 0px rgba(0,0,0,.15);--rs-shadow-overlay:0px 10px 24px 0px rgba(0,0,0,.1),0px 2px 5px 0px rgba(0,0,0,.04)}[data-rs-theme=figma][data-rs-color-mode=light]{--rs-color-background-primary:#0d99ff;--rs-color-background-primary-faded:#e5f4ff;--rs-color-border-primary:#007be5;--rs-color-border-primary-faded:#bde3ff;--rs-color-foreground-primary:#007be5;--rs-color-background-critical:#f24822;--rs-color-background-critical-faded:#ffe2e0;--rs-color-border-critical:#dc3412;--rs-color-border-critical-faded:#ffc7c2;--rs-color-foreground-critical:#dc3412;--rs-color-background-warning:#facc15;--rs-color-background-warning-faded:#fffae9;--rs-color-border-warning:#cfa90f;--rs-color-border-warning-faded:#faedbb;--rs-color-foreground-warning:#7b6305;--rs-color-background-positive:#14ae5c;--rs-color-background-positive-faded:#daecdf;--rs-color-border-positive:#009951;--rs-color-border-positive-faded:#bbddc6;--rs-color-foreground-positive:#009951;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f5f5f5;--rs-color-border-neutral:#e6e6e6;--rs-color-border-neutral-faded:#e6e6e6;--rs-color-foreground-neutral:#191919;--rs-color-foreground-neutral-faded:#474747;--rs-color-background-disabled:#e4e4e4;--rs-color-background-disabled-faded:#f5f5f5;--rs-color-border-disabled:#e6e6e6;--rs-color-foreground-disabled:#b2b2b2;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-background-page:#fff;--rs-color-background-page-faded:#fafafa;--rs-color-background-neutral-highlighted:#d4d8e3;--rs-color-background-primary-highlighted:#007be5;--rs-color-background-positive-highlighted:#009951;--rs-color-background-critical-highlighted:#dc3412;--rs-color-rgb-background-primary:13,153,255;--rs-color-rgb-background-primary-faded:229,244,255;--rs-color-rgb-background-critical:242,72,34;--rs-color-rgb-background-critical-faded:255,226,224;--rs-color-rgb-background-warning:250,204,21;--rs-color-rgb-background-warning-faded:255,250,233;--rs-color-rgb-background-positive:20,174,92;--rs-color-rgb-background-positive-faded:218,236,223;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:245,245,245;--rs-color-rgb-background-disabled:228,228,228;--rs-color-rgb-background-disabled-faded:245,245,245;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:250,250,250;--rs-color-rgb-background-neutral-highlighted:212,216,227;--rs-color-rgb-background-primary-highlighted:0,123,229;--rs-color-rgb-background-positive-highlighted:0,153,81;--rs-color-rgb-background-critical-highlighted:220,52,18}[data-rs-theme=figma][data-rs-color-mode=dark]{--rs-color-background-primary:#0c8ce9;--rs-color-background-primary-faded:#394360;--rs-color-border-primary:#7cc4f8;--rs-color-border-primary-faded:#2a4d72;--rs-color-foreground-primary:#7cc4f8;--rs-color-background-critical:#e03e1a;--rs-color-background-critical-faded:#60332a;--rs-color-border-critical:#fca397;--rs-color-border-critical-faded:#803226;--rs-color-foreground-critical:#fca397;--rs-color-background-warning:#f1c512;--rs-color-background-warning-faded:#2c271f;--rs-color-border-warning:#b4920a;--rs-color-border-warning-faded:#3d3628;--rs-color-foreground-warning:#b4920c;--rs-color-background-positive:#198f51;--rs-color-background-positive-faded:#3d5749;--rs-color-border-positive:#79d297;--rs-color-border-positive-faded:#086338;--rs-color-foreground-positive:#79d297;--rs-color-background-neutral:#444;--rs-color-background-neutral-faded:#383838;--rs-color-border-neutral:#444;--rs-color-border-neutral-faded:#444;--rs-color-foreground-neutral:#fff;--rs-color-foreground-neutral-faded:#b2b2b2;--rs-color-background-disabled:#474747;--rs-color-background-disabled-faded:#3a3a3a;--rs-color-border-disabled:#3e3e3e;--rs-color-foreground-disabled:#656565;--rs-color-background-elevation-base:#2c2c2c;--rs-color-background-elevation-raised:#2c2c2c;--rs-color-background-elevation-overlay:#2c2c2c;--rs-color-background-page:#2c2c2c;--rs-color-background-page-faded:#1e1e1e;--rs-color-background-neutral-highlighted:#525252;--rs-color-background-primary-highlighted:#0a6dc2;--rs-color-background-positive-highlighted:#078348;--rs-color-background-critical-highlighted:#c4381c;--rs-color-rgb-background-primary:12,140,233;--rs-color-rgb-background-primary-faded:57,67,96;--rs-color-rgb-background-critical:224,62,26;--rs-color-rgb-background-critical-faded:96,51,42;--rs-color-rgb-background-warning:241,197,18;--rs-color-rgb-background-warning-faded:44,39,31;--rs-color-rgb-background-positive:25,143,81;--rs-color-rgb-background-positive-faded:61,87,73;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:68,68,68;--rs-color-rgb-background-neutral-faded:56,56,56;--rs-color-rgb-background-disabled:71,71,71;--rs-color-rgb-background-disabled-faded:58,58,58;--rs-color-rgb-background-elevation-base:44,44,44;--rs-color-rgb-background-elevation-raised:44,44,44;--rs-color-rgb-background-elevation-overlay:44,44,44;--rs-color-rgb-background-page:44,44,44;--rs-color-rgb-background-page-faded:30,30,30;--rs-color-rgb-background-neutral-highlighted:82,82,82;--rs-color-rgb-background-primary-highlighted:10,109,194;--rs-color-rgb-background-positive-highlighted:7,131,72;--rs-color-rgb-background-critical-highlighted:196,56,28}
|
package/dist/themes/index.d.ts
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
import type * as T from "./_generator/types";
|
2
2
|
import type { FullThemeDefinition } from "./_generator/tokens/types";
|
3
|
+
/**
|
4
|
+
* Exported types
|
5
|
+
*/
|
6
|
+
export type { FullThemeDefinition } from "./_generator/tokens/types";
|
7
|
+
export type { Name as ColorTokenName } from "./_generator/tokens/color/color.types";
|
8
|
+
export type { Name as DurationTokenName } from "./_generator/tokens/duration/duration.types";
|
9
|
+
export type { Name as EasingTokenName } from "./_generator/tokens/easing/easing.types";
|
10
|
+
export type { Name as FontTokenName } from "./_generator/tokens/font/font.types";
|
11
|
+
export type { Name as FontFamilyTokenName } from "./_generator/tokens/fontFamily/fontFamily.types";
|
12
|
+
export type { Name as FontWeightTokenName } from "./_generator/tokens/fontWeight/fontWeight.types";
|
13
|
+
export type { Name as RadiusTokenName } from "./_generator/tokens/radius/radius.types";
|
14
|
+
export type { Name as ShadowTokenName } from "./_generator/tokens/shadow/shadow.types";
|
15
|
+
export type { GeneratedName as UnitTokenName } from "./_generator/tokens/unit/unit.types";
|
16
|
+
export type { Name as ViewportTokenName } from "./_generator/tokens/viewport/viewport.types";
|
17
|
+
/**
|
18
|
+
* Exported runtime code
|
19
|
+
*/
|
3
20
|
export { default as baseThemeDefinition } from "./_generator/definitions/reshaped";
|
4
21
|
export declare const generateThemeColors: (options: {
|
5
22
|
primary: T.Color;
|
package/dist/themes/index.js
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
import transform from "./_generator/transform.js";
|
2
2
|
import generateColors from "./_generator/utilities/generateColors.js";
|
3
|
+
/**
|
4
|
+
* Exported runtime code
|
5
|
+
*/
|
3
6
|
export { default as baseThemeDefinition } from "./_generator/definitions/reshaped.js";
|
4
7
|
export const generateThemeColors = (options) => {
|
5
8
|
return generateColors(options);
|
@@ -1 +1 @@
|
|
1
|
-
[data-rs-theme=reshaped]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:6.857142857142857rem;--rs-line-height-title-1:7.142857142857143rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-extrabold);--rs-font-size-title-2:5.714285714285714rem;--rs-line-height-title-2:6rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-extrabold);--rs-font-size-title-3:4.571428571428571rem;--rs-line-height-title-3:4.857142857142857rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-extrabold);--rs-font-size-title-4:4rem;--rs-line-height-title-4:4.285714285714286rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-bold);--rs-font-size-title-5:3.4285714285714284rem;--rs-line-height-title-5:3.7142857142857144rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-bold);--rs-font-size-title-6:2.5714285714285716rem;--rs-line-height-title-6:2.857142857142857rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-bold);--rs-font-size-featured-1:2.2857142857142856rem;--rs-line-height-featured-1:2.857142857142857rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-font-size-featured-2:1.7142857142857142rem;--rs-line-height-featured-2:2.2857142857142856rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-font-size-featured-3:1.4285714285714286rem;--rs-line-height-featured-3:2rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-font-size-body-1:1.2857142857142858rem;--rs-line-height-body-1:2rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-font-size-body-2:1.1428571428571428rem;--rs-line-height-body-2:1.7142857142857142rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-font-size-body-3:1rem;--rs-line-height-body-3:1.4285714285714286rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-font-size-caption-1:0.8571428571428571rem;--rs-line-height-caption-1:1.1428571428571428rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-font-size-caption-2:0.7142857142857143rem;--rs-line-height-caption-2:0.8571428571428571rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-unit-base:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:#5a58f2;--rs-color-white:#fff;--rs-color-black:#000;--rs-color-on-background-primary:#fff;--rs-color-on-background-critical:#fff;--rs-color-on-background-warning:#000;--rs-color-on-background-positive:#fff;--rs-color-on-brand:#fff;--rs-color-rgb-white:255,255,255;--rs-color-rgb-black:0,0,0;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 1px 5px -4px rgba(0,0,0,.5),0px 4px 8px 0px rgba(0,0,0,.05);--rs-shadow-overlay:0px 5px 10px 0px rgba(0,0,0,.05),0px 15px 25px 0px rgba(0,0,0,.07)}[data-rs-theme=reshaped][data-rs-color-mode=light]{--rs-color-background-primary:#5a58f2;--rs-color-background-primary-faded:#ecebfe;--rs-color-border-primary:#3b38ed;--rs-color-border-primary-faded:#dedcfb;--rs-color-foreground-primary:#4f4cf0;--rs-color-background-critical:#e22c2c;--rs-color-background-critical-faded:#fdeded;--rs-color-border-critical:#bf2424;--rs-color-border-critical-faded:#fadbdb;--rs-color-foreground-critical:#c42525;--rs-color-background-warning:#facc15;--rs-color-background-warning-faded:#fffae9;--rs-color-border-warning:#cfa90f;--rs-color-border-warning-faded:#faedbb;--rs-color-foreground-warning:#7b6305;--rs-color-background-positive:#118850;--rs-color-background-positive-faded:#edfdf5;--rs-color-border-positive:#0c6e40;--rs-color-border-positive-faded:#d0f3e2;--rs-color-foreground-positive:#0d7544;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f1f2f6;--rs-color-border-neutral:#0000001f;--rs-color-border-neutral-faded:#0000001a;--rs-color-foreground-neutral:#14181f;--rs-color-foreground-neutral-faded:#5b667e;--rs-color-background-disabled:#eceef2;--rs-color-background-disabled-faded:#f5f6f9;--rs-color-border-disabled:#dfe2ea;--rs-color-foreground-disabled:#c6ccda;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-background-page:#fff;--rs-color-background-page-faded:#f9f9fb;--rs-color-rgb-background-primary:90,88,242;--rs-color-rgb-background-primary-faded:236,235,254;--rs-color-rgb-background-critical:226,44,44;--rs-color-rgb-background-critical-faded:253,237,237;--rs-color-rgb-background-warning:250,204,21;--rs-color-rgb-background-warning-faded:255,250,233;--rs-color-rgb-background-positive:17,136,80;--rs-color-rgb-background-positive-faded:237,253,245;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:241,242,246;--rs-color-rgb-background-disabled:236,238,242;--rs-color-rgb-background-disabled-faded:245,246,249;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:249,249,251}[data-rs-theme=reshaped][data-rs-color-mode=dark]{--rs-color-background-primary:#524fea;--rs-color-background-primary-faded:#252544;--rs-color-border-primary:#8c8bf3;--rs-color-border-primary-faded:#323164;--rs-color-foreground-primary:#8b8af7;--rs-color-background-critical:#d02626;--rs-color-background-critical-faded:#3e1f1f;--rs-color-border-critical:#f46969;--rs-color-border-critical-faded:#582929;--rs-color-foreground-critical:#f36a6a;--rs-color-background-warning:#f1c512;--rs-color-background-warning-faded:#2c271f;--rs-color-border-warning:#b4920a;--rs-color-border-warning-faded:#3d3628;--rs-color-foreground-warning:#b4920c;--rs-color-background-positive:#14784a;--rs-color-background-positive-faded:#1f2a23;--rs-color-border-positive:#21ab6b;--rs-color-border-positive-faded:#293b2f;--rs-color-foreground-positive:#18ab66;--rs-color-background-neutral:#494f60;--rs-color-background-neutral-faded:#222835;--rs-color-border-neutral:#ffffff24;--rs-color-border-neutral-faded:#ffffff17;--rs-color-foreground-neutral:#eff1f5;--rs-color-foreground-neutral-faded:#c0c6d6;--rs-color-background-disabled:#1e212a;--rs-color-background-disabled-faded:#171921;--rs-color-border-disabled:#262a34;--rs-color-foreground-disabled:#434959;--rs-color-background-elevation-base:#15171e;--rs-color-background-elevation-raised:#191b23;--rs-color-background-elevation-overlay:#1c1f28;--rs-color-background-page:#0f1116;--rs-color-background-page-faded:#111319;--rs-color-rgb-background-primary:82,79,234;--rs-color-rgb-background-primary-faded:37,37,68;--rs-color-rgb-background-critical:208,38,38;--rs-color-rgb-background-critical-faded:62,31,31;--rs-color-rgb-background-warning:241,197,18;--rs-color-rgb-background-warning-faded:44,39,31;--rs-color-rgb-background-positive:20,120,74;--rs-color-rgb-background-positive-faded:31,42,35;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:73,79,96;--rs-color-rgb-background-neutral-faded:34,40,53;--rs-color-rgb-background-disabled:30,33,42;--rs-color-rgb-background-disabled-faded:23,25,33;--rs-color-rgb-background-elevation-base:21,23,30;--rs-color-rgb-background-elevation-raised:25,27,35;--rs-color-rgb-background-elevation-overlay:28,31,40;--rs-color-rgb-background-page:15,17,22;--rs-color-rgb-background-page-faded:17,19,25}
|
1
|
+
[data-rs-theme=reshaped]{--rs-font-family-title:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-family-body:Inter,BlinkMacSystemFont,-apple-system,Roboto,Helvetica,Arial,sans-serif;--rs-font-weight-regular:400;--rs-font-weight-medium:500;--rs-font-weight-semibold:600;--rs-font-weight-bold:700;--rs-font-weight-extrabold:800;--rs-font-weight-black:900;--rs-font-size-title-1:6.857142857142857rem;--rs-line-height-title-1:7.142857142857143rem;--rs-font-family-title-1:var(--rs-font-family-title);--rs-font-weight-title-1:var(--rs-font-weight-extrabold);--rs-letter-spacing-title-1:normal;--rs-font-size-title-2:5.714285714285714rem;--rs-line-height-title-2:6rem;--rs-font-family-title-2:var(--rs-font-family-title);--rs-font-weight-title-2:var(--rs-font-weight-extrabold);--rs-letter-spacing-title-2:normal;--rs-font-size-title-3:4.571428571428571rem;--rs-line-height-title-3:4.857142857142857rem;--rs-font-family-title-3:var(--rs-font-family-title);--rs-font-weight-title-3:var(--rs-font-weight-extrabold);--rs-letter-spacing-title-3:normal;--rs-font-size-title-4:4rem;--rs-line-height-title-4:4.285714285714286rem;--rs-font-family-title-4:var(--rs-font-family-title);--rs-font-weight-title-4:var(--rs-font-weight-bold);--rs-letter-spacing-title-4:normal;--rs-font-size-title-5:3.4285714285714284rem;--rs-line-height-title-5:3.7142857142857144rem;--rs-font-family-title-5:var(--rs-font-family-title);--rs-font-weight-title-5:var(--rs-font-weight-bold);--rs-letter-spacing-title-5:normal;--rs-font-size-title-6:2.5714285714285716rem;--rs-line-height-title-6:2.857142857142857rem;--rs-font-family-title-6:var(--rs-font-family-title);--rs-font-weight-title-6:var(--rs-font-weight-bold);--rs-letter-spacing-title-6:normal;--rs-font-size-featured-1:2.2857142857142856rem;--rs-line-height-featured-1:2.857142857142857rem;--rs-font-family-featured-1:var(--rs-font-family-body);--rs-letter-spacing-featured-1:normal;--rs-font-size-featured-2:1.7142857142857142rem;--rs-line-height-featured-2:2.2857142857142856rem;--rs-font-family-featured-2:var(--rs-font-family-body);--rs-letter-spacing-featured-2:normal;--rs-font-size-featured-3:1.4285714285714286rem;--rs-line-height-featured-3:2rem;--rs-font-family-featured-3:var(--rs-font-family-body);--rs-letter-spacing-featured-3:normal;--rs-font-size-body-1:1.2857142857142858rem;--rs-line-height-body-1:2rem;--rs-font-family-body-1:var(--rs-font-family-body);--rs-letter-spacing-body-1:normal;--rs-font-size-body-2:1.1428571428571428rem;--rs-line-height-body-2:1.7142857142857142rem;--rs-font-family-body-2:var(--rs-font-family-body);--rs-letter-spacing-body-2:normal;--rs-font-size-body-3:1rem;--rs-line-height-body-3:1.4285714285714286rem;--rs-font-family-body-3:var(--rs-font-family-body);--rs-letter-spacing-body-3:normal;--rs-font-size-caption-1:0.8571428571428571rem;--rs-line-height-caption-1:1.1428571428571428rem;--rs-font-family-caption-1:var(--rs-font-family-body);--rs-letter-spacing-caption-1:normal;--rs-font-size-caption-2:0.7142857142857143rem;--rs-line-height-caption-2:0.8571428571428571rem;--rs-font-family-caption-2:var(--rs-font-family-body);--rs-letter-spacing-caption-2:normal;--rs-unit-base:4px;--rs-unit-x1:4px;--rs-unit-x2:8px;--rs-unit-x3:12px;--rs-unit-x4:16px;--rs-unit-x5:20px;--rs-unit-x6:24px;--rs-unit-x7:28px;--rs-unit-x8:32px;--rs-unit-x9:36px;--rs-unit-x10:40px;--rs-radius-small:4px;--rs-radius-medium:8px;--rs-radius-large:12px;--rs-color-brand:#5a58f2;--rs-color-white:#fff;--rs-color-black:#000;--rs-color-on-background-primary:#fff;--rs-color-on-background-critical:#fff;--rs-color-on-background-warning:#000;--rs-color-on-background-positive:#fff;--rs-color-on-brand:#fff;--rs-color-rgb-white:255,255,255;--rs-color-rgb-black:0,0,0;--rs-duration-fast:200ms;--rs-duration-medium:300ms;--rs-duration-slow:400ms;--rs-easing-standard:cubic-bezier(0.4,0,0.2,1);--rs-easing-accelerate:cubic-bezier(0.4,0,1,1);--rs-easing-decelerate:cubic-bezier(0,0,0.2,1);--rs-shadow-raised:0px 1px 5px -4px rgba(0,0,0,.5),0px 4px 8px 0px rgba(0,0,0,.05);--rs-shadow-overlay:0px 5px 10px 0px rgba(0,0,0,.05),0px 15px 25px 0px rgba(0,0,0,.07)}[data-rs-theme=reshaped][data-rs-color-mode=light]{--rs-color-background-primary:#5a58f2;--rs-color-background-primary-faded:#ecebfe;--rs-color-border-primary:#3b38ed;--rs-color-border-primary-faded:#dedcfb;--rs-color-foreground-primary:#4f4cf0;--rs-color-background-critical:#e22c2c;--rs-color-background-critical-faded:#fdeded;--rs-color-border-critical:#bf2424;--rs-color-border-critical-faded:#fadbdb;--rs-color-foreground-critical:#c42525;--rs-color-background-warning:#facc15;--rs-color-background-warning-faded:#fffae9;--rs-color-border-warning:#cfa90f;--rs-color-border-warning-faded:#faedbb;--rs-color-foreground-warning:#7b6305;--rs-color-background-positive:#118850;--rs-color-background-positive-faded:#edfdf5;--rs-color-border-positive:#0c6e40;--rs-color-border-positive-faded:#d0f3e2;--rs-color-foreground-positive:#0d7544;--rs-color-background-neutral:#dfe2ea;--rs-color-background-neutral-faded:#f1f2f6;--rs-color-border-neutral:#0000001f;--rs-color-border-neutral-faded:#0000001a;--rs-color-foreground-neutral:#14181f;--rs-color-foreground-neutral-faded:#5b667e;--rs-color-background-disabled:#eceef2;--rs-color-background-disabled-faded:#f5f6f9;--rs-color-border-disabled:#dfe2ea;--rs-color-foreground-disabled:#c6ccda;--rs-color-background-elevation-base:#fff;--rs-color-background-elevation-raised:#fff;--rs-color-background-elevation-overlay:#fff;--rs-color-background-page:#fff;--rs-color-background-page-faded:#f9f9fb;--rs-color-rgb-background-primary:90,88,242;--rs-color-rgb-background-primary-faded:236,235,254;--rs-color-rgb-background-critical:226,44,44;--rs-color-rgb-background-critical-faded:253,237,237;--rs-color-rgb-background-warning:250,204,21;--rs-color-rgb-background-warning-faded:255,250,233;--rs-color-rgb-background-positive:17,136,80;--rs-color-rgb-background-positive-faded:237,253,245;--rs-color-on-background-neutral:#000;--rs-color-rgb-background-neutral:223,226,234;--rs-color-rgb-background-neutral-faded:241,242,246;--rs-color-rgb-background-disabled:236,238,242;--rs-color-rgb-background-disabled-faded:245,246,249;--rs-color-rgb-background-elevation-base:255,255,255;--rs-color-rgb-background-elevation-raised:255,255,255;--rs-color-rgb-background-elevation-overlay:255,255,255;--rs-color-rgb-background-page:255,255,255;--rs-color-rgb-background-page-faded:249,249,251}[data-rs-theme=reshaped][data-rs-color-mode=dark]{--rs-color-background-primary:#524fea;--rs-color-background-primary-faded:#252544;--rs-color-border-primary:#8c8bf3;--rs-color-border-primary-faded:#323164;--rs-color-foreground-primary:#8b8af7;--rs-color-background-critical:#d02626;--rs-color-background-critical-faded:#3e1f1f;--rs-color-border-critical:#f46969;--rs-color-border-critical-faded:#582929;--rs-color-foreground-critical:#f36a6a;--rs-color-background-warning:#f1c512;--rs-color-background-warning-faded:#2c271f;--rs-color-border-warning:#b4920a;--rs-color-border-warning-faded:#3d3628;--rs-color-foreground-warning:#b4920c;--rs-color-background-positive:#14784a;--rs-color-background-positive-faded:#1f2a23;--rs-color-border-positive:#21ab6b;--rs-color-border-positive-faded:#293b2f;--rs-color-foreground-positive:#18ab66;--rs-color-background-neutral:#494f60;--rs-color-background-neutral-faded:#222835;--rs-color-border-neutral:#ffffff24;--rs-color-border-neutral-faded:#ffffff17;--rs-color-foreground-neutral:#eff1f5;--rs-color-foreground-neutral-faded:#c0c6d6;--rs-color-background-disabled:#1e212a;--rs-color-background-disabled-faded:#171921;--rs-color-border-disabled:#262a34;--rs-color-foreground-disabled:#434959;--rs-color-background-elevation-base:#15171e;--rs-color-background-elevation-raised:#191b23;--rs-color-background-elevation-overlay:#1c1f28;--rs-color-background-page:#0f1116;--rs-color-background-page-faded:#111319;--rs-color-rgb-background-primary:82,79,234;--rs-color-rgb-background-primary-faded:37,37,68;--rs-color-rgb-background-critical:208,38,38;--rs-color-rgb-background-critical-faded:62,31,31;--rs-color-rgb-background-warning:241,197,18;--rs-color-rgb-background-warning-faded:44,39,31;--rs-color-rgb-background-positive:20,120,74;--rs-color-rgb-background-positive-faded:31,42,35;--rs-color-on-background-neutral:#fff;--rs-color-rgb-background-neutral:73,79,96;--rs-color-rgb-background-neutral-faded:34,40,53;--rs-color-rgb-background-disabled:30,33,42;--rs-color-rgb-background-disabled-faded:23,25,33;--rs-color-rgb-background-elevation-base:21,23,30;--rs-color-rgb-background-elevation-raised:25,27,35;--rs-color-rgb-background-elevation-overlay:28,31,40;--rs-color-rgb-background-page:15,17,22;--rs-color-rgb-background-page-faded:17,19,25}
|