@teamimpact/veda-ui-blocks 0.1.0-beta.8 → 0.1.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, ButtonHTMLAttributes, ReactElement, ImgHTMLAttributes, SVGProps, VideoHTMLAttributes, CanvasHTMLAttributes, ComponentProps } from 'react';
3
- import { ButtonProps as ButtonProps$1 } from '@trussworks/react-uswds';
2
+ import { ReactNode, ReactElement, ImgHTMLAttributes, SVGProps, VideoHTMLAttributes, CanvasHTMLAttributes, ComponentProps, ElementType, ComponentPropsWithRef } from 'react';
4
3
  import { StyleSpecification } from 'maplibre-gl';
5
4
  import { ViewState } from 'react-map-gl/maplibre';
6
5
 
@@ -48,30 +47,6 @@ type BannerProps = {
48
47
  */
49
48
  declare function Banner({ ariaLabel, bannerHeaderText, bannerHeaderActionText, bannerIcon, bannerExpandedContent, className, }: BannerProps): react_jsx_runtime.JSX.Element;
50
49
 
51
- type ButtonProps = {
52
- /**
53
- * USWDS Button variants. Only one of these should be true at a time.
54
- * See: https://trussworks.github.io/react-uswds/?path=/docs/components-button--docs
55
- */
56
- secondary?: boolean;
57
- base?: boolean;
58
- accentStyle?: "cool" | "warm";
59
- outline?: boolean;
60
- inverse?: boolean;
61
- size?: "big";
62
- unstyled?: boolean;
63
- children: ReactNode;
64
- /**
65
- * Button type attribute. Defaults to 'button'.
66
- */
67
- type?: "button" | "submit" | "reset";
68
- } & Omit<ButtonProps$1, "children" | "type"> & ButtonHTMLAttributes<HTMLButtonElement>;
69
- /**
70
- * Our custom Button wrapper for react-uswds.
71
- * Allows us to control the surface area and extend as needed.
72
- */
73
- declare function Button({ type, secondary, base, accentStyle, outline, inverse, size, unstyled, children, className, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
74
-
75
50
  type CardMediaElement = ReactElement<ImgHTMLAttributes<HTMLImageElement>, "img"> | ReactElement<SVGProps<SVGSVGElement>, "svg"> | ReactElement<VideoHTMLAttributes<HTMLVideoElement>, "video"> | ReactElement<CanvasHTMLAttributes<HTMLCanvasElement>, "canvas">;
76
51
  type LogoMediaElement = ReactElement<ImgHTMLAttributes<HTMLImageElement>, "img"> | ReactElement<SVGProps<SVGSVGElement>, "svg">;
77
52
 
@@ -257,6 +232,47 @@ interface HeaderProps {
257
232
  }
258
233
  declare function Header(props: HeaderProps): react_jsx_runtime.JSX.Element;
259
234
 
235
+ declare const LINK_VARIANTS: readonly ["text", "button", "button-outline", "arrow"];
236
+ declare const LINK_SIZES: readonly ["md", "lg"];
237
+ type LinkVariant = (typeof LINK_VARIANTS)[number];
238
+ type LinkSize = (typeof LINK_SIZES)[number];
239
+
240
+ type LinkProps<T extends ElementType = "a"> = {
241
+ /**
242
+ * Optional visual treatment. Defaults to text.
243
+ */
244
+ variant?: LinkVariant;
245
+ /**
246
+ * Optional size. Defaults to md.
247
+ */
248
+ size?: LinkSize;
249
+ /**
250
+ * Optional parameter to define Link as external to site.
251
+ * Adds visual indication and native link properties target and rel.
252
+ */
253
+ isExternal?: boolean;
254
+ /** The element or component to render as (e.g. "a", "button", RouterLink) */
255
+ as?: T;
256
+ children: Exclude<ReactNode, null | undefined>;
257
+ } & Omit<ComponentPropsWithRef<T>, "as">;
258
+ /**
259
+ * Polymorphic Link — renders as any element or component via the `as` prop.
260
+ *
261
+ * @example
262
+ * // Native anchor (default)
263
+ * <Link href="https://example.com">Visit</Link>
264
+ *
265
+ * // React Router / TanStack Router
266
+ * <Link as={RouterLink} to="/about">About</Link>
267
+ *
268
+ * // Next.js
269
+ * <Link as={NextLink} href="/dashboard">Dashboard</Link>
270
+ *
271
+ * // Button
272
+ * <Link as="button" onClick={handleClick}>Click me</Link>
273
+ */
274
+ declare function Link<T extends ElementType = "a">({ variant, size, isExternal, className, as, children, ...rest }: LinkProps<T>): react_jsx_runtime.JSX.Element;
275
+
260
276
  type TagProps = {
261
277
  /**
262
278
  * Visual treatment for the tag.
@@ -264,11 +280,19 @@ type TagProps = {
264
280
  variant?: "solid" | "outline" | "text";
265
281
  size?: "default" | "big";
266
282
  /**
267
- * Custom color used as the fill, outline, or text color depending on the chosen variant.
283
+ * Custom color used as the fill (solid variant), outline and text (outline variant), or text only (text variant) color depending on the chosen variant.
268
284
  */
269
285
  color?: string;
270
286
  /**
271
- * Optional override for the tag text color.
287
+ * Optional override for the tag border color independent of variant.
288
+ */
289
+ borderColor?: string;
290
+ /**
291
+ * Optional override for the tag bg color independent of variant.
292
+ */
293
+ bgColor?: string;
294
+ /**
295
+ * Optional override for the tag text color independent of variant.
272
296
  */
273
297
  textColor?: string;
274
298
  /**
@@ -287,7 +311,14 @@ type TagProps = {
287
311
  * Public style contract: `.blocks-tag`, modifiers (`--solid`, `--outline`, `--text`, `--big`, `--icon`, `--x-close`),
288
312
  * and elements (`__icon`, `__close-button`, `__close-icon`).
289
313
  */
290
- declare function Tag({ variant, size, color, textColor, icon, onClose, children, className, }: TagProps): react_jsx_runtime.JSX.Element;
314
+ declare function Tag({ variant, size, color, bgColor, borderColor, textColor, icon, onClose, children, className, }: TagProps): react_jsx_runtime.JSX.Element;
315
+
316
+ interface GeoConfigProviderProps {
317
+ stacApiUrl?: string;
318
+ titilerBaseUrl?: string;
319
+ children: ReactNode;
320
+ }
321
+ declare function GeoConfigProvider({ stacApiUrl, titilerBaseUrl, children, }: GeoConfigProviderProps): react_jsx_runtime.JSX.Element;
291
322
 
292
323
  /** Temporal filter for STAC queries. ISO 8601 date strings */
293
324
  type DateRange = {
@@ -381,4 +412,4 @@ type StacSingleLayerMapProps = {
381
412
  */
382
413
  declare function StacSingleLayerMap({ baseMapStyle, initialViewState, layerConfig, }: StacSingleLayerMapProps): react_jsx_runtime.JSX.Element;
383
414
 
384
- export { Banner, type BannerProps, Button, type ButtonProps, Card, CardCTA, type CardCTAProps, CardDetailed, type CardDetailedProps, CardMini, type CardMiniProps, type CardProps, CardSimple, type CardSimpleProps, Footer, type FooterProps, Header, type HeaderProps, Legend, type LegendProps, StacCompareMap, type StacCompareMapProps, StacSingleLayerMap, type StacSingleLayerMapProps, Tag, type TagProps };
415
+ export { Banner, type BannerProps, Card, CardCTA, type CardCTAProps, CardDetailed, type CardDetailedProps, CardMini, type CardMiniProps, type CardProps, CardSimple, type CardSimpleProps, Footer, type FooterProps, GeoConfigProvider, type GeoConfigProviderProps, Header, type HeaderProps, Legend, type LegendProps, Link, type LinkProps, StacCompareMap, type StacCompareMapProps, StacSingleLayerMap, type StacSingleLayerMapProps, Tag, type TagProps };