@moda/om 15.9.0 → 15.10.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [15.10.0](https://github.com/ModaOperandi/om/compare/v15.9.0...v15.10.0) (2021-10-12)
7
+
8
+
9
+ ### Features
10
+
11
+ * **password-input:** forwarded the input ref ([#2069](https://github.com/ModaOperandi/om/issues/2069)) ([a015c01](https://github.com/ModaOperandi/om/commit/a015c0164c26ff5d243b7735f2a142b80a87dcb6))
12
+
6
13
  # [15.9.0](https://github.com/ModaOperandi/om/compare/v15.8.0...v15.9.0) (2021-09-30)
7
14
 
8
15
 
@@ -2,4 +2,6 @@ import React from 'react';
2
2
  import { FieldProps } from '../Field';
3
3
  import './PasswordInput.scss';
4
4
  export declare type PasswordInputProps = FieldProps;
5
- export declare const PasswordInput: React.FC<PasswordInputProps>;
5
+ export declare const PasswordInput: React.ForwardRefExoticComponent<import("..").InputProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> & {
6
+ children?: JSX.Element | undefined;
7
+ } & React.RefAttributes<HTMLInputElement>>;
package/dist/index.cjs.js CHANGED
@@ -4244,7 +4244,8 @@ var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, no
4244
4244
 
4245
4245
  target = target.parentNode;
4246
4246
  } while ( // portaled content
4247
- !targetInLock && target !== document.body || targetInLock && (endTarget.contains(target) || endTarget === target));
4247
+ !targetInLock && target !== document.body || // self content
4248
+ targetInLock && (endTarget.contains(target) || endTarget === target));
4248
4249
 
4249
4250
  if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {
4250
4251
  shouldCancelScroll = true;
@@ -11582,7 +11583,7 @@ var VerticalDivider = function VerticalDivider(_ref) {
11582
11583
  }, rest));
11583
11584
  };
11584
11585
 
11585
- var PasswordInput = function PasswordInput(_ref) {
11586
+ var PasswordInput = /*#__PURE__*/React$2.forwardRef(function (_ref, ref) {
11586
11587
  var rest = _extends$3({}, _ref);
11587
11588
 
11588
11589
  var _useState = React$2.useState(false),
@@ -11598,7 +11599,9 @@ var PasswordInput = function PasswordInput(_ref) {
11598
11599
  className: "PasswordInput"
11599
11600
  }, /*#__PURE__*/React__default["default"].createElement(Field, _extends$3({
11600
11601
  type: passwordShown ? 'text' : 'password'
11601
- }, rest)), /*#__PURE__*/React__default["default"].createElement(Clickable, {
11602
+ }, rest, {
11603
+ ref: ref
11604
+ })), /*#__PURE__*/React__default["default"].createElement(Clickable, {
11602
11605
  className: "PasswordInput__password-action",
11603
11606
  onClick: togglePasswordVisiblity,
11604
11607
  type: "button"
@@ -11607,7 +11610,8 @@ var PasswordInput = function PasswordInput(_ref) {
11607
11610
  }, "HIDE") : /*#__PURE__*/React__default["default"].createElement(Text, {
11608
11611
  treatment: "eyebrow"
11609
11612
  }, "SHOW")));
11610
- };
11613
+ });
11614
+ PasswordInput.displayName = 'PasswordInput';
11611
11615
 
11612
11616
  var isRenderProps = function isRenderProps(children) {
11613
11617
  return typeof children === 'function';