Skip to content

Commit 9879c09

Browse files
committed
fix: remove permission from theme and change name to colorRoles
1 parent c44ad03 commit 9879c09

File tree

57 files changed

+214
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+214
-208
lines changed

site/src/components/ActiveUserChart/ActiveUserChart.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({
127127
{
128128
label: `${interval === "day" ? "Daily" : "Weekly"} Active Users`,
129129
data: chartData,
130-
pointBackgroundColor: theme.roles.active.outline,
131-
pointBorderColor: theme.roles.active.outline,
132-
borderColor: theme.roles.active.outline,
130+
pointBackgroundColor: theme.colorRoles.active.outline,
131+
pointBorderColor: theme.colorRoles.active.outline,
132+
borderColor: theme.colorRoles.active.outline,
133133
},
134134
],
135135
}}

site/src/components/Badges/Badges.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ const styles = {
2424
},
2525

2626
enabledBadge: (theme) => ({
27-
border: `1px solid ${theme.roles.success.outline}`,
28-
backgroundColor: theme.roles.success.background,
29-
color: theme.roles.success.text,
27+
border: `1px solid ${theme.colorRoles.success.outline}`,
28+
backgroundColor: theme.colorRoles.success.background,
29+
color: theme.colorRoles.success.text,
3030
}),
3131
errorBadge: (theme) => ({
32-
border: `1px solid ${theme.roles.error.outline}`,
33-
backgroundColor: theme.roles.error.background,
34-
color: theme.roles.error.text,
32+
border: `1px solid ${theme.colorRoles.error.outline}`,
33+
backgroundColor: theme.colorRoles.error.background,
34+
color: theme.colorRoles.error.text,
3535
}),
3636
warnBadge: (theme) => ({
37-
border: `1px solid ${theme.roles.warning.outline}`,
38-
backgroundColor: theme.roles.warning.background,
39-
color: theme.roles.warning.text,
37+
border: `1px solid ${theme.colorRoles.warning.outline}`,
38+
backgroundColor: theme.colorRoles.warning.background,
39+
color: theme.colorRoles.warning.text,
4040
}),
4141
} satisfies Record<string, Interpolation<Theme>>;
4242

@@ -112,9 +112,9 @@ export const EnterpriseBadge: FC = () => {
112112
css={[
113113
styles.badge,
114114
(theme) => ({
115-
backgroundColor: theme.roles.notice.background,
116-
border: `1px solid ${theme.roles.notice.outline}`,
117-
color: theme.roles.notice.text,
115+
backgroundColor: theme.colorRoles.notice.background,
116+
border: `1px solid ${theme.colorRoles.notice.outline}`,
117+
color: theme.colorRoles.notice.text,
118118
}),
119119
]}
120120
>
@@ -129,9 +129,9 @@ export const PremiumBadge: FC = () => {
129129
css={[
130130
styles.badge,
131131
(theme) => ({
132-
backgroundColor: theme.roles.notice.background,
133-
border: `1px solid ${theme.roles.notice.outline}`,
134-
color: theme.roles.notice.text,
132+
backgroundColor: theme.colorRoles.notice.background,
133+
border: `1px solid ${theme.colorRoles.notice.outline}`,
134+
color: theme.colorRoles.notice.text,
135135
}),
136136
]}
137137
>
@@ -146,9 +146,9 @@ export const PreviewBadge: FC = () => {
146146
css={[
147147
styles.badge,
148148
(theme) => ({
149-
border: `1px solid ${theme.roles.preview.outline}`,
150-
backgroundColor: theme.roles.preview.background,
151-
color: theme.roles.preview.text,
149+
border: `1px solid ${theme.colorRoles.preview.outline}`,
150+
backgroundColor: theme.colorRoles.preview.background,
151+
color: theme.colorRoles.preview.text,
152152
}),
153153
]}
154154
>
@@ -163,9 +163,9 @@ export const AlphaBadge: FC = () => {
163163
css={[
164164
styles.badge,
165165
(theme) => ({
166-
border: `1px solid ${theme.roles.preview.outline}`,
167-
backgroundColor: theme.roles.preview.background,
168-
color: theme.roles.preview.text,
166+
border: `1px solid ${theme.colorRoles.preview.outline}`,
167+
backgroundColor: theme.colorRoles.preview.background,
168+
color: theme.colorRoles.preview.text,
169169
}),
170170
]}
171171
>
@@ -180,9 +180,9 @@ export const DeprecatedBadge: FC = () => {
180180
css={[
181181
styles.badge,
182182
(theme) => ({
183-
border: `1px solid ${theme.roles.danger.outline}`,
184-
backgroundColor: theme.roles.danger.background,
185-
color: theme.roles.danger.text,
183+
border: `1px solid ${theme.colorRoles.danger.outline}`,
184+
backgroundColor: theme.colorRoles.danger.background,
185+
color: theme.colorRoles.danger.text,
186186
}),
187187
]}
188188
>

site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ export const DeleteDialog: FC<DeleteDialogProps> = ({
108108

109109
const styles = {
110110
callout: (theme) => ({
111-
backgroundColor: theme.roles.danger.background,
112-
border: `1px solid ${theme.roles.danger.outline}`,
111+
backgroundColor: theme.colorRoles.danger.background,
112+
border: `1px solid ${theme.colorRoles.danger.outline}`,
113113
borderRadius: theme.shape.borderRadius,
114-
color: theme.roles.danger.text,
114+
color: theme.colorRoles.danger.text,
115115
padding: "8px 16px",
116116
}),
117117
} satisfies Record<string, Interpolation<Theme>>;

site/src/components/Dialogs/Dialog.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,24 @@ export const DialogActionButtons: FC<DialogActionButtonsProps> = ({
7474
const styles = {
7575
dangerButton: (theme) => ({
7676
"&.MuiButton-contained": {
77-
backgroundColor: theme.roles.danger.fill.solid,
78-
borderColor: theme.roles.danger.fill.outline,
77+
backgroundColor: theme.colorRoles.danger.fill.solid,
78+
borderColor: theme.colorRoles.danger.fill.outline,
7979

8080
"&:not(.MuiLoadingButton-loading)": {
81-
color: theme.roles.danger.fill.text,
81+
color: theme.colorRoles.danger.fill.text,
8282
},
8383

8484
"&:hover:not(:disabled)": {
85-
backgroundColor: theme.roles.danger.hover.fill.solid,
86-
borderColor: theme.roles.danger.hover.fill.outline,
85+
backgroundColor: theme.colorRoles.danger.hover.fill.solid,
86+
borderColor: theme.colorRoles.danger.hover.fill.outline,
8787
},
8888

8989
"&.Mui-disabled": {
90-
backgroundColor: theme.roles.danger.disabled.background,
91-
borderColor: theme.roles.danger.disabled.outline,
90+
backgroundColor: theme.colorRoles.danger.disabled.background,
91+
borderColor: theme.colorRoles.danger.disabled.outline,
9292

9393
"&:not(.MuiLoadingButton-loading)": {
94-
color: theme.roles.danger.disabled.fill.text,
94+
color: theme.colorRoles.danger.disabled.fill.text,
9595
},
9696
},
9797
},

site/src/components/HelpTooltip/HelpTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ const styles = {
206206
display: "flex",
207207
alignItems: "center",
208208
...(theme.typography.body2 as CSSObject),
209-
color: theme.roles.active.fill.outline,
209+
color: theme.colorRoles.active.fill.outline,
210210
}),
211211

212212
linkIcon: {

site/src/components/InfoTooltip/InfoTooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
HelpTooltipTrigger,
99
} from "components/HelpTooltip/HelpTooltip";
1010
import type { FC, ReactNode } from "react";
11-
import type { ThemeRole } from "theme/roles";
11+
import type { ThemeRole } from "theme/colorRoles";
1212

1313
interface InfoTooltipProps {
1414
type?: ThemeRole;
@@ -22,7 +22,7 @@ export const InfoTooltip: FC<InfoTooltipProps> = ({
2222
type = "info",
2323
}) => {
2424
const theme = useTheme();
25-
const iconColor = theme.roles[type].outline;
25+
const iconColor = theme.colorRoles[type].outline;
2626

2727
return (
2828
<HelpTooltip>

site/src/components/LastSeen/LastSeen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export const LastSeen: FC<LastSeenProps> = ({ at, ...attrs }) => {
2323
// Since the agent reports on a 10m interval,
2424
// the last_used_at can be inaccurate when recent.
2525
message = "Now";
26-
color = theme.roles.success.fill.solid;
26+
color = theme.colorRoles.success.fill.solid;
2727
} else if (t.isAfter(now.subtract(3, "day"))) {
2828
color = theme.experimental.l2.text;
2929
} else if (t.isAfter(now.subtract(1, "month"))) {
30-
color = theme.roles.warning.fill.solid;
30+
color = theme.colorRoles.warning.fill.solid;
3131
} else if (t.isAfter(now.subtract(100, "year"))) {
32-
color = theme.roles.error.fill.solid;
32+
color = theme.colorRoles.error.fill.solid;
3333
} else {
3434
message = "Never";
3535
}

site/src/components/Logs/LogLine.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,29 @@ const styles = {
4343
padding: `0 var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,
4444

4545
"&.error": {
46-
backgroundColor: theme.roles.error.background,
47-
color: theme.roles.error.text,
46+
backgroundColor: theme.colorRoles.error.background,
47+
color: theme.colorRoles.error.text,
4848

4949
"& .dashed-line": {
50-
backgroundColor: theme.roles.error.outline,
50+
backgroundColor: theme.colorRoles.error.outline,
5151
},
5252
},
5353

5454
"&.debug": {
55-
backgroundColor: theme.roles.notice.background,
56-
color: theme.roles.notice.text,
55+
backgroundColor: theme.colorRoles.notice.background,
56+
color: theme.colorRoles.notice.text,
5757

5858
"& .dashed-line": {
59-
backgroundColor: theme.roles.notice.outline,
59+
backgroundColor: theme.colorRoles.notice.outline,
6060
},
6161
},
6262

6363
"&.warn": {
64-
backgroundColor: theme.roles.warning.background,
65-
color: theme.roles.warning.text,
64+
backgroundColor: theme.colorRoles.warning.background,
65+
color: theme.colorRoles.warning.text,
6666

6767
"& .dashed-line": {
68-
backgroundColor: theme.roles.warning.outline,
68+
backgroundColor: theme.colorRoles.warning.outline,
6969
},
7070
},
7171
}),

site/src/components/PaginationWidget/PageButtons.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ const BasePageButton: FC<BasePageButtonProps> = ({
7474
<Button
7575
css={
7676
highlighted && {
77-
borderColor: theme.roles.active.outline,
78-
backgroundColor: theme.roles.active.background,
77+
borderColor: theme.colorRoles.active.outline,
78+
backgroundColor: theme.colorRoles.active.background,
7979

8080
// Override the hover state with active colors, but not hover
8181
// colors because clicking won't do anything.
8282
"&:hover": {
83-
borderColor: theme.roles.active.outline,
84-
backgroundColor: theme.roles.active.background,
83+
borderColor: theme.colorRoles.active.outline,
84+
backgroundColor: theme.colorRoles.active.background,
8585
},
8686
}
8787
}

site/src/components/Paywall/Paywall.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ const styles = {
8181
maxWidth: 920,
8282
margin: "auto",
8383
padding: 24,
84-
backgroundImage: `linear-gradient(160deg, transparent, ${theme.roles.active.background})`,
85-
border: `1px solid ${theme.roles.active.fill.outline}`,
84+
backgroundImage: `linear-gradient(160deg, transparent, ${theme.colorRoles.active.background})`,
85+
border: `1px solid ${theme.colorRoles.active.fill.outline}`,
8686
borderRadius: 8,
8787
gap: 32,
8888
}),
@@ -115,7 +115,7 @@ const styles = {
115115
fontWeight: 500,
116116
},
117117
featureIcon: (theme) => ({
118-
color: theme.roles.active.fill.outline,
118+
color: theme.colorRoles.active.fill.outline,
119119
}),
120120
feature: {
121121
display: "flex",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy