polpo 0.1.4 → 0.1.6
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/chunk-LJM5NQBY.js +3 -0
- package/dist/chunk-LJM5NQBY.js.map +1 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +1 -1
- package/dist/ui.cjs +110 -112
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.d.cts +6 -6
- package/dist/ui.d.ts +6 -6
- package/dist/ui.js +107 -109
- package/dist/ui.js.map +1 -1
- package/dist/{use-modal-in-container-DiNW1PE_.d.cts → use-modal-transition-C6mR_NZh.d.cts} +17 -19
- package/dist/{use-modal-in-container-neGo-kMk.d.ts → use-modal-transition-DBAyFSqW.d.ts} +17 -19
- package/package.json +4 -3
- package/src/components/form/checkbox/checkbox.style.ts +0 -2
- package/src/components/form/input-color/input-color.tsx +7 -1
- package/src/components/form/select/options.tsx +15 -4
- package/src/components/modals/menu/menu.tsx +9 -4
- package/src/components/modals/modal/modal.tsx +20 -16
- package/src/components/modals/portal/portal.tsx +2 -3
- package/src/hooks/use-dom-container.ts +26 -19
- package/src/hooks/use-modal-in-container.ts +7 -13
- package/src/hooks/use-modal-transition.ts +16 -4
- package/dist/chunk-LWUSFVRE.js +0 -3
- package/dist/chunk-LWUSFVRE.js.map +0 -1
package/dist/ui.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject, ReactNode } from 'react';
|
|
3
|
+
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject, ForwardedRef, ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { UseControllerProps, FieldValues, SubmitHandler, DefaultValues, Mode } from 'react-hook-form';
|
|
5
|
-
import { M as ModalState, U as UseModalInContainerParams } from './use-modal-
|
|
5
|
+
import { M as ModalState, U as UseModalTransitionParams, a as UseModalInContainerParams } from './use-modal-transition-C6mR_NZh.cjs';
|
|
6
6
|
import { P as PositionContainer } from './get-modal-position-drle0OjP.cjs';
|
|
7
7
|
import * as csstype from 'csstype';
|
|
8
8
|
import { AnyObjectSchema } from 'yup';
|
|
@@ -442,11 +442,9 @@ type BackdropProps = {
|
|
|
442
442
|
};
|
|
443
443
|
declare const Backdrop: ({ opacity, backdrop, zIndex, backdropOnClick, modalState, }: BackdropProps) => react_jsx_runtime.JSX.Element | null;
|
|
444
444
|
|
|
445
|
-
type ModalProps = Omit<BackdropProps, 'modalState'> & Omit<UseModalInContainerParams, 'modalRef'
|
|
445
|
+
type ModalProps = Omit<BackdropProps, 'modalState'> & UseModalTransitionParams & Omit<UseModalInContainerParams, 'modalRef'> & {
|
|
446
446
|
id: string;
|
|
447
447
|
children: React__default.ReactNode;
|
|
448
|
-
isOpen: boolean;
|
|
449
|
-
onClose: () => void;
|
|
450
448
|
className?: string;
|
|
451
449
|
style?: React__default.CSSProperties;
|
|
452
450
|
rootStyle?: CSSProperties;
|
|
@@ -512,7 +510,9 @@ declare const Menu: {
|
|
|
512
510
|
({ children, isOpen, onClose, id, ...modalProps }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
513
511
|
Option: ({ children, label, asCheckbox, icon, id, disabled, selected, className, style, onClick, onKeyDown, }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
|
|
514
512
|
Divider: () => react_jsx_runtime.JSX.Element;
|
|
515
|
-
OptionsGroup: <T>(
|
|
513
|
+
OptionsGroup: <T>(p: MenuOptionsGroupProps<T> & {
|
|
514
|
+
ref?: ForwardedRef<HTMLUListElement>;
|
|
515
|
+
}) => ReactElement;
|
|
516
516
|
};
|
|
517
517
|
type MenuOptionsGroupProps<T> = InfinityScrollProps<T> & {
|
|
518
518
|
className?: string;
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject, ReactNode } from 'react';
|
|
3
|
+
import React__default, { HTMLAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, RefObject, ForwardedRef, ReactElement, ReactNode } from 'react';
|
|
4
4
|
import { UseControllerProps, FieldValues, SubmitHandler, DefaultValues, Mode } from 'react-hook-form';
|
|
5
|
-
import { M as ModalState, U as UseModalInContainerParams } from './use-modal-
|
|
5
|
+
import { M as ModalState, U as UseModalTransitionParams, a as UseModalInContainerParams } from './use-modal-transition-DBAyFSqW.js';
|
|
6
6
|
import { P as PositionContainer } from './get-modal-position-drle0OjP.js';
|
|
7
7
|
import * as csstype from 'csstype';
|
|
8
8
|
import { AnyObjectSchema } from 'yup';
|
|
@@ -442,11 +442,9 @@ type BackdropProps = {
|
|
|
442
442
|
};
|
|
443
443
|
declare const Backdrop: ({ opacity, backdrop, zIndex, backdropOnClick, modalState, }: BackdropProps) => react_jsx_runtime.JSX.Element | null;
|
|
444
444
|
|
|
445
|
-
type ModalProps = Omit<BackdropProps, 'modalState'> & Omit<UseModalInContainerParams, 'modalRef'
|
|
445
|
+
type ModalProps = Omit<BackdropProps, 'modalState'> & UseModalTransitionParams & Omit<UseModalInContainerParams, 'modalRef'> & {
|
|
446
446
|
id: string;
|
|
447
447
|
children: React__default.ReactNode;
|
|
448
|
-
isOpen: boolean;
|
|
449
|
-
onClose: () => void;
|
|
450
448
|
className?: string;
|
|
451
449
|
style?: React__default.CSSProperties;
|
|
452
450
|
rootStyle?: CSSProperties;
|
|
@@ -512,7 +510,9 @@ declare const Menu: {
|
|
|
512
510
|
({ children, isOpen, onClose, id, ...modalProps }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
513
511
|
Option: ({ children, label, asCheckbox, icon, id, disabled, selected, className, style, onClick, onKeyDown, }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
|
|
514
512
|
Divider: () => react_jsx_runtime.JSX.Element;
|
|
515
|
-
OptionsGroup: <T>(
|
|
513
|
+
OptionsGroup: <T>(p: MenuOptionsGroupProps<T> & {
|
|
514
|
+
ref?: ForwardedRef<HTMLUListElement>;
|
|
515
|
+
}) => ReactElement;
|
|
516
516
|
};
|
|
517
517
|
type MenuOptionsGroupProps<T> = InfinityScrollProps<T> & {
|
|
518
518
|
className?: string;
|