@smart-factor/gem-ui-components 0.0.153 → 0.0.155

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.
@@ -2,7 +2,7 @@ import './assets/SignEditor.css';var N4 = Object.defineProperty;
2
2
  var I4 = (o, e, t) => e in o ? N4(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var Eu = (o, e, t) => I4(o, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsx as Vt, jsxs as ia, Fragment as o_ } from "react/jsx-runtime";
5
- import { G as Ib, u as i_, a as rA, Q as uc, b as hs, c as Lp, D as KE, B as sp, d as ow, e as M4, z as Dc, f as a_, s as $E, I as Of, A as WE, F as O4, U as Ax, g as q4, h as R4, i as Q4, j as G4, T as V4, K as D4, k as H4 } from "./index-BLSlZb7B.js";
5
+ import { G as Ib, u as i_, a as rA, Q as uc, b as hs, c as Lp, D as KE, B as sp, d as ow, e as M4, z as Dc, f as a_, s as $E, I as Of, A as WE, F as O4, U as Ax, g as q4, h as R4, i as Q4, j as G4, T as V4, K as D4, k as H4 } from "./index-MaIOhJ8_.js";
6
6
  import { q as XE, s as Di, I as tu, J as r_, H as YE, S as lp } from "./Stack-hsHMA5b6.js";
7
7
  import { createContext as U4, useContext as z4, useState as vl, useCallback as zu, useEffect as oc, useMemo as cp, useRef as K4 } from "react";
8
8
  import "react-dom";
@@ -2,5 +2,6 @@ import { ButtonProps as ButtonPropsMUI } from '@mui/material';
2
2
  export interface ButtonProps extends ButtonPropsMUI {
3
3
  width?: string;
4
4
  loading?: boolean;
5
+ tooltip?: React.ReactNode;
5
6
  }
6
- export declare function Button({ children, width, disabled, loading, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Button({ children, width, disabled, loading, tooltip, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Docs: Story;
7
7
  export declare const WithLoading: Story;
8
+ export declare const Disabled: Story;
@@ -4,3 +4,4 @@ declare const meta: Meta<typeof ButtonWithIcon>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Docs: Story;
7
+ export declare const Disabled: Story;
@@ -0,0 +1,6 @@
1
+ import { IconButtonProps as IconButtonPropsMUI } from '@mui/material';
2
+ export interface IconButtonProps extends IconButtonPropsMUI {
3
+ loading?: boolean;
4
+ tooltip?: React.ReactNode;
5
+ }
6
+ export declare function IconButton({ children, disabled, loading, tooltip, sx, size, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { IconButton } from './IconButton';
3
+ declare const meta: Meta<typeof IconButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Docs: Story;
7
+ export declare const Disabled: Story;
8
+ export declare const WithLoading: Story;
@@ -17085,27 +17085,33 @@ const useMediaQuery = unstable_createUseMediaQuery({
17085
17085
  shouldForwardProp: (s0) => s0 !== "width"
17086
17086
  })`
17087
17087
  width: ${({ width: s0 }) => s0 || "auto"};
17088
+ &.Mui-disabled {
17089
+ pointer-events: auto;
17090
+ cursor: not-allowed;
17091
+ }
17088
17092
  `;
17089
17093
  function Button$1({
17090
17094
  children: s0,
17091
17095
  width: o0,
17092
17096
  disabled: r0,
17093
17097
  loading: l0,
17094
- ...u0
17098
+ tooltip: u0,
17099
+ ...a0
17095
17100
  }) {
17096
- return /* @__PURE__ */ jsxs(
17101
+ const D0 = /* @__PURE__ */ jsxs(
17097
17102
  StyledButton,
17098
17103
  {
17099
- ...u0,
17104
+ ...a0,
17100
17105
  disabled: r0 || l0,
17101
17106
  width: o0,
17102
- sx: { position: "relative", ...u0.sx },
17107
+ sx: { position: "relative", ...a0.sx },
17103
17108
  children: [
17104
17109
  /* @__PURE__ */ jsx(Box, { visibility: l0 ? "hidden" : "visible", children: s0 }),
17105
17110
  l0 && /* @__PURE__ */ jsx(Box, { position: "absolute", sx: { translate: "0 3px" }, children: /* @__PURE__ */ jsx(CircularProgress, { size: 18 }) })
17106
17111
  ]
17107
17112
  }
17108
17113
  );
17114
+ return u0 ? /* @__PURE__ */ jsx(Tooltip, { title: u0, children: /* @__PURE__ */ jsx("span", { children: D0 }) }) : D0;
17109
17115
  }
17110
17116
  const AddIcon = createSvgIcon(/* @__PURE__ */ jsx("path", {
17111
17117
  d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
@@ -284353,7 +284359,7 @@ export {
284353
284359
  baseGetTag as Z,
284354
284360
  baseIsEqual as _,
284355
284361
  useMutation as a,
284356
- getErrorMessage as a$,
284362
+ useGetFileUrl as a$,
284357
284363
  isString$1 as a0,
284358
284364
  defaultDayjs as a1,
284359
284365
  xlsx_minExports as a2,
@@ -284364,33 +284370,33 @@ export {
284364
284370
  ContextualSearch as a7,
284365
284371
  StyledDatePicker as a8,
284366
284372
  StyledFormHelperText$2 as a9,
284367
- useContextMenuProps as aA,
284368
- TableWrapper as aB,
284369
- Vt as aC,
284370
- ToastWrapper as aD,
284371
- ToastContent as aE,
284372
- PostHogTracker as aF,
284373
- PostHogProvider as aG,
284374
- LocalizationProvider as aH,
284375
- Oe as aI,
284376
- ContextualSearchClient as aJ,
284377
- ContextualSearchInspector as aK,
284378
- ErrorBoundary as aL,
284379
- Login as aM,
284380
- LoginModal as aN,
284381
- PaginatedPopover as aO,
284382
- ResizableWrapper as aP,
284383
- SessionModal as aQ,
284384
- SessionService as aR,
284385
- useSessionInit as aS,
284386
- Sidebar as aT,
284387
- useSession as aU,
284388
- theme as aV,
284389
- ACCEPTED_FILE_TYPES as aW,
284390
- Dropzone as aX,
284391
- ElementsPicker as aY,
284392
- errorToast as aZ,
284393
- useGetFileUrl as a_,
284373
+ StyledMenu as aA,
284374
+ useContextMenuProps as aB,
284375
+ TableWrapper as aC,
284376
+ Vt as aD,
284377
+ ToastWrapper as aE,
284378
+ ToastContent as aF,
284379
+ PostHogTracker as aG,
284380
+ PostHogProvider as aH,
284381
+ LocalizationProvider as aI,
284382
+ Oe as aJ,
284383
+ ContextualSearchClient as aK,
284384
+ ContextualSearchInspector as aL,
284385
+ ErrorBoundary as aM,
284386
+ Login as aN,
284387
+ LoginModal as aO,
284388
+ PaginatedPopover as aP,
284389
+ ResizableWrapper as aQ,
284390
+ SessionModal as aR,
284391
+ SessionService as aS,
284392
+ useSessionInit as aT,
284393
+ Sidebar as aU,
284394
+ useSession as aV,
284395
+ theme as aW,
284396
+ ACCEPTED_FILE_TYPES as aX,
284397
+ Dropzone as aY,
284398
+ ElementsPicker as aZ,
284399
+ errorToast as a_,
284394
284400
  StyledDateTimePicker as aa,
284395
284401
  StyledFormHelperText$1 as ab,
284396
284402
  FormControl as ac,
@@ -284407,18 +284413,19 @@ export {
284407
284413
  StyledFormHelperText as an,
284408
284414
  Menu as ao,
284409
284415
  DATA_GRID_LOCALE as ap,
284410
- MuiLikeWrapper as aq,
284411
- FormLabel as ar,
284412
- StyledAutocomplete as as,
284413
- TextField as at,
284414
- StyledInput$1 as au,
284415
- StyledStepper as av,
284416
- StyledStepButton as aw,
284417
- StyledStickyContainer as ax,
284418
- ContextMenuPropsContext as ay,
284419
- StyledMenu as az,
284416
+ Tooltip as aq,
284417
+ MuiLikeWrapper as ar,
284418
+ FormLabel as as,
284419
+ StyledAutocomplete as at,
284420
+ TextField as au,
284421
+ StyledInput$1 as av,
284422
+ StyledStepper as aw,
284423
+ StyledStepButton as ax,
284424
+ StyledStickyContainer as ay,
284425
+ ContextMenuPropsContext as az,
284420
284426
  api$1 as b,
284421
- ANALYTICS_PROPERTIES as b0,
284427
+ getErrorMessage as b0,
284428
+ ANALYTICS_PROPERTIES as b1,
284422
284429
  useQuery as c,
284423
284430
  axios as d,
284424
284431
  useDebounce as e,
package/dist/main.d.ts CHANGED
@@ -13,6 +13,7 @@ export { ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary';
13
13
  export { FixedActionsBottomPanel } from './components/FixedActionsBottomPanel/FixedActionsBottomPanel';
14
14
  export * from './components/FormComponents';
15
15
  export { Grid, GridInitialState } from './components/Grid';
16
+ export { IconButton } from './components/IconButton/IconButton';
16
17
  export { LoadingBackdrop } from './components/LoadingBackdrop/LoadingBackdrop';
17
18
  export { Login } from './components/Login/Login';
18
19
  export { LoginModal } from './components/LoginModal/LoginModal';