@cleartrip/ct-design-dialog 5.26.0-SNAPSHOT-native-main.0 → 5.26.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.native.d.ts","sourceRoot":"","sources":["../packages/components/Dialog/src/Dialog.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AASnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAW3C,QAAA,MAAM,MAAM,oHAwDX,CAAC;AAIF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Dialog.native.d.ts","sourceRoot":"","sources":["../packages/components/Dialog/src/Dialog.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AASnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAW3C,QAAA,MAAM,MAAM,oHA0DX,CAAC;AAIF,eAAe,MAAM,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type IDialogActionProps } from '../type';
2
2
  declare const DialogAction: {
3
- ({ alignment, actionButtons, styleConfig, }: IDialogActionProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ alignment, actionButtons, styleConfig, testID, }: IDialogActionProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default DialogAction;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogAction.native.d.ts","sourceRoot":"","sources":["../../packages/components/Dialog/src/DialogAction/DialogAction.native.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAyBlD,QAAA,MAAM,YAAY;iDAIf,kBAAkB;;CA+BpB,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"DialogAction.native.d.ts","sourceRoot":"","sources":["../../packages/components/Dialog/src/DialogAction/DialogAction.native.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAyBlD,QAAA,MAAM,YAAY;yDAKf,kBAAkB;;CAkCpB,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { IDialogContentProps } from '../type';
2
2
  declare const DialogContent: {
3
- ({ headIcon, title, description, styleConfig }: IDialogContentProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ headIcon, title, description, styleConfig, testID }: IDialogContentProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  export default DialogContent;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.native.d.ts","sourceRoot":"","sources":["../../packages/components/Dialog/src/DialogContent/DialogContent.native.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAqBnD,QAAA,MAAM,aAAa;oDAAmD,mBAAmB;;CAUxF,CAAC;AAIF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"DialogContent.native.d.ts","sourceRoot":"","sources":["../../packages/components/Dialog/src/DialogContent/DialogContent.native.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAqBnD,QAAA,MAAM,aAAa;4DAA2D,mBAAmB;;CAahG,CAAC;AAIF,eAAe,aAAa,CAAC"}
package/dist/type.d.ts CHANGED
@@ -22,6 +22,7 @@ export interface IDialogContentProps {
22
22
  headIcon?: ReactNode;
23
23
  title: ReactNode;
24
24
  description?: ReactNode;
25
+ testID?: string;
25
26
  styleConfig?: {
26
27
  root?: Styles[];
27
28
  };
@@ -36,6 +37,7 @@ export interface IDialogAction {
36
37
  styleConfig?: {
37
38
  root?: Styles[];
38
39
  };
40
+ testID?: string;
39
41
  }
40
42
  export interface IDialogActionProps {
41
43
  alignment?: DialogAlignmentType;
@@ -43,6 +45,7 @@ export interface IDialogActionProps {
43
45
  styleConfig?: {
44
46
  root?: Styles[];
45
47
  };
48
+ testID?: string;
46
49
  }
47
50
  export type DialogProps = IDialogProps;
48
51
  export type DialogContentProps = IDialogContentProps;
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Dialog/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAe9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AASF,MAAM,WAAW,iBAAiB;IAIhC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAMhB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAM9B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAQD,MAAM,WAAW,YAAa,SAAQ,WAAW;IAK/C,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAMhC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IAMzC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAMD,MAAM,WAAW,mBAAmB;IAKlC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAKrB,KAAK,EAAE,SAAS,CAAC;IAKjB,WAAW,CAAC,EAAE,SAAS,CAAC;IAKxB,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAQD,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,C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;CACjB;AAQD,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAEvC,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-design-dialog",
3
- "version": "5.26.0-SNAPSHOT-native-main.0",
3
+ "version": "5.26.0",
4
4
  "description": "Dialog Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "./dist/ct-design-dialog.cjs.js",
@@ -24,15 +24,15 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "@cleartrip/ct-design-container": "5.26.0-SNAPSHOT-native-main.0",
28
- "@cleartrip/ct-design-modal": "5.26.0-SNAPSHOT-native-main.0",
29
- "@cleartrip/ct-design-style-manager": "5.25.1-SNAPSHOT-native-main.0",
30
- "@cleartrip/ct-design-theme": "5.26.0-SNAPSHOT-native-main.0",
31
- "@cleartrip/ct-design-types": "5.26.0-SNAPSHOT-native-main.0",
32
- "@cleartrip/ct-design-typography": "5.26.0-SNAPSHOT-native-main.0"
27
+ "@cleartrip/ct-design-modal": "5.26.0",
28
+ "@cleartrip/ct-design-container": "5.26.0",
29
+ "@cleartrip/ct-design-style-manager": "5.26.0",
30
+ "@cleartrip/ct-design-types": "5.26.0",
31
+ "@cleartrip/ct-design-typography": "5.26.0",
32
+ "@cleartrip/ct-design-theme": "5.26.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@cleartrip/ct-design-icons": "60.0.0-SNAPSHOT-native-main.0"
35
+ "@cleartrip/ct-design-icons": "60.0.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": ">=16.8.0",
@@ -35,11 +35,12 @@ const Dialog = forwardRef<ContainerRef, IDialogProps>(
35
35
  size,
36
36
  actionButtonType: actionButtonTypeFromProps,
37
37
  actionButtonAlignment: actionButtonAlignmentFromProps,
38
+ testID,
38
39
  },
39
40
  forwardedRef,
40
41
  ) => {
41
42
  const { root: customRootStyles = [], modalWrapperStyles = [] } = styleConfig || {};
42
- const { show = false, isBack = false, showCloseIcon = false, isCenter = false } = overlayCloseIcon || {};
43
+ const { isBack = false, showCloseIcon = false, isCenter = false } = overlayCloseIcon || {};
43
44
 
44
45
  const actionButtonAlignment = useMemo<ActionButtonAlignmentType>(() => {
45
46
  if (actionButtonAlignmentFromProps) return actionButtonAlignmentFromProps;
@@ -53,11 +54,12 @@ const Dialog = forwardRef<ContainerRef, IDialogProps>(
53
54
  if (isBack) return ActionButtonVariant.BACK;
54
55
  if (showCloseIcon) return ActionButtonVariant.CLOSE;
55
56
  return ActionButtonVariant.NONE;
56
- }, [actionButtonTypeFromProps, isBack, showCloseIcon, show]);
57
+ }, [actionButtonTypeFromProps, isBack, showCloseIcon]);
57
58
 
58
59
  return (
59
60
  <Modal
60
61
  ref={forwardedRef}
62
+ testID={testID}
61
63
  variant={variant}
62
64
  placement={placement}
63
65
  allowBackdropClose={allowBackdropClose}
@@ -31,6 +31,7 @@ const DialogAction = ({
31
31
  alignment = DialogAlignmentTypes.COLUMN,
32
32
  actionButtons = [],
33
33
  styleConfig,
34
+ testID,
34
35
  }: IDialogActionProps) => {
35
36
  const { root: customRootStyles = [] } = styleConfig || {};
36
37
 
@@ -44,9 +45,12 @@ const DialogAction = ({
44
45
  );
45
46
 
46
47
  return (
47
- <Container styleConfig={{ root: [staticStyles.root, dynamicStyles.root, ...customRootStyles] }}>
48
+ <Container
49
+ testID={testID ? `${testID}-DialogAction` : undefined}
50
+ styleConfig={{ root: [staticStyles.root, dynamicStyles.root, ...customRootStyles] }}
51
+ >
48
52
  {actionButtons.map((btn, index) => {
49
- const { type, onClick, label, styleConfig: buttonStyleConfig } = btn || {};
53
+ const { type, onClick, label, styleConfig: buttonStyleConfig, testID: actionTestID } = btn || {};
50
54
  const { root: customActionStyles = [] } = buttonStyleConfig || {};
51
55
 
52
56
  return (
@@ -54,7 +58,7 @@ const DialogAction = ({
54
58
  key={`actionButton_${index}`}
55
59
  styleConfig={{ root: [staticStyles.actionContainer, ...customActionStyles] }}
56
60
  >
57
- <Typography variant='HM4' color={type} isClickable={!!onClick} onClick={onClick}>
61
+ <Typography variant='HM4' color={type} isClickable={!!onClick} onClick={onClick} testID={actionTestID}>
58
62
  {label}
59
63
  </Typography>
60
64
  </Container>
@@ -22,11 +22,14 @@ const staticStyles = makeStyles((theme) => ({
22
22
  * tweaks (e.g. pressable wiring, measure calls) can diverge later
23
23
  * without touching web.
24
24
  */
25
- const DialogContent = ({ headIcon, title, description, styleConfig }: IDialogContentProps) => {
25
+ const DialogContent = ({ headIcon, title, description, styleConfig, testID }: IDialogContentProps) => {
26
26
  const { root: customStyles = [] } = styleConfig || {};
27
27
 
28
28
  return (
29
- <Container styleConfig={{ root: [staticStyles.root, ...customStyles] }}>
29
+ <Container
30
+ testID={testID ? `${testID}-DialogContent` : undefined}
31
+ styleConfig={{ root: [staticStyles.root, ...customStyles] }}
32
+ >
30
33
  {headIcon}
31
34
  {title}
32
35
  {description}
package/src/type.ts CHANGED
@@ -97,6 +97,12 @@ export interface IDialogContentProps {
97
97
  */
98
98
  description?: ReactNode;
99
99
 
100
+ /**
101
+ * Identifier used to locate this component in end-to-end tests.
102
+ * Forwarded to the outer wrapper view.
103
+ */
104
+ testID?: string;
105
+
100
106
  /**
101
107
  * `styleConfig` slot for the outer DialogContent wrapper.
102
108
  */
@@ -144,6 +150,12 @@ export interface IDialogAction {
144
150
  * `styleConfig` slot for the per-button wrapper.
145
151
  */
146
152
  styleConfig?: { root?: Styles[] };
153
+
154
+ /**
155
+ * Identifier used to locate this action in end-to-end tests.
156
+ * Forwarded to the pressable label.
157
+ */
158
+ testID?: string;
147
159
  }
148
160
 
149
161
  /**
@@ -168,6 +180,12 @@ export interface IDialogActionProps {
168
180
  styleConfig?: {
169
181
  root?: Styles[];
170
182
  };
183
+
184
+ /**
185
+ * Identifier used to locate this component in end-to-end tests.
186
+ * Forwarded to the outer wrapper view.
187
+ */
188
+ testID?: string;
171
189
  }
172
190
 
173
191
  // ---------------------------------------------------------------------