@bigbinary/neetoui 5.0.4 → 5.0.6
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/formik.cjs.js +13 -5
- package/formik.cjs.js.map +1 -1
- package/formik.js +13 -5
- package/formik.js.map +1 -1
- package/index.cjs.js +26 -10
- package/index.cjs.js.map +1 -1
- package/index.css +1 -1
- package/index.d.ts +1 -0
- package/index.js +26 -10
- package/index.js.map +1 -1
- package/layouts.cjs.js.map +1 -1
- package/layouts.js.map +1 -1
- package/package.json +3 -3
package/index.cjs.js
CHANGED
|
@@ -10802,7 +10802,7 @@ var UniqueArray = /*#__PURE__*/function () {
|
|
|
10802
10802
|
var renderFocusOnFocusableElements = function renderFocusOnFocusableElements(ref) {
|
|
10803
10803
|
var _ref$current, _ref$current2;
|
|
10804
10804
|
var shouldFocusFirstFocusableElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
10805
|
-
var focusableElements = '
|
|
10805
|
+
var focusableElements = '[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
10806
10806
|
var firstFocusableElement = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelectorAll(focusableElements)[0];
|
|
10807
10807
|
var focusableContent = ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.querySelectorAll(focusableElements);
|
|
10808
10808
|
var lastFocusableElement = focusableContent[(focusableContent === null || focusableContent === void 0 ? void 0 : focusableContent.length) - 1];
|
|
@@ -17577,12 +17577,12 @@ var useOverlay = function useOverlay(_ref) {
|
|
|
17577
17577
|
var focusRequiredElementInOverlay = function focusRequiredElementInOverlay() {
|
|
17578
17578
|
if (hasTransitionCompleted) {
|
|
17579
17579
|
var _initialFocusRef;
|
|
17580
|
-
if (
|
|
17581
|
-
renderFocusOnFocusableElements(overlayWrapper);
|
|
17582
|
-
} else {
|
|
17580
|
+
if ((_initialFocusRef = initialFocusRef) !== null && _initialFocusRef !== void 0 && _initialFocusRef.current) {
|
|
17583
17581
|
var _initialFocusRef2, _initialFocusRef2$cur;
|
|
17584
17582
|
(_initialFocusRef2 = initialFocusRef) === null || _initialFocusRef2 === void 0 ? void 0 : (_initialFocusRef2$cur = _initialFocusRef2.current) === null || _initialFocusRef2$cur === void 0 ? void 0 : _initialFocusRef2$cur.focus();
|
|
17585
17583
|
renderFocusOnFocusableElements(overlayWrapper, false);
|
|
17584
|
+
} else {
|
|
17585
|
+
renderFocusOnFocusableElements(overlayWrapper);
|
|
17586
17586
|
}
|
|
17587
17587
|
}
|
|
17588
17588
|
};
|
|
@@ -27751,13 +27751,13 @@ var Pane = function Pane(_ref) {
|
|
|
27751
27751
|
handleOverlayClose = _useOverlay.handleOverlayClose,
|
|
27752
27752
|
setFocusField = _useOverlay.setFocusField;
|
|
27753
27753
|
React$5.useEffect(function () {
|
|
27754
|
-
if (
|
|
27754
|
+
if (hasTransitionCompleted) {
|
|
27755
27755
|
var headerHeight = getHeaderHeight(paneWrapper);
|
|
27756
27756
|
if (headerHeight > DEFAULT_PANE_HEADER_HEIGHT) {
|
|
27757
27757
|
paneWrapper.current.style.setProperty("--neeto-ui-pane-header-height", "".concat(headerHeight, "px"));
|
|
27758
27758
|
}
|
|
27759
27759
|
}
|
|
27760
|
-
}, [
|
|
27760
|
+
}, [hasTransitionCompleted]);
|
|
27761
27761
|
return /*#__PURE__*/React__default["default"].createElement(Portal, {
|
|
27762
27762
|
rootId: "neeto-ui-portal"
|
|
27763
27763
|
}, /*#__PURE__*/React__default["default"].createElement(CSSTransition, {
|
|
@@ -27765,7 +27765,7 @@ var Pane = function Pane(_ref) {
|
|
|
27765
27765
|
appear: isOpen,
|
|
27766
27766
|
classNames: "neeto-ui-pane",
|
|
27767
27767
|
"in": isOpen,
|
|
27768
|
-
timeout:
|
|
27768
|
+
timeout: 230,
|
|
27769
27769
|
onEntered: function onEntered() {
|
|
27770
27770
|
return setHasTransitionCompleted(true);
|
|
27771
27771
|
},
|
|
@@ -27793,9 +27793,9 @@ var Pane = function Pane(_ref) {
|
|
|
27793
27793
|
size: "small",
|
|
27794
27794
|
style: "text",
|
|
27795
27795
|
onClick: handleOverlayClose
|
|
27796
|
-
}), typeof children === "function" ? children({
|
|
27796
|
+
}), hasTransitionCompleted && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, typeof children === "function" ? children({
|
|
27797
27797
|
setFocusField: setFocusField
|
|
27798
|
-
}) : children))));
|
|
27798
|
+
}) : children)))));
|
|
27799
27799
|
};
|
|
27800
27800
|
Pane.Header = Header;
|
|
27801
27801
|
Pane.Body = Body;
|
|
@@ -28053,7 +28053,7 @@ var AsyncCreatableSelect = /*#__PURE__*/React$5.forwardRef(function (props, ref)
|
|
|
28053
28053
|
}, selectProps));
|
|
28054
28054
|
});
|
|
28055
28055
|
|
|
28056
|
-
var _excluded$b = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components"];
|
|
28056
|
+
var _excluded$b = ["size", "label", "required", "error", "helpText", "className", "innerRef", "isCreateable", "strategy", "id", "labelProps", "value", "defaultValue", "components", "optionRemapping"];
|
|
28057
28057
|
function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28058
28058
|
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$7(Object(source), !0).forEach(function (key) { _defineProperty$7(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
28059
28059
|
var SIZES$3 = {
|
|
@@ -28096,6 +28096,8 @@ var Select = function Select(_ref) {
|
|
|
28096
28096
|
value = _ref.value,
|
|
28097
28097
|
defaultValue = _ref.defaultValue,
|
|
28098
28098
|
componentOverrides = _ref.components,
|
|
28099
|
+
_ref$optionRemapping = _ref.optionRemapping,
|
|
28100
|
+
optionRemapping = _ref$optionRemapping === void 0 ? {} : _ref$optionRemapping,
|
|
28099
28101
|
otherProps = _objectWithoutProperties$1(_ref, _excluded$b);
|
|
28100
28102
|
var inputId = useId(id);
|
|
28101
28103
|
var Parent = StateManagedSelect;
|
|
@@ -28105,6 +28107,12 @@ var Select = function Select(_ref) {
|
|
|
28105
28107
|
if (otherProps.loadOptions) {
|
|
28106
28108
|
Parent = isCreateable ? AsyncCreatableSelect : AsyncSelect;
|
|
28107
28109
|
}
|
|
28110
|
+
if (optionRemapping.value) {
|
|
28111
|
+
otherProps.getOptionValue = prop(optionRemapping.value);
|
|
28112
|
+
}
|
|
28113
|
+
if (optionRemapping.label) {
|
|
28114
|
+
otherProps.getOptionLabel = prop(optionRemapping.label);
|
|
28115
|
+
}
|
|
28108
28116
|
var portalProps = strategy === STRATEGIES.fixed && {
|
|
28109
28117
|
menuPortalTarget: document.body,
|
|
28110
28118
|
styles: {
|
|
@@ -32681,9 +32689,16 @@ var Table = function Table(_ref) {
|
|
|
32681
32689
|
}
|
|
32682
32690
|
}
|
|
32683
32691
|
}, [resizeObserver.current, fixedHeight]);
|
|
32692
|
+
var handleHeaderClasses = function handleHeaderClasses() {
|
|
32693
|
+
var _headerRef$current;
|
|
32694
|
+
Object.values((_headerRef$current = headerRef.current) === null || _headerRef$current === void 0 ? void 0 : _headerRef$current.children).forEach(function (child) {
|
|
32695
|
+
child.setAttribute("data-text-align", child.style["text-align"]);
|
|
32696
|
+
});
|
|
32697
|
+
};
|
|
32684
32698
|
useTimeout(function () {
|
|
32685
32699
|
var headerHeight = headerRef.current ? headerRef.current.offsetHeight : TABLE_DEFAULT_HEADER_HEIGHT;
|
|
32686
32700
|
setHeaderHeight(headerHeight);
|
|
32701
|
+
handleHeaderClasses();
|
|
32687
32702
|
}, 0);
|
|
32688
32703
|
var _useReorderColumns = useReorderColumns({
|
|
32689
32704
|
isEnabled: enableColumnReorder,
|
|
@@ -32800,6 +32815,7 @@ var Table = function Table(_ref) {
|
|
|
32800
32815
|
x: "max-content",
|
|
32801
32816
|
y: calculateTableContainerHeight()
|
|
32802
32817
|
}, scroll),
|
|
32818
|
+
onChange: handleHeaderClasses,
|
|
32803
32819
|
onHeaderRow: function onHeaderRow() {
|
|
32804
32820
|
return {
|
|
32805
32821
|
ref: headerRef,
|