UNPKG

welcome-ui

Version:

Customizable design system with react • styled-components • styled-system and ariakit.

34 lines (33 loc) 1.17 kB
"use client"; import { F as y, d } from "./field-styles-CfVLcVQp.mjs"; import { f as E } from "./format-bytes-gST0dTWd.mjs"; import { h as T } from "./hex-to-rgba-BIDK-3ab.mjs"; import { o as h } from "./overflow-ellipsis-DGV5Kgt-.mjs"; import { t as L } from "./throttle-BDBzFeFj.mjs"; import { c as p } from "./index-BhcLigYU.mjs"; import { useState as a, useCallback as i } from "react"; import { s as g, u as v } from "./use-fork-ref-CUZErtAC.mjs"; import { u as k } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs"; import { u as B } from "./use-viewport-CWpjoHXy.mjs"; function c(e, r) { const [s, t] = a(); return [i(() => { let o; typeof e == "number" || typeof e == "string" ? o = e.toString() : e.current instanceof HTMLInputElement ? o = e.current.value : e.current instanceof HTMLElement && (o = e.current.textContent); const f = p(o); t(f), r && setTimeout(t, r); }, [e, r]), s]; } export { y as FIELD_ICON_SIZE, d as defaultFieldStyles, E as formatBytes, T as hexToRGBA, h as overflowEllipsis, g as setRef, L as throttle, c as useCopyText, v as useForkRef, k as useIsomorphicLayoutEffect, B as useViewportSize };