@mw-kit/mw-ui 1.10.4 → 1.10.5

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.
@@ -1,3 +1,4 @@
1
+ import type { FloatingPortalProps } from '@floating-ui/react';
1
2
  export type PopupProps<T extends React.ElementType = 'div'> = {
2
3
  content: React.FunctionComponent;
3
4
  position: PopupPosition;
@@ -14,5 +15,7 @@ export type PopupProps<T extends React.ElementType = 'div'> = {
14
15
  setOpen?: (open: boolean) => void;
15
16
  fallbackPlacements?: PopupPosition[];
16
17
  zIndex?: number;
18
+ portalRoot?: FloatingPortalProps['root'];
19
+ style?: React.CSSProperties | undefined;
17
20
  };
18
21
  export type PopupPosition = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
@@ -15,6 +15,7 @@ export { default as MwLoader } from './Loader';
15
15
  export { default as MwMenu } from './Menu';
16
16
  export { default as MwModal } from './Modal';
17
17
  export { default as MwPlaceholder } from './Placeholder';
18
+ export { default as MwPopup } from './Popup';
18
19
  export { default as MwProgressBar } from './ProgressBar';
19
20
  export { default as MwScrollContainer } from './ScrollContainer';
20
21
  export { default as MwSelect } from './Select';
package/dist/index.d.mts CHANGED
@@ -4,8 +4,8 @@ import * as react from 'react';
4
4
  import react__default, { TextareaHTMLAttributes } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
7
- import * as styled_components_dist_types from 'styled-components/dist/types';
8
7
  import { FloatingPortalProps } from '@floating-ui/react';
8
+ import * as styled_components_dist_types from 'styled-components/dist/types';
9
9
  import { ReactVirtualizerOptions } from '@tanstack/react-virtual';
10
10
  import { Property } from 'csstype';
11
11
  import SignatureCanvas, { SignatureCanvasProps } from 'react-signature-canvas';
@@ -281,6 +281,8 @@ type PopupProps<T extends React.ElementType = 'div'> = {
281
281
  setOpen?: (open: boolean) => void;
282
282
  fallbackPlacements?: PopupPosition[];
283
283
  zIndex?: number;
284
+ portalRoot?: FloatingPortalProps['root'];
285
+ style?: React.CSSProperties | undefined;
284
286
  };
285
287
  type PopupPosition = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
286
288
 
@@ -3989,6 +3991,10 @@ interface PlaceholderProps {
3989
3991
 
3990
3992
  declare const Placeholder: (props: PlaceholderProps) => react_jsx_runtime.JSX.Element;
3991
3993
 
3994
+ declare const Popup: <T extends react__default.ElementType = "div">(props: PopupProps<T> & {
3995
+ enabled?: boolean;
3996
+ }) => JSX.Element;
3997
+
3992
3998
  interface ProgressBarProps {
3993
3999
  type: 'default' | 'info' | 'danger' | 'success' | 'warning';
3994
4000
  value: number | null;
@@ -4066,4 +4072,4 @@ declare const ThemeProvider: (props: React.PropsWithChildren<{
4066
4072
  assetBaseUrl: string;
4067
4073
  }>) => react_jsx_runtime.JSX.Element;
4068
4074
 
4069
- export { Inflector, AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, _default as MwSelect, SignatureInput as MwSignature, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, theme, useTransition as useMwTransition };
4075
+ export { Inflector, AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, Popup as MwPopup, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, _default as MwSelect, SignatureInput as MwSignature, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, theme, useTransition as useMwTransition };
package/dist/index.js CHANGED
@@ -48,6 +48,7 @@ __export(index_exports, {
48
48
  MwMenu: () => Menu_default2,
49
49
  MwModal: () => Modal_default,
50
50
  MwPlaceholder: () => Placeholder_default,
51
+ MwPopup: () => Popup_default,
51
52
  MwProgressBar: () => ProgressBar_default,
52
53
  MwScrollContainer: () => ScrollContainer_default,
53
54
  MwSelect: () => Select_default3,
@@ -10069,11 +10070,15 @@ var PopupComponent = (props) => {
10069
10070
  }, [floating.refs.setReference, interactions, triggerProps]);
10070
10071
  return /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(import_react11.default.Fragment, { children: [
10071
10072
  renderTrigger(referenceProps),
10072
- open ? /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_react12.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
10073
+ open ? /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(import_react12.FloatingPortal, { root: props.portalRoot, children: /* @__PURE__ */ (0, import_jsx_runtime294.jsxs)(
10073
10074
  TooltipSurface,
10074
10075
  {
10075
10076
  ref: floating.refs.setFloating,
10076
- style: { ...floating.floatingStyles, zIndex },
10077
+ style: {
10078
+ ...floating.floatingStyles,
10079
+ ...props.style || {},
10080
+ zIndex
10081
+ },
10077
10082
  $placement: floating.placement,
10078
10083
  $background: background,
10079
10084
  ...interactions.getFloatingProps(),
@@ -21623,6 +21628,7 @@ var Zoom_default = Zoom;
21623
21628
  MwMenu,
21624
21629
  MwModal,
21625
21630
  MwPlaceholder,
21631
+ MwPopup,
21626
21632
  MwProgressBar,
21627
21633
  MwScrollContainer,
21628
21634
  MwSelect,
package/dist/index.mjs CHANGED
@@ -10022,11 +10022,15 @@ var PopupComponent = (props) => {
10022
10022
  }, [floating.refs.setReference, interactions, triggerProps]);
10023
10023
  return /* @__PURE__ */ jsxs143(React291.Fragment, { children: [
10024
10024
  renderTrigger(referenceProps),
10025
- open ? /* @__PURE__ */ jsx294(FloatingPortal, { children: /* @__PURE__ */ jsxs143(
10025
+ open ? /* @__PURE__ */ jsx294(FloatingPortal, { root: props.portalRoot, children: /* @__PURE__ */ jsxs143(
10026
10026
  TooltipSurface,
10027
10027
  {
10028
10028
  ref: floating.refs.setFloating,
10029
- style: { ...floating.floatingStyles, zIndex },
10029
+ style: {
10030
+ ...floating.floatingStyles,
10031
+ ...props.style || {},
10032
+ zIndex
10033
+ },
10030
10034
  $placement: floating.placement,
10031
10035
  $background: background,
10032
10036
  ...interactions.getFloatingProps(),
@@ -21583,6 +21587,7 @@ export {
21583
21587
  Menu_default2 as MwMenu,
21584
21588
  Modal_default as MwModal,
21585
21589
  Placeholder_default as MwPlaceholder,
21590
+ Popup_default as MwPopup,
21586
21591
  ProgressBar_default as MwProgressBar,
21587
21592
  ScrollContainer_default as MwScrollContainer,
21588
21593
  Select_default3 as MwSelect,
@@ -26,4 +26,5 @@ export type { AppliedFilter } from './components/Filters/interfaces';
26
26
  export type { Transition } from './components/Transition/interfaces';
27
27
  export type { TabComponent, TabComponents, TabProps, TabProvider, } from './components/Tabs/interfaces';
28
28
  export type * from './components/Select/types';
29
+ export type * from './components/Popup/types';
29
30
  export type * from './functions/inflections';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mw-kit/mw-ui",
3
- "version": "1.10.4",
3
+ "version": "1.10.5",
4
4
  "description": "Made with create-react-library",
5
5
  "author": "fmgusmao",
6
6
  "license": "MIT",