@povio/ui 2.3.0-rc.18 → 2.3.0-rc.19

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.
@@ -14,8 +14,8 @@ import { Button } from "react-aria-components";
14
14
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
15
15
  //#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
16
16
  var TimePickerInput = (t0) => {
17
- const $ = c(65);
18
- const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, ...props } = t0;
17
+ const $ = c(66);
18
+ const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, fireBlurOnChange, ...props } = t0;
19
19
  const uiConfig = UIConfig.useConfig();
20
20
  const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
21
21
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
@@ -137,22 +137,23 @@ var TimePickerInput = (t0) => {
137
137
  $[30] = t21;
138
138
  } else t21 = $[30];
139
139
  let t22;
140
- if ($[31] !== canClear || $[32] !== fieldProps || $[33] !== isClearable || $[34] !== state) {
140
+ if ($[31] !== canClear || $[32] !== fieldProps || $[33] !== fireBlurOnChange || $[34] !== isClearable || $[35] !== state) {
141
141
  t22 = isClearable && /* @__PURE__ */ jsx(InputClear, {
142
142
  onClear: () => {
143
143
  state.setValue(null);
144
- fieldProps.onBlur?.(null);
144
+ if (fireBlurOnChange) fieldProps.onBlur?.(null);
145
145
  },
146
146
  show: canClear
147
147
  });
148
148
  $[31] = canClear;
149
149
  $[32] = fieldProps;
150
- $[33] = isClearable;
151
- $[34] = state;
152
- $[35] = t22;
153
- } else t22 = $[35];
150
+ $[33] = fireBlurOnChange;
151
+ $[34] = isClearable;
152
+ $[35] = state;
153
+ $[36] = t22;
154
+ } else t22 = $[36];
154
155
  let t23;
155
- if ($[36] !== disableDropdown || $[37] !== disableManualEntry || $[38] !== isDisabled || $[39] !== onPress || $[40] !== uiConfig) {
156
+ if ($[37] !== disableDropdown || $[38] !== disableManualEntry || $[39] !== isDisabled || $[40] !== onPress || $[41] !== uiConfig) {
156
157
  t23 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
157
158
  label: "",
158
159
  color: "secondary",
@@ -161,26 +162,26 @@ var TimePickerInput = (t0) => {
161
162
  isDisabled,
162
163
  className: "border-0!"
163
164
  });
164
- $[36] = disableDropdown;
165
- $[37] = disableManualEntry;
166
- $[38] = isDisabled;
167
- $[39] = onPress;
168
- $[40] = uiConfig;
169
- $[41] = t23;
170
- } else t23 = $[41];
165
+ $[37] = disableDropdown;
166
+ $[38] = disableManualEntry;
167
+ $[39] = isDisabled;
168
+ $[40] = onPress;
169
+ $[41] = uiConfig;
170
+ $[42] = t23;
171
+ } else t23 = $[42];
171
172
  let t24;
172
- if ($[42] !== t21 || $[43] !== t22 || $[44] !== t23) {
173
+ if ($[43] !== t21 || $[44] !== t22 || $[45] !== t23) {
173
174
  t24 = /* @__PURE__ */ jsxs("div", {
174
175
  className: t21,
175
176
  children: [t22, t23]
176
177
  });
177
- $[42] = t21;
178
- $[43] = t22;
179
- $[44] = t23;
180
- $[45] = t24;
181
- } else t24 = $[45];
178
+ $[43] = t21;
179
+ $[44] = t22;
180
+ $[45] = t23;
181
+ $[46] = t24;
182
+ } else t24 = $[46];
182
183
  let t25;
183
- if ($[46] !== fieldProps || $[47] !== focusWithinProps || $[48] !== hoverProps || $[49] !== ref || $[50] !== t10 || $[51] !== t11 || $[52] !== t12 || $[53] !== t13 || $[54] !== t14 || $[55] !== t15 || $[56] !== t20 || $[57] !== t24 || $[58] !== t4 || $[59] !== t5 || $[60] !== t6 || $[61] !== t7 || $[62] !== t8 || $[63] !== t9) {
184
+ if ($[47] !== fieldProps || $[48] !== focusWithinProps || $[49] !== hoverProps || $[50] !== ref || $[51] !== t10 || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t14 || $[56] !== t15 || $[57] !== t20 || $[58] !== t24 || $[59] !== t4 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== t9) {
184
185
  t25 = /* @__PURE__ */ jsxs("div", {
185
186
  ref,
186
187
  className: t4,
@@ -202,26 +203,26 @@ var TimePickerInput = (t0) => {
202
203
  ...hoverProps,
203
204
  children: [t20, t24]
204
205
  });
205
- $[46] = fieldProps;
206
- $[47] = focusWithinProps;
207
- $[48] = hoverProps;
208
- $[49] = ref;
209
- $[50] = t10;
210
- $[51] = t11;
211
- $[52] = t12;
212
- $[53] = t13;
213
- $[54] = t14;
214
- $[55] = t15;
215
- $[56] = t20;
216
- $[57] = t24;
217
- $[58] = t4;
218
- $[59] = t5;
219
- $[60] = t6;
220
- $[61] = t7;
221
- $[62] = t8;
222
- $[63] = t9;
223
- $[64] = t25;
224
- } else t25 = $[64];
206
+ $[47] = fieldProps;
207
+ $[48] = focusWithinProps;
208
+ $[49] = hoverProps;
209
+ $[50] = ref;
210
+ $[51] = t10;
211
+ $[52] = t11;
212
+ $[53] = t12;
213
+ $[54] = t13;
214
+ $[55] = t14;
215
+ $[56] = t15;
216
+ $[57] = t20;
217
+ $[58] = t24;
218
+ $[59] = t4;
219
+ $[60] = t5;
220
+ $[61] = t6;
221
+ $[62] = t7;
222
+ $[63] = t8;
223
+ $[64] = t9;
224
+ $[65] = t25;
225
+ } else t25 = $[65];
225
226
  return t25;
226
227
  };
227
228
  function _temp(segment) {
@@ -34,7 +34,7 @@ export declare namespace UIConfig {
34
34
  };
35
35
  toggle: Pick<ToggleProps, "variant">;
36
36
  slider: Pick<SliderProps, "minValue" | "maxValue">;
37
- dateInput: Pick<DatePickerProps, "todayIcon" | "todayIconButtonSize" | "todayIconPlacement" | "shouldForceLeadingZeros" | "disableManualEntry" | "shouldUpdateDateOnMonthYearChange" | "granularity" | "autoFixYear"> & {
37
+ dateInput: Pick<DatePickerProps, "todayIcon" | "todayIconButtonSize" | "todayIconPlacement" | "shouldForceLeadingZeros" | "disableManualEntry" | "shouldUpdateDateOnMonthYearChange" | "granularity" | "autoFixYear" | "fireBlurOnChange"> & {
38
38
  calendarIcon?: ReactElement;
39
39
  dateTimeIcon?: ReactElement;
40
40
  timeIcon?: ReactElement;
@@ -57,6 +57,7 @@ var UIConfig;
57
57
  shouldForceLeadingZeros: false,
58
58
  disableManualEntry: false,
59
59
  autoFixYear: false,
60
+ fireBlurOnChange: false,
60
61
  calendarIcon: /* @__PURE__ */ jsx(CalendarIcon, { className: "size-5" }),
61
62
  dateTimeIcon: /* @__PURE__ */ jsx(DateTimeIcon, { className: "size-5" }),
62
63
  timeIcon: /* @__PURE__ */ jsx(ClockIcon, { className: "size-6 text-interactive-text-secondary-idle" }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.3.0-rc.18",
3
+ "version": "2.3.0-rc.19",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",