@cleartrip/ct-design-button 5.26.0-SNAPSHOT-holiday-packages.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.
- package/dist/Button.d.ts +2 -0
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.native.d.ts +2 -0
- package/dist/Button.native.d.ts.map +1 -1
- package/dist/type.d.ts +2 -0
- package/dist/type.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/Button.native.tsx +2 -0
- package/src/type.ts +13 -0
package/dist/Button.d.ts
CHANGED
package/dist/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../packages/components/Button/src/Button.tsx"],"names":[],"mappings":"AAyCA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../packages/components/Button/src/Button.tsx"],"names":[],"mappings":"AAyCA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;YAqBM,CAAC;iBAIb,CAAD;kBAIO,CAAC;2BAMS,CAAC;2BAIkC,CAAC;;;sDAkEzD,CAAC;AAGF,eAAe,MAAM,CAAC"}
|
package/dist/Button.native.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
declare const Button: React.ForwardRefExoticComponent<Partial<{
|
|
4
|
+
testId?: string;
|
|
5
|
+
testID?: string;
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
size: "small" | "medium" | "large";
|
|
6
8
|
variant: "bare" | "contained" | "outline";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.native.d.ts","sourceRoot":"","sources":["../packages/components/Button/src/Button.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AA+C/C,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"Button.native.d.ts","sourceRoot":"","sources":["../packages/components/Button/src/Button.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AA+C/C,QAAA,MAAM,MAAM;;;;;;;;;;;;;;YAFkE,CAAC;iBAMvD,CAAC;kBAKnB,CAAJ;2BAKU,CAAC;2BAOP,CAAJ;;;+BAmFD,CAAC;AAIF,eAAe,MAAM,CAAC"}
|
package/dist/type.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export type ButtonVariantType = `${ButtonVariant}`;
|
|
|
7
7
|
export type ButtonColorType = `${ButtonColor}`;
|
|
8
8
|
export type IClickEvent = INativeUIEvent;
|
|
9
9
|
export type IButtonProps = Partial<{
|
|
10
|
+
testId?: string;
|
|
11
|
+
testID?: string;
|
|
10
12
|
children: React.ReactNode;
|
|
11
13
|
size: 'small' | 'medium' | 'large';
|
|
12
14
|
variant: 'bare' | 'contained' | 'outline';
|
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Button/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAErE,MAAM,MAAM,cAAc,GAAG,GAAG,UAAU,EAAE,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,GAAG,aAAa,EAAE,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,GAAG,WAAW,EAAE,CAAC;AAE/C,MAAM,MAAM,WAAW,GA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B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QAIrB,UAAU,CAAC,EAAE,0BAA0B,CAAC;QAKxC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;QAI/B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;KAChC,CAAC;IAIF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-design-button",
|
|
3
|
-
"version": "5.26.0
|
|
3
|
+
"version": "5.26.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@emotion/react": "^11.14.0",
|
|
28
28
|
"@emotion/styled": "^11.14.0",
|
|
29
|
-
"@cleartrip/ct-design-
|
|
30
|
-
"@cleartrip/ct-design-
|
|
31
|
-
"@cleartrip/ct-design-
|
|
32
|
-
"@cleartrip/ct-design-dotted-loader": "5.26.0
|
|
33
|
-
"@cleartrip/ct-design-
|
|
34
|
-
"@cleartrip/ct-design-
|
|
35
|
-
"@cleartrip/ct-design-style-manager": "5.
|
|
36
|
-
"@cleartrip/ct-design-event-propagation": "5.26.0
|
|
29
|
+
"@cleartrip/ct-design-conditional-wrap": "5.26.0",
|
|
30
|
+
"@cleartrip/ct-design-typography": "5.26.0",
|
|
31
|
+
"@cleartrip/ct-design-container": "5.26.0",
|
|
32
|
+
"@cleartrip/ct-design-dotted-loader": "5.26.0",
|
|
33
|
+
"@cleartrip/ct-design-types": "5.26.0",
|
|
34
|
+
"@cleartrip/ct-design-theme": "5.26.0",
|
|
35
|
+
"@cleartrip/ct-design-style-manager": "5.26.0",
|
|
36
|
+
"@cleartrip/ct-design-event-propagation": "5.26.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@emotion/babel-plugin": "^11.12.0"
|
package/src/Button.native.tsx
CHANGED
|
@@ -61,6 +61,7 @@ const Button = forwardRef(
|
|
|
61
61
|
variant = ButtonVariant.CONTAINED,
|
|
62
62
|
onClick,
|
|
63
63
|
styleConfig,
|
|
64
|
+
testID,
|
|
64
65
|
}: IButtonProps,
|
|
65
66
|
ref: React.ForwardedRef<View>,
|
|
66
67
|
) => {
|
|
@@ -117,6 +118,7 @@ const Button = forwardRef(
|
|
|
117
118
|
>
|
|
118
119
|
<AnimatedPressable
|
|
119
120
|
ref={ref}
|
|
121
|
+
testID={testID ? `${testID}-Button` : undefined}
|
|
120
122
|
disabled={disabled || loading}
|
|
121
123
|
style={[mergedRootStyles, animatedPressStyle]}
|
|
122
124
|
onPress={onClick}
|
package/src/type.ts
CHANGED
|
@@ -13,6 +13,19 @@ export type ButtonColorType = `${ButtonColor}`;
|
|
|
13
13
|
export type IClickEvent = INativeUIEvent;
|
|
14
14
|
|
|
15
15
|
export type IButtonProps = Partial<{
|
|
16
|
+
/**
|
|
17
|
+
* Test id of the button
|
|
18
|
+
* @deprecated Never forwarded to the rendered element. Use `testID` instead.
|
|
19
|
+
*/
|
|
20
|
+
testId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Identifier used to locate this component in end-to-end tests.
|
|
23
|
+
* Forwarded to the underlying React Native pressable.
|
|
24
|
+
*/
|
|
25
|
+
testID?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The children of the button
|
|
28
|
+
*/
|
|
16
29
|
children: React.ReactNode;
|
|
17
30
|
/**
|
|
18
31
|
* Set the size of Button
|