Skip to content

Commit 5548da9

Browse files
committed
BREAKING: remove supp & sema tokens
1 parent 74e2626 commit 5548da9

File tree

9 files changed

+14
-131
lines changed

9 files changed

+14
-131
lines changed

apps/app/src/generator/Colors/utils.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,13 @@ const semanticColors = [
2525
"warning",
2626
"negative",
2727
"catastrophic",
28-
"sema6",
2928
"neutral_20",
3029
"positive_80",
3130
"positive_120",
3231
"positive_20",
3332
"negative_20",
3433
"negative_120",
3534
"negative_80",
36-
"sema10",
37-
"sema11",
38-
"sema12",
39-
"sema13",
40-
"sema14",
41-
"sema15",
42-
"sema16",
43-
"sema17",
44-
"sema18",
45-
"sema19",
4635
"warning_20",
4736
"warning_140",
4837
"warning_120",

apps/docs/src/content/components/avatar.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Avatars containing simple characters can be created by passing a string as child
5555
```tsx live
5656
<div className="flex gap-xs">
5757
<HvAvatar>BM</HvAvatar>
58-
<HvAvatar backgroundColor="sema19">W</HvAvatar>
59-
<HvAvatar backgroundColor="sema6">CS</HvAvatar>
58+
<HvAvatar backgroundColor="cat3">W</HvAvatar>
59+
<HvAvatar backgroundColor="cat4">CS</HvAvatar>
6060
</div>
6161
```
6262

@@ -103,7 +103,7 @@ You can configure the `size` and `variant` of an avatar. When using an icon, set
103103
<div className="flex gap-xs">
104104
<HvAvatar size="xs" />
105105
<HvAvatar size="xs" variant="square" />
106-
<HvAvatar backgroundColor="sema6" size="sm">
106+
<HvAvatar backgroundColor="cat4" size="sm">
107107
NA
108108
</HvAvatar>
109109
<HvAvatar size="lg" backgroundColor="warning">
@@ -175,7 +175,7 @@ An avatar should be interacted with by wrapping it in an interactable element, s
175175
radius="base"
176176
className="size-fit!"
177177
>
178-
<HvAvatar backgroundColor="sema19" size="md" badge="negative">
178+
<HvAvatar backgroundColor="info" size="md" badge="negative">
179179
BM
180180
</HvAvatar>
181181
</HvButton>
@@ -186,7 +186,7 @@ An avatar should be interacted with by wrapping it in an interactable element, s
186186
className="size-fit!"
187187
>
188188
<HvAvatar
189-
backgroundColor="sema19"
189+
backgroundColor="info"
190190
size="md"
191191
variant="square"
192192
badge="negative"

packages/core/src/Avatar/Avatar.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ export const Actions: StoryObj<HvAvatarProps> = {
6565
<HvAvatar size="md" />
6666
</HvButton>
6767
<HvButton icon aria-label="Business Manager">
68-
<HvAvatar backgroundColor="sema19" size="md" badge="negative">
68+
<HvAvatar backgroundColor="info" size="md" badge="negative">
6969
BM
7070
</HvAvatar>
7171
</HvButton>
7272
<HvButton icon aria-label="Business Manager" radius="none">
7373
<HvAvatar
74-
backgroundColor="sema19"
74+
backgroundColor="info"
7575
size="md"
7676
variant="square"
7777
badge="negative"
@@ -106,7 +106,7 @@ export const Test: StoryObj = {
106106
<div className="flex items-center gap-xs flex-wrap">
107107
<HvAvatar size="xs" />
108108
<HvAvatar size="xs" variant="square" />
109-
<HvAvatar backgroundColor="sema6" size="sm">
109+
<HvAvatar backgroundColor="cat4" size="sm">
110110
NA
111111
</HvAvatar>
112112
<HvAvatar size="lg" backgroundColor="warning">

packages/core/src/Card/Card.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export interface HvCardProps extends HvBaseProps {
2121
/** Whether the card is currently selected. */
2222
selected?: boolean;
2323
/** The background color of the card. */
24-
bgcolor?: "sema0" | HvColorAny;
24+
bgcolor?: HvColorAny;
2525
/** The border color at the top of the card. */
26-
statusColor?: "sema0" | HvColorAny;
26+
statusColor?: HvColorAny;
2727
/** A Jss Object used to override or extend the styles applied to the component. */
2828
classes?: HvCardClasses;
2929
}
@@ -44,16 +44,13 @@ export const HvCard = forwardRef<
4444
icon,
4545
selectable,
4646
selected,
47-
statusColor = "sema0",
47+
statusColor,
4848
bgcolor,
4949
...others
5050
} = useDefaultProps("HvCard", props);
5151
const { classes, cx } = useClasses(classesProp);
5252

53-
const barColor =
54-
(statusColor !== "sema0" && statusColor) ||
55-
(selected && "text") ||
56-
undefined;
53+
const barColor = statusColor || (selected && "text") || undefined;
5754

5855
return (
5956
<div

packages/core/src/Stack/Stack.stories.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,7 @@ export const WithNavigation: StoryObj<HvStackProps> = {
181181
<div style={{ flex: 1 }} />
182182
</HvActionBar>
183183
</HvCard>
184-
<HvCard
185-
bgcolor="bgContainer"
186-
statusColor="sema15"
187-
style={{ width: 275 }}
188-
>
184+
<HvCard bgcolor="bgContainer" statusColor="info" style={{ width: 275 }}>
189185
<HvCardHeader title="Card 3" icon={<Tool />} />
190186
<HvCardContent>
191187
<div style={{ marginTop: "20px" }}>

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type {
1010
HvAtmosphereColor,
1111
HvBaseColor,
1212
HvSemanticColor,
13-
HvSupportColor,
1413
HvCategoricalColor,
1514
HvColor,
1615
HvColorAny,
@@ -140,7 +139,6 @@ export * from "./providers/Provider";
140139
export * from "./providers/ThemeProvider";
141140

142141
export * from "./types/generic";
143-
export * from "./types/tokens";
144142

145143
export * from "./utils/browser";
146144
export * from "./utils/focusableElementFinder";

packages/core/src/themes/pentahoPlus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ export const pentahoPlus = mergeTheme(pentahoPlusBase, {
624624
outlineColor: theme.colors.borderSubtle,
625625
"--rb": theme.radii.large,
626626
// default non-semantic card
627-
"&[data-color=sema0]": {
627+
"&:not(:has([data-color]))": {
628628
overflow: "hidden",
629629
height: "fit-content",
630630
"--rt": theme.radii.large,

packages/core/src/types/tokens.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

packages/styles/src/tokens/colors.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -203,18 +203,9 @@ const categorical = {
203203
cat28: "#D8265D",
204204
};
205205

206-
const support = {
207-
supp1: "#0F8B8D",
208-
supp2: "#734B6D",
209-
supp3: "#4E7599",
210-
supp4: "#C19C31",
211-
supp5: "#546B6B",
212-
};
213-
214206
const common = {
215207
...base,
216208
...categorical,
217-
...support,
218209
};
219210

220211
// #region Light palette
@@ -247,20 +238,9 @@ const semanticLight = {
247238
negative_80: "#ED4747",
248239
negative_120: "#B41B3A",
249240
catastrophic: "#930A80",
250-
sema6: "#AA00FF",
251241
neutral_20: "#D8E6F1",
252242
positive_20: "#D7E6CF",
253243
negative_20: "#F4D3D4",
254-
sema10: "#CE703D",
255-
sema11: "#D36041",
256-
sema12: "#CF4E38",
257-
sema13: "#CB3B30",
258-
sema14: "#BA2626",
259-
sema15: "#6589CB",
260-
sema16: "#4D8AC0",
261-
sema17: "#3388B1",
262-
sema18: "#1A85A1",
263-
sema19: "#00838F",
264244
warning_20: "#FBF2D8",
265245
};
266246

@@ -366,20 +346,9 @@ const semanticDark = {
366346
negative_80: "#EC3D57",
367347
negative_120: "#D92750",
368348
catastrophic: "#9A76E7",
369-
sema6: "#928FFF",
370349
neutral_20: "#D8E6F1",
371350
positive_20: "#D7E6CF",
372351
negative_20: "#F4D3D4",
373-
sema10: "#F4CAB0",
374-
sema11: "#F1B7A0",
375-
sema12: "#EEA291",
376-
sema13: "#E98B82",
377-
sema14: "#E57373",
378-
sema15: "#80DEEA",
379-
sema16: "#4DD0E1",
380-
sema17: "#26C6DA",
381-
sema18: "#00ACC1",
382-
sema19: "#00A0B7",
383352
warning_20: "#FBF2D8",
384353
};
385354

@@ -484,7 +453,6 @@ export type HvAccentColor = keyof typeof accentLight;
484453
export type HvAtmosphereColor = keyof typeof atmosphereLight;
485454
export type HvBaseColor = keyof typeof base;
486455
export type HvSemanticColor = keyof typeof semanticLight;
487-
export type HvSupportColor = keyof typeof support;
488456
export type HvCategoricalColor = keyof typeof categorical;
489457

490458
/** A type with all the accepted colors from the color palette */

0 commit comments

Comments
 (0)