@co4/components
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "@co4/components", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "The component library for the CO4 project.", | ||
@@ -33,3 +33,3 @@ "author": { | ||
"scripts": {}, | ||
"gitHead": "61a256d21241955d4386589bfcd98ce2af653e62" | ||
"gitHead": "83bde3c35f9abc447ed44c96ca47af35bb63f15d" | ||
} |
@@ -0,1 +1,3 @@ | ||
import './styles.scss'; | ||
export * from './AddressAutocomplete'; |
@@ -0,1 +1,3 @@ | ||
import './styles.scss'; | ||
export * from './Autocomplete'; |
@@ -0,1 +1,3 @@ | ||
import './styles.scss'; | ||
export * from './FileUpload'; |
import { useRef } from 'react'; | ||
function useDebouncedCallback<T extends any[]>(callback: (...args: T) => void, delay?: number) { | ||
let timeoutRef = useRef<ReturnType<typeof setTimeout>>(); | ||
let argsRef = useRef<T>(); | ||
export function useDebouncedCallback<T extends any[]>(callback: (...args: T) => void, delay?: number) { | ||
const timeoutRef = useRef<ReturnType<typeof setTimeout>>(); | ||
const argsRef = useRef<T>(); | ||
let cleanup = () => { | ||
const cleanup = () => { | ||
if (timeoutRef.current) { | ||
@@ -23,3 +23,1 @@ clearTimeout(timeoutRef.current); | ||
} | ||
export default useDebouncedCallback; |
import { useEffect, RefObject } from 'react'; | ||
export function useOnClickOutside(ref: RefObject<HTMLElement>, handler: (ev: Event) => void) { | ||
export function useOnClickOutside(ref: RefObject<HTMLElement | undefined>, handler: (ev: Event) => void) { | ||
useEffect(() => { | ||
@@ -5,0 +5,0 @@ const listener = (event: Event) => { |
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path'; | ||
import { setDefaultAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry'; | ||
import { registerIconLibrary } from '@shoelace-style/shoelace/dist/utilities/icon-library'; | ||
import { Icon } from 'leaflet'; | ||
import 'leaflet/dist/leaflet.css'; | ||
import { Icon } from 'leaflet'; | ||
@@ -63,8 +63,11 @@ function getIconFolder(name: string) { | ||
export * from './Accordion'; | ||
export * from './AddressAutocomplete'; | ||
export * from './Autocomplete'; | ||
export * from './AddressAutocomplete'; | ||
export * from './Card'; | ||
export * from './FileUpload'; | ||
export * from './NavButton'; | ||
export * from './Pagination'; | ||
export * from './Stats'; | ||
export * from './Table'; | ||
export * from './TimeFilter'; | ||
export * from './hooks'; |
@@ -0,1 +1,3 @@ | ||
import './styles.scss'; | ||
export * from './NavButton'; |
@@ -0,1 +1,3 @@ | ||
import './styles.scss'; | ||
export * from './Table'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
42818
34
989