@jobber/components-native 0.30.0 → 0.31.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.
Files changed (71) hide show
  1. package/README.md +3 -0
  2. package/dist/src/Select/Select.js +79 -0
  3. package/dist/src/Select/Select.style.js +45 -0
  4. package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.js +30 -0
  5. package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.js +16 -0
  6. package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.js +29 -0
  7. package/dist/src/Select/components/SelectDefaultPicker/index.js +1 -0
  8. package/dist/src/Select/components/SelectDefaultPicker/messages.js +8 -0
  9. package/dist/src/Select/components/SelectIOSPicker/SelectIOSPicker.js +2 -0
  10. package/dist/src/Select/components/SelectIOSPicker/index.js +1 -0
  11. package/dist/src/Select/components/SelectInternalPicker/SelectInternalPicker.js +14 -0
  12. package/dist/src/Select/components/SelectInternalPicker/index.js +1 -0
  13. package/dist/src/Select/components/SelectInternalPicker/utils.js +13 -0
  14. package/dist/src/Select/components/SelectPressable/SelectPressable.js +15 -0
  15. package/dist/src/Select/components/SelectPressable/SelectPressable.style.js +7 -0
  16. package/dist/src/Select/components/SelectPressable/index.js +1 -0
  17. package/dist/src/Select/index.js +1 -0
  18. package/dist/src/Select/messages.js +13 -0
  19. package/dist/src/Select/types.js +1 -0
  20. package/dist/src/index.js +1 -0
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/dist/types/src/Select/Select.d.ts +69 -0
  23. package/dist/types/src/Select/Select.style.d.ts +56 -0
  24. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +5 -0
  25. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +5 -0
  26. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.d.ts +30 -0
  27. package/dist/types/src/Select/components/SelectDefaultPicker/index.d.ts +1 -0
  28. package/dist/types/src/Select/components/SelectDefaultPicker/messages.d.ts +7 -0
  29. package/dist/types/src/Select/components/SelectIOSPicker/SelectIOSPicker.d.ts +10 -0
  30. package/dist/types/src/Select/components/SelectIOSPicker/index.d.ts +1 -0
  31. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +3 -0
  32. package/dist/types/src/Select/components/SelectInternalPicker/index.d.ts +1 -0
  33. package/dist/types/src/Select/components/SelectInternalPicker/utils.d.ts +3 -0
  34. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +11 -0
  35. package/dist/types/src/Select/components/SelectPressable/SelectPressable.style.d.ts +5 -0
  36. package/dist/types/src/Select/components/SelectPressable/index.d.ts +1 -0
  37. package/dist/types/src/Select/index.d.ts +1 -0
  38. package/dist/types/src/Select/messages.d.ts +12 -0
  39. package/dist/types/src/Select/types.d.ts +38 -0
  40. package/dist/types/src/index.d.ts +1 -0
  41. package/ios/ComponentsNative-Bridging-Header.h +2 -0
  42. package/ios/ComponentsNative.xcodeproj/project.pbxproj +303 -0
  43. package/ios/Picker/ATLFallBackPickerView.swift +13 -0
  44. package/ios/Picker/ATLPickerOption.swift +44 -0
  45. package/ios/Picker/ATLPickerView.swift +61 -0
  46. package/ios/Picker/RCTATLPickerManager.m +26 -0
  47. package/ios/Picker/RCTATLPickerManager.swift +25 -0
  48. package/jobber-components-native.podspec +35 -0
  49. package/package.json +18 -3
  50. package/src/Select/Select.style.ts +51 -0
  51. package/src/Select/Select.test.tsx +323 -0
  52. package/src/Select/Select.tsx +240 -0
  53. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +64 -0
  54. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.ts +30 -0
  55. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.test.tsx +76 -0
  56. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +45 -0
  57. package/src/Select/components/SelectDefaultPicker/index.ts +1 -0
  58. package/src/Select/components/SelectDefaultPicker/messages.ts +9 -0
  59. package/src/Select/components/SelectIOSPicker/SelectIOSPicker.tsx +16 -0
  60. package/src/Select/components/SelectIOSPicker/index.ts +1 -0
  61. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.test.tsx +100 -0
  62. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +33 -0
  63. package/src/Select/components/SelectInternalPicker/index.ts +1 -0
  64. package/src/Select/components/SelectInternalPicker/utils.ts +20 -0
  65. package/src/Select/components/SelectPressable/SelectPressable.style.ts +8 -0
  66. package/src/Select/components/SelectPressable/SelectPressable.tsx +32 -0
  67. package/src/Select/components/SelectPressable/index.ts +1 -0
  68. package/src/Select/index.ts +1 -0
  69. package/src/Select/messages.ts +14 -0
  70. package/src/Select/types.ts +46 -0
  71. package/src/index.ts +1 -0
@@ -0,0 +1 @@
1
+ export { Select, Option, SelectOption, SelectProps } from "./Select";
@@ -0,0 +1,14 @@
1
+ import { defineMessages } from "react-intl";
2
+
3
+ export const messages = defineMessages({
4
+ a11yHint: {
5
+ id: "a11yHint",
6
+ defaultMessage: "Select to open the picker",
7
+ description: "Accessibility hint on how to interact with the select",
8
+ },
9
+ emptyValue: {
10
+ id: "emptyValue",
11
+ defaultMessage: "Select an option",
12
+ description: "Accessibility hint on how to interact with the select",
13
+ },
14
+ });
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from "react";
2
+
3
+ export interface SelectInternalPickerProps {
4
+ /**
5
+ * Tapping the children opens the picker
6
+ */
7
+ readonly children: ReactNode;
8
+
9
+ /**
10
+ * The list of options that user can choose from
11
+ */
12
+ readonly options: SelectInternalPickerOption[];
13
+
14
+ /**
15
+ * Prevents the menu from opening
16
+ */
17
+ readonly disabled?: boolean;
18
+
19
+ /**
20
+ * Callback to fire when an option is pressed
21
+ */
22
+ readonly onChange: (value: string) => void;
23
+ }
24
+
25
+ export interface SelectInternalPickerOption {
26
+ /**
27
+ * The value that gets returned whenever the option is selected
28
+ */
29
+ readonly value: string;
30
+
31
+ /**
32
+ * What the user chooses on the UI
33
+ */
34
+ readonly label: string;
35
+
36
+ /**
37
+ * Determines if the option is selected or not
38
+ */
39
+ readonly isActive?: boolean;
40
+ }
41
+
42
+ export interface SelectOnOptionPressEvent {
43
+ readonly nativeEvent: {
44
+ readonly event: string;
45
+ };
46
+ }
package/src/index.ts CHANGED
@@ -23,6 +23,7 @@ export * from "./InputSearch";
23
23
  export * from "./InputText";
24
24
  export * from "./TextList";
25
25
  export * from "./ProgressBar";
26
+ export * from "./Select";
26
27
  export * from "./StatusLabel";
27
28
  export * from "./Switch";
28
29
  export * from "./Text";