@dreamcommerce/aurora 3.1.64-1 → 3.1.65-1

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.
@@ -33,6 +33,7 @@ var ModalContent = /*#__PURE__*/React__default['default'].forwardRef(function (_
33
33
  var _useScroll = use_scroll.useScroll(contentRef),
34
34
  atBottom = _useScroll.atBottom,
35
35
  hasScroll = _useScroll.hasScroll;
36
+ var isCustomWidth = !!width && !Object.values(modal_constants.MODAL_WIDTH_VARIANT).includes(width);
36
37
  return /*#__PURE__*/React__default['default'].createElement("div", {
37
38
  className: "aurora-fixed aurora-w-full aurora-h-full aurora-flex aurora-z-[1000] aurora-top-0 aurora-left-0 aurora-pointer-events-none"
38
39
  }, /*#__PURE__*/React__default['default'].createElement(index.Content, {
@@ -46,8 +47,11 @@ var ModalContent = /*#__PURE__*/React__default['default'].forwardRef(function (_
46
47
  "data-modal-content": "true",
47
48
  "data-test-id": "modal",
48
49
  className: cn.cn(modal_variants.modalVariants({
49
- width: width
50
+ width: isCustomWidth ? undefined : width
50
51
  }), className),
52
+ style: isCustomWidth ? {
53
+ maxWidth: width
54
+ } : undefined,
51
55
  ref: ref
52
56
  }, header && (/*#__PURE__*/React__default['default'].createElement(modal_header.ModalHeader, {
53
57
  hasCloseIcon: modal_utils.ModalUtils.isHeaderObject(header) ? (_header$hasCloseIcon = header.hasCloseIcon) !== null && _header$hasCloseIcon !== void 0 ? _header$hasCloseIcon : true : true
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wEAA4E;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wEAA4E;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -10,9 +10,7 @@ var modalVariants = index.cva('aurora-flex aurora-flex-col aurora-w-full aurora-
10
10
  variants: {
11
11
  width: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, modal_constants.MODAL_WIDTH_VARIANT.s, 'aurora-max-w-[25rem]'), modal_constants.MODAL_WIDTH_VARIANT.m, 'aurora-max-w-[40rem]'), modal_constants.MODAL_WIDTH_VARIANT.l, 'aurora-max-w-[61rem]')
12
12
  },
13
- defaultVariants: {
14
- width: modal_constants.MODAL_WIDTH_VARIANT.m
15
- }
13
+ defaultVariants: {}
16
14
  });
17
15
 
18
16
  exports.modalVariants = modalVariants;
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -25,6 +25,7 @@ var ModalContent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
25
25
  var _useScroll = useScroll(contentRef),
26
26
  atBottom = _useScroll.atBottom,
27
27
  hasScroll = _useScroll.hasScroll;
28
+ var isCustomWidth = !!width && !Object.values(MODAL_WIDTH_VARIANT).includes(width);
28
29
  return /*#__PURE__*/React__default.createElement("div", {
29
30
  className: "aurora-fixed aurora-w-full aurora-h-full aurora-flex aurora-z-[1000] aurora-top-0 aurora-left-0 aurora-pointer-events-none"
30
31
  }, /*#__PURE__*/React__default.createElement(Content, {
@@ -38,8 +39,11 @@ var ModalContent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
38
39
  "data-modal-content": "true",
39
40
  "data-test-id": "modal",
40
41
  className: cn(modalVariants({
41
- width: width
42
+ width: isCustomWidth ? undefined : width
42
43
  }), className),
44
+ style: isCustomWidth ? {
45
+ maxWidth: width
46
+ } : undefined,
43
47
  ref: ref
44
48
  }, header && (/*#__PURE__*/React__default.createElement(ModalHeader, {
45
49
  hasCloseIcon: ModalUtils.isHeaderObject(header) ? (_header$hasCloseIcon = header.hasCloseIcon) !== null && _header$hasCloseIcon !== void 0 ? _header$hasCloseIcon : true : true
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA,wBAAwB,wEAA4E;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA,wBAAwB,wEAA4E;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -12,7 +12,7 @@ export interface IModalsManagerContextProps {
12
12
  export interface IModalNewProps extends React.HTMLAttributes<HTMLDivElement> {
13
13
  name: string;
14
14
  hideAllModalsOnClose?: boolean;
15
- width?: typeof MODAL_WIDTH_VARIANT[keyof typeof MODAL_WIDTH_VARIANT];
15
+ width?: typeof MODAL_WIDTH_VARIANT[keyof typeof MODAL_WIDTH_VARIANT] | (string & {});
16
16
  onCloseAction?: () => void;
17
17
  header?: THeaderObject | React.ReactNode | string;
18
18
  footer?: string | React.ReactNode;
@@ -6,9 +6,7 @@ var modalVariants = cva('aurora-flex aurora-flex-col aurora-w-full aurora-max-h-
6
6
  variants: {
7
7
  width: _defineProperty(_defineProperty(_defineProperty({}, MODAL_WIDTH_VARIANT.s, 'aurora-max-w-[25rem]'), MODAL_WIDTH_VARIANT.m, 'aurora-max-w-[40rem]'), MODAL_WIDTH_VARIANT.l, 'aurora-max-w-[61rem]')
8
8
  },
9
- defaultVariants: {
10
- width: MODAL_WIDTH_VARIANT.m
11
- }
9
+ defaultVariants: {}
12
10
  });
13
11
 
14
12
  export { modalVariants };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}