beyond-system 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.auto-changelog +10 -0
  2. package/.editorconfig +9 -0
  3. package/.eslintrc.js +74 -0
  4. package/.storybook/growth-theme.js +23 -0
  5. package/.storybook/main.js +21 -0
  6. package/.storybook/manager.js +7 -0
  7. package/.storybook/preview-head.html +13 -0
  8. package/.storybook/preview.js +29 -0
  9. package/README.md +38 -0
  10. package/changelog-template.hbs +19 -0
  11. package/next.config.js +6 -0
  12. package/package.json +51 -0
  13. package/prettier.config.js +5 -0
  14. package/public/favicon.ico +0 -0
  15. package/public/next.svg +1 -0
  16. package/public/thirteen.svg +1 -0
  17. package/public/vercel.svg +1 -0
  18. package/setup.js +15 -0
  19. package/src/colors/base-colors.ts +75 -0
  20. package/src/colors/gradients.ts +9 -0
  21. package/src/colors/index.ts +3 -0
  22. package/src/colors/shadows.ts +9 -0
  23. package/src/components/react/Checkbox/Checkbox.stories.tsx +59 -0
  24. package/src/components/react/Checkbox/Checkbox.styles.ts +84 -0
  25. package/src/components/react/Checkbox/Checkbox.tsx +33 -0
  26. package/src/components/react/Checkbox/Checkbox.variants.ts +27 -0
  27. package/src/components/react/DefaultButton/DefaultButton.stories.tsx +98 -0
  28. package/src/components/react/DefaultButton/DefaultButton.styles.ts +106 -0
  29. package/src/components/react/DefaultButton/DefaultButton.tsx +67 -0
  30. package/src/components/react/DefaultButton/DefaultButton.variants.ts +49 -0
  31. package/src/components/react/IconButton/IconButton.stories.tsx +71 -0
  32. package/src/components/react/IconButton/IconButton.styles.ts +98 -0
  33. package/src/components/react/IconButton/IconButton.tsx +55 -0
  34. package/src/components/react/IconButton/IconButton.variants.ts +40 -0
  35. package/src/components/react/Loader/Loader.stories.tsx +36 -0
  36. package/src/components/react/Loader/Loader.tsx +40 -0
  37. package/src/components/react/Loader/index.tsx +1 -0
  38. package/src/components/react/OutlineButton/OutlineButton.stories.tsx +98 -0
  39. package/src/components/react/OutlineButton/OutlineButton.styles.ts +97 -0
  40. package/src/components/react/OutlineButton/OutlineButton.tsx +67 -0
  41. package/src/components/react/OutlineButton/OutlineButton.variants.ts +40 -0
  42. package/src/components/react/RadioInput/RadioInput.stories.tsx +53 -0
  43. package/src/components/react/RadioInput/RadioInput.styles.ts +69 -0
  44. package/src/components/react/RadioInput/RadioInput.tsx +23 -0
  45. package/src/components/react/RadioInput/RadioInput.variants.ts +23 -0
  46. package/src/components/react/Switch/Switch.stories.tsx +53 -0
  47. package/src/components/react/Switch/Switch.styles.ts +60 -0
  48. package/src/components/react/Switch/Switch.tsx +28 -0
  49. package/src/components/react/Switch/Switch.variants.ts +19 -0
  50. package/src/components/react/TransparentButton/TransparentButton.stories.tsx +53 -0
  51. package/src/components/react/TransparentButton/TransparentButton.styles.ts +74 -0
  52. package/src/components/react/TransparentButton/TransparentButton.tsx +41 -0
  53. package/src/components/react/TransparentButton/TransparentButton.variants.ts +35 -0
  54. package/src/stories/base-colors/base-colors.stories.styles.ts +65 -0
  55. package/src/stories/base-colors/base-colors.stories.tsx +89 -0
  56. package/src/stories/gradients/gradients.stories.styles.ts +60 -0
  57. package/src/stories/gradients/gradients.stories.tsx +39 -0
  58. package/src/stories/shadows/shadows.stories.styles.ts +59 -0
  59. package/src/stories/shadows/shadows.stories.tsx +37 -0
  60. package/src/web/border.ts +13 -0
  61. package/src/web/font.ts +38 -0
  62. package/src/web/index.ts +2 -0
  63. package/tsconfig.json +24 -0
  64. package/vercel.json +8 -0
@@ -0,0 +1,98 @@
1
+ import React from 'react'
2
+ import styled from 'styled-components'
3
+ import { Meta } from '@storybook/react/types-6-0'
4
+ import { MdCheck } from 'react-icons/md'
5
+
6
+ import ButtonComponent from './OutlineButton'
7
+ import { OUTLINE_BUTTON_VARIANTS } from './OutlineButton.variants'
8
+
9
+ type Props = React.ComponentProps<typeof ButtonComponent>
10
+
11
+ const Container = styled.div`
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: flex-start;
15
+ gap: 1rem;
16
+ `
17
+
18
+ export const OutlineButton = (props: Props) => {
19
+ return (
20
+ <Container>
21
+ <ButtonComponent {...props} />
22
+ <ButtonComponent {...props} leftIcon={<MdCheck />} />
23
+ <ButtonComponent {...props} rightIcon={<MdCheck />} />
24
+ <ButtonComponent
25
+ {...props}
26
+ leftIcon={<MdCheck />}
27
+ rightIcon={<MdCheck />}
28
+ />
29
+ </Container>
30
+ )
31
+ }
32
+
33
+ export default {
34
+ title: 'Buttons/OutlineButton',
35
+ parameters: {
36
+ component: OutlineButton,
37
+ },
38
+ args: {
39
+ text: 'Button',
40
+ variant: 'primary',
41
+ size: 'MD',
42
+ shape: 'square',
43
+ fullWidth: false,
44
+ disabled: false,
45
+ loading: false,
46
+ },
47
+ argTypes: {
48
+ text: {
49
+ control: {
50
+ type: 'text',
51
+ },
52
+ },
53
+ leftIcon: {
54
+ control: {},
55
+ },
56
+ rightIcon: {
57
+ control: {},
58
+ },
59
+ variant: {
60
+ control: {
61
+ type: 'select',
62
+ options: Object.keys(OUTLINE_BUTTON_VARIANTS.color),
63
+ },
64
+ },
65
+ size: {
66
+ control: {
67
+ type: 'select',
68
+ options: Object.keys(OUTLINE_BUTTON_VARIANTS.size),
69
+ },
70
+ },
71
+ shape: {
72
+ control: {
73
+ type: 'select',
74
+ options: Object.keys(OUTLINE_BUTTON_VARIANTS.shape),
75
+ },
76
+ },
77
+ loading: {
78
+ control: {
79
+ type: 'boolean',
80
+ },
81
+ },
82
+ fullWidth: {
83
+ control: {
84
+ type: 'boolean',
85
+ },
86
+ },
87
+ disabled: {
88
+ control: {
89
+ type: 'boolean',
90
+ },
91
+ },
92
+ onClick: {
93
+ control: {
94
+ action: 'clicked',
95
+ },
96
+ },
97
+ },
98
+ } as Meta
@@ -0,0 +1,97 @@
1
+ import styled from 'styled-components'
2
+ import { COLORS } from '@/colors'
3
+
4
+ type StyledButtonProps = {
5
+ padding: string
6
+ color: string
7
+ borderRadius: string
8
+ borderColor: string
9
+ fontSize: string
10
+ gap: string
11
+ fullWidth: boolean
12
+ loading: boolean
13
+ }
14
+
15
+ export const StyledButtonContainer = styled.button<StyledButtonProps>`
16
+ all: unset;
17
+ position: relative;
18
+
19
+ display: flex;
20
+ flex-direction: row;
21
+
22
+ align-items: center;
23
+ justify-content: center;
24
+
25
+ width: ${(props) => (props.fullWidth ? '100%' : 'auto')};
26
+
27
+ transition: 0.05s ease-in-out;
28
+
29
+ padding: ${(props) => props.padding};
30
+ gap: ${(props) => props.gap};
31
+
32
+ color: ${(props) => props.color};
33
+ font-size: ${(props) => props.fontSize};
34
+ font-weight: 600;
35
+
36
+ .default-btn-icon {
37
+ display: flex;
38
+ align-items: center;
39
+ font-size: ${(props) => props.fontSize};
40
+ opacity: ${(props) => (props.loading ? 0 : 1)};
41
+
42
+ * {
43
+ color: ${(props) => props.color};
44
+ font-size: ${(props) => props.fontSize};
45
+ font-weight: 600;
46
+ }
47
+ }
48
+
49
+ .default-btn-text {
50
+ opacity: ${(props) => (props.loading ? 0 : 1)};
51
+ }
52
+
53
+ .default-btn-loader {
54
+ position: absolute;
55
+ display: flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ height: 100%;
59
+ width: 100%;
60
+ }
61
+
62
+ background-color: transparent;
63
+ border: 1px solid ${(props) => props.borderColor};
64
+ border-radius: ${(props) => props.borderRadius};
65
+
66
+ padding: ${(props) => props.padding};
67
+
68
+ pointer-events: ${(props) => (props.loading ? 'none' : 'auto')};
69
+
70
+ :hover {
71
+ cursor: pointer;
72
+ transform: scale(1.01);
73
+ }
74
+
75
+ :active {
76
+ transform: scale(0.98);
77
+ }
78
+
79
+ :disabled {
80
+ color: ${COLORS.NEUTRAL_LIGHT};
81
+ border-color: ${COLORS.NEUTRAL_LIGHT};
82
+ background-color: ${COLORS.NEUTRAL_HIGH};
83
+
84
+ * {
85
+ color: ${COLORS.NEUTRAL_LIGHT};
86
+ }
87
+
88
+ :hover {
89
+ cursor: default;
90
+ transform: scale(1);
91
+ }
92
+
93
+ :active {
94
+ transform: scale(1);
95
+ }
96
+ }
97
+ `
@@ -0,0 +1,67 @@
1
+ import React, { forwardRef } from 'react'
2
+
3
+ import { COLORS } from '@/colors'
4
+ import { Loader } from '@/components/react/Loader'
5
+
6
+ import { StyledButtonContainer } from './OutlineButton.styles'
7
+ import { OUTLINE_BUTTON_VARIANTS } from './OutlineButton.variants'
8
+
9
+ type OutlineButtonProps = {
10
+ text: string
11
+ variant?: keyof typeof OUTLINE_BUTTON_VARIANTS.color
12
+ size?: keyof typeof OUTLINE_BUTTON_VARIANTS.size
13
+ shape?: keyof typeof OUTLINE_BUTTON_VARIANTS.shape
14
+ leftIcon?: React.ReactNode
15
+ rightIcon?: React.ReactNode
16
+ fullWidth?: boolean
17
+ loading?: boolean
18
+ } & React.ButtonHTMLAttributes<HTMLButtonElement>
19
+
20
+ const OutlineButton = forwardRef<HTMLButtonElement, OutlineButtonProps>(
21
+ (
22
+ {
23
+ text,
24
+ variant = 'primary',
25
+ size = 'MD',
26
+ shape = 'square',
27
+ fullWidth = false,
28
+ leftIcon: LeftIcon,
29
+ rightIcon: RightIcon,
30
+ loading = false,
31
+ ...props
32
+ }: OutlineButtonProps,
33
+ ref: any
34
+ ) => {
35
+ const colorProps = OUTLINE_BUTTON_VARIANTS.color[variant]
36
+ const sizeProps = OUTLINE_BUTTON_VARIANTS.size[size]
37
+ const shapeProps = OUTLINE_BUTTON_VARIANTS.shape[shape]
38
+
39
+ const loaderColor = colorProps.color as keyof typeof COLORS
40
+
41
+ return (
42
+ <StyledButtonContainer
43
+ type="button"
44
+ {...props}
45
+ {...colorProps}
46
+ {...sizeProps}
47
+ {...shapeProps}
48
+ fullWidth={fullWidth}
49
+ loading={loading}
50
+ ref={ref}
51
+ >
52
+ {loading && (
53
+ <span className="default-btn-loader">
54
+ <Loader size={size} color={loaderColor} />
55
+ </span>
56
+ )}
57
+ {LeftIcon && <span className="default-btn-icon">{LeftIcon}</span>}
58
+ <span className="default-btn-text">{text}</span>
59
+ {RightIcon && <span className="default-btn-icon">{RightIcon}</span>}
60
+ </StyledButtonContainer>
61
+ )
62
+ }
63
+ )
64
+
65
+ OutlineButton.displayName = 'OutlineButton'
66
+
67
+ export default OutlineButton
@@ -0,0 +1,40 @@
1
+ import { COLORS } from '@/colors'
2
+ import { FONT, BORDER } from '@/web'
3
+
4
+ export const OUTLINE_BUTTON_VARIANTS = {
5
+ color: {
6
+ primary: {
7
+ color: COLORS.GROWTH_MID,
8
+ borderColor: COLORS.GROWTH_MID,
9
+ },
10
+ light: {
11
+ color: COLORS.NEUTRAL_LIGHTER,
12
+ borderColor: COLORS.NEUTRAL_LIGHTER,
13
+ },
14
+ dark: {
15
+ color: COLORS.NEUTRAL_DARKER,
16
+ borderColor: COLORS.NEUTRAL_DARKER,
17
+ },
18
+ },
19
+ size: {
20
+ SM: {
21
+ fontSize: FONT.SIZE.SM,
22
+ padding: '5px 6px',
23
+ gap: '6px',
24
+ },
25
+ MD: {
26
+ fontSize: FONT.SIZE.MD,
27
+ padding: '6px 10px',
28
+ gap: '8px',
29
+ },
30
+ },
31
+
32
+ shape: {
33
+ square: {
34
+ borderRadius: BORDER.RADIUS.MD,
35
+ },
36
+ round: {
37
+ borderRadius: '55px',
38
+ },
39
+ },
40
+ }
@@ -0,0 +1,53 @@
1
+ import React from 'react'
2
+ import { Meta } from '@storybook/react/types-6-0'
3
+
4
+ import RadioInputComponent from './RadioInput'
5
+ import { DEFAULT_RADIO_VARIANTS } from './RadioInput.variants'
6
+
7
+ type Props = React.ComponentProps<typeof RadioInputComponent>
8
+
9
+ export const RadioInput = (props: Props) => {
10
+ return <RadioInputComponent {...props} />
11
+ }
12
+
13
+ export default {
14
+ title: 'Inputs/RadioInput',
15
+ parameters: {
16
+ component: RadioInput,
17
+ },
18
+ args: {
19
+ variant: 'primary',
20
+ size: 'MD',
21
+ checked: false,
22
+ disabled: false,
23
+ },
24
+ argTypes: {
25
+ variant: {
26
+ control: {
27
+ type: 'select',
28
+ options: Object.keys(DEFAULT_RADIO_VARIANTS.color),
29
+ },
30
+ },
31
+ size: {
32
+ control: {
33
+ type: 'select',
34
+ options: Object.keys(DEFAULT_RADIO_VARIANTS.size),
35
+ },
36
+ },
37
+ checked: {
38
+ control: {
39
+ type: 'boolean',
40
+ },
41
+ },
42
+ disabled: {
43
+ control: {
44
+ type: 'boolean',
45
+ },
46
+ },
47
+ onCheckedChange: {
48
+ control: {
49
+ action: 'changed',
50
+ },
51
+ },
52
+ },
53
+ } as Meta
@@ -0,0 +1,69 @@
1
+ import styled from 'styled-components'
2
+
3
+ import { COLORS } from '@/colors'
4
+
5
+ export type StyledRadioInput = {
6
+ indicatorColor: string
7
+ indicatorHoverColor: string
8
+ boxColor: string
9
+ boxHoverColor: string
10
+ boxActiveColor: string
11
+ boxActiveHoverColor: string
12
+ borderColor: string
13
+ borderHoverColor: string
14
+ borderActiveColor: string
15
+ borderActiveHoverColor: string
16
+ width: string
17
+ }
18
+
19
+ export const StyledRadioInput = styled.input.attrs({
20
+ type: 'radio',
21
+ })<StyledRadioInput>`
22
+ transition: 0.1s ease-in-out;
23
+ width: ${(props) => props.width};
24
+ aspect-ratio: 1/1;
25
+ appearance: none;
26
+ -webkit-appearance: none;
27
+
28
+ border-radius: 50%;
29
+ border: 1px solid ${(props) => props.borderColor};
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+
34
+ :hover {
35
+ cursor: pointer;
36
+ background-color: ${(props) => props.boxHoverColor};
37
+ border-color: ${(props) => props.borderHoverColor};
38
+ }
39
+
40
+ :checked {
41
+ background-color: ${(props) => props.boxActiveColor};
42
+ border-color: ${(props) => props.borderActiveColor};
43
+
44
+ :hover {
45
+ background-color: ${(props) => props.boxActiveHoverColor};
46
+ border-color: ${(props) => props.borderActiveHoverColor};
47
+ }
48
+
49
+ :after {
50
+ content: '';
51
+ width: 100%;
52
+ aspect-ratio: 1/1;
53
+ border-radius: 50%;
54
+ border: 3px solid ${(props) => props.boxActiveColor};
55
+ background-color: ${(props) => props.indicatorColor};
56
+ }
57
+
58
+ :hover:after {
59
+ background-color: ${(props) => props.indicatorHoverColor};
60
+ }
61
+ }
62
+
63
+ :disabled {
64
+ background-color: ${COLORS.NEUTRAL_LIGHT};
65
+ border-color: ${COLORS.NEUTRAL_MID};
66
+
67
+ pointer-events: none;
68
+ }
69
+ `
@@ -0,0 +1,23 @@
1
+ import React from 'react'
2
+
3
+ import { DEFAULT_RADIO_VARIANTS } from './RadioInput.variants'
4
+ import { StyledRadioInput } from './RadioInput.styles'
5
+
6
+ type RadioInputProps = {
7
+ variant?: keyof typeof DEFAULT_RADIO_VARIANTS.color
8
+ size?: keyof typeof DEFAULT_RADIO_VARIANTS.size
9
+ } & React.InputHTMLAttributes<HTMLInputElement>
10
+
11
+ const RadioInput = ({
12
+ variant = 'primary',
13
+ size = 'MD',
14
+ error = false,
15
+ ...props
16
+ }: RadioInputProps) => {
17
+ const colorProps = DEFAULT_RADIO_VARIANTS.color[variant]
18
+ const sizeProps = DEFAULT_RADIO_VARIANTS.size[size]
19
+
20
+ return <StyledRadioInput {...props} {...colorProps} {...sizeProps} />
21
+ }
22
+
23
+ export default RadioInput
@@ -0,0 +1,23 @@
1
+ import { COLORS } from '@/colors'
2
+
3
+ export const DEFAULT_RADIO_VARIANTS = {
4
+ color: {
5
+ primary: {
6
+ indicatorColor: COLORS.GROWTH_MID,
7
+ indicatorHoverColor: COLORS.GROWTH_DARK,
8
+ boxColor: COLORS.NEUTRAL_HIGH,
9
+ boxHoverColor: COLORS.NEUTRAL_LIGHT,
10
+ boxActiveColor: COLORS.NEUTRAL_HIGH,
11
+ boxActiveHoverColor: COLORS.NEUTRAL_HIGH,
12
+ borderColor: COLORS.NEUTRAL_DARK,
13
+ borderHoverColor: COLORS.NEUTRAL_DARK,
14
+ borderActiveColor: COLORS.NEUTRAL_DARK,
15
+ borderActiveHoverColor: COLORS.NEUTRAL_DARK,
16
+ },
17
+ },
18
+ size: {
19
+ MD: {
20
+ width: '15px',
21
+ },
22
+ },
23
+ }
@@ -0,0 +1,53 @@
1
+ import React from 'react'
2
+ import { Meta } from '@storybook/react/types-6-0'
3
+
4
+ import SwitchComponent from './Switch'
5
+ import { DEFAULT_SWITCH_VARIANTS } from './Switch.variants'
6
+
7
+ type Props = React.ComponentProps<typeof SwitchComponent>
8
+
9
+ export const Switch = (props: Props) => {
10
+ return <SwitchComponent {...props} />
11
+ }
12
+
13
+ export default {
14
+ title: 'Inputs/Switch',
15
+ parameters: {
16
+ component: Switch,
17
+ },
18
+ args: {
19
+ variant: 'primary',
20
+ size: 'MD',
21
+ checked: false,
22
+ disabled: false,
23
+ },
24
+ argTypes: {
25
+ variant: {
26
+ control: {
27
+ type: 'select',
28
+ options: Object.keys(DEFAULT_SWITCH_VARIANTS.color),
29
+ },
30
+ },
31
+ size: {
32
+ control: {
33
+ type: 'select',
34
+ options: Object.keys(DEFAULT_SWITCH_VARIANTS.size),
35
+ },
36
+ },
37
+ checked: {
38
+ control: {
39
+ type: 'boolean',
40
+ },
41
+ },
42
+ disabled: {
43
+ control: {
44
+ type: 'boolean',
45
+ },
46
+ },
47
+ onCheckedChange: {
48
+ control: {
49
+ action: 'changed',
50
+ },
51
+ },
52
+ },
53
+ } as Meta
@@ -0,0 +1,60 @@
1
+ import styled from 'styled-components'
2
+
3
+ import * as RadixSwitch from '@radix-ui/react-switch'
4
+
5
+ import { COLORS } from '@/colors'
6
+
7
+ export type StyledSwitchProps = {
8
+ thumbColor: string
9
+ thumbHoverColor: string
10
+ thumbActiveColor: string
11
+ trackColor: string
12
+ trackHoverColor: string
13
+ trackActiveColor: string
14
+ width: string
15
+ }
16
+
17
+ export const SwitchContainer = styled(RadixSwitch.Root)<StyledSwitchProps>`
18
+ all: unset;
19
+ position: relative;
20
+
21
+ width: ${(props) => props.width};
22
+ aspect-ratio: 2/1;
23
+
24
+ background-color: ${(props) => props.trackColor};
25
+ border-radius: ${(props) => props.width};
26
+
27
+ :focus {
28
+ outline: none;
29
+ }
30
+
31
+ &[data-state='checked'] {
32
+ background-color: ${(props) => props.trackActiveColor};
33
+ }
34
+
35
+ :disabled {
36
+ background-color: ${COLORS.NEUTRAL_LIGHT};
37
+ }
38
+ `
39
+
40
+ export const SwitchThumb = styled(RadixSwitch.Thumb)<StyledSwitchProps>`
41
+ display: block;
42
+
43
+ width: calc(${(props) => props.width} * 0.4);
44
+ aspect-ratio: 1/1;
45
+
46
+ border-radius: 50%;
47
+ background-color: ${(props) => props.thumbColor};
48
+
49
+ transition: transform 100ms;
50
+ transform: translateX(calc(${(props) => props.width} * 0.05));
51
+ will-change: transform;
52
+
53
+ &[data-state='checked'] {
54
+ transform: translateX(
55
+ calc(
56
+ (${(props) => props.width} * 0.95) - (${(props) => props.width} * 0.4)
57
+ )
58
+ );
59
+ }
60
+ `
@@ -0,0 +1,28 @@
1
+ import React from 'react'
2
+ import * as RadixSwitch from '@radix-ui/react-switch'
3
+
4
+ import { DEFAULT_SWITCH_VARIANTS } from './Switch.variants'
5
+ import { SwitchContainer, SwitchThumb } from './Switch.styles'
6
+
7
+ type RootSwitchProps = React.ComponentProps<typeof RadixSwitch.Root>
8
+ type SwitchProps = {
9
+ variant?: keyof typeof DEFAULT_SWITCH_VARIANTS.color
10
+ size?: keyof typeof DEFAULT_SWITCH_VARIANTS.size
11
+ } & RootSwitchProps
12
+
13
+ const Switch = ({
14
+ variant = 'primary',
15
+ size = 'MD',
16
+ ...props
17
+ }: SwitchProps) => {
18
+ const colorProps = DEFAULT_SWITCH_VARIANTS.color[variant]
19
+ const sizeProps = DEFAULT_SWITCH_VARIANTS.size[size]
20
+
21
+ return (
22
+ <SwitchContainer {...props} {...colorProps} {...sizeProps}>
23
+ <SwitchThumb {...colorProps} {...sizeProps} />
24
+ </SwitchContainer>
25
+ )
26
+ }
27
+
28
+ export default Switch
@@ -0,0 +1,19 @@
1
+ import { COLORS } from '@/colors'
2
+
3
+ export const DEFAULT_SWITCH_VARIANTS = {
4
+ color: {
5
+ primary: {
6
+ thumbColor: COLORS.NEUTRAL_HIGH,
7
+ thumbHoverColor: COLORS.GROWTH_MID,
8
+ thumbActiveColor: COLORS.GROWTH_MID,
9
+ trackColor: COLORS.GROWTH_MID,
10
+ trackHoverColor: COLORS.GROWTH_MID,
11
+ trackActiveColor: COLORS.GROWTH_MID,
12
+ },
13
+ },
14
+ size: {
15
+ MD: {
16
+ width: '42px',
17
+ },
18
+ },
19
+ }
@@ -0,0 +1,53 @@
1
+ import React from 'react'
2
+ import { Meta } from '@storybook/react/types-6-0'
3
+
4
+ import ButtonComponent from './TransparentButton'
5
+ import { TRANSPARENT_BUTTON_VARIANTS } from './TransparentButton.variants'
6
+
7
+ type Props = React.ComponentProps<typeof ButtonComponent>
8
+
9
+ export const TransparentButton = (props: Props) => {
10
+ return <ButtonComponent {...props} />
11
+ }
12
+
13
+ export default {
14
+ title: 'Buttons/TransparentButton',
15
+ parameters: {
16
+ component: TransparentButton,
17
+ },
18
+ args: {
19
+ children: 'Button',
20
+ variant: 'primary',
21
+ size: 'MD',
22
+ disabled: false,
23
+ },
24
+ argTypes: {
25
+ children: {
26
+ control: {
27
+ type: 'text',
28
+ },
29
+ },
30
+ variant: {
31
+ control: {
32
+ type: 'select',
33
+ options: Object.keys(TRANSPARENT_BUTTON_VARIANTS.color),
34
+ },
35
+ },
36
+ size: {
37
+ control: {
38
+ type: 'select',
39
+ options: Object.keys(TRANSPARENT_BUTTON_VARIANTS.size),
40
+ },
41
+ },
42
+ disabled: {
43
+ control: {
44
+ type: 'boolean',
45
+ },
46
+ },
47
+ onClick: {
48
+ control: {
49
+ action: 'clicked',
50
+ },
51
+ },
52
+ },
53
+ } as Meta