@cypress-design/react-modal 0.2.1 → 1.0.0

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.
@@ -2,5 +2,5 @@ $ yarn build:module && yarn build:types
2
2
  $ rollup -c ./rollup.config.mjs
3
3
  
4
4
  ./index.ts → ./dist/index.umd.js, ./dist/index.es.mjs...
5
- created ./dist/index.umd.js, ./dist/index.es.mjs in 47.3s
5
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 23.3s
6
6
  $ tsc --project ./tsconfig.build.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @cypress-design/react-modal
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`63fb4d9`](https://github.com/cypress-io/cypress-design/commit/63fb4d9e60f6c56c563d17e3b983d0ebd25e0e87) Thanks [@elevatebart](https://github.com/elevatebart)! - Create 1.0
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`63fb4d9`](https://github.com/cypress-io/cypress-design/commit/63fb4d9e60f6c56c563d17e3b983d0ebd25e0e87)]:
12
+ - @cypress-design/react-icon@1.0.0
13
+ - @cypress-design/constants-modal@1.0.0
14
+
15
+ ## 0.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#351](https://github.com/cypress-io/cypress-design/pull/351) [`98322c8`](https://github.com/cypress-io/cypress-design/commit/98322c8ca62a62f3462457704a0d3a06beb84be2) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor: build dialog using dialog html
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [[`98322c8`](https://github.com/cypress-io/cypress-design/commit/98322c8ca62a62f3462457704a0d3a06beb84be2)]:
24
+ - @cypress-design/constants-modal@0.3.0
25
+
3
26
  ## 0.2.1
4
27
 
5
28
  ### Patch Changes
package/Modal.tsx CHANGED
@@ -6,7 +6,6 @@ import {
6
6
  IconActionDelete,
7
7
  } from '@cypress-design/react-icon'
8
8
  import {
9
- ClassBackDrop,
10
9
  ClassCloseButton,
11
10
  ClassContent,
12
11
  ClassHelpLink,
@@ -14,7 +13,6 @@ import {
14
13
  ClassModal,
15
14
  ClassModalFullscreenDimensions,
16
15
  ClassModalStandardDimensions,
17
- ClassModalContainer,
18
16
  ClassTitle,
19
17
  ClassTitleBox,
20
18
  disableBodyScroll,
@@ -38,13 +36,17 @@ export const Modal: React.FC<ModalProps> = ({
38
36
  children,
39
37
  fullscreen = false,
40
38
  }) => {
39
+ const dialogRef = React.useRef<HTMLDialogElement>(null)
40
+
41
41
  React.useEffect(() => {
42
42
  if (show) {
43
43
  disableBodyScroll()
44
+ dialogRef.current?.showModal()
44
45
  } else {
46
+ dialogRef.current?.close()
45
47
  freeBodyScroll()
46
48
  }
47
- }, [show])
49
+ }, [show, onClose])
48
50
 
49
51
  React.useEffect(
50
52
  () => () => {
@@ -53,61 +55,69 @@ export const Modal: React.FC<ModalProps> = ({
53
55
  [],
54
56
  )
55
57
 
58
+ const closeOnClickBackdrop = React.useCallback<
59
+ React.MouseEventHandler<HTMLDialogElement>
60
+ >(
61
+ (event) => {
62
+ const rect = dialogRef.current?.getBoundingClientRect()
63
+ if (!rect) return
64
+ const isInDialog =
65
+ rect.top <= event.clientY &&
66
+ event.clientY <= rect.top + rect.height &&
67
+ rect.left <= event.clientX &&
68
+ event.clientX <= rect.left + rect.width
69
+ if (!isInDialog) {
70
+ onClose?.()
71
+ }
72
+ },
73
+ [onClose],
74
+ )
75
+
56
76
  return (
57
77
  show &&
58
78
  createPortal(
59
- <div>
60
- <div className={ClassBackDrop} onClick={() => onClose?.()}></div>
79
+ <dialog
80
+ ref={dialogRef}
81
+ className={clsx(
82
+ show ? ClassModal : null,
83
+ fullscreen
84
+ ? ClassModalFullscreenDimensions
85
+ : ClassModalStandardDimensions,
86
+ )}
87
+ onClick={closeOnClickBackdrop}
88
+ >
89
+ <div className={ClassTitleBox}>
90
+ <div id="cy_modal_label" className={ClassTitle}>
91
+ {title}
92
+ </div>
93
+ {helpLink ? <div className={ClassHelpLinkDash} /> : null}
94
+ {helpLink ? (
95
+ <a href={helpLink} className={ClassHelpLink}>
96
+ Need help
97
+ <IconActionQuestionMarkCircle
98
+ className="ml-[4px]"
99
+ stroke-color="indigo-500"
100
+ fill-color="indigo-100"
101
+ />
102
+ </a>
103
+ ) : null}
61
104
 
62
- <div
63
- className={ClassModalContainer}
64
- tabIndex={-1}
65
- aria-modal="true"
66
- aria-labelledby="cy_modal_label"
67
- role="dialog"
68
- >
69
- <div
70
- className={clsx(
71
- ClassModal,
72
- fullscreen
73
- ? ClassModalFullscreenDimensions
74
- : ClassModalStandardDimensions,
75
- )}
105
+ <div className="grow" />
106
+ <button
107
+ aria-label="Close"
108
+ className={ClassCloseButton}
109
+ onClick={() => onClose?.()}
76
110
  >
77
- <div className={ClassTitleBox}>
78
- <div id="cy_modal_label" className={ClassTitle}>
79
- {title}
80
- </div>
81
- {helpLink ? <div className={ClassHelpLinkDash} /> : null}
82
- {helpLink ? (
83
- <a href={helpLink} className={ClassHelpLink}>
84
- Need help
85
- <IconActionQuestionMarkCircle
86
- className="ml-[4px]"
87
- stroke-color="indigo-500"
88
- fill-color="indigo-100"
89
- />
90
- </a>
91
- ) : null}
92
-
93
- <div className="grow" />
94
- <button
95
- aria-label="Close"
96
- className={ClassCloseButton}
97
- onClick={() => onClose?.()}
98
- >
99
- <IconActionDelete
100
- className="children:transition-all"
101
- stroke-color="gray-400"
102
- hover-stroke-color="gray-700"
103
- interactiveColorsOnGroup
104
- />
105
- </button>
106
- </div>
107
- <div className={ClassContent}>{children}</div>
108
- </div>
111
+ <IconActionDelete
112
+ className="children:transition-all"
113
+ stroke-color="gray-400"
114
+ hover-stroke-color="gray-700"
115
+ interactiveColorsOnGroup
116
+ />
117
+ </button>
109
118
  </div>
110
- </div>,
119
+ <div className={ClassContent}>{children}</div>
120
+ </dialog>,
111
121
  document.body,
112
122
  )
113
123
  )
package/ModalReact.cy.tsx CHANGED
@@ -38,7 +38,7 @@ describe('Modal', () => {
38
38
  title?: string
39
39
  helpLink?: string
40
40
  fullscreen?: boolean
41
- } = {}
41
+ } = {},
42
42
  ) {
43
43
  mount(<ComponentUsingModal {...options} />)
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"./","sources":["Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuB9B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAiFtC,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"./","sources":["Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6FtC,CAAA;AAED,eAAe,KAAK,CAAA"}
package/dist/index.es.mjs CHANGED
@@ -7004,7 +7004,7 @@ function requireReactDom_development () {
7004
7004
  return a !== 0 && a < b ? a : b;
7005
7005
  }
7006
7006
  function lowerEventPriority(a, b) {
7007
- return a === 0 || a > b ? a : b;
7007
+ return a > b ? a : b;
7008
7008
  }
7009
7009
  function isHigherEventPriority(a, b) {
7010
7010
  return a !== 0 && a < b;
@@ -10125,7 +10125,7 @@ function requireReactDom_development () {
10125
10125
 
10126
10126
  var isCapturePhaseListener = false;
10127
10127
  var listenerSet = getEventListenerSet(targetElement);
10128
- var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
10128
+ var listenerSetKey = getListenerSetKey(domEventName);
10129
10129
 
10130
10130
  if (!listenerSet.has(listenerSetKey)) {
10131
10131
  addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
@@ -10522,7 +10522,7 @@ function requireReactDom_development () {
10522
10522
  }
10523
10523
  }
10524
10524
  function getListenerSetKey(domEventName, capture) {
10525
- return domEventName + "__" + (capture ? 'capture' : 'bubble');
10525
+ return domEventName + "__" + ('bubble');
10526
10526
  }
10527
10527
 
10528
10528
  var didWarnInvalidHydration = false;
@@ -30951,7 +30951,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
30951
30951
  };
30952
30952
 
30953
30953
  var compileReactIconProperties = function (_a) {
30954
- var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name"]);
30954
+ var body = _a.body, defs = _a.defs, compiledClasses = _a.compiledClasses, size = _a.size, name = _a.name, alt = _a.alt, attributes = __rest(_a, ["body", "defs", "compiledClasses", "size", "name", "alt"]);
30955
30955
  var filteredAttributes = Object.keys(attributes).reduce(function (newAttributes, attrName) {
30956
30956
  if (!ICON_COLOR_PROP_NAMES.includes(attrName) &&
30957
30957
  attrName !== 'name') {
@@ -30962,6 +30962,7 @@ var compileReactIconProperties = function (_a) {
30962
30962
  }
30963
30963
  return newAttributes;
30964
30964
  }, {});
30965
+ // eslint-disable-next-line react-hooks/rules-of-hooks
30965
30966
  React.useEffect(function () {
30966
30967
  var iconFileId = "".concat(name, "_").concat(size);
30967
30968
  if (defs) {
@@ -30975,9 +30976,13 @@ var compileReactIconProperties = function (_a) {
30975
30976
  svgElement.innerHTML = defs;
30976
30977
  document.body.appendChild(svgElement);
30977
30978
  }
30978
- }, [defs]);
30979
+ }, [defs, name, size]);
30979
30980
  var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
30980
- __html: body,
30981
+ __html: alt
30982
+ ? "<title>".concat(alt.replace(/[><]/g, function (s) {
30983
+ return s === '>' ? '&gt;' : '&lt;';
30984
+ }), "</title>").concat(body)
30985
+ : body,
30981
30986
  }, className: undefined }, filteredAttributes);
30982
30987
  if (attributes.className) {
30983
30988
  compiledClasses.push(attributes.className);
@@ -30999,12 +31004,12 @@ function useIconProps(props, iconBodiesAndDefs, availableSizes, name) {
30999
31004
  }
31000
31005
  var IconActionDelete = function (props) { return React.createElement('svg', useIconProps(props, {
31001
31006
  "12": {
31002
- "body": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 11 11 1M1 1l10 10\" class=\"icon-dark\"/>"
31007
+ "body": "<path d=\"M1 11 11 1M1 1l10 10\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon-dark\"/>"
31003
31008
  }
31004
31009
  }, ["12"], "action-delete")); };
31005
31010
  var IconActionQuestionMarkCircle = function (props) { return React.createElement('svg', useIconProps(props, {
31006
31011
  "16": {
31007
- "body": "<path fill=\"#D0D2E0\" d=\"M13.657 13.657A8 8 0 1 1 2.343 2.343a8 8 0 0 1 11.314 11.314Z\" class=\"icon-light\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"m1.845 2.535-.001.001A1 1 0 0 1 .146 1.48L1 2c-.854-.52-.854-.52-.853-.521v-.001l.001-.002.003-.004.005-.009.015-.023.042-.061A3.315 3.315 0 0 1 .87.707 3.452 3.452 0 0 1 3 0c1.099 0 1.911.432 2.414 1.113C5.879 1.743 6 2.478 6 3c0 .63-.173 1.147-.463 1.574-.272.402-.62.68-.871.873-.608.465-.655.516-.673.67a1 1 0 0 1-1.986-.234c.125-1.061.915-1.638 1.327-1.938l.117-.087c.229-.175.352-.29.43-.405C3.944 3.363 4 3.237 4 3c0-.259-.067-.525-.195-.7C3.714 2.179 3.526 2 3 2c-.437 0-.729.152-.913.294a1.316 1.316 0 0 0-.242.241ZM3 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" class=\"icon-dark\" clip-rule=\"evenodd\" style=\"transform:translate(5px,2.8px)\"/>"
31012
+ "body": "<path d=\"M13.657 13.657A8 8 0 1 1 2.343 2.343a8 8 0 0 1 11.314 11.314Z\" fill=\"#D0D2E0\" class=\"icon-light\"/><path fill-rule=\"evenodd\" style=\"transform:translate(5px,2.8px)\" clip-rule=\"evenodd\" d=\"m1.845 2.535-.001.001A1 1 0 0 1 .146 1.48L1 2c-.854-.52-.854-.52-.853-.521v-.001l.001-.002.003-.004.005-.009.015-.023.042-.061A3.315 3.315 0 0 1 .87.707 3.452 3.452 0 0 1 3 0c1.099 0 1.911.432 2.414 1.113C5.879 1.743 6 2.478 6 3c0 .63-.173 1.147-.463 1.574-.272.402-.62.68-.871.873-.608.465-.655.516-.673.67a1 1 0 0 1-1.986-.234c.125-1.061.915-1.638 1.327-1.938l.117-.087c.229-.175.352-.29.43-.405C3.944 3.363 4 3.237 4 3c0-.259-.067-.525-.195-.7C3.714 2.179 3.526 2 3 2c-.437 0-.729.152-.913.294a1.316 1.316 0 0 0-.242.241ZM3 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" fill=\"currentColor\" class=\"icon-dark\"/>"
31008
31013
  }
31009
31014
  }, ["16"], "action-question-mark-circle")); };
31010
31015
 
@@ -31031,9 +31036,7 @@ function freeBodyScroll() {
31031
31036
  window.scrollTo({ top: scrollY });
31032
31037
  }
31033
31038
 
31034
- const ClassBackDrop = 'fixed left-0 top-0 z-[1000010] h-screen w-screen bg-gray-900/[.80] backdrop-blur-sm';
31035
- const ClassModalContainer = 'pointer-events-none fixed left-0 top-0 z-[1000020] h-full w-screen overflow-hidden flex items-center justify-center';
31036
- const ClassModal = 'pointer-events-auto relative flex flex-col rounded outline outline-4 outline-gray-500/[.40] bg-white';
31039
+ const ClassModal = 'pointer-events-auto fixed flex flex-col rounded outline outline-4 outline-gray-500/[.40] bg-white backdrop:bg-gray-900/[.80] backdrop:backdrop-blur-sm';
31037
31040
  const ClassModalStandardDimensions = 'max-h-[80vh] min-w-[200px] sm:min-w-[390px] max-w-[calc(100vw-32px)] sm:max-w-[70vw] shrink-0';
31038
31041
  const ClassModalFullscreenDimensions = 'h-[calc(100vh-32px)] sm:w-[calc(100vw-32px)]';
31039
31042
  const ClassTitleBox = 'flex shrink-0 items-center justify-between rounded-t-md border-b border-gray-100 p-[16px] px-16px sm:px-[24px]';
@@ -31045,37 +31048,51 @@ const ClassContent = 'overflow-y-auto p-[16px] sm:px-[24px]';
31045
31048
 
31046
31049
  var Modal = function (_a) {
31047
31050
  var _b = _a.show, show = _b === void 0 ? false : _b, title = _a.title, helpLink = _a.helpLink, onClose = _a.onClose, children = _a.children, _c = _a.fullscreen, fullscreen = _c === void 0 ? false : _c;
31051
+ var dialogRef = React.useRef(null);
31048
31052
  React.useEffect(function () {
31053
+ var _a, _b;
31049
31054
  if (show) {
31050
31055
  disableBodyScroll();
31056
+ (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.showModal();
31051
31057
  }
31052
31058
  else {
31059
+ (_b = dialogRef.current) === null || _b === void 0 ? void 0 : _b.close();
31053
31060
  freeBodyScroll();
31054
31061
  }
31055
- }, [show]);
31062
+ }, [show, onClose]);
31056
31063
  React.useEffect(function () { return function () {
31057
31064
  freeBodyScroll();
31058
31065
  }; }, []);
31066
+ var closeOnClickBackdrop = React.useCallback(function (event) {
31067
+ var _a;
31068
+ var rect = (_a = dialogRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
31069
+ if (!rect)
31070
+ return;
31071
+ var isInDialog = rect.top <= event.clientY &&
31072
+ event.clientY <= rect.top + rect.height &&
31073
+ rect.left <= event.clientX &&
31074
+ event.clientX <= rect.left + rect.width;
31075
+ if (!isInDialog) {
31076
+ onClose === null || onClose === void 0 ? void 0 : onClose();
31077
+ }
31078
+ }, [onClose]);
31059
31079
  return (show &&
31060
- reactDomExports.createPortal(React.createElement("div", null,
31061
- React.createElement("div", { className: ClassBackDrop, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } }),
31062
- React.createElement("div", { className: ClassModalContainer, tabIndex: -1, "aria-modal": "true", "aria-labelledby": "cy_modal_label", role: "dialog" },
31063
- React.createElement("div", { className: clsx(ClassModal, fullscreen
31064
- ? ClassModalFullscreenDimensions
31065
- : ClassModalStandardDimensions) },
31066
- React.createElement("div", { className: ClassTitleBox },
31067
- React.createElement("div", { id: "cy_modal_label", className: ClassTitle }, title),
31068
- helpLink ? React.createElement("div", { className: ClassHelpLinkDash }) : null,
31069
- helpLink ? (React.createElement("a", { href: helpLink, className: ClassHelpLink },
31070
- "Need help",
31071
- React.createElement(IconActionQuestionMarkCircle, { className: "ml-[4px]", "stroke-color": "indigo-500", "fill-color": "indigo-100" }))) : null,
31072
- React.createElement("div", { className: "grow" }),
31073
- React.createElement("button", { "aria-label": "Close", className: ClassCloseButton, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } },
31074
- React.createElement(IconActionDelete, { className: "children:transition-all", "stroke-color": "gray-400", "hover-stroke-color": "gray-700", interactiveColorsOnGroup: true }))),
31075
- React.createElement("div", { className: ClassContent }, children)))), document.body));
31080
+ reactDomExports.createPortal(React.createElement("dialog", { ref: dialogRef, className: clsx(show ? ClassModal : null, fullscreen
31081
+ ? ClassModalFullscreenDimensions
31082
+ : ClassModalStandardDimensions), onClick: closeOnClickBackdrop },
31083
+ React.createElement("div", { className: ClassTitleBox },
31084
+ React.createElement("div", { id: "cy_modal_label", className: ClassTitle }, title),
31085
+ helpLink ? React.createElement("div", { className: ClassHelpLinkDash }) : null,
31086
+ helpLink ? (React.createElement("a", { href: helpLink, className: ClassHelpLink },
31087
+ "Need help",
31088
+ React.createElement(IconActionQuestionMarkCircle, { className: "ml-[4px]", "stroke-color": "indigo-500", "fill-color": "indigo-100" }))) : null,
31089
+ React.createElement("div", { className: "grow" }),
31090
+ React.createElement("button", { "aria-label": "Close", className: ClassCloseButton, onClick: function () { return onClose === null || onClose === void 0 ? void 0 : onClose(); } },
31091
+ React.createElement(IconActionDelete, { className: "children:transition-all", "stroke-color": "gray-400", "hover-stroke-color": "gray-700", interactiveColorsOnGroup: true }))),
31092
+ React.createElement("div", { className: ClassContent }, children)), document.body));
31076
31093
  };
31077
31094
 
31078
31095
  export { Modal as default };
31079
31096
  //# sourceMappingURL=index.es.mjs.map
31080
31097
 
31081
- /* <wind-keep class="ml-[4px] grow children:transition-all fixed left-0 top-0 z-[1000010] h-screen w-screen bg-gray-900/[.80] backdrop-blur-sm pointer-events-none z-[1000020] h-full overflow-hidden flex items-center justify-center pointer-events-auto relative flex-col rounded outline outline-4 outline-gray-500/[.40] bg-white max-h-[80vh] min-w-[200px] sm:min-w-[390px] max-w-[calc(100vw-32px)] sm:max-w-[70vw] shrink-0 h-[calc(100vh-32px)] sm:w-[calc(100vw-32px)] justify-between rounded-t-md border-b border-gray-100 p-[16px] sm:px-[24px] text-[18px] font-medium leading-[28px] text-gray-900 mx-[8px] h-[1px] w-[32px] bg-gray-100 text-[16px] font-normal leading-[24px] text-indigo-500 rounded-full border-transparent p-[4px] outline-none overflow-y-auto cy-modal-overflow-hidden cy-modal-overflow-scroll-x cy-modal-overflow-scroll-y"> */
31098
+ /* <wind-keep class="ml-[4px] grow pointer-events-auto fixed flex flex-col rounded outline outline-4 outline-gray-500/[.40] bg-white backdrop:bg-gray-900/[.80] backdrop:backdrop-blur-sm max-h-[80vh] min-w-[200px] sm:min-w-[390px] max-w-[calc(100vw-32px)] sm:max-w-[70vw] shrink-0 h-[calc(100vh-32px)] sm:w-[calc(100vw-32px)] items-center justify-between rounded-t-md border-b border-gray-100 p-[16px] sm:px-[24px] text-[18px] font-medium leading-[28px] text-gray-900 mx-[8px] h-[1px] w-[32px] bg-gray-100 text-[16px] font-normal leading-[24px] text-indigo-500 rounded-full border-transparent p-[4px] outline-none overflow-y-auto cy-modal-overflow-hidden cy-modal-overflow-scroll-x cy-modal-overflow-scroll-y"> */