@povio/ui 2.1.21 → 2.1.23
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/Modal.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
8
|
import { Dialog, Modal, ModalOverlay } from "react-aria-components";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
|
-
const Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable = true, shouldCloseOnInteractOutside }) => {
|
|
10
|
+
const Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable = true, isKeyboardDismissable, shouldCloseOnInteractOutside }) => {
|
|
11
11
|
const { t } = useTranslation("ui");
|
|
12
12
|
const uiStyle = UIStyle.useConfig();
|
|
13
13
|
const modalMainCva = uiStyle?.modal?.mainCva ?? modalMain;
|
|
@@ -20,6 +20,7 @@ const Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalCl
|
|
|
20
20
|
className: overlayClassName
|
|
21
21
|
}),
|
|
22
22
|
isDismissable,
|
|
23
|
+
isKeyboardDismissDisabled: !(isKeyboardDismissable ?? isDismissable),
|
|
23
24
|
isOpen,
|
|
24
25
|
shouldCloseOnInteractOutside: () => {
|
|
25
26
|
if (shouldCloseOnInteractOutside) {
|
package/dist/SelectDesktop.js
CHANGED
|
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { clsx } from "clsx";
|
|
9
9
|
import { ComboBox, DialogTrigger, Popover } from "react-aria-components";
|
|
10
10
|
import { Fragment as Fragment$1, useMemo, useRef } from "react";
|
|
11
|
-
import { useLabel } from "react-aria";
|
|
11
|
+
import { useLabel, usePreventScroll } from "react-aria";
|
|
12
12
|
import { mergeRefs } from "@react-aria/utils";
|
|
13
13
|
import useMeasure from "react-use-measure";
|
|
14
14
|
const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, inputClassName, containerClassName, customTrigger, onBlur,...props }) => {
|
|
@@ -31,6 +31,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
31
31
|
const closeComboBoxRef = useRef(null);
|
|
32
32
|
const [wrapperRef, { width }] = useMeasure();
|
|
33
33
|
const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
|
|
34
|
+
usePreventScroll({ isDisabled: !isOpen });
|
|
34
35
|
const onSelectionChange = (value) => {
|
|
35
36
|
if (!value) return;
|
|
36
37
|
if (value === "all-item-id") {
|
|
@@ -136,7 +137,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
136
137
|
offset: 0,
|
|
137
138
|
children: /* @__PURE__ */ jsx(SelectListBox, {
|
|
138
139
|
...props,
|
|
139
|
-
className: "max-h-80 rounded-list-rounding-dropdown border border-elevation-outline-default-1 bg-elevation-fill-default-1 shadow-5 [scrollbar-width:thin]",
|
|
140
|
+
className: "max-h-80! rounded-list-rounding-dropdown border border-elevation-outline-default-1 bg-elevation-fill-default-1 shadow-5 [scrollbar-width:thin]",
|
|
140
141
|
autoFocus: !isSearchable
|
|
141
142
|
})
|
|
142
143
|
})]
|
|
@@ -9,6 +9,7 @@ export interface ModalProps extends ModalVariantProps {
|
|
|
9
9
|
overlayClassName?: string;
|
|
10
10
|
showCloseIcon?: boolean;
|
|
11
11
|
isDismissable?: boolean;
|
|
12
|
+
isKeyboardDismissable?: boolean;
|
|
12
13
|
shouldCloseOnInteractOutside?: () => boolean;
|
|
13
14
|
}
|
|
14
|
-
export declare const Modal: ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable, shouldCloseOnInteractOutside, }: PropsWithChildren<ModalProps>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Modal: ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable, isKeyboardDismissable, shouldCloseOnInteractOutside, }: PropsWithChildren<ModalProps>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/input.cva.js
CHANGED
|
@@ -2,7 +2,7 @@ import { UIStyle } from "./uiStyle.context.js";
|
|
|
2
2
|
import { uiOutlineClass } from "./outline.clsx.js";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
const inputBase = cva([uiOutlineClass, "flex w-full truncate"], {
|
|
5
|
+
const inputBase = cva([uiOutlineClass, "flex w-full not-[textarea]:truncate"], {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
outlined: "",
|