@jobber/components-native 0.104.3-rename-sel-d7cc7c5.6 → 0.105.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 (126) hide show
  1. package/dist/docs/ActivityIndicator/ActivityIndicator.md +56 -96
  2. package/dist/docs/Chip/Chip.md +1 -1
  3. package/dist/docs/Form/Form.md +1 -1
  4. package/dist/docs/InputCurrency/InputCurrency.md +1 -1
  5. package/dist/docs/InputEmail/InputEmail.md +1 -1
  6. package/dist/docs/InputNumber/InputNumber.md +1 -1
  7. package/dist/docs/InputPassword/InputPassword.md +1 -1
  8. package/dist/docs/InputText/InputText.md +1 -1
  9. package/dist/docs/Select/Select.md +219 -0
  10. package/dist/docs/index.md +1 -1
  11. package/dist/package.json +3 -3
  12. package/dist/src/ActivityIndicator/ActivityIndicator.js +168 -5
  13. package/dist/src/ActivityIndicator/ActivityIndicator.test.js +164 -16
  14. package/dist/src/ActivityIndicator/index.js +1 -1
  15. package/dist/src/Form/Form.test.js +4 -4
  16. package/dist/src/Form/components/FormMask/FormMask.js +1 -3
  17. package/dist/src/InputSearch/InputSearch.test.js +6 -1
  18. package/dist/src/{LegacySelect/LegacySelect.js → Select/Select.js} +7 -7
  19. package/dist/src/Select/Select.test.js +183 -0
  20. package/dist/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.ios.js → Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.js} +4 -4
  21. package/dist/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.js → Select/components/SelectDefaultPicker/SelectDefaultPicker.js} +4 -4
  22. package/dist/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.test.js → Select/components/SelectDefaultPicker/SelectDefaultPicker.test.js} +7 -7
  23. package/dist/src/Select/components/SelectDefaultPicker/index.js +1 -0
  24. package/dist/src/Select/components/SelectIOSPicker/SelectIOSPicker.js +2 -0
  25. package/dist/src/Select/components/SelectIOSPicker/index.js +1 -0
  26. package/dist/src/Select/components/SelectInternalPicker/SelectInternalPicker.js +14 -0
  27. package/dist/src/{LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.test.js → Select/components/SelectInternalPicker/SelectInternalPicker.test.js} +8 -8
  28. package/dist/src/Select/components/SelectInternalPicker/index.js +1 -0
  29. package/dist/src/{LegacySelect/components/LegacySelectPressable/LegacySelectPressable.js → Select/components/SelectPressable/SelectPressable.js} +2 -2
  30. package/dist/src/Select/components/SelectPressable/index.js +1 -0
  31. package/dist/src/Select/index.js +2 -0
  32. package/dist/src/index.js +1 -1
  33. package/dist/src/utils/meta/meta.json +3 -3
  34. package/dist/tsconfig.build.tsbuildinfo +1 -1
  35. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +47 -2
  36. package/dist/types/src/ActivityIndicator/index.d.ts +2 -1
  37. package/dist/types/src/{LegacySelect/LegacySelect.d.ts → Select/Select.d.ts} +5 -5
  38. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +5 -0
  39. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +5 -0
  40. package/dist/types/src/Select/components/SelectDefaultPicker/index.d.ts +1 -0
  41. package/dist/types/src/Select/components/SelectIOSPicker/SelectIOSPicker.d.ts +10 -0
  42. package/dist/types/src/Select/components/SelectIOSPicker/index.d.ts +1 -0
  43. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +3 -0
  44. package/dist/types/src/Select/components/SelectInternalPicker/index.d.ts +1 -0
  45. package/dist/types/src/Select/components/SelectInternalPicker/utils.d.ts +3 -0
  46. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +11 -0
  47. package/dist/types/src/Select/components/SelectPressable/index.d.ts +1 -0
  48. package/dist/types/src/Select/index.d.ts +3 -0
  49. package/dist/types/src/{LegacySelect → Select}/types.d.ts +4 -4
  50. package/dist/types/src/index.d.ts +1 -1
  51. package/package.json +3 -3
  52. package/src/ActivityIndicator/ActivityIndicator.stories.tsx +28 -1
  53. package/src/ActivityIndicator/ActivityIndicator.test.tsx +206 -16
  54. package/src/ActivityIndicator/ActivityIndicator.tsx +385 -9
  55. package/src/ActivityIndicator/docs/ActivityIndicatorBasicExample.tsx +2 -2
  56. package/src/ActivityIndicator/guide.md +223 -0
  57. package/src/ActivityIndicator/index.ts +2 -1
  58. package/src/Form/Form.test.tsx +5 -5
  59. package/src/Form/components/FormMask/FormMask.tsx +1 -3
  60. package/src/InputSearch/InputSearch.test.tsx +7 -1
  61. package/src/{LegacySelect/LegacySelect.stories.tsx → Select/Select.stories.tsx} +10 -10
  62. package/src/{LegacySelect/LegacySelect.test.tsx → Select/Select.test.tsx} +81 -83
  63. package/src/{LegacySelect/LegacySelect.tsx → Select/Select.tsx} +13 -13
  64. package/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.ios.tsx → Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx} +7 -9
  65. package/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.test.tsx → Select/components/SelectDefaultPicker/SelectDefaultPicker.test.tsx} +8 -8
  66. package/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.tsx → Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx} +8 -8
  67. package/src/Select/components/SelectDefaultPicker/index.ts +1 -0
  68. package/src/Select/components/SelectIOSPicker/SelectIOSPicker.tsx +17 -0
  69. package/src/Select/components/SelectIOSPicker/index.ts +1 -0
  70. package/src/{LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.test.tsx → Select/components/SelectInternalPicker/SelectInternalPicker.test.tsx} +11 -11
  71. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +34 -0
  72. package/src/Select/components/SelectInternalPicker/index.ts +1 -0
  73. package/src/{LegacySelect/components/LegacySelectInternalPicker → Select/components/SelectInternalPicker}/utils.ts +4 -6
  74. package/src/{LegacySelect/components/LegacySelectPressable/LegacySelectPressable.tsx → Select/components/SelectPressable/SelectPressable.tsx} +4 -10
  75. package/src/Select/components/SelectPressable/index.ts +1 -0
  76. package/src/Select/docs/SelectBasic.tsx +14 -0
  77. package/src/Select/docs/SelectInitialValue.tsx +18 -0
  78. package/src/Select/docs/index.ts +2 -0
  79. package/src/Select/index.ts +3 -0
  80. package/src/{LegacySelect → Select}/types.ts +4 -4
  81. package/src/index.ts +1 -1
  82. package/src/utils/meta/meta.json +3 -3
  83. package/dist/docs/LegacySelect/LegacySelect.md +0 -49
  84. package/dist/src/LegacySelect/LegacySelect.test.js +0 -183
  85. package/dist/src/LegacySelect/components/LegacySelectDefaultPicker/index.js +0 -1
  86. package/dist/src/LegacySelect/components/LegacySelectIOSPicker/LegacySelectIOSPicker.js +0 -2
  87. package/dist/src/LegacySelect/components/LegacySelectIOSPicker/index.js +0 -1
  88. package/dist/src/LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.js +0 -14
  89. package/dist/src/LegacySelect/components/LegacySelectInternalPicker/index.js +0 -1
  90. package/dist/src/LegacySelect/components/LegacySelectPressable/index.js +0 -1
  91. package/dist/src/LegacySelect/index.js +0 -2
  92. package/dist/types/src/LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.d.ts +0 -5
  93. package/dist/types/src/LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.ios.d.ts +0 -5
  94. package/dist/types/src/LegacySelect/components/LegacySelectDefaultPicker/index.d.ts +0 -1
  95. package/dist/types/src/LegacySelect/components/LegacySelectIOSPicker/LegacySelectIOSPicker.d.ts +0 -10
  96. package/dist/types/src/LegacySelect/components/LegacySelectIOSPicker/index.d.ts +0 -1
  97. package/dist/types/src/LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.d.ts +0 -3
  98. package/dist/types/src/LegacySelect/components/LegacySelectInternalPicker/index.d.ts +0 -1
  99. package/dist/types/src/LegacySelect/components/LegacySelectInternalPicker/utils.d.ts +0 -3
  100. package/dist/types/src/LegacySelect/components/LegacySelectPressable/LegacySelectPressable.d.ts +0 -11
  101. package/dist/types/src/LegacySelect/components/LegacySelectPressable/index.d.ts +0 -1
  102. package/dist/types/src/LegacySelect/index.d.ts +0 -3
  103. package/src/LegacySelect/components/LegacySelectDefaultPicker/index.ts +0 -1
  104. package/src/LegacySelect/components/LegacySelectIOSPicker/LegacySelectIOSPicker.tsx +0 -17
  105. package/src/LegacySelect/components/LegacySelectIOSPicker/index.ts +0 -1
  106. package/src/LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.tsx +0 -34
  107. package/src/LegacySelect/components/LegacySelectInternalPicker/index.ts +0 -1
  108. package/src/LegacySelect/components/LegacySelectPressable/index.ts +0 -1
  109. package/src/LegacySelect/docs/LegacySelectBasic.tsx +0 -14
  110. package/src/LegacySelect/docs/LegacySelectInitialValue.tsx +0 -20
  111. package/src/LegacySelect/docs/index.ts +0 -2
  112. package/src/LegacySelect/index.ts +0 -3
  113. /package/dist/src/{LegacySelect/LegacySelect.style.js → Select/Select.style.js} +0 -0
  114. /package/dist/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.style.js → Select/components/SelectDefaultPicker/SelectDefaultPicker.style.js} +0 -0
  115. /package/dist/src/{LegacySelect/components/LegacySelectInternalPicker → Select/components/SelectInternalPicker}/utils.js +0 -0
  116. /package/dist/src/{LegacySelect/components/LegacySelectPressable/LegacySelectPressable.style.js → Select/components/SelectPressable/SelectPressable.style.js} +0 -0
  117. /package/dist/src/{LegacySelect → Select}/types.js +0 -0
  118. /package/dist/types/src/{LegacySelect/LegacySelect.style.d.ts → Select/Select.style.d.ts} +0 -0
  119. /package/dist/types/src/{LegacySelect/LegacySelect.test.d.ts → Select/Select.test.d.ts} +0 -0
  120. /package/dist/types/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.style.d.ts → Select/components/SelectDefaultPicker/SelectDefaultPicker.style.d.ts} +0 -0
  121. /package/dist/types/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.test.d.ts → Select/components/SelectDefaultPicker/SelectDefaultPicker.test.d.ts} +0 -0
  122. /package/dist/types/src/{LegacySelect/components/LegacySelectInternalPicker/LegacySelectInternalPicker.test.d.ts → Select/components/SelectInternalPicker/SelectInternalPicker.test.d.ts} +0 -0
  123. /package/dist/types/src/{LegacySelect/components/LegacySelectPressable/LegacySelectPressable.style.d.ts → Select/components/SelectPressable/SelectPressable.style.d.ts} +0 -0
  124. /package/src/{LegacySelect/LegacySelect.style.ts → Select/Select.style.ts} +0 -0
  125. /package/src/{LegacySelect/components/LegacySelectDefaultPicker/LegacySelectDefaultPicker.style.ts → Select/components/SelectDefaultPicker/SelectDefaultPicker.style.ts} +0 -0
  126. /package/src/{LegacySelect/components/LegacySelectPressable/LegacySelectPressable.style.ts → Select/components/SelectPressable/SelectPressable.style.ts} +0 -0
@@ -1,8 +1,57 @@
1
1
  # Activity Indicator
2
2
 
3
- `ActivityIndicator` is used to communicate an **indeterminate** activity the
4
- user cannot directly control or measure — loading, fetching, or waiting on an
5
- external system.
3
+ `ActivityIndicator` communicates an **indeterminate** activity the user cannot
4
+ directly control or measure — loading, fetching, or waiting on an external
5
+ system.
6
+
7
+ Use `ActivityIndicator` when the loading time or fraction of progress is
8
+ unknown. If you know the fraction of progress (for example, "3 of 4 files
9
+ uploaded"), use `ProgressBar` instead. A `ProgressIndicator` counterpart that
10
+ will subsume `ProgressBar` under the new Indicators naming is forthcoming.
11
+
12
+ ## Design & usage guidelines
13
+
14
+ The default `ActivityIndicator` size is `base` (44px) and can be used in most
15
+ cases. The `small` size (28px) should be used on individual elements of an
16
+ interface (e.g. inside a `Button` or `Card`) or when sitting next to short
17
+ inline text.
18
+
19
+ Layout is the consumer's responsibility — `ActivityIndicator` does not expose an
20
+ `inline` prop. Place it inside your own flex / inline-block container, or pass a
21
+ `style`, to control surrounding layout.
22
+
23
+ ## Accessibility
24
+
25
+ `ActivityIndicator` announces itself to assistive technology on every platform:
26
+
27
+ * `accessibilityRole="progressbar"` and `accessibilityState={{ busy: true }}`
28
+ mark the component as an ongoing indeterminate activity.
29
+ * `accessibilityLabel` defaults to a localized `"Loading"` string via
30
+ `useAtlantisI18n("loading")`. Pass a custom `accessibilityLabel` to describe
31
+ the specific activity (e.g. `accessibilityLabel="Uploading file"`).
32
+ * On mount and whenever the label changes, the component calls
33
+ `AccessibilityInfo.announceForAccessibility` so VoiceOver and TalkBack
34
+ announce the label once.
35
+
36
+ The indicator is not focusable and is not in the accessibility navigation order
37
+ beyond the mount-time announcement.
38
+
39
+ ### Reduced motion
40
+
41
+ When the operating system reports the Reduce Motion accessibility setting, the
42
+ indicator hides the rocking and rotating layers, repaints a single static ring
43
+ in the icon foreground colour, and gently pulses its opacity so the indicator
44
+ still reads as "busy" without rotational motion. Detection is reactive — the
45
+ component responds to OS toggles without requiring a remount.
46
+
47
+ ## Cross-platform parity
48
+
49
+ `ActivityIndicator` renders the same Material Design 3 three-layer indeterminate
50
+ ring on iOS, Android, and web (`@jobber/components`). The visual identity,
51
+ sizes, motion durations, and reduced-motion fallback are unified across
52
+ platforms. Public prop names diverge to follow each platform's native
53
+ conventions (`accessibilityLabel` here vs `ariaLabel` on web; `style` here vs
54
+ `className` + `style` on web).
6
55
 
7
56
  Use `ActivityIndicator` when the loading time or fraction of progress is
8
57
  unknown. If you know the fraction of progress (for example, "3 of 4 files
@@ -61,96 +110,7 @@ component from React Native.
61
110
 
62
111
  | Prop | Type | Required | Default | Description |
63
112
  |------|------|----------|---------|-------------|
64
- | `accessibilityActions` | `readonly Readonly<{ name: string; label?: string; }>[]` | No | — | Provides an array of custom actions available for accessibility. |
65
- | `accessibilityElementsHidden` | `boolean` | No | | A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden ... |
66
- | `accessibilityHint` | `string` | No | — | An accessibility hint helps users understand what will happen when they perform an action on the accessibility elemen... |
67
- | `accessibilityIgnoresInvertColors` | `boolean` | No | | https://reactnative.dev/docs/accessibility#accessibilityignoresinvertcolorsios @platform ios |
68
- | `accessibilityLabel` | `string` | No | — | Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label i... |
69
- | `accessibilityLabelledBy` | `string | string[]` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
70
- | `accessibilityLanguage` | `string` | No | — | By using the accessibilityLanguage property, the screen reader will understand which language to use while reading th... |
71
- | `accessibilityLargeContentTitle` | `string` | No | — | When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer. h... |
72
- | `accessibilityLiveRegion` | `"assertive" | "none" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
73
- | `accessibilityRespondsToUserInteraction` | `boolean` | No | — | Blocks the user from interacting with the component through keyboard while still allowing screen reader to interact w... |
74
- | `accessibilityRole` | `AccessibilityRole` | No | — | Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is fo... |
75
- | `accessibilityShowsLargeContentViewer` | `boolean` | No | — | A Boolean value that indicates whether or not to show the item in the large content viewer. Available on iOS 13.0+ ht... |
76
- | `accessibilityState` | `AccessibilityState` | No | — | Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element curr... |
77
- | `accessibilityValue` | `AccessibilityValue` | No | — | Represents the current value of a component. It can be a textual description of a component's value, or for range-bas... |
78
- | `accessibilityViewIsModal` | `boolean` | No | — | A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receive... |
79
- | `accessible` | `boolean` | No | — | When true, indicates that the view is an accessibility element. By default, all the touchable elements are accessible. |
80
- | `animating` | `boolean` | No | — | Whether to show the indicator (true, the default) or hide it (false). |
81
- | `aria-busy` | `boolean` | No | — | alias for accessibilityState see https://reactnative.dev/docs/accessibility#accessibilitystate |
82
- | `aria-checked` | `"mixed" | boolean` | No | — | |
83
- | `aria-disabled` | `boolean` | No | — | |
84
- | `aria-expanded` | `boolean` | No | — | |
85
- | `aria-hidden` | `boolean` | No | — | A value indicating whether the accessibility elements contained within this accessibility element are hidden. |
86
- | `aria-label` | `string` | No | — | Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel https://github.com/facebook/react-... |
87
- | `aria-labelledby` | `string` | No | — | Identifies the element that labels the element it is applied to. When the assistive technology focuses on the compone... |
88
- | `aria-live` | `"assertive" | "off" | "polite"` | No | — | Indicates to accessibility services whether the user should be notified when this view changes. Works for Android API... |
89
- | `aria-modal` | `boolean` | No | — | |
90
- | `aria-selected` | `boolean` | No | — | |
91
- | `aria-valuemax` | `number` | No | — | |
92
- | `aria-valuemin` | `number` | No | — | |
93
- | `aria-valuenow` | `number` | No | — | |
94
- | `aria-valuetext` | `string` | No | — | |
95
- | `collapsable` | `boolean` | No | — | Views that are only used to layout their children or otherwise don't draw anything may be automatically removed from ... |
96
- | `collapsableChildren` | `boolean` | No | — | Setting to false prevents direct children of the view from being removed from the native view hierarchy, similar to t... |
97
- | `color` | `ColorValue` | No | — | The foreground color of the spinner (default is gray). |
98
- | `focusable` | `boolean` | No | — | Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard. |
99
- | `hasTVPreferredFocus` | `boolean` | No | — | *(Apple TV only)* May be set to true to force the Apple TV focus engine to move focus to this view. @platform ios @de... |
100
- | `hidesWhenStopped` | `boolean` | No | — | Whether the indicator should hide when not animating (true by default). |
101
- | `hitSlop` | `Insets | number` | No | — | This defines how far a touch event can start away from the view. Typical interface guidelines recommend touch targets... |
102
- | `id` | `string` | No | — | Used to reference react managed views from native code. |
103
- | `importantForAccessibility` | `"auto" | "no" | "no-hide-descendants" | "yes"` | No | — | [Android] Controlling if a view fires accessibility events and if it is reported to accessibility services. |
104
- | `isTVSelectable` | `boolean` | No | — | *(Apple TV only)* When set to true, this view will be focusable and navigable using the Apple TV remote. @platform ios |
105
- | `nativeID` | `string` | No | — | Used to reference react managed views from native code. |
106
- | `needsOffscreenAlphaCompositing` | `boolean` | No | — | Whether this view needs to rendered offscreen and composited with an alpha in order to preserve 100% correct colors a... |
107
- | `onAccessibilityAction` | `(event: AccessibilityActionEvent) => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs an accessibility custom... |
108
- | `onAccessibilityEscape` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the escape gesture (scrub with t... |
109
- | `onAccessibilityTap` | `() => void` | No | — | When `accessible` is true, the system will try to invoke this function when the user performs accessibility tap gestu... |
110
- | `onBlur` | `(e: BlurEvent) => void` | No | — | Callback that is called when the view is blurred. Note: This will only be called if the view is focusable. |
111
- | `onFocus` | `(e: FocusEvent) => void` | No | — | Callback that is called when the view is focused. Note: This will only be called if the view is focusable. |
112
- | `onLayout` | `(event: LayoutChangeEvent) => void` | No | — | Invoked on mount and layout changes with {nativeEvent: { layout: {x, y, width, height}}}. |
113
- | `onMagicTap` | `() => void` | No | — | When accessible is true, the system will invoke this function when the user performs the magic tap gesture. @platform... |
114
- | `onMoveShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsive... |
115
- | `onMoveShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
116
- | `onPointerCancel` | `(event: PointerEvent) => void` | No | — | |
117
- | `onPointerCancelCapture` | `(event: PointerEvent) => void` | No | — | |
118
- | `onPointerDown` | `(event: PointerEvent) => void` | No | — | |
119
- | `onPointerDownCapture` | `(event: PointerEvent) => void` | No | — | |
120
- | `onPointerEnter` | `(event: PointerEvent) => void` | No | — | |
121
- | `onPointerEnterCapture` | `(event: PointerEvent) => void` | No | — | |
122
- | `onPointerLeave` | `(event: PointerEvent) => void` | No | — | |
123
- | `onPointerLeaveCapture` | `(event: PointerEvent) => void` | No | — | |
124
- | `onPointerMove` | `(event: PointerEvent) => void` | No | — | |
125
- | `onPointerMoveCapture` | `(event: PointerEvent) => void` | No | — | |
126
- | `onPointerUp` | `(event: PointerEvent) => void` | No | — | |
127
- | `onPointerUpCapture` | `(event: PointerEvent) => void` | No | — | |
128
- | `onResponderEnd` | `(event: GestureResponderEvent) => void` | No | — | If the View returns true and attempts to become the responder, one of the following will happen: |
129
- | `onResponderGrant` | `(event: GestureResponderEvent) => void` | No | — | The View is now responding for touch events. This is the time to highlight and show the user what is happening |
130
- | `onResponderMove` | `(event: GestureResponderEvent) => void` | No | — | The user is moving their finger |
131
- | `onResponderReject` | `(event: GestureResponderEvent) => void` | No | — | Something else is the responder right now and will not release it |
132
- | `onResponderRelease` | `(event: GestureResponderEvent) => void` | No | — | Fired at the end of the touch, ie "touchUp" |
133
- | `onResponderStart` | `(event: GestureResponderEvent) => void` | No | — | |
134
- | `onResponderTerminate` | `(event: GestureResponderEvent) => void` | No | — | The responder has been taken from the View. Might be taken by other views after a call to onResponderTerminationReque... |
135
- | `onResponderTerminationRequest` | `(event: GestureResponderEvent) => boolean` | No | — | Something else wants to become responder. Should this view release the responder? Returning true allows release |
136
- | `onStartShouldSetResponder` | `(event: GestureResponderEvent) => boolean` | No | — | Does this view want to become responder on the start of a touch? |
137
- | `onStartShouldSetResponderCapture` | `(event: GestureResponderEvent) => boolean` | No | — | onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern, where the deepest node is ... |
138
- | `onTouchCancel` | `(event: GestureResponderEvent) => void` | No | — | |
139
- | `onTouchEnd` | `(event: GestureResponderEvent) => void` | No | — | |
140
- | `onTouchEndCapture` | `(event: GestureResponderEvent) => void` | No | — | |
141
- | `onTouchMove` | `(event: GestureResponderEvent) => void` | No | — | |
142
- | `onTouchStart` | `(event: GestureResponderEvent) => void` | No | — | |
143
- | `pointerEvents` | `"auto" | "box-none" | "box-only" | "none"` | No | — | In the absence of auto property, none is much like CSS's none value. box-none is as if you had applied the CSS class:... |
144
- | `removeClippedSubviews` | `boolean` | No | — | This is a special performance property exposed by RCTView and is useful for scrolling content when there are many sub... |
145
- | `renderToHardwareTextureAndroid` | `boolean` | No | — | Whether this view should render itself (and all of its children) into a single hardware texture on the GPU. On Andro... |
146
- | `role` | `Role` | No | — | Indicates to accessibility services to treat UI component like a specific role. |
147
- | `screenReaderFocusable` | `boolean` | No | — | Enables the view to be screen reader focusable, not keyboard focusable. @platform android |
148
- | `shouldRasterizeIOS` | `boolean` | No | — | Whether this view should be rendered as a bitmap before compositing. On iOS, this is useful for animations and inter... |
149
- | `size` | `"large" | "small" | number` | No | — | Size of the indicator. Small has a height of 20, large has a height of 36. enum('small', 'large') |
150
- | `style` | `StyleProp<ViewStyle>` | No | — | |
151
- | `tabIndex` | `-1 | 0` | No | — | Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware ke... |
152
- | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
153
- | `tvParallaxMagnification` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
154
- | `tvParallaxShiftDistanceX` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
155
- | `tvParallaxShiftDistanceY` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
156
- | `tvParallaxTiltAngle` | `number` | No | — | *(Apple TV only)* May be used to change the appearance of the Apple TV parallax effect when this view goes in or out ... |
113
+ | `accessibilityLabel` | `string` | No | — | Accessible label exposed to assistive technology and announced on mount. Defaults to a localized "Loading" string via... |
114
+ | `size` | `"base" | "large" | "small"` | No | `base` | Visual size. `"base"` renders at 44px, `"small"` renders at 28px. `"large"` is a deprecated alias for `"base"` and wi... |
115
+ | `style` | `StyleProp<ViewStyle>` | No | — | Inline styles applied to the root view. |
116
+ | `testID` | `string` | No | `ActivityIndicator` | Test identifier applied to the root view. Defaults to `"ActivityIndicator"`. |
@@ -238,7 +238,7 @@ export function ChipInvalidExample(
238
238
  single-select, multi-select, and add/dismiss functionality "out of the box"
239
239
  * [Combobox](/components/Combobox) is most commonly triggered by a Chip, but is
240
240
  a separate component
241
- * [Select](/components/Select) is a simpler single-select "dropdown" that
241
+ * [Select](../Select/Select.md) is a simpler single-select "dropdown" that
242
242
  presents as a form element and should be preferred in forms
243
243
  * [RadioGroup](/components/RadioGroup) should be used to allow the user to
244
244
  select "one-of-many" items (single-select) and the labels for the items are
@@ -18,7 +18,7 @@ have a `value` and `onChange` prop.
18
18
  ### Inputs
19
19
 
20
20
  Form can accept various inputs and selection elements such as (but not limited
21
- to) [InputText](../InputText/InputText.md), [Select](/components/Select),
21
+ to) [InputText](../InputText/InputText.md), [Select](../Select/Select.md),
22
22
  [Switch](../Switch/Switch.md), [Checkbox](../Checkbox/Checkbox.md), and
23
23
  [Chips](/components/Chips). They should be placed [Cards](../Card/Card.md) to
24
24
  indicate grouping when relevant, and groups of Cards can be spaced appropriately
@@ -24,7 +24,7 @@ displayed to them.
24
24
  | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
25
25
  | `assistiveText` | `string` | No | — | Text that helps the user understand the input |
26
26
  | `autoCapitalize` | `"characters" | "none" | "sentences" | "words"` | No | — | Determines where to autocapitalize |
27
- | `autoComplete` | `"email" | "off" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 44 more ... | "username-new"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
27
+ | `autoComplete` | `"email" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
28
28
  | `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
29
29
  | `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
30
30
  | `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
@@ -36,7 +36,7 @@ If you are not worried about email address validation, consider using
36
36
  | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
37
37
  | `assistiveText` | `string` | No | — | Text that helps the user understand the input |
38
38
  | `autoCapitalize` | `"characters" | "none" | "sentences" | "words"` | No | — | Determines where to autocapitalize |
39
- | `autoComplete` | `"email" | "off" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 44 more ... | "username-new"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
39
+ | `autoComplete` | `"email" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
40
40
  | `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
41
41
  | `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
42
42
  | `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
@@ -27,7 +27,7 @@ InputNumber does not show a clear button. The component enforces
27
27
  | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
28
28
  | `assistiveText` | `string` | No | — | Text that helps the user understand the input |
29
29
  | `autoCapitalize` | `"characters" | "none" | "sentences" | "words"` | No | — | Determines where to autocapitalize |
30
- | `autoComplete` | `"email" | "off" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 44 more ... | "username-new"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
30
+ | `autoComplete` | `"email" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
31
31
  | `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
32
32
  | `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
33
33
  | `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
@@ -30,7 +30,7 @@ refer to [InputText](../InputText/InputText.md).
30
30
  | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
31
31
  | `assistiveText` | `string` | No | — | Text that helps the user understand the input |
32
32
  | `autoCapitalize` | `"characters" | "none" | "sentences" | "words"` | No | — | Determines where to autocapitalize |
33
- | `autoComplete` | `"email" | "off" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 44 more ... | "username-new"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
33
+ | `autoComplete` | `"email" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
34
34
  | `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
35
35
  | `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
36
36
  | `defaultValue` | `string` | No | — | Default value for when component is uncontrolled |
@@ -320,7 +320,7 @@ export function InputTextKeyboardExample(
320
320
  | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the associated element |
321
321
  | `assistiveText` | `string` | No | — | Text that helps the user understand the input |
322
322
  | `autoCapitalize` | `"characters" | "none" | "sentences" | "words"` | No | — | Determines where to autocapitalize |
323
- | `autoComplete` | `"email" | "off" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 44 more ... | "username-new"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
323
+ | `autoComplete` | `"email" | "name" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | ... 45 more ... | "off"` | No | — | Determines which content to suggest on auto complete, e.g.`username`. Default is `off` which disables auto complete ... |
324
324
  | `autoCorrect` | `boolean` | No | — | Turn off autocorrect |
325
325
  | `autoFocus` | `boolean` | No | — | Automatically focus the input after it is rendered |
326
326
  | `clearable` | `Clearable` | No | — | Add a clear action on the input that clears the value. You should always use `while-editing` if you want the input t... |
@@ -0,0 +1,219 @@
1
+ # Select
2
+
3
+ A Select is used to present a defined list of options to choose from.
4
+
5
+ ## Design & usage guidelines
6
+
7
+ Nested within the Select component, Option defines the options that can be
8
+ selected. For grouping options with section headers, use Select.OptionGroup.
9
+
10
+ #### Custom grouped menu and browser support
11
+
12
+ To enable the enhanced grouped menu styling (bold section headers, edge‑to‑edge
13
+ dividers and hover backgrounds), set the `UNSAFE_experimentalStyles` prop on
14
+ `Select`.
15
+
16
+ * When `UNSAFE_experimentalStyles` is true and the browser supports
17
+ `appearance: base-select` (Chromium 123+), the select renders with the
18
+ customizable grouped menu.
19
+ * In unsupported browsers, or when `UNSAFE_experimentalStyles` is not provided,
20
+ the select remains native while still rendering the same `OptionGroup`
21
+ structure.
22
+
23
+ ## States
24
+
25
+ ### Invalid
26
+
27
+ ```tsx
28
+ import React, { useState } from "react";
29
+ import { Option, Select } from "@jobber/components/Select";
30
+
31
+ export function SelectInvalidExample() {
32
+ const [value, setValue] = useState<string | number | undefined>("");
33
+
34
+ return (
35
+ <Select invalid={true} value={value} onChange={setValue}>
36
+ <Option value="sad">Tony</Option>
37
+ <Option value="old">Steve</Option>
38
+ </Select>
39
+ );
40
+ }
41
+ ```
42
+
43
+ ### Disabled
44
+
45
+ ```tsx
46
+ import React, { useState } from "react";
47
+ import { Option, Select } from "@jobber/components/Select";
48
+
49
+ export function SelectDisabledExample() {
50
+ const [value, setValue] = useState<string | number | undefined>("");
51
+
52
+ return (
53
+ <Select disabled={true} value={value} onChange={setValue}>
54
+ <Option value="sad">Tony</Option>
55
+ <Option value="old">Steve</Option>
56
+ </Select>
57
+ );
58
+ }
59
+ ```
60
+
61
+ ## Option Grouping
62
+
63
+ Use `Select.OptionGroup` to organize options with section headers for better
64
+ user experience and visual hierarchy. The `label` prop is required as it
65
+ provides the section header text.
66
+
67
+ ### Basic Option Groups
68
+
69
+ ```tsx
70
+ import React, { useState } from "react";
71
+ import { Select } from "@jobber/components/Select";
72
+
73
+ export function SelectCustomOptionGroupsExample() {
74
+ const [value, setValue] = useState<string | number | undefined>("");
75
+
76
+ return (
77
+ <Select
78
+ placeholder="Select an option"
79
+ UNSAFE_experimentalStyles={true}
80
+ value={value}
81
+ onChange={setValue}
82
+ >
83
+ <Select.OptionGroup label="Team A">
84
+ <Select.Option value="alice">Alice</Select.Option>
85
+ <Select.Option value="bob">Bob</Select.Option>
86
+ <Select.Option value="charlie">Charlie</Select.Option>
87
+ </Select.OptionGroup>
88
+ <Select.OptionGroup label="Team B">
89
+ <Select.Option value="diana">Diana</Select.Option>
90
+ <Select.Option value="evan">Evan</Select.Option>
91
+ <Select.Option value="frank">Frank</Select.Option>
92
+ </Select.OptionGroup>
93
+ <Select.OptionGroup label="Team C">
94
+ <Select.Option value="grace">Grace</Select.Option>
95
+ <Select.Option value="hector">Hector</Select.Option>
96
+ <Select.Option value="isabel">Isabel</Select.Option>
97
+ </Select.OptionGroup>
98
+ </Select>
99
+ );
100
+ }
101
+ ```
102
+
103
+ ### Disabled Option Groups
104
+
105
+ ```tsx
106
+ import React, { useState } from "react";
107
+ import { Select } from "@jobber/components/Select";
108
+
109
+ export function SelectCustomOptionGroupDisabledExample() {
110
+ const [value, setValue] = useState<string | number | undefined>("");
111
+
112
+ return (
113
+ <Select
114
+ UNSAFE_experimentalStyles
115
+ placeholder="Select an option"
116
+ value={value}
117
+ onChange={setValue}
118
+ >
119
+ <Select.OptionGroup label="Available Items">
120
+ <Select.Option value="option1">Option 1</Select.Option>
121
+ <Select.Option value="option2">Option 2</Select.Option>
122
+ </Select.OptionGroup>
123
+ <Select.OptionGroup label="Unavailable Items" disabled>
124
+ <Select.Option value="option3">Option 3</Select.Option>
125
+ <Select.Option value="option4">Option 4</Select.Option>
126
+ </Select.OptionGroup>
127
+ <Select.OptionGroup label="More Items">
128
+ <Select.Option value="option5">Option 5</Select.Option>
129
+ <Select.Option value="option6">Option 6</Select.Option>
130
+ </Select.OptionGroup>
131
+ </Select>
132
+ );
133
+ }
134
+ ```
135
+
136
+
137
+ ## Configuration
138
+
139
+ ### Custom (Chromium) vs native
140
+
141
+ Select is native by default. Opt into the customizable Chrome UI with
142
+ `UNSAFE_experimentalStyles`. This enhances grouped menus in Chromium 123+ when
143
+ the browser supports `appearance: base-select`.
144
+
145
+ #### Alignment limitation (custom UI)
146
+
147
+ When using `UNSAFE_experimentalStyles`, the closed control (what you see as the
148
+ displayed value) is still rendered by the browser's picker. As a result,
149
+ right/center alignment of the displayed value is not configurable in Chromium's
150
+ customizable select.
151
+
152
+ * Need right/center alignment? Use the native Select (omit
153
+ `UNSAFE_experimentalStyles`).
154
+ * You can still style the grouped dropdown (optgroup/option) in the custom UI,
155
+ but the closed value alignment will remain default.
156
+
157
+ ## Component customization
158
+
159
+ ### Composable usage
160
+
161
+ Select supports composition via subcomponents:
162
+
163
+ * `Select.Option`: item in the list. Provide `value` and children as the label.
164
+ * `Select.OptionGroup`: group options under a `label`. Use with
165
+ `UNSAFE_experimentalStyles` to opt into the customizable grouped menu in
166
+ Chromium.
167
+
168
+ #### Customization links
169
+
170
+ * See
171
+ ["A customizable select"](https://developer.chrome.com/blog/a-customizable-select)
172
+ article for what the Chrome UI exposes: `::picker(select)`, option/optgroup
173
+ styling, and transitions.
174
+
175
+ ## UNSAFE\_ props (advanced usage)
176
+
177
+ General guidance on `UNSAFE_` props can be found in
178
+ [Customizing components](../customizing-components/customizing-components.md).
179
+
180
+ Select subcomponents allow `UNSAFE_className` and `UNSAFE_style` to target the
181
+ native elements:
182
+
183
+ * `Select.OptionGroup` maps to `<optgroup>`
184
+ * `Select.Option` maps to `<option>`
185
+
186
+ Note that native `<select>` UX differs per browser. Use `UNSAFE_` props with
187
+ caution and test across environments. In the custom UI (Chromium), only the
188
+ dropdown content is stylable; the closed value alignment is not.
189
+
190
+
191
+ ## Props
192
+
193
+ ### Mobile
194
+
195
+ #### Option
196
+
197
+ | Prop | Type | Required | Default | Description |
198
+ |------|------|----------|---------|-------------|
199
+ | `children` | `string` | Yes | — | Text that shows up as the option |
200
+ | `value` | `string` | Yes | — | The value that gets returned when an option is selected |
201
+
202
+ #### Select
203
+
204
+ | Prop | Type | Required | Default | Description |
205
+ |------|------|----------|---------|-------------|
206
+ | `children` | `ReactElement<SelectOption, string | JSXElementConstructor<any>>[]` | Yes | — | The options to select from |
207
+ | `accessibilityHint` | `string` | No | — | Helps users understand what will happen when they perform an action |
208
+ | `accessibilityLabel` | `string` | No | — | VoiceOver will read this string when a user selects the element |
209
+ | `assistiveText` | `string` | No | — | Help text shown below the control. |
210
+ | `defaultValue` | `string` | No | — | Default value for when the component is uncontrolled |
211
+ | `disabled` | `boolean` | No | — | Disables input selection |
212
+ | `invalid` | `boolean` | No | — | Indicates the current selection is invalid |
213
+ | `label` | `string` | No | — | Label text shown above the selection. |
214
+ | `name` | `string` | No | — | Name of the input. |
215
+ | `onChange` | `(newValue?: string) => void` | No | — | Callback that provides the new value when the selection changes |
216
+ | `placeholder` | `string` | No | — | Adds a first option to let users select a "no value". Placeholder item selected by default until a selection is made. |
217
+ | `testID` | `string` | No | — | Used to locate this view in end-to-end tests. |
218
+ | `validations` | `RegisterOptions` | No | — | The validations that will mark this component as invalid |
219
+ | `value` | `string` | No | — | Current value of the component |
@@ -44,13 +44,13 @@
44
44
  [InputText](./InputText/InputText.md)
45
45
  [InputTime](./InputTime/InputTime.md)
46
46
  [interaction](./interaction/interaction.md)
47
- [LegacySelect](./LegacySelect/LegacySelect.md)
48
47
  [Opacity](./Opacity/Opacity.md)
49
48
  [page-layouts](./page-layouts/page-layouts.md)
50
49
  [ProgressBar](./ProgressBar/ProgressBar.md)
51
50
  [Radii](./Radii/Radii.md)
52
51
  [ResponsiveBreakpoint](./ResponsiveBreakpoint/ResponsiveBreakpoint.md)
53
52
  [scaffolding](./scaffolding/scaffolding.md)
53
+ [Select](./Select/Select.md)
54
54
  [settings](./settings/settings.md)
55
55
  [Spacing](./Spacing/Spacing.md)
56
56
  [StatusLabel](./StatusLabel/StatusLabel.md)
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.104.3-rename-sel-d7cc7c5.6+d7cc7c5c",
3
+ "version": "0.105.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -71,7 +71,7 @@
71
71
  "devDependencies": {
72
72
  "@babel/runtime": "^7.29.2",
73
73
  "@gorhom/bottom-sheet": "^5.2.8",
74
- "@jobber/design": "0.101.1",
74
+ "@jobber/design": "0.102.0",
75
75
  "@jobber/hooks": "2.21.0",
76
76
  "@react-native-community/datetimepicker": "^8.4.5",
77
77
  "@react-native/babel-preset": "^0.82.1",
@@ -122,5 +122,5 @@
122
122
  "react-native-screens": ">=4.18.0",
123
123
  "react-native-svg": ">=12.0.0"
124
124
  },
125
- "gitHead": "d7cc7c5c5e83b282c4d34b9cb721bcb431140881"
125
+ "gitHead": "2dd2b2d127e9e7e00f8db56c9a5c8ab05344e128"
126
126
  }