Skip to content

Commit

Permalink
v0.5.1 -> v0.6.0 (#122)
Browse files Browse the repository at this point in the history
* Components theming (#121)

* Skeleton theming (#112)

* feat - Input toggle link theming: Revamp input, toggle, link styles (#115)

* feat #113 - Button theming (#117)

* Tooltip popover theming (#118)

* feat #119 - Notifications V2 (#120)
  • Loading branch information
nancy-dassana authored Oct 20, 2020
1 parent ecad852 commit 720545c
Show file tree
Hide file tree
Showing 51 changed files with 1,642 additions and 493 deletions.
38 changes: 0 additions & 38 deletions .storybook/Decorator.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions .storybook/__tests__/Decorator.test.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion .storybook/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* This is the global dassana stylesheet. It should match the global stylesheet in web-orchestrator. */

@import '~normalize.css';
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap');

html,
body,
Expand Down
17 changes: 14 additions & 3 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ const { sideBySide, left, right } = LayoutTypes

const { dark, light } = ThemeType

// Storybook theme needs an extra "type" property to conditionally render a dark or light themed story for Popover and Tooltip components.
export interface SbTheme extends Theme {
type: ThemeType.dark | ThemeType.light
}

const sbThemes = {
[dark]: { ...themes[dark], type: dark },
[light]: { ...themes[light], type: light }
}

const useStyles = createUseStyles({
storyContainer: {
display: 'flex'
Expand Down Expand Up @@ -70,6 +80,7 @@ const StoryWrapper: FC<StoryWrapperProps> = ({
const classes = useStyles()
const wrapperClasses = cn({
dark,
light: !dark,
[classes.storyWrapper]: true
})

Expand Down Expand Up @@ -107,12 +118,12 @@ const ThemeDecorator = (
case sideBySide: {
return (
<div className={classes.storyContainer}>
<ThemeProvider theme={themes[light]}>
<ThemeProvider theme={sbThemes[light]}>
<ThemedBlock side={left}>
<ComponentStory />
</ThemedBlock>
</ThemeProvider>
<ThemeProvider theme={themes[dark]}>
<ThemeProvider theme={sbThemes[dark]}>
<ThemedBlock side={right}>
<ComponentStory />
</ThemedBlock>
Expand All @@ -123,7 +134,7 @@ const ThemeDecorator = (

default: {
return (
<ThemeProvider theme={themes[theme]}>
<ThemeProvider theme={sbThemes[theme as ThemeType]}>
<ThemedCanvasBg />
<StoryWrapper dark={theme === dark}>
<ComponentStory />
Expand Down
114 changes: 110 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
"version": "0.5.1",
"version": "0.6.0",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
Expand All @@ -14,6 +14,7 @@
"@storybook/addon-cssresources": "^6.0.22",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/react-hooks": "^3.4.2",
"@testing-library/user-event": "^7.2.1",
"@types/color": "^3.0.1",
"@types/jest": "^24.9.1",
Expand All @@ -24,6 +25,7 @@
"bytes": "^3.1.0",
"classnames": "^2.2.6",
"color": "^3.1.2",
"framer-motion": "^2.9.1",
"fuse.js": "^6.4.1",
"lodash": "^4.17.20",
"moment": "^2.27.0",
Expand All @@ -32,7 +34,8 @@
"react-hook-form": "^6.5.0",
"react-jss": "^10.4.0",
"react-scripts": "^3.4.3",
"typescript": "^3.9.7"
"typescript": "^3.9.7",
"uuid": "^8.3.1"
},
"scripts": {
"start": "npm run storybook",
Expand Down Expand Up @@ -88,6 +91,7 @@
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/lodash": "^4.14.161",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^3.9.0",
"@typescript-eslint/parser": "^3.9.0",
"chromatic": "^5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const rootImport = options => ({
})

export default {
external: ['antd', 'react'],
external: ['antd', 'react', 'uuid'],
input: 'src/components/index.ts',
output: [
{
Expand Down
Loading

0 comments on commit 720545c

Please sign in to comment.