@nulogy/components 8.7.0 → 8.7.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.
package/dist/main.js CHANGED
@@ -25772,6 +25772,8 @@
25772
25772
  focusedIndex = _useState[0],
25773
25773
  setFocusedIndex = _useState[1];
25774
25774
 
25775
+ var prevFocusedIndex = React.useRef(focusedIndex);
25776
+
25775
25777
  var focusPrevious = function focusPrevious() {
25776
25778
  setFocusedIndex(function (prevFocusedIndex) {
25777
25779
  return (prevFocusedIndex - 1 + refs.length) % refs.length;
@@ -25803,7 +25805,10 @@
25803
25805
  refs[focusedIndex].focus();
25804
25806
  };
25805
25807
 
25806
- updateFocused();
25808
+ if (prevFocusedIndex.current !== focusedIndex) {
25809
+ updateFocused();
25810
+ prevFocusedIndex.current = focusedIndex;
25811
+ }
25807
25812
  }, [focusedIndex, refs]);
25808
25813
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children({
25809
25814
  focusedIndex: focusedIndex,
@@ -41040,8 +41045,8 @@
41040
41045
  };
41041
41046
  });
41042
41047
 
41043
- var DEFAULT_DATE_FORMAT = "dd MMM yyyy";
41044
- var DEFAULT_PLACEHOLDER$1 = "DD Mon YYYY";
41048
+ var DEFAULT_DATE_FORMAT = "yyyy-MMM-dd";
41049
+ var DEFAULT_PLACEHOLDER$1 = "YYYY-Mon-DD";
41045
41050
  var DatePicker = /*#__PURE__*/React.forwardRef(function (_a, datePickerRef) {
41046
41051
  var _a$dateFormat = _a.dateFormat,
41047
41052
  dateFormat = _a$dateFormat === void 0 ? DEFAULT_DATE_FORMAT : _a$dateFormat,
@@ -25746,6 +25746,8 @@ var FocusManager = function FocusManager(_ref) {
25746
25746
  focusedIndex = _useState[0],
25747
25747
  setFocusedIndex = _useState[1];
25748
25748
 
25749
+ var prevFocusedIndex = useRef(focusedIndex);
25750
+
25749
25751
  var focusPrevious = function focusPrevious() {
25750
25752
  setFocusedIndex(function (prevFocusedIndex) {
25751
25753
  return (prevFocusedIndex - 1 + refs.length) % refs.length;
@@ -25777,7 +25779,10 @@ var FocusManager = function FocusManager(_ref) {
25777
25779
  refs[focusedIndex].focus();
25778
25780
  };
25779
25781
 
25780
- updateFocused();
25782
+ if (prevFocusedIndex.current !== focusedIndex) {
25783
+ updateFocused();
25784
+ prevFocusedIndex.current = focusedIndex;
25785
+ }
25781
25786
  }, [focusedIndex, refs]);
25782
25787
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children({
25783
25788
  focusedIndex: focusedIndex,
@@ -41014,8 +41019,8 @@ var DatePickerStyles = createGlobalStyle(function (_ref) {
41014
41019
  };
41015
41020
  });
41016
41021
 
41017
- var DEFAULT_DATE_FORMAT = "dd MMM yyyy";
41018
- var DEFAULT_PLACEHOLDER$1 = "DD Mon YYYY";
41022
+ var DEFAULT_DATE_FORMAT = "yyyy-MMM-dd";
41023
+ var DEFAULT_PLACEHOLDER$1 = "YYYY-Mon-DD";
41019
41024
  var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
41020
41025
  var _a$dateFormat = _a.dateFormat,
41021
41026
  dateFormat = _a$dateFormat === void 0 ? DEFAULT_DATE_FORMAT : _a$dateFormat,
@@ -19,6 +19,11 @@ export declare const RadioGroupWithAllProps: {
19
19
  story: {
20
20
  name: string;
21
21
  };
22
+ parameters: {
23
+ chromatic: {
24
+ diffThreshold: number;
25
+ };
26
+ };
22
27
  };
23
28
  export declare const WithErrorMessage: {
24
29
  (): JSX.Element;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const WithSelectedValue: () => JSX.Element;
3
+ export declare const WithOtherInteractiveElements: () => JSX.Element;
3
4
  export declare const WithContent: () => JSX.Element;
4
5
  declare const _default: {
5
6
  title: string;
@@ -10,6 +10,7 @@ export declare const WithADefaultSelectedIndex: {
10
10
  name: string;
11
11
  };
12
12
  };
13
+ export declare const WithOtherInteractiveElements: () => JSX.Element;
13
14
  export declare const SetToFitted: {
14
15
  (): JSX.Element;
15
16
  story: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.7.0",
3
+ "version": "8.7.2",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {