@overmap-ai/blocks 1.0.18 → 1.0.19-always-show-checkbox.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.
@@ -7,6 +7,7 @@ export interface CheckboxProps extends RadixCheckboxProps {
7
7
  labelClassName?: string;
8
8
  label?: ReactNode;
9
9
  doesLabelCheck?: boolean;
10
+ alwaysShow?: boolean;
10
11
  }
11
12
  export interface SelectAllCheckboxProps extends Omit<CheckboxProps, "checked"> {
12
13
  children: Array<ReactElement<CheckboxProps>>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ErrorBoundaryProps extends React.PropsWithChildren {
3
+ absoluteCentering?: boolean;
4
+ }
5
+ export declare const OvermapErrorBoundary: React.MemoExoticComponent<(props: ErrorBoundaryProps) => import("react/jsx-runtime").JSX.Element>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./OvermapErrorBoundary";
package/dist/blocks.js CHANGED
@@ -14,6 +14,8 @@ import { Root as Root$1, Item as Item$1 } from "@radix-ui/react-toggle-group";
14
14
  import { Root as Root$2 } from "@radix-ui/react-toolbar";
15
15
  import * as RadixToast from "@radix-ui/react-toast";
16
16
  import { ToastProvider as ToastProvider$1, ToastViewport as ToastViewport$1 } from "@radix-ui/react-toast";
17
+ import { useErrorBoundary, ErrorBoundary } from "react-error-boundary";
18
+ import FeatherIcon from "feather-icons-react";
17
19
  import { flushSync } from "react-dom";
18
20
  import { HeaderCell, Table as Table$1, Header, HeaderRow, Body, Cell, Row } from "@table-library/react-table-library/table.js";
19
21
  import { useTheme } from "@table-library/react-table-library/theme.js";
@@ -2260,6 +2262,39 @@ const _Separator = forwardRef(function Separator2({
2260
2262
  );
2261
2263
  });
2262
2264
  const Separator = memo(_Separator);
2265
+ const centerStyles = { placeSelf: "center" };
2266
+ const ErrorFallback = memo((props) => {
2267
+ const { absoluteCentering } = props;
2268
+ const { resetBoundary } = useErrorBoundary();
2269
+ const height = "20px";
2270
+ const outerFlexStyles = absoluteCentering ? { position: "absolute", top: "50%", transform: "translateY(-50%)" } : void 0;
2271
+ return /* @__PURE__ */ jsxs(Flex, { gap: "2", direction: "row", width: "100%", style: outerFlexStyles, children: [
2272
+ /* @__PURE__ */ jsx("div", { style: { flexGrow: 1 } }),
2273
+ /* @__PURE__ */ jsx(FeatherIcon, { icon: "alert-triangle", size: height, style: centerStyles }),
2274
+ /* @__PURE__ */ jsx(Text$1, { style: { lineHeight: height, ...centerStyles }, children: "Something went wrong" }),
2275
+ /* @__PURE__ */ jsx(
2276
+ IconButton,
2277
+ {
2278
+ "aria-label": "Try again",
2279
+ variant: "soft",
2280
+ onClick: resetBoundary,
2281
+ style: centerStyles,
2282
+ hoverEffects: ["spin180Clockwise"],
2283
+ children: /* @__PURE__ */ jsx(FeatherIcon, { icon: "refresh-ccw", size: height })
2284
+ }
2285
+ ),
2286
+ /* @__PURE__ */ jsx("div", { style: { flexGrow: 1 } })
2287
+ ] });
2288
+ });
2289
+ ErrorFallback.displayName = "ErrorFallback";
2290
+ const OvermapErrorBoundary = memo((props) => {
2291
+ const { absoluteCentering } = props;
2292
+ const logError = useCallback((error, info) => {
2293
+ console.error(error, info);
2294
+ }, []);
2295
+ return /* @__PURE__ */ jsx(ErrorBoundary, { fallback: /* @__PURE__ */ jsx(ErrorFallback, { absoluteCentering }), onError: logError, children: props.children });
2296
+ });
2297
+ OvermapErrorBoundary.displayName = "OvermapErrorBoundary";
2263
2298
  function _extends() {
2264
2299
  _extends = Object.assign ? Object.assign.bind() : function(target) {
2265
2300
  for (var i = 1; i < arguments.length; i++) {
@@ -2872,14 +2907,14 @@ const styles$2 = {
2872
2907
  noTextHighlight,
2873
2908
  checkboxHidden
2874
2909
  };
2875
- const _Checkbox = forwardRef(function Checkbox2({ className, labelClassName, label, checked, onCheckedChange, ...rest }, ref) {
2910
+ const _Checkbox = forwardRef(function Checkbox2({ className, labelClassName, label, checked, onCheckedChange, alwaysShow = false, ...rest }, ref) {
2876
2911
  return /* @__PURE__ */ jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxs(Flex$1, { className: styles$2.checkboxContainer, ...props, children: [
2877
2912
  /* @__PURE__ */ jsx(
2878
2913
  $e698a72e93240346$export$be92b6f5f03c0fe9,
2879
2914
  {
2880
2915
  className: classNames(
2881
2916
  styles$2.checkbox,
2882
- !isHovered && !checked && styles$2.checkboxHidden,
2917
+ !alwaysShow && !isHovered && !checked && styles$2.checkboxHidden,
2883
2918
  className
2884
2919
  ),
2885
2920
  checked,
@@ -2973,23 +3008,23 @@ const SelectAllCheckbox = memo(function SelectAllCheckbox2({
2973
3008
  childrenWithProps
2974
3009
  ] });
2975
3010
  });
2976
- const outerTableContainer = "_outerTableContainer_1wqc9_1";
2977
- const headerContainer = "_headerContainer_1wqc9_13";
2978
- const tableTopContainer = "_tableTopContainer_1wqc9_17";
2979
- const tableContainer = "_tableContainer_1wqc9_21";
2980
- const searchContainer = "_searchContainer_1wqc9_26";
2981
- const columnFilterSelect = "_columnFilterSelect_1wqc9_36";
2982
- const table = "_table_1wqc9_17";
2983
- const tableHeaderCell = "_tableHeaderCell_1wqc9_54";
2984
- const showSortIcon = "_showSortIcon_1wqc9_70";
2985
- const tableRow = "_tableRow_1wqc9_74";
2986
- const tableCell = "_tableCell_1wqc9_89";
2987
- const noDataTextContainer = "_noDataTextContainer_1wqc9_99";
2988
- const tableBottomContainer = "_tableBottomContainer_1wqc9_105";
2989
- const rowsPerPageContainer = "_rowsPerPageContainer_1wqc9_109";
2990
- const rowsPerPageText = "_rowsPerPageText_1wqc9_119";
2991
- const pageText = "_pageText_1wqc9_124";
2992
- const descriptionSecondLine = "_descriptionSecondLine_1wqc9_128";
3011
+ const outerTableContainer = "_outerTableContainer_kx4ca_1";
3012
+ const headerContainer = "_headerContainer_kx4ca_13";
3013
+ const tableTopContainer = "_tableTopContainer_kx4ca_17";
3014
+ const tableContainer = "_tableContainer_kx4ca_21";
3015
+ const searchContainer = "_searchContainer_kx4ca_26";
3016
+ const columnFilterSelect = "_columnFilterSelect_kx4ca_36";
3017
+ const table = "_table_kx4ca_17";
3018
+ const tableHeaderCell = "_tableHeaderCell_kx4ca_54";
3019
+ const showSortIcon = "_showSortIcon_kx4ca_70";
3020
+ const tableRow = "_tableRow_kx4ca_74";
3021
+ const tableCell = "_tableCell_kx4ca_89";
3022
+ const noDataTextContainer = "_noDataTextContainer_kx4ca_99";
3023
+ const tableBottomContainer = "_tableBottomContainer_kx4ca_105";
3024
+ const rowsPerPageContainer = "_rowsPerPageContainer_kx4ca_109";
3025
+ const rowsPerPageText = "_rowsPerPageText_kx4ca_119";
3026
+ const pageText = "_pageText_kx4ca_124";
3027
+ const descriptionSecondLine = "_descriptionSecondLine_kx4ca_128";
2993
3028
  const styles$1 = {
2994
3029
  outerTableContainer,
2995
3030
  headerContainer,
@@ -3573,7 +3608,7 @@ const _ConfirmEditInput = forwardRef(function ConfirmEditInput2({
3573
3608
  },
3574
3609
  [onCheckClick, onCancelClick, isConfirmDisabled, mode]
3575
3610
  );
3576
- return /* @__PURE__ */ jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxs(Flex, { className: styles.editableTextContainer, gap: "3", ...props, children: [
3611
+ return /* @__PURE__ */ jsx(HoverUtility, { children: ({ isHovered, ...props }) => /* @__PURE__ */ jsxs(Flex, { className: styles.editableTextContainer, gap: "2", ...props, children: [
3577
3612
  /* @__PURE__ */ jsx(
3578
3613
  Input,
3579
3614
  {
@@ -3681,6 +3716,7 @@ export {
3681
3716
  LeftAndRightPanels,
3682
3717
  MultiPagePopover,
3683
3718
  MultiSelect,
3719
+ OvermapErrorBoundary,
3684
3720
  Popover,
3685
3721
  Root2 as Root,
3686
3722
  Select,