@liguelead/design-system 0.0.8 → 0.0.10
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.
- package/components/Button/Button.appearance.ts +62 -62
- package/components/Button/Button.sizes.ts +41 -41
- package/components/Button/Button.styles.ts +50 -50
- package/components/Button/Button.tsx +76 -76
- package/components/Button/Button.types.ts +23 -23
- package/components/Button/index.ts +1 -1
- package/components/Checkbox/Checkbox.styles.ts +66 -66
- package/components/Checkbox/Checkbox.tsx +40 -40
- package/components/Checkbox/Checkbox.types.ts +11 -11
- package/components/Checkbox/index.tsx +2 -2
- package/components/DatePicker/DatePicker.styles.ts +66 -66
- package/components/DatePicker/DatePicker.tsx +135 -135
- package/components/DatePicker/DatePicker.types.ts +29 -29
- package/components/DatePicker/index.ts +1 -1
- package/components/IconButton/IconButton.sizes.ts +41 -41
- package/components/IconButton/IconButton.tsx +70 -70
- package/components/IconButton/index.ts +1 -1
- package/components/PageWrapper/PageWrapper.tsx +31 -31
- package/components/PageWrapper/index.ts +1 -1
- package/components/SegmentedButton/SegmentedButton.styles.ts +29 -29
- package/components/SegmentedButton/SegmentedButton.tsx +49 -49
- package/components/SegmentedButton/SegmentedButton.types.ts +20 -20
- package/components/SegmentedButton/index.ts +1 -1
- package/components/Select/Select.sizes.ts +56 -56
- package/components/Select/Select.states.tsx +69 -69
- package/components/Select/Select.styles.ts +148 -148
- package/components/Select/Select.tsx +145 -144
- package/components/Select/Select.types.ts +36 -36
- package/components/Select/index.ts +1 -1
- package/components/Text/Text.styles.ts +43 -43
- package/components/Text/Text.tsx +27 -27
- package/components/Text/Text.types.ts +42 -42
- package/components/Text/index.ts +1 -1
- package/components/TextField/TextField.sizes.ts +58 -58
- package/components/TextField/TextField.states.tsx +53 -76
- package/components/TextField/TextField.styles.ts +81 -98
- package/components/TextField/TextField.tsx +105 -108
- package/components/TextField/TextField.types.ts +22 -21
- package/components/TextField/index.ts +2 -2
- package/components/TextField/utils/getState.ts +7 -0
- package/components/ThemeProvider/ThemeProvider.tsx +21 -21
- package/components/ThemeProvider/index.ts +1 -1
- package/components/ThemeProvider/style.ts +969 -969
- package/components/Wizard/StepContent.tsx +28 -28
- package/components/Wizard/StepMenuItem.tsx +33 -33
- package/components/Wizard/Wizard.context.tsx +76 -76
- package/components/Wizard/Wizard.styles.ts +126 -126
- package/components/Wizard/Wizard.tsx +55 -55
- package/components/Wizard/index.ts +1 -1
- package/components/index.ts +11 -11
- package/package.json +41 -39
- package/scripts/createTypes.js +70 -70
- package/utils/colorDarken.ts +10 -10
- package/utils/colorLighten.ts +10 -10
- package/utils/darkenOrLighen.ts +19 -19
- package/utils/getTextColor.ts +12 -12
- package/utils/index.ts +5 -5
- package/utils/parseColor.ts +7 -7
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { FieldValues, UseFormRegisterReturn } from 'react-hook-form'
|
|
2
|
-
import { TextFieldSize } from './TextField.sizes'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
export interface TextFieldProps<TFieldValues extends FieldValues = FieldValues>
|
|
6
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
7
|
-
label: string
|
|
8
|
-
value?: string
|
|
9
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
10
|
-
handleLeftIcon?: () => void
|
|
11
|
-
handleRightIcon?: () => void
|
|
12
|
-
helperText?: string
|
|
13
|
-
size?: TextFieldSize
|
|
14
|
-
className?: string
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { FieldValues, UseFormRegisterReturn } from 'react-hook-form'
|
|
2
|
+
import { TextFieldSize } from './TextField.sizes'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
|
|
5
|
+
export interface TextFieldProps<TFieldValues extends FieldValues = FieldValues>
|
|
6
|
+
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
7
|
+
label: string
|
|
8
|
+
value?: string
|
|
9
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
|
|
10
|
+
handleLeftIcon?: () => void
|
|
11
|
+
handleRightIcon?: () => void
|
|
12
|
+
helperText?: string
|
|
13
|
+
size?: TextFieldSize
|
|
14
|
+
className?: string
|
|
15
|
+
placeholder?: string
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
leftIcon?: React.ReactNode
|
|
18
|
+
rightIcon?: React.ReactNode
|
|
19
|
+
error?: TFieldValues
|
|
20
|
+
type?: 'text' | 'password' | 'email' | 'number'
|
|
21
|
+
register?: UseFormRegisterReturn<string>
|
|
22
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './TextField'
|
|
2
|
-
export type { TextFieldProps } from './TextField.types'
|
|
1
|
+
export { default } from './TextField'
|
|
2
|
+
export type { TextFieldProps } from './TextField.types'
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ThemeProvider as StyledTheme } from 'styled-components'
|
|
2
|
-
import { themes } from '@liguelead/foundation'
|
|
3
|
-
import { globalStyle as Reset } from './style'
|
|
4
|
-
|
|
5
|
-
interface ThemeProviderProps {
|
|
6
|
-
children: React.ReactNode
|
|
7
|
-
theme?: 'spa'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const ThemeProvider = ({ children, theme }: ThemeProviderProps) => {
|
|
11
|
-
const appliedTheme = theme ? themes[theme] : themes['spa']
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<StyledTheme theme={appliedTheme}>
|
|
15
|
-
<Reset />
|
|
16
|
-
{children}
|
|
17
|
-
</StyledTheme>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default ThemeProvider
|
|
1
|
+
import { ThemeProvider as StyledTheme } from 'styled-components'
|
|
2
|
+
import { themes } from '@liguelead/foundation'
|
|
3
|
+
import { globalStyle as Reset } from './style'
|
|
4
|
+
|
|
5
|
+
interface ThemeProviderProps {
|
|
6
|
+
children: React.ReactNode
|
|
7
|
+
theme?: 'spa'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ThemeProvider = ({ children, theme }: ThemeProviderProps) => {
|
|
11
|
+
const appliedTheme = theme ? themes[theme] : themes['spa']
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<StyledTheme theme={appliedTheme}>
|
|
15
|
+
<Reset />
|
|
16
|
+
{children}
|
|
17
|
+
</StyledTheme>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default ThemeProvider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ThemeProvider'
|
|
1
|
+
export { default } from './ThemeProvider'
|