@cleartrip/ct-design-modal 4.0.0-SNAPSHOT-reactnative.9 → 4.0.0-SNAPSHOT-rnfinaltest66.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.
Files changed (40) hide show
  1. package/dist/Backdrop/Backdrop.d.ts +1 -1
  2. package/dist/Backdrop/Backdrop.d.ts.map +1 -1
  3. package/dist/Backdrop/style.d.ts +1 -1
  4. package/dist/Backdrop/style.d.ts.map +1 -1
  5. package/dist/Backdrop/type.d.ts +1 -1
  6. package/dist/Backdrop/type.d.ts.map +1 -1
  7. package/dist/Modal.d.ts.map +1 -1
  8. package/dist/Modal.native.d.ts.map +1 -1
  9. package/dist/ModalContainer/ModalContainer.d.ts.map +1 -1
  10. package/dist/ModalTitle/ModalTitle.d.ts.map +1 -1
  11. package/dist/ct-design-modal.browser.cjs.js.map +1 -1
  12. package/dist/ct-design-modal.browser.esm.js.map +1 -1
  13. package/dist/ct-design-modal.cjs.js.map +1 -1
  14. package/dist/ct-design-modal.esm.js.map +1 -1
  15. package/dist/ct-design-modal.umd.js.map +1 -1
  16. package/dist/index.d.ts +2 -3
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.native.d.ts +1 -2
  19. package/dist/index.native.d.ts.map +1 -1
  20. package/dist/style.d.ts.map +1 -1
  21. package/dist/style.native.d.ts.map +1 -1
  22. package/dist/type.d.ts +27 -1
  23. package/dist/type.d.ts.map +1 -1
  24. package/package.json +15 -15
  25. package/src/Backdrop/Backdrop.tsx +1 -1
  26. package/src/Backdrop/style.ts +1 -1
  27. package/src/Backdrop/type.ts +1 -1
  28. package/src/Modal.native.tsx +11 -2
  29. package/src/Modal.tsx +1 -2
  30. package/src/ModalContainer/ModalContainer.tsx +1 -2
  31. package/src/ModalTitle/ModalTitle.tsx +1 -2
  32. package/src/ModalsUsableComponents/ModalWithCloseOverlay.tsx +1 -1
  33. package/src/index.native.ts +1 -2
  34. package/src/index.ts +2 -3
  35. package/src/style.native.ts +8 -3
  36. package/src/style.ts +1 -2
  37. package/src/type.ts +31 -1
  38. package/dist/constants.d.ts +0 -28
  39. package/dist/constants.d.ts.map +0 -1
  40. package/src/constants.ts +0 -31
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  export { default as Modal } from './Modal';
2
- export type * from './type';
3
- export * from './constants';
2
+ export * from './type';
4
3
  export { default as ModalAction } from './ModalAction';
5
4
  export { default as ModalContainer } from './ModalContainer';
6
5
  export { default as ModalContent } from './ModalContent';
7
6
  export { default as ModalTitle } from './ModalTitle';
8
7
  export { default as Backdrop } from './Backdrop';
9
- export { ModalWithCloseOverlay } from './ModalsUsableComponents';
8
+ export * from './ModalsUsableComponents';
10
9
  export { MODAL_ANIMATION_DURATION } from './modalUtils';
11
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,5 +1,4 @@
1
1
  export { default as Modal } from './Modal.native';
2
- export type * from './type';
3
- export * from './constants';
2
+ export * from './type';
4
3
  export { MODAL_ANIMATION_DURATION } from './modalUtils';
5
4
  //# sourceMappingURL=index.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,mBAAmB,QAAQ,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAGxC,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc;;;;;;;;;;;;;;;CAwCtD,CAAC"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAa,MAAM,QAAQ,CAAC;AAEnD,eAAO,MAAM,kBAAkB,GAAI,MAAM,cAAc;;;;;;;;;;;;;;;CAwCtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.native.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/style.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAiDxF,eAAO,MAAM,2BAA2B,GAAI,wBAIzC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;YAnDY,MAAM,GAAG,MAAM;aAAW,MAAM,GAAG,MAAM;WAAS,MAAM;gBA8BvD,MAAM,GAAG,MAAM,GAAG,KAAK;kBACrB,MAAM;mBACL;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;oBAChC,MAAM;mBACP,MAAM;CAoBrB,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAAI,eAAe;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE,KAAG,SAEpF,CAAC;AAEH,eAAO,MAAM,wBAAwB,GAAI,4BAEtC;IACD,qBAAqB,EAAE,yBAAyB,CAAC;CAClD;gBAG8C,MAAM;CAMpD,CAAC"}
1
+ {"version":3,"file":"style.native.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/style.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAEL,yBAAyB,EACzB,mBAAmB,EAEnB,cAAc,EAEf,MAAM,QAAQ,CAAC;AA+ChB,eAAO,MAAM,2BAA2B,GAAI,wBAIzC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;YAnDY,MAAM,GAAG,MAAM;aAAW,MAAM,GAAG,MAAM;WAAS,MAAM;gBA8BvD,MAAM,GAAG,MAAM,GAAG,KAAK;kBACrB,MAAM;mBACL;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;oBAChC,MAAM;mBACP,MAAM;CAoBrB,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAAI,eAAe;IAAE,SAAS,EAAE,mBAAmB,CAAA;CAAE,KAAG,SAEpF,CAAC;AAEH,eAAO,MAAM,wBAAwB,GAAI,4BAEtC;IACD,qBAAqB,EAAE,yBAAyB,CAAC;CAClD;gBAG8C,MAAM;CAMpD,CAAC"}
package/dist/type.d.ts CHANGED
@@ -1,13 +1,39 @@
1
1
  import type { Styles } from '@cleartrip/ct-design-types';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import type { ContainerRef } from '@cleartrip/ct-design-container';
4
- import { ModalSize, ModalVariant, ModalPlacement, ActionButtonVariant, ActionButtonAlignment } from './constants';
4
+ export declare enum ModalSize {
5
+ SMALL = "SMALL",
6
+ MEDIUM = "MEDIUM",
7
+ LARGE = "LARGE",
8
+ FULL_SCREEN = "FULL_SCREEN",
9
+ NONE = "NONE",
10
+ REGULAR = "REGULAR",
11
+ BIG = "BIG"
12
+ }
13
+ export declare enum ModalVariant {
14
+ DARK = "dark",
15
+ NEUTRAL = "neutral"
16
+ }
17
+ export declare enum ModalPlacement {
18
+ CENTER = "center",
19
+ BOTTOM = "bottom"
20
+ }
5
21
  export type ModalSizeTypes = `${ModalSize}`;
6
22
  type OwnModalProps = {
7
23
  footerAlignment?: 'start' | 'end' | 'center';
8
24
  animationDuration?: number;
9
25
  };
10
26
  export type ModalProps = IModalProps;
27
+ export declare enum ActionButtonVariant {
28
+ BACK = "back",
29
+ CLOSE = "close",
30
+ NONE = "none"
31
+ }
32
+ export declare enum ActionButtonAlignment {
33
+ CENTER = "center",
34
+ LEFT = "left",
35
+ RIGHT = "right"
36
+ }
11
37
  export type ActionButtonVariantsType = `${ActionButtonVariant}`;
12
38
  export type ActionButtonAlignmentType = `${ActionButtonAlignment}`;
13
39
  export type ModalPlacementTypes = `${ModalPlacement}`;
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAElH,MAAM,MAAM,cAAc,GAAG,GAAG,SAAS,EAAE,CAAC;AAE5C,KAAK,aAAa,GAAG;IAInB,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC;AAErC,MAAM,MAAM,wBAAwB,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAChE,MAAM,MAAM,yBAAyB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AACnE,MAAM,MAAM,mBAAmB,GAAG,GAAG,cAAc,EAAE,CAAC;AAC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EAAE,yBAAyB,CAAC;IAElD,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;IAE5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAE9B,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf,QAAQ,CAAC,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;IAElD,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAEjE,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAE9B,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;QAC1B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC/B,CAAC;IAEF,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAI5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-design-modal",
3
- "version": "4.0.0-SNAPSHOT-reactnative.9",
3
+ "version": "4.0.0-SNAPSHOT-rnfinaltest66.1",
4
4
  "description": "Modal Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "./dist/ct-design-modal.cjs.js",
@@ -26,23 +26,23 @@
26
26
  "dependencies": {
27
27
  "@emotion/react": "^11.14.0",
28
28
  "@emotion/styled": "^11.14.0",
29
- "@cleartrip/ct-design-container": "4.0.0-SNAPSHOT-reactnative.9",
30
- "@cleartrip/ct-design-transition": "4.0.0-SNAPSHOT-reactnative.9",
31
- "@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-reactnative.9",
32
- "@cleartrip/ct-design-overlay": "4.0.0-SNAPSHOT-reactnative.9",
33
- "@cleartrip/ct-design-portal": "4.0.0-SNAPSHOT-reactnative.9",
34
- "@cleartrip/ct-design-focus-lock": "4.0.0-SNAPSHOT-reactnative.9",
35
- "@cleartrip/ct-design-icons": "4.0.0-SNAPSHOT-reactnative.9",
36
- "@cleartrip/ct-design-use-merge-refs": "4.0.0-SNAPSHOT-reactnative.9",
37
- "@cleartrip/ct-design-typography": "4.0.0-SNAPSHOT-reactnative.9",
38
- "@cleartrip/ct-design-button": "4.0.0-SNAPSHOT-reactnative.9",
39
- "@cleartrip/ct-design-box": "4.0.0-SNAPSHOT-reactnative.9",
40
- "@cleartrip/ct-design-theme": "4.0.0-SNAPSHOT-reactnative.9",
41
- "@cleartrip/ct-design-style-manager": "4.0.0-SNAPSHOT-reactnative.9"
29
+ "@cleartrip/ct-design-types": "4.0.0-SNAPSHOT-rnfinaltest66.1",
30
+ "@cleartrip/ct-design-container": "4.0.0-SNAPSHOT-rnfinaltest66.1",
31
+ "@cleartrip/ct-design-transition": "4.0.0-SNAPSHOT-rnfinaltest66.1",
32
+ "@cleartrip/ct-design-portal": "4.0.0-SNAPSHOT-rnfinaltest66.1",
33
+ "@cleartrip/ct-design-focus-lock": "4.0.0-SNAPSHOT-rnfinaltest66.1",
34
+ "@cleartrip/ct-design-overlay": "4.0.0-SNAPSHOT-rnfinaltest66.1",
35
+ "@cleartrip/ct-design-use-merge-refs": "4.0.0-SNAPSHOT-rnfinaltest66.1",
36
+ "@cleartrip/ct-design-icons": "4.0.0-SNAPSHOT-rnfinaltest66.1",
37
+ "@cleartrip/ct-design-typography": "4.0.0-SNAPSHOT-rnfinaltest66.1",
38
+ "@cleartrip/ct-design-box": "4.0.0-SNAPSHOT-rnfinaltest66.1",
39
+ "@cleartrip/ct-design-button": "4.0.0-SNAPSHOT-rnfinaltest66.1",
40
+ "@cleartrip/ct-design-theme": "4.0.0-SNAPSHOT-rnfinaltest66.1",
41
+ "@cleartrip/ct-design-style-manager": "4.0.0-SNAPSHOT-rnfinaltest66.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@emotion/babel-plugin": "^11.12.0",
45
- "@cleartrip/ct-design-icons": "4.0.0-SNAPSHOT-reactnative.9"
45
+ "@cleartrip/ct-design-icons": "4.0.0-SNAPSHOT-rnfinaltest66.1"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "react": ">=16.8.0",
@@ -4,7 +4,7 @@ import { css } from '@emotion/css';
4
4
  import { Transition } from '@cleartrip/ct-design-transition';
5
5
  import { useStyles, useWebMergeStyles } from '@cleartrip/ct-design-style-manager';
6
6
 
7
- import { ModalVariant } from '../constants';
7
+ import { ModalVariant } from '../type';
8
8
  import { getBackdropDynamicStyles, staticBackdropStyles } from './style';
9
9
  import { BackdropProps } from './type';
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { makeStyles } from '@cleartrip/ct-design-style-manager';
2
- import { ModalVariant } from '../constants';
2
+ import { ModalVariant } from '../type';
3
3
 
4
4
  export const staticBackdropStyles = makeStyles(() => ({
5
5
  root: {
@@ -1,7 +1,7 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  import type { Styles } from '@cleartrip/ct-design-types';
3
3
  import type { TransitionProps } from '@cleartrip/ct-design-transition';
4
- import { ModalVariant } from '../constants';
4
+ import { ModalVariant } from '../type';
5
5
 
6
6
  export interface BackdropStyleConfigProps {
7
7
  root?: Styles[];
@@ -8,8 +8,17 @@ import { Portal } from '@cleartrip/ct-design-portal';
8
8
  import { makeStyles, useStyles } from '@cleartrip/ct-design-style-manager';
9
9
  import { Cross, ModalBack } from '@cleartrip/ct-design-icons';
10
10
 
11
- import { ActionButtonVariantsType, IChildProps, IModalProps, ModalVariantTypes } from './type';
12
- import { ActionButtonAlignment, ActionButtonVariant, ModalPlacement, ModalSize, ModalVariant } from './constants';
11
+ import {
12
+ ActionButtonAlignment,
13
+ ActionButtonVariant,
14
+ ActionButtonVariantsType,
15
+ IChildProps,
16
+ IModalProps,
17
+ ModalPlacement,
18
+ ModalSize,
19
+ ModalVariant,
20
+ ModalVariantTypes,
21
+ } from './type';
13
22
  import { getActionButtonAlignment, getModalChildContainerStyle } from './style.native';
14
23
  import { MODAL_ANIMATION_DURATION } from './modalUtils';
15
24
 
package/src/Modal.tsx CHANGED
@@ -1,8 +1,7 @@
1
1
  import React, { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2
2
  import { CSSProperties } from 'react';
3
3
  import { getModalSizeStyles } from './style';
4
- import { IModalProps } from './type';
5
- import { ModalPlacement, ModalSize, ModalVariant } from './constants';
4
+ import { IModalProps, ModalPlacement, ModalSize, ModalVariant } from './type';
6
5
  import { Portal } from '@cleartrip/ct-design-portal';
7
6
  import { FocusLock } from '@cleartrip/ct-design-focus-lock';
8
7
  import { Transition } from '@cleartrip/ct-design-transition';
@@ -5,8 +5,7 @@ import { useStyles } from '@cleartrip/ct-design-style-manager';
5
5
  import type { Styles } from '@cleartrip/ct-design-types';
6
6
 
7
7
  import ModalContext from '../ModalContext';
8
- import { ModalSizeTypes } from '../type';
9
- import { ModalSize } from '../constants';
8
+ import { ModalSize, ModalSizeTypes } from '../type';
10
9
 
11
10
  type ModalContainerProps = {
12
11
  size?: ModalSizeTypes;
@@ -8,8 +8,7 @@ import { Typography, TypographyStyleConfigProps } from '@cleartrip/ct-design-typ
8
8
  import type { Styles } from '@cleartrip/ct-design-types';
9
9
 
10
10
  import ModalContext from '../ModalContext';
11
- import { ModalProps } from '../type';
12
- import { ModalSize } from '../constants';
11
+ import { ModalProps, ModalSize } from '../type';
13
12
 
14
13
  type ModalTitleStyleConfig = {
15
14
  root?: Styles[];
@@ -5,7 +5,7 @@ import { makeStyles, useStyles } from '@cleartrip/ct-design-style-manager';
5
5
  import { Cross, ModalBack } from '@cleartrip/ct-design-icons';
6
6
 
7
7
  import Modal from '../Modal';
8
- import { ModalVariant } from '../constants';
8
+ import { ModalVariant } from '../type';
9
9
  import { ModalWithCloseOverlayProps } from './type';
10
10
 
11
11
  const staticStyles = makeStyles(() => ({
@@ -1,4 +1,3 @@
1
1
  export { default as Modal } from './Modal.native';
2
- export type * from './type';
3
- export * from './constants';
2
+ export * from './type';
4
3
  export { MODAL_ANIMATION_DURATION } from './modalUtils';
package/src/index.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  export { default as Modal } from './Modal';
2
- export type * from './type';
3
- export * from './constants';
2
+ export * from './type';
4
3
  export { default as ModalAction } from './ModalAction';
5
4
  export { default as ModalContainer } from './ModalContainer';
6
5
  export { default as ModalContent } from './ModalContent';
7
6
  export { default as ModalTitle } from './ModalTitle';
8
7
  export { default as Backdrop } from './Backdrop';
9
- export { ModalWithCloseOverlay } from './ModalsUsableComponents';
8
+ export * from './ModalsUsableComponents';
10
9
  export { MODAL_ANIMATION_DURATION } from './modalUtils';
@@ -1,9 +1,14 @@
1
1
  import type { ViewStyle } from '@cleartrip/ct-design-types';
2
2
  import type { Theme } from '@cleartrip/ct-design-theme';
3
3
 
4
- import { ActionButtonAlignmentType, ModalPlacementTypes, ModalSizeTypes } from './type';
5
-
6
- import { ActionButtonAlignment, ModalSize, ModalVariant } from './constants';
4
+ import {
5
+ ActionButtonAlignment,
6
+ ActionButtonAlignmentType,
7
+ ModalPlacementTypes,
8
+ ModalSize,
9
+ ModalSizeTypes,
10
+ ModalVariant,
11
+ } from './type';
7
12
 
8
13
  const getModalSizeStyles = (
9
14
  size: ModalSizeTypes,
package/src/style.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { ModalSizeTypes } from './type';
2
- import { ModalSize } from './constants';
1
+ import { ModalSizeTypes, ModalSize } from './type';
3
2
 
4
3
  export const getModalSizeStyles = (size: ModalSizeTypes) => {
5
4
  switch (size) {
package/src/type.ts CHANGED
@@ -2,7 +2,25 @@ import type { Styles } from '@cleartrip/ct-design-types';
2
2
  import { ReactNode, ReactElement } from 'react';
3
3
  import type { ContainerRef } from '@cleartrip/ct-design-container';
4
4
 
5
- import { ModalSize, ModalVariant, ModalPlacement, ActionButtonVariant, ActionButtonAlignment } from './constants';
5
+ export enum ModalSize {
6
+ SMALL = 'SMALL',
7
+ MEDIUM = 'MEDIUM',
8
+ LARGE = 'LARGE',
9
+ FULL_SCREEN = 'FULL_SCREEN',
10
+ NONE = 'NONE',
11
+ REGULAR = 'REGULAR',
12
+ BIG = 'BIG',
13
+ }
14
+
15
+ export enum ModalVariant {
16
+ DARK = 'dark',
17
+ NEUTRAL = 'neutral',
18
+ }
19
+
20
+ export enum ModalPlacement {
21
+ CENTER = 'center',
22
+ BOTTOM = 'bottom',
23
+ }
6
24
 
7
25
  export type ModalSizeTypes = `${ModalSize}`;
8
26
 
@@ -16,6 +34,18 @@ type OwnModalProps = {
16
34
 
17
35
  export type ModalProps = IModalProps;
18
36
 
37
+ export enum ActionButtonVariant {
38
+ BACK = 'back',
39
+ CLOSE = 'close',
40
+ NONE = 'none',
41
+ }
42
+
43
+ export enum ActionButtonAlignment {
44
+ CENTER = 'center',
45
+ LEFT = 'left',
46
+ RIGHT = 'right',
47
+ }
48
+
19
49
  export type ActionButtonVariantsType = `${ActionButtonVariant}`;
20
50
  export type ActionButtonAlignmentType = `${ActionButtonAlignment}`;
21
51
  export type ModalPlacementTypes = `${ModalPlacement}`;
@@ -1,28 +0,0 @@
1
- export declare enum ModalSize {
2
- SMALL = "SMALL",
3
- MEDIUM = "MEDIUM",
4
- LARGE = "LARGE",
5
- FULL_SCREEN = "FULL_SCREEN",
6
- NONE = "NONE",
7
- REGULAR = "REGULAR",
8
- BIG = "BIG"
9
- }
10
- export declare enum ModalVariant {
11
- DARK = "dark",
12
- NEUTRAL = "neutral"
13
- }
14
- export declare enum ModalPlacement {
15
- CENTER = "center",
16
- BOTTOM = "bottom"
17
- }
18
- export declare enum ActionButtonVariant {
19
- BACK = "back",
20
- CLOSE = "close",
21
- NONE = "none"
22
- }
23
- export declare enum ActionButtonAlignment {
24
- CENTER = "center",
25
- LEFT = "left",
26
- RIGHT = "right"
27
- }
28
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/Modal/src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
package/src/constants.ts DELETED
@@ -1,31 +0,0 @@
1
- export enum ModalSize {
2
- SMALL = 'SMALL',
3
- MEDIUM = 'MEDIUM',
4
- LARGE = 'LARGE',
5
- FULL_SCREEN = 'FULL_SCREEN',
6
- NONE = 'NONE',
7
- REGULAR = 'REGULAR',
8
- BIG = 'BIG',
9
- }
10
-
11
- export enum ModalVariant {
12
- DARK = 'dark',
13
- NEUTRAL = 'neutral',
14
- }
15
-
16
- export enum ModalPlacement {
17
- CENTER = 'center',
18
- BOTTOM = 'bottom',
19
- }
20
-
21
- export enum ActionButtonVariant {
22
- BACK = 'back',
23
- CLOSE = 'close',
24
- NONE = 'none',
25
- }
26
-
27
- export enum ActionButtonAlignment {
28
- CENTER = 'center',
29
- LEFT = 'left',
30
- RIGHT = 'right',
31
- }