@particle-network/ui-react 0.3.2-beta.1 → 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.
@@ -4,19 +4,20 @@ import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader } from "@herou
4
4
  import { Center, Circle, Flex, Text, UXButton } from "../index.js";
5
5
  import { CloseIcon } from "../../icons/index.js";
6
6
  const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
7
- const { size, title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
7
+ const { title, footer, backdrop, scrollBehavior = 'inside', children, titleAlign = 'left', classNames, tip, ...restProps } = props;
8
8
  return /*#__PURE__*/ jsx(Modal, {
9
9
  ref: ref,
10
10
  backdrop: backdrop,
11
11
  scrollBehavior: scrollBehavior,
12
- size: size,
13
12
  classNames: {
14
13
  wrapper: [
15
14
  'items-end md:items-center',
15
+ 'h-[var(--visual-viewport-height)]',
16
16
  classNames?.wrapper
17
17
  ],
18
18
  base: [
19
- 'py-6 gap-5 shadow-box m-0 max-md:rounded-b-none',
19
+ 'py-6 gap-5 shadow-box',
20
+ 'max-h-[calc(100%-32px)] max-md:m-0 max-md:rounded-b-none',
20
21
  'md:max-h-[750px]',
21
22
  classNames?.base
22
23
  ],
@@ -53,17 +54,17 @@ const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
53
54
  ...restProps,
54
55
  children: /*#__PURE__*/ jsxs(ModalContent, {
55
56
  children: [
56
- title && /*#__PURE__*/ jsx(ModalHeader, {
57
+ title ? /*#__PURE__*/ jsx(ModalHeader, {
57
58
  className: "capitalize",
58
59
  children: title
59
- }),
60
+ }) : null,
60
61
  /*#__PURE__*/ jsx(ModalBody, {
61
62
  children: children
62
63
  }),
63
- footer && /*#__PURE__*/ jsx(ModalFooter, {
64
+ footer ? /*#__PURE__*/ jsx(ModalFooter, {
64
65
  children: footer
65
- }),
66
- tip && /*#__PURE__*/ jsx(ModalFooter, {
66
+ }) : null,
67
+ tip ? /*#__PURE__*/ jsx(ModalFooter, {
67
68
  className: "-mt-md",
68
69
  children: /*#__PURE__*/ jsxs(Flex, {
69
70
  gap: 2,
@@ -81,7 +82,7 @@ const UXModal = /*#__PURE__*/ forwardRef((props, ref)=>{
81
82
  })
82
83
  ]
83
84
  })
84
- })
85
+ }) : null
85
86
  ]
86
87
  })
87
88
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.3.2-beta.1",
3
+ "version": "0.3.2-beta.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {