@ornikar/kitt-universal 13.3.0 → 13.3.2

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.
@@ -8234,8 +8234,8 @@ function PickerItem({
8234
8234
  selected: isSelected
8235
8235
  },
8236
8236
  backgroundColor: isSelected ? 'kitt.picker.android.item.selected.backgroundColor' : 'kitt.picker.android.item.default.backgroundColor',
8237
- paddingX: "kitt.picker.android.horizontalPadding",
8238
- paddingY: "kitt.picker.android.verticalPadding",
8237
+ paddingX: "kitt.picker.android.item.horizontalPadding",
8238
+ paddingY: "kitt.picker.android.item.verticalPadding",
8239
8239
  onPress: () => {
8240
8240
  if (onPress) {
8241
8241
  onPress(value);
@@ -8260,6 +8260,9 @@ function Picker({
8260
8260
  onClose
8261
8261
  }) {
8262
8262
  const sx = nativeBase.useSx();
8263
+ const iosTextStyle = sx({
8264
+ color: 'kitt.picker.ios.selected.color'
8265
+ });
8263
8266
 
8264
8267
  // Max height is based on base Modal sizes (which are not themified): padding (4*20*2) + footer (58) + header (58) + default iOS picker height (216)
8265
8268
  const [isMatchingMaxHeight] = nativeBase.useMediaQuery({
@@ -8274,11 +8277,6 @@ function Picker({
8274
8277
  // We can't set a percentage as it will be computed based on the page height
8275
8278
  height: isMatchingMaxHeight ? 'kitt.picker.ios.landscape.height' : 'kitt.picker.ios.default.height'
8276
8279
  });
8277
- const getIosTextStyle = isSelected => {
8278
- return sx({
8279
- color: isSelected ? 'kitt.picker.ios.selected.color' : undefined
8280
- });
8281
- };
8282
8280
  const [value, setValue] = React.useState(initialValue);
8283
8281
  return /*#__PURE__*/jsxRuntime.jsx(CardModal.ModalBehaviour, {
8284
8282
  visible: isVisible,
@@ -8304,7 +8302,7 @@ function Picker({
8304
8302
 
8305
8303
  // iOS Picker doesn't support a custom Item component, we need to override its props manually for the selected one
8306
8304
  return /*#__PURE__*/React.cloneElement(item, {
8307
- color: getIosTextStyle(item.props.value === value).color
8305
+ color: item.props.value === value ? iosTextStyle.color : undefined
8308
8306
  });
8309
8307
  })
8310
8308
  }) : /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {