@cerebruminc/cerebellum 20.0.0 → 20.0.1
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 +8 -0
- package/package.json +3 -1
- package/src/components/UserCard/UserCard.module.css +0 -18
- package/src/components/UserCard/UserCard.tsx +9 -6
- package/src/components/UserInformationCard/UserInformationCard.module.css +0 -3
- package/src/components/UserInformationCard/UserInformationCard.tsx +1 -1
- package/src/mantine/services/Notification.module.css +5 -13
- package/src/mantine/services/notifications.tsx +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# react-component-lib-boilerplate
|
|
2
2
|
|
|
3
|
+
## [20.0.1](https://github.com/cerebruminc/cerebellum/compare/v20.0.0...v20.0.1) (2026-08-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **dialog:** fix dialog style ([f4580ef](https://github.com/cerebruminc/cerebellum/commit/f4580ef21e45fff007de6636120e38c87d1bb818))
|
|
9
|
+
* **text:** replace problematic CSS styles with Mantine props ([b08abc1](https://github.com/cerebruminc/cerebellum/commit/b08abc10f148cd3e148898d291706393ccb8edae))
|
|
10
|
+
|
|
3
11
|
## [20.0.0](https://github.com/cerebruminc/cerebellum/compare/v19.2.0...v20.0.0) (2026-08-03)
|
|
4
12
|
|
|
5
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerebruminc/cerebellum",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.1",
|
|
4
4
|
"description": "Cerebrum's React Component Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -60,6 +60,8 @@
|
|
|
60
60
|
"@babel/runtime": "^7.23.9",
|
|
61
61
|
"@biomejs/biome": "^1.6.4",
|
|
62
62
|
"@mantine/core": "^8.3.18",
|
|
63
|
+
"@mantine/charts": "^8.3.18",
|
|
64
|
+
"@mantine/dates": "^8.3.18",
|
|
63
65
|
"@mantine/modals": "^8.3.18",
|
|
64
66
|
"@mantine/notifications": "^8.3.18",
|
|
65
67
|
"@storybook/addon-a11y": "^9.1.17",
|
|
@@ -53,18 +53,9 @@
|
|
|
53
53
|
|
|
54
54
|
/* Text styles */
|
|
55
55
|
.name {
|
|
56
|
-
font-size: 18px;
|
|
57
|
-
font-weight: 700;
|
|
58
|
-
line-height: 24px;
|
|
59
56
|
margin-bottom: 7px;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
|
-
.email {
|
|
63
|
-
font-size: 16px;
|
|
64
|
-
font-weight: 400;
|
|
65
|
-
line-height: 24px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
59
|
/* Layout groups */
|
|
69
60
|
.optionsBox {
|
|
70
61
|
margin-top: 27px;
|
|
@@ -116,12 +107,6 @@
|
|
|
116
107
|
width: 320px;
|
|
117
108
|
}
|
|
118
109
|
|
|
119
|
-
.searchText {
|
|
120
|
-
color: #70748c;
|
|
121
|
-
font-size: 16px;
|
|
122
|
-
font-weight: 400;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
110
|
/* Option (clickable list item) */
|
|
126
111
|
.option {
|
|
127
112
|
align-items: center;
|
|
@@ -188,9 +173,6 @@
|
|
|
188
173
|
}
|
|
189
174
|
|
|
190
175
|
.optionText {
|
|
191
|
-
font-size: 15px;
|
|
192
|
-
font-weight: 600;
|
|
193
|
-
letter-spacing: 0.36px;
|
|
194
176
|
padding-right: 5px;
|
|
195
177
|
}
|
|
196
178
|
|
|
@@ -14,6 +14,7 @@ import { ORGS_DIVIDER_ID, SIGN_OUT_DIVIDER_ID, SIGN_OUT_TEXT } from "./const";
|
|
|
14
14
|
import { findOptimalScrollingheight } from "./findOptimalScrollingheight";
|
|
15
15
|
import { UserCardOrganizationsType, UserCardType } from "./types";
|
|
16
16
|
import { useWindowDimensions } from "./useWindowResize";
|
|
17
|
+
import { fontWeightMap } from "../../mantine/mantineTheme";
|
|
17
18
|
|
|
18
19
|
const USER_DETAILS_PADDING = 21;
|
|
19
20
|
const BASE_HEIGHT_OFFSET = 20;
|
|
@@ -197,14 +198,14 @@ export const UserCard: FC<UserCardType> = ({
|
|
|
197
198
|
{isLoading ? (
|
|
198
199
|
<Skeleton height={18} width={100} mt={8} mb={18} />
|
|
199
200
|
) : (
|
|
200
|
-
<Text className={styles.name} c="gray.9">
|
|
201
|
+
<Text className={styles.name} variant="body-lg" c="gray.9" fw={fontWeightMap.Bold} lh="24px">
|
|
201
202
|
{userName}
|
|
202
203
|
</Text>
|
|
203
204
|
)}
|
|
204
205
|
{isLoading ? (
|
|
205
206
|
<Skeleton height={16} width={160} mb={8} />
|
|
206
207
|
) : (
|
|
207
|
-
<Text
|
|
208
|
+
<Text variant="body-md" c="gray.9" lh="24px">
|
|
208
209
|
<Truncate>{userEmail}</Truncate>
|
|
209
210
|
</Text>
|
|
210
211
|
)}
|
|
@@ -239,7 +240,7 @@ export const UserCard: FC<UserCardType> = ({
|
|
|
239
240
|
</div>
|
|
240
241
|
</div>
|
|
241
242
|
)}
|
|
242
|
-
<Text className={styles.optionText} c="gray.9">
|
|
243
|
+
<Text className={styles.optionText} variant="semibold-sm" c="gray.9" style={{ letterSpacing: "0.36px" }}>
|
|
243
244
|
<Truncate lines={2}>{text}</Truncate>
|
|
244
245
|
</Text>
|
|
245
246
|
</div>
|
|
@@ -253,7 +254,9 @@ export const UserCard: FC<UserCardType> = ({
|
|
|
253
254
|
|
|
254
255
|
{organizations && orgSearchThreshold && organizations.length > orgSearchThreshold ? (
|
|
255
256
|
<div className={styles.searchGroup}>
|
|
256
|
-
<Text
|
|
257
|
+
<Text variant="body-md" c="gray.8">
|
|
258
|
+
Organizations:
|
|
259
|
+
</Text>
|
|
257
260
|
<TextInput
|
|
258
261
|
size="sm"
|
|
259
262
|
placeholder="Search"
|
|
@@ -319,7 +322,7 @@ export const UserCard: FC<UserCardType> = ({
|
|
|
319
322
|
</div>
|
|
320
323
|
</div>
|
|
321
324
|
)}
|
|
322
|
-
<Text className={styles.optionText} c="gray.9">
|
|
325
|
+
<Text className={styles.optionText} variant="semibold-sm" c="gray.9" style={{ letterSpacing: "0.36px" }}>
|
|
323
326
|
<Truncate lines={2}>{text}</Truncate>
|
|
324
327
|
</Text>
|
|
325
328
|
{isActive && multipleOrgs && (
|
|
@@ -354,7 +357,7 @@ export const UserCard: FC<UserCardType> = ({
|
|
|
354
357
|
<LogOut fill={TEXT_COLOR} />
|
|
355
358
|
</div>
|
|
356
359
|
</div>
|
|
357
|
-
<Text className={styles.optionText} c="gray.9">
|
|
360
|
+
<Text className={styles.optionText} variant="semibold-sm" c="gray.9" style={{ letterSpacing: "0.36px" }}>
|
|
358
361
|
{SIGN_OUT_TEXT}
|
|
359
362
|
</Text>
|
|
360
363
|
</div>
|
|
@@ -158,10 +158,7 @@
|
|
|
158
158
|
.orderTag {
|
|
159
159
|
background-color: #8da7ff; /* BLUE_35 — no exact Mantine shade */
|
|
160
160
|
border-radius: 6px;
|
|
161
|
-
color: var(--mantine-color-white);
|
|
162
161
|
display: inline-block;
|
|
163
|
-
font-size: 16px;
|
|
164
|
-
font-weight: 600;
|
|
165
162
|
max-width: calc(var(--uic-order-tag-max-width, 186px) - 44px);
|
|
166
163
|
padding: 6px 17px;
|
|
167
164
|
}
|
|
@@ -156,7 +156,7 @@ export const UserInformationCard: FC<UserInformationCardType> = ({
|
|
|
156
156
|
>
|
|
157
157
|
{orderType && (
|
|
158
158
|
<div className={styles.orderTag} style={{ "--uic-order-tag-max-width": `${orderTagMaxWidth}px` } as CSSProperties}>
|
|
159
|
-
<Text component="span" fw={fontWeightMap.SemiBold} truncate data-sentry-unmask>
|
|
159
|
+
<Text component="span" variant="body-md" c="white" fw={fontWeightMap.SemiBold} truncate data-sentry-unmask>
|
|
160
160
|
{orderType}
|
|
161
161
|
</Text>
|
|
162
162
|
</div>
|
|
@@ -9,26 +9,18 @@
|
|
|
9
9
|
opacity: 1;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
/* Mantine's
|
|
13
|
-
.
|
|
12
|
+
/* Higher specificity than Mantine's single-class selector so this still wins
|
|
13
|
+
even when Mantine global styles are loaded later. */
|
|
14
|
+
.root.root::before {
|
|
14
15
|
width: 100%;
|
|
15
16
|
top: 0;
|
|
16
17
|
left: 0;
|
|
17
18
|
right: 0;
|
|
18
19
|
height: 5px;
|
|
20
|
+
inset-inline-start: 0;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
/* Mantine hides the ::before bar when an icon is present — re-enable it */
|
|
22
|
-
.root[data-with-icon]
|
|
24
|
+
.root.root[data-with-icon]::before {
|
|
23
25
|
display: block;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
.anchorRoot {
|
|
27
|
-
color: var(--mantine-color-gray-8);
|
|
28
|
-
transition: color 350ms ease;
|
|
29
|
-
text-underline-offset: 5px;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
}
|
|
32
|
-
.anchorRoot:hover {
|
|
33
|
-
color: var(--mantine-color-gray-9);
|
|
34
|
-
}
|
|
@@ -2,9 +2,6 @@ import { Anchor, Button, Group, Text } from "@mantine/core";
|
|
|
2
2
|
import { type NotificationData, type NotificationsStore, notifications } from "@mantine/notifications";
|
|
3
3
|
import type { MouseEventHandler } from "react";
|
|
4
4
|
import { fontWeightMap } from "../mantineTheme";
|
|
5
|
-
import notificationClasses from "./Notification.module.css";
|
|
6
|
-
|
|
7
|
-
console.log("notificationClasses", notificationClasses);
|
|
8
5
|
|
|
9
6
|
type ToastNotification = Omit<NotificationData, "title">;
|
|
10
7
|
|
|
@@ -65,8 +62,17 @@ export const showBar = (notification: BarNotification, store?: NotificationsStor
|
|
|
65
62
|
</Text>
|
|
66
63
|
<Anchor
|
|
67
64
|
component="button"
|
|
68
|
-
classNames={{ root: notificationClasses.anchorRoot }}
|
|
69
65
|
variant="body-sm"
|
|
66
|
+
c="gray.8"
|
|
67
|
+
styles={{
|
|
68
|
+
root: {
|
|
69
|
+
textUnderlineOffset: "5px",
|
|
70
|
+
whiteSpace: "nowrap",
|
|
71
|
+
"&:hover": {
|
|
72
|
+
color: "var(--mantine-color-gray-9)",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}}
|
|
70
76
|
onClick={(event) => {
|
|
71
77
|
buttonClick?.(event);
|
|
72
78
|
notifications.hide(id, store);
|