@dreamcommerce/aurora 3.1.64 → 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.
@@ -31,7 +31,7 @@ var MessageBox = /*#__PURE__*/React__default['default'].forwardRef(function (_re
31
31
  var iconColor = message_box_constants.MESSAGE_BOX_ICON_COLORS[variant];
32
32
  return /*#__PURE__*/React__default['default'].createElement("div", {
33
33
  ref: ref,
34
- className: cn.cn('message-box-link-icon', message_box_variants.messageBoxVariants({
34
+ className: cn.cn('aurora-external-link-icon', message_box_variants.messageBoxVariants({
35
35
  variant: variant
36
36
  }), {
37
37
  'aurora-w-full': fullWidth,
@@ -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;"}
@@ -18,7 +18,7 @@ var TooltipContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
18
18
  return /*#__PURE__*/React.createElement(index.Portal, null, /*#__PURE__*/React.createElement(index.Content, _rollupPluginBabelHelpers.objectSpread2({
19
19
  ref: ref,
20
20
  sideOffset: sideOffset,
21
- className: cn.cn('aurora-z-[99999] aurora-max-w-[320px] aurora-shadow aurora-overflow-hidden aurora-border aurora-rounded-8 aurora-px-3 aurora-py-2 aurora-text-xs aurora-animate-in aurora-fade-in-0 data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2', 'js__aurora-tooltip-content', tooltip_content_variants.tooltipContentVariants({
21
+ className: cn.cn('aurora-external-link-icon', 'aurora-z-[99999] aurora-max-w-[320px] aurora-shadow aurora-overflow-hidden aurora-border aurora-rounded-8 aurora-px-3 aurora-py-2 aurora-text-xs aurora-animate-in aurora-fade-in-0 data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2', 'js__aurora-tooltip-content', tooltip_content_variants.tooltipContentVariants({
22
22
  variant: variant
23
23
  }), className)
24
24
  }, props)));
@@ -23,7 +23,7 @@ var MessageBox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
23
23
  var iconColor = MESSAGE_BOX_ICON_COLORS[variant];
24
24
  return /*#__PURE__*/React__default.createElement("div", {
25
25
  ref: ref,
26
- className: cn('message-box-link-icon', messageBoxVariants({
26
+ className: cn('aurora-external-link-icon', messageBoxVariants({
27
27
  variant: variant
28
28
  }), {
29
29
  'aurora-w-full': fullWidth,
@@ -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;"}
@@ -14,7 +14,7 @@ var TooltipContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
14
14
  return /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(Content2, _objectSpread2({
15
15
  ref: ref,
16
16
  sideOffset: sideOffset,
17
- className: cn('aurora-z-[99999] aurora-max-w-[320px] aurora-shadow aurora-overflow-hidden aurora-border aurora-rounded-8 aurora-px-3 aurora-py-2 aurora-text-xs aurora-animate-in aurora-fade-in-0 data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2', 'js__aurora-tooltip-content', tooltipContentVariants({
17
+ className: cn('aurora-external-link-icon', 'aurora-z-[99999] aurora-max-w-[320px] aurora-shadow aurora-overflow-hidden aurora-border aurora-rounded-8 aurora-px-3 aurora-py-2 aurora-text-xs aurora-animate-in aurora-fade-in-0 data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2', 'js__aurora-tooltip-content', tooltipContentVariants({
18
18
  variant: variant
19
19
  }), className)
20
20
  }, props)));