@overmap-ai/blocks 1.0.25-export-error-fixes.0 → 1.0.25-table-row-loading.0

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.
Files changed (38) hide show
  1. package/README.md +3 -3
  2. package/dist/Badge/Badge.d.ts +1 -1
  3. package/dist/Badge/typings.d.ts +1 -1
  4. package/dist/BaseMenuGroups/utils.d.ts +1 -1
  5. package/dist/Breadcrumb/Breadcrumb.d.ts +1 -1
  6. package/dist/ButtonGroup/ButtonGroup.d.ts +1 -1
  7. package/dist/ButtonGroup/typings.d.ts +1 -1
  8. package/dist/Buttons/Button.d.ts +1 -1
  9. package/dist/Buttons/IconButton.d.ts +1 -1
  10. package/dist/Buttons/constants.d.ts +1 -1
  11. package/dist/Buttons/typings.d.ts +1 -1
  12. package/dist/ContextMenu/index.d.ts +5 -5
  13. package/dist/DropdownItemMenu/DropdownItemMenu.d.ts +1 -1
  14. package/dist/DropdownMenu/DropdownMenu.d.ts +2 -2
  15. package/dist/DropdownMultiSelect/DropdownMultiSelect.d.ts +1 -1
  16. package/dist/DropdownSelect/DropdownSelect.d.ts +1 -1
  17. package/dist/IconColorUtility/IconColorUtility.d.ts +1 -1
  18. package/dist/Input/Input.d.ts +1 -1
  19. package/dist/Input/typings.d.ts +1 -1
  20. package/dist/Layout/SlideOutOverlay.d.ts +1 -1
  21. package/dist/Popover/Popover.d.ts +1 -1
  22. package/dist/Separator/Separator.d.ts +1 -1
  23. package/dist/Separator/typings.d.ts +1 -1
  24. package/dist/SlideOut/SlideOutV2.d.ts +1 -1
  25. package/dist/Switch/Switch.d.ts +1 -1
  26. package/dist/Switch/typings.d.ts +1 -1
  27. package/dist/Table/typings.d.ts +1 -0
  28. package/dist/TextArea/TextArea.d.ts +1 -1
  29. package/dist/TextArea/typings.d.ts +1 -1
  30. package/dist/Toast/typings.d.ts +1 -1
  31. package/dist/ToggleGroup/ToggleGroup.d.ts +1 -1
  32. package/dist/blocks.js +16 -5
  33. package/dist/blocks.js.map +1 -1
  34. package/dist/blocks.umd.cjs +16 -5
  35. package/dist/blocks.umd.cjs.map +1 -1
  36. package/dist/constants.d.ts +1 -1
  37. package/dist/style.css +16 -16
  38. package/package.json +104 -104
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # overmap-ai blocks
2
-
3
- Contains basic components used by overmap-ai libraries.
1
+ # overmap-ai blocks
2
+
3
+ Contains basic components used by overmap-ai libraries.
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { BadgeProps } from "./typings";
2
+ import { BadgeProps } from "./typings.ts";
3
3
  /** The Badge Component is a user interface element that provides visual feedback, typically displaying a small amount
4
4
  * of information. It is commonly used to indicate counts, statuses, or labels in a concise and visually appealing
5
5
  * manner. This Badge components wraps the Badge component from Radix-ui found here https://www.radix-ui.com/themes/docs/components/badge */
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { Badge as RadixBadge, MarginProps } from "@radix-ui/themes";
3
- import { Severity } from "../typings";
3
+ import { Severity } from "../typings.ts";
4
4
  export interface BadgeProps extends Omit<ComponentProps<typeof RadixBadge>, keyof MarginProps> {
5
5
  /** The severity of the Badge, supports all global severities. Note that specifying a severity will overwrite any
6
6
  * color passed into the Badge component. */
@@ -1,5 +1,5 @@
1
1
  import { MenuItemProps } from "@radix-ui/react-menu";
2
2
  import { ChangeEvent } from "react";
3
- import { TextFilterProps } from "./typings";
3
+ import { TextFilterProps } from "./typings.ts";
4
4
  export declare const useCloseOnSelectHandler: (closeOnSelect: boolean) => (onSelect: MenuItemProps["onSelect"]) => (event: Event) => void;
5
5
  export declare const useTextFilterChangeHandler: () => (onTextFilterChange: TextFilterProps["onFilterValueChange"]) => (event: ChangeEvent<HTMLInputElement>) => void;
@@ -1,7 +1,7 @@
1
1
  import { Link } from "@radix-ui/themes";
2
2
  import { FlexProps } from "../Flex";
3
3
  import { ComponentProps, HTMLProps, ReactNode } from "react";
4
- import { Severity } from "../typings";
4
+ import { Severity } from "../typings.ts";
5
5
  export interface BreadcrumbItemProps extends Omit<HTMLProps<HTMLAnchorElement>, "size" | "ref" | "color"> {
6
6
  }
7
7
  export declare const Item: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<BreadcrumbItemProps & import("react").RefAttributes<HTMLAnchorElement>>>;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { ButtonGroupProps } from "./typings";
2
+ import { ButtonGroupProps } from "./typings.ts";
3
3
  /** The ButtonGroup Component is a user interface element that groups multiple buttons together for improved user
4
4
  * interaction and visual clarity. It is commonly used to present related actions or options in a compact and organized
5
5
  * manner. The ButtonGroup supports all props of the RadixUI Flex layout component besides MarginProps,
@@ -1,6 +1,6 @@
1
1
  import { Flex, MarginProps, Responsive } from "@radix-ui/themes";
2
2
  import { ComponentProps } from "react";
3
- import { Severity, Size, Variant } from "../typings";
3
+ import { Severity, Size, Variant } from "../typings.ts";
4
4
  import { ButtonHoverEffect } from "../Buttons";
5
5
  export interface ButtonGroupProps extends Omit<ComponentProps<typeof Flex>, keyof MarginProps | "size" | "direction" | "asChild"> {
6
6
  /** The direction in which the Buttons within the ButtonGroup are stacked
@@ -1,4 +1,4 @@
1
1
  import { FC } from "react";
2
- import { ButtonProps } from "./typings";
2
+ import { ButtonProps } from "./typings.ts";
3
3
  declare const Button: FC<ButtonProps>;
4
4
  export default Button;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { ButtonProps } from "./typings";
2
+ import { ButtonProps } from "./typings.ts";
3
3
  interface IconButtonProps extends ButtonProps {
4
4
  "aria-label": string;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { ButtonHoverEffect } from "./typings";
1
+ import { ButtonHoverEffect } from "./typings.ts";
2
2
  import { KeyboardEvent } from "react";
3
3
  export declare const hoverEffectClassNameMapping: Record<ButtonHoverEffect, string | undefined>;
4
4
  /** Passing this to a `div` will make it behave like a `button`. However, it will **NOT** support the disabled state. */
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Button as RadixButton, MarginProps, Responsive } from "@radix-ui/themes";
3
- import { Severity, Size, Variant } from "../typings";
3
+ import { Severity, Size, Variant } from "../typings.ts";
4
4
  export interface Shortcut {
5
5
  keys: string[];
6
6
  action: () => void;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export type { ContextMenuRootProps } from "./Root";
3
3
  export declare const ContextMenu: {
4
- Root: import("react").MemoExoticComponent<(props: import("./Root").ContextMenuRootProps) => import("react/jsx-runtime").JSX.Element>;
5
- ActionItemGroup: import("react").MemoExoticComponent<(props: import("..").BaseItemGroupProps) => import("react/jsx-runtime").JSX.Element>;
6
- SelectItemGroup: import("react").MemoExoticComponent<(props: import("..").BaseSelectGroupProps) => import("react/jsx-runtime").JSX.Element>;
7
- MultiSelectItemGroup: import("react").MemoExoticComponent<(props: import("..").BaseMultiSelectGroupProps) => import("react/jsx-runtime").JSX.Element>;
8
- SubItemGroup: import("react").MemoExoticComponent<(props: import("..").BaseSubMenuGroupProps) => import("react/jsx-runtime").JSX.Element>;
4
+ Root: import("react").MemoExoticComponent<(props: import("./Root.tsx").ContextMenuRootProps) => import("react/jsx-runtime").JSX.Element>;
5
+ ActionItemGroup: import("react").MemoExoticComponent<(props: import("../index.ts").BaseItemGroupProps) => import("react/jsx-runtime").JSX.Element>;
6
+ SelectItemGroup: import("react").MemoExoticComponent<(props: import("../index.ts").BaseSelectGroupProps) => import("react/jsx-runtime").JSX.Element>;
7
+ MultiSelectItemGroup: import("react").MemoExoticComponent<(props: import("../index.ts").BaseMultiSelectGroupProps) => import("react/jsx-runtime").JSX.Element>;
8
+ SubItemGroup: import("react").MemoExoticComponent<(props: import("../index.ts").BaseSubMenuGroupProps) => import("react/jsx-runtime").JSX.Element>;
9
9
  };
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
- import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
3
2
  import { DropdownMenuItemGroupItemProps, DropdownMenuItemGroupProps } from "../DropdownMenu";
4
3
  import { BaseMenuProps } from "../BaseMenuGroups";
4
+ import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
5
5
  export type DropdownItemMenuItemProps = DropdownMenuItemGroupItemProps;
6
6
  export type DropdownItemMenuProps = DropdownMenuItemGroupProps & BaseMenuProps & DropdownMenuContentProps;
7
7
  /** The DropdownItemMenu component is a user interface element that provides a list of options for the user to choose from.
@@ -1,7 +1,7 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
3
- import { DropdownMenuItemGroupItemProps } from "./DropdownMenuGroups";
2
+ import { DropdownMenuItemGroupItemProps } from "./DropdownMenuGroups.tsx";
4
3
  import { BaseMenuProps } from "../BaseMenuGroups";
4
+ import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
5
5
  export type DropdownMenuItemProps = DropdownMenuItemGroupItemProps;
6
6
  export type DropdownMenuProps = PropsWithChildren & BaseMenuProps & DropdownMenuContentProps;
7
7
  /** The DropdownMenu component is a user interface element that provides a list of options for the user to choose from.
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
- import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
3
2
  import { DropdownMenuMultiSelectGroupItemProps, DropdownMenuMultiSelectGroupProps } from "../DropdownMenu";
4
3
  import { BaseMenuProps } from "../BaseMenuGroups";
4
+ import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
5
5
  export type DropdownMultiSelectItemProps = DropdownMenuMultiSelectGroupItemProps;
6
6
  export type DropdownMultiSelectProps = DropdownMenuMultiSelectGroupProps & BaseMenuProps & DropdownMenuContentProps;
7
7
  export declare const DropdownMultiSelect: FC<DropdownMultiSelectProps>;
@@ -1,7 +1,7 @@
1
1
  import { FC } from "react";
2
- import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
3
2
  import { DropdownMenuItemGroupItemProps, DropdownMenuSelectGroupProps } from "../DropdownMenu";
4
3
  import { BaseMenuProps } from "../BaseMenuGroups";
4
+ import { DropdownMenuContentProps } from "@radix-ui/react-dropdown-menu";
5
5
  export type DropdownSelectItemProps = DropdownMenuItemGroupItemProps;
6
6
  export type DropdownSelectProps = DropdownMenuSelectGroupProps & BaseMenuProps & DropdownMenuContentProps;
7
7
  export declare const DropdownSelect: FC<DropdownSelectProps>;
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, ReactElement } from "react";
2
2
  import { Theme } from "@radix-ui/themes";
3
- import { Severity } from "../typings";
3
+ import { Severity } from "../typings.ts";
4
4
  interface IconColorUtilityProps {
5
5
  children: ReactElement;
6
6
  }
@@ -1,3 +1,3 @@
1
1
  import { FC } from "react";
2
- import { InputProps } from "./typings";
2
+ import { InputProps } from "./typings.ts";
3
3
  export declare const Input: FC<InputProps>;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { Responsive, TextField as RadixTextField } from "@radix-ui/themes";
3
- import { Severity, Size } from "../typings";
3
+ import { Severity, Size } from "../typings.ts";
4
4
  import { MarginProps } from "@radix-ui/themes";
5
5
  type TextFieldInputProps = React.ComponentProps<typeof RadixTextField.Input>;
6
6
  export interface InputProps extends Omit<TextFieldInputProps, "size" | "color" | "radius" | "variant" | keyof MarginProps> {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { PropsWithClassNameAndStyle } from "../typings";
2
+ import { PropsWithClassNameAndStyle } from "../typings.ts";
3
3
  import { SlideOutV3Props } from "../SlideOutV3";
4
4
  export interface OverlayProps extends PropsWithClassNameAndStyle {
5
5
  active?: boolean;
@@ -1,3 +1,3 @@
1
1
  import { FC } from "react";
2
- import { PopoverProps } from "./typings";
2
+ import { PopoverProps } from "./typings.ts";
3
3
  export declare const Popover: FC<PopoverProps>;
@@ -1,3 +1,3 @@
1
1
  import { FC } from "react";
2
- import { SeparatorProps } from "./typings";
2
+ import { SeparatorProps } from "./typings.ts";
3
3
  export declare const Separator: FC<SeparatorProps>;
@@ -1,6 +1,6 @@
1
1
  import { Flex, Text, Separator as RadixSeparator, MarginProps } from "@radix-ui/themes";
2
2
  import { ComponentProps } from "react";
3
- import { Severity } from "../typings";
3
+ import { Severity } from "../typings.ts";
4
4
  export interface SeparatorProps extends Omit<ComponentProps<typeof RadixSeparator>, "color" | "asChild" | keyof MarginProps> {
5
5
  /** text to be displayed in the middle of the separator */
6
6
  text?: string;
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from "react";
2
2
  import { FocusOutsideEvent, PointerDownOutsideEvent } from "@radix-ui/react-dismissable-layer";
3
- import { PropsWithClassNameAndStyle } from "../typings";
3
+ import { PropsWithClassNameAndStyle } from "../typings.ts";
4
4
  export type DismissibleEventTypes = PointerDownOutsideEvent | FocusOutsideEvent | KeyboardEvent;
5
5
  export interface SlideOutV2Props extends PropsWithChildren, PropsWithClassNameAndStyle {
6
6
  /** The controlled open state of the SlideOut */
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { SwitchProps } from "./typings";
2
+ import { SwitchProps } from "./typings.ts";
3
3
  /** The Switch Component is a user interface element that allows users to toggle between two states, typically
4
4
  * representing "on" and "off" or "enabled" and "disabled". It is commonly used for settings, preferences, or any
5
5
  * binary options. This Switch component is a wrapper around the Radix-ui Switch component found here https://www.radix-ui.com/themes/docs/components/switch
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, ReactElement, ReactNode } from "react";
2
2
  import { MarginProps, Switch as RadixSwitch } from "@radix-ui/themes";
3
- import { Severity } from "../typings";
3
+ import { Severity } from "../typings.ts";
4
4
  interface SwitchIconProps {
5
5
  checked: ReactNode;
6
6
  unchecked: ReactNode;
@@ -34,6 +34,7 @@ export interface TableRow {
34
34
  onClick?: (row: TableRow) => void;
35
35
  className?: string;
36
36
  disabled?: boolean;
37
+ loading?: boolean;
37
38
  columns: {
38
39
  [columnId: string]: TableCell;
39
40
  };
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { TextAreaProps } from "./typings";
2
+ import { TextAreaProps } from "./typings.ts";
3
3
  /** The TextArea Component is a user interface element that allows users to input and edit multi-line text.
4
4
  It is commonly used in forms, chat applications, and other scenarios where longer text inputs are required.
5
5
  This TextArea is a wrapper of the RadixUI TextArea component found here https://www.radix-ui.com/themes/docs/components/text-area.
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { TextArea as RadixTextArea, MarginProps } from "@radix-ui/themes";
3
- import { Severity } from "../typings";
3
+ import { Severity } from "../typings.ts";
4
4
  export interface TextAreaProps extends Omit<ComponentProps<typeof RadixTextArea>, keyof MarginProps | "color" | "variant"> {
5
5
  /** used to set the severity of the TextArea, supports all 5 global severities
6
6
  * @default "primary"
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps, ReactElement, ReactNode } from "react";
2
2
  import { ToastActionProps, ToastProps as RadixToastProps, ToastProviderProps, ToastViewportProps } from "@radix-ui/react-toast";
3
3
  import { Callout } from "@radix-ui/themes";
4
- import { Severity } from "../typings";
4
+ import { Severity } from "../typings.ts";
5
5
  export interface ToastProps {
6
6
  size?: ComponentProps<typeof Callout.Root>["size"];
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { ToggleGroupSingleProps } from "./typings";
2
+ import { ToggleGroupSingleProps } from "./typings.ts";
3
3
  /** The Toggle Group Component is a user interface element that allows users to select a single option from a set of
4
4
  * mutually exclusive choices. It is commonly used in situations where users need to make a single selection from a
5
5
  * predefined list of options. This component is built using the ButtonGroup and IconButton components in combination
package/dist/blocks.js CHANGED
@@ -3978,15 +3978,24 @@ const _Table = forwardRef(function Table2(props, ref) {
3978
3978
  ] }) }),
3979
3979
  /* @__PURE__ */ jsxs(Body, { children: [
3980
3980
  tableList.length === 0 && /* @__PURE__ */ jsx(TableRow, { className: styles$1.noDataTextContainer, children: /* @__PURE__ */ jsx(Cell, { children: emptyMessage }) }),
3981
- tableList.map((row) => /* @__PURE__ */ jsxs(
3981
+ tableList.map((row) => /* @__PURE__ */ jsx(
3982
3982
  Row,
3983
3983
  {
3984
3984
  item: row,
3985
3985
  className: classNames(styles$1.tableRow, rowClassName, row.className, {
3986
3986
  [styles$1.disabled]: row.disabled
3987
3987
  }),
3988
- onClick: !row.disabled && row.onClick,
3989
- children: [
3988
+ onClick: !row.loading && !row.disabled && row.onClick,
3989
+ children: row.loading ? /* @__PURE__ */ jsx(
3990
+ Cell,
3991
+ {
3992
+ style: {
3993
+ gridColumn: `1 / span ${columns.length}`
3994
+ },
3995
+ children: /* @__PURE__ */ jsx(Flex$1, { justify: "center", pb: "4", pt: "4", children: /* @__PURE__ */ jsx(Spinner, {}) })
3996
+ },
3997
+ `loading-${row.id}`
3998
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
3990
3999
  showSelect && /* @__PURE__ */ jsx(CellSelect, { item: row }, row.id),
3991
4000
  columns.map((column, i) => {
3992
4001
  const cell = row[column.id];
@@ -3997,7 +4006,9 @@ const _Table = forwardRef(function Table2(props, ref) {
3997
4006
  styles$1.tableCell,
3998
4007
  cellClassName,
3999
4008
  cell.className,
4000
- { [styles$1.disabled]: cell.disabled || column.disabled }
4009
+ {
4010
+ [styles$1.disabled]: cell.disabled || column.disabled
4011
+ }
4001
4012
  ),
4002
4013
  onClick: cell.disabled || column.disabled ? void 0 : row[column.id].onClick,
4003
4014
  children: cell.label
@@ -4005,7 +4016,7 @@ const _Table = forwardRef(function Table2(props, ref) {
4005
4016
  i
4006
4017
  );
4007
4018
  })
4008
- ]
4019
+ ] })
4009
4020
  },
4010
4021
  row.id
4011
4022
  ))