@cleartrip/ct-design-field 4.0.0 → 5.1.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/README.md +87 -0
- package/dist/Field.d.ts +4 -4
- package/dist/Field.d.ts.map +1 -1
- package/dist/FieldAction/index.d.ts +0 -1
- package/dist/FieldAction/index.d.ts.map +1 -1
- package/dist/FieldAction/type.d.ts +1 -1
- package/dist/FieldAction/type.d.ts.map +1 -1
- package/dist/FieldIcon/index.d.ts +0 -1
- package/dist/FieldIcon/index.d.ts.map +1 -1
- package/dist/FieldIcon/type.d.ts +4 -2
- package/dist/FieldIcon/type.d.ts.map +1 -1
- package/dist/Input.d.ts +8 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.native.d.ts +7 -0
- package/dist/Input.native.d.ts.map +1 -0
- package/dist/InputField.d.ts +4 -0
- package/dist/InputField.d.ts.map +1 -0
- package/dist/Label.d.ts +6 -0
- package/dist/Label.d.ts.map +1 -0
- package/dist/Label.native.d.ts +6 -0
- package/dist/Label.native.d.ts.map +1 -0
- package/dist/TextArea.d.ts +7 -0
- package/dist/TextArea.d.ts.map +1 -0
- package/dist/TextAreaInput.d.ts +7 -0
- package/dist/TextAreaInput.d.ts.map +1 -0
- package/dist/TextAreaInput.native.d.ts +3 -0
- package/dist/TextAreaInput.native.d.ts.map +1 -0
- package/dist/constants.d.ts +10 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/ct-design-field.browser.cjs.js +11 -1
- package/dist/ct-design-field.browser.cjs.js.map +1 -1
- package/dist/ct-design-field.browser.esm.js +11 -1
- package/dist/ct-design-field.browser.esm.js.map +1 -1
- package/dist/ct-design-field.cjs.js +1003 -396
- package/dist/ct-design-field.cjs.js.map +1 -1
- package/dist/ct-design-field.esm.js +997 -387
- package/dist/ct-design-field.esm.js.map +1 -1
- package/dist/ct-design-field.umd.js +2721 -537
- package/dist/ct-design-field.umd.js.map +1 -1
- package/dist/index.d.ts +6 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/style.d.ts +146 -38
- package/dist/style.d.ts.map +1 -1
- package/dist/type.d.ts +114 -25
- package/dist/type.d.ts.map +1 -1
- package/dist/variants/Card/index.d.ts +13 -0
- package/dist/variants/Card/index.d.ts.map +1 -0
- package/dist/variants/Card/index.native.d.ts +13 -0
- package/dist/variants/Card/index.native.d.ts.map +1 -0
- package/dist/variants/Card/type.d.ts +5 -0
- package/dist/variants/Card/type.d.ts.map +1 -0
- package/dist/variants/OTP/index.d.ts +4 -0
- package/dist/variants/OTP/index.d.ts.map +1 -0
- package/dist/variants/OTP/type.d.ts +25 -0
- package/dist/variants/OTP/type.d.ts.map +1 -0
- package/dist/variants/Phone/Prefix/index.d.ts +4 -0
- package/dist/variants/Phone/Prefix/index.d.ts.map +1 -0
- package/dist/variants/Phone/Prefix/type.d.ts.map +1 -0
- package/dist/variants/Phone/index.d.ts +5 -0
- package/dist/variants/Phone/index.d.ts.map +1 -0
- package/dist/variants/Phone/index.native.d.ts +5 -0
- package/dist/variants/Phone/index.native.d.ts.map +1 -0
- package/dist/variants/Phone/type.d.ts +7 -0
- package/dist/variants/Phone/type.d.ts.map +1 -0
- package/package.json +33 -19
- package/src/Field.tsx +201 -0
- package/src/FieldAction/index.tsx +47 -0
- package/src/FieldAction/type.ts +15 -0
- package/src/FieldIcon/index.tsx +48 -0
- package/src/FieldIcon/type.ts +52 -0
- package/src/Input.native.tsx +284 -0
- package/src/Input.tsx +242 -0
- package/src/InputField.tsx +22 -0
- package/src/Label.native.tsx +83 -0
- package/src/Label.tsx +91 -0
- package/src/TextArea.tsx +14 -0
- package/src/TextAreaInput.native.tsx +4 -0
- package/src/TextAreaInput.tsx +243 -0
- package/src/constants.ts +10 -0
- package/src/index.ts +8 -0
- package/src/style.ts +353 -0
- package/src/type.ts +243 -0
- package/src/variants/Card/index.native.tsx +46 -0
- package/src/variants/Card/index.tsx +89 -0
- package/src/variants/Card/type.ts +5 -0
- package/src/variants/OTP/index.tsx +343 -0
- package/src/variants/OTP/type.ts +34 -0
- package/src/variants/Phone/Prefix/index.tsx +87 -0
- package/src/variants/Phone/Prefix/type.ts +24 -0
- package/src/variants/Phone/index.native.tsx +84 -0
- package/src/variants/Phone/index.tsx +79 -0
- package/src/variants/Phone/type.ts +13 -0
- package/dist/CardField/CardField.d.ts +0 -6
- package/dist/CardField/CardField.d.ts.map +0 -1
- package/dist/CardField/index.d.ts +0 -3
- package/dist/CardField/index.d.ts.map +0 -1
- package/dist/CardField/type.d.ts +0 -16
- package/dist/CardField/type.d.ts.map +0 -1
- package/dist/OTPField/OTPField.d.ts +0 -6
- package/dist/OTPField/OTPField.d.ts.map +0 -1
- package/dist/OTPField/SingleOTPInput.d.ts +0 -6
- package/dist/OTPField/SingleOTPInput.d.ts.map +0 -1
- package/dist/OTPField/index.d.ts +0 -3
- package/dist/OTPField/index.d.ts.map +0 -1
- package/dist/OTPField/type.d.ts +0 -23
- package/dist/OTPField/type.d.ts.map +0 -1
- package/dist/PhoneField/PhoneField.d.ts +0 -6
- package/dist/PhoneField/PhoneField.d.ts.map +0 -1
- package/dist/PhoneField/index.d.ts +0 -3
- package/dist/PhoneField/index.d.ts.map +0 -1
- package/dist/PhoneField/type.d.ts +0 -11
- package/dist/PhoneField/type.d.ts.map +0 -1
- package/dist/PhoneFieldPrefix/index.d.ts +0 -5
- package/dist/PhoneFieldPrefix/index.d.ts.map +0 -1
- package/dist/PhoneFieldPrefix/type.d.ts.map +0 -1
- package/dist/StyledField/StyledField.d.ts +0 -7
- package/dist/StyledField/StyledField.d.ts.map +0 -1
- package/dist/StyledField/index.d.ts +0 -2
- package/dist/StyledField/index.d.ts.map +0 -1
- package/dist/StyledField/type.d.ts +0 -12
- package/dist/StyledField/type.d.ts.map +0 -1
- package/dist/StyledFieldContainer/StyledFieldContainer.d.ts +0 -7
- package/dist/StyledFieldContainer/StyledFieldContainer.d.ts.map +0 -1
- package/dist/StyledFieldContainer/index.d.ts +0 -2
- package/dist/StyledFieldContainer/index.d.ts.map +0 -1
- package/dist/StyledFieldContainer/type.d.ts +0 -8
- package/dist/StyledFieldContainer/type.d.ts.map +0 -1
- package/dist/StyledFieldPlaceholder/StyledFieldPlaceholder.d.ts +0 -7
- package/dist/StyledFieldPlaceholder/StyledFieldPlaceholder.d.ts.map +0 -1
- package/dist/StyledFieldPlaceholder/index.d.ts +0 -2
- package/dist/StyledFieldPlaceholder/index.d.ts.map +0 -1
- package/dist/StyledFieldPlaceholder/type.d.ts +0 -7
- package/dist/StyledFieldPlaceholder/type.d.ts.map +0 -1
- /package/dist/{PhoneFieldPrefix → variants/Phone/Prefix}/type.d.ts +0 -0
package/dist/style.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@cleartrip/ct-design-theme';
|
|
2
|
-
import { FieldType, FieldVariant } from './
|
|
3
|
-
import {
|
|
2
|
+
import { FieldType, FieldVariant } from './constants';
|
|
3
|
+
import { TypographyVariantType } from '@cleartrip/ct-design-typography';
|
|
4
4
|
interface IFieldContainerStylesParams {
|
|
5
5
|
variant: `${FieldVariant}`;
|
|
6
6
|
theme: Theme;
|
|
@@ -11,69 +11,177 @@ interface IFieldContainerStylesParams {
|
|
|
11
11
|
isPrefixComponent?: boolean;
|
|
12
12
|
type?: `${FieldType}`;
|
|
13
13
|
disabledPlaceHolder?: boolean;
|
|
14
|
+
customSpacingTop?: number;
|
|
15
|
+
isLabeledPlaceholder?: boolean;
|
|
14
16
|
}
|
|
15
|
-
export declare const getFieldContainerBorderStyle: ({ theme, hasError, focus, disabled, }: Omit<IFieldContainerStylesParams,
|
|
17
|
+
export declare const getFieldContainerBorderStyle: ({ theme, hasError, focus, disabled, }: Omit<IFieldContainerStylesParams, "variant" | "value">) => {
|
|
18
|
+
borderStyle: string;
|
|
16
19
|
borderColor: string;
|
|
17
|
-
borderWidth:
|
|
20
|
+
borderWidth: 1.5;
|
|
18
21
|
} | {
|
|
22
|
+
borderStyle: string;
|
|
19
23
|
borderColor: string;
|
|
20
|
-
borderWidth:
|
|
24
|
+
borderWidth: 1;
|
|
21
25
|
};
|
|
22
|
-
export declare const getFieldSpacingAndHeight: ({ theme, variant, focus, value,
|
|
23
|
-
height:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} | {
|
|
27
|
-
height:
|
|
28
|
-
paddingTop:
|
|
29
|
-
paddingBottom:
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export declare const getFieldSpacingAndHeight: ({ isLabeledPlaceholder, theme, variant, focus, value, disabledPlaceHolder, customSpacingTop, }: Omit<IFieldContainerStylesParams, "hasError">) => {
|
|
27
|
+
height: 40;
|
|
28
|
+
paddingRight: 16;
|
|
29
|
+
paddingLeft: 16;
|
|
30
|
+
} | {
|
|
31
|
+
height: 56;
|
|
32
|
+
paddingTop: 0 | 4 | 1 | 2 | 3 | 6 | 8 | 12 | 16 | 20 | 40 | 56 | 24 | 28 | 32 | 36 | 44 | 48 | 52 | 64;
|
|
33
|
+
paddingBottom: 8 | 16;
|
|
34
|
+
paddingRight: 16;
|
|
35
|
+
paddingLeft: 16;
|
|
32
36
|
};
|
|
33
|
-
export declare const getFieldContainerStyles: ({ hasError, theme, focus, disabled }: IFieldContainerStylesParams) => {
|
|
37
|
+
export declare const getFieldContainerStyles: ({ hasError, theme, focus, disabled, variant, value, customSpacingTop, }: IFieldContainerStylesParams) => {
|
|
34
38
|
backgroundColor: string;
|
|
35
|
-
|
|
39
|
+
height: 40 | 56;
|
|
40
|
+
borderStyle: string;
|
|
36
41
|
borderColor: string;
|
|
37
|
-
borderWidth:
|
|
42
|
+
borderWidth: 1.5;
|
|
38
43
|
} | {
|
|
39
44
|
backgroundColor: string;
|
|
40
|
-
|
|
45
|
+
height: 40 | 56;
|
|
46
|
+
borderStyle: string;
|
|
41
47
|
borderColor: string;
|
|
42
|
-
borderWidth:
|
|
48
|
+
borderWidth: 1;
|
|
43
49
|
};
|
|
44
|
-
export declare const getFieldPlaceholderStyles: ({
|
|
50
|
+
export declare const getFieldPlaceholderStyles: ({ isFocused, variant, fieldType, }: {
|
|
45
51
|
theme: Theme;
|
|
46
52
|
isFocused: boolean;
|
|
47
53
|
disabled: boolean;
|
|
48
54
|
variant: `${FieldVariant}`;
|
|
49
55
|
fieldType: `${FieldType}`;
|
|
50
|
-
isPrefixComponent?: boolean
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
isPrefixComponent?: boolean;
|
|
57
|
+
shiftPlaceholder?: boolean;
|
|
58
|
+
}) => {
|
|
59
|
+
top: number;
|
|
60
|
+
transform?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
top?: undefined;
|
|
63
|
+
transform?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
transform: {
|
|
66
|
+
translateY: number;
|
|
67
|
+
}[];
|
|
68
|
+
top?: undefined;
|
|
69
|
+
};
|
|
70
|
+
export declare const getFieldStyles: ({ isLabeledPlaceholder, disabled, theme, variant, focus, value, type, isPrefixComponent, disabledPlaceHolder, }: {
|
|
71
|
+
isLabeledPlaceholder: boolean;
|
|
53
72
|
disabled: boolean;
|
|
54
73
|
theme: Theme;
|
|
55
74
|
variant: `${FieldVariant}`;
|
|
56
75
|
type: `${FieldType}`;
|
|
57
76
|
value: string;
|
|
58
77
|
focus: boolean;
|
|
59
|
-
isPrefixComponent?: boolean
|
|
60
|
-
disabledPlaceHolder?: boolean
|
|
78
|
+
isPrefixComponent?: boolean;
|
|
79
|
+
disabledPlaceHolder?: boolean;
|
|
61
80
|
}) => {
|
|
62
|
-
cursor: string;
|
|
63
|
-
color: string;
|
|
64
81
|
backgroundColor: string;
|
|
65
|
-
height: "40px";
|
|
66
|
-
paddingLeft: "16px" | "52px";
|
|
67
|
-
paddingRight: "16px";
|
|
68
|
-
} | {
|
|
69
|
-
cursor: string;
|
|
70
82
|
color: string;
|
|
83
|
+
height: 40;
|
|
84
|
+
paddingRight: 16;
|
|
85
|
+
paddingLeft: 16;
|
|
86
|
+
} | {
|
|
71
87
|
backgroundColor: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
paddingRight:
|
|
88
|
+
color: string;
|
|
89
|
+
height: 56;
|
|
90
|
+
paddingTop: 0 | 4 | 1 | 2 | 3 | 6 | 8 | 12 | 16 | 20 | 40 | 56 | 24 | 28 | 32 | 36 | 44 | 48 | 52 | 64;
|
|
91
|
+
paddingBottom: 8 | 16;
|
|
92
|
+
paddingRight: 16;
|
|
93
|
+
paddingLeft: 16;
|
|
94
|
+
};
|
|
95
|
+
export declare const getTypographyVariant: (theme: Theme, variant: TypographyVariantType) => {
|
|
96
|
+
fontSize: 48;
|
|
97
|
+
fontWeight: "600";
|
|
98
|
+
lineHeight: 56;
|
|
99
|
+
letterSpacing?: undefined;
|
|
100
|
+
} | {
|
|
101
|
+
fontSize: 40;
|
|
102
|
+
fontWeight: "600";
|
|
103
|
+
lineHeight: 48;
|
|
104
|
+
letterSpacing?: undefined;
|
|
105
|
+
} | {
|
|
106
|
+
fontSize: 32;
|
|
107
|
+
fontWeight: "600";
|
|
108
|
+
lineHeight: 40;
|
|
109
|
+
letterSpacing?: undefined;
|
|
110
|
+
} | {
|
|
111
|
+
fontSize: 24;
|
|
112
|
+
fontWeight: "600";
|
|
113
|
+
lineHeight: 32;
|
|
114
|
+
letterSpacing?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
fontSize: 20;
|
|
117
|
+
fontWeight: "600";
|
|
118
|
+
lineHeight: 28;
|
|
119
|
+
letterSpacing?: undefined;
|
|
120
|
+
} | {
|
|
121
|
+
fontSize: 16;
|
|
122
|
+
fontWeight: "600";
|
|
123
|
+
lineHeight: 24;
|
|
124
|
+
letterSpacing?: undefined;
|
|
125
|
+
} | {
|
|
126
|
+
fontSize: 14;
|
|
127
|
+
fontWeight: "600";
|
|
128
|
+
lineHeight: 20;
|
|
129
|
+
letterSpacing?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
fontSize: 16;
|
|
132
|
+
fontWeight: "500";
|
|
133
|
+
lineHeight: 24;
|
|
134
|
+
letterSpacing?: undefined;
|
|
135
|
+
} | {
|
|
136
|
+
fontSize: 14;
|
|
137
|
+
fontWeight: "500";
|
|
138
|
+
lineHeight: 20;
|
|
139
|
+
letterSpacing?: undefined;
|
|
140
|
+
} | {
|
|
141
|
+
fontSize: 12;
|
|
142
|
+
fontWeight: "500";
|
|
143
|
+
lineHeight: 16;
|
|
144
|
+
letterSpacing?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
fontSize: 12;
|
|
147
|
+
fontWeight: "600";
|
|
148
|
+
lineHeight: 16;
|
|
149
|
+
letterSpacing: 0.4;
|
|
150
|
+
} | {
|
|
151
|
+
fontSize: 10;
|
|
152
|
+
fontWeight: "500";
|
|
153
|
+
lineHeight: 14;
|
|
154
|
+
letterSpacing?: undefined;
|
|
155
|
+
} | {
|
|
156
|
+
fontSize: 10;
|
|
157
|
+
fontWeight: "600";
|
|
158
|
+
lineHeight: 12;
|
|
159
|
+
letterSpacing: 0.4;
|
|
160
|
+
} | {
|
|
161
|
+
fontSize: 16;
|
|
162
|
+
fontWeight: "400";
|
|
163
|
+
lineHeight: 22;
|
|
164
|
+
letterSpacing?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
fontSize: 14;
|
|
167
|
+
fontWeight: "400";
|
|
168
|
+
lineHeight: 20;
|
|
169
|
+
letterSpacing?: undefined;
|
|
170
|
+
} | {
|
|
171
|
+
fontSize: 12;
|
|
172
|
+
fontWeight: "400";
|
|
173
|
+
lineHeight: 16;
|
|
174
|
+
letterSpacing?: undefined;
|
|
175
|
+
} | {
|
|
176
|
+
fontSize: 12;
|
|
177
|
+
fontWeight: "600";
|
|
178
|
+
lineHeight: 16;
|
|
179
|
+
letterSpacing?: undefined;
|
|
180
|
+
} | {
|
|
181
|
+
fontSize: 10;
|
|
182
|
+
fontWeight: "600";
|
|
183
|
+
lineHeight: 12;
|
|
184
|
+
letterSpacing: 0.5;
|
|
77
185
|
};
|
|
78
186
|
export {};
|
|
79
187
|
//# sourceMappingURL=style.d.ts.map
|
package/dist/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/Field/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/Field/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAqB,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,UAAU,2BAA2B;IACnC,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,4BAA4B,GAAI,uCAK1C,IAAI,CAAC,2BAA2B,EAAE,SAAS,GAAG,OAAO,CAAC;;;;;;;;CAUxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,gGAQtC,IAAI,CAAC,2BAA2B,EAAE,UAAU,CAAC;;;;;;;;;;CAyC/C,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,yEAQrC,2BAA2B;;;;;;;;;;;;CAuB7B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,oCAIvC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAC3B,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;;;;;;;;;;CAaA,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,iHAU5B;IACD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;IAC3B,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;;;;;;;;;;;;;;CAkBA,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,KAAK,EAAE,SAAS,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKhF,CAAC"}
|
package/dist/type.d.ts
CHANGED
|
@@ -1,37 +1,126 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { Styles } from '@cleartrip/ct-design-types';
|
|
3
|
+
import { TypographyStyleConfigProps, TypographyVariantType } from '@cleartrip/ct-design-typography';
|
|
4
|
+
import { ICardFieldProps } from './variants/Card/type';
|
|
5
|
+
import { IOtpFieldProps } from './variants/OTP/type';
|
|
6
|
+
import { IPhoneField } from './variants/Phone/type';
|
|
7
|
+
export interface IFieldPrompt {
|
|
8
|
+
message?: string | ReactNode;
|
|
9
|
+
Icon?: ReactNode;
|
|
10
|
+
hasError: boolean;
|
|
11
|
+
}
|
|
12
|
+
import { FieldVariant, FieldType } from './constants';
|
|
13
|
+
export interface FieldChangeEvent {
|
|
14
|
+
target: {
|
|
15
|
+
value: string;
|
|
16
|
+
selectionStart: number;
|
|
17
|
+
};
|
|
18
|
+
currentTarget: IFieldRef;
|
|
19
|
+
preventDefault?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface FieldSelectEvent {
|
|
22
|
+
target: {
|
|
23
|
+
value: string;
|
|
24
|
+
selectionStart: number;
|
|
25
|
+
};
|
|
26
|
+
currentTarget: IFieldRef;
|
|
27
|
+
preventDefault?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export interface FieldFocusEvent {
|
|
30
|
+
target: {
|
|
31
|
+
value: string;
|
|
32
|
+
};
|
|
33
|
+
currentTarget: IFieldRef;
|
|
34
|
+
preventDefault?: () => void;
|
|
35
|
+
}
|
|
36
|
+
export interface FieldBlurEvent {
|
|
37
|
+
target: {
|
|
38
|
+
value: string;
|
|
39
|
+
};
|
|
40
|
+
currentTarget: IFieldRef;
|
|
41
|
+
preventDefault?: () => void;
|
|
42
|
+
}
|
|
43
|
+
export interface FieldPressInEvent {
|
|
44
|
+
target: {
|
|
45
|
+
value: string;
|
|
46
|
+
};
|
|
47
|
+
currentTarget: IFieldRef;
|
|
48
|
+
preventDefault?: () => void;
|
|
49
|
+
}
|
|
50
|
+
export interface FieldKeyDownEvent {
|
|
51
|
+
target: {
|
|
52
|
+
value: string;
|
|
53
|
+
key: string;
|
|
54
|
+
};
|
|
55
|
+
currentTarget: IFieldRef;
|
|
56
|
+
preventDefault?: () => void;
|
|
57
|
+
}
|
|
58
|
+
export interface IFieldRef {
|
|
59
|
+
focus: () => void;
|
|
60
|
+
blur: () => void;
|
|
61
|
+
setSelection: (start: number, end: number) => void;
|
|
12
62
|
}
|
|
13
63
|
export interface IFieldProps {
|
|
64
|
+
id?: string;
|
|
14
65
|
placeholder?: string;
|
|
66
|
+
placeholderType?: 'default' | 'labeled' | 'floating';
|
|
15
67
|
value: string;
|
|
16
|
-
prefix?:
|
|
17
|
-
|
|
68
|
+
prefix?: ReactElement<{
|
|
69
|
+
focus?: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
suffix?: ReactElement<{
|
|
72
|
+
focus?: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
prefixGap?: string;
|
|
75
|
+
suffixGap?: string;
|
|
18
76
|
variant?: `${FieldVariant}`;
|
|
77
|
+
inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
78
|
+
autoFocus?: boolean;
|
|
79
|
+
autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters' | undefined;
|
|
19
80
|
type?: `${FieldType}`;
|
|
20
81
|
prompt?: IFieldPrompt;
|
|
21
|
-
onChange
|
|
82
|
+
onChange?: (e: FieldChangeEvent) => void;
|
|
83
|
+
onSelect?: (e: FieldSelectEvent) => void;
|
|
84
|
+
onFocus?: (e: FieldFocusEvent) => void;
|
|
85
|
+
onBlur?: (e: FieldBlurEvent) => void;
|
|
86
|
+
onPressIn?: (e: FieldPressInEvent) => void;
|
|
87
|
+
onKeyDown?: (e: FieldKeyDownEvent) => void;
|
|
22
88
|
disabled?: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
89
|
+
readOnly?: boolean;
|
|
90
|
+
showSoftInputOnFocus?: boolean;
|
|
91
|
+
cursorColor?: string;
|
|
92
|
+
maxLength?: number;
|
|
26
93
|
styleConfig?: {
|
|
27
|
-
|
|
28
|
-
fieldContainer?:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
94
|
+
root?: Styles[];
|
|
95
|
+
fieldContainer?: Styles[];
|
|
96
|
+
field?: Styles[];
|
|
97
|
+
placeholder?: placeholderStyleConfig;
|
|
98
|
+
promptStyles?: promptStyleConfig;
|
|
99
|
+
};
|
|
100
|
+
fieldTypographyVariant?: TypographyVariantType;
|
|
101
|
+
selection?: {
|
|
102
|
+
start: number;
|
|
103
|
+
end?: number;
|
|
35
104
|
};
|
|
105
|
+
customSpacingTop?: number;
|
|
106
|
+
}
|
|
107
|
+
interface promptStyleConfig {
|
|
108
|
+
promptBox?: Styles[];
|
|
109
|
+
promptIconContainer?: Styles[];
|
|
110
|
+
promptMessageTypography?: TypographyStyleConfigProps;
|
|
111
|
+
}
|
|
112
|
+
interface placeholderStyleConfig {
|
|
113
|
+
placeholderLabel?: Styles[];
|
|
114
|
+
placeholderTypography?: TypographyStyleConfigProps;
|
|
36
115
|
}
|
|
116
|
+
export type InputFieldProps = (IPhoneField & {
|
|
117
|
+
fieldType: 'phone';
|
|
118
|
+
}) | (IOtpFieldProps & {
|
|
119
|
+
fieldType: 'otp';
|
|
120
|
+
}) | (ICardFieldProps & {
|
|
121
|
+
fieldType: 'card';
|
|
122
|
+
}) | (IFieldProps & {
|
|
123
|
+
fieldType?: 'default';
|
|
124
|
+
});
|
|
125
|
+
export {};
|
|
37
126
|
//# sourceMappingURL=type.d.ts.map
|
package/dist/type.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Field/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Field/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,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E9B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAG5B,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;CACpD;AAED,MAAM,MAAM,eAAe,GACvB,CAAC,WAAW,GAAG;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GACtC,CAAC,cAAc,GAAG;IAAE,SAAS,EAAE,KAAK,CAAA;CAAE,CAAC,GACvC,CAAC,eAAe,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GACzC,CAAC,WAAW,GAAG;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFieldProps, IFieldRef } from '../../type';
|
|
2
|
+
export interface ICursorRef {
|
|
3
|
+
cursorPos: number;
|
|
4
|
+
operation: string;
|
|
5
|
+
}
|
|
6
|
+
export declare enum CURSOR_OPERATION {
|
|
7
|
+
NONE = "NONE",
|
|
8
|
+
ADD = "ADD",
|
|
9
|
+
SUBSTRACT = "SUBSTRACT"
|
|
10
|
+
}
|
|
11
|
+
declare const CardField: import("react").ForwardRefExoticComponent<IFieldProps & import("react").RefAttributes<IFieldRef>>;
|
|
12
|
+
export default CardField;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Card/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKtE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,gBAAgB;IAC1B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,SAAS,cAAc;CACxB;AAWD,QAAA,MAAM,SAAS,mGAyDb,CAAC;AAIH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IFieldProps, IFieldRef } from '../../type';
|
|
2
|
+
export interface ICursorRef {
|
|
3
|
+
cursorPos: number;
|
|
4
|
+
operation: string;
|
|
5
|
+
}
|
|
6
|
+
export declare enum CURSOR_OPERATION {
|
|
7
|
+
NONE = "NONE",
|
|
8
|
+
ADD = "ADD",
|
|
9
|
+
SUBSTRACT = "SUBSTRACT"
|
|
10
|
+
}
|
|
11
|
+
declare const CardField: import("react").ForwardRefExoticComponent<IFieldProps & import("react").RefAttributes<IFieldRef>>;
|
|
12
|
+
export default CardField;
|
|
13
|
+
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Card/index.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKpD,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,gBAAgB;IAC1B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,SAAS,cAAc;CACxB;AAWD,QAAA,MAAM,SAAS,mGAcb,CAAC;AAIH,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Card/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/OTP/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAmHxC,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgOtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Styles } from '@cleartrip/ct-design-types';
|
|
2
|
+
import { FieldFocusEvent, IFieldProps } from '../../type';
|
|
3
|
+
type OtpFieldStyleConfig = {
|
|
4
|
+
otpBox?: Styles[];
|
|
5
|
+
otpRootInput?: Styles[];
|
|
6
|
+
otpRootContainer?: Styles[];
|
|
7
|
+
} & IFieldProps['styleConfig'];
|
|
8
|
+
export interface OtpFieldFocusEvent extends FieldFocusEvent {
|
|
9
|
+
target: {
|
|
10
|
+
value: string;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface OwnOtpFieldProps extends IFieldProps {
|
|
15
|
+
numberOfBoxes?: number;
|
|
16
|
+
onComplete?: (otp: string) => void;
|
|
17
|
+
refocus?: boolean;
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
}
|
|
20
|
+
export type IOtpFieldProps = Omit<OwnOtpFieldProps, 'onFocus' | 'styleConfig'> & {
|
|
21
|
+
onFocus?: (e: OtpFieldFocusEvent) => void;
|
|
22
|
+
styleConfig?: OtpFieldStyleConfig;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/OTP/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D,KAAK,mBAAmB,GAAG;IACzB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;AAE/B,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AACD,UAAU,gBAAiB,SAAQ,WAAW;IAE5C,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAGnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAIlB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,aAAa,CAAC,GAAG;IAC/E,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/components/Field/src/variants/Phone/Prefix/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAoD3C,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+BjD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../packages/components/Field/src/variants/Phone/Prefix/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAIhC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAIrB,WAAW,EAAE,MAAM,CAAC;IAIpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAI3B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAI7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFieldRef } from '../../type';
|
|
2
|
+
import { IPhoneField } from './type';
|
|
3
|
+
declare const PhoneField: import("react").ForwardRefExoticComponent<IPhoneField & import("react").RefAttributes<IFieldRef>>;
|
|
4
|
+
export default PhoneField;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Phone/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAmBrC,QAAA,MAAM,UAAU,mGAqDf,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFieldRef } from '../../type';
|
|
2
|
+
import { IPhoneField } from './type';
|
|
3
|
+
declare const PhoneField: import("react").ForwardRefExoticComponent<IPhoneField & import("react").RefAttributes<IFieldRef>>;
|
|
4
|
+
export default PhoneField;
|
|
5
|
+
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Phone/index.native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAoBrC,QAAA,MAAM,UAAU,mGAyDf,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../packages/components/Field/src/variants/Phone/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,WAAW,EAAE,iBAAiB;IAIjE,GAAG,EAAE,MAAM,CAAC;IAIZ,GAAG,EAAE,MAAM,CAAC;CACb"}
|
package/package.json
CHANGED
|
@@ -1,40 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-design-field",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Field Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
|
-
"main": "dist/ct-design-field.cjs.js",
|
|
6
|
+
"main": "./dist/ct-design-field.cjs.js",
|
|
7
7
|
"jsnext:main": "dist/ct-design-field.esm.js",
|
|
8
|
+
"react-native": "src/index.ts",
|
|
8
9
|
"module": "dist/ct-design-field.esm.js",
|
|
9
10
|
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/ct-design-field.esm.js",
|
|
15
|
+
"default": "./dist/ct-design-field.cjs.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
10
18
|
"browser": {
|
|
11
19
|
"./dist/ct-design-field.esm.js": "./dist/ct-design-field.browser.esm.js",
|
|
12
20
|
"./dist/ct-design-field.cjs.js": "./dist/ct-design-field.browser.cjs.js"
|
|
13
21
|
},
|
|
14
22
|
"files": [
|
|
15
|
-
"dist"
|
|
23
|
+
"dist",
|
|
24
|
+
"src"
|
|
16
25
|
],
|
|
17
26
|
"dependencies": {
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"@cleartrip/ct-design-
|
|
21
|
-
"@cleartrip/ct-design-
|
|
22
|
-
"@cleartrip/ct-design-
|
|
23
|
-
"@cleartrip/ct-design-
|
|
24
|
-
"@cleartrip/ct-design-
|
|
25
|
-
"@cleartrip/ct-design-
|
|
26
|
-
"@cleartrip/ct-design-
|
|
27
|
-
"@cleartrip/ct-design-
|
|
28
|
-
"@cleartrip/ct-design-
|
|
27
|
+
"@emotion/react": "^11.14.0",
|
|
28
|
+
"@emotion/styled": "^11.14.0",
|
|
29
|
+
"@cleartrip/ct-design-typography": "5.1.0",
|
|
30
|
+
"@cleartrip/ct-design-container": "5.1.0",
|
|
31
|
+
"@cleartrip/ct-design-types": "5.1.0",
|
|
32
|
+
"@cleartrip/ct-design-box": "5.1.0",
|
|
33
|
+
"@cleartrip/ct-design-common-utils": "5.1.0",
|
|
34
|
+
"@cleartrip/ct-design-common-constants": "5.1.0",
|
|
35
|
+
"@cleartrip/ct-design-divider": "5.1.0",
|
|
36
|
+
"@cleartrip/ct-design-dotted-loader": "5.1.0",
|
|
37
|
+
"@cleartrip/ct-design-style-manager": "5.1.0",
|
|
38
|
+
"@cleartrip/ct-design-theme": "5.1.0",
|
|
39
|
+
"@cleartrip/ct-design-outside-click-handler": "5.1.0",
|
|
40
|
+
"@cleartrip/ct-design-card": "5.1.0",
|
|
41
|
+
"@cleartrip/ct-design-use-merge-refs": "5.1.0"
|
|
29
42
|
},
|
|
30
43
|
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@cleartrip/ct-design-
|
|
44
|
+
"@emotion/babel-plugin": "^11.12.0",
|
|
45
|
+
"@cleartrip/ct-design-icons": "6.0.0"
|
|
33
46
|
},
|
|
34
47
|
"peerDependencies": {
|
|
35
48
|
"react": ">=16.8.0",
|
|
36
|
-
"react-dom": ">=16.8.0"
|
|
37
|
-
"styled-components": "^5.3.6"
|
|
49
|
+
"react-dom": ">=16.8.0"
|
|
38
50
|
},
|
|
39
51
|
"publishConfig": {
|
|
40
52
|
"access": "public"
|
|
@@ -45,6 +57,8 @@
|
|
|
45
57
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
46
58
|
"watch-package": "rollup -c -w",
|
|
47
59
|
"build-package": "rollup -c",
|
|
48
|
-
"build-package:clean": "rm -rf dist && rollup -c"
|
|
60
|
+
"build-package:clean": "rm -rf dist && rollup -c",
|
|
61
|
+
"publish-package:local": "yalc publish --no-scripts",
|
|
62
|
+
"publish-package:local:registry": "pnpm publish --registry http://localhost:4873 --no-git-checks --access public"
|
|
49
63
|
}
|
|
50
64
|
}
|