@particle-network/ui-react 0.3.2-beta.0 → 0.3.2-beta.2

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,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type IconProps } from '@/icons';
2
+ import { type IconProps } from '../../icons';
3
3
  import { type VStackProps } from '../layout';
4
4
  export interface UXEmptyProps extends VStackProps {
5
5
  iconProps?: IconProps;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type UXTooltipProps } from '@/components';
2
+ import { type UXTooltipProps } from '..';
3
3
  export type UXHintProps = UXTooltipProps & {
4
4
  triggerType?: 'hover' | 'click';
5
5
  buttonClassName?: string;
@@ -2,24 +2,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from "@heroui/modal";
4
4
  import { Center, Circle, Flex, Text, UXButton } from "../index.js";
5
- import useKeyboard from "../../hooks/useKeyboard.js";
6
5
  import { CloseIcon } from "../../icons/index.js";
7
6
  const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
8
- const { size, title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
9
- const { isKeyboardVisible } = useKeyboard();
7
+ const { title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
10
8
  return /*#__PURE__*/ jsx(Modal, {
11
9
  ref: ref,
12
10
  backdrop: backdrop,
13
11
  scrollBehavior: scrollBehavior,
14
- size: size,
15
12
  classNames: {
16
13
  wrapper: [
17
14
  'items-end md:items-center',
15
+ 'h-[var(--visual-viewport-height)]',
18
16
  classNames?.wrapper
19
17
  ],
20
18
  base: [
21
- 'py-6 gap-5 shadow-box m-0 max-md:rounded-b-none',
22
- isKeyboardVisible && 'full' !== size ? "!max-h-[400px] !min-h-[400px] overflow-y-auto" : 'max-h-[calc(100vh-48px)]',
19
+ 'py-6 gap-5 shadow-box',
20
+ 'max-h-[calc(100%-32px)] max-md:m-0 max-md:rounded-b-none',
23
21
  'md:max-h-[750px]',
24
22
  classNames?.base
25
23
  ],
@@ -56,17 +54,17 @@ const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
56
54
  ...restProps,
57
55
  children: /*#__PURE__*/ jsxs(ModalContent, {
58
56
  children: [
59
- title && /*#__PURE__*/ jsx(ModalHeader, {
57
+ title ? /*#__PURE__*/ jsx(ModalHeader, {
60
58
  className: "capitalize",
61
59
  children: title
62
- }),
60
+ }) : null,
63
61
  /*#__PURE__*/ jsx(ModalBody, {
64
62
  children: children
65
63
  }),
66
- footer && /*#__PURE__*/ jsx(ModalFooter, {
64
+ footer ? /*#__PURE__*/ jsx(ModalFooter, {
67
65
  children: footer
68
- }),
69
- tip && /*#__PURE__*/ jsx(ModalFooter, {
66
+ }) : null,
67
+ tip ? /*#__PURE__*/ jsx(ModalFooter, {
70
68
  className: "-mt-md",
71
69
  children: /*#__PURE__*/ jsxs(Flex, {
72
70
  gap: 2,
@@ -84,7 +82,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
84
82
  })
85
83
  ]
86
84
  })
87
- })
85
+ }) : null
88
86
  ]
89
87
  })
90
88
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.3.2-beta.0",
3
+ "version": "0.3.2-beta.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {