oneslash-design-system 1.3.5 → 1.4.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 +1 -1
- 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/userImage.jsx +2 -0
- package/dist/designTokens.d.ts +23 -4
- package/dist/designTokens.js +10 -0
- package/dist/output.css +76 -16
- 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 +1 -1
|
@@ -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 duration-200 ease-out ".concat(bgClasses, " ").concat(isVisible ? 'opacity-100' : '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,7 +108,7 @@ 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-
|
|
111
|
+
primary: 'bg-light-error-main dark:bg-dark-error-main text-light-error-contrast dark:text-dark-error-contrast',
|
|
112
112
|
secondary: 'bg-light-error-light dark:bg-dark-error-light text-light-error-main dark:text-dark-error-main',
|
|
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',
|
|
@@ -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';
|
|
@@ -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
|
},
|
package/dist/output.css
CHANGED
|
@@ -548,6 +548,9 @@ video {
|
|
|
548
548
|
.visible{
|
|
549
549
|
visibility: visible;
|
|
550
550
|
}
|
|
551
|
+
.static{
|
|
552
|
+
position: static;
|
|
553
|
+
}
|
|
551
554
|
.fixed{
|
|
552
555
|
position: fixed;
|
|
553
556
|
}
|
|
@@ -872,10 +875,6 @@ video {
|
|
|
872
875
|
.bg-\[var\(--light-bg\)\]{
|
|
873
876
|
background-color: var(--light-bg);
|
|
874
877
|
}
|
|
875
|
-
.bg-black{
|
|
876
|
-
--tw-bg-opacity: 1;
|
|
877
|
-
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
|
|
878
|
-
}
|
|
879
878
|
.bg-dark-background-accent300{
|
|
880
879
|
--tw-bg-opacity: 1;
|
|
881
880
|
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
@@ -908,6 +907,10 @@ video {
|
|
|
908
907
|
--tw-bg-opacity: 1;
|
|
909
908
|
background-color: rgb(232 232 232 / var(--tw-bg-opacity));
|
|
910
909
|
}
|
|
910
|
+
.bg-light-error-alertBg{
|
|
911
|
+
--tw-bg-opacity: 1;
|
|
912
|
+
background-color: rgb(242 196 196 / var(--tw-bg-opacity));
|
|
913
|
+
}
|
|
911
914
|
.bg-light-error-light{
|
|
912
915
|
--tw-bg-opacity: 1;
|
|
913
916
|
background-color: rgb(242 119 119 / var(--tw-bg-opacity));
|
|
@@ -916,6 +919,10 @@ video {
|
|
|
916
919
|
--tw-bg-opacity: 1;
|
|
917
920
|
background-color: rgb(211 47 47 / var(--tw-bg-opacity));
|
|
918
921
|
}
|
|
922
|
+
.bg-light-info-alertBg{
|
|
923
|
+
--tw-bg-opacity: 1;
|
|
924
|
+
background-color: rgb(184 217 240 / var(--tw-bg-opacity));
|
|
925
|
+
}
|
|
919
926
|
.bg-light-info-main{
|
|
920
927
|
--tw-bg-opacity: 1;
|
|
921
928
|
background-color: rgb(0 135 212 / var(--tw-bg-opacity));
|
|
@@ -924,6 +931,9 @@ video {
|
|
|
924
931
|
--tw-bg-opacity: 1;
|
|
925
932
|
background-color: rgb(209 209 209 / var(--tw-bg-opacity));
|
|
926
933
|
}
|
|
934
|
+
.bg-light-misc-scrim\/40{
|
|
935
|
+
background-color: rgb(0 0 0 / 0.4);
|
|
936
|
+
}
|
|
927
937
|
.bg-light-primary-dark{
|
|
928
938
|
--tw-bg-opacity: 1;
|
|
929
939
|
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
@@ -936,6 +946,10 @@ video {
|
|
|
936
946
|
--tw-bg-opacity: 1;
|
|
937
947
|
background-color: rgb(176 176 176 / var(--tw-bg-opacity));
|
|
938
948
|
}
|
|
949
|
+
.bg-light-success-alertBg{
|
|
950
|
+
--tw-bg-opacity: 1;
|
|
951
|
+
background-color: rgb(196 226 197 / var(--tw-bg-opacity));
|
|
952
|
+
}
|
|
939
953
|
.bg-light-success-main{
|
|
940
954
|
--tw-bg-opacity: 1;
|
|
941
955
|
background-color: rgb(50 135 54 / var(--tw-bg-opacity));
|
|
@@ -952,6 +966,10 @@ video {
|
|
|
952
966
|
--tw-bg-opacity: 1;
|
|
953
967
|
background-color: rgb(109 109 109 / var(--tw-bg-opacity));
|
|
954
968
|
}
|
|
969
|
+
.bg-light-warning-alertBg{
|
|
970
|
+
--tw-bg-opacity: 1;
|
|
971
|
+
background-color: rgb(245 213 176 / var(--tw-bg-opacity));
|
|
972
|
+
}
|
|
955
973
|
.bg-light-warning-main{
|
|
956
974
|
--tw-bg-opacity: 1;
|
|
957
975
|
background-color: rgb(239 108 0 / var(--tw-bg-opacity));
|
|
@@ -959,9 +977,6 @@ video {
|
|
|
959
977
|
.bg-transparent{
|
|
960
978
|
background-color: transparent;
|
|
961
979
|
}
|
|
962
|
-
.bg-opacity-50{
|
|
963
|
-
--tw-bg-opacity: 0.5;
|
|
964
|
-
}
|
|
965
980
|
.object-cover{
|
|
966
981
|
object-fit: cover;
|
|
967
982
|
}
|
|
@@ -1043,18 +1058,34 @@ video {
|
|
|
1043
1058
|
--tw-text-opacity: 1;
|
|
1044
1059
|
color: rgb(238 238 238 / var(--tw-text-opacity));
|
|
1045
1060
|
}
|
|
1061
|
+
.text-light-accent-contrast{
|
|
1062
|
+
--tw-text-opacity: 1;
|
|
1063
|
+
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
1064
|
+
}
|
|
1046
1065
|
.text-light-accent-main{
|
|
1047
1066
|
--tw-text-opacity: 1;
|
|
1048
1067
|
color: rgb(238 174 3 / var(--tw-text-opacity));
|
|
1049
1068
|
}
|
|
1069
|
+
.text-light-error-contrast{
|
|
1070
|
+
--tw-text-opacity: 1;
|
|
1071
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1072
|
+
}
|
|
1050
1073
|
.text-light-error-main{
|
|
1051
1074
|
--tw-text-opacity: 1;
|
|
1052
1075
|
color: rgb(211 47 47 / var(--tw-text-opacity));
|
|
1053
1076
|
}
|
|
1077
|
+
.text-light-info-contrast{
|
|
1078
|
+
--tw-text-opacity: 1;
|
|
1079
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1080
|
+
}
|
|
1054
1081
|
.text-light-info-main{
|
|
1055
1082
|
--tw-text-opacity: 1;
|
|
1056
1083
|
color: rgb(0 135 212 / var(--tw-text-opacity));
|
|
1057
1084
|
}
|
|
1085
|
+
.text-light-success-contrast{
|
|
1086
|
+
--tw-text-opacity: 1;
|
|
1087
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1088
|
+
}
|
|
1058
1089
|
.text-light-success-main{
|
|
1059
1090
|
--tw-text-opacity: 1;
|
|
1060
1091
|
color: rgb(50 135 54 / var(--tw-text-opacity));
|
|
@@ -1075,13 +1106,13 @@ video {
|
|
|
1075
1106
|
--tw-text-opacity: 1;
|
|
1076
1107
|
color: rgb(109 109 109 / var(--tw-text-opacity));
|
|
1077
1108
|
}
|
|
1078
|
-
.text-light-warning-
|
|
1109
|
+
.text-light-warning-contrast{
|
|
1079
1110
|
--tw-text-opacity: 1;
|
|
1080
|
-
color: rgb(
|
|
1111
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1081
1112
|
}
|
|
1082
|
-
.text-
|
|
1113
|
+
.text-light-warning-main{
|
|
1083
1114
|
--tw-text-opacity: 1;
|
|
1084
|
-
color: rgb(
|
|
1115
|
+
color: rgb(239 108 0 / var(--tw-text-opacity));
|
|
1085
1116
|
}
|
|
1086
1117
|
.underline{
|
|
1087
1118
|
text-decoration-line: underline;
|
|
@@ -1415,6 +1446,11 @@ body {
|
|
|
1415
1446
|
background-color: rgb(38 38 38 / var(--tw-bg-opacity));
|
|
1416
1447
|
}
|
|
1417
1448
|
|
|
1449
|
+
.dark\:bg-dark-error-alertBg:is(.dark *){
|
|
1450
|
+
--tw-bg-opacity: 1;
|
|
1451
|
+
background-color: rgb(92 26 26 / var(--tw-bg-opacity));
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1418
1454
|
.dark\:bg-dark-error-light:is(.dark *){
|
|
1419
1455
|
--tw-bg-opacity: 1;
|
|
1420
1456
|
background-color: rgb(242 119 119 / var(--tw-bg-opacity));
|
|
@@ -1425,6 +1461,11 @@ body {
|
|
|
1425
1461
|
background-color: rgb(231 76 76 / var(--tw-bg-opacity));
|
|
1426
1462
|
}
|
|
1427
1463
|
|
|
1464
|
+
.dark\:bg-dark-info-alertBg:is(.dark *){
|
|
1465
|
+
--tw-bg-opacity: 1;
|
|
1466
|
+
background-color: rgb(10 58 92 / var(--tw-bg-opacity));
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1428
1469
|
.dark\:bg-dark-info-main:is(.dark *){
|
|
1429
1470
|
--tw-bg-opacity: 1;
|
|
1430
1471
|
background-color: rgb(0 175 255 / var(--tw-bg-opacity));
|
|
@@ -1435,6 +1476,10 @@ body {
|
|
|
1435
1476
|
background-color: rgb(64 64 64 / var(--tw-bg-opacity));
|
|
1436
1477
|
}
|
|
1437
1478
|
|
|
1479
|
+
.dark\:bg-dark-misc-scrim\/40:is(.dark *){
|
|
1480
|
+
background-color: rgb(0 0 0 / 0.4);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1438
1483
|
.dark\:bg-dark-primary-dark:is(.dark *){
|
|
1439
1484
|
--tw-bg-opacity: 1;
|
|
1440
1485
|
background-color: rgb(233 233 233 / var(--tw-bg-opacity));
|
|
@@ -1450,6 +1495,11 @@ body {
|
|
|
1450
1495
|
background-color: rgb(79 79 79 / var(--tw-bg-opacity));
|
|
1451
1496
|
}
|
|
1452
1497
|
|
|
1498
|
+
.dark\:bg-dark-success-alertBg:is(.dark *){
|
|
1499
|
+
--tw-bg-opacity: 1;
|
|
1500
|
+
background-color: rgb(26 74 29 / var(--tw-bg-opacity));
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1453
1503
|
.dark\:bg-dark-success-main:is(.dark *){
|
|
1454
1504
|
--tw-bg-opacity: 1;
|
|
1455
1505
|
background-color: rgb(66 165 71 / var(--tw-bg-opacity));
|
|
@@ -1470,6 +1520,11 @@ body {
|
|
|
1470
1520
|
background-color: rgb(176 176 176 / var(--tw-bg-opacity));
|
|
1471
1521
|
}
|
|
1472
1522
|
|
|
1523
|
+
.dark\:bg-dark-warning-alertBg:is(.dark *){
|
|
1524
|
+
--tw-bg-opacity: 1;
|
|
1525
|
+
background-color: rgb(92 46 10 / var(--tw-bg-opacity));
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1473
1528
|
.dark\:bg-dark-warning-main:is(.dark *){
|
|
1474
1529
|
--tw-bg-opacity: 1;
|
|
1475
1530
|
background-color: rgb(255 140 10 / var(--tw-bg-opacity));
|
|
@@ -1480,11 +1535,21 @@ body {
|
|
|
1480
1535
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1481
1536
|
}
|
|
1482
1537
|
|
|
1538
|
+
.dark\:text-dark-accent-contrast:is(.dark *){
|
|
1539
|
+
--tw-text-opacity: 1;
|
|
1540
|
+
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1483
1543
|
.dark\:text-dark-accent-main:is(.dark *){
|
|
1484
1544
|
--tw-text-opacity: 1;
|
|
1485
1545
|
color: rgb(255 205 41 / var(--tw-text-opacity));
|
|
1486
1546
|
}
|
|
1487
1547
|
|
|
1548
|
+
.dark\:text-dark-error-contrast:is(.dark *){
|
|
1549
|
+
--tw-text-opacity: 1;
|
|
1550
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1488
1553
|
.dark\:text-dark-error-main:is(.dark *){
|
|
1489
1554
|
--tw-text-opacity: 1;
|
|
1490
1555
|
color: rgb(231 76 76 / var(--tw-text-opacity));
|
|
@@ -1530,11 +1595,6 @@ body {
|
|
|
1530
1595
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
1531
1596
|
}
|
|
1532
1597
|
|
|
1533
|
-
.dark\:text-white:is(.dark *){
|
|
1534
|
-
--tw-text-opacity: 1;
|
|
1535
|
-
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
1598
|
.dark\:outline-dark-accent-main:is(.dark *){
|
|
1539
1599
|
outline-color: #FFCD29;
|
|
1540
1600
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import MenuItem from "../components/menuItem";
|
|
2
3
|
import IconButton from "../components/iconButton";
|
|
3
4
|
var meta = {
|
|
@@ -77,3 +78,13 @@ export var WithRightAction = {
|
|
|
77
78
|
rightAction: <IconButton iconName="X" size="small" color="tertiary" state="enabled" onClick={function () { return alert('Remove clicked'); }}/>,
|
|
78
79
|
},
|
|
79
80
|
};
|
|
81
|
+
export var WithCustomIcon = {
|
|
82
|
+
args: {
|
|
83
|
+
label: "Brand Item",
|
|
84
|
+
icon: (<svg viewBox="0 0 16 16" className="w-4 h-4 fill-current">
|
|
85
|
+
<rect x="2" y="2" width="12" height="12" rx="3"/>
|
|
86
|
+
</svg>),
|
|
87
|
+
size: "small",
|
|
88
|
+
isSelected: false,
|
|
89
|
+
},
|
|
90
|
+
};
|
package/dist/tailwind.config.js
CHANGED
|
@@ -50,41 +50,49 @@ var config = {
|
|
|
50
50
|
'light-error-dark': designTokens.colors.light.error.dark,
|
|
51
51
|
'light-error-light': designTokens.colors.light.error.light,
|
|
52
52
|
'light-error-alertBg': designTokens.colors.light.error.alertBg,
|
|
53
|
+
'light-error-contrast': designTokens.colors.light.error.contrast,
|
|
53
54
|
// dark: error colors
|
|
54
55
|
'dark-error-main': designTokens.colors.dark.error.main,
|
|
55
56
|
'dark-error-dark': designTokens.colors.dark.error.dark,
|
|
56
57
|
'dark-error-light': designTokens.colors.dark.error.light,
|
|
57
58
|
'dark-error-alertBg': designTokens.colors.dark.error.alertBg,
|
|
59
|
+
'dark-error-contrast': designTokens.colors.dark.error.contrast,
|
|
58
60
|
// light: warning colors
|
|
59
61
|
'light-warning-main': designTokens.colors.light.warning.main,
|
|
60
62
|
'light-warning-dark': designTokens.colors.light.warning.dark,
|
|
61
63
|
'light-warning-light': designTokens.colors.light.warning.light,
|
|
62
64
|
'light-warning-alertBg': designTokens.colors.light.warning.alertBg,
|
|
65
|
+
'light-warning-contrast': designTokens.colors.light.warning.contrast,
|
|
63
66
|
// dark: warning colors
|
|
64
67
|
'dark-warning-main': designTokens.colors.dark.warning.main,
|
|
65
68
|
'dark-warning-dark': designTokens.colors.dark.warning.dark,
|
|
66
69
|
'dark-warning-light': designTokens.colors.dark.warning.light,
|
|
67
70
|
'dark-warning-alertBg': designTokens.colors.dark.warning.alertBg,
|
|
71
|
+
'dark-warning-contrast': designTokens.colors.dark.warning.contrast,
|
|
68
72
|
// light: info colors
|
|
69
73
|
'light-info-main': designTokens.colors.light.info.main,
|
|
70
74
|
'light-info-dark': designTokens.colors.light.info.dark,
|
|
71
75
|
'light-info-light': designTokens.colors.light.info.light,
|
|
72
76
|
'light-info-alertBg': designTokens.colors.light.info.alertBg,
|
|
77
|
+
'light-info-contrast': designTokens.colors.light.info.contrast,
|
|
73
78
|
// dark: info colors
|
|
74
79
|
'dark-info-main': designTokens.colors.dark.info.main,
|
|
75
80
|
'dark-info-dark': designTokens.colors.dark.info.dark,
|
|
76
81
|
'dark-info-light': designTokens.colors.dark.info.light,
|
|
77
82
|
'dark-info-alertBg': designTokens.colors.dark.info.alertBg,
|
|
83
|
+
'dark-info-contrast': designTokens.colors.dark.info.contrast,
|
|
78
84
|
// light: success colors
|
|
79
85
|
'light-success-main': designTokens.colors.light.success.main,
|
|
80
86
|
'light-success-dark': designTokens.colors.light.success.dark,
|
|
81
87
|
'light-success-light': designTokens.colors.light.success.light,
|
|
82
88
|
'light-success-alertBg': designTokens.colors.light.success.alertBg,
|
|
89
|
+
'light-success-contrast': designTokens.colors.light.success.contrast,
|
|
83
90
|
// dark: success colors
|
|
84
91
|
'dark-success-main': designTokens.colors.dark.success.main,
|
|
85
92
|
'dark-success-dark': designTokens.colors.dark.success.dark,
|
|
86
93
|
'dark-success-light': designTokens.colors.dark.success.light,
|
|
87
94
|
'dark-success-alertBg': designTokens.colors.dark.success.alertBg,
|
|
95
|
+
'dark-success-contrast': designTokens.colors.dark.success.contrast,
|
|
88
96
|
// Light: background colors
|
|
89
97
|
'light-background-default': designTokens.colors.light.background.default,
|
|
90
98
|
'light-background-accent100': designTokens.colors.light.background.accent100,
|
|
@@ -129,8 +137,10 @@ var config = {
|
|
|
129
137
|
'dark-actionOutlinedBorder-disabled': designTokens.colors.dark.actionOutlinedBorder.disabled,
|
|
130
138
|
// misc light colors
|
|
131
139
|
'light-misc-divider': designTokens.colors.light.misc.divider,
|
|
140
|
+
'light-misc-scrim': designTokens.colors.light.misc.scrim,
|
|
132
141
|
// misc dark colors
|
|
133
142
|
'dark-misc-divider': designTokens.colors.dark.misc.divider,
|
|
143
|
+
'dark-misc-scrim': designTokens.colors.dark.misc.scrim,
|
|
134
144
|
'dark-misc-scrollbar-bg': designTokens.colors.dark.background.default,
|
|
135
145
|
'dark-misc-scrollbar-thumb': designTokens.colors.dark.background.accent200,
|
|
136
146
|
},
|