@trilogy-ds/react 0.0.1-beta.5 → 0.0.1-beta.7

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.
Files changed (56) hide show
  1. package/README.md +117 -0
  2. package/lib/components/accordion/body/AccordionBody.js +3 -1
  3. package/lib/components/accordion/body/AccordionBody.js.map +1 -1
  4. package/lib/components/checkbox/Checkbox.native.js +1 -1
  5. package/lib/components/checkbox/Checkbox.native.js.map +1 -1
  6. package/lib/components/checkbox/CheckboxProps.d.ts +1 -1
  7. package/lib/components/enumsComponentsName.d.ts +0 -1
  8. package/lib/components/enumsComponentsName.js +0 -1
  9. package/lib/components/enumsComponentsName.js.map +1 -1
  10. package/lib/components/icon/IconNameEnum.d.ts +1 -0
  11. package/lib/components/icon/IconNameEnum.js +1 -0
  12. package/lib/components/icon/IconNameEnum.js.map +1 -1
  13. package/lib/components/index.d.ts +0 -1
  14. package/lib/components/index.js +0 -1
  15. package/lib/components/index.js.map +1 -1
  16. package/lib/components/input/Input.d.ts +2 -1
  17. package/lib/components/input/Input.js +9 -7
  18. package/lib/components/input/Input.js.map +1 -1
  19. package/lib/components/input/Input.native.d.ts +3 -1
  20. package/lib/components/input/Input.native.js +58 -36
  21. package/lib/components/input/Input.native.js.map +1 -1
  22. package/lib/components/input/InputProps.d.ts +6 -7
  23. package/lib/components/input/index.d.ts +1 -0
  24. package/lib/components/input/index.js +1 -0
  25. package/lib/components/input/index.js.map +1 -1
  26. package/lib/components/otp/Otp.js +1 -1
  27. package/lib/components/radio/Radio.native.d.ts +1 -0
  28. package/lib/components/radio/Radio.native.js +1 -0
  29. package/lib/components/radio/Radio.native.js.map +1 -1
  30. package/lib/components/slider/Slider.d.ts +0 -1
  31. package/lib/components/slider/Slider.js +0 -1
  32. package/lib/components/slider/Slider.js.map +1 -1
  33. package/lib/components/slider/index.d.ts +2 -0
  34. package/lib/components/slider/index.js +1 -0
  35. package/lib/components/slider/index.js.map +1 -1
  36. package/lib/version.d.ts +1 -1
  37. package/lib/version.js +1 -1
  38. package/package.json +4 -4
  39. package/lib/components/slider/utils/slider.d.ts +0 -0
  40. package/lib/components/slider/utils/slider.js +0 -153
  41. package/lib/components/slider/utils/slider.js.map +0 -1
  42. package/lib/components/tile/Tile.d.ts +0 -17
  43. package/lib/components/tile/Tile.js +0 -35
  44. package/lib/components/tile/Tile.js.map +0 -1
  45. package/lib/components/tile/Tile.native.d.ts +0 -13
  46. package/lib/components/tile/Tile.native.js +0 -22
  47. package/lib/components/tile/Tile.native.js.map +0 -1
  48. package/lib/components/tile/TileEnum.d.ts +0 -5
  49. package/lib/components/tile/TileEnum.js +0 -6
  50. package/lib/components/tile/TileEnum.js.map +0 -1
  51. package/lib/components/tile/TileProps.d.ts +0 -17
  52. package/lib/components/tile/TileProps.js +0 -2
  53. package/lib/components/tile/TileProps.js.map +0 -1
  54. package/lib/components/tile/index.d.ts +0 -2
  55. package/lib/components/tile/index.js +0 -3
  56. package/lib/components/tile/index.js.map +0 -1
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import { Text } from '../text';
4
- import { TileMarkup } from './TileEnum';
5
- import { is } from '../../services';
6
- import { hashClass } from '../../helpers';
7
- import { useTrilogyContext } from '../../context';
8
- /**
9
- * Tile Component
10
- * @param children {ReactNode} Tile Children
11
- * @param className {string} Additionnal CSS Classes
12
- * @param onClick {Function} onClick Event
13
- * @param to {string} link to url
14
- * @param ancestor {boolean} Tile is an ancestor
15
- * @param child {boolean} Tile is a child
16
- * @param parent {boolean} Tile is a parent
17
- * @param vertical {boolean} Tile is vertical
18
- * @param markup {TileMarkup} HTML element : div|a
19
- * @param routerLink Custom Router Link as props
20
- */
21
- const Tile = ({ children, className, ancestor, child, markup = TileMarkup.DIV, onClick, to, parent, vertical, routerLink, testId, ...others }) => {
22
- const { styled } = useTrilogyContext();
23
- const classes = hashClass(styled, clsx('tile', ancestor && is('ancestor'), child && is('child'), parent && is('parent'), vertical && is('vertical'), className));
24
- const Tag = markup;
25
- const content = Array.isArray(children) ? (children.map((child, index) => {
26
- return child && typeof child.valueOf() === 'string' ? React.createElement(Text, { key: index }, String(child)) : child;
27
- })) : children && typeof children.valueOf() === 'string' ? (React.createElement(Text, null, String(children))) : (children);
28
- if (routerLink && to) {
29
- const RouterLink = (routerLink ? routerLink : 'a');
30
- return (React.createElement(RouterLink, { className: classes, onClick: onClick, to: to, ...others }, content));
31
- }
32
- return (React.createElement(Tag, { "data-testid": testId, className: classes, ...others, onClick: onClick }, content));
33
- };
34
- export default Tile;
35
- //# sourceMappingURL=Tile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../components/tile/Tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,GAAG,UAAU,CAAC,GAAG,EACvB,OAAO,EACP,EAAE,EACF,MAAM,EACN,QAAQ,EACR,UAAU,EACV,MAAM,EACN,GAAG,MAAM,EACC,EAAe,EAAE;IAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,MAAM,OAAO,GAAG,SAAS,CACvB,MAAM,EACN,IAAI,CACF,MAAM,EACN,QAAQ,IAAI,EAAE,CAAC,UAAU,CAAC,EAC1B,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,E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} from '../enumsComponentsName';
4
- /**
5
- * Tile Component
6
- * @param children {ReactNode} Tile Children
7
- * @param onClick {Function} onClick Event
8
- */
9
- declare const Tile: {
10
- ({ children, onClick, ...others }: TileProps): JSX.Element;
11
- displayName: ComponentName;
12
- };
13
- export default Tile;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { StyleSheet, TouchableOpacity, View } from 'react-native';
3
- import { Text } from '../text';
4
- import { ComponentName } from '../enumsComponentsName';
5
- /**
6
- * Tile Component
7
- * @param children {ReactNode} Tile Children
8
- * @param onClick {Function} onClick Event
9
- */
10
- const Tile = ({ children, onClick, ...others }) => {
11
- const styles = StyleSheet.create({
12
- tile: {
13
- // alignSelf: 'baseline',
14
- },
15
- });
16
- const tileView = (React.createElement(View, { style: styles.tile, ...others }, Array.isArray(children) ? (children.map((child, index) => (child && typeof child.valueOf() === 'string' ? React.createElement(Text, { key: index }, String(child)) : child))) : children && typeof children.valueOf() === 'string' ? (React.createElement(Text, null, String(children))) : (children)));
17
- return onClick ? (React.createElement(View, null,
18
- React.createElement(TouchableOpacity, { onPress: onClick, activeOpacity: 0.85 }, tileView))) : (tileView);
19
- };
20
- Tile.displayName = ComponentName.Tile;
21
- export default Tile;
22
- //# sourceMappingURL=Tile.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tile.native.js","sourceRoot":"","sources":["../../../components/tile/Tile.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD;;;;GAIG;AACH,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,EAAa,EAAe,EAAE;IACxE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAC/B,IAAI,EAAE;QACJ,yBAAyB;SAC1B;KACF,CAAC,CAAA;IACF,MAAM,QAAQ,GAAG,CACf,oBAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,KAAM,MAAM,IACjC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACzB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAsB,EAAE,KAAa,EAAE,EAAE,CACrD,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,GAAG,EAAE,KAAK,IAAG,MAAM,CAAC,KAAK,CAAC,CAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAClG,CACF,CAAC,CAAC,CAAC,QAAQ,IAAI,OAAO,QAAQ,CAAC,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,CACvD,oBAAC,IAAI,QAAE,MAAM,CAAC,QAAQ,CAAC,CAAQ,CAChC,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CACI,CACR,CAAA;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,IAAI;QACH,oBAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,IACpD,QAAQ,CACQ,CACd,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAA;AACH,CAAC,CAAA;AAED,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAA;AAErC,eAAe,IAAI,CAAA"}
@@ -1,5 +0,0 @@
1
- export declare enum TileMarkup {
2
- DIV = "div",
3
- A = "a"
4
- }
5
- export type TileMarkupValues = `${TileMarkup}`;
@@ -1,6 +0,0 @@
1
- export var TileMarkup;
2
- (function (TileMarkup) {
3
- TileMarkup["DIV"] = "div";
4
- TileMarkup["A"] = "a";
5
- })(TileMarkup || (TileMarkup = {}));
6
- //# sourceMappingURL=TileEnum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TileEnum.js","sourceRoot":"","sources":["../../../components/tile/TileEnum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,qBAAO,CAAA;AACT,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- import { Accessibility, Clickable } from '../../objects';
3
- import { TileMarkup, TileMarkupValues } from './TileEnum';
4
- /**
5
- * Tile Interface
6
- */
7
- export interface TileProps extends Clickable, Accessibility {
8
- children: React.ReactNode;
9
- child?: boolean;
10
- parent?: boolean;
11
- ancestor?: boolean;
12
- vertical?: boolean;
13
- markup?: TileMarkup | TileMarkupValues;
14
- to?: string;
15
- className?: string;
16
- routerLink?: React.ElementType;
17
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TileProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TileProps.js","sourceRoot":"","sources":["../../../components/tile/TileProps.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import Tile from './Tile';
2
- export { Tile };
@@ -1,3 +0,0 @@
1
- import Tile from './Tile';
2
- export { Tile };
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/tile/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAA;AAEzB,OAAO,EAAE,IAAI,EAAE,CAAA"}