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
eab4b2ab
Commit
eab4b2ab
authored
Mar 20, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update input styles
parent
4909deeb
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
50 additions
and
63 deletions
+50
-63
search.svg
icons/search.svg
+1
-1
field.tsx
toolkit/chakra/field.tsx
+2
-1
input-group.tsx
toolkit/chakra/input-group.tsx
+2
-2
input.tsx
toolkit/chakra/input.tsx
+3
-1
semanticTokens.ts
toolkit/theme/foundations/semanticTokens.ts
+4
-1
button.recipe.ts
toolkit/theme/recipes/button.recipe.ts
+1
-1
field.recipe.ts
toolkit/theme/recipes/field.recipe.ts
+1
-6
input.recipe.ts
toolkit/theme/recipes/input.recipe.ts
+7
-8
tooltip.recipe.ts
toolkit/theme/recipes/tooltip.recipe.ts
+1
-1
AddressFilter.tsx
ui/advancedFilter/filters/AddressFilter.tsx
+1
-1
CsvExportFormField.tsx
ui/csvExport/CsvExportFormField.tsx
+0
-1
RewardsButton.tsx
ui/rewards/RewardsButton.tsx
+1
-2
RewardsReadOnlyInputWithCopy.tsx
ui/rewards/RewardsReadOnlyInputWithCopy.tsx
+1
-1
LoginStepContent.tsx
ui/rewards/login/steps/LoginStepContent.tsx
+1
-1
FilterInput.tsx
ui/shared/filters/FilterInput.tsx
+1
-1
FormFieldColor.tsx
ui/shared/forms/fields/FormFieldColor.tsx
+1
-1
FormFieldText.tsx
ui/shared/forms/fields/FormFieldText.tsx
+1
-1
Field.tsx
ui/showcases/Field.tsx
+8
-8
Input.tsx
ui/showcases/Input.tsx
+2
-4
Link.tsx
ui/showcases/Link.tsx
+0
-3
NavLink.tsx
ui/snippets/navigation/vertical/NavLink.tsx
+0
-2
SearchBarInput.tsx
ui/snippets/searchBar/SearchBarInput.tsx
+7
-10
NetworkMenu.tsx
ui/snippets/topBar/NetworkMenu.tsx
+2
-1
UserProfileButton.tsx
ui/snippets/user/profile/UserProfileButton.tsx
+1
-2
UserWalletButton.tsx
ui/snippets/user/wallet/UserWalletButton.tsx
+1
-2
No files found.
icons/search.svg
View file @
eab4b2ab
<svg
viewBox=
"0 0 20 20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<svg
viewBox=
"0 0 20 20"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"m1
5.026 13.848 2.98 2.978a.834.834 0 1 1-1.18 1.18l-2.978-2.98a7.467 7.467 0 0 1-4.681 1.64c-4.14 0-7.5-3.36-7.5-7.5 0-4.14 3.36-7.5 7.5-7.5 4.14 0 7.5 3.36 7.5 7.5a7.466 7.466 0 0 1-1.641 4.681Zm-1.672-.619A5.814 5.814 0 0 0 15 9.167a5.832 5.832 0 0 0-5.833-5.834 5.831 5.831 0 0 0-5.834 5.834A5.832 5.832 0 0 0 9.167 15a5.814 5.814 0 0 0 4.062-1.646l.125-.125
Z"
fill=
"currentColor"
/>
<path
d=
"m1
4.048 13.074 2.464 2.463a.69.69 0 1 1-.975.975l-2.463-2.464A6.205 6.205 0 0 1 3 9.202 6.205 6.205 0 0 1 9.203 3a6.205 6.205 0 0 1 4.845 10.074Zm-1.382-.512a4.823 4.823 0 0 0-3.463-8.184 4.822 4.822 0 0 0-4.825 4.825 4.823 4.823 0 0 0 8.184 3.463l.104-.104
Z"
fill=
"currentColor"
/>
</svg>
</svg>
toolkit/chakra/field.tsx
View file @
eab4b2ab
...
@@ -7,12 +7,13 @@ import getComponentDisplayName from '../utils/getComponentDisplayName';
...
@@ -7,12 +7,13 @@ import getComponentDisplayName from '../utils/getComponentDisplayName';
import
type
{
InputProps
}
from
'
./input
'
;
import
type
{
InputProps
}
from
'
./input
'
;
import
type
{
InputGroupProps
}
from
'
./input-group
'
;
import
type
{
InputGroupProps
}
from
'
./input-group
'
;
export
interface
FieldProps
extends
Omit
<
ChakraField
.
RootProps
,
'
label
'
|
'
children
'
>
{
export
interface
FieldProps
extends
Omit
<
ChakraField
.
RootProps
,
'
label
'
|
'
children
'
|
'
size
'
>
{
label
?:
React
.
ReactNode
;
label
?:
React
.
ReactNode
;
helperText
?:
React
.
ReactNode
;
helperText
?:
React
.
ReactNode
;
errorText
?:
React
.
ReactNode
;
errorText
?:
React
.
ReactNode
;
optionalText
?:
React
.
ReactNode
;
optionalText
?:
React
.
ReactNode
;
children
:
React
.
ReactElement
<
InputProps
>
|
React
.
ReactElement
<
InputGroupProps
>
;
children
:
React
.
ReactElement
<
InputProps
>
|
React
.
ReactElement
<
InputGroupProps
>
;
size
?:
'
sm
'
|
'
md
'
|
'
lg
'
|
'
2xl
'
;
}
}
export
const
Field
=
React
.
forwardRef
<
HTMLDivElement
,
FieldProps
>
(
export
const
Field
=
React
.
forwardRef
<
HTMLDivElement
,
FieldProps
>
(
...
...
toolkit/chakra/input-group.tsx
View file @
eab4b2ab
...
@@ -59,7 +59,7 @@ export const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(
...
@@ -59,7 +59,7 @@ export const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(
return
(
return
(
<
Group
ref=
{
ref
}
w=
"100%"
{
...
rest
}
>
<
Group
ref=
{
ref
}
w=
"100%"
{
...
rest
}
>
{
startElement
&&
(
{
startElement
&&
(
<
InputElement
pointerEvents=
"none"
ref=
{
startElementRef
}
px=
{
0
}
{
...
startElementProps
}
>
<
InputElement
pointerEvents=
"none"
ref=
{
startElementRef
}
px=
{
0
}
color=
"gray.500"
{
...
startElementProps
}
>
{
startElement
}
{
startElement
}
</
InputElement
>
</
InputElement
>
)
}
)
}
...
@@ -76,7 +76,7 @@ export const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(
...
@@ -76,7 +76,7 @@ export const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(
});
});
})
}
})
}
{
endElement
&&
(
{
endElement
&&
(
<
InputElement
placement=
"end"
ref=
{
endElementRef
}
px=
{
0
}
{
...
endElementProps
}
>
<
InputElement
placement=
"end"
ref=
{
endElementRef
}
px=
{
0
}
color=
"gray.500"
{
...
endElementProps
}
>
{
endElement
}
{
endElement
}
</
InputElement
>
</
InputElement
>
)
}
)
}
...
...
toolkit/chakra/input.tsx
View file @
eab4b2ab
import
type
{
InputProps
as
ChakraInputProps
}
from
'
@chakra-ui/react
'
;
import
type
{
InputProps
as
ChakraInputProps
}
from
'
@chakra-ui/react
'
;
import
{
Input
as
ChakraInput
}
from
'
@chakra-ui/react
'
;
import
{
Input
as
ChakraInput
}
from
'
@chakra-ui/react
'
;
export
interface
InputProps
extends
ChakraInputProps
{}
export
interface
InputProps
extends
Omit
<
ChakraInputProps
,
'
size
'
>
{
size
?:
'
sm
'
|
'
md
'
|
'
lg
'
|
'
2xl
'
;
}
export
const
Input
=
ChakraInput
;
export
const
Input
=
ChakraInput
;
toolkit/theme/foundations/semanticTokens.ts
View file @
eab4b2ab
...
@@ -260,7 +260,10 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
...
@@ -260,7 +260,10 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
readOnly
:
{
value
:
{
_light
:
'
{colors.gray.200}
'
,
_dark
:
'
{colors.gray.800}
'
}
},
readOnly
:
{
value
:
{
_light
:
'
{colors.gray.200}
'
,
_dark
:
'
{colors.gray.800}
'
}
},
error
:
{
value
:
'
{colors.red.500}
'
},
error
:
{
value
:
'
{colors.red.500}
'
},
},
},
placeholder
:
{
value
:
'
{colors.gray.500}
'
},
placeholder
:
{
DEFAULT
:
{
value
:
'
{colors.gray.500}
'
},
error
:
{
value
:
'
{colors.red.500}
'
},
},
},
},
field
:
{
field
:
{
placeholder
:
{
placeholder
:
{
...
...
toolkit/theme/recipes/button.recipe.ts
View file @
eab4b2ab
...
@@ -264,7 +264,7 @@ export const recipe = defineRecipe({
...
@@ -264,7 +264,7 @@ export const recipe = defineRecipe({
size
:
{
size
:
{
'
2xs
'
:
{
px
:
2
,
h
:
5
,
minW
:
5
,
textStyle
:
'
xs
'
,
borderRadius
:
'
sm
'
,
gap
:
1
},
'
2xs
'
:
{
px
:
2
,
h
:
5
,
minW
:
5
,
textStyle
:
'
xs
'
,
borderRadius
:
'
sm
'
,
gap
:
1
},
xs
:
{
px
:
2
,
h
:
6
,
minW
:
6
,
textStyle
:
'
sm
'
,
borderRadius
:
'
sm
'
,
gap
:
1
},
xs
:
{
px
:
2
,
h
:
6
,
minW
:
6
,
textStyle
:
'
sm
'
,
borderRadius
:
'
sm
'
,
gap
:
1
},
sm
:
{
px
:
3
,
h
:
8
,
minW
:
8
,
textStyle
:
'
md
'
,
borderRadius
:
'
base
'
,
gap
:
1
},
sm
:
{
px
:
3
,
h
:
8
,
minW
:
8
,
textStyle
:
'
sm
'
,
borderRadius
:
'
base
'
,
gap
:
1
},
md
:
{
px
:
3
,
h
:
10
,
minW
:
10
,
textStyle
:
'
md
'
,
borderRadius
:
'
base
'
,
gap
:
2
,
'
& .chakra-spinner
'
:
{
'
--spinner-size
'
:
'
20px
'
}
},
md
:
{
px
:
3
,
h
:
10
,
minW
:
10
,
textStyle
:
'
md
'
,
borderRadius
:
'
base
'
,
gap
:
2
,
'
& .chakra-spinner
'
:
{
'
--spinner-size
'
:
'
20px
'
}
},
},
},
},
},
...
...
toolkit/theme/recipes/field.recipe.ts
View file @
eab4b2ab
...
@@ -79,11 +79,6 @@ export const recipe = defineSlotRecipe({
...
@@ -79,11 +79,6 @@ export const recipe = defineSlotRecipe({
fontSize
:
'
md
'
,
fontSize
:
'
md
'
,
},
},
},
},
xl
:
{
label
:
{
fontSize
:
'
md
'
,
},
},
// special size for textarea
// special size for textarea
'
2xl
'
:
{
'
2xl
'
:
{
label
:
{
label
:
{
...
@@ -113,7 +108,7 @@ export const recipe = defineSlotRecipe({
...
@@ -113,7 +108,7 @@ export const recipe = defineSlotRecipe({
compoundVariants
:
[
compoundVariants
:
[
{
{
size
:
'
xl
'
,
size
:
'
lg
'
,
floating
:
true
,
floating
:
true
,
css
:
{
css
:
{
label
:
{
label
:
{
...
...
toolkit/theme/recipes/input.recipe.ts
View file @
eab4b2ab
...
@@ -28,21 +28,16 @@ export const recipe = defineRecipe({
...
@@ -28,21 +28,16 @@ export const recipe = defineRecipe({
variants
:
{
variants
:
{
size
:
{
size
:
{
sm
:
{
sm
:
{
textStyle
:
'
md
'
,
textStyle
:
'
sm
'
,
px
:
'
2
'
,
px
:
'
2
'
,
'
--input-height
'
:
'
sizes.8
'
,
'
--input-height
'
:
'
sizes.8
'
,
},
},
md
:
{
md
:
{
textStyle
:
'
md
'
,
textStyle
:
'
sm
'
,
px
:
'
2
'
,
px
:
'
2
'
,
'
--input-height
'
:
'
sizes.10
'
,
'
--input-height
'
:
'
sizes.10
'
,
},
},
lg
:
{
lg
:
{
textStyle
:
'
md
'
,
px
:
'
3
'
,
'
--input-height
'
:
'
sizes.12
'
,
},
xl
:
{
textStyle
:
'
md
'
,
textStyle
:
'
md
'
,
px
:
'
4
'
,
px
:
'
4
'
,
'
--input-height
'
:
'
60px
'
,
'
--input-height
'
:
'
60px
'
,
...
@@ -69,6 +64,7 @@ export const recipe = defineRecipe({
...
@@ -69,6 +64,7 @@ export const recipe = defineRecipe({
},
},
_focus
:
{
_focus
:
{
borderColor
:
'
input.border.focus
'
,
borderColor
:
'
input.border.focus
'
,
boxShadow
:
'
size.md
'
,
_hover
:
{
_hover
:
{
borderColor
:
'
input.border.focus
'
,
borderColor
:
'
input.border.focus
'
,
},
},
...
@@ -91,6 +87,9 @@ export const recipe = defineRecipe({
...
@@ -91,6 +87,9 @@ export const recipe = defineRecipe({
},
},
_invalid
:
{
_invalid
:
{
borderColor
:
'
input.border.error
'
,
borderColor
:
'
input.border.error
'
,
_placeholder
:
{
color
:
'
input.placeholder.error
'
,
},
_hover
:
{
_hover
:
{
borderColor
:
'
input.border.error
'
,
borderColor
:
'
input.border.error
'
,
},
},
...
@@ -105,7 +104,7 @@ export const recipe = defineRecipe({
...
@@ -105,7 +104,7 @@ export const recipe = defineRecipe({
compoundVariants
:
[
compoundVariants
:
[
{
{
size
:
'
xl
'
,
size
:
'
lg
'
,
floating
:
true
,
floating
:
true
,
css
:
{
css
:
{
padding
:
'
26px 10px 10px 16px
'
,
padding
:
'
26px 10px 10px 16px
'
,
...
...
toolkit/theme/recipes/tooltip.recipe.ts
View file @
eab4b2ab
...
@@ -5,7 +5,7 @@ export const recipe = defineSlotRecipe({
...
@@ -5,7 +5,7 @@ export const recipe = defineSlotRecipe({
base
:
{
base
:
{
content
:
{
content
:
{
px
:
'
2
'
,
px
:
'
2
'
,
py
:
'
2
'
,
py
:
'
1
'
,
borderRadius
:
'
sm
'
,
borderRadius
:
'
sm
'
,
fontWeight
:
'
500
'
,
fontWeight
:
'
500
'
,
textStyle
:
'
sm
'
,
textStyle
:
'
sm
'
,
...
...
ui/advancedFilter/filters/AddressFilter.tsx
View file @
eab4b2ab
...
@@ -70,7 +70,7 @@ const AddressFilterInput = ({ address, mode, onModeChange, onChange, onClear, is
...
@@ -70,7 +70,7 @@ const AddressFilterInput = ({ address, mode, onModeChange, onChange, onClear, is
/>
/>
<
InputGroup
<
InputGroup
flexGrow=
{
1
}
flexGrow=
{
1
}
endElement=
{
<
ClearButton
onClick=
{
onClear
}
isDisabled=
{
!
address
}
/>
}
endElement=
{
<
ClearButton
onClick=
{
onClear
}
mx=
{
2
}
isDisabled=
{
!
address
}
/>
}
>
>
<
Input
value=
{
address
}
onChange=
{
onChange
}
placeholder=
"Smart contract / Address (0x...)*"
size=
"sm"
autoComplete=
"off"
/>
<
Input
value=
{
address
}
onChange=
{
onChange
}
placeholder=
"Smart contract / Address (0x...)*"
size=
"sm"
autoComplete=
"off"
/>
</
InputGroup
>
</
InputGroup
>
...
...
ui/csvExport/CsvExportFormField.tsx
View file @
eab4b2ab
...
@@ -42,7 +42,6 @@ const CsvExportFormField = ({ formApi, name }: Props) => {
...
@@ -42,7 +42,6 @@ const CsvExportFormField = ({ formApi, name }: Props) => {
placeholder=
{
capitalize
(
name
)
}
placeholder=
{
capitalize
(
name
)
}
required
required
rules=
{
{
validate
}
}
rules=
{
{
validate
}
}
size="xl"
maxW=
{
{
base
:
'
auto
'
,
lg
:
'
220px
'
}
}
maxW=
{
{
base
:
'
auto
'
,
lg
:
'
220px
'
}
}
/
>
/
>
);
);
...
...
ui/rewards/RewardsButton.tsx
View file @
eab4b2ab
...
@@ -38,9 +38,8 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
...
@@ -38,9 +38,8 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
{
...
(
apiToken
?
{
href
:
route
({
pathname
:
'/
account
/
merits
'
})
}
:
{})
}
{
...
(
apiToken
?
{
href
:
route
({
pathname
:
'/
account
/
merits
'
})
}
:
{})
}
onClick=
{
apiToken
?
undefined
:
openLoginModal
}
onClick=
{
apiToken
?
undefined
:
openLoginModal
}
onFocus=
{
handleFocus
}
onFocus=
{
handleFocus
}
fontSize=
"sm"
size=
{
size
}
size=
{
size
}
px=
{
{
base
:
'
10px
'
,
lg
:
!
isLoading
&&
Boolean
(
apiToken
)
?
2.5
:
4
}
}
px=
{
{
base
:
'
10px
'
,
lg
:
3
}
}
loading=
{
isLoading
}
loading=
{
isLoading
}
_hover=
{
{
_hover=
{
{
textDecoration
:
'
none
'
,
textDecoration
:
'
none
'
,
...
...
ui/rewards/RewardsReadOnlyInputWithCopy.tsx
View file @
eab4b2ab
...
@@ -17,7 +17,7 @@ type Props = {
...
@@ -17,7 +17,7 @@ type Props = {
const
RewardsReadOnlyInputWithCopy
=
({
label
,
value
,
className
,
isLoading
}:
Props
)
=>
{
const
RewardsReadOnlyInputWithCopy
=
({
label
,
value
,
className
,
isLoading
}:
Props
)
=>
{
return
(
return
(
<
Skeleton
loading=
{
isLoading
}
className=
{
className
}
>
<
Skeleton
loading=
{
isLoading
}
className=
{
className
}
>
<
Field
label=
{
label
}
floating
size=
"
xl
"
readOnly
>
<
Field
label=
{
label
}
floating
size=
"
lg
"
readOnly
>
<
InputGroup
endElement=
{
<
CopyToClipboard
text=
{
value
}
/>
}
endElementProps=
{
{
px
:
3
}
}
>
<
InputGroup
endElement=
{
<
CopyToClipboard
text=
{
value
}
/>
}
endElementProps=
{
{
px
:
3
}
}
>
<
Input
value=
{
value
}
fontWeight=
"500"
/>
<
Input
value=
{
value
}
fontWeight=
"500"
/>
</
InputGroup
>
</
InputGroup
>
...
...
ui/rewards/login/steps/LoginStepContent.tsx
View file @
eab4b2ab
...
@@ -147,7 +147,7 @@ const LoginStepContent = ({ goNext, closeModal, openAuthModal }: Props) => {
...
@@ -147,7 +147,7 @@ const LoginStepContent = ({ goNext, closeModal, openAuthModal }: Props) => {
label=
"Code"
label=
"Code"
floating
floating
id=
"referral-code"
id=
"referral-code"
size=
"
xl
"
size=
"
lg
"
mt=
{
3
}
mt=
{
3
}
invalid=
{
refCodeError
}
invalid=
{
refCodeError
}
helperText=
"The code should be in format XXXXXX"
helperText=
"The code should be in format XXXXXX"
...
...
ui/shared/filters/FilterInput.tsx
View file @
eab4b2ab
...
@@ -39,7 +39,7 @@ const FilterInput = ({ onChange, size = 'sm', placeholder, initialValue, type, n
...
@@ -39,7 +39,7 @@ const FilterInput = ({ onChange, size = 'sm', placeholder, initialValue, type, n
inputRef
?.
current
?.
focus
();
inputRef
?.
current
?.
focus
();
},
[
onChange
]);
},
[
onChange
]);
const
startElement
=
<
IconSvg
name=
"search"
color=
{
{
_light
:
'
blackAlpha.600
'
,
_dark
:
'
whiteAlpha.600
'
}
}
boxSize=
{
4
}
/>;
const
startElement
=
<
IconSvg
name=
"search"
boxSize=
{
5
}
/>;
const
endElement
=
<
ClearButton
onClick=
{
handleFilterQueryClear
}
isVisible=
{
filterQuery
.
length
>
0
}
/>;
const
endElement
=
<
ClearButton
onClick=
{
handleFilterQueryClear
}
isVisible=
{
filterQuery
.
length
>
0
}
/>;
...
...
ui/shared/forms/fields/FormFieldColor.tsx
View file @
eab4b2ab
...
@@ -31,7 +31,7 @@ const FormFieldColor = <
...
@@ -31,7 +31,7 @@ const FormFieldColor = <
onBlur
,
onBlur
,
group
,
group
,
inputProps
,
inputProps
,
size
=
'
xl
'
,
size
=
'
lg
'
,
disabled
,
disabled
,
sampleDefaultBgColor
,
sampleDefaultBgColor
,
...
restProps
...
restProps
...
...
ui/shared/forms/fields/FormFieldText.tsx
View file @
eab4b2ab
...
@@ -36,7 +36,7 @@ const FormFieldText = <
...
@@ -36,7 +36,7 @@ const FormFieldText = <
floating
:
floatingProp
,
floating
:
floatingProp
,
...
restProps
...
restProps
}
: Props
<
FormFields
,
Name
>
) =
>
{
}
: Props
<
FormFields
,
Name
>
) =
>
{
const
defaultSize
=
asComponent
===
'
Textarea
'
?
'
2xl
'
:
'
xl
'
;
const
defaultSize
=
asComponent
===
'
Textarea
'
?
'
2xl
'
:
'
lg
'
;
const
size
=
sizeProp
||
defaultSize
;
const
size
=
sizeProp
||
defaultSize
;
const
floating
=
floatingProp
!==
undefined
?
floatingProp
:
size
===
defaultSize
;
const
floating
=
floatingProp
!==
undefined
?
floatingProp
:
size
===
defaultSize
;
...
...
ui/showcases/Field.tsx
View file @
eab4b2ab
...
@@ -30,16 +30,16 @@ const FieldShowcase = () => {
...
@@ -30,16 +30,16 @@ const FieldShowcase = () => {
))
}
))
}
<
Sample
label=
"size: xl"
w=
"100%"
alignItems=
"flex-start"
>
<
Sample
label=
"size: xl"
w=
"100%"
alignItems=
"flex-start"
>
<
Field
label=
"Email"
required
floating
size=
"
xl
"
helperText=
"Helper text"
maxWidth=
"300px"
>
<
Field
label=
"Email"
required
floating
size=
"
lg
"
helperText=
"Helper text"
maxWidth=
"300px"
>
<
Input
/>
<
Input
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (disabled)"
required
floating
disabled
size=
"
xl
"
maxWidth=
"300px"
>
<
Field
label=
"Email (disabled)"
required
floating
disabled
size=
"
lg
"
maxWidth=
"300px"
>
<
Input
value=
"me@example.com"
/>
<
Input
value=
"me@example.com"
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (readOnly)"
required
floating
readOnly
size=
"
xl
"
maxWidth=
"300px"
>
<
Field
label=
"Email (readOnly)"
required
floating
readOnly
size=
"
lg
"
maxWidth=
"300px"
>
<
Input
value=
"me@example.com"
/>
<
Input
value=
"me@example.com"
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (invalid)"
required
floating
size=
"
xl
"
errorText=
"Something went wrong"
invalid
maxWidth=
"300px"
>
<
Field
label=
"Email (invalid)"
required
floating
size=
"
lg
"
errorText=
"Something went wrong"
invalid
maxWidth=
"300px"
>
<
Input
value=
"duck"
/>
<
Input
value=
"duck"
/>
</
Field
>
</
Field
>
</
Sample
>
</
Sample
>
...
@@ -62,16 +62,16 @@ const FieldShowcase = () => {
...
@@ -62,16 +62,16 @@ const FieldShowcase = () => {
</
Field
>
</
Field
>
</
Sample
>
</
Sample
>
<
Sample
label=
"floating label"
p=
{
4
}
bgColor=
{
{
_light
:
'
blackAlpha.200
'
,
_dark
:
'
whiteAlpha.200
'
}
}
alignItems=
"flex-start"
>
<
Sample
label=
"floating label"
p=
{
4
}
bgColor=
{
{
_light
:
'
blackAlpha.200
'
,
_dark
:
'
whiteAlpha.200
'
}
}
alignItems=
"flex-start"
>
<
Field
label=
"Email"
required
floating
size=
"
xl
"
helperText=
"Helper text"
maxWidth=
"300px"
>
<
Field
label=
"Email"
required
floating
size=
"
lg
"
helperText=
"Helper text"
maxWidth=
"300px"
>
<
Input
/>
<
Input
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (disabled)"
required
disabled
floating
size=
"
xl
"
maxWidth=
"300px"
>
<
Field
label=
"Email (disabled)"
required
disabled
floating
size=
"
lg
"
maxWidth=
"300px"
>
<
Input
value=
"me@example.com"
/>
<
Input
value=
"me@example.com"
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (readOnly)"
required
readOnly
floating
size=
"
xl
"
maxWidth=
"300px"
>
<
Field
label=
"Email (readOnly)"
required
readOnly
floating
size=
"
lg
"
maxWidth=
"300px"
>
<
Input
value=
"me@example.com"
/>
<
Input
value=
"me@example.com"
/>
</
Field
>
</
Field
>
<
Field
label=
"Email (invalid)"
required
floating
size=
"
xl
"
errorText=
"Something went wrong"
invalid
maxWidth=
"300px"
>
<
Field
label=
"Email (invalid)"
required
floating
size=
"
lg
"
errorText=
"Something went wrong"
invalid
maxWidth=
"300px"
>
<
Input
value=
"duck"
/>
<
Input
value=
"duck"
/>
</
Field
>
</
Field
>
</
Sample
>
</
Sample
>
...
...
ui/showcases/Input.tsx
View file @
eab4b2ab
...
@@ -23,9 +23,6 @@ const InputShowcase = () => {
...
@@ -23,9 +23,6 @@ const InputShowcase = () => {
<
Sample
label=
"size: lg"
>
<
Sample
label=
"size: lg"
>
<
Input
type=
"text"
placeholder=
"Name"
size=
"lg"
/>
<
Input
type=
"text"
placeholder=
"Name"
size=
"lg"
/>
</
Sample
>
</
Sample
>
<
Sample
label=
"size: xl"
>
<
Input
type=
"text"
placeholder=
"Name"
size=
"xl"
/>
</
Sample
>
</
SamplesStack
>
</
SamplesStack
>
</
Section
>
</
Section
>
...
@@ -36,6 +33,7 @@ const InputShowcase = () => {
...
@@ -36,6 +33,7 @@ const InputShowcase = () => {
<
Input
type=
"text"
placeholder=
"Name"
/>
<
Input
type=
"text"
placeholder=
"Name"
/>
<
Input
type=
"text"
placeholder=
"Name (disabled)"
disabled
/>
<
Input
type=
"text"
placeholder=
"Name (disabled)"
disabled
/>
<
Input
type=
"text"
placeholder=
"Name (readOnly)"
readOnly
/>
<
Input
type=
"text"
placeholder=
"Name (readOnly)"
readOnly
/>
<
Input
type=
"text"
placeholder=
"Name (invalid)"
data
-
invalid
/>
<
Input
type=
"text"
placeholder=
"Name (invalid)"
data
-
invalid
value=
"duck"
/>
<
Input
type=
"text"
placeholder=
"Name (invalid)"
data
-
invalid
value=
"duck"
/>
</
Sample
>
</
Sample
>
</
SamplesStack
>
</
SamplesStack
>
...
@@ -45,7 +43,7 @@ const InputShowcase = () => {
...
@@ -45,7 +43,7 @@ const InputShowcase = () => {
<
SectionHeader
>
Input group
</
SectionHeader
>
<
SectionHeader
>
Input group
</
SectionHeader
>
<
SamplesStack
>
<
SamplesStack
>
<
Sample
label=
"with end element"
>
<
Sample
label=
"with end element"
>
<
Field
label=
"Referral code"
required
floating
size=
"
xl
"
w=
"300px"
flexShrink=
{
0
}
>
<
Field
label=
"Referral code"
required
floating
size=
"
lg
"
w=
"300px"
flexShrink=
{
0
}
>
<
InputGroup
endElement=
{
<
IconSvg
name=
"copy"
boxSize=
{
5
}
/>
}
endElementProps=
{
{
px
:
3
}
}
>
<
InputGroup
endElement=
{
<
IconSvg
name=
"copy"
boxSize=
{
5
}
/>
}
endElementProps=
{
{
px
:
3
}
}
>
<
Input
/>
<
Input
/>
</
InputGroup
>
</
InputGroup
>
...
...
ui/showcases/Link.tsx
View file @
eab4b2ab
...
@@ -71,9 +71,6 @@ const LinkShowcase = () => {
...
@@ -71,9 +71,6 @@ const LinkShowcase = () => {
</
SamplesStack
>
</
SamplesStack
>
</
Section
>
</
Section
>
{
/* TODO @tom2drum links with icons */
}
<
span
>
??? links with icons
</
span
>
<
Section
>
<
Section
>
<
SectionHeader
>
Loading
</
SectionHeader
>
<
SectionHeader
>
Loading
</
SectionHeader
>
<
SamplesStack
>
<
SamplesStack
>
...
...
ui/snippets/navigation/vertical/NavLink.tsx
View file @
eab4b2ab
...
@@ -9,7 +9,6 @@ import useIsMobile from 'lib/hooks/useIsMobile';
...
@@ -9,7 +9,6 @@ import useIsMobile from 'lib/hooks/useIsMobile';
import
{
isInternalItem
}
from
'
lib/hooks/useNavItems
'
;
import
{
isInternalItem
}
from
'
lib/hooks/useNavItems
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Link
}
from
'
toolkit/chakra/link
'
;
import
{
Tooltip
}
from
'
toolkit/chakra/tooltip
'
;
import
{
Tooltip
}
from
'
toolkit/chakra/tooltip
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
LightningLabel
,
{
LIGHTNING_LABEL_CLASS_NAME
}
from
'
../LightningLabel
'
;
import
LightningLabel
,
{
LIGHTNING_LABEL_CLASS_NAME
}
from
'
../LightningLabel
'
;
import
NavLinkIcon
from
'
../NavLinkIcon
'
;
import
NavLinkIcon
from
'
../NavLinkIcon
'
;
...
@@ -73,7 +72,6 @@ const NavLink = ({ item, onClick, isCollapsed, isDisabled }: Props) => {
...
@@ -73,7 +72,6 @@ const NavLink = ({ item, onClick, isCollapsed, isDisabled }: Props) => {
display=
{
{
base
:
'
inline
'
,
lg
:
isExpanded
?
'
inline
'
:
'
none
'
,
xl
:
isCollapsed
?
'
none
'
:
'
inline
'
}
}
display=
{
{
base
:
'
inline
'
,
lg
:
isExpanded
?
'
inline
'
:
'
none
'
,
xl
:
isCollapsed
?
'
none
'
:
'
inline
'
}
}
>
>
<
span
>
{
item
.
text
}
</
span
>
<
span
>
{
item
.
text
}
</
span
>
{
!
isInternalLink
&&
<
IconSvg
name=
"link_external"
boxSize=
{
3
}
color=
"icon.externalLink"
verticalAlign=
"middle"
/>
}
</
chakra
.
span
>
</
chakra
.
span
>
{
isHighlighted
&&
(
{
isHighlighted
&&
(
<
LightningLabel
<
LightningLabel
...
...
ui/snippets/searchBar/SearchBarInput.tsx
View file @
eab4b2ab
...
@@ -104,26 +104,23 @@ const SearchBarInput = (
...
@@ -104,26 +104,23 @@ const SearchBarInput = (
const
startElement
=
(
const
startElement
=
(
<
IconSvg
<
IconSvg
name=
"search"
name=
"search"
boxSize=
{
{
base
:
isHomepage
?
6
:
4
,
lg
:
6
}
}
boxSize=
{
5
}
color=
{
{
_light
:
'
blackAlpha.600
'
,
_dark
:
'
whiteAlpha.600
'
}
}
ml=
{
{
base
:
2
,
lg
:
isHomepage
?
4
:
2
}
}
ml=
{
{
base
:
3
,
lg
:
4
}
}
mr=
{
2
}
mr=
"10px"
/>
/>
);
);
const
endElement
=
(
const
endElement
=
(
<>
<>
<
ClearButton
onClick=
{
onClear
}
isVisible=
{
value
.
length
>
0
}
/>
<
ClearButton
onClick=
{
onClear
}
isVisible=
{
value
.
length
>
0
}
mx=
{
2
}
/>
{
!
isMobile
&&
(
{
!
isMobile
&&
(
<
Center
<
Center
boxSize=
"20px"
boxSize=
"20px"
my=
"2px"
mr=
{
{
base
:
2
,
lg
:
isHomepage
?
4
:
2
}
}
mr=
{
3
}
ml=
{
2
}
borderRadius=
"sm"
borderRadius=
"sm"
borderWidth=
"1px"
borderWidth=
"1px"
borderColor=
"gray.
4
00"
borderColor=
"gray.
5
00"
color=
"gray.
4
00"
color=
"gray.
5
00"
>
>
/
/
</
Center
>
</
Center
>
...
...
ui/snippets/topBar/NetworkMenu.tsx
View file @
eab4b2ab
...
@@ -23,8 +23,9 @@ const NetworkMenu = () => {
...
@@ -23,8 +23,9 @@ const NetworkMenu = () => {
aria
-
label=
"Network menu"
aria
-
label=
"Network menu"
borderRadius=
"sm"
borderRadius=
"sm"
onClick=
{
menu
.
onToggle
}
onClick=
{
menu
.
onToggle
}
p=
{
0.5
}
>
>
<
IconSvg
name=
"networks"
/>
<
IconSvg
name=
"networks"
boxSize=
"full"
/>
</
IconButton
>
</
IconButton
>
</
PopoverTrigger
>
</
PopoverTrigger
>
<
NetworkMenuContentDesktop
items=
{
menu
.
data
}
tabs=
{
menu
.
availableTabs
}
/>
<
NetworkMenuContentDesktop
items=
{
menu
.
data
}
tabs=
{
menu
.
availableTabs
}
/>
...
...
ui/snippets/user/profile/UserProfileButton.tsx
View file @
eab4b2ab
...
@@ -84,8 +84,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending, ..
...
@@ -84,8 +84,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending, ..
onFocus=
{
handleFocus
}
onFocus=
{
handleFocus
}
selected=
{
dataExists
}
selected=
{
dataExists
}
highlighted=
{
isAutoConnectDisabled
}
highlighted=
{
isAutoConnectDisabled
}
textStyle=
"sm"
px=
{
{
base
:
2.5
,
lg
:
3
}
}
px=
{
dataExists
?
2.5
:
4
}
fontWeight=
{
dataExists
?
700
:
600
}
fontWeight=
{
dataExists
?
700
:
600
}
loading=
{
isButtonLoading
}
loading=
{
isButtonLoading
}
{
...
rest
}
{
...
rest
}
...
...
ui/snippets/user/wallet/UserWalletButton.tsx
View file @
eab4b2ab
...
@@ -49,8 +49,7 @@ const UserWalletButton = ({ size, variant, isPending, isAutoConnectDisabled, add
...
@@ -49,8 +49,7 @@ const UserWalletButton = ({ size, variant, isPending, isAutoConnectDisabled, add
variant=
{
variant
}
variant=
{
variant
}
selected=
{
Boolean
(
address
)
}
selected=
{
Boolean
(
address
)
}
highlighted=
{
isAutoConnectDisabled
}
highlighted=
{
isAutoConnectDisabled
}
textStyle=
"sm"
px=
{
{
base
:
2.5
,
lg
:
3
}
}
px=
{
address
?
2.5
:
4
}
fontWeight=
{
address
?
700
:
600
}
fontWeight=
{
address
?
700
:
600
}
loading=
{
isPending
}
loading=
{
isPending
}
loadingText=
{
isMobile
?
undefined
:
'
Connecting
'
}
loadingText=
{
isMobile
?
undefined
:
'
Connecting
'
}
...
...
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