@transferwise/components 0.0.0-experimental-65c6e3a → 0.0.0-experimental-3b2f02f

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/build/index.js CHANGED
@@ -6144,9 +6144,9 @@ function InputAddon({
6144
6144
  const ref = React.useRef(null);
6145
6145
  useResizeObserver(ref, entry => {
6146
6146
  // TODO: Remove fallback once most browsers support `borderBoxSize`
6147
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
6148
- if (entry.borderBoxSize != null) {
6149
- setInputPadding(entry.borderBoxSize[0].inlineSize);
6147
+ const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;
6148
+ if (inlineSize != null) {
6149
+ setInputPadding(inlineSize);
6150
6150
  } else {
6151
6151
  const targetStyle = getComputedStyle(entry.target);
6152
6152
  setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
package/build/index.mjs CHANGED
@@ -6112,9 +6112,9 @@ function InputAddon({
6112
6112
  const ref = useRef(null);
6113
6113
  useResizeObserver(ref, entry => {
6114
6114
  // TODO: Remove fallback once most browsers support `borderBoxSize`
6115
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
6116
- if (entry.borderBoxSize != null) {
6117
- setInputPadding(entry.borderBoxSize[0].inlineSize);
6115
+ const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;
6116
+ if (inlineSize != null) {
6117
+ setInputPadding(inlineSize);
6118
6118
  } else {
6119
6119
  const targetStyle = getComputedStyle(entry.target);
6120
6120
  setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-65c6e3a",
3
+ "version": "0.0.0-experimental-3b2f02f",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -107,9 +107,9 @@ function InputAddon({
107
107
  const ref = useRef<HTMLSpanElement>(null);
108
108
  useResizeObserver(ref, (entry) => {
109
109
  // TODO: Remove fallback once most browsers support `borderBoxSize`
110
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
111
- if (entry.borderBoxSize != null) {
112
- setInputPadding(entry.borderBoxSize[0].inlineSize);
110
+ const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;
111
+ if (inlineSize != null) {
112
+ setInputPadding(inlineSize);
113
113
  } else {
114
114
  const targetStyle = getComputedStyle(entry.target);
115
115
  setInputPadding(