oneslash-design-system 1.3.5 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/alert.jsx +9 -15
- package/dist/components/button.jsx +3 -3
- package/dist/components/iconButton.d.ts +1 -1
- package/dist/components/iconButton.jsx +2 -0
- package/dist/components/loadingScreen.d.ts +1 -1
- package/dist/components/loadingScreen.jsx +1 -0
- package/dist/components/menuItem.d.ts +2 -1
- package/dist/components/menuItem.jsx +2 -2
- package/dist/components/modal.jsx +1 -1
- package/dist/components/tag.jsx +6 -5
- package/dist/components/tooltip.jsx +25 -11
- package/dist/components/userImage.jsx +2 -0
- package/dist/designTokens.d.ts +23 -4
- package/dist/designTokens.js +10 -0
- package/dist/output.css +137 -36
- package/dist/stories/Button.stories.jsx +1 -0
- package/dist/stories/IconButton.stories.jsx +2 -1
- package/dist/stories/MenuItem.stories.d.ts +1 -0
- package/dist/stories/MenuItem.stories.jsx +11 -0
- package/dist/tailwind.config.js +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -2
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import IconButton from './iconButton';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
default: { light: '#D1D1D1', dark: '#6D6D6D' },
|
|
4
|
+
var bgClassMap = {
|
|
5
|
+
error: 'bg-light-error-alertBg dark:bg-dark-error-alertBg',
|
|
6
|
+
warning: 'bg-light-warning-alertBg dark:bg-dark-warning-alertBg',
|
|
7
|
+
info: 'bg-light-info-alertBg dark:bg-dark-info-alertBg',
|
|
8
|
+
success: 'bg-light-success-alertBg dark:bg-dark-success-alertBg',
|
|
9
|
+
default: 'bg-light-secondary-light dark:bg-dark-secondary-light',
|
|
11
10
|
};
|
|
12
|
-
var textColorMap = { light: '#000000', dark: '#eeeeee' };
|
|
13
11
|
export default function Alert(_a) {
|
|
14
12
|
var _b;
|
|
15
13
|
var _c = _a.open, open = _c === void 0 ? true : _c, type = _a.type, message = _a.message, secondMessage = _a.secondMessage, onClose = _a.onClose, _d = _a.showCloseButton, showCloseButton = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? 'toast' : _e;
|
|
16
14
|
var _f = useState(false), isVisible = _f[0], setIsVisible = _f[1];
|
|
17
15
|
var _g = useState(false), shouldRender = _g[0], setShouldRender = _g[1];
|
|
18
|
-
var isDark = useDarkMode();
|
|
19
16
|
useEffect(function () {
|
|
20
17
|
if (open) {
|
|
21
18
|
setShouldRender(true);
|
|
@@ -52,12 +49,9 @@ export default function Alert(_a) {
|
|
|
52
49
|
};
|
|
53
50
|
if (!shouldRender)
|
|
54
51
|
return null;
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
var textColor = textColorMap[mode];
|
|
59
|
-
var alertContent = (<div className={"flex items-start justify-between w-full p-2 rounded-[8px] transition-opacity duration-200 ease-out ".concat(isVisible ? 'opacity-100' : 'opacity-0', " ").concat(variant === 'toast' ? 'max-w-md pointer-events-auto' : '')} style={{ backgroundColor: backgroundColor }}>
|
|
60
|
-
<div className="flex items-start gap-2" style={{ color: textColor }}>
|
|
52
|
+
var bgClasses = (_b = bgClassMap[type]) !== null && _b !== void 0 ? _b : bgClassMap.default;
|
|
53
|
+
var alertContent = (<div className={"flex items-start justify-between w-full p-2 rounded-[8px] transition-[opacity,transform] duration-300 ease-[cubic-bezier(0.16,1,0.3,1)] motion-reduce:transition-none ".concat(bgClasses, " ").concat(isVisible ? 'opacity-100 translate-y-0 scale-100' : variant === 'toast' ? 'opacity-0 -translate-y-3 scale-95' : 'opacity-0', " ").concat(variant === 'toast' ? 'max-w-md pointer-events-auto' : '')}>
|
|
54
|
+
<div className="flex items-start gap-2 text-light-text-primary dark:text-dark-text-primary">
|
|
61
55
|
<div className="flex flex-col text-left">
|
|
62
56
|
<span className="text-body2">{message}</span>
|
|
63
57
|
{secondMessage && (<span className="text-body2 opacity-70">{secondMessage}</span>)}
|
|
@@ -108,8 +108,8 @@ export default function Button(_a) {
|
|
|
108
108
|
textOnly: 'text-light-text-primary dark:text-dark-text-primary',
|
|
109
109
|
},
|
|
110
110
|
danger: {
|
|
111
|
-
primary: 'bg-light-error-main dark:bg-dark-error-main text-
|
|
112
|
-
secondary: 'bg-light-error-
|
|
111
|
+
primary: 'bg-light-error-main dark:bg-dark-error-main text-light-error-contrast dark:text-dark-error-contrast',
|
|
112
|
+
secondary: 'bg-light-error-alertBg dark:bg-dark-error-alertBg text-light-error-dark dark:text-dark-error-light',
|
|
113
113
|
tertiary: 'bg-transparent border border-light-error-main dark:border-dark-error-main text-light-error-main dark:text-dark-error-main',
|
|
114
114
|
textOnly: 'text-light-error-main dark:text-dark-error-main',
|
|
115
115
|
},
|
|
@@ -123,7 +123,7 @@ export default function Button(_a) {
|
|
|
123
123
|
},
|
|
124
124
|
danger: {
|
|
125
125
|
primary: 'hover:bg-light-error-dark hover:dark:bg-dark-error-dark',
|
|
126
|
-
secondary: 'hover:bg-light-error-
|
|
126
|
+
secondary: 'hover:bg-light-error-light/60 dark:hover:bg-dark-error-dark/60',
|
|
127
127
|
tertiary: 'hover:bg-light-error-main/10 dark:hover:bg-dark-error-main/10',
|
|
128
128
|
textOnly: 'hover:bg-light-error-main/10 dark:hover:bg-dark-error-main/10',
|
|
129
129
|
},
|
|
@@ -3,7 +3,7 @@ import * as LucideIcons from 'lucide-react';
|
|
|
3
3
|
interface IconButtonProps {
|
|
4
4
|
color: "primary" | "secondary" | "tertiary" | "iconOnly";
|
|
5
5
|
state: "enabled" | "selected" | "disabled";
|
|
6
|
-
size: "large" | "medium" | "small";
|
|
6
|
+
size: "large" | "medium" | "small" | "tiny";
|
|
7
7
|
iconName: keyof typeof LucideIcons;
|
|
8
8
|
onClick?: any;
|
|
9
9
|
loading?: boolean;
|
|
@@ -17,11 +17,13 @@ export default function IconButton(_a) {
|
|
|
17
17
|
large: 'p-2', // 8px padding
|
|
18
18
|
medium: 'p-1', // 4px padding
|
|
19
19
|
small: 'p-1', // 4px padding
|
|
20
|
+
tiny: 'p-0.5', // 2px padding
|
|
20
21
|
};
|
|
21
22
|
var iconSizeClasses = {
|
|
22
23
|
large: 'size-6', // 24px
|
|
23
24
|
medium: 'size-6', // 24px
|
|
24
25
|
small: 'size-5', // 20px
|
|
26
|
+
tiny: 'size-4', // 16px
|
|
25
27
|
};
|
|
26
28
|
// Base classes (padding and corner radius)
|
|
27
29
|
var baseClasses = "".concat(sizeClasses[size], " rounded-[8px] leading-none relative");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface LoadingSmallProps {
|
|
3
|
-
size?: 'large' | 'medium' | 'small';
|
|
3
|
+
size?: 'large' | 'medium' | 'small' | 'tiny';
|
|
4
4
|
}
|
|
5
5
|
export default function LoadingScreen(): React.JSX.Element;
|
|
6
6
|
export declare function LoadingSmall({ size }: LoadingSmallProps): React.JSX.Element;
|
|
@@ -12,6 +12,7 @@ export function LoadingSmall(_a) {
|
|
|
12
12
|
large: 'w-6 h-6 border-2', // 24px, border-2 for proportional thickness
|
|
13
13
|
medium: 'w-6 h-6 border-2', // 24px, border-2
|
|
14
14
|
small: 'w-5 h-5 border-2', // 20px, slightly thinner border
|
|
15
|
+
tiny: 'w-4 h-4 border-2', // 16px
|
|
15
16
|
};
|
|
16
17
|
return (<div className="flex justify-center items-center">
|
|
17
18
|
<div className={"rounded-full border-t-transparent border-r-light-text-primary border-b-light-text-primary border-l-light-text-primary dark:border-t-transparent dark:border-r-dark-text-primary dark:border-b-dark-text-primary dark:border-l-dark-text-primary animate-spin ".concat(spinnerSizeClasses[size])}/>
|
|
@@ -2,6 +2,7 @@ import React, { JSX } from 'react';
|
|
|
2
2
|
interface MenuItemProps {
|
|
3
3
|
href?: string;
|
|
4
4
|
iconName?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
5
6
|
userHandle?: string;
|
|
6
7
|
userImgUrl?: string;
|
|
7
8
|
label: string;
|
|
@@ -19,5 +20,5 @@ interface MenuItemProps {
|
|
|
19
20
|
iconRight?: string;
|
|
20
21
|
rightAction?: React.ReactNode;
|
|
21
22
|
}
|
|
22
|
-
export default function MenuItem({ href, iconName, userHandle, userImgUrl, label, secondLabel, isSelected, onClick, className, size, tag, iconRight, rightAction, }: MenuItemProps): JSX.Element;
|
|
23
|
+
export default function MenuItem({ href, iconName, icon, userHandle, userImgUrl, label, secondLabel, isSelected, onClick, className, size, tag, iconRight, rightAction, }: MenuItemProps): JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -41,7 +41,7 @@ import UserImage from './userImage';
|
|
|
41
41
|
import Tag from './tag';
|
|
42
42
|
export default function MenuItem(_a) {
|
|
43
43
|
var _this = this;
|
|
44
|
-
var href = _a.href, iconName = _a.iconName, userHandle = _a.userHandle, userImgUrl = _a.userImgUrl, label = _a.label, secondLabel = _a.secondLabel, isSelected = _a.isSelected, onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, tag = _a.tag, iconRight = _a.iconRight, rightAction = _a.rightAction;
|
|
44
|
+
var href = _a.href, iconName = _a.iconName, icon = _a.icon, userHandle = _a.userHandle, userImgUrl = _a.userImgUrl, label = _a.label, secondLabel = _a.secondLabel, isSelected = _a.isSelected, onClick = _a.onClick, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, tag = _a.tag, iconRight = _a.iconRight, rightAction = _a.rightAction;
|
|
45
45
|
var _d = useState(null), IconLeft = _d[0], setIconLeft = _d[1];
|
|
46
46
|
var _e = useState(null), IconRight = _e[0], setIconRight = _e[1];
|
|
47
47
|
var loadIcon = useCallback(function (iconName) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -101,7 +101,7 @@ export default function MenuItem(_a) {
|
|
|
101
101
|
: 'hover:bg-light-background-accent200 hover:dark:bg-dark-background-accent200', "\n ").concat(className, "\n ")} style={{ width: '100%' }} onClick={onClick}>
|
|
102
102
|
{/* Left group: icon/userImg + label with 8px gap */}
|
|
103
103
|
<div className="flex items-center gap-2 min-w-0">
|
|
104
|
-
{userImgUrl ? (<UserImage userHandle={userHandle || ''} userImgUrl={userImgUrl}/>) : (IconLeft && (<IconLeft className={"".concat(iconSize, " flex-shrink-0 ").concat(isSelected ? 'text-light-text-contrast dark:text-dark-text-contrast' : 'text-light-text-secondary dark:text-dark-text-secondary')} strokeWidth={2}/>))}
|
|
104
|
+
{userImgUrl ? (<UserImage userHandle={userHandle || ''} userImgUrl={userImgUrl}/>) : icon ? (<span className={"".concat(iconSize, " flex-shrink-0 flex items-center justify-center")}>{icon}</span>) : (IconLeft && (<IconLeft className={"".concat(iconSize, " flex-shrink-0 ").concat(isSelected ? 'text-light-text-contrast dark:text-dark-text-contrast' : 'text-light-text-secondary dark:text-dark-text-secondary')} strokeWidth={2}/>))}
|
|
105
105
|
<div className="flex flex-col min-w-0">
|
|
106
106
|
<span className={"truncate ".concat(labelClass, " ").concat(isSelected ? 'text-light-text-contrast dark:text-dark-text-contrast' : 'text-light-text-primary dark:text-dark-text-primary')}>
|
|
107
107
|
{label}
|
|
@@ -31,7 +31,7 @@ export default function Modal(_a) {
|
|
|
31
31
|
};
|
|
32
32
|
if (!isOpen)
|
|
33
33
|
return null;
|
|
34
|
-
return (<div className="fixed bg-
|
|
34
|
+
return (<div className="fixed bg-light-misc-scrim/40 dark:bg-dark-misc-scrim/40 flex items-center justify-center z-50" style={{ top: 0, left: 0, right: 0, bottom: 0 }} onClick={handleOverlayClick} role="dialog" aria-labelledby="modal-title" aria-modal="true" tabIndex={-1}>
|
|
35
35
|
<div className={"bg-light-background-default dark:bg-dark-background-default rounded-[8px] ".concat(modalWidth, " flex flex-col")} style={{
|
|
36
36
|
maxWidth: maxWidth,
|
|
37
37
|
width: 'calc(100vw - 64px)',
|
package/dist/components/tag.jsx
CHANGED
|
@@ -12,7 +12,7 @@ var colorConfig = {
|
|
|
12
12
|
},
|
|
13
13
|
success: {
|
|
14
14
|
bg: 'bg-light-success-main dark:bg-dark-success-main',
|
|
15
|
-
text: 'text-
|
|
15
|
+
text: 'text-light-success-contrast dark:text-dark-text-primary',
|
|
16
16
|
textOnly: 'text-light-success-main dark:text-dark-success-main',
|
|
17
17
|
border: 'border-light-success-main dark:border-dark-success-main',
|
|
18
18
|
dot: 'bg-light-success-main dark:bg-dark-success-main',
|
|
@@ -20,7 +20,7 @@ var colorConfig = {
|
|
|
20
20
|
},
|
|
21
21
|
warning: {
|
|
22
22
|
bg: 'bg-light-warning-main dark:bg-dark-warning-main',
|
|
23
|
-
text: 'text-
|
|
23
|
+
text: 'text-light-warning-contrast dark:text-dark-text-primary',
|
|
24
24
|
textOnly: 'text-light-warning-main dark:text-dark-warning-main',
|
|
25
25
|
border: 'border-light-warning-main dark:border-dark-warning-main',
|
|
26
26
|
dot: 'bg-light-warning-main dark:bg-dark-warning-main',
|
|
@@ -28,7 +28,7 @@ var colorConfig = {
|
|
|
28
28
|
},
|
|
29
29
|
error: {
|
|
30
30
|
bg: 'bg-light-error-main dark:bg-dark-error-main',
|
|
31
|
-
text: 'text-
|
|
31
|
+
text: 'text-light-error-contrast dark:text-dark-text-primary',
|
|
32
32
|
textOnly: 'text-light-error-main dark:text-dark-error-main',
|
|
33
33
|
border: 'border-light-error-main dark:border-dark-error-main',
|
|
34
34
|
dot: 'bg-light-error-main dark:bg-dark-error-main',
|
|
@@ -36,7 +36,7 @@ var colorConfig = {
|
|
|
36
36
|
},
|
|
37
37
|
info: {
|
|
38
38
|
bg: 'bg-light-info-main dark:bg-dark-info-main',
|
|
39
|
-
text: 'text-
|
|
39
|
+
text: 'text-light-info-contrast dark:text-dark-text-primary',
|
|
40
40
|
textOnly: 'text-light-info-main dark:text-dark-info-main',
|
|
41
41
|
border: 'border-light-info-main dark:border-dark-info-main',
|
|
42
42
|
dot: 'bg-light-info-main dark:bg-dark-info-main',
|
|
@@ -77,7 +77,8 @@ export default function Tag(_a) {
|
|
|
77
77
|
fontClasses = variant === 'textOnly' ? colorStyles.textOnly : colorStyles.text;
|
|
78
78
|
}
|
|
79
79
|
else if (isSelected) {
|
|
80
|
-
|
|
80
|
+
// Selected tags sit on accent-main — use the accent contrast token
|
|
81
|
+
fontClasses = 'text-light-accent-contrast dark:text-dark-accent-contrast';
|
|
81
82
|
}
|
|
82
83
|
else {
|
|
83
84
|
fontClasses = 'text-light-text-primary dark:text-dark-text-primary';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import React, { useState, useRef,
|
|
2
|
+
import React, { useState, useRef, useLayoutEffect } from 'react';
|
|
3
|
+
var VIEWPORT_MARGIN = 8;
|
|
3
4
|
export default function Tooltip(_a) {
|
|
4
5
|
var title = _a.title, children = _a.children, placement = _a.placement;
|
|
5
6
|
var _b = useState(false), visible = _b[0], setVisible = _b[1];
|
|
6
7
|
var _c = useState(placement !== null && placement !== void 0 ? placement : 'bottom'), position = _c[0], setPosition = _c[1];
|
|
8
|
+
var _d = useState(0), shiftX = _d[0], setShiftX = _d[1];
|
|
7
9
|
var tooltipRef = useRef(null);
|
|
8
10
|
var buttonRef = useRef(null);
|
|
9
|
-
|
|
11
|
+
useLayoutEffect(function () {
|
|
12
|
+
if (!visible)
|
|
13
|
+
return;
|
|
10
14
|
var handlePosition = function () {
|
|
11
15
|
if (tooltipRef.current && buttonRef.current) {
|
|
12
16
|
var tooltipRect = tooltipRef.current.getBoundingClientRect();
|
|
@@ -15,18 +19,28 @@ export default function Tooltip(_a) {
|
|
|
15
19
|
if (placement) {
|
|
16
20
|
setPosition(placement);
|
|
17
21
|
}
|
|
18
|
-
else if (window.innerHeight - buttonRect.bottom < tooltipRect.height + 8) {
|
|
19
|
-
setPosition('top');
|
|
20
|
-
}
|
|
21
22
|
else {
|
|
22
|
-
|
|
23
|
+
var spaceBelow = window.innerHeight - buttonRect.bottom;
|
|
24
|
+
var fitsBelow = spaceBelow >= tooltipRect.height + VIEWPORT_MARGIN;
|
|
25
|
+
var fitsAbove = buttonRect.top >= tooltipRect.height + VIEWPORT_MARGIN;
|
|
26
|
+
setPosition(!fitsBelow && fitsAbove ? 'top' : 'bottom');
|
|
23
27
|
}
|
|
28
|
+
// Keep the tooltip inside the viewport horizontally
|
|
29
|
+
var centerX = buttonRect.left + buttonRect.width / 2;
|
|
30
|
+
var half = tooltipRect.width / 2;
|
|
31
|
+
var minCenter = VIEWPORT_MARGIN + half;
|
|
32
|
+
var maxCenter = window.innerWidth - VIEWPORT_MARGIN - half;
|
|
33
|
+
setShiftX(Math.min(Math.max(centerX, minCenter), maxCenter) - centerX);
|
|
24
34
|
}
|
|
25
35
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
handlePosition();
|
|
37
|
+
window.addEventListener('resize', handlePosition);
|
|
38
|
+
window.addEventListener('scroll', handlePosition, true);
|
|
39
|
+
return function () {
|
|
40
|
+
window.removeEventListener('resize', handlePosition);
|
|
41
|
+
window.removeEventListener('scroll', handlePosition, true);
|
|
42
|
+
};
|
|
43
|
+
}, [visible, placement, title]);
|
|
30
44
|
var handleClick = function () {
|
|
31
45
|
setVisible(false); // Hide tooltip on click
|
|
32
46
|
};
|
|
@@ -36,7 +50,7 @@ export default function Tooltip(_a) {
|
|
|
36
50
|
bottom: position === 'top' ? '100%' : undefined,
|
|
37
51
|
top: position === 'bottom' ? '100%' : undefined,
|
|
38
52
|
left: '50%',
|
|
39
|
-
transform:
|
|
53
|
+
transform: "translateX(calc(-50% + ".concat(shiftX, "px))"),
|
|
40
54
|
}}>
|
|
41
55
|
{title}
|
|
42
56
|
</div>)}
|
|
@@ -27,6 +27,8 @@ export default function UserImage(_a) {
|
|
|
27
27
|
var seed = getColorSeed(userHandle);
|
|
28
28
|
var hue = Math.abs(getHash(seed)) % 360;
|
|
29
29
|
var saturation = grayscale ? 0 : 80;
|
|
30
|
+
// DESIGN-TOKEN EXCEPTION: avatar backgrounds are derived from a hash of the
|
|
31
|
+
// user handle (per-user identity color), so they cannot map to a static token.
|
|
30
32
|
// Light mode: vibrant pastel
|
|
31
33
|
var lightBg = "hsl(".concat(hue, ", ").concat(saturation, "%, 80%)");
|
|
32
34
|
// Dark mode: darker, vibrant variant
|
package/dist/designTokens.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export namespace colors {
|
|
|
40
40
|
let light_4: string;
|
|
41
41
|
export { light_4 as light };
|
|
42
42
|
export let alertBg: string;
|
|
43
|
+
let contrast_2: string;
|
|
44
|
+
export { contrast_2 as contrast };
|
|
43
45
|
}
|
|
44
46
|
export namespace warning {
|
|
45
47
|
let main_4: string;
|
|
@@ -50,6 +52,8 @@ export namespace colors {
|
|
|
50
52
|
export { light_5 as light };
|
|
51
53
|
let alertBg_1: string;
|
|
52
54
|
export { alertBg_1 as alertBg };
|
|
55
|
+
let contrast_3: string;
|
|
56
|
+
export { contrast_3 as contrast };
|
|
53
57
|
}
|
|
54
58
|
export namespace info {
|
|
55
59
|
let main_5: string;
|
|
@@ -60,6 +64,8 @@ export namespace colors {
|
|
|
60
64
|
export { light_6 as light };
|
|
61
65
|
let alertBg_2: string;
|
|
62
66
|
export { alertBg_2 as alertBg };
|
|
67
|
+
let contrast_4: string;
|
|
68
|
+
export { contrast_4 as contrast };
|
|
63
69
|
}
|
|
64
70
|
export namespace success {
|
|
65
71
|
let main_6: string;
|
|
@@ -70,6 +76,8 @@ export namespace colors {
|
|
|
70
76
|
export { light_7 as light };
|
|
71
77
|
let alertBg_3: string;
|
|
72
78
|
export { alertBg_3 as alertBg };
|
|
79
|
+
let contrast_5: string;
|
|
80
|
+
export { contrast_5 as contrast };
|
|
73
81
|
}
|
|
74
82
|
export namespace background {
|
|
75
83
|
let _default: string;
|
|
@@ -106,6 +114,7 @@ export namespace colors {
|
|
|
106
114
|
}
|
|
107
115
|
export namespace misc {
|
|
108
116
|
let divider: string;
|
|
117
|
+
let scrim: string;
|
|
109
118
|
}
|
|
110
119
|
}
|
|
111
120
|
export namespace dark_7 {
|
|
@@ -116,8 +125,8 @@ export namespace colors {
|
|
|
116
125
|
export { secondary_2 as secondary };
|
|
117
126
|
let disabled_4: string;
|
|
118
127
|
export { disabled_4 as disabled };
|
|
119
|
-
let
|
|
120
|
-
export {
|
|
128
|
+
let contrast_6: string;
|
|
129
|
+
export { contrast_6 as contrast };
|
|
121
130
|
}
|
|
122
131
|
export { text_1 as text };
|
|
123
132
|
export namespace accent_1 {
|
|
@@ -127,8 +136,8 @@ export namespace colors {
|
|
|
127
136
|
export { dark_8 as dark };
|
|
128
137
|
let light_8: string;
|
|
129
138
|
export { light_8 as light };
|
|
130
|
-
let
|
|
131
|
-
export {
|
|
139
|
+
let contrast_7: string;
|
|
140
|
+
export { contrast_7 as contrast };
|
|
132
141
|
}
|
|
133
142
|
export { accent_1 as accent };
|
|
134
143
|
export namespace primary_3 {
|
|
@@ -158,6 +167,8 @@ export namespace colors {
|
|
|
158
167
|
export { light_11 as light };
|
|
159
168
|
let alertBg_4: string;
|
|
160
169
|
export { alertBg_4 as alertBg };
|
|
170
|
+
let contrast_8: string;
|
|
171
|
+
export { contrast_8 as contrast };
|
|
161
172
|
}
|
|
162
173
|
export { error_1 as error };
|
|
163
174
|
export namespace warning_1 {
|
|
@@ -169,6 +180,8 @@ export namespace colors {
|
|
|
169
180
|
export { light_12 as light };
|
|
170
181
|
let alertBg_5: string;
|
|
171
182
|
export { alertBg_5 as alertBg };
|
|
183
|
+
let contrast_9: string;
|
|
184
|
+
export { contrast_9 as contrast };
|
|
172
185
|
}
|
|
173
186
|
export { warning_1 as warning };
|
|
174
187
|
export namespace info_1 {
|
|
@@ -180,6 +193,8 @@ export namespace colors {
|
|
|
180
193
|
export { light_13 as light };
|
|
181
194
|
let alertBg_6: string;
|
|
182
195
|
export { alertBg_6 as alertBg };
|
|
196
|
+
let contrast_10: string;
|
|
197
|
+
export { contrast_10 as contrast };
|
|
183
198
|
}
|
|
184
199
|
export { info_1 as info };
|
|
185
200
|
export namespace success_1 {
|
|
@@ -191,6 +206,8 @@ export namespace colors {
|
|
|
191
206
|
export { light_14 as light };
|
|
192
207
|
let alertBg_7: string;
|
|
193
208
|
export { alertBg_7 as alertBg };
|
|
209
|
+
let contrast_11: string;
|
|
210
|
+
export { contrast_11 as contrast };
|
|
194
211
|
}
|
|
195
212
|
export { success_1 as success };
|
|
196
213
|
export namespace background_1 {
|
|
@@ -242,6 +259,8 @@ export namespace colors {
|
|
|
242
259
|
export namespace misc_1 {
|
|
243
260
|
let divider_1: string;
|
|
244
261
|
export { divider_1 as divider };
|
|
262
|
+
let scrim_1: string;
|
|
263
|
+
export { scrim_1 as scrim };
|
|
245
264
|
}
|
|
246
265
|
export { misc_1 as misc };
|
|
247
266
|
}
|
package/dist/designTokens.js
CHANGED
|
@@ -31,24 +31,28 @@ module.exports = {
|
|
|
31
31
|
dark: '#B22323',
|
|
32
32
|
light: '#F27777',
|
|
33
33
|
alertBg: '#F2C4C4',
|
|
34
|
+
contrast: '#FFFFFF',
|
|
34
35
|
},
|
|
35
36
|
warning: {
|
|
36
37
|
main: '#EF6C00',
|
|
37
38
|
dark: '#CC5302',
|
|
38
39
|
light: '#FFA732',
|
|
39
40
|
alertBg: '#F5D5B0',
|
|
41
|
+
contrast: '#FFFFFF',
|
|
40
42
|
},
|
|
41
43
|
info: {
|
|
42
44
|
main: '#0087D4',
|
|
43
45
|
dark: '#006BAB',
|
|
44
46
|
light: '#2CC1FF',
|
|
45
47
|
alertBg: '#B8D9F0',
|
|
48
|
+
contrast: '#FFFFFF',
|
|
46
49
|
},
|
|
47
50
|
success: {
|
|
48
51
|
main: '#328736',
|
|
49
52
|
dark: '#2A6B2D',
|
|
50
53
|
light: '#67C16B',
|
|
51
54
|
alertBg: '#C4E2C5',
|
|
55
|
+
contrast: '#FFFFFF',
|
|
52
56
|
},
|
|
53
57
|
background: {
|
|
54
58
|
default: '#e8e8e8',
|
|
@@ -77,6 +81,7 @@ module.exports = {
|
|
|
77
81
|
},
|
|
78
82
|
misc: {
|
|
79
83
|
divider: '#D1D1D1',
|
|
84
|
+
scrim: '#000000',
|
|
80
85
|
},
|
|
81
86
|
},
|
|
82
87
|
// dark
|
|
@@ -108,24 +113,28 @@ module.exports = {
|
|
|
108
113
|
dark: '#B22323',
|
|
109
114
|
light: '#F27777',
|
|
110
115
|
alertBg: '#5C1A1A',
|
|
116
|
+
contrast: '#FFFFFF',
|
|
111
117
|
},
|
|
112
118
|
warning: {
|
|
113
119
|
main: '#FF8C0A',
|
|
114
120
|
dark: '#CC5302',
|
|
115
121
|
light: '#FFA732',
|
|
116
122
|
alertBg: '#5C2E0A',
|
|
123
|
+
contrast: '#FFFFFF',
|
|
117
124
|
},
|
|
118
125
|
info: {
|
|
119
126
|
main: '#00AFFF',
|
|
120
127
|
dark: '#006BAB',
|
|
121
128
|
light: '#2CC1FF',
|
|
122
129
|
alertBg: '#0A3A5C',
|
|
130
|
+
contrast: '#FFFFFF',
|
|
123
131
|
},
|
|
124
132
|
success: {
|
|
125
133
|
main: '#42A547',
|
|
126
134
|
dark: '#2A6B2D',
|
|
127
135
|
light: '#67C16B',
|
|
128
136
|
alertBg: '#1A4A1D',
|
|
137
|
+
contrast: '#FFFFFF',
|
|
129
138
|
},
|
|
130
139
|
background: {
|
|
131
140
|
default: '#262626',
|
|
@@ -154,6 +163,7 @@ module.exports = {
|
|
|
154
163
|
},
|
|
155
164
|
misc: {
|
|
156
165
|
divider: '#404040',
|
|
166
|
+
scrim: '#000000',
|
|
157
167
|
},
|
|
158
168
|
},
|
|
159
169
|
},
|