@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
"eslint-config-lxsmnsyc": "^0.5.0", | "eslint-config-lxsmnsyc": "^0.5.0", | ||||
@@ -1,10 +1,10 @@ | |||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import type { Meta } from '@storybook/react'; | import type { Meta } from '@storybook/react'; | ||||
import { ActionButton, ActionButtonProps } from '.'; | |||||
import { ActionButton as Component, ActionButtonProps as Props } from '.'; | |||||
import { Button } from '@tesseract-design/web-base'; | import { Button } from '@tesseract-design/web-base'; | ||||
const meta: Meta<typeof ActionButton> = { | |||||
component: ActionButton, | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | argTypes: { | ||||
type: { | type: { | ||||
control: { type: 'select' }, | control: { type: 'select' }, | ||||
@@ -25,15 +25,15 @@ const meta: Meta<typeof ActionButton> = { | |||||
action: 'clicked', | action: 'clicked', | ||||
}, | }, | ||||
}, | }, | ||||
args: ActionButton.defaultProps ?? {}, | |||||
args: Component.defaultProps ?? {}, | |||||
}; | }; | ||||
export const Story = (args: Omit<ActionButtonProps, 'ref'>) => ( | |||||
<ActionButton | |||||
export const ActionButton = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | {...args} | ||||
> | > | ||||
Button | Button | ||||
</ActionButton> | |||||
</Component> | |||||
); | ); | ||||
export default meta; | export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,29 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { FileSelectBox as Component, FileSelectBoxProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
previewComponent: { | |||||
table: { | |||||
disable: true, | |||||
} | |||||
}, | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: Component.defaultProps ?? {}, | |||||
}; | |||||
export const FileSelectBox = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,27 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { ComboBox as Component, ComboBoxProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
label: 'ComboBox', | |||||
}, | |||||
}; | |||||
export const ComboBox = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { DropdownSelect as Component, DropdownSelectProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const DropdownSelect = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { MenuSelect as Component, MenuSelectProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const MenuSelect = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { RadioButton as Component, RadioButtonProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const RadioButton = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { RadioTickBox as Component, RadioTickBoxProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const RadioTickBox = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { ColorPicker as Component, ColorPickerProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const ColorPicker = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { Swatch as Component, SwatchProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const Swatch = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { EmailInput as Component, EmailInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const EmailInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { PatternTextInput as Component, PatternTextInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const PatternTextInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { PhoneNumberInput as Component, PhoneNumberInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const PhoneNumberInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { UrlInput as Component, UrlInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const UrlInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { MaskedTextInput as Component, MaskedTextInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const MaskedTextInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { MultilineTextInput as Component, MultilineTextInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const MultilineTextInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { TextInput as Component, TextInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const TextInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,19 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { Badge as Component, BadgeProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: {}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const Badge = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,19 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { KeyValueTable as Component, KeyValueTableProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: {}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const KeyValueTable = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { MenuMultiSelect as Component, MenuMultiSelectProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const MenuMultiSelect = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { TagInput as Component, TagInputProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const TagInput = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { ToggleButton as Component, ToggleButtonProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const ToggleButton = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { ToggleSwitch as Component, ToggleSwitchProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const ToggleSwitch = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { ToggleTickBox as Component, ToggleTickBoxProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const ToggleTickBox = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,7 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@storybook/react": "^7.4.0", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -1,10 +1,10 @@ | |||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import type { Meta } from '@storybook/react'; | import type { Meta } from '@storybook/react'; | ||||
import { LinkButton, LinkButtonProps } from '.'; | |||||
import { LinkButton as Component, LinkButtonProps } from '.'; | |||||
import { Button } from '@tesseract-design/web-base'; | import { Button } from '@tesseract-design/web-base'; | ||||
const meta: Meta<typeof LinkButton> = { | |||||
component: LinkButton, | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | argTypes: { | ||||
type: { | type: { | ||||
control: { type: 'select' }, | control: { type: 'select' }, | ||||
@@ -25,15 +25,15 @@ const meta: Meta<typeof LinkButton> = { | |||||
action: 'clicked', | action: 'clicked', | ||||
}, | }, | ||||
}, | }, | ||||
args: LinkButton.defaultProps ?? {}, | |||||
args: Component.defaultProps ?? {}, | |||||
}; | }; | ||||
export const Story = (args: Omit<LinkButtonProps, 'ref'>) => ( | |||||
<LinkButton | |||||
export const LinkButton = (args: Omit<LinkButtonProps, 'ref'>) => ( | |||||
<Component | |||||
{...args} | {...args} | ||||
> | > | ||||
Button | Button | ||||
</LinkButton> | |||||
</Component> | |||||
); | ); | ||||
export default meta; | export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { NumberSpinner as Component, NumberSpinnerProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const NumberSpinner = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { Slider as Component, SliderProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const Slider = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { DateDropdown as Component, DateDropdownProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const DateDropdown = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -0,0 +1,26 @@ | |||||
import * as React from 'react'; | |||||
import type { Meta } from '@storybook/react'; | |||||
import { TimeSpinner as Component, TimeSpinnerProps as Props } from '.'; | |||||
const meta: Meta<typeof Component> = { | |||||
component: Component, | |||||
argTypes: { | |||||
onChange: { | |||||
table: { | |||||
disable: true, | |||||
}, | |||||
action: 'changed', | |||||
}, | |||||
}, | |||||
args: { | |||||
...(Component.defaultProps ?? {}), | |||||
}, | |||||
}; | |||||
export const TimeSpinner = (args: Omit<Props, 'ref'>) => ( | |||||
<Component | |||||
{...args} | |||||
/> | |||||
); | |||||
export default meta; |
@@ -16,6 +16,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"@types/yargs": "^17.0.24", | "@types/yargs": "^17.0.24", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
"eslint-config-lxsmnsyc": "^0.5.0", | "eslint-config-lxsmnsyc": "^0.5.0", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/mime-types": "^2.1.1", | "@types/mime-types": "^2.1.1", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/get-image-colors": "^4.0.2", | "@types/get-image-colors": "^4.0.2", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
"@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"@types/prismjs": "^1.26.0", | "@types/prismjs": "^1.26.0", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
@@ -13,6 +13,7 @@ | |||||
"pridepack" | "pridepack" | ||||
], | ], | ||||
"devDependencies": { | "devDependencies": { | ||||
"@storybook/react": "^7.3.2", | |||||
"@types/node": "^18.14.1", | "@types/node": "^18.14.1", | ||||
"eslint": "^8.35.0", | "eslint": "^8.35.0", | ||||
"eslint-config-lxsmnsyc": "^0.5.0", | "eslint-config-lxsmnsyc": "^0.5.0", | ||||
@@ -1,7 +1,12 @@ | |||||
import type { StorybookConfig } from "@storybook/react-vite"; | import type { StorybookConfig } from "@storybook/react-vite"; | ||||
const config: StorybookConfig = { | const config: StorybookConfig = { | ||||
stories: ["../../../categories/web/*/react/src/**/*.stories.tsx"], | |||||
stories: [ | |||||
{ | |||||
directory: "../../../categories/web", | |||||
files: "*/react/src/**/*.stories.tsx", | |||||
} | |||||
], | |||||
addons: [ | addons: [ | ||||
"@storybook/addon-links", | "@storybook/addon-links", | ||||
"@storybook/addon-essentials", | "@storybook/addon-essentials", | ||||
@@ -0,0 +1,25 @@ | |||||
<style> | |||||
:root { | |||||
--color-shade: 0 0 0; | |||||
--color-negative: 34 34 34; | |||||
--color-positive: 238 238 238; | |||||
--color-primary: 199 138 179; | |||||
--color-secondary: 215 95 75; | |||||
--color-tertiary: 255 153 0; | |||||
--color-code-number: 116 249 94; | |||||
--color-code-keyword: 255 67 137; | |||||
--color-code-type: 80 151 210; | |||||
--color-code-instance-attribute: 118 167 210; | |||||
--color-code-function: 103 194 82; | |||||
--color-code-parameter: 145 94 194; | |||||
--color-code-property: 255 161 201; | |||||
--color-code-string: 238 211 113; | |||||
--color-code-variable: 139 194 117; | |||||
--color-code-regexp: 116 167 43; | |||||
--color-code-url: 0 153 204; | |||||
--color-code-global: 194 128 80; | |||||
--font-sans: Encode Sans, sans-serif; | |||||
--font-headings: Glory, var(--font-sans), sans-serif; | |||||
--font-mono: MonoLisa, mononoki, monospace; | |||||
} | |||||
</style> |
@@ -1,27 +1,3 @@ | |||||
@tailwind base; | @tailwind base; | ||||
@tailwind utilities; | @tailwind utilities; | ||||
@tailwind components; | @tailwind components; | ||||
:root { | |||||
--color-shade: 0 0 0; | |||||
--color-negative: 34 34 34; | |||||
--color-positive: 238 238 238; | |||||
--color-primary: 199 138 179; | |||||
--color-secondary: 215 95 75; | |||||
--color-tertiary: 255 153 0; | |||||
--color-code-number: 116 249 94; | |||||
--color-code-keyword: 255 67 137; | |||||
--color-code-type: 80 151 210; | |||||
--color-code-instance-attribute: 118 167 210; | |||||
--color-code-function: 103 194 82; | |||||
--color-code-parameter: 145 94 194; | |||||
--color-code-property: 255 161 201; | |||||
--color-code-string: 238 211 113; | |||||
--color-code-variable: 139 194 117; | |||||
--color-code-regexp: 116 167 43; | |||||
--color-code-url: 0 153 204; | |||||
--color-code-global: 194 128 80; | |||||
--font-sans: Encode Sans, sans-serif; | |||||
--font-headings: Glory, var(--font-sans), sans-serif; | |||||
--font-mono: MonoLisa, mononoki, monospace; | |||||
} |
@@ -1,10 +1,18 @@ | |||||
import {Config} from 'tailwindcss'; | import {Config} from 'tailwindcss'; | ||||
import defaultTheme from 'tailwindcss/defaultTheme'; | |||||
const config: Config = { | const config: Config = { | ||||
content: [ | content: [ | ||||
'../../categories/web/*/react/src/**/*.tsx', | |||||
'../../categories/web/*/react/dist/**/*.js', | |||||
'./.storybook/**/*.html', | |||||
], | ], | ||||
theme: { | theme: { | ||||
fontFamily: { | |||||
sans: ['var(--font-sans)', ...defaultTheme.fontFamily.sans], | |||||
headings: ['var(--font-headings)', ...defaultTheme.fontFamily.sans], | |||||
mono: ['var(--font-mono)', ...defaultTheme.fontFamily.mono], | |||||
inherit: ['inherit'], | |||||
}, | |||||
colors: { | colors: { | ||||
'sidebar': 'rgb(var(--color-sidebar)', | 'sidebar': 'rgb(var(--color-sidebar)', | ||||
'topbar': 'rgb(var(--color-topbar)', | 'topbar': 'rgb(var(--color-topbar)', | ||||