Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5d46ac2
Squashed commit of the following:
pruthvi2103 Aug 13, 2022
1b68153
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Aug 17, 2022
5ffcd92
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Aug 23, 2022
e164baf
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Aug 29, 2022
ca5c1c0
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Aug 30, 2022
7093f35
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Aug 30, 2022
8a96b6d
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 2, 2022
f19003d
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 2, 2022
50ead6c
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 7, 2022
63b3660
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 13, 2022
e741426
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 15, 2022
c9c9eaa
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 21, 2022
324f793
Removes code smells
pruthvi2103 Sep 29, 2022
4545376
Update Button.stories.tsx
pruthvi2103 Sep 29, 2022
1b52589
Update useBodyScrollLock.tsx
pruthvi2103 Sep 29, 2022
64779c7
Update Tooltip.tsx
pruthvi2103 Sep 29, 2022
b39ec7c
fix duplication code issue
pruthvi2103 Sep 29, 2022
26e65a2
Merge branch 'main' into chores/remove-code-smells
pruthvi2103 Sep 30, 2022
a123387
Merge remote-tracking branch 'upstream/main'
pruthvi2103 Sep 30, 2022
c0816e4
Merge branch 'main' into chores/remove-code-smells
pruthvi2103 Sep 30, 2022
14b9710
Merge branch 'main' into chores/remove-code-smells
pruthvi2103 Sep 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions examples/vanilla-extract-react/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Button, Radio, RadioGroup } from "@hover-design/react";
import { StyleWrapper } from "components/appWraper/StyleWrapper";
import { BreakpointsExample } from "components/breakpointsExample/BreakpointsExample";
import { ColorsPreview } from "components/colorsPreview/colorsPreview";
Expand All @@ -7,12 +6,11 @@ import FontSizePreview from "components/fontSizePreview/FontSizePreview";
import { Footer } from "components/footer/footer";
import { Header } from "components/header/header";
import { PageMain } from "components/pageMain/PageMain";
import React, { useState } from "react";
import React from "react";
import { fonts, fontSizes } from "styles/index.css";
import "styles/reset.css";

const App: React.FC = () => {
const [radioVal, setRadioVal] = useState("radio1");
return (
<StyleWrapper>
<Header />
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ForwardRefRenderFunction, LegacyRef } from "react";
import React, { ForwardRefRenderFunction } from "react";

import { accordionThemeClass, detailsClass } from "./accordion.styles.css";
import "./accordion.global.styles.css";
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/Input/input.styles.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createTheme, style } from "@vanilla-extract/css";
import { recipe } from "@vanilla-extract/recipes";

import { lightColors } from "src/styles/tokens";
import { IInputTheme } from "./input.types";
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assignInlineVars } from "@vanilla-extract/dynamic";
import React, { useState } from "react";
import React from "react";
import { eliminateUndefinedKeys } from "../../utils/object-utils";
import { useClickOutside } from "../../hooks/useClickOutside";
import { Portal } from "../Portal/Portal";
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/NativeSelect/NativeSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assignInlineVars } from "@vanilla-extract/dynamic";
import { FC, useEffect } from "react";
import { FC } from "react";
import { Flex } from "../Flex";
import { ArrowDown } from "../_internal/Icons/ArrowDown";
import {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/NativeSelect/nativeSelect.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type NativeSelectPropsType = JSX.IntrinsicElements["select"] & {
export type OptionsType = {
label: string;
value: string | number;
disabled?: boolean | undefined;
disabled?: boolean;
};

export type NativeSelectThemeType = [
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const PopoverComponent: ForwardRefRenderFunction<
}, [isOpened]);

useEffect(() => {
isOpen !== null && onChange(isOpen!);
isOpen !== null && onChange(isOpen);
}, [isOpen]);

useEffect(() => {
Expand All @@ -70,7 +70,7 @@ const PopoverComponent: ForwardRefRenderFunction<
() => {
isOpened === undefined && setIsOpen(false);
},
isOpen!
isOpen || false
);

const internalClickHandler = () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/Popover/popover.styles.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createTheme, createVar, style } from "@vanilla-extract/css";
import { createVar, style } from "@vanilla-extract/css";
import { calc } from "@vanilla-extract/css-utils";
import { recipe } from "@vanilla-extract/recipes";

Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/Select/select.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createTheme, globalStyle, style } from "@vanilla-extract/css";
import { createTheme, style } from "@vanilla-extract/css";
import { calc } from "@vanilla-extract/css-utils";
import { recipe } from "@vanilla-extract/recipes";
import { SelectTheme } from "./select.types";
Expand Down
9 changes: 2 additions & 7 deletions lib/src/components/Select/select.types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
ChangeEvent,
KeyboardEvent,
MouseEvent,
MutableRefObject,
} from "react";
import { KeyboardEvent, MouseEvent, MutableRefObject } from "react";
type divType = Omit<JSX.IntrinsicElements["div"], "onChange">;
export type SelectPropsType = divType & {
placeholder?: string;
Expand Down Expand Up @@ -34,7 +29,7 @@ export type SelectPropsType = divType & {
export type OptionsType = {
label: string;
value: string | number;
disabled?: boolean | undefined;
disabled?: boolean;
ref?: MutableRefObject<HTMLDivElement>;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/Table/Table.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalStyle, style, createTheme } from "@vanilla-extract/css";
import { style, createTheme } from "@vanilla-extract/css";
import { ITableContainerThemeVars, ITableThemeVars } from "./Table.types";

export const [
Expand Down
3 changes: 1 addition & 2 deletions lib/src/components/Table/Tfoot/Tfoot.css.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { createTheme, globalStyle, style } from "@vanilla-extract/css";
import { createTheme, style } from "@vanilla-extract/css";
import { ITfootThemeVars } from "./Tfoot.types";

export const [tfootThemeClass, tfootThemeVars]: ITfootThemeVars = createTheme({
customBackgroundColor: "#ddd",
});

export const footerDefaults = style({});

3 changes: 1 addition & 2 deletions lib/src/components/Table/Thead/Thead.css.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { createTheme, globalStyle, style } from "@vanilla-extract/css";
import { createTheme, style } from "@vanilla-extract/css";
import { ITheadThemeVars } from "./Thead.types";

export const [theadThemeClass, theadThemeVars]: ITheadThemeVars = createTheme({
customBackgroundColor: "#ddd",
});

export const headerDefaults = style({});

20 changes: 9 additions & 11 deletions lib/src/components/TextArea/text-area.css.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { createTheme } from "@vanilla-extract/css";
import { style } from "@vanilla-extract/css";
import { createTheme, style } from "@vanilla-extract/css";
import { TextAreaBorder } from "./text-area.types";

export const [textAreaColorClass, textAreaColorVars]: TextAreaBorder = createTheme({
export const [textAreaColorClass, textAreaColorVars]: TextAreaBorder =
createTheme({
textAreaBorderColor: {
statusBorderColor: "#082D59",
},
});

export const textAreaStyle = style({
border: `1px solid ${textAreaColorVars.textAreaBorderColor.statusBorderColor}`,
borderRadius: '10px',
padding: '20px'
})
border: `1px solid ${textAreaColorVars.textAreaBorderColor.statusBorderColor}`,
borderRadius: "10px",
padding: "20px",
});

export const textAreaResize = style({
resize: 'none'
})


resize: "none",
});
2 changes: 2 additions & 0 deletions lib/src/components/Tooltip/tooltip.styles.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

import { style } from "@vanilla-extract/css";


export const tooltipContainerStyles = style({
padding: "6px 10px",
});
2 changes: 2 additions & 0 deletions lib/src/components/Tooltip/tooltip.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

import { PopoverType } from "../Popover/popover.types";


type divType = Omit<JSX.IntrinsicElements["div"], "ref"> &
Omit<PopoverType, "content" | "ref">;

Expand Down
34 changes: 0 additions & 34 deletions lib/src/components/reset/reset.css.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,2 @@
import { globalStyle } from "@vanilla-extract/css";
// globalStyle(
// "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video",
// {
// margin: 0,
// padding: 0,
// border: 0,
// fontSize: "100%",
// font: "inherit",
// verticalAlign: "baseline",
// }
// );

// /* HTML5 display-role reset for older browsers */
// globalStyle(
// "article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section",
// {
// display: "block",
// }
// );
// globalStyle("body", {
// lineHeight: 1,
// fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
// 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
// sans-serif`,
// WebkitFontSmoothing: "antialiased",
// MozOsxFontSmoothing: "grayscale",
// });
// globalStyle("ol,ul", { listStyle: "none" });
// globalStyle("blockquote,q", { quotes: "none" });
// globalStyle("blockquote:before,blockquote:after,q:before,q:after", {
// content: "",
// });
// globalStyle("table", { borderCollapse: "collapse", borderSpacing: 0 });
// globalStyle("button", { border: 0 });
globalStyle("*", { boxSizing: "border-box" });
4 changes: 1 addition & 3 deletions lib/src/hooks/useBodyScrollLock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { useLayoutEffect } from "react";

const useLockBodyScroll = (value: boolean): void => {
useLayoutEffect((): (() => void) => {
value
? (document.body.style.overflow = "hidden")
: (document.body.style.overflow = "auto");
document.body.style.overflow = value ? "hidden" : "auto";

return () => (document.body.style.overflow = "auto");
}, []);
Expand Down