Skip to content

Commit

Permalink
Merge pull request #155 from karishmashuklaa/dev
Browse files Browse the repository at this point in the history
chore: release v1.0.15
  • Loading branch information
amhsirak committed Jul 3, 2023
2 parents 901264e + 9137712 commit 2a33ad9
Show file tree
Hide file tree
Showing 26 changed files with 23,776 additions and 36,756 deletions.
16 changes: 16 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
.env.test.local
.env.production.local
.idea/
migration-storybook.log

npm-debug.log*
yarn-debug.log*
Expand Down
9 changes: 5 additions & 4 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-docs", "@storybook/addon-essentials"],
core: {
builder: "@storybook/builder-webpack5"
},
docs: {
docsPage: "automatic"
autodocs: true
},
framework: {
name: "@storybook/react-webpack5",
options: {}
}
};
60,403 changes: 23,701 additions & 36,702 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chic-ui",
"version": "1.0.14",
"version": "1.0.15",
"description": "🎨 Lightweight opinionated UI Component Library for React",
"license": "MIT",
"main": "./lib/index.js",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"scripts": {
"build": "tsc --build \"./tsconfig.json\"",
"build:storybook": "build-storybook -s public",
"build:storybook": "storybook build -s public",
"lint": "eslint --ignore-path .gitignore --ext .ts,.tsx .",
"prettier": "prettier \"**/*.+(js|json|ts|tsx)\"",
"format": "npm run prettier -- --write",
Expand All @@ -50,10 +50,10 @@
"clean": "rm -rf ./lib",
"test": "react-scripts test",
"eject": "react-scripts eject",
"storybook": "start-storybook -p 6006 -s public",
"storybook": "storybook dev -p 6006 -s public",
"prebuild": "npm run compile-icons",
"prepublish": "npm run build",
"build-storybook": "build-storybook -s public",
"build-storybook": "storybook build -s public",
"compile-icons": "npx @svgr/cli -d src/icons src/icons --typescript"
},
"eslintConfig": {
Expand Down Expand Up @@ -89,14 +89,16 @@
"react-dom": ">=17.0.2"
},
"devDependencies": {
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-docs": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/builder-webpack5": "^6.5.15",
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/node-logger": "^6.5.15",
"@storybook/preset-create-react-app": "^4.1.2",
"@storybook/react": "^6.5.15",
"@babel/preset-env": "^7.22.5",
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@storybook/addon-actions": "^7.0.18",
"@storybook/addon-docs": "^7.0.18",
"@storybook/addon-essentials": "^7.0.18",
"@storybook/node-logger": "^7.0.18",
"@storybook/preset-create-react-app": "^7.0.18",
"@storybook/react": "^7.0.18",
"@storybook/react-webpack5": "^7.0.18",
"@svgr/cli": "^5.5.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
Expand All @@ -120,6 +122,7 @@
"react-refresh": "^0.14.0",
"react-scripts": "^5.0.1",
"react-test-renderer": "^17.0.2",
"storybook": "^7.0.18",
"typescript": "^4.4.2",
"web-vitals": "^1.1.2",
"webpack": "^5.75.0"
Expand Down
4 changes: 2 additions & 2 deletions src/components/accordion/accordion.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';
import React from 'react';
import Accordion, { AccordionProps } from './accordion';

Expand All @@ -7,7 +7,7 @@ export default {
component: Accordion
};

const Template: Story<AccordionProps> = (args) => <Accordion {...args} />;
const Template: StoryFn<AccordionProps> = (args) => <Accordion {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/alert/alert.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useCallback } from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { StoryFn, Meta } from '@storybook/react';
import { theme } from '../../tokens/themes';
import Alert, { AlertProps } from '.';

Expand All @@ -16,7 +16,7 @@ function useAlert(initial: boolean): [boolean, () => void] {

return [show, onClick];
}
export const Playground: Story<Arguments> = () => {
export const Playground: StoryFn<Arguments> = () => {
const [show, onClick] = useAlert(true);
return (
<Alert
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/react/types-6-0';
import { Meta } from '@storybook/react';
import styled from 'styled-components';
import Avatar from '.';
import Badge from '../badge';
Expand Down
4 changes: 2 additions & 2 deletions src/components/backdrop/backdrop.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import Backdrop, { BackdropProps } from '.';

export default {
title: 'Components/Backdrop',
component: Backdrop
} as Meta;

const Template: Story<BackdropProps> = (args) => <Backdrop {...args} />;
const Template: StoryFn<BackdropProps> = (args) => <Backdrop {...args} />;

export const Default = Template.bind({});
Default.args = {};
Expand Down
4 changes: 2 additions & 2 deletions src/components/badge/badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from '@storybook/react';
import { Meta, StoryFn } from '@storybook/react';
import styled from 'styled-components';
import { theme } from '../../tokens/themes';

Expand All @@ -16,7 +16,7 @@ const Box = styled.div`
border-radius: 4px;
`;

export const Default: Story<Arguments> = ({ offsetX, offsetY, ...args }) => {
export const Default: StoryFn<Arguments> = ({ offsetX, offsetY, ...args }) => {
const offset: BadgeProps['offset'] = [offsetX, offsetY];

return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/breadcrumb/breadcrumb.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import Breadcrumb, { BreadcrumbProps } from '.';
import { theme } from '../../tokens/themes';

Expand All @@ -21,7 +21,7 @@ const options = {
{ to: 'https://twitter.com', label: 'Twitter' }
]
};
const Template: Story<BreadcrumbProps> = (args) => (
const Template: StoryFn<BreadcrumbProps> = (args) => (
<Breadcrumb {...args}>
{options.items.map(({ to, label }) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/react/types-6-0';
import { Meta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';
import Button from '.';
Expand Down
4 changes: 2 additions & 2 deletions src/components/card/card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import Card, { StyledCardProps } from '.';
import CardGroup from '../cardgroup';

Expand All @@ -7,7 +7,7 @@ export default {
component: Card
} as Meta;

const Template: Story<StyledCardProps> = (args) => <Card {...args} />;
const Template: StoryFn<StyledCardProps> = (args) => <Card {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import { theme } from '../../tokens/themes';

import CircularProgressBar, { CircularProgressBarProps } from './circularProgressBar';
Expand All @@ -15,7 +15,7 @@ export default {
}
} as Meta;

const Template: Story<CircularProgressBarProps> = (args) => <CircularProgressBar {...args} />;
const Template: StoryFn<CircularProgressBarProps> = (args) => <CircularProgressBar {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/drawer/drawer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { Meta, StoryFn } from '@storybook/react';
import Drawer, { DrawerProps } from '.';
import { useArgs } from '@storybook/client-api';

const Template: Story<DrawerProps> = ({ ...args }) => {
const Template: StoryFn<DrawerProps> = ({ ...args }) => {
const [{ open }, updateArgs] = useArgs();
const handleClose = () => updateArgs({ open: !open });
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/image/image.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import Image, { ImageProps } from '.';

export default {
title: 'Components/Image',
component: Image
} as Meta;

const Template: Story<ImageProps> = (args) => <Image {...args} />;
const Template: StoryFn<ImageProps> = (args) => <Image {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/link/link.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';

import Link, { LinkProps } from '.';
import { theme } from '../../tokens/themes';
Expand All @@ -15,7 +15,7 @@ export default {
}
} as Meta;

const Template: Story<LinkProps> = (args) => <Link {...args} />;
const Template: StoryFn<LinkProps> = (args) => <Link {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/pagination/pagination.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Story, Meta } from '@storybook/react/types-6-0';
import { StoryFn, Meta } from '@storybook/react';
import { theme } from '../../tokens/themes';
import Pagination, { PaginationProps } from './pagination';
export default {
Expand All @@ -18,7 +18,7 @@ export default {
}
} as Meta;

const Template: Story<PaginationProps> = (args) => <Pagination {...args} />;
const Template: StoryFn<PaginationProps> = (args) => <Pagination {...args} />;

export const Default = Template.bind({});

Expand Down
4 changes: 2 additions & 2 deletions src/components/progressBar/progressBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import { theme } from '../../tokens/themes';

import ProgressBar, { ProgressBarProps } from '.';
Expand All @@ -16,7 +16,7 @@ export default {
}
} as Meta;

const Template: Story<ProgressBarProps> = (args) => <ProgressBar {...args} />;
const Template: StoryFn<ProgressBarProps> = (args) => <ProgressBar {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/select/select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Story } from '@storybook/react';
import { Meta, StoryFn } from '@storybook/react';
import React, { useState } from 'react';
import Select, { SelectProps } from '.';

Expand All @@ -7,7 +7,7 @@ export default {
component: Select
} as Meta;

const Template: Story<SelectProps<string[]>> = (args) => {
const Template: StoryFn<SelectProps<string[]>> = (args) => {
const [value, setValue] = useState('');
const data = ['India', 'Mexico', 'Australia', 'Germany'];

Expand Down
4 changes: 2 additions & 2 deletions src/components/skeleton/skeleton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import Skeleton, { SkeletonProps } from '.';

export default {
title: 'Components/Skeleton',
component: Skeleton
} as Meta;

const Template: Story<SkeletonProps> = (args) => <Skeleton {...args} />;
const Template: StoryFn<SkeletonProps> = (args) => <Skeleton {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/steps/steps.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Meta, Story } from '@storybook/react';
import { Meta, StoryFn } from '@storybook/react';
import { useArgs } from '@storybook/client-api';
import Steps, { StepsProps } from '.';
import { theme } from '../../tokens/themes';
Expand All @@ -22,7 +22,7 @@ export default {

const { Step } = Steps;

const Template: Story<StepsProps> = ({ ...args }) => {
const Template: StoryFn<StepsProps> = ({ ...args }) => {
return (
<Steps {...args}>
<Step title="Step One" subTitle="Step one details" />
Expand Down
2 changes: 1 addition & 1 deletion src/components/switch/switch.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/react/types-6-0';
import { Meta } from '@storybook/react';
import Switch from './switch';
import React, { useCallback, useState } from 'react';
import styled from 'styled-components';
Expand Down
4 changes: 2 additions & 2 deletions src/components/tag/tag.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Story, Meta } from '@storybook/react/types-6-0';
import { StoryFn, Meta } from '@storybook/react';
import { theme } from '../../tokens/themes';
import Tag, { TagProps } from '.';
import Button from '../button';
Expand All @@ -7,7 +7,7 @@ type Arguments = TagProps & {
content: string;
};

export const Playground: Story<Arguments> = ({ content, ...args }) => (
export const Playground: StoryFn<Arguments> = ({ content, ...args }) => (
<Tag {...args}>{content}</Tag>
);

Expand Down
4 changes: 2 additions & 2 deletions src/components/text-input/text-input.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Story, Meta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import TextInput, { TextInputProps } from '.';
import SearchIcon from '../../icons/Search';

Expand All @@ -8,7 +8,7 @@ export default {
component: TextInput
} as Meta;

const Template: Story<TextInputProps> = (args) => <TextInput {...args} />;
const Template: StoryFn<TextInputProps> = (args) => <TextInput {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tooltip/tooltip.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/react/types-6-0';
import { Meta } from '@storybook/react';
import React from 'react';
import Tooltip from '.';

Expand Down

0 comments on commit 2a33ad9

Please sign in to comment.