@hero-design/rn 8.112.0 → 8.112.1

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.
@@ -1,4 +1,4 @@
1
- (node:2673) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
1
+ (node:2743) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
2
  (Use `node --trace-warnings ...` to show where the warning was created)
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
@@ -9,9 +9,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
9
9
  ...and 12 more
10
10
  (!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
11
11
  (!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/_work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.
12
- created lib/index.js, es/index.js in 1m 36.5s
12
+ created lib/index.js, es/index.js in 1m 34.7s
13
13
  
14
14
  /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/_work/hero-design/hero-design/packages/rn/src/locales/types.ts → ., ....
15
15
  (!) Generated empty chunks
16
16
  "locales/types" and "locales/types"
17
- created ., . in 29.5s
17
+ created ., . in 25.3s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.112.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4310](https://github.com/Thinkei/hero-design/pull/4310) [`4742897580f05ae3d5f089df7aa0b1a34a90e15c`](https://github.com/Thinkei/hero-design/commit/4742897580f05ae3d5f089df7aa0b1a34a90e15c) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [TimePicker] Correct 12-hour format for iOS picker
8
+
3
9
  ## 8.112.0
4
10
 
5
11
  ### Minor Changes
package/es/index.js CHANGED
@@ -27958,6 +27958,10 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
27958
27958
  var is12Hour = displayFormat.includes('hh');
27959
27959
  var displayValue = value ? formatTime(displayFormat, value) : '';
27960
27960
  var theme = useTheme();
27961
+ // Determine locale based on time format preference
27962
+ // For 12-hour format: use en-US locale to ensure 12-hour display regardless of device settings
27963
+ // For 24-hour format: use en-GB for consistent 24-hour display
27964
+ var pickerLocale = is12Hour ? 'en-US' : 'en-GB';
27961
27965
  var InputComponent = TextInputComponent || TextInput;
27962
27966
  useEffect(function () {
27963
27967
  setSelectingDate(value || new Date());
@@ -28005,11 +28009,8 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
28005
28009
  }, /*#__PURE__*/React__default.createElement(StyledPickerWrapper, null, /*#__PURE__*/React__default.createElement(DateTimePicker, {
28006
28010
  testID: "timePickerIOS",
28007
28011
  value: selectingDate,
28008
- mode: "time"
28009
- // Current prop is24Hour config only available for Android.
28010
- // This is a work around to get the picker to display 24 hour format for iOS.
28011
- ,
28012
- locale: is12Hour ? undefined : 'en-GB',
28012
+ mode: "time",
28013
+ locale: pickerLocale,
28013
28014
  onChange: function onChange(_, date) {
28014
28015
  if (date) {
28015
28016
  setSelectingDate(date);
package/lib/index.js CHANGED
@@ -27987,6 +27987,10 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
27987
27987
  var is12Hour = displayFormat.includes('hh');
27988
27988
  var displayValue = value ? formatTime(displayFormat, value) : '';
27989
27989
  var theme = useTheme();
27990
+ // Determine locale based on time format preference
27991
+ // For 12-hour format: use en-US locale to ensure 12-hour display regardless of device settings
27992
+ // For 24-hour format: use en-GB for consistent 24-hour display
27993
+ var pickerLocale = is12Hour ? 'en-US' : 'en-GB';
27990
27994
  var InputComponent = TextInputComponent || TextInput;
27991
27995
  React.useEffect(function () {
27992
27996
  setSelectingDate(value || new Date());
@@ -28034,11 +28038,8 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
28034
28038
  }, /*#__PURE__*/React__namespace.default.createElement(StyledPickerWrapper, null, /*#__PURE__*/React__namespace.default.createElement(DateTimePicker__default.default, {
28035
28039
  testID: "timePickerIOS",
28036
28040
  value: selectingDate,
28037
- mode: "time"
28038
- // Current prop is24Hour config only available for Android.
28039
- // This is a work around to get the picker to display 24 hour format for iOS.
28040
- ,
28041
- locale: is12Hour ? undefined : 'en-GB',
28041
+ mode: "time",
28042
+ locale: pickerLocale,
28042
28043
  onChange: function onChange(_, date) {
28043
28044
  if (date) {
28044
28045
  setSelectingDate(date);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.112.0",
3
+ "version": "8.112.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -39,6 +39,11 @@ const TimePickerIOS = ({
39
39
  const displayValue = value ? formatTime(displayFormat, value) : '';
40
40
  const theme = useTheme();
41
41
 
42
+ // Determine locale based on time format preference
43
+ // For 12-hour format: use en-US locale to ensure 12-hour display regardless of device settings
44
+ // For 24-hour format: use en-GB for consistent 24-hour display
45
+ const pickerLocale = is12Hour ? 'en-US' : 'en-GB';
46
+
42
47
  const InputComponent = TextInputComponent || TextInput;
43
48
 
44
49
  useEffect(() => {
@@ -95,9 +100,7 @@ const TimePickerIOS = ({
95
100
  testID="timePickerIOS"
96
101
  value={selectingDate}
97
102
  mode="time"
98
- // Current prop is24Hour config only available for Android.
99
- // This is a work around to get the picker to display 24 hour format for iOS.
100
- locale={is12Hour ? undefined : 'en-GB'}
103
+ locale={pickerLocale}
101
104
  onChange={(_: any, date: Date | undefined) => {
102
105
  if (date) {
103
106
  setSelectingDate(date);
@@ -834,6 +834,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
834
834
  >
835
835
  <Picker
836
836
  display="spinner"
837
+ locale="en-US"
837
838
  mode="time"
838
839
  onChange={[Function]}
839
840
  style={