skyflow-js 1.21.2 → 1.21.3
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/CHANGELOG.md +4 -0
- package/README.md +22 -2
- package/package.json +1 -1
- package/types/core/constants.d.ts +3 -3
- package/types/utils/helpers/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.21.3] - 2022-10-18
|
|
6
|
+
### Added
|
|
7
|
+
- `cardIcon` and `copyIcon` style objects for collect and reveal elements.
|
|
8
|
+
|
|
5
9
|
## [1.21.2] - 2022-10-04
|
|
6
10
|
### Fixed
|
|
7
11
|
- Fix regression in `card_number` element
|
package/README.md
CHANGED
|
@@ -230,6 +230,8 @@ The `inputStyles` field accepts a style object which consists of CSS properties
|
|
|
230
230
|
- `empty`: applied when the Element has no input
|
|
231
231
|
- `focus`: applied when the Element has focus
|
|
232
232
|
- `invalid`: applied when the Element has invalid input
|
|
233
|
+
- `cardIcon`: applied to the card type icon in `CARD_NUMBER` Element
|
|
234
|
+
- `copyIcon`: applied to copy icon in Elements when `enableCopy` option is true
|
|
233
235
|
|
|
234
236
|
Styles are specified with [JSS](https://cssinjs.org/?v=v10.7.1).
|
|
235
237
|
|
|
@@ -250,8 +252,16 @@ inputStyles:{
|
|
|
250
252
|
invalid: {
|
|
251
253
|
color: "#f44336",
|
|
252
254
|
},
|
|
255
|
+
cardIcon:{
|
|
256
|
+
position: "absolute",
|
|
257
|
+
left:"8px",
|
|
258
|
+
bottom:"calc(50% - 12px)"
|
|
259
|
+
},
|
|
260
|
+
copyIcon:{
|
|
261
|
+
position: "absolute",
|
|
262
|
+
right:"8px",
|
|
263
|
+
}
|
|
253
264
|
}
|
|
254
|
-
}
|
|
255
265
|
```
|
|
256
266
|
The states that are available for `labelStyles` are `base` and `focus`.
|
|
257
267
|
|
|
@@ -422,6 +432,11 @@ const element = container.create({
|
|
|
422
432
|
base: {
|
|
423
433
|
color: "#1d1d1d",
|
|
424
434
|
},
|
|
435
|
+
cardIcon:{
|
|
436
|
+
position: "absolute",
|
|
437
|
+
left:"8px",
|
|
438
|
+
bottom:"calc(50% - 12px)"
|
|
439
|
+
},
|
|
425
440
|
},
|
|
426
441
|
labelStyles: {
|
|
427
442
|
base: {
|
|
@@ -890,7 +905,7 @@ const revealElement = {
|
|
|
890
905
|
|
|
891
906
|
```
|
|
892
907
|
|
|
893
|
-
The `inputStyles`, `labelStyles` and `errorTextStyles` parameters accepts a styles object as described in the [previous section](#step-2-create-a-collect-element) for collecting data
|
|
908
|
+
The `inputStyles`, `labelStyles` and `errorTextStyles` parameters accepts a styles object as described in the [previous section](#step-2-create-a-collect-element) for collecting data. But for reveal element, `inputStyles` accepts only `base` variant and `copyIcon` style object.
|
|
894
909
|
|
|
895
910
|
An example of a inputStyles object:
|
|
896
911
|
|
|
@@ -898,6 +913,11 @@ An example of a inputStyles object:
|
|
|
898
913
|
inputStyles: {
|
|
899
914
|
base: {
|
|
900
915
|
color: "#1d1d1d"
|
|
916
|
+
},
|
|
917
|
+
copyIcon:{
|
|
918
|
+
position: "absolute",
|
|
919
|
+
right:"8px",
|
|
920
|
+
top: "calc(50% - 10px)",
|
|
901
921
|
}
|
|
902
922
|
}
|
|
903
923
|
```
|
package/package.json
CHANGED
|
@@ -260,9 +260,9 @@ export declare const INPUT_WITH_ICON_DEFAULT_STYLES: {
|
|
|
260
260
|
'text-indent': string;
|
|
261
261
|
padding: string;
|
|
262
262
|
};
|
|
263
|
-
export declare const INPUT_ICON_STYLES = "position: absolute; left:8px;
|
|
264
|
-
export declare const COLLECT_COPY_ICON_STYLES = "position: absolute; right:8px;
|
|
265
|
-
export declare const REVEAL_COPY_ICON_STYLES = "position: absolute; right:8px; top:calc(50% -
|
|
263
|
+
export declare const INPUT_ICON_STYLES = "position: absolute; left:8px; bottom:calc(50% - 12px)";
|
|
264
|
+
export declare const COLLECT_COPY_ICON_STYLES = "position: absolute; right:8px; bottom:calc(50% - 12px); cursor:pointer;";
|
|
265
|
+
export declare const REVEAL_COPY_ICON_STYLES = "position: absolute; right:8px; top:calc(50% - 12px); cursor:pointer;";
|
|
266
266
|
export declare const ERROR_TEXT_STYLES: {
|
|
267
267
|
color: string;
|
|
268
268
|
padding: string;
|
|
@@ -8,3 +8,4 @@ export declare const getReturnValue: (value: string | Blob, element: string, doe
|
|
|
8
8
|
export declare const copyToClipboard: (text: string) => void;
|
|
9
9
|
export declare const handleCopyIconClick: (textToCopy: string, domCopy: any) => void;
|
|
10
10
|
export declare const fileValidation: (value: any) => boolean;
|
|
11
|
+
export declare const styleToString: (style: any) => string;
|