@gympass/yoga 7.129.1 → 7.129.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.
@@ -127,7 +127,7 @@ const Phone = import_react.default.forwardRef(
127
127
  };
128
128
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
129
129
  import_Input.default,
130
- __spreadProps(__spreadValues({}, __spreadValues({
130
+ __spreadProps(__spreadValues({}, {
131
131
  disabled,
132
132
  readOnly,
133
133
  error,
@@ -135,17 +135,17 @@ const Phone = import_react.default.forwardRef(
135
135
  helper,
136
136
  value,
137
137
  cleanable
138
- }, rest)), {
138
+ }), {
139
139
  ref: inputRef,
140
140
  label: "",
141
141
  onClean: (phoneNumber) => onChange(phoneNumber),
142
142
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(S.Container, { error, disabled, full, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
143
143
  import_react_phone_input_2.default,
144
- __spreadProps(__spreadValues({}, availableCountries), {
144
+ __spreadProps(__spreadValues(__spreadValues({}, availableCountries), rest), {
145
145
  ref: (phoneRef) => {
146
146
  inputRef.current = phoneRef == null ? void 0 : phoneRef.numberInputRef;
147
147
  },
148
- inputProps: { readOnly },
148
+ inputProps: __spreadProps(__spreadValues({}, rest.inputProps), { readOnly }),
149
149
  disabled,
150
150
  disableDropdown: readOnly,
151
151
  country: defaultCountry,
@@ -113,6 +113,16 @@ describe("<Input.Phone />", () => {
113
113
  import_react2.fireEvent.click(getAllByRole("button")[0]);
114
114
  expect(getAllByRole("option").length).toBe(12);
115
115
  });
116
+ it(`Should call onblur event`, () => {
117
+ const USPhone = numbersFormats[1];
118
+ const onBlur = jest.fn();
119
+ const { getAllByRole } = (0, import_react2.render)(
120
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Input.Phone, { onBlur, countries: [], value: USPhone.base }) })
121
+ );
122
+ const inputPhone = getAllByRole("textbox")[0];
123
+ import_react2.fireEvent.blur(inputPhone);
124
+ expect(onBlur).toHaveBeenCalled();
125
+ });
116
126
  it("should prefix the phone number with newly selected country dial code", () => __async(exports, null, function* () {
117
127
  const { getByRole, getByText, getByDisplayValue } = (0, import_react2.render)(
118
128
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Input.Phone, { defaultCountry: "us" }) })
@@ -96,7 +96,7 @@ const Phone = React.forwardRef(
96
96
  };
97
97
  return /* @__PURE__ */ jsx(
98
98
  Input,
99
- __spreadProps(__spreadValues({}, __spreadValues({
99
+ __spreadProps(__spreadValues({}, {
100
100
  disabled,
101
101
  readOnly,
102
102
  error,
@@ -104,17 +104,17 @@ const Phone = React.forwardRef(
104
104
  helper,
105
105
  value,
106
106
  cleanable
107
- }, rest)), {
107
+ }), {
108
108
  ref: inputRef,
109
109
  label: "",
110
110
  onClean: (phoneNumber) => onChange(phoneNumber),
111
111
  children: /* @__PURE__ */ jsx(S.Container, { error, disabled, full, children: /* @__PURE__ */ jsx(
112
112
  BasePhoneInput,
113
- __spreadProps(__spreadValues({}, availableCountries), {
113
+ __spreadProps(__spreadValues(__spreadValues({}, availableCountries), rest), {
114
114
  ref: (phoneRef) => {
115
115
  inputRef.current = phoneRef == null ? void 0 : phoneRef.numberInputRef;
116
116
  },
117
- inputProps: { readOnly },
117
+ inputProps: __spreadProps(__spreadValues({}, rest.inputProps), { readOnly }),
118
118
  disabled,
119
119
  disableDropdown: readOnly,
120
120
  country: defaultCountry,
@@ -96,6 +96,16 @@ var require_Phone_test = __commonJS({
96
96
  fireEvent.click(getAllByRole("button")[0]);
97
97
  expect(getAllByRole("option").length).toBe(12);
98
98
  });
99
+ it(`Should call onblur event`, () => {
100
+ const USPhone = numbersFormats[1];
101
+ const onBlur = jest.fn();
102
+ const { getAllByRole } = render(
103
+ /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input.Phone, { onBlur, countries: [], value: USPhone.base }) })
104
+ );
105
+ const inputPhone = getAllByRole("textbox")[0];
106
+ fireEvent.blur(inputPhone);
107
+ expect(onBlur).toHaveBeenCalled();
108
+ });
99
109
  it("should prefix the phone number with newly selected country dial code", () => __async(exports, null, function* () {
100
110
  const { getByRole, getByText, getByDisplayValue } = render(
101
111
  /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Input.Phone, { defaultCountry: "us" }) })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.129.1",
3
+ "version": "7.129.2",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "types": "./typings/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "react-native": "0.72.3",
60
60
  "styled-components": "^4.4.0"
61
61
  },
62
- "gitHead": "a6ff1cf68245808edee7bbe019c5c1e9c2258cfc",
62
+ "gitHead": "80d9a26eac0590d41b55997aff7d267fb259e499",
63
63
  "module": "./esm",
64
64
  "private": false,
65
65
  "react-native": "./cjs/index.native.js"