@interlay/hooks
Advanced tools
Comparing version
@@ -0,1 +1,2 @@ | ||
import { Spacing } from '@interlay/theme'; | ||
import * as react from 'react'; | ||
@@ -10,623 +11,2 @@ import { FocusEvent, Key, RefObject, Ref } from 'react'; | ||
type BreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; | ||
declare const base: { | ||
breakpoints: { | ||
values: Record<BreakPoints, number>; | ||
up: (key: BreakPoints) => string; | ||
down: (key: BreakPoints) => string; | ||
}; | ||
colors: { | ||
textPrimary: string; | ||
textSecondary: string; | ||
textTertiary: string; | ||
bgPrimary: string; | ||
warn: string; | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
font: { | ||
primary: string; | ||
}; | ||
fontWeight: { | ||
light: string; | ||
book: string; | ||
medium: string; | ||
semibold: string; | ||
bold: string; | ||
extrabold: string; | ||
}; | ||
text: { | ||
xs: string; | ||
s: string; | ||
base: string; | ||
lg: string; | ||
xl: string; | ||
xl2: string; | ||
xl3: string; | ||
xl4: string; | ||
xl5: string; | ||
xl6: string; | ||
}; | ||
lineHeight: { | ||
base: string; | ||
s: string; | ||
lg: string; | ||
xl: string; | ||
}; | ||
spacing: { | ||
spacing0: string; | ||
spacing1: string; | ||
spacing2: string; | ||
spacing3: string; | ||
spacing4: string; | ||
spacing5: string; | ||
spacing6: string; | ||
spacing8: string; | ||
spacing10: string; | ||
spacing12: string; | ||
spacing14: string; | ||
spacing16: string; | ||
spacing18: string; | ||
spacing28: string; | ||
}; | ||
rounded: { | ||
sm: string; | ||
rg: string; | ||
md: string; | ||
lg: string; | ||
xl: string; | ||
full: string; | ||
}; | ||
border: { | ||
default: string; | ||
hover: string; | ||
focus: string; | ||
disabled: string; | ||
error: string; | ||
}; | ||
outline: { | ||
default: string; | ||
}; | ||
boxShadow: { | ||
default: string; | ||
focus: string; | ||
}; | ||
input: { | ||
color: string; | ||
background: string; | ||
height: string; | ||
default: { | ||
border: string; | ||
}; | ||
hover: { | ||
border: string; | ||
}; | ||
focus: { | ||
border: string; | ||
boxShadow: string; | ||
}; | ||
error: { | ||
color: string; | ||
border: string; | ||
}; | ||
disabled: { | ||
color: string; | ||
bg: string; | ||
border: string; | ||
}; | ||
helperText: { | ||
error: { | ||
color: string; | ||
}; | ||
}; | ||
small: { | ||
text: string; | ||
maxHeight: string; | ||
weight: string; | ||
}; | ||
medium: { | ||
text: string; | ||
maxHeight: string; | ||
weight: string; | ||
}; | ||
large: { | ||
text: string; | ||
maxHeight: string; | ||
weight: string; | ||
}; | ||
overflow: { | ||
large: { | ||
text: string; | ||
}; | ||
}; | ||
paddingX: { | ||
s: string; | ||
md: string; | ||
lg: string; | ||
xl: string; | ||
xl2: string; | ||
}; | ||
}; | ||
label: { | ||
text: string; | ||
}; | ||
tokenInput: { | ||
endAdornment: { | ||
bg: string; | ||
}; | ||
list: { | ||
item: { | ||
default: { | ||
text: string; | ||
}; | ||
selected: { | ||
text: string; | ||
}; | ||
}; | ||
}; | ||
}; | ||
card: { | ||
outlined: { | ||
border: string; | ||
}; | ||
bg: { | ||
primary: string; | ||
secondary: string; | ||
tertiary: string; | ||
}; | ||
}; | ||
cta: { | ||
primary: { | ||
bg: string; | ||
bgHover: string; | ||
text: string; | ||
}; | ||
secondary: { | ||
bg: string; | ||
text: string; | ||
}; | ||
outlined: { | ||
text: string; | ||
border: string; | ||
bgHover: string; | ||
}; | ||
text: { | ||
text: string; | ||
bgHover: string; | ||
}; | ||
'x-small': { | ||
padding: string; | ||
text: string; | ||
lineHeight: string; | ||
height: string; | ||
}; | ||
small: { | ||
padding: string; | ||
text: string; | ||
lineHeight: string; | ||
height: string; | ||
}; | ||
medium: { | ||
padding: string; | ||
text: string; | ||
lineHeight: string; | ||
height: string; | ||
}; | ||
large: { | ||
padding: string; | ||
text: string; | ||
lineHeight: string; | ||
height: string; | ||
}; | ||
}; | ||
table: { | ||
border: string; | ||
header: { | ||
bg: string; | ||
}; | ||
row: { | ||
odd: { | ||
bg: string; | ||
}; | ||
even: { | ||
bg: string; | ||
}; | ||
bgHover: string; | ||
}; | ||
}; | ||
alert: { | ||
status: { | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
bg: { | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
}; | ||
transition: { | ||
default: string; | ||
duration: { | ||
duration100: number; | ||
duration150: number; | ||
duration250: number; | ||
}; | ||
}; | ||
tabs: { | ||
bg: string; | ||
color: string; | ||
active: { | ||
color: string; | ||
bg: string; | ||
}; | ||
border: string; | ||
small: { | ||
wrapper: { | ||
padding: string; | ||
}; | ||
tab: { | ||
padding: string; | ||
text: string; | ||
fontWeight: string; | ||
}; | ||
selection: { | ||
padding: string; | ||
}; | ||
}; | ||
medium: { | ||
wrapper: { | ||
padding: string; | ||
}; | ||
tab: { | ||
padding: string; | ||
text: string; | ||
fontWeight: string; | ||
}; | ||
selection: { | ||
padding: string; | ||
}; | ||
}; | ||
large: { | ||
wrapper: { | ||
padding: string; | ||
}; | ||
tab: { | ||
padding: string; | ||
text: string; | ||
fontWeight: string; | ||
}; | ||
selection: { | ||
padding: string; | ||
}; | ||
}; | ||
}; | ||
meter: { | ||
bar: { | ||
status: { | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
primary: { | ||
bg: string; | ||
}; | ||
secondary: { | ||
bg: string; | ||
}; | ||
height: string; | ||
radius: string; | ||
indicator: { | ||
border: { | ||
left: string; | ||
right: string; | ||
bottom: string; | ||
}; | ||
color: string; | ||
primary: { | ||
marginTop: string; | ||
}; | ||
secondary: { | ||
marginTop: string; | ||
}; | ||
}; | ||
separator: { | ||
color: string; | ||
}; | ||
}; | ||
}; | ||
progressBar: { | ||
bg: string; | ||
}; | ||
spinner: { | ||
primary: { | ||
color: string; | ||
bg: string; | ||
}; | ||
secondary: { | ||
color: string; | ||
bg: string; | ||
}; | ||
outlined: { | ||
color: string; | ||
bg: string; | ||
}; | ||
text: { | ||
color: string; | ||
bg: string; | ||
}; | ||
sizes: { | ||
xs: string; | ||
s: string; | ||
md: string; | ||
lg: string; | ||
xl: string; | ||
xl2: string; | ||
}; | ||
}; | ||
progress: { | ||
circle: { | ||
mask: string; | ||
fill: string; | ||
}; | ||
}; | ||
overlay: { | ||
placement: { | ||
transform: string; | ||
}; | ||
bg: string; | ||
}; | ||
transaction: { | ||
status: { | ||
color: { | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
bg: { | ||
error: string; | ||
warning: string; | ||
success: string; | ||
}; | ||
}; | ||
}; | ||
coinIcon: { | ||
small: { | ||
width: string; | ||
}; | ||
medium: { | ||
width: string; | ||
}; | ||
large: { | ||
width: string; | ||
}; | ||
}; | ||
dialog: { | ||
small: { | ||
width: string; | ||
header: { | ||
paddingTop: string; | ||
paddingBottom: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
divider: { | ||
marginX: string; | ||
marginBottom: string; | ||
}; | ||
body: { | ||
paddingY: string; | ||
paddingX: string; | ||
}; | ||
footer: { | ||
paddingTop: string; | ||
paddingBottom: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
}; | ||
medium: { | ||
width: string; | ||
header: { | ||
paddingY: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
divider: { | ||
marginX: string; | ||
marginBottom: string; | ||
}; | ||
body: { | ||
paddingY: string; | ||
paddingX: string; | ||
}; | ||
footer: { | ||
paddingTop: string; | ||
paddingBottom: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
}; | ||
large: { | ||
width: string; | ||
header: { | ||
paddingY: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
divider: { | ||
marginX: string; | ||
marginBottom: string; | ||
}; | ||
body: { | ||
paddingY: string; | ||
paddingX: string; | ||
}; | ||
footer: { | ||
paddingTop: string; | ||
paddingBottom: string; | ||
paddingX: string; | ||
padding: string; | ||
}; | ||
}; | ||
closeBtn: { | ||
zIndex: number; | ||
}; | ||
}; | ||
modal: { | ||
maxHeight: string; | ||
zIndex: number; | ||
underlay: { | ||
zIndex: number; | ||
bg: string; | ||
transition: { | ||
entering: string; | ||
exiting: string; | ||
}; | ||
}; | ||
transition: { | ||
entering: string; | ||
exiting: string; | ||
}; | ||
}; | ||
switch: { | ||
unchecked: { | ||
bg: string; | ||
}; | ||
checked: { | ||
bg: string; | ||
}; | ||
indicator: { | ||
bg: string; | ||
}; | ||
}; | ||
tooltip: { | ||
bg: string; | ||
offset: string; | ||
tip: { | ||
bg: string; | ||
width: string; | ||
}; | ||
}; | ||
divider: { | ||
bg: string; | ||
size: { | ||
small: string; | ||
medium: string; | ||
large: string; | ||
}; | ||
}; | ||
icon: { | ||
sizes: { | ||
xs: string; | ||
s: string; | ||
md: string; | ||
lg: string; | ||
xl: string; | ||
xl2: string; | ||
}; | ||
fallback: { | ||
color: string; | ||
stroke: string; | ||
}; | ||
}; | ||
list: { | ||
text: string; | ||
primary: { | ||
bg: string; | ||
border: string; | ||
rounded: string; | ||
}; | ||
secondary: { | ||
bg: string; | ||
border: string; | ||
rounded: string; | ||
}; | ||
card: { | ||
bg: string; | ||
border: string; | ||
rounded: string; | ||
}; | ||
item: { | ||
primary: { | ||
bg: string; | ||
border: string; | ||
hover: { | ||
bg: string; | ||
}; | ||
rounded: string; | ||
selected: { | ||
bg: string; | ||
}; | ||
}; | ||
secondary: { | ||
bg: string; | ||
border: string; | ||
hover: { | ||
bg: string; | ||
}; | ||
rounded: string; | ||
selected: { | ||
bg: string; | ||
}; | ||
}; | ||
card: { | ||
bg: string; | ||
border: string; | ||
hover: { | ||
bg: string; | ||
}; | ||
rounded: string; | ||
selected: { | ||
bg: string; | ||
}; | ||
}; | ||
}; | ||
}; | ||
select: { | ||
placeholder: string; | ||
color: string; | ||
size: { | ||
small: { | ||
padding: string; | ||
text: string; | ||
maxHeight: string; | ||
}; | ||
medium: { | ||
padding: string; | ||
text: string; | ||
maxHeight: string; | ||
}; | ||
large: { | ||
padding: string; | ||
text: string; | ||
maxHeight: string; | ||
}; | ||
}; | ||
}; | ||
slider: { | ||
thumb: { | ||
size: string; | ||
bg: string; | ||
hover: { | ||
bg: string; | ||
}; | ||
}; | ||
track: { | ||
size: string; | ||
bg: string; | ||
fillBg: string; | ||
}; | ||
mark: { | ||
width: string; | ||
height: string; | ||
}; | ||
}; | ||
}; | ||
type Spacing = keyof typeof base.spacing; | ||
type MarginProps = { | ||
@@ -633,0 +13,0 @@ margin?: Spacing; |
{ | ||
"name": "@interlay/hooks", | ||
"version": "0.0.8", | ||
"version": "1.0.0-next.0", | ||
"description": "Interlay UI hooks", | ||
@@ -35,3 +35,3 @@ "homepage": "https://github.com/interlay/ui#readme", | ||
"react-use": "^17.4.0", | ||
"@interlay/theme": "0.0.7" | ||
"@interlay/theme": "1.0.0-next.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
27058
-49.94%588
-51.2%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
Updated