@parrot-co/parrot-ui 0.0.68 → 0.0.70

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/module.js CHANGED
@@ -4951,23 +4951,46 @@ function $cdf79c1aee6c465f$export$e6a97ba2cae5bb94({ items: items , render: rend
4951
4951
 
4952
4952
 
4953
4953
 
4954
- const $9da3b07c262d31a5$var$ModalOverlay = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $d22d8a7881f7b33f$export$2e2bcd8739ae039), {
4954
+ const $9da3b07c262d31a5$var$ModalUnderlay = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $d22d8a7881f7b33f$export$2e2bcd8739ae039), {
4955
4955
  position: "fixed",
4956
4956
  top: 0,
4957
4957
  right: 0,
4958
4958
  bottom: 0,
4959
4959
  left: 0,
4960
- display: "flex",
4961
- alignItems: "center",
4962
- justifyContent: "center",
4963
- background: "$blackA8"
4960
+ background: "$blackA8",
4961
+ width: "100vw",
4962
+ height: "100vh"
4963
+ });
4964
+ const $9da3b07c262d31a5$var$ModalContainer = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $d22d8a7881f7b33f$export$2e2bcd8739ae039), {
4965
+ display: "grid",
4966
+ width: "100vw",
4967
+ height: "100vh",
4968
+ p: 12
4964
4969
  });
4965
4970
  const $9da3b07c262d31a5$var$ModalContent = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $d22d8a7881f7b33f$export$2e2bcd8739ae039), {
4966
4971
  background: "white",
4967
- borderRadius: 12
4972
+ borderRadius: 12,
4973
+ display: "grid",
4974
+ gridTemplateRows: "1fr, 60px",
4975
+ flexDirection: "column",
4976
+ defaultVariants: {
4977
+ variant: "modal"
4978
+ },
4979
+ variants: {
4980
+ variant: {
4981
+ modal: {
4982
+ alignSelf: "center",
4983
+ justifySelf: "center"
4984
+ },
4985
+ drawer: {
4986
+ justifySelf: "end"
4987
+ }
4988
+ }
4989
+ }
4968
4990
  });
4969
4991
  const $9da3b07c262d31a5$var$ModalFooter = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
4970
- p: 16
4992
+ p: 16,
4993
+ alignSelf: "flex-end"
4971
4994
  });
4972
4995
  const $9da3b07c262d31a5$var$ModalHead = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
4973
4996
  p: 16,
@@ -4976,14 +4999,17 @@ const $9da3b07c262d31a5$var$ModalHead = (0, $9ade691eb9e41cfb$export$3817b7a54a0
4976
4999
  const $9da3b07c262d31a5$var$ModalBody = (0, $9ade691eb9e41cfb$export$3817b7a54a07cec7)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
4977
5000
  p: 16
4978
5001
  });
4979
- function $9da3b07c262d31a5$export$c6fdb837b070b4ff({ state: state , children: children , ...props }) {
5002
+ function $9da3b07c262d31a5$export$c6fdb837b070b4ff({ state: state , children: children , css: css , ...props }) {
4980
5003
  const modalRef = $kF5Av$useRef(null);
4981
5004
  const { modalProps: modalProps , underlayProps: underlayProps } = (0, $kF5Av$useModalOverlay)(props, state, modalRef);
4982
5005
  if (!state.isOpen) return null;
4983
5006
  return /*#__PURE__*/ (0, $kF5Av$jsx)((0, $kF5Av$Overlay), {
4984
- children: /*#__PURE__*/ (0, $kF5Av$jsx)($9da3b07c262d31a5$var$ModalOverlay, {
5007
+ children: /*#__PURE__*/ (0, $kF5Av$jsx)($9da3b07c262d31a5$var$ModalUnderlay, {
5008
+ className: "underlay",
5009
+ css: css,
4985
5010
  ...underlayProps,
4986
- children: /*#__PURE__*/ (0, $kF5Av$jsx)((0, $d22d8a7881f7b33f$export$2e2bcd8739ae039), {
5011
+ children: /*#__PURE__*/ (0, $kF5Av$jsx)($9da3b07c262d31a5$var$ModalContainer, {
5012
+ className: "modal-container",
4987
5013
  ...modalProps,
4988
5014
  ref: modalRef,
4989
5015
  children: children
@@ -4991,44 +5017,50 @@ function $9da3b07c262d31a5$export$c6fdb837b070b4ff({ state: state , children: ch
4991
5017
  })
4992
5018
  });
4993
5019
  }
4994
- function $9da3b07c262d31a5$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 }) {
5020
+ function $9da3b07c262d31a5$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 }) {
4995
5021
  const dialogRef = $kF5Av$useRef(null);
4996
5022
  const { dialogProps: dialogProps , titleProps: titleProps } = (0, $kF5Av$useDialog)({
4997
5023
  role: "alertdialog"
4998
5024
  }, dialogRef);
4999
5025
  return /*#__PURE__*/ (0, $kF5Av$jsxs)($9da3b07c262d31a5$var$ModalContent, {
5026
+ variant: variant,
5000
5027
  css: {
5001
5028
  width: width
5002
5029
  },
5003
5030
  ref: dialogRef,
5004
5031
  ...dialogProps,
5005
5032
  children: [
5006
- /*#__PURE__*/ (0, $kF5Av$jsxs)($9da3b07c262d31a5$var$ModalHead, {
5033
+ /*#__PURE__*/ (0, $kF5Av$jsxs)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
5007
5034
  stack: true,
5008
- gap: 2,
5009
- className: "modal-head",
5010
5035
  children: [
5011
- title && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $4fdef5d0844b7575$export$2e2bcd8739ae039), {
5012
- weight: "medium",
5013
- size: "lg",
5014
- color: "black",
5015
- ...titleProps,
5016
- as: "div",
5017
- children: title
5036
+ /*#__PURE__*/ (0, $kF5Av$jsxs)($9da3b07c262d31a5$var$ModalHead, {
5037
+ stack: true,
5038
+ gap: 2,
5039
+ className: "modal-head",
5040
+ children: [
5041
+ title && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $4fdef5d0844b7575$export$2e2bcd8739ae039), {
5042
+ weight: "medium",
5043
+ size: "lg",
5044
+ color: "black",
5045
+ ...titleProps,
5046
+ as: "div",
5047
+ children: title
5048
+ }),
5049
+ description && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $4fdef5d0844b7575$export$2e2bcd8739ae039), {
5050
+ lineHeight: "base",
5051
+ size: "sm",
5052
+ color: "light",
5053
+ as: "div",
5054
+ children: description
5055
+ })
5056
+ ]
5018
5057
  }),
5019
- description && /*#__PURE__*/ (0, $kF5Av$jsx)((0, $4fdef5d0844b7575$export$2e2bcd8739ae039), {
5020
- lineHeight: "base",
5021
- size: "sm",
5022
- color: "light",
5023
- as: "div",
5024
- children: description
5058
+ /*#__PURE__*/ (0, $kF5Av$jsx)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
5059
+ className: "modal-body",
5060
+ children: children
5025
5061
  })
5026
5062
  ]
5027
5063
  }),
5028
- /*#__PURE__*/ (0, $kF5Av$jsx)((0, $391d62e0590dec97$export$2e2bcd8739ae039), {
5029
- className: "modal-body",
5030
- children: children
5031
- }),
5032
5064
  (onConfirm || onCancel) && /*#__PURE__*/ (0, $kF5Av$jsxs)($9da3b07c262d31a5$var$ModalFooter, {
5033
5065
  gap: 2,
5034
5066
  justify: "end",