Merge branch 'sghsri:main' into master
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"@types/sql.js": "^1.4.9",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"chrome-extension-toolkit": "^0.0.51",
|
||||
"classnames": "^2.5.1",
|
||||
"clsx": "^2.1.0",
|
||||
"highcharts": "^11.3.0",
|
||||
"highcharts-react-official": "^3.2.1",
|
||||
"react": "^18.2.0",
|
||||
|
||||
15
pnpm-lock.yaml
generated
15
pnpm-lock.yaml
generated
@@ -22,9 +22,9 @@ dependencies:
|
||||
chrome-extension-toolkit:
|
||||
specifier: ^0.0.51
|
||||
version: 0.0.51
|
||||
classnames:
|
||||
specifier: ^2.5.1
|
||||
version: 2.5.1
|
||||
clsx:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
highcharts:
|
||||
specifier: ^11.3.0
|
||||
version: 11.3.0
|
||||
@@ -6104,10 +6104,6 @@ packages:
|
||||
consola: 3.2.3
|
||||
dev: true
|
||||
|
||||
/classnames@2.5.1:
|
||||
resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==}
|
||||
dev: false
|
||||
|
||||
/clean-stack@2.2.0:
|
||||
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -6159,6 +6155,11 @@ packages:
|
||||
engines: {node: '>=0.8'}
|
||||
dev: true
|
||||
|
||||
/clsx@2.1.0:
|
||||
resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==}
|
||||
engines: {node: '>=6'}
|
||||
dev: false
|
||||
|
||||
/color-convert@1.9.3:
|
||||
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
|
||||
dependencies:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import styles from './Button.module.scss';
|
||||
|
||||
@@ -30,7 +30,7 @@ export function Button({
|
||||
<button
|
||||
style={style}
|
||||
data-testid={testId}
|
||||
className={classNames(styles.button, className, styles[type ?? 'primary'], {
|
||||
className={clsx(styles.button, className, styles[type ?? 'primary'], {
|
||||
[styles.disabled]: disabled,
|
||||
})}
|
||||
title={title}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import classNames from 'classnames';
|
||||
import React, { Component } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import styles from './Card.module.scss';
|
||||
|
||||
export type Props = {
|
||||
@@ -17,7 +17,7 @@ export default function Card(props: Props) {
|
||||
return (
|
||||
<div
|
||||
style={props.style}
|
||||
className={classNames(styles.card, props.className)}
|
||||
className={clsx(styles.card, props.className)}
|
||||
onClick={props.onClick}
|
||||
data-testid={props.testId}
|
||||
>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classnames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import { Color } from '@views/styles/colors.module.scss';
|
||||
import styles from './Divider.module.scss';
|
||||
@@ -21,5 +21,5 @@ export default function Divider(props: Props) {
|
||||
borderStyle: props.type,
|
||||
};
|
||||
|
||||
return <hr data-testid={props.testId} style={style} className={classnames(styles.divider, props.className)} />;
|
||||
return <hr data-testid={props.testId} style={style} className={clsx(styles.divider, props.className)} />;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import colors, { Color } from '@views/styles/colors.module.scss';
|
||||
import fonts, { Size } from '@views/styles/fonts.module.scss';
|
||||
@@ -36,7 +36,7 @@ export default function Icon(props: Props) {
|
||||
<span
|
||||
data-testid={props.testId}
|
||||
style={style}
|
||||
className={classNames(styles.icon, props.className)}
|
||||
className={clsx(styles.icon, props.className)}
|
||||
onClick={props.onClick}
|
||||
>
|
||||
{props.name}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { background } from '@shared/messages';
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import Text, { TextProps } from '../Text/Text';
|
||||
import styles from './Link.module.scss';
|
||||
@@ -29,7 +29,7 @@ export default function Link(props: PropsWithChildren<Props>) {
|
||||
color='bluebonnet'
|
||||
{...passedProps}
|
||||
span
|
||||
className={classNames(
|
||||
className={clsx(
|
||||
styles.link,
|
||||
{
|
||||
[styles.disabled]: isDisabled,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React, { PropsWithChildren, useCallback } from 'react';
|
||||
import styles from './Popup.module.scss';
|
||||
|
||||
@@ -46,12 +46,12 @@ export default function Popup({ onClose, children, className, style, testId, ove
|
||||
<div
|
||||
style={style}
|
||||
ref={containerRef}
|
||||
className={classNames(styles.container, {
|
||||
className={clsx(styles.container, {
|
||||
[styles.overlay]: overlay,
|
||||
})}
|
||||
data-testid={testId}
|
||||
>
|
||||
<div ref={bodyRef} className={classNames(styles.body, className)}>
|
||||
<div ref={bodyRef} className={clsx(styles.body, className)}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React from 'react';
|
||||
import styles from './Spinner.module.scss';
|
||||
|
||||
@@ -12,5 +12,5 @@ type Props = {
|
||||
* A simple spinner component that can be used to indicate loading.
|
||||
*/
|
||||
export default function Spinner({ className, testId, style }: Props) {
|
||||
return <div data-testid={testId} style={style} className={classNames(styles.spinner, className)} />;
|
||||
return <div data-testid={testId} style={style} className={clsx(styles.spinner, className)} />;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import styles from './Text.module.scss';
|
||||
|
||||
@@ -20,7 +20,7 @@ type Variant = (typeof variants)[number];
|
||||
* A reusable Text component with props that build on top of the design system for the extension
|
||||
*/
|
||||
export default function Text({ variant, as, className, ...props }: PropsWithChildren<TextProps>) {
|
||||
const mergedClassName = classNames(styles.text, styles[variant], className);
|
||||
const mergedClassName = clsx(styles.text, styles[variant], className);
|
||||
|
||||
if (as === 'div') return <div className={mergedClassName} {...props} />;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Course } from '@shared/types/Course';
|
||||
import classNames from 'classnames';
|
||||
import clsx from 'clsx';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import Spinner from '@views/components/common/Spinner/Spinner';
|
||||
import Text from '@views/components/common/Text/Text';
|
||||
@@ -64,7 +64,7 @@ interface LineProps {
|
||||
function DescriptionLine({ line }: LineProps) {
|
||||
const lowerCaseLine = line.toLowerCase();
|
||||
|
||||
const className = classNames({
|
||||
const className = clsx({
|
||||
[styles.prerequisite]: lowerCaseLine.includes('prerequisite'),
|
||||
[styles.onlyOne]:
|
||||
lowerCaseLine.includes('may be') || lowerCaseLine.includes('only one') || lowerCaseLine.includes('may not'),
|
||||
|
||||
Reference in New Issue
Block a user