Skip to content

Commit 0acdf34

Browse files
authored
chore: remove deprecated design tokens and themes from the system (#3049)
* chore: remove deprecated design tokens and themes from the system * fix: remove our usage of deprecated tokens
1 parent 05075e4 commit 0acdf34

File tree

30 files changed

+39
-529
lines changed

30 files changed

+39
-529
lines changed

.changeset/slow-ties-complain.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@twilio-paste/design-tokens': major
3+
'@twilio-paste/core': major
4+
---
5+
6+
[Design Tokens] remove deprecated light/dark color tokens from the system

.changeset/unlucky-seas-enjoy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@twilio-paste/box': minor
3+
'@twilio-paste/text': minor
4+
'@twilio-paste/style-props': minor
5+
'@twilio-paste/theme': minor
6+
'@twilio-paste/core': minor
7+
---
8+
9+
[Box, Text, Style Props, Theme]: remove checking and warning for deprecated design tokens and themes that have been removed from the system

packages/paste-core/components/button/__tests__/customization.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const customButtonStyles = {
1717
destructive_link: {
1818
padding: 'space40',
1919
borderRadius: 'borderRadiusCircle',
20-
backgroundColor: 'colorBackgroundDestructiveLight',
20+
backgroundColor: 'colorBackgroundDestructiveWeak',
2121
color: 'colorTextWarningStrong',
2222
fontWeight: 'fontWeightBold',
2323
},

packages/paste-core/components/chat-log/__tests__/ChatBubble.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const CustomizationWrapper: React.FC<React.PropsWithChildren> = ({children}) =>
1313
color: 'colorTextInverse',
1414
variants: {
1515
inbound: {backgroundColor: 'colorBackgroundPrimary'},
16-
outbound: {backgroundColor: 'colorBackgroundPrimaryDarker'},
16+
outbound: {backgroundColor: 'colorBackgroundPrimaryStronger'},
1717
},
1818
},
1919
}}
@@ -31,7 +31,7 @@ const CustomizationFooWrapper: React.FC<React.PropsWithChildren> = ({children})
3131
color: 'colorTextInverse',
3232
variants: {
3333
inbound: {backgroundColor: 'colorBackgroundPrimary'},
34-
outbound: {backgroundColor: 'colorBackgroundPrimaryDarker'},
34+
outbound: {backgroundColor: 'colorBackgroundPrimaryStronger'},
3535
},
3636
},
3737
}}

packages/paste-core/components/chat-log/stories/customization.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const CustomizedMessages: StoryFn = (_args, {parameters: {isTestEnvironme
4949
color: 'colorTextInverse',
5050
variants: {
5151
inbound: {backgroundColor: 'colorBackgroundPrimary'},
52-
outbound: {backgroundColor: 'colorBackgroundPrimaryDarker'},
52+
outbound: {backgroundColor: 'colorBackgroundPrimaryStronger'},
5353
},
5454
},
5555
CHAT_MESSAGE_META: {

packages/paste-core/components/minimizable-dialog/__tests__/customization.spec.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ const CustomizationWrapper: React.FC<React.PropsWithChildren> = ({children}) =>
1616
theme={TestTheme}
1717
elements={{
1818
MINIMIZABLE_DIALOG_BUTTON: {
19-
backgroundColor: 'colorBackgroundDark',
19+
backgroundColor: 'colorBackgroundStrong',
2020
},
2121
MINIMIZABLE_DIALOG: {
22-
backgroundColor: 'colorBackgroundPrimaryLighter',
22+
backgroundColor: 'colorBackgroundPrimaryWeaker',
2323
},
2424
MINIMIZABLE_DIALOG_CONTENT: {
2525
margin: 'space0',
@@ -54,10 +54,10 @@ const MyCustomizationWrapper: React.FC<React.PropsWithChildren> = ({children}) =
5454
theme={TestTheme}
5555
elements={{
5656
FOO_DIALOG_BUTTON: {
57-
backgroundColor: 'colorBackgroundDark',
57+
backgroundColor: 'colorBackgroundStrong',
5858
},
5959
FOO_DIALOG: {
60-
backgroundColor: 'colorBackgroundPrimaryLighter',
60+
backgroundColor: 'colorBackgroundPrimaryWeaker',
6161
},
6262
FOO_DIALOG_CONTENT: {
6363
margin: 'space0',

packages/paste-core/components/minimizable-dialog/stories/customization.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ export const CustomizedDialog: StoryFn = (_args, {parameters: {isTestEnvironment
5353
MINIMIZABLE_DIALOG_HEADER_CLOSE_BUTTON: {
5454
borderStyle: 'solid',
5555
borderWidth: 'borderWidth10',
56-
borderColor: 'colorBorderLight',
56+
borderColor: 'colorBorderWeak',
5757
},
5858
MINIMIZABLE_DIALOG_HEADER_CLOSE_ICON: {
5959
width: 'sizeIcon50',
6060
},
6161
MINIMIZABLE_DIALOG_HEADER_MINIMIZE_BUTTON: {
6262
borderStyle: 'solid',
6363
borderWidth: 'borderWidth10',
64-
borderColor: 'colorBorderLight',
64+
borderColor: 'colorBorderWeak',
6565
},
6666
MINIMIZABLE_DIALOG_HEADER_MINIMIZE_ICON: {
6767
width: 'sizeIcon50',

packages/paste-core/components/side-modal/__tests__/customization.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const CustomizationWrapper: React.FC<React.PropsWithChildren> = ({children}) =>
3838
fontSize: 'fontSize60',
3939
},
4040
SIDE_MODAL_HEADER_CLOSE_BUTTON: {
41-
borderColor: 'colorBorderLight',
41+
borderColor: 'colorBorderWeak',
4242
},
4343
SIDE_MODAL_HEADER_CLOSE_ICON: {
4444
width: 'sizeIcon50',
@@ -79,7 +79,7 @@ const MyCustomizationWrapper: React.FC<React.PropsWithChildren> = ({children}) =
7979
fontSize: 'fontSize60',
8080
},
8181
FOO_DIALOG_HEADER_CLOSE_BUTTON: {
82-
borderColor: 'colorBorderLight',
82+
borderColor: 'colorBorderWeak',
8383
},
8484
FOO_DIALOG_HEADER_CLOSE_ICON: {
8585
width: 'sizeIcon50',

packages/paste-core/components/side-modal/stories/customization.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const CustomizedDialog: StoryFn = (_args, {parameters: {isTestEnvironment
6060
SIDE_MODAL_HEADER_CLOSE_BUTTON: {
6161
borderStyle: 'solid',
6262
borderWidth: 'borderWidth10',
63-
borderColor: 'colorBorderLight',
63+
borderColor: 'colorBorderWeak',
6464
},
6565
SIDE_MODAL_HEADER_CLOSE_ICON: {
6666
width: 'sizeIcon50',

packages/paste-core/primitives/box/src/index.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ import {
1515
props as defaultStylingProps,
1616
} from '@twilio-paste/styling-library';
1717
import type {StyledComponent} from '@twilio-paste/styling-library';
18-
import {
19-
isDeprecatedBackgroundColorTokenProp,
20-
isDeprecatedBorderColorTokenProp,
21-
isDeprecatedBoxShadowTokenProp,
22-
isDeprecatedTextColorTokenProp,
23-
} from '@twilio-paste/style-props';
2418

2519
import type {BoxProps, StyledBoxProps} from './types';
2620
import {getPseudoStyles, PasteStyleProps, getCustomElementStyles} from './StyleFunctions';
@@ -58,12 +52,6 @@ const Box = React.forwardRef<HTMLElement, BoxProps>(({children, element = 'BOX',
5852
});
5953

6054
Box.displayName = 'Box';
61-
Box.propTypes = {
62-
backgroundColor: isDeprecatedBackgroundColorTokenProp,
63-
borderColor: isDeprecatedBorderColorTokenProp,
64-
boxShadow: isDeprecatedBoxShadowTokenProp,
65-
color: isDeprecatedTextColorTokenProp,
66-
};
6755

6856
export {Box, getCustomElementStyles};
6957
export * from './types';

0 commit comments

Comments
 (0)