@trilogy-ds/react 0.0.1-beta-91 → 0.0.1-beta-93
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/lib/components/autocomplete/AutoComplete.d.ts +4 -0
- package/lib/components/{input/autocomplete → autocomplete}/AutoComplete.js +10 -9
- package/lib/components/autocomplete/AutoComplete.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/AutoComplete.native.d.ts +2 -2
- package/lib/components/{input/autocomplete → autocomplete}/AutoComplete.native.js +1 -1
- package/lib/components/autocomplete/AutoComplete.native.js.map +1 -0
- package/lib/components/autocomplete/AutoCompleteProps.d.ts +49 -0
- package/lib/components/autocomplete/AutoCompleteProps.js.map +1 -0
- package/lib/components/{input/autocomplete/AutoCompletePropsDefaults.js → autocomplete/AutoCompletePropsNativeDefaults.js} +17 -21
- package/lib/components/autocomplete/AutoCompletePropsWebDefaults.js +752 -0
- package/lib/components/autocomplete/Autocomplete.helpers.js.map +1 -0
- package/lib/components/autocomplete/index.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteIem.native.js +2 -2
- package/lib/components/autocomplete/item/AutoCompleteIem.native.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteItem.js +3 -3
- package/lib/components/autocomplete/item/AutoCompleteItem.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteItemProps.d.ts +1 -1
- package/lib/components/autocomplete/item/AutoCompleteItemProps.js.map +1 -0
- package/lib/components/autocomplete/item/index.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenu.js +3 -3
- package/lib/components/autocomplete/menu/AutoCompleteMenu.js.map +1 -0
- package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenu.native.js +2 -2
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.js.map +1 -0
- package/lib/components/autocomplete/menu/AutoCompleteMenuProps.js.map +1 -0
- package/lib/components/autocomplete/menu/index.js.map +1 -0
- package/lib/components/autocomplete/utils/debounce.js.map +1 -0
- package/lib/components/autocomplete/utils/index.js.map +1 -0
- package/lib/components/breadcrumb/item/BreadcrumbItemPropsWebDefaults.js +2 -2
- package/lib/components/button/ButtonPropsDefaults.js +2 -2
- package/lib/components/input/Input.d.ts +2 -73
- package/lib/components/input/Input.js +16 -41
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.native.d.ts +2 -4
- package/lib/components/input/Input.native.js +24 -29
- package/lib/components/input/Input.native.js.map +1 -1
- package/lib/components/input/InputChangeEventNativeDefaults.js +17 -0
- package/lib/components/input/{InputChangeEventDefaults.js → InputChangeEventWebDefaults.js} +2 -7
- package/lib/components/input/InputClickEventDefaults.js +1 -1
- package/lib/components/input/InputKeyboardEventDefaults.js +1 -1
- package/lib/components/input/InputNativeEventsDefaults.js +15 -1
- package/lib/components/input/InputProps.d.ts +19 -12
- package/lib/components/input/InputPropsDefaults.js +2 -20
- package/lib/components/input/InputWebEventsDefaults.js +15 -1
- package/lib/components/link/LinkPropsDefaults.js +2 -2
- package/lib/components/progress/radial/item/ProgressRadialItemPropsDefaults.js +1 -1
- package/lib/components/tabs/item/TabsItemPropsDefaults.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/lib/components/input/autocomplete/AutoComplete.d.ts +0 -24
- package/lib/components/input/autocomplete/AutoComplete.js.map +0 -1
- package/lib/components/input/autocomplete/AutoComplete.native.js.map +0 -1
- package/lib/components/input/autocomplete/AutoCompleteProps.d.ts +0 -29
- package/lib/components/input/autocomplete/AutoCompleteProps.js.map +0 -1
- package/lib/components/input/autocomplete/Autocomplete.helpers.js.map +0 -1
- package/lib/components/input/autocomplete/index.js.map +0 -1
- package/lib/components/input/autocomplete/item/AutoCompleteIem.native.js.map +0 -1
- package/lib/components/input/autocomplete/item/AutoCompleteItem.js.map +0 -1
- package/lib/components/input/autocomplete/item/AutoCompleteItemProps.js.map +0 -1
- package/lib/components/input/autocomplete/item/index.js.map +0 -1
- package/lib/components/input/autocomplete/menu/AutoCompleteMenu.js.map +0 -1
- package/lib/components/input/autocomplete/menu/AutoCompleteMenu.native.js.map +0 -1
- package/lib/components/input/autocomplete/menu/AutoCompleteMenuProps.js.map +0 -1
- package/lib/components/input/autocomplete/menu/index.js.map +0 -1
- package/lib/components/input/autocomplete/utils/debounce.js.map +0 -1
- package/lib/components/input/autocomplete/utils/index.js.map +0 -1
- /package/lib/components/{input/autocomplete → autocomplete}/AutoCompleteProps.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/Autocomplete.helpers.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/Autocomplete.helpers.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/ItemDefaults.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/ItemSelectedEventDefaults.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/index.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/index.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteIem.native.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteItem.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteItemProps.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/AutoCompleteItemPropsDefaults.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/index.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/item/index.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenu.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenu.native.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenuProps.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenuProps.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/AutoCompleteMenuPropsDefaults.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/index.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/menu/index.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/utils/debounce.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/utils/debounce.js +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/utils/index.d.ts +0 -0
- /package/lib/components/{input/autocomplete → autocomplete}/utils/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autocomplete.helpers.js","sourceRoot":"","sources":["../../../components/autocomplete/Autocomplete.helpers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAA4B,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;AAC3G,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE;IACnC,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA,CAAC,+CAA+C;AACnG,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAmC,IAAS,EAAE,KAAa,EAAO,EAAE;IACjG,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IACxC,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,EAAE,EAAE,GAAG,CAAC,CAAA;IACjD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC3F,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,gBAAgB,MAAM,QAAQ,CAAA;AACrC,OAAO,gBAAgB,MAAM,QAAQ,CAAA;AAErC,cAAc,qBAAqB,CAAA;AAEnC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import { Text } from '
|
|
4
|
-
import { getLabel } from '
|
|
3
|
+
import { Text } from '../../../components/text';
|
|
4
|
+
import { getLabel } from '../../../components/autocomplete/Autocomplete.helpers';
|
|
5
5
|
const AutoCompleteItemNative = ({ item, onSelect }) => {
|
|
6
6
|
return (React.createElement(TouchableOpacity, { style: styles.itemList, onPress: onSelect },
|
|
7
7
|
React.createElement(Text, null, getLabel(item))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteIem.native.js","sourceRoot":"","sources":["../../../../components/autocomplete/item/AutoCompleteIem.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAA;AAGzE,MAAM,sBAAsB,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAyB,EAAe,EAAE;IACxF,OAAO,CACL,oBAAC,gBAAgB,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ;QACzD,oBAAC,IAAI,QAAE,QAAQ,CAAC,IAAI,CAAC,CAAQ,CACZ,CACpB,CAAA;AACH,CAAC,CAAA;AACD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE;KACZ;CACF,CAAC,CAAA;AAEF,eAAe,sBAAsB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useTrilogyContext } from '
|
|
4
|
-
import { hashClass } from '
|
|
5
|
-
import { is } from '
|
|
3
|
+
import { useTrilogyContext } from '../../../context';
|
|
4
|
+
import { hashClass } from '../../../helpers';
|
|
5
|
+
import { is } from '../../../services';
|
|
6
6
|
/**
|
|
7
7
|
* AutoCompleteItem Component
|
|
8
8
|
* @param suggestionSelected {Function} select item
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteItem.js","sourceRoot":"","sources":["../../../../components/autocomplete/item/AutoCompleteItem.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAI/B;;;;;;GAMG;AACH,MAAM,gBAAgB,GAAG,CAAmC,EAC1D,QAAQ,EACR,kBAAkB,EAClB,MAAM,EACN,IAAI,EACJ,MAAM,GACmB,EAAe,EAAE;IAC1C,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAErD,OAAO,CACL,6BACE,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,EACpC,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EACpC,IAAI,EAAC,UAAU,iBACF,MAAM,EACnB,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,IAAI,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EACzG,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAElE,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Item } from "
|
|
2
|
+
import { Item } from "../../../components/autocomplete/AutoCompleteProps";
|
|
3
3
|
export interface AutoCompleteItemProps<T extends string | Item<unknown> = string> {
|
|
4
4
|
children?: string | React.ReactNode;
|
|
5
5
|
suggestionSelected?: (value: T) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteItemProps.js","sourceRoot":"","sources":["../../../../components/autocomplete/item/AutoCompleteItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/autocomplete/item/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAEjD,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useTrilogyContext } from '
|
|
4
|
-
import { hashClass } from '
|
|
5
|
-
import { is } from '
|
|
3
|
+
import { useTrilogyContext } from '../../../context';
|
|
4
|
+
import { hashClass } from '../../../helpers';
|
|
5
|
+
import { is } from '../../../services';
|
|
6
6
|
/**
|
|
7
7
|
* AutoCompleteMenu Component
|
|
8
8
|
* @param children {ReactNode} Children
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteMenu.js","sourceRoot":"","sources":["../../../../components/autocomplete/menu/AutoCompleteMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAG/B;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAyB,EAAe,EAAE;IACpH,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,CACL,6BACE,IAAI,EAAC,MAAM,iBACE,MAAM,EACnB,SAAS,EAAE,SAAS,CAClB,MAAM,EACN,IAAI,CAAC,mBAAmB,EAAE,QAAQ,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAC/F,IAEA,QAAQ,CACL,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlatList, StyleSheet } from 'react-native';
|
|
3
|
-
import { TrilogyColor, getColorStyle } from '
|
|
4
|
-
import AutoCompleteItemNative from '
|
|
3
|
+
import { TrilogyColor, getColorStyle } from '../../../objects';
|
|
4
|
+
import AutoCompleteItemNative from '../../../components/autocomplete/item/AutoCompleteIem.native';
|
|
5
5
|
const AutoCompleteMenuNative = ({ suggestions, handleSelectItem }) => {
|
|
6
6
|
const styles = StyleSheet.create({
|
|
7
7
|
list: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteMenu.native.js","sourceRoot":"","sources":["../../../../components/autocomplete/menu/AutoCompleteMenu.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,sBAAsB,MAAM,uDAAuD,CAAA;AAG1F,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAyB,EAAe,EAAE;IACvG,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE;YACJ,SAAS,EAAE,CAAC;YACZ,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,aAAa,CAAC,YAAY,CAAC,UAAU,CAAC;YACvD,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC;YAClD,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,CAAC;SACZ;KACF,CAAC,CAAA;IAEF,OAAO,CACL,oBAAC,QAAQ,IACP,yBAAyB,EAAC,SAAS,EACnC,mBAAmB,QACnB,aAAa,EAAE,IAAI,EACnB,KAAK,EAAE,MAAM,CAAC,IAAI,EAClB,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CACvB,sBAAsB,CAAC;YACrB,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,GAAG,EAAE;gBACb,gBAAgB,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAA;YAC5C,CAAC;SACF,CAAC,EAEJ,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAC5C,CACH,CAAA;AACH,CAAC,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoCompleteMenuProps.js","sourceRoot":"","sources":["../../../../components/autocomplete/menu/AutoCompleteMenuProps.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/autocomplete/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AAEjD,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../components/autocomplete/utils/debounce.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAkB,IAA4B,EAAE,IAAY,EAAE,EAAE;IACtF,IAAI,OAA8B,CAAA;IAClC,OAAO,KAAK,EAAE,GAAG,IAAO,EAAE,EAAE;QAC1B,4DAA4D;QAC5D,MAAM,OAAO,GAAmC,IAAI,CAAA;QACpD,MAAM,KAAK,GAAG;YACZ,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC3B,CAAC,CAAA;QACD,IAAI,OAAO,EAAE;YACX,YAAY,CAAC,OAAO,CAAC,CAAA;SACtB;QACD,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/autocomplete/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -19,6 +19,8 @@ export default {
|
|
|
19
19
|
"undefined",
|
|
20
20
|
"symbol",
|
|
21
21
|
"object",
|
|
22
|
+
"text",
|
|
23
|
+
"search",
|
|
22
24
|
"a",
|
|
23
25
|
"abbr",
|
|
24
26
|
"address",
|
|
@@ -106,7 +108,6 @@ export default {
|
|
|
106
108
|
"ruby",
|
|
107
109
|
"s",
|
|
108
110
|
"samp",
|
|
109
|
-
"search",
|
|
110
111
|
"slot",
|
|
111
112
|
"script",
|
|
112
113
|
"section",
|
|
@@ -190,7 +191,6 @@ export default {
|
|
|
190
191
|
"set",
|
|
191
192
|
"stop",
|
|
192
193
|
"switch",
|
|
193
|
-
"text",
|
|
194
194
|
"textPath",
|
|
195
195
|
"tspan",
|
|
196
196
|
"use",
|
|
@@ -82,6 +82,8 @@ export default {
|
|
|
82
82
|
"undefined",
|
|
83
83
|
"symbol",
|
|
84
84
|
"object",
|
|
85
|
+
"text",
|
|
86
|
+
"search",
|
|
85
87
|
"a",
|
|
86
88
|
"abbr",
|
|
87
89
|
"address",
|
|
@@ -169,7 +171,6 @@ export default {
|
|
|
169
171
|
"ruby",
|
|
170
172
|
"s",
|
|
171
173
|
"samp",
|
|
172
|
-
"search",
|
|
173
174
|
"slot",
|
|
174
175
|
"script",
|
|
175
176
|
"section",
|
|
@@ -253,7 +254,6 @@ export default {
|
|
|
253
254
|
"set",
|
|
254
255
|
"stop",
|
|
255
256
|
"switch",
|
|
256
|
-
"text",
|
|
257
257
|
"textPath",
|
|
258
258
|
"tspan",
|
|
259
259
|
"use",
|
|
@@ -1,77 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps, InputWebEvents } from './InputProps';
|
|
3
|
-
import { AutoCompleteProps, Item } from './autocomplete';
|
|
4
3
|
export interface InputProp extends InputProps, InputWebEvents {
|
|
5
4
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @param name {string} Input name
|
|
9
|
-
* @param label {string} Label for input
|
|
10
|
-
* @param sample {string} Sample for input (below label)
|
|
11
|
-
* @param disabled {boolean} Disabled input
|
|
12
|
-
* @param onChange {Function} OnChange Input Event
|
|
13
|
-
* @param onFocus {Function} onFocus Input Event
|
|
14
|
-
* @param onBlur {Function} onBlur Input Event
|
|
15
|
-
* @param placeholder {string} Placeholder Input
|
|
16
|
-
* @param type {InputType} Type for input
|
|
17
|
-
* @param defaultValue {string} Default Value for Input
|
|
18
|
-
* @param hasIcon {boolean} Adding if you want icon - Default icon is defined by status
|
|
19
|
-
* @param customIcon {IconName} Adding if you want custom icon
|
|
20
|
-
* @param status {InputStatus} Input with status - (SUCCESS|WARNING|ERROR|DEFAULT)
|
|
21
|
-
* @param patternValidator {RegExp} regex validator
|
|
22
|
-
* @param customValidator {Function} custom function validator
|
|
23
|
-
* @param onStatusChange {Function} status change event
|
|
24
|
-
* @param help {string} Help for input
|
|
25
|
-
* @param ref Pass a ref for input
|
|
26
|
-
* @param onSubmit {Function} onSubmit Event
|
|
27
|
-
* @param maxLength {number} Textarea max length
|
|
28
|
-
* @param customIconLeft {IconName} Adding if you want custom icon left
|
|
29
|
-
* @param customIconRight {IconName} Adding if you want custom icon right
|
|
30
|
-
* @param securityGauge {boolean} add security gauge for input type password
|
|
31
|
-
* @param validationRules {IValidationRules} Textarea max length
|
|
32
|
-
|
|
33
|
-
* - -------------------------- WEB PROPERTIES -------------------------------
|
|
34
|
-
* @param loading {boolean} Loading input
|
|
35
|
-
* @param value {string} Value for Input
|
|
36
|
-
* @param focused {boolean} Fucus mode
|
|
37
|
-
* @param className {string} Additionnal CSS Classes
|
|
38
|
-
* @param onMouseEnter {Function} onMouseEnter Input Event
|
|
39
|
-
* @param onMouseLeave {Function} onMouseLeave Input Event
|
|
40
|
-
* @param iconClassname {string} Additional icon classes
|
|
41
|
-
* @param onKeyPress {Function} onKeyPress Input Event
|
|
42
|
-
* @param onKeyUp {Function} onKeyUp Input Event
|
|
43
|
-
* @param onIconClick {Function} onIconClick Input Event
|
|
44
|
-
* @param onClick {Function} onClick Input Event
|
|
45
|
-
* @param forceControl {boolean} Force the control of the input value
|
|
46
|
-
* @param minLength {number} Textarea min length
|
|
47
|
-
* @param accessibilityLabel {string} Accessibility label
|
|
48
|
-
* @param testId {string} Test Id for Test Integration
|
|
49
|
-
* @param required {boolean} Required input
|
|
50
|
-
* - -------------------------- NATIVE PROPERTIES -------------------------------
|
|
51
|
-
* @param autoCompleteType {InputAutoCompleteType} Auto complete input type
|
|
52
|
-
*/
|
|
53
|
-
declare const Input: {
|
|
54
|
-
({ forceControl, label, sample, className, disabled, onChange, onKeyPress, onKeyUp, onIconClick, onClick, onFocus, onBlur, patternValidator, onMouseEnter, onMouseLeave, name, placeholder, type, defaultValue, value, loading, focused, hasIcon, customIcon, status, help, iconClassname, reference, onStatusChange, customValidator, onSubmit, minLength, maxLength, testId, accessibilityLabel, autoCompleteType, customIconLeft, customIconRight, securityGauge, validationRules, required, ...others }: InputProp): JSX.Element;
|
|
55
|
-
/**
|
|
56
|
-
* AutoComplete Component
|
|
57
|
-
* @param placeholder {string} placeholder for input
|
|
58
|
-
* @param defaultValue {string} Default Value for Input
|
|
59
|
-
* @param data {string[]} Datas AutoComplete list Item
|
|
60
|
-
* @param value {string} Value of Input
|
|
61
|
-
* @param onChange {Function} OnChange Input Event
|
|
62
|
-
* @param onFocus {Function} OnFocus Input Event
|
|
63
|
-
* @param children {Function} Custom Component for dropdown list
|
|
64
|
-
* @param displayMenu {boolean} Display Autocomplete Menu (default: true)
|
|
65
|
-
* @param matching {Function} matching function
|
|
66
|
-
* - ------------------ WEB PROPERTIES -----------------------
|
|
67
|
-
* @param classNameMenu {string} Additionnal CSS Classes for Menu
|
|
68
|
-
* @param absoluteMenu {boolean} Absolute position for Menu
|
|
69
|
-
* @param fullwidthMenu {boolean} Fullwidth size for Menu
|
|
70
|
-
* @param className {string} Additionnal CSS Classes
|
|
71
|
-
* @param onItemSelected {Function} OnSelectedItemList event
|
|
72
|
-
* @param customIcon {string} Additional icon classes
|
|
73
|
-
* @param debounceSuggestionsTimeout {number} Timeout for getSuggestions debounce
|
|
74
|
-
*/
|
|
75
|
-
AutoComplete<T extends string | Item<unknown> = string>(props: AutoCompleteProps<T>): React.JSX.Element;
|
|
76
|
-
};
|
|
77
|
-
export default Input;
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<InputProp & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export default _default;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { useCallback, useEffect, useState } from 'react';
|
|
1
|
+
import { Text, TextLevels, TextMarkup } from '../../components/text';
|
|
3
2
|
import { useTrilogyContext } from '../../context';
|
|
4
3
|
import { hashClass } from '../../helpers';
|
|
4
|
+
import { TypographyColor } from '../../objects';
|
|
5
5
|
import { has, is } from '../../services';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
6
8
|
import { Icon, IconColor, IconName, IconSize } from '../icon';
|
|
7
|
-
import { Text, TextLevels, TextMarkup } from '../../components/text';
|
|
8
9
|
import { InputStatus, InputType } from './InputEnum';
|
|
9
|
-
import { AutoComplete } from './autocomplete';
|
|
10
10
|
import InputGauge from './gauge/InputGauge';
|
|
11
|
-
import { TypographyColor } from '../../objects';
|
|
12
11
|
/**
|
|
13
12
|
* Input Component
|
|
14
13
|
* @param name {string} Input name
|
|
@@ -56,7 +55,7 @@ import { TypographyColor } from '../../objects';
|
|
|
56
55
|
* - -------------------------- NATIVE PROPERTIES -------------------------------
|
|
57
56
|
* @param autoCompleteType {InputAutoCompleteType} Auto complete input type
|
|
58
57
|
*/
|
|
59
|
-
const Input = ({ forceControl, label, sample, className, disabled, onChange, onKeyPress, onKeyUp, onIconClick, onClick, onFocus, onBlur, patternValidator, onMouseEnter, onMouseLeave, name, placeholder, type = 'text', defaultValue, value, loading, focused, hasIcon, customIcon, status, help, iconClassname,
|
|
58
|
+
const Input = ({ forceControl, label, sample, className, disabled, onChange, onKeyPress, onKeyUp, onIconClick, onClick, onFocus, onBlur, patternValidator, onMouseEnter, onMouseLeave, name, placeholder, type = 'text', defaultValue, value, loading, focused, hasIcon, customIcon, status, help, iconClassname, onStatusChange, customValidator, onSubmit, minLength, maxLength, testId, accessibilityLabel, autoCompleteType, customIconLeft, customIconRight, securityGauge, validationRules, required, ...others }, ref) => {
|
|
60
59
|
const { styled } = useTrilogyContext();
|
|
61
60
|
const hasPlaceholder = placeholder !== undefined && placeholder.length > 0;
|
|
62
61
|
const inputIcon = new Map();
|
|
@@ -83,15 +82,15 @@ const Input = ({ forceControl, label, sample, className, disabled, onChange, onK
|
|
|
83
82
|
inputName: target.name,
|
|
84
83
|
inputValue: target.value,
|
|
85
84
|
inputKeyCode: e.keyCode,
|
|
86
|
-
|
|
85
|
+
target,
|
|
87
86
|
preventDefault: () => e.preventDefault(),
|
|
88
87
|
};
|
|
89
88
|
}, []);
|
|
90
89
|
const IconWrapper = useCallback(({ className, name, color, closeIconSearch, onPress }) => {
|
|
91
|
-
return (React.createElement("div", { ...type ===
|
|
90
|
+
return (React.createElement("div", { ...(type === 'password' && { 'data-show-pwd': true }), onClick: (e) => {
|
|
92
91
|
onPress && onPress();
|
|
93
92
|
if (onIconClick) {
|
|
94
|
-
onIconClick({ inputName: name !== null && name !== void 0 ? name : '', inputValue: _value,
|
|
93
|
+
onIconClick({ inputName: name !== null && name !== void 0 ? name : '', inputValue: _value, target: e.target });
|
|
95
94
|
}
|
|
96
95
|
} },
|
|
97
96
|
React.createElement(Icon, { className: className, name: name, size: IconSize.SMALL, color: color }),
|
|
@@ -126,19 +125,19 @@ const Input = ({ forceControl, label, sample, className, disabled, onChange, onK
|
|
|
126
125
|
onStatusChange(localStatus);
|
|
127
126
|
}, [localStatus]);
|
|
128
127
|
return (React.createElement("div", { className: wrapperClasses, "data-has-gauge": securityGauge ? true : undefined },
|
|
129
|
-
!hasPlaceholder && React.createElement("label", { className: 'input-label' },
|
|
128
|
+
!hasPlaceholder && (React.createElement("label", { className: 'input-label' },
|
|
130
129
|
label,
|
|
131
|
-
|
|
132
|
-
label && required && React.createElement(Text, { markup: TextMarkup.SPAN, typo: TypographyColor.TEXT_ERROR }, "*")),
|
|
133
|
-
!hasPlaceholder && label && sample && React.createElement(Text, { className: 'input-sample', level: TextLevels.TWO, typo: TypographyColor.TEXT_DISABLED }, sample),
|
|
130
|
+
' ',
|
|
131
|
+
label && required && (React.createElement(Text, { markup: TextMarkup.SPAN, typo: TypographyColor.TEXT_ERROR }, "*")))),
|
|
132
|
+
!hasPlaceholder && label && sample && (React.createElement(Text, { className: 'input-sample', level: TextLevels.TWO, typo: TypographyColor.TEXT_DISABLED }, sample)),
|
|
134
133
|
React.createElement("div", { className: controlClasses },
|
|
135
|
-
React.createElement("input", { required: required, role: 'textbox', ...others, "data-testid": testId, "aria-label": accessibilityLabel, type: inputType, className: classes, value: _value, defaultValue: defaultValue, name: name, onSubmit: onSubmit, ref:
|
|
134
|
+
React.createElement("input", { required: required, role: 'textbox', ...others, "data-testid": testId, "aria-label": accessibilityLabel, type: inputType, className: classes, value: _value, defaultValue: defaultValue, name: name, onSubmit: onSubmit, ref: ref, disabled: disabled, minLength: minLength, maxLength: maxLength, autoComplete: autoCompleteType, onKeyUp: (e) => onKeyUp && onKeyUp(onPressKey(e)), onKeyPress: (e) => onKeyPress && onKeyPress(onPressKey(e)), onMouseEnter: (e) => onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e), onMouseLeave: (e) => onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(e), placeholder: placeholder, onClick: (e) => {
|
|
136
135
|
const target = e.target;
|
|
137
136
|
if (onClick) {
|
|
138
137
|
onClick({
|
|
139
138
|
inputName: target.name,
|
|
140
139
|
inputValue: target.value,
|
|
141
|
-
|
|
140
|
+
target: target,
|
|
142
141
|
});
|
|
143
142
|
}
|
|
144
143
|
}, onChange: (e) => {
|
|
@@ -163,7 +162,7 @@ const Input = ({ forceControl, label, sample, className, disabled, onChange, onK
|
|
|
163
162
|
inputName: e.target.name,
|
|
164
163
|
inputValue: e.target.value,
|
|
165
164
|
inputSelectionStart: e.target.selectionStart,
|
|
166
|
-
|
|
165
|
+
target: e.target,
|
|
167
166
|
});
|
|
168
167
|
}
|
|
169
168
|
}, onFocus: (e) => {
|
|
@@ -194,29 +193,5 @@ const Input = ({ forceControl, label, sample, className, disabled, onChange, onK
|
|
|
194
193
|
help && React.createElement(Text, { className: helpClasses }, help),
|
|
195
194
|
securityGauge && type === 'password' && (React.createElement(InputGauge, { validationRules: validationRules, styled: styled, inputValue: _value }))));
|
|
196
195
|
};
|
|
197
|
-
|
|
198
|
-
* AutoComplete Component
|
|
199
|
-
* @param placeholder {string} placeholder for input
|
|
200
|
-
* @param defaultValue {string} Default Value for Input
|
|
201
|
-
* @param data {string[]} Datas AutoComplete list Item
|
|
202
|
-
* @param value {string} Value of Input
|
|
203
|
-
* @param onChange {Function} OnChange Input Event
|
|
204
|
-
* @param onFocus {Function} OnFocus Input Event
|
|
205
|
-
* @param children {Function} Custom Component for dropdown list
|
|
206
|
-
* @param displayMenu {boolean} Display Autocomplete Menu (default: true)
|
|
207
|
-
* @param matching {Function} matching function
|
|
208
|
-
* - ------------------ WEB PROPERTIES -----------------------
|
|
209
|
-
* @param classNameMenu {string} Additionnal CSS Classes for Menu
|
|
210
|
-
* @param absoluteMenu {boolean} Absolute position for Menu
|
|
211
|
-
* @param fullwidthMenu {boolean} Fullwidth size for Menu
|
|
212
|
-
* @param className {string} Additionnal CSS Classes
|
|
213
|
-
* @param onItemSelected {Function} OnSelectedItemList event
|
|
214
|
-
* @param customIcon {string} Additional icon classes
|
|
215
|
-
* @param debounceSuggestionsTimeout {number} Timeout for getSuggestions debounce
|
|
216
|
-
*/
|
|
217
|
-
Input.AutoComplete = (props) => {
|
|
218
|
-
const newProps = { ...props, Input };
|
|
219
|
-
return React.createElement(AutoComplete, { ...newProps });
|
|
220
|
-
};
|
|
221
|
-
export default Input;
|
|
196
|
+
export default forwardRef(Input);
|
|
222
197
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../components/input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAa,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAkB,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAqB,SAAS,EAAmB,MAAM,aAAa,CAAA;AAExF,OAAO,UAAU,MAAM,oBAAoB,CAAA;AAY3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,KAAK,GAAG,CACZ,EACE,YAAY,EACZ,KAAK,EACL,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,OAAO,EACP,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,IAAI,GAAG,MAAM,EACb,YAAY,EACZ,KAAK,EACL,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,aAAa,EACb,cAAc,EACd,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C,CAAA;wBACxB,YAAY,CAAC,KAAK,CAAC,CAAA;qBACpB;gBACH,CAAC,GACD,CACH;YACA,UAAU,IAAI,WAAW,IAAI,CAAC,OAAO,IAAI,oBAAC,WAAW,IAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,GAAI;YACpG,IAAI,KAAK,SAAS,CAAC,MAAM,IAAI,CAAC,UAAU,IAAI,WAAW,KAAK,SAAS,IAAI,CAAC,OAAO,IAAI,CACpF,oBAAC,WAAW,IAAC,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,GAAI,CAC/G;YACA,OAAO,IAAI,8BAAM,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,GAAI,CACrE;QACL,IAAI,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,IAAG,IAAI,CAAQ;QAEnD,aAAa,IAAI,IAAI,KAAK,UAAU,IAAI,CACvC,oBAAC,UAAU,IAAC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAI,CACrF,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,UAAU,CAAC,KAAK,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ComponentName } from '../../components/enumsComponentsName';
|
|
3
3
|
import { InputNativeEvents, InputProps } from './InputProps';
|
|
4
|
-
import { AutoCompleteProps } from './autocomplete';
|
|
5
4
|
export interface InputNativeProps extends InputProps, InputNativeEvents {
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
@@ -36,8 +35,7 @@ export interface InputNativeProps extends InputProps, InputNativeEvents {
|
|
|
36
35
|
* @param accessibilityActivate {boolean}
|
|
37
36
|
*/
|
|
38
37
|
declare const Input: {
|
|
39
|
-
({ defaultValue, name, label, sample, onChange, onFocus, onBlur, disabled, status, help, placeholder, type, hasIcon, customIcon,
|
|
38
|
+
({ defaultValue, name, label, sample, onChange, onFocus, onBlur, disabled, status, help, placeholder, type, hasIcon, customIcon, keyboardStyle, autoCapitalize, autoCorrect, autoCompleteType, textContentType, keyboardType, keyType, onSubmit, maxLength, testId, accessibilityLabel, customIconRight, customIconLeft, securityGauge, validationRules, onIconClick, required, ...others }: InputNativeProps): JSX.Element;
|
|
40
39
|
displayName: ComponentName;
|
|
41
|
-
AutoComplete(props: AutoCompleteProps): React.JSX.Element;
|
|
42
40
|
};
|
|
43
41
|
export default Input;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Animated, Keyboard, Platform, StyleSheet, TextInput, TouchableOpacity, View, } from 'react-native';
|
|
3
|
-
import { StatusState } from '../../objects/facets/Status';
|
|
4
|
-
import { Alignable } from '../../objects/facets/Alignable';
|
|
5
|
-
import { TrilogyColor, getColorStyle } from '../../objects/facets/Color';
|
|
6
1
|
import { ComponentName } from '../../components/enumsComponentsName';
|
|
7
2
|
import { Icon, IconName, IconSize } from '../../components/icon';
|
|
8
3
|
import { Text, TextLevels } from '../../components/text';
|
|
9
|
-
import { InputAutoCapitalize, InputKeyboardAppearance, InputKeyboardType, InputStatus, InputTextContentType, InputType, } from './InputEnum';
|
|
10
|
-
import AutoComplete from './autocomplete/AutoComplete.native';
|
|
11
|
-
import InputGauge from './gauge/InputGauge.native';
|
|
12
4
|
import { TypographyColor } from '../../objects';
|
|
5
|
+
import { Alignable } from '../../objects/facets/Alignable';
|
|
6
|
+
import { TrilogyColor, getColorStyle } from '../../objects/facets/Color';
|
|
7
|
+
import { StatusState } from '../../objects/facets/Status';
|
|
8
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
9
|
+
import { Animated, Keyboard, Platform, StyleSheet, TextInput, TouchableOpacity, View, } from 'react-native';
|
|
13
10
|
import { Spacer, SpacerSize } from '../spacer';
|
|
11
|
+
import { InputAutoCapitalize, InputKeyboardAppearance, InputKeyboardType, InputStatus, InputTextContentType, InputType, } from './InputEnum';
|
|
12
|
+
import InputGauge from './gauge/InputGauge.native';
|
|
14
13
|
/**
|
|
15
14
|
* Input Native Component
|
|
16
15
|
* @param name {string} Input name
|
|
@@ -42,7 +41,7 @@ import { Spacer, SpacerSize } from '../spacer';
|
|
|
42
41
|
* @param required {boolean} Required input
|
|
43
42
|
* @param accessibilityActivate {boolean}
|
|
44
43
|
*/
|
|
45
|
-
const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, disabled, status, help, placeholder, type, hasIcon, customIcon,
|
|
44
|
+
const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, disabled, status, help, placeholder, type, hasIcon, customIcon, keyboardStyle, autoCapitalize, autoCorrect, autoCompleteType, textContentType, keyboardType, keyType, onSubmit, maxLength, testId, accessibilityLabel, customIconRight, customIconLeft, securityGauge, validationRules, onIconClick, required, ...others }) => {
|
|
46
45
|
const inputTestId = testId ? testId : placeholder ? placeholder : 'NotSpecified';
|
|
47
46
|
const inputAccessibilityLabel = accessibilityLabel ? accessibilityLabel : placeholder ? placeholder : 'NotSpecified';
|
|
48
47
|
const animationDuration = 200;
|
|
@@ -244,7 +243,7 @@ const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, d
|
|
|
244
243
|
React.createElement(Spacer, { size: SpacerSize.THREE }))),
|
|
245
244
|
React.createElement(View, { testID: 'input-wrapper-id', style: styles.inputWrapper },
|
|
246
245
|
dynamicPlaceholder && type !== InputType.SEARCH && (React.createElement(Animated.Text, { style: [styles.dynamicPlaceholder, { top: animation, fontSize: sizeAnimation }] }, placeholder)),
|
|
247
|
-
React.createElement(TextInput, { testID: 'input-id', clearTextOnFocus: false, secureTextEntry: !!(type && type === InputType.PASSWORD && iconPassword === IconName.EYE), value: value, editable: !disabled,
|
|
246
|
+
React.createElement(TextInput, { testID: 'input-id', clearTextOnFocus: false, secureTextEntry: !!(type && type === InputType.PASSWORD && iconPassword === IconName.EYE), value: value, editable: !disabled, maxLength: maxLength, autoCapitalize: autoCapitalize || InputAutoCapitalize.NONE, keyboardAppearance: keyboardStyle || InputKeyboardAppearance.DEFAULT, autoCorrect: autoCorrect || false, autoComplete: autoCompleteType, returnKeyType: keyType, textContentType: textContentType || InputTextContentType.NONE, keyboardType: keyboardType || InputKeyboardType.DEFAULT, onSubmitEditing: handleSubmit, onChangeText: (text) => {
|
|
248
247
|
handleChange(text);
|
|
249
248
|
if (onChange) {
|
|
250
249
|
onChange({
|
|
@@ -267,11 +266,11 @@ const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, d
|
|
|
267
266
|
((status && status !== InputStatus.DEFAULT) || customIconLeft) &&
|
|
268
267
|
type !== InputType.PASSWORD &&
|
|
269
268
|
!customIcon && (React.createElement(Icon, { style: styles.inputIconLeft, align: Alignable.ALIGNED_START, name: (customIconLeft && customIconLeft.replace('tri-', '').replace('ui-', '')) ||
|
|
270
|
-
inputIcon.get(status).replace('tri-', '').replace('ui-', ''), size: IconSize.SMALL, color: (status && status === 'success' &&
|
|
271
|
-
(status && status === 'warning' &&
|
|
272
|
-
(status && status === 'error' &&
|
|
269
|
+
inputIcon.get(status).replace('tri-', '').replace('ui-', ''), size: IconSize.SMALL, color: (status && status === 'success' && StatusState.SUCCESS) ||
|
|
270
|
+
(status && status === 'warning' && StatusState.WARNING) ||
|
|
271
|
+
(status && status === 'error' && StatusState.ERROR) ||
|
|
273
272
|
(status && status === 'default' && TrilogyColor.MAIN) ||
|
|
274
|
-
(disabled &&
|
|
273
|
+
(disabled && TrilogyColor.DISABLED) ||
|
|
275
274
|
TrilogyColor.MAIN })),
|
|
276
275
|
hasIcon &&
|
|
277
276
|
type !== InputType.SEARCH &&
|
|
@@ -280,16 +279,16 @@ const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, d
|
|
|
280
279
|
onIconClick === null || onIconClick === void 0 ? void 0 : onIconClick({
|
|
281
280
|
inputName: (name && name) || '',
|
|
282
281
|
inputValue: value,
|
|
283
|
-
|
|
282
|
+
target: e,
|
|
284
283
|
});
|
|
285
284
|
} },
|
|
286
285
|
React.createElement(Icon, { testId: 'icon-status-id', align: Alignable.ALIGNED_CENTER, name: (customIcon && customIcon.replace('tri-', '').replace('ui-', '')) ||
|
|
287
286
|
(customIconRight && customIconRight.replace('tri-', '').replace('ui-', '')) ||
|
|
288
|
-
inputIcon.get(status).replace('tri-', '').replace('ui-', ''), size: IconSize.SMALL, color: (status && status === 'success' &&
|
|
289
|
-
(status && status === 'warning' &&
|
|
290
|
-
(status && status === 'error' &&
|
|
287
|
+
inputIcon.get(status).replace('tri-', '').replace('ui-', ''), size: IconSize.SMALL, color: (status && status === 'success' && StatusState.SUCCESS) ||
|
|
288
|
+
(status && status === 'warning' && StatusState.WARNING) ||
|
|
289
|
+
(status && status === 'error' && StatusState.ERROR) ||
|
|
291
290
|
(status && status === 'default' && TrilogyColor.MAIN) ||
|
|
292
|
-
(disabled &&
|
|
291
|
+
(disabled && TrilogyColor.DISABLED) ||
|
|
293
292
|
TrilogyColor.MAIN }))),
|
|
294
293
|
hasIcon && type === InputType.PASSWORD && (React.createElement(React.Fragment, null,
|
|
295
294
|
hasIcon && customIconLeft && (React.createElement(View, { style: [{ paddingLeft: 10 }, styles.inputContainerLeft] },
|
|
@@ -306,15 +305,15 @@ const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, d
|
|
|
306
305
|
setIconPassword(IconName.EYE);
|
|
307
306
|
}
|
|
308
307
|
} },
|
|
309
|
-
React.createElement(Icon, { testId: 'password-id', align: Alignable.ALIGNED_CENTER, name: iconPassword, size: IconSize.SMALL, color: (status && status === 'success' &&
|
|
310
|
-
(status && status === 'warning' &&
|
|
311
|
-
(status && status === 'error' &&
|
|
308
|
+
React.createElement(Icon, { testId: 'password-id', align: Alignable.ALIGNED_CENTER, name: iconPassword, size: IconSize.SMALL, color: (status && status === 'success' && StatusState.SUCCESS) ||
|
|
309
|
+
(status && status === 'warning' && StatusState.WARNING) ||
|
|
310
|
+
(status && status === 'error' && StatusState.ERROR) ||
|
|
312
311
|
(status && status === 'default' && TrilogyColor.MAIN) ||
|
|
313
|
-
(disabled &&
|
|
312
|
+
(disabled && TrilogyColor.DISABLED) ||
|
|
314
313
|
TrilogyColor.MAIN })))),
|
|
315
314
|
type === InputType.SEARCH && !status && (React.createElement(React.Fragment, null,
|
|
316
315
|
React.createElement(View, { style: styles.inputContainerLeft },
|
|
317
|
-
React.createElement(Icon, { align: Alignable.ALIGNED_CENTER, name: IconName.SEARCH, size: IconSize.SMALL, color: disabled ?
|
|
316
|
+
React.createElement(Icon, { align: Alignable.ALIGNED_CENTER, name: IconName.SEARCH, size: IconSize.SMALL, color: disabled ? TrilogyColor.DISABLED : TrilogyColor.NEUTRAL })),
|
|
318
317
|
value.length > 0 && (React.createElement(TouchableOpacity, { testID: 'search-id', style: styles.inputContainerRight, onPressIn: () => {
|
|
319
318
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
320
319
|
inputName: (name && name) || '',
|
|
@@ -327,14 +326,10 @@ const Input = ({ defaultValue, name, label, sample, onChange, onFocus, onBlur, d
|
|
|
327
326
|
});
|
|
328
327
|
setValue('');
|
|
329
328
|
} },
|
|
330
|
-
React.createElement(Icon, { align: Alignable.ALIGNED_CENTER, name: IconName.TIMES_CIRCLE, size: IconSize.SMALL, color: disabled ?
|
|
329
|
+
React.createElement(Icon, { align: Alignable.ALIGNED_CENTER, name: IconName.TIMES_CIRCLE, size: IconSize.SMALL, color: disabled ? TrilogyColor.DISABLED : TrilogyColor.NEUTRAL })))))),
|
|
331
330
|
help && (React.createElement(Text, { testId: 'help-id', style: styles.help }, help)),
|
|
332
331
|
type === InputType.PASSWORD && securityGauge && (React.createElement(InputGauge, { validationRules: validationRules, inputValue: value }))));
|
|
333
332
|
};
|
|
334
333
|
Input.displayName = ComponentName.Input;
|
|
335
|
-
Input.AutoComplete = (props) => {
|
|
336
|
-
const newProps = { ...props, Input };
|
|
337
|
-
return React.createElement(AutoComplete, { ...newProps });
|
|
338
|
-
};
|
|
339
334
|
export default Input;
|
|
340
335
|
//# sourceMappingURL=Input.native.js.map
|