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
67ae1a21
Commit
67ae1a21
authored
Aug 19, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dark mode for modal and inputs
parent
aea21e02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
Form.ts
theme/components/Form.ts
+2
-2
Modal.ts
theme/components/Modal.ts
+6
-5
getOutlinedFieldStyles.ts
theme/utils/getOutlinedFieldStyles.ts
+6
-4
No files found.
theme/components/Form.ts
View file @
67ae1a21
...
@@ -115,12 +115,12 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP
...
@@ -115,12 +115,12 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP
position
:
'
absolute
'
,
position
:
'
absolute
'
,
borderRadius
:
'
base
'
,
borderRadius
:
'
base
'
,
boxSizing
:
'
border-box
'
,
boxSizing
:
'
border-box
'
,
color
:
mode
(
'
gray.500
'
,
'
whiteAlpha.400
'
)(
props
)
,
color
:
'
gray.500
'
,
backgroundColor
:
'
transparent
'
,
backgroundColor
:
'
transparent
'
,
pointerEvents
:
'
none
'
,
pointerEvents
:
'
none
'
,
margin
:
0
,
margin
:
0
,
transformOrigin
:
'
top left
'
,
transformOrigin
:
'
top left
'
,
transition
:
'
font-size 200ms ease, line-height 200ms ease, padding 200ms ease, top 200ms ease, background-color 200ms ease 200ms
'
,
transition
Property
:
'
font-size, line-height, padding, top, background-color
'
,
},
},
'
input:not(:placeholder-shown) + label, textarea:not(:placeholder-shown) + label
'
:
{
'
input:not(:placeholder-shown) + label, textarea:not(:placeholder-shown) + label
'
:
{
...
activeLabelStyles
,
...
activeLabelStyles
,
...
...
theme/components/Modal.ts
View file @
67ae1a21
...
@@ -7,16 +7,17 @@ const baseStyleDialog: SystemStyleFunction = (props) => {
...
@@ -7,16 +7,17 @@ const baseStyleDialog: SystemStyleFunction = (props) => {
return
{
return
{
padding
:
8
,
padding
:
8
,
borderRadius
:
'
lg
'
,
borderRadius
:
'
lg
'
,
bg
:
mode
(
'
white
'
,
'
gray.
8
00
'
)(
props
),
bg
:
mode
(
'
white
'
,
'
gray.
9
00
'
)(
props
),
};
};
};
};
const
baseStyleHeader
=
{
const
baseStyleHeader
:
SystemStyleFunction
=
(
props
)
=>
(
{
padding
:
0
,
padding
:
0
,
marginBottom
:
8
,
marginBottom
:
8
,
fontSize
:
'
2xl
'
,
fontSize
:
'
2xl
'
,
lineHeight
:
10
,
lineHeight
:
10
,
};
color
:
mode
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
)(
props
),
});
const
baseStyleBody
=
{
const
baseStyleBody
=
{
padding
:
0
,
padding
:
0
,
...
@@ -34,7 +35,7 @@ const baseStyleCloseButton: SystemStyleFunction = (props) => {
...
@@ -34,7 +35,7 @@ const baseStyleCloseButton: SystemStyleFunction = (props) => {
right
:
8
,
right
:
8
,
height
:
10
,
height
:
10
,
width
:
10
,
width
:
10
,
color
:
mode
(
'
gray.700
'
,
'
gray.
6
00
'
)(
props
),
color
:
mode
(
'
gray.700
'
,
'
gray.
5
00
'
)(
props
),
_hover
:
{
color
:
'
blue.400
'
},
_hover
:
{
color
:
'
blue.400
'
},
_active
:
{
bg
:
'
none
'
},
_active
:
{
bg
:
'
none
'
},
};
};
...
@@ -45,7 +46,7 @@ const baseStyleOverlay = {
...
@@ -45,7 +46,7 @@ const baseStyleOverlay = {
const
baseStyle
:
PartsStyleFunction
<
typeof
parts
>
=
(
props
)
=>
({
const
baseStyle
:
PartsStyleFunction
<
typeof
parts
>
=
(
props
)
=>
({
dialog
:
baseStyleDialog
(
props
),
dialog
:
baseStyleDialog
(
props
),
header
:
baseStyleHeader
,
header
:
baseStyleHeader
(
props
)
,
body
:
baseStyleBody
,
body
:
baseStyleBody
,
footer
:
baseStyleFooter
,
footer
:
baseStyleFooter
,
closeButton
:
baseStyleCloseButton
(
props
),
closeButton
:
baseStyleCloseButton
(
props
),
...
...
theme/utils/getOutlinedFieldStyles.ts
View file @
67ae1a21
...
@@ -6,16 +6,17 @@ import getDefaultTransitionProps from './getDefaultTransitionProps';
...
@@ -6,16 +6,17 @@ import getDefaultTransitionProps from './getDefaultTransitionProps';
export
default
function
getOutlinedFieldStyles
(
props
:
StyleFunctionProps
)
{
export
default
function
getOutlinedFieldStyles
(
props
:
StyleFunctionProps
)
{
const
{
theme
}
=
props
;
const
{
theme
}
=
props
;
const
{
focusColor
:
fc
,
errorColor
:
ec
,
filledColor
:
flc
}
=
getDefaultFormColors
(
props
);
const
{
focusColor
:
fc
,
errorColor
:
ec
}
=
getDefaultFormColors
(
props
);
const
transitionProps
=
getDefaultTransitionProps
();
const
transitionProps
=
getDefaultTransitionProps
();
return
{
return
{
border
:
'
2px solid
'
,
border
:
'
2px solid
'
,
bg
:
'
inherit
'
,
bg
:
'
inherit
'
,
borderColor
:
getColor
(
theme
,
flc
),
// filled input
borderColor
:
mode
(
'
gray.300
'
,
'
gray.600
'
)(
props
),
...
transitionProps
,
...
transitionProps
,
_hover
:
{
_hover
:
{
borderColor
:
mode
(
'
gray.200
'
,
'
whiteAlpha.4
00
'
)(
props
),
borderColor
:
mode
(
'
gray.200
'
,
'
gray.5
00
'
)(
props
),
},
},
_readOnly
:
{
_readOnly
:
{
boxShadow
:
'
none !important
'
,
boxShadow
:
'
none !important
'
,
...
@@ -39,7 +40,8 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
...
@@ -39,7 +40,8 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
_placeholder
:
{
_placeholder
:
{
color
:
mode
(
'
blackAlpha.600
'
,
'
whiteAlpha.600
'
)(
props
),
color
:
mode
(
'
blackAlpha.600
'
,
'
whiteAlpha.600
'
)(
props
),
},
},
'
:placeholder-shown:not(:focus-visible):not(:hover)
'
:
{
borderColor
:
mode
(
'
blackAlpha.100
'
,
'
whiteAlpha.200
'
)(
props
)
},
// not filled input
'
:placeholder-shown:not(:focus-visible):not(:hover)
'
:
{
borderColor
:
mode
(
'
gray.100
'
,
'
gray.700
'
)(
props
)
},
'
:-webkit-autofill
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:hover
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:hover
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:focus
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
'
:-webkit-autofill:focus
'
:
{
transition
:
'
background-color 5000s ease-in-out 0s
'
},
...
...
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