Skip to content

Commit d1c9738

Browse files
committed
chore: fixup and stub all components
1 parent 7308c83 commit d1c9738

File tree

110 files changed

+793
-917
lines changed

Some content is hidden

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

110 files changed

+793
-917
lines changed

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass-assistant/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"@lg-chat/input-bar": "file:src/vendor/@lg-chat/input-bar",
6666
"@lg-chat/leafygreen-chat-provider": "file:src/vendor/@lg-chat/leafygreen-chat-provider",
6767
"@lg-chat/lg-markdown": "file:src/vendor/@lg-chat/lg-markdown",
68-
"@leafygreen-ui/avatar": "file:src/vendor/leafygreen-ui/avatar",
68+
"@vendor-leafygreen-ui/avatar": "file:src/vendor/leafygreen-ui/avatar",
6969
"@lg-chat/message-actions": "file:src/vendor/@lg-chat/message-actions",
7070
"@lg-chat/message-feed": "file:src/vendor/@lg-chat/message-feed",
7171
"@lg-chat/message-feedback": "file:src/vendor/@lg-chat/message-feedback",

packages/compass-assistant/src/assistant-chat.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77
LeafyGreenChatProvider,
88
Variant,
99
} from '@lg-chat/leafygreen-chat-provider';
10-
import { Message } from './vendor/@lg-chat/message/src/Message';
11-
import { MessageFeed } from './vendor/@lg-chat/message-feed/src/MessageFeed';
12-
import { InputBar } from './vendor/@lg-chat/input-bar/src/InputBar';
13-
import { InputBarFeedback } from './vendor/@lg-chat/input-bar/src/InputBar/InputBarFeedback';
10+
import { Message } from '@lg-chat/message';
11+
import { MessageFeed } from '@lg-chat/message-feed';
12+
import { InputBar } from '@lg-chat/input-bar';
13+
import { InputBarFeedback } from '@lg-chat/input-bar/src/InputBar/InputBarFeedback';
1414

1515
interface AssistantChatProps {
1616
chat: Chat<AssistantMessage>;

packages/compass-assistant/src/vendor/@lg-chat/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"rules": {
66
"@typescript-eslint/naming-convention": "off",
77
"filename-rules/match": "off",
8-
"@typescript-eslint/consistent-type-imports": "off"
8+
"@typescript-eslint/consistent-type-imports": "off",
9+
"@typescript-eslint/no-redundant-type-constituents": "off",
10+
"@typescript-eslint/ban-ts-comment": "off"
911
}
1012
}
1113
]
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { css } from '@mongodb-js/compass-components';
2-
import { Theme } from '@mongodb-js/compass-components';
2+
import { shim_Theme } from '@mongodb-js/compass-components';
33
import { palette } from '@mongodb-js/compass-components';
44

55
export const textAvatarStyleOverrides = css`
66
background-color: ${palette.gray.dark1};
77
border: unset;
88
`;
99

10-
export const iconAvatarStyleOverrides = (theme: Theme) => css`
11-
background-color: ${theme === Theme.Dark
10+
export const iconAvatarStyleOverrides = (theme: shim_Theme) => css`
11+
background-color: ${theme === shim_Theme.Dark
1212
? palette.gray.dark2
1313
: palette.gray.base};
1414
15-
color: ${theme === Theme.Dark ? palette.gray.light1 : palette.white};
15+
color: ${theme === shim_Theme.Dark ? palette.gray.light1 : palette.white};
1616
1717
border: unset;
1818
`;
1919

20-
export const logoAvatarStyleOverrides = (theme: Theme) => css`
21-
background-color: ${theme === Theme.Dark
20+
export const logoAvatarStyleOverrides = (theme: shim_Theme) => css`
21+
background-color: ${theme === shim_Theme.Dark
2222
? palette.green.dark3
2323
: palette.black};
2424
`;

packages/compass-assistant/src/vendor/@lg-chat/avatar/src/Avatar/ChatAvatar.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { ForwardedRef, forwardRef } from 'react';
22
import { useLeafyGreenChatContext } from '@lg-chat/leafygreen-chat-provider';
33

4-
import { Avatar, Format, getInitials } from '../../../../leafygreen-ui/avatar';
4+
import { Avatar, Format, getInitials } from '@vendor-leafygreen-ui/avatar';
55
import { cx } from '@mongodb-js/compass-components';
6-
import { useDarkMode } from '@mongodb-js/compass-components';
6+
import { shim_useDarkMode } from '@mongodb-js/compass-components';
77
import { breakpoints } from '@mongodb-js/compass-components';
88

99
import {
@@ -60,8 +60,7 @@ export const ChatAvatar = forwardRef(
6060
}: ChatAvatarProps,
6161
fwdRef: ForwardedRef<HTMLDivElement>
6262
) => {
63-
const darkMode = useDarkMode(darkModeProp);
64-
const theme = darkMode ? Theme.Dark : Theme.Light;
63+
const { theme } = shim_useDarkMode(darkModeProp);
6564
const { containerWidth } = useLeafyGreenChatContext();
6665
const size =
6766
sizeProp || (containerWidth && containerWidth < breakpoints.Tablet)

packages/compass-assistant/src/vendor/@lg-chat/avatar/src/Avatar/ChatAvatar.types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DarkModeProps } from '@mongodb-js/compass-components';
1+
import { type shim_lib } from '@mongodb-js/compass-components';
22

33
export const ChatAvatarVariant = {
44
/**
@@ -25,7 +25,7 @@ export const ChatAvatarSize = {
2525

2626
export type ChatAvatarSize = typeof ChatAvatarSize[keyof typeof ChatAvatarSize];
2727

28-
export interface ChatAvatarProps extends DarkModeProps {
28+
export interface ChatAvatarProps extends shim_lib.DarkModeProps {
2929
/**
3030
* If provided, overrides the size prop to a customizable number (in px)
3131
*/

packages/compass-assistant/src/vendor/@lg-chat/chat-disclaimer/src/DisclaimerText/DisclaimerText.types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { HTMLElementProps } from '@mongodb-js/compass-components';
1+
import { shim_lib } from '@mongodb-js/compass-components';
22

3-
export interface DisclaimerTextProps extends HTMLElementProps<'div'> {
3+
export interface DisclaimerTextProps extends shim_lib.HTMLElementProps<'div'> {
44
/**
55
* Heading text
66
*/

packages/compass-assistant/src/vendor/@lg-chat/chat-window/src/ChatWindow/ChatWindow.styles.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { css, cx } from '@mongodb-js/compass-components';
2-
import { Theme } from '@mongodb-js/compass-components';
2+
import { shim_Theme } from '@mongodb-js/compass-components';
33
import { palette } from '@mongodb-js/compass-components';
44
import {
55
borderRadius,
66
breakpoints,
7-
color,
8-
InteractionState,
97
spacing,
10-
Variant,
8+
shim_tokens,
119
} from '@mongodb-js/compass-components';
12-
10+
const { color, InteractionState, Variant } = shim_tokens;
1311
const baseContainerStyles = css`
1412
width: 100%;
1513
display: flex;
@@ -18,13 +16,13 @@ const baseContainerStyles = css`
1816
position: relative;
1917
`;
2018

21-
const getSpaciousContainerStyles = (theme: Theme) => css`
19+
const getSpaciousContainerStyles = (theme: shim_Theme) => css`
2220
border-radius: ${borderRadius[200]}px;
2321
overflow: hidden;
2422
border: 1px solid
2523
${color[theme].border[Variant.Secondary][InteractionState.Default]};
2624
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.05);
27-
background-color: ${theme === Theme.Dark
25+
background-color: ${theme === shim_Theme.Dark
2826
? palette.black
2927
: palette.gray.light3};
3028
`;
@@ -36,7 +34,7 @@ export const getContainerStyles = ({
3634
}: {
3735
className?: string;
3836
isCompact: boolean;
39-
theme: Theme;
37+
theme: shim_Theme;
4038
}) =>
4139
cx(
4240
baseContainerStyles,
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { TitleBarProps } from '@lg-chat/title-bar';
22

3-
import {
4-
DarkModeProps,
5-
HTMLElementProps,
6-
} from '@mongodb-js/compass-components';
3+
import { shim_lib } from '@mongodb-js/compass-components';
74

85
export interface ChatWindowProps
9-
extends Omit<HTMLElementProps<'div'>, 'title'>,
10-
DarkModeProps,
6+
extends Omit<shim_lib.HTMLElementProps<'div'>, 'title'>,
7+
shim_lib.DarkModeProps,
118
TitleBarProps {}

0 commit comments

Comments
 (0)