@parrot-co/parrot-ui 0.0.68 → 0.0.71

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/main.js CHANGED
@@ -1538,8 +1538,8 @@ const $04e5d96aee536e27$var$Socket = (0, $80923bc9c1ba824c$export$3817b7a54a07ce
1538
1538
  }
1539
1539
  }
1540
1540
  });
1541
- const $04e5d96aee536e27$var$Sockets = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ append: append , prepend: prepend , children: children , ...props }, ref)=>{
1542
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $04e5d96aee536e27$import$867d6c90a4013129$ffb0004e005737fa), {
1541
+ function $04e5d96aee536e27$var$Sockets({ append: append , prepend: prepend , children: children }) {
1542
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $E4F9t$reactjsxruntime.Fragment), {
1543
1543
  children: [
1544
1544
  prepend && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($04e5d96aee536e27$var$Socket, {
1545
1545
  side: "left",
@@ -1554,8 +1554,7 @@ const $04e5d96aee536e27$var$Sockets = /*#__PURE__*/ (0, ($parcel$interopDefault(
1554
1554
  })
1555
1555
  ]
1556
1556
  });
1557
- });
1558
- $04e5d96aee536e27$var$Sockets.displayName = "Sockets";
1557
+ }
1559
1558
  var $04e5d96aee536e27$export$2e2bcd8739ae039 = $04e5d96aee536e27$var$Sockets;
1560
1559
 
1561
1560
 
@@ -4995,23 +4994,46 @@ function $c07c6db9734c74af$export$e6a97ba2cae5bb94({ items: items , render: rend
4995
4994
 
4996
4995
 
4997
4996
 
4998
- const $ceb05569908c0e0d$var$ModalOverlay = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
4997
+ const $ceb05569908c0e0d$var$ModalUnderlay = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
4999
4998
  position: "fixed",
5000
4999
  top: 0,
5001
5000
  right: 0,
5002
5001
  bottom: 0,
5003
5002
  left: 0,
5004
- display: "flex",
5005
- alignItems: "center",
5006
- justifyContent: "center",
5007
- background: "$blackA8"
5003
+ background: "$blackA8",
5004
+ width: "100vw",
5005
+ height: "100vh"
5006
+ });
5007
+ const $ceb05569908c0e0d$var$ModalContainer = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5008
+ display: "grid",
5009
+ width: "100vw",
5010
+ height: "100vh",
5011
+ p: 12
5008
5012
  });
5009
5013
  const $ceb05569908c0e0d$var$ModalContent = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5010
5014
  background: "white",
5011
- borderRadius: 12
5015
+ borderRadius: 12,
5016
+ display: "grid",
5017
+ gridTemplateRows: "1fr, 60px",
5018
+ flexDirection: "column",
5019
+ defaultVariants: {
5020
+ variant: "modal"
5021
+ },
5022
+ variants: {
5023
+ variant: {
5024
+ modal: {
5025
+ alignSelf: "center",
5026
+ justifySelf: "center"
5027
+ },
5028
+ drawer: {
5029
+ justifySelf: "end"
5030
+ }
5031
+ }
5032
+ }
5012
5033
  });
5013
5034
  const $ceb05569908c0e0d$var$ModalFooter = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5014
- p: 16
5035
+ p: 16,
5036
+ alignSelf: "flex-end"
5015
5037
  });
5016
5038
  const $ceb05569908c0e0d$var$ModalHead = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5017
5039
  p: 16,
@@ -5020,14 +5042,17 @@ const $ceb05569908c0e0d$var$ModalHead = (0, $80923bc9c1ba824c$export$3817b7a54a0
5020
5042
  const $ceb05569908c0e0d$var$ModalBody = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5021
5043
  p: 16
5022
5044
  });
5023
- function $ceb05569908c0e0d$export$c6fdb837b070b4ff({ state: state , children: children , ...props }) {
5045
+ function $ceb05569908c0e0d$export$c6fdb837b070b4ff({ state: state , children: children , css: css , ...props }) {
5024
5046
  const modalRef = $E4F9t$react.useRef(null);
5025
5047
  const { modalProps: modalProps , underlayProps: underlayProps } = (0, $E4F9t$reactaria.useModalOverlay)(props, state, modalRef);
5026
5048
  if (!state.isOpen) return null;
5027
5049
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactaria.Overlay), {
5028
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$var$ModalOverlay, {
5050
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$var$ModalUnderlay, {
5051
+ className: "underlay",
5052
+ css: css,
5029
5053
  ...underlayProps,
5030
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5054
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$var$ModalContainer, {
5055
+ className: "modal-container",
5031
5056
  ...modalProps,
5032
5057
  ref: modalRef,
5033
5058
  children: children
@@ -5035,44 +5060,50 @@ function $ceb05569908c0e0d$export$c6fdb837b070b4ff({ state: state , children: ch
5035
5060
  })
5036
5061
  });
5037
5062
  }
5038
- function $ceb05569908c0e0d$var$Dialog({ width: width = 400 , title: title , onCancel: onCancel , onConfirm: onConfirm , confirmLabel: confirmLabel = "Confirm" , cancelLabel: cancelLabel = "Cancel" , description: description , children: children , state: state , confirmButtonProps: confirmButtonProps , cancelButtonProps: cancelButtonProps }) {
5063
+ function $ceb05569908c0e0d$var$Dialog({ width: width = 400 , title: title , onCancel: onCancel , onConfirm: onConfirm , confirmLabel: confirmLabel = "Confirm" , cancelLabel: cancelLabel = "Cancel" , description: description , children: children , state: state , confirmButtonProps: confirmButtonProps , cancelButtonProps: cancelButtonProps , variant: variant }) {
5039
5064
  const dialogRef = $E4F9t$react.useRef(null);
5040
5065
  const { dialogProps: dialogProps , titleProps: titleProps } = (0, $E4F9t$reactaria.useDialog)({
5041
5066
  role: "alertdialog"
5042
5067
  }, dialogRef);
5043
5068
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalContent, {
5069
+ variant: variant,
5044
5070
  css: {
5045
5071
  width: width
5046
5072
  },
5047
5073
  ref: dialogRef,
5048
5074
  ...dialogProps,
5049
5075
  children: [
5050
- /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalHead, {
5076
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5051
5077
  stack: true,
5052
- gap: 2,
5053
- className: "modal-head",
5054
5078
  children: [
5055
- title && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5056
- weight: "medium",
5057
- size: "lg",
5058
- color: "black",
5059
- ...titleProps,
5060
- as: "div",
5061
- children: title
5079
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalHead, {
5080
+ stack: true,
5081
+ gap: 2,
5082
+ className: "modal-head",
5083
+ children: [
5084
+ title && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5085
+ weight: "medium",
5086
+ size: "lg",
5087
+ color: "black",
5088
+ ...titleProps,
5089
+ as: "div",
5090
+ children: title
5091
+ }),
5092
+ description && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5093
+ lineHeight: "base",
5094
+ size: "sm",
5095
+ color: "light",
5096
+ as: "div",
5097
+ children: description
5098
+ })
5099
+ ]
5062
5100
  }),
5063
- description && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5064
- lineHeight: "base",
5065
- size: "sm",
5066
- color: "light",
5067
- as: "div",
5068
- children: description
5101
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5102
+ className: "modal-body",
5103
+ children: children
5069
5104
  })
5070
5105
  ]
5071
5106
  }),
5072
- /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5073
- className: "modal-body",
5074
- children: children
5075
- }),
5076
5107
  (onConfirm || onCancel) && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalFooter, {
5077
5108
  gap: 2,
5078
5109
  justify: "end",