Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
79044062
Commit
79044062
authored
Dec 09, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up packages versions
parent
b22dd2d1
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
750 additions
and
679 deletions
+750
-679
package.json
package.json
+9
-9
Form.ts
theme/components/Form.ts
+7
-7
FormLabel.ts
theme/components/FormLabel.ts
+2
-2
getDefaultFormColors.ts
theme/utils/getDefaultFormColors.ts
+2
-1
getOutlinedFieldStyles.ts
theme/utils/getOutlinedFieldStyles.ts
+3
-3
yarn.lock
yarn.lock
+727
-657
No files found.
package.json
View file @
79044062
...
@@ -27,13 +27,13 @@
...
@@ -27,13 +27,13 @@
"test:jest:watch"
:
"jest --watch"
"test:jest:watch"
:
"jest --watch"
},
},
"dependencies"
:
{
"dependencies"
:
{
"
@chakra-ui/react
"
:
"
2.
3.1
"
,
"
@chakra-ui/react
"
:
"
2.
4.3
"
,
"
@chakra-ui/theme-tools
"
:
"
^2.0.
2
"
,
"
@chakra-ui/theme-tools
"
:
"
^2.0.
14
"
,
"
@emotion/react
"
:
"
^11
"
,
"
@emotion/react
"
:
"
^11
.10.4
"
,
"
@emotion/styled
"
:
"
^11
"
,
"
@emotion/styled
"
:
"
^11
.10.4
"
,
"
@sentry/nextjs
"
:
"
^7.12.1
"
,
"
@sentry/nextjs
"
:
"
^7.12.1
"
,
"
@sentry/react
"
:
"
^7.
13
.0
"
,
"
@sentry/react
"
:
"
^7.
24
.0
"
,
"
@sentry/tracing
"
:
"
^7.
13
.0
"
,
"
@sentry/tracing
"
:
"
^7.
24
.0
"
,
"
@tanstack/react-query
"
:
"
^4.0.10
"
,
"
@tanstack/react-query
"
:
"
^4.0.10
"
,
"
@tanstack/react-query-devtools
"
:
"
^4.0.10
"
,
"
@tanstack/react-query-devtools
"
:
"
^4.0.10
"
,
"
@types/react-scroll
"
:
"
^1.8.4
"
,
"
@types/react-scroll
"
:
"
^1.8.4
"
,
...
@@ -41,15 +41,15 @@
...
@@ -41,15 +41,15 @@
"
d3
"
:
"
^7.6.1
"
,
"
d3
"
:
"
^7.6.1
"
,
"
dayjs
"
:
"
^1.11.5
"
,
"
dayjs
"
:
"
^1.11.5
"
,
"
ethers
"
:
"
^5.7.1
"
,
"
ethers
"
:
"
^5.7.1
"
,
"
framer-motion
"
:
"
^6
"
,
"
framer-motion
"
:
"
^6
.5.1
"
,
"
lodash
"
:
"
^4.0.0
"
,
"
lodash
"
:
"
^4.0.0
"
,
"
next
"
:
"
12.2.5
"
,
"
next
"
:
"
12.2.5
"
,
"
node-fetch
"
:
"
^3.2.9
"
,
"
node-fetch
"
:
"
^3.2.9
"
,
"
phoenix
"
:
"
^1.6.15
"
,
"
phoenix
"
:
"
^1.6.15
"
,
"
pino-http
"
:
"
^8.2.1
"
,
"
pino-http
"
:
"
^8.2.1
"
,
"
pino-pretty
"
:
"
^9.1.1
"
,
"
pino-pretty
"
:
"
^9.1.1
"
,
"
react
"
:
"
18.
1
.0
"
,
"
react
"
:
"
18.
2
.0
"
,
"
react-dom
"
:
"
18.
1
.0
"
,
"
react-dom
"
:
"
18.
2
.0
"
,
"
react-hook-form
"
:
"
^7.33.1
"
,
"
react-hook-form
"
:
"
^7.33.1
"
,
"
react-identicons
"
:
"
^1.2.5
"
,
"
react-identicons
"
:
"
^1.2.5
"
,
"
react-jazzicon
"
:
"
^1.0.4
"
,
"
react-jazzicon
"
:
"
^1.0.4
"
,
...
...
theme/components/Form.ts
View file @
79044062
import
{
formAnatomy
as
parts
}
from
'
@chakra-ui/anatomy
'
;
import
{
formAnatomy
as
parts
}
from
'
@chakra-ui/anatomy
'
;
import
{
createMultiStyleConfigHelpers
}
from
'
@chakra-ui/styled-system
'
;
import
{
createMultiStyleConfigHelpers
}
from
'
@chakra-ui/styled-system
'
;
import
type
{
StyleFunctionProps
}
from
'
@chakra-ui/theme-tools
'
;
import
type
{
StyleFunctionProps
}
from
'
@chakra-ui/theme-tools
'
;
import
{
getColor
,
mode
}
from
'
@chakra-ui/theme-tools
'
;
import
{
getColor
}
from
'
@chakra-ui/theme-tools
'
;
import
getDefaultFormColors
from
'
../utils/getDefaultFormColors
'
;
import
getDefaultFormColors
from
'
../utils/getDefaultFormColors
'
;
import
FormLabel
from
'
./FormLabel
'
;
import
FormLabel
from
'
./FormLabel
'
;
...
@@ -13,7 +13,7 @@ const { definePartsStyle, defineMultiStyleConfig } =
...
@@ -13,7 +13,7 @@ const { definePartsStyle, defineMultiStyleConfig } =
function
getFloatingVariantStylesForSize
(
size
:
'
md
'
|
'
lg
'
,
props
:
StyleFunctionProps
)
{
function
getFloatingVariantStylesForSize
(
size
:
'
md
'
|
'
lg
'
,
props
:
StyleFunctionProps
)
{
const
{
theme
}
=
props
;
const
{
theme
}
=
props
;
const
{
focus
Color
:
fc
,
errorColor
:
ec
}
=
getDefaultFormColors
(
props
);
const
{
focus
PlaceholderColor
,
errorColor
}
=
getDefaultFormColors
(
props
);
const
activeLabelStyles
=
{
const
activeLabelStyles
=
{
...
FormLabel
.
variants
?.
floating
?.(
props
).
_focusWithin
,
...
FormLabel
.
variants
?.
floating
?.(
props
).
_focusWithin
,
...
@@ -62,7 +62,7 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction
...
@@ -62,7 +62,7 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction
label
:
FormLabel
.
sizes
?.[
size
](
props
)
||
{},
label
:
FormLabel
.
sizes
?.[
size
](
props
)
||
{},
'
input:not(:placeholder-shown) + label, textarea:not(:placeholder-shown) + label
'
:
activeLabelStyles
,
'
input:not(:placeholder-shown) + label, textarea:not(:placeholder-shown) + label
'
:
activeLabelStyles
,
'
input[aria-invalid=true] + label, textarea[aria-invalid=true] + label
'
:
{
'
input[aria-invalid=true] + label, textarea[aria-invalid=true] + label
'
:
{
color
:
getColor
(
theme
,
e
c
),
color
:
getColor
(
theme
,
e
rrorColor
),
},
},
// input styles
// input styles
...
@@ -78,20 +78,20 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction
...
@@ -78,20 +78,20 @@ function getFloatingVariantStylesForSize(size: 'md' | 'lg', props: StyleFunction
// indicator styles
// indicator styles
'
input:not(:placeholder-shown) + label .chakra-form__required-indicator, textarea:not(:placeholder-shown) + label .chakra-form__required-indicator
'
:
{
'
input:not(:placeholder-shown) + label .chakra-form__required-indicator, textarea:not(:placeholder-shown) + label .chakra-form__required-indicator
'
:
{
color
:
getColor
(
theme
,
f
c
),
color
:
getColor
(
theme
,
f
ocusPlaceholderColor
),
},
},
'
input[aria-invalid=true] + label .chakra-form__required-indicator, textarea[aria-invalid=true] + label .chakra-form__required-indicator
'
:
{
'
input[aria-invalid=true] + label .chakra-form__required-indicator, textarea[aria-invalid=true] + label .chakra-form__required-indicator
'
:
{
color
:
getColor
(
theme
,
e
c
),
color
:
getColor
(
theme
,
e
rrorColor
),
},
},
},
},
};
};
}
}
const
baseStyle
=
definePartsStyle
((
props
)
=>
{
const
baseStyle
=
definePartsStyle
(()
=>
{
return
{
return
{
requiredIndicator
:
{
requiredIndicator
:
{
marginStart
:
0
,
marginStart
:
0
,
color
:
mode
(
'
gray.500
'
,
'
whiteAlpha.400
'
)(
props
)
,
color
:
'
gray.500
'
,
},
},
};
};
});
});
...
...
theme/components/FormLabel.ts
View file @
79044062
...
@@ -19,7 +19,7 @@ const baseStyle = defineStyle({
...
@@ -19,7 +19,7 @@ const baseStyle = defineStyle({
const
variantFloating
=
defineStyle
((
props
)
=>
{
const
variantFloating
=
defineStyle
((
props
)
=>
{
const
{
theme
,
backgroundColor
}
=
props
;
const
{
theme
,
backgroundColor
}
=
props
;
const
{
focus
Color
:
fc
}
=
getDefaultFormColors
(
props
);
const
{
focus
PlaceholderColor
}
=
getDefaultFormColors
(
props
);
const
bc
=
backgroundColor
||
mode
(
'
white
'
,
'
black
'
)(
props
);
const
bc
=
backgroundColor
||
mode
(
'
white
'
,
'
black
'
)(
props
);
return
{
return
{
...
@@ -40,7 +40,7 @@ const variantFloating = defineStyle((props) => {
...
@@ -40,7 +40,7 @@ const variantFloating = defineStyle((props) => {
textOverflow
:
'
ellipsis
'
,
textOverflow
:
'
ellipsis
'
,
_focusWithin
:
{
_focusWithin
:
{
backgroundColor
:
bc
,
backgroundColor
:
bc
,
color
:
getColor
(
theme
,
f
c
),
color
:
getColor
(
theme
,
f
ocusPlaceholderColor
),
fontSize
:
'
xs
'
,
fontSize
:
'
xs
'
,
lineHeight
:
'
16px
'
,
lineHeight
:
'
16px
'
,
borderTopRightRadius
:
'
none
'
,
borderTopRightRadius
:
'
none
'
,
...
...
theme/utils/getDefaultFormColors.ts
View file @
79044062
...
@@ -4,7 +4,8 @@ import { mode } from '@chakra-ui/theme-tools';
...
@@ -4,7 +4,8 @@ import { mode } from '@chakra-ui/theme-tools';
export
default
function
getDefaultFormColors
(
props
:
StyleFunctionProps
)
{
export
default
function
getDefaultFormColors
(
props
:
StyleFunctionProps
)
{
const
{
focusBorderColor
:
fc
,
errorBorderColor
:
ec
,
filledBorderColor
:
flc
}
=
props
;
const
{
focusBorderColor
:
fc
,
errorBorderColor
:
ec
,
filledBorderColor
:
flc
}
=
props
;
return
{
return
{
focusColor
:
fc
||
mode
(
'
brand.700
'
,
'
brand.300
'
)(
props
),
focusBorderColor
:
fc
||
mode
(
'
blue.500
'
,
'
blue.300
'
)(
props
),
focusPlaceholderColor
:
fc
||
'
gray.500
'
,
errorColor
:
ec
||
mode
(
'
red.400
'
,
'
red.300
'
)(
props
),
errorColor
:
ec
||
mode
(
'
red.400
'
,
'
red.300
'
)(
props
),
filledColor
:
flc
||
mode
(
'
gray.300
'
,
'
gray.600
'
)(
props
),
filledColor
:
flc
||
mode
(
'
gray.300
'
,
'
gray.600
'
)(
props
),
};
};
...
...
theme/utils/getOutlinedFieldStyles.ts
View file @
79044062
...
@@ -6,7 +6,7 @@ import getDefaultTransitionProps from './getDefaultTransitionProps';
...
@@ -6,7 +6,7 @@ import getDefaultTransitionProps from './getDefaultTransitionProps';
export
default
function
getOutlinedFieldStyles
(
props
:
StyleFunctionProps
)
{
export
default
function
getOutlinedFieldStyles
(
props
:
StyleFunctionProps
)
{
const
{
theme
,
borderColor
}
=
props
;
const
{
theme
,
borderColor
}
=
props
;
const
{
focus
Color
:
fc
,
errorColor
:
ec
}
=
getDefaultFormColors
(
props
);
const
{
focus
BorderColor
,
errorColor
}
=
getDefaultFormColors
(
props
);
const
transitionProps
=
getDefaultTransitionProps
();
const
transitionProps
=
getDefaultTransitionProps
();
return
{
return
{
...
@@ -32,12 +32,12 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
...
@@ -32,12 +32,12 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
},
},
},
},
_invalid
:
{
_invalid
:
{
borderColor
:
getColor
(
theme
,
e
c
),
borderColor
:
getColor
(
theme
,
e
rrorColor
),
boxShadow
:
`none`
,
boxShadow
:
`none`
,
},
},
_focusVisible
:
{
_focusVisible
:
{
zIndex
:
1
,
zIndex
:
1
,
borderColor
:
getColor
(
theme
,
f
c
),
borderColor
:
getColor
(
theme
,
f
ocusBorderColor
),
boxShadow
:
'
md
'
,
boxShadow
:
'
md
'
,
},
},
_placeholder
:
{
_placeholder
:
{
...
...
yarn.lock
View file @
79044062
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment