jornada-ui 0.4.13 → 0.4.14

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 (48) hide show
  1. package/lib/commonjs/components/list-devices/components/list-device-empty/index.js +68 -0
  2. package/lib/commonjs/components/list-devices/components/list-device-empty/index.js.map +1 -0
  3. package/lib/commonjs/components/list-devices/components/list-device-render-item/index.js +77 -0
  4. package/lib/commonjs/components/list-devices/components/list-device-render-item/index.js.map +1 -0
  5. package/lib/commonjs/components/list-devices/index.js +22 -54
  6. package/lib/commonjs/components/list-devices/index.js.map +1 -1
  7. package/lib/commonjs/components/list-devices/interface.js +2 -0
  8. package/lib/commonjs/components/list-devices/interface.js.map +1 -0
  9. package/lib/commonjs/components/list-devices/styles.js +14 -3
  10. package/lib/commonjs/components/list-devices/styles.js.map +1 -1
  11. package/lib/module/components/list-devices/components/list-device-empty/index.js +63 -0
  12. package/lib/module/components/list-devices/components/list-device-empty/index.js.map +1 -0
  13. package/lib/module/components/list-devices/components/list-device-render-item/index.js +74 -0
  14. package/lib/module/components/list-devices/components/list-device-render-item/index.js.map +1 -0
  15. package/lib/module/components/list-devices/index.js +25 -57
  16. package/lib/module/components/list-devices/index.js.map +1 -1
  17. package/lib/module/components/list-devices/interface.js +2 -0
  18. package/lib/module/components/list-devices/interface.js.map +1 -0
  19. package/lib/module/components/list-devices/styles.js +14 -3
  20. package/lib/module/components/list-devices/styles.js.map +1 -1
  21. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-empty/index.d.ts +10 -0
  22. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-empty/index.d.ts.map +1 -0
  23. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-render-item/index.d.ts +22 -0
  24. package/lib/typescript/commonjs/src/components/list-devices/components/list-device-render-item/index.d.ts.map +1 -0
  25. package/lib/typescript/commonjs/src/components/list-devices/index.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/src/components/list-devices/interface.d.ts +29 -0
  27. package/lib/typescript/commonjs/src/components/list-devices/interface.d.ts.map +1 -0
  28. package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts +5 -5
  29. package/lib/typescript/commonjs/src/components/list-devices/styles.d.ts.map +1 -1
  30. package/lib/typescript/module/src/components/list-devices/components/list-device-empty/index.d.ts +10 -0
  31. package/lib/typescript/module/src/components/list-devices/components/list-device-empty/index.d.ts.map +1 -0
  32. package/lib/typescript/module/src/components/list-devices/components/list-device-render-item/index.d.ts +22 -0
  33. package/lib/typescript/module/src/components/list-devices/components/list-device-render-item/index.d.ts.map +1 -0
  34. package/lib/typescript/module/src/components/list-devices/index.d.ts.map +1 -1
  35. package/lib/typescript/module/src/components/list-devices/interface.d.ts +29 -0
  36. package/lib/typescript/module/src/components/list-devices/interface.d.ts.map +1 -0
  37. package/lib/typescript/module/src/components/list-devices/styles.d.ts +5 -5
  38. package/lib/typescript/module/src/components/list-devices/styles.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/components/list-devices/components/list-device-empty/index.tsx +60 -0
  41. package/src/components/list-devices/components/list-device-render-item/index.tsx +86 -0
  42. package/src/components/list-devices/index.tsx +26 -58
  43. package/src/components/list-devices/{interface.d.ts → interface.ts} +36 -36
  44. package/src/components/list-devices/styles.ts +73 -68
  45. package/lib/commonjs/components/list-devices/interface.d.js +0 -2
  46. package/lib/commonjs/components/list-devices/interface.d.js.map +0 -1
  47. package/lib/module/components/list-devices/interface.d.js +0 -2
  48. package/lib/module/components/list-devices/interface.d.js.map +0 -1
@@ -1,36 +1,36 @@
1
- /* eslint-disable no-unused-vars */
2
- /**
3
- * IMPORTS
4
- */
5
-
6
- export type IData = {
7
- id: number;
8
- macDevice: string;
9
- nameDevice: string;
10
- };
11
-
12
- export interface IListDevices {
13
- /** dados que vão ser renderizados */
14
- data?: IData[];
15
-
16
- /** cor do texto */
17
- titleColor?: string;
18
-
19
- /** cor do titulo (não está sendo usada no componente atual, mantida por compat) */
20
- titleNumberColor?: string;
21
-
22
- /** cor do texto da descrição */
23
- textColorDescription?: string;
24
-
25
- /** (opcional) id selecionado - modo controlado */
26
- selectedId?: number | null;
27
-
28
- /** (opcional) seleção inicial - modo não-controlado */
29
- defaultSelectedId?: number | null;
30
-
31
- /** callback ao selecionar um item */
32
- onSelect?: (device: IData) => void;
33
-
34
- /** desabilita interação */
35
- disabled?: boolean;
36
- }
1
+ /* eslint-disable no-unused-vars */
2
+ interface IData {
3
+ id: number;
4
+ macDevice: string;
5
+ nameDevice: string;
6
+ }
7
+
8
+ type Extra = { disabled?: boolean; isSelected?: boolean };
9
+
10
+ interface IListDevices {
11
+ /** dados que vão ser renderizados */
12
+ data?: IData[];
13
+
14
+ /** cor do texto */
15
+ titleColor?: string;
16
+
17
+ /** cor do titulo (não está sendo usada no componente atual, mantida por compat) */
18
+ titleNumberColor?: string;
19
+
20
+ /** cor do texto da descrição */
21
+ textColorDescription?: string;
22
+
23
+ /** (opcional) id selecionado - modo controlado */
24
+ selectedId?: number | null;
25
+
26
+ /** (opcional) seleção inicial - modo não-controlado */
27
+ defaultSelectedId?: number | null;
28
+
29
+ /** callback ao selecionar um item */
30
+ onSelect?: (device: IData) => void;
31
+
32
+ /** desabilita interação */
33
+ disabled?: boolean;
34
+ }
35
+
36
+ export type { IData, IListDevices, Extra };
@@ -1,68 +1,73 @@
1
- import { StyleSheet } from "react-native";
2
- import { type IListDevices } from "./interface";
3
- import { theme } from "../../styles/theme/theme";
4
-
5
- type Extra = { disabled?: boolean; isSelected?: boolean };
6
-
7
- const styles = (props: Partial<IListDevices & Extra> = {}) =>
8
- StyleSheet.create({
9
- containerIndicator: {
10
- width: "100%",
11
- flexDirection: "row",
12
- justifyContent: "flex-start",
13
- alignItems: "center",
14
- marginTop: 8,
15
- paddingVertical: 8,
16
- paddingHorizontal: 8,
17
- opacity: props.disabled ? 0.6 : 1,
18
- },
19
-
20
- containerIndicatorSelected: {
21
- backgroundColor: theme.colors.green[250],
22
- borderRadius: 30,
23
- },
24
-
25
- separator: {
26
- borderBottomWidth: 1,
27
- borderBottomColor: props.isSelected
28
- ? "transparent"
29
- : theme.colors.gray[700],
30
- },
31
-
32
- title: {
33
- color: props.titleColor ?? theme.colors.black[10],
34
- textAlign: "center",
35
- lineHeight: 20,
36
- fontSize: theme.fontSizes.sm,
37
- fontWeight: "500",
38
- marginLeft: theme.margins.xs,
39
- },
40
-
41
- titleSelected: {
42
- color: theme.colors.neutral[25],
43
- fontWeight: "600",
44
- },
45
-
46
- titleDescription: {
47
- color: props.textColorDescription ?? theme.colors.gray[600],
48
- textAlign: "center",
49
- lineHeight: 16,
50
- fontSize: 18,
51
- fontFamily: theme.fonts.inter_light_300,
52
- marginLeft: theme.margins.xs,
53
- },
54
-
55
- descSelected: {
56
- color: theme.colors.neutral[25],
57
- },
58
-
59
- containerMain: {
60
- width: "100%",
61
- flexDirection: "column",
62
- alignItems: "flex-start",
63
- marginLeft: 2,
64
- justifyContent: "center",
65
- },
66
- });
67
-
68
- export { styles };
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import { StyleSheet } from "react-native";
5
+ import { theme } from "../../styles/theme/theme";
6
+
7
+ // typings
8
+ import { type IListDevices, type Extra } from "./interface";
9
+
10
+ const styles = (props: Partial<IListDevices & Extra> = {}) =>
11
+ StyleSheet.create({
12
+ containerIndicator: {
13
+ width: "100%",
14
+ flexDirection: "row",
15
+ justifyContent: "flex-start",
16
+ alignItems: "center",
17
+ marginTop: 8,
18
+ paddingVertical: 8,
19
+ paddingHorizontal: 8,
20
+ opacity: props.disabled ? 0.6 : 1,
21
+ },
22
+
23
+ containerIndicatorSelected: {
24
+ backgroundColor: theme.colors.green[250],
25
+ borderRadius: 30,
26
+ },
27
+
28
+ separator: {
29
+ borderBottomWidth: 1,
30
+ borderBottomColor: props.isSelected ? "transparent" : theme.colors.gray[700],
31
+ },
32
+
33
+ title: {
34
+ color: props.titleColor ?? theme.colors.black[10],
35
+ textAlign: "center",
36
+ lineHeight: 20,
37
+ fontSize: theme.fontSizes.lg,
38
+ fontWeight: "500",
39
+ marginLeft: theme.margins.xs,
40
+ marginBottom: 8,
41
+ },
42
+
43
+ titleSelected: {
44
+ color: theme.colors.neutral[25],
45
+ fontWeight: "600",
46
+ },
47
+
48
+ titleDescription: {
49
+ color: props.textColorDescription ?? theme.colors.gray[600],
50
+ textAlign: "center",
51
+ lineHeight: 16,
52
+ fontSize: theme.fontSizes.md,
53
+ fontFamily: theme.fonts.inter_light_300,
54
+ marginLeft: theme.margins.xs,
55
+ },
56
+
57
+ descSelected: {
58
+ color: theme.colors.neutral[25],
59
+ },
60
+
61
+ containerMain: {
62
+ width: "100%",
63
+ flexDirection: "column",
64
+ alignItems: "flex-start",
65
+ marginLeft: 2,
66
+ justifyContent: "center",
67
+ },
68
+ });
69
+
70
+ /**
71
+ * EXPORTS
72
+ */
73
+ export { styles };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=interface.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/list-devices/interface.d.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=interface.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/list-devices/interface.d.ts"],"mappings":"","ignoreList":[]}