@povio/ui 2.3.0-rc.11 → 2.3.0-rc.13

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.
@@ -8,6 +8,7 @@ interface CheckboxBaseProps extends FormFieldErrorProps, CheckboxVariantProps, O
8
8
  ref?: Ref<HTMLLabelElement>;
9
9
  children: string | ReactElement;
10
10
  hideLabel?: boolean;
11
+ fireBlurOnChange?: boolean;
11
12
  selectedIcon?: ComponentType<SVGProps<SVGSVGElement>>;
12
13
  indeterminateIcon?: ComponentType<SVGProps<SVGSVGElement>>;
13
14
  isDirty?: boolean;
@@ -12,72 +12,94 @@ import { mergeRefs } from "@react-aria/utils";
12
12
  import { Controller } from "react-hook-form";
13
13
  //#region src/components/inputs/Checkbox/Checkbox.tsx
14
14
  var CheckboxBase = (props) => {
15
- const $ = c(38);
15
+ const $ = c(46);
16
16
  const ui = UIConfig.useConfig();
17
17
  const checkboxTypographyMap = UIStyle.useMapper("checkbox.typography", checkboxTypography);
18
18
  const checkboxContentClassNameMap = UIStyle.useMapper("checkbox.contentClassName", checkboxContentClassName);
19
19
  let children;
20
20
  let className;
21
21
  let error;
22
+ let fireBlurOnChangeProp;
22
23
  let hideLabelProp;
23
24
  let isDisabled;
25
+ let onBlur;
26
+ let onChange;
24
27
  let rest;
25
28
  let variantProp;
26
29
  if ($[0] !== props) {
27
- ({className, children, isDisabled, error, variant: variantProp, hideLabel: hideLabelProp, ...rest} = props);
30
+ ({className, children, isDisabled, error, variant: variantProp, hideLabel: hideLabelProp, fireBlurOnChange: fireBlurOnChangeProp, onChange, onBlur, ...rest} = props);
28
31
  $[0] = props;
29
32
  $[1] = children;
30
33
  $[2] = className;
31
34
  $[3] = error;
32
- $[4] = hideLabelProp;
33
- $[5] = isDisabled;
34
- $[6] = rest;
35
- $[7] = variantProp;
35
+ $[4] = fireBlurOnChangeProp;
36
+ $[5] = hideLabelProp;
37
+ $[6] = isDisabled;
38
+ $[7] = onBlur;
39
+ $[8] = onChange;
40
+ $[9] = rest;
41
+ $[10] = variantProp;
36
42
  } else {
37
43
  children = $[1];
38
44
  className = $[2];
39
45
  error = $[3];
40
- hideLabelProp = $[4];
41
- isDisabled = $[5];
42
- rest = $[6];
43
- variantProp = $[7];
46
+ fireBlurOnChangeProp = $[4];
47
+ hideLabelProp = $[5];
48
+ isDisabled = $[6];
49
+ onBlur = $[7];
50
+ onChange = $[8];
51
+ rest = $[9];
52
+ variantProp = $[10];
44
53
  }
45
54
  const variant = variantProp ?? ui.checkbox.variant;
46
55
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
56
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.checkbox.fireBlurOnChange;
47
57
  let t0;
48
- if ($[8] !== error || $[9] !== isDisabled) {
58
+ if ($[11] !== error || $[12] !== isDisabled) {
49
59
  t0 = {
50
60
  error,
51
61
  isDisabled
52
62
  };
53
- $[8] = error;
54
- $[9] = isDisabled;
55
- $[10] = t0;
56
- } else t0 = $[10];
63
+ $[11] = error;
64
+ $[12] = isDisabled;
65
+ $[13] = t0;
66
+ } else t0 = $[13];
57
67
  const formFieldErrorProps = t0;
58
- const t1 = !!error;
59
- const t2 = error || void 0;
60
- const t3 = props.isDirty || void 0;
61
- const t4 = props.isRequired || void 0;
62
- let t5;
63
- if ($[11] !== className) {
64
- t5 = clsx("relative", checkboxIndicatorClass, className);
65
- $[11] = className;
66
- $[12] = t5;
67
- } else t5 = $[12];
68
+ let t1;
69
+ if ($[14] !== fireBlurOnChange || $[15] !== onBlur || $[16] !== onChange) {
70
+ t1 = (isSelected) => {
71
+ onChange?.(isSelected);
72
+ if (fireBlurOnChange) onBlur?.({});
73
+ };
74
+ $[14] = fireBlurOnChange;
75
+ $[15] = onBlur;
76
+ $[16] = onChange;
77
+ $[17] = t1;
78
+ } else t1 = $[17];
79
+ const handleChange = t1;
80
+ const t2 = !!error;
81
+ const t3 = error || void 0;
82
+ const t4 = props.isDirty || void 0;
83
+ const t5 = props.isRequired || void 0;
68
84
  let t6;
69
- if ($[13] !== rest || $[14] !== variant) {
70
- t6 = /* @__PURE__ */ jsx(CheckboxCheckmark, {
85
+ if ($[18] !== className) {
86
+ t6 = clsx("relative", checkboxIndicatorClass, className);
87
+ $[18] = className;
88
+ $[19] = t6;
89
+ } else t6 = $[19];
90
+ let t7;
91
+ if ($[20] !== rest || $[21] !== variant) {
92
+ t7 = /* @__PURE__ */ jsx(CheckboxCheckmark, {
71
93
  variant,
72
94
  ...rest
73
95
  });
74
- $[13] = rest;
75
- $[14] = variant;
76
- $[15] = t6;
77
- } else t6 = $[15];
78
- let t7;
79
- if ($[16] !== checkboxContentClassNameMap || $[17] !== checkboxTypographyMap || $[18] !== children || $[19] !== hideLabel || $[20] !== rest || $[21] !== variant) {
80
- t7 = !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
96
+ $[20] = rest;
97
+ $[21] = variant;
98
+ $[22] = t7;
99
+ } else t7 = $[22];
100
+ let t8;
101
+ if ($[23] !== checkboxContentClassNameMap || $[24] !== checkboxTypographyMap || $[25] !== children || $[26] !== hideLabel || $[27] !== rest || $[28] !== variant) {
102
+ t8 = !hideLabel && /* @__PURE__ */ jsx(CheckContent, {
81
103
  typography: checkboxTypographyMap({
82
104
  variant,
83
105
  ...rest
@@ -88,51 +110,53 @@ var CheckboxBase = (props) => {
88
110
  }),
89
111
  children
90
112
  });
91
- $[16] = checkboxContentClassNameMap;
92
- $[17] = checkboxTypographyMap;
93
- $[18] = children;
94
- $[19] = hideLabel;
95
- $[20] = rest;
96
- $[21] = variant;
97
- $[22] = t7;
98
- } else t7 = $[22];
99
- let t8;
100
- if ($[23] !== isDisabled || $[24] !== rest || $[25] !== t1 || $[26] !== t2 || $[27] !== t3 || $[28] !== t4 || $[29] !== t5 || $[30] !== t6 || $[31] !== t7) {
101
- t8 = /* @__PURE__ */ jsxs(Checkbox, {
113
+ $[23] = checkboxContentClassNameMap;
114
+ $[24] = checkboxTypographyMap;
115
+ $[25] = children;
116
+ $[26] = hideLabel;
117
+ $[27] = rest;
118
+ $[28] = variant;
119
+ $[29] = t8;
120
+ } else t8 = $[29];
121
+ let t9;
122
+ if ($[30] !== handleChange || $[31] !== isDisabled || $[32] !== rest || $[33] !== t2 || $[34] !== t3 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6 || $[38] !== t7 || $[39] !== t8) {
123
+ t9 = /* @__PURE__ */ jsxs(Checkbox, {
102
124
  ...rest,
103
125
  isDisabled,
104
- isInvalid: t1,
105
- "aria-errormessage": t2,
106
- "data-is-dirty": t3,
107
- "data-is-required": t4,
108
- className: t5,
109
- children: [t6, t7]
126
+ isInvalid: t2,
127
+ "aria-errormessage": t3,
128
+ "data-is-dirty": t4,
129
+ "data-is-required": t5,
130
+ onChange: handleChange,
131
+ className: t6,
132
+ children: [t7, t8]
110
133
  });
111
- $[23] = isDisabled;
112
- $[24] = rest;
113
- $[25] = t1;
114
- $[26] = t2;
115
- $[27] = t3;
116
- $[28] = t4;
117
- $[29] = t5;
118
- $[30] = t6;
119
- $[31] = t7;
120
- $[32] = t8;
121
- } else t8 = $[32];
122
- let t9;
123
- if ($[33] !== formFieldErrorProps) {
124
- t9 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
125
- $[33] = formFieldErrorProps;
126
- $[34] = t9;
127
- } else t9 = $[34];
134
+ $[30] = handleChange;
135
+ $[31] = isDisabled;
136
+ $[32] = rest;
137
+ $[33] = t2;
138
+ $[34] = t3;
139
+ $[35] = t4;
140
+ $[36] = t5;
141
+ $[37] = t6;
142
+ $[38] = t7;
143
+ $[39] = t8;
144
+ $[40] = t9;
145
+ } else t9 = $[40];
128
146
  let t10;
129
- if ($[35] !== t8 || $[36] !== t9) {
130
- t10 = /* @__PURE__ */ jsxs(Fragment, { children: [t8, t9] });
131
- $[35] = t8;
132
- $[36] = t9;
133
- $[37] = t10;
134
- } else t10 = $[37];
135
- return t10;
147
+ if ($[41] !== formFieldErrorProps) {
148
+ t10 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
149
+ $[41] = formFieldErrorProps;
150
+ $[42] = t10;
151
+ } else t10 = $[42];
152
+ let t11;
153
+ if ($[43] !== t10 || $[44] !== t9) {
154
+ t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t9, t10] });
155
+ $[43] = t10;
156
+ $[44] = t9;
157
+ $[45] = t11;
158
+ } else t11 = $[45];
159
+ return t11;
136
160
  };
137
161
  var Checkbox$1 = (props) => {
138
162
  const $ = c(15);
@@ -267,14 +267,14 @@ var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, ren
267
267
  if (calendarDate === null) return null;
268
268
  const normalizedDate = normalizeByGranularity(calendarDate);
269
269
  if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(normalizedDate);
270
- const date_0 = DateTimeUtils.fromDateValueToLocal(normalizedDate);
271
- return DateTime.fromJSDate(date_0).toISODate();
270
+ const date_0 = DateTimeUtils.fromDateValueToLocal(normalizedDate, "UTC");
271
+ return DateTime.fromJSDate(date_0, { zone: "UTC" }).toISODate();
272
272
  };
273
273
  const parseCalendarDate = (formattedDate) => {
274
274
  if (formattedDate == null) return formattedDate;
275
275
  if (fullIso) return normalizeByGranularity(DateTimeUtils.fromUTCISOToCalendarDate(formattedDate));
276
- const date_1 = DateTime.fromISO(formattedDate).toJSDate();
277
- return normalizeByGranularity(toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date_1)));
276
+ const date_1 = DateTime.fromISO(formattedDate, { zone: "UTC" }).toJSDate();
277
+ return normalizeByGranularity(toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date_1, "UTC")));
278
278
  };
279
279
  const dateLimits = {
280
280
  minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
@@ -590,11 +590,11 @@ var DateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput,
590
590
  start: DateTimeUtils.fromCalendarDateToUTCISO(range.start),
591
591
  end: DateTimeUtils.fromCalendarDateToUTCISO(range.end, { endOfDay: true })
592
592
  };
593
- const startDate = DateTimeUtils.fromDateValueToLocal(range.start);
594
- const endDate = DateTimeUtils.fromDateValueToLocal(range.end);
593
+ const startDate = DateTimeUtils.fromDateValueToLocal(range.start, "UTC");
594
+ const endDate = DateTimeUtils.fromDateValueToLocal(range.end, "UTC");
595
595
  return {
596
- start: DateTime.fromJSDate(startDate).toISODate(),
597
- end: DateTime.fromJSDate(endDate).toISODate()
596
+ start: DateTime.fromJSDate(startDate, { zone: "UTC" }).toISODate(),
597
+ end: DateTime.fromJSDate(endDate, { zone: "UTC" }).toISODate()
598
598
  };
599
599
  };
600
600
  const parseDateRange = (formattedRange) => {
@@ -603,10 +603,10 @@ var DateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput,
603
603
  start: DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.start),
604
604
  end: DateTimeUtils.fromUTCISOToCalendarDate(formattedRange.end)
605
605
  };
606
- const startDate_0 = DateTime.fromISO(formattedRange.start).toJSDate();
607
- const endDate_0 = DateTime.fromISO(formattedRange.end).toJSDate();
608
- const startZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(startDate_0);
609
- const endZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(endDate_0);
606
+ const startDate_0 = DateTime.fromISO(formattedRange.start, { zone: "UTC" }).toJSDate();
607
+ const endDate_0 = DateTime.fromISO(formattedRange.end, { zone: "UTC" }).toJSDate();
608
+ const startZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(startDate_0, "UTC");
609
+ const endZonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(endDate_0, "UTC");
610
610
  return {
611
611
  start: toCalendarDate(startZonedDateTime),
612
612
  end: toCalendarDate(endZonedDateTime)
@@ -615,8 +615,8 @@ var DateRangePicker = ({ fullIso = true, minValue, maxValue, renderStaticInput,
615
615
  const parseCalendarDate = (formattedDate) => {
616
616
  if (formattedDate == null) return formattedDate;
617
617
  if (fullIso) return DateTimeUtils.fromUTCISOToCalendarDate(formattedDate);
618
- const date = DateTime.fromISO(formattedDate).toJSDate();
619
- return toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date));
618
+ const date = DateTime.fromISO(formattedDate, { zone: "UTC" }).toJSDate();
619
+ return toCalendarDate(DateTimeUtils.fromLocalToZonedDateTime(date, "UTC"));
620
620
  };
621
621
  const dateLimits = {
622
622
  minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
@@ -19,12 +19,12 @@ import { useEffect, useImperativeHandle, useMemo, useRef, useState } from "react
19
19
  import { useDatePicker, useLocale } from "react-aria";
20
20
  import { mergeRefs } from "@react-aria/utils";
21
21
  import { Controller, useWatch } from "react-hook-form";
22
- import { Time, createCalendar, getLocalTimeZone, now, toCalendarDateTime, today } from "@internationalized/date";
22
+ import { Time, createCalendar, now, toCalendarDateTime, today } from "@internationalized/date";
23
23
  import { useCalendarState, useDatePickerState } from "react-stately";
24
24
  //#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
25
25
  var DateTimePickerBase = (props) => {
26
26
  const ui = UIConfig.useConfig();
27
- const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone, autoFixYear: autoFixYearProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
27
+ const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: _timeZone, autoFixYear: autoFixYearProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
28
28
  const hideLabel = hideLabelProp ?? ui.input.hideLabel;
29
29
  const variant = variantProp ?? ui.input.variant;
30
30
  const as = asProp ?? ui.input.as;
@@ -38,8 +38,7 @@ var DateTimePickerBase = (props) => {
38
38
  const shouldUpdateDateOnMonthYearChange = shouldUpdateDateOnMonthYearChangeProp ?? ui.dateInput.shouldUpdateDateOnMonthYearChange;
39
39
  const autoFixYear = autoFixYearProp ?? ui.dateInput.autoFixYear;
40
40
  const setDateValueOnDateSelection = setDateValueOnDateSelectionProp ?? ui.dateInput.setDateValueOnDateSelection;
41
- let effectiveTimeZone = getLocalTimeZone();
42
- if (timeZone) effectiveTimeZone = timeZone;
41
+ const effectiveTimeZone = "UTC";
43
42
  const formFieldProps = {
44
43
  error,
45
44
  label,
@@ -85,7 +84,7 @@ var DateTimePickerBase = (props) => {
85
84
  onChange: (val_0) => {
86
85
  onChange?.(val_0);
87
86
  dialogState.setValue(val_0);
88
- calendarState.setFocusedDate(val_0 || today(getLocalTimeZone()));
87
+ calendarState.setFocusedDate(val_0 || today(effectiveTimeZone));
89
88
  debouncedBlur(val_0);
90
89
  },
91
90
  shouldCloseOnSelect: false,
@@ -257,8 +256,7 @@ var DateTimePicker = ({ fullIso = true, renderStaticInput, ...props }) => {
257
256
  let isFormControlDisabled = false;
258
257
  if ("formControl" in props && props.formControl) isFormControlDisabled = !!props.formControl.control._options?.disabled;
259
258
  const rawValue = watchedValue ?? props.value ?? null;
260
- let effectiveTimeZone = getLocalTimeZone();
261
- if (props.timeZone) effectiveTimeZone = props.timeZone;
259
+ const effectiveTimeZone = "UTC";
262
260
  const formatDateValue = (dateValue) => {
263
261
  if (dateValue === null) return null;
264
262
  if (fullIso) return DateTimeUtils.fromDateValueToISO(dateValue, effectiveTimeZone);
@@ -17,7 +17,7 @@ import { useEffect, useRef, useState } from "react";
17
17
  import { useLocale, useTimeField } from "react-aria";
18
18
  import { mergeRefs } from "@react-aria/utils";
19
19
  import { Controller, useWatch } from "react-hook-form";
20
- import { getLocalTimeZone, now, toTime } from "@internationalized/date";
20
+ import { now, toTime } from "@internationalized/date";
21
21
  import { DateTime } from "luxon";
22
22
  import { useTimeFieldState } from "react-stately";
23
23
  //#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
@@ -415,8 +415,7 @@ var TimePickerBase = (props) => {
415
415
  };
416
416
  var TimePicker = ({ renderStaticInput, ...props }) => {
417
417
  const ui = UIConfig.useConfig();
418
- let effectiveTimeZone = getLocalTimeZone();
419
- if (props.timeZone) effectiveTimeZone = props.timeZone;
418
+ const effectiveTimeZone = "UTC";
420
419
  const { locale } = useLocale();
421
420
  const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
422
421
  const inputRef = useRef(null);
@@ -14,6 +14,7 @@ interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVari
14
14
  isDirty?: boolean;
15
15
  inputClassName?: string;
16
16
  labelClassName?: string;
17
+ fireBlurOnChange?: boolean;
17
18
  }
18
19
  export interface RadioGroupProps extends RadioGroupBaseProps {
19
20
  }
@@ -15,7 +15,7 @@ import { mergeRefs } from "@react-aria/utils";
15
15
  import { Controller } from "react-hook-form";
16
16
  //#region src/components/inputs/RadioGroup/RadioGroup.tsx
17
17
  var RadioGroupBase = (props) => {
18
- const $ = c(91);
18
+ const $ = c(96);
19
19
  const ui = UIConfig.useConfig();
20
20
  const radioCva = UIStyle.useCva("radio.cva", radio);
21
21
  const radioContentWrapperCva = UIStyle.useCva("radio.contentWrapperCva", radioContentWrapper);
@@ -24,11 +24,12 @@ var RadioGroupBase = (props) => {
24
24
  const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
25
25
  const radioTypographyMap = UIStyle.useMapper("radio.typography", radioTypography);
26
26
  const radioContentClassNameMap = UIStyle.useMapper("radio.contentClassName", radioContentClassName);
27
- const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
27
+ const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
28
28
  const as = asProp ?? ui.input.as;
29
29
  const size = sizeProp ?? ui.input.size;
30
30
  const variant = variantProp ?? ui.radioGroup.variant;
31
31
  const hideLabel = hideLabelProp ?? ui.radioGroup.hideLabel;
32
+ const fireBlurOnChange = fireBlurOnChangeProp ?? ui.radioGroup.fireBlurOnChange;
32
33
  const radioClassName = radioCva({
33
34
  variant,
34
35
  ...rest
@@ -108,42 +109,54 @@ var RadioGroupBase = (props) => {
108
109
  const headerProps = t4;
109
110
  const selectedValue = value ?? defaultValue;
110
111
  const shouldRenderInputFrame = as !== "default";
112
+ let t5;
113
+ if ($[25] !== fireBlurOnChange || $[26] !== onBlur || $[27] !== onChange) {
114
+ t5 = (nextValue) => {
115
+ onChange?.(nextValue);
116
+ if (fireBlurOnChange) onBlur?.({});
117
+ };
118
+ $[25] = fireBlurOnChange;
119
+ $[26] = onBlur;
120
+ $[27] = onChange;
121
+ $[28] = t5;
122
+ } else t5 = $[28];
123
+ const handleChange = t5;
111
124
  const T0 = TooltipWrapper;
112
- const t5 = as === "inline" ? -1 : void 0;
125
+ const t6 = as === "inline" ? -1 : void 0;
113
126
  const T1 = RadioGroup;
114
- const t6 = !!error;
115
- const t7 = isDirty || void 0;
116
- const t8 = isRequired || void 0;
127
+ const t7 = !!error;
128
+ const t8 = isDirty || void 0;
129
+ const t9 = isRequired || void 0;
117
130
  const T2 = FormField;
118
- const t9 = as === "inline" && "h-full";
119
- let t10;
120
- if ($[25] !== className || $[26] !== t9) {
121
- t10 = clsx("w-full", t9, className);
122
- $[25] = className;
123
- $[26] = t9;
124
- $[27] = t10;
125
- } else t10 = $[27];
126
- const t11 = as === "inline" ? -1 : void 0;
127
- let t12;
128
- if ($[28] !== as || $[29] !== inputBaseCva || $[30] !== inputClassName || $[31] !== shouldRenderInputFrame || $[32] !== ui) {
129
- t12 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
131
+ const t10 = as === "inline" && "h-full";
132
+ let t11;
133
+ if ($[29] !== className || $[30] !== t10) {
134
+ t11 = clsx("w-full", t10, className);
135
+ $[29] = className;
136
+ $[30] = t10;
137
+ $[31] = t11;
138
+ } else t11 = $[31];
139
+ const t12 = as === "inline" ? -1 : void 0;
140
+ let t13;
141
+ if ($[32] !== as || $[33] !== inputBaseCva || $[34] !== inputClassName || $[35] !== shouldRenderInputFrame || $[36] !== ui) {
142
+ t13 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
130
143
  variant: ui.input.variant,
131
144
  as
132
145
  }), inputClassName);
133
- $[28] = as;
134
- $[29] = inputBaseCva;
135
- $[30] = inputClassName;
136
- $[31] = shouldRenderInputFrame;
137
- $[32] = ui;
138
- $[33] = t12;
139
- } else t12 = $[33];
140
- const t13 = "";
141
- const t14 = isDisabled || void 0;
146
+ $[32] = as;
147
+ $[33] = inputBaseCva;
148
+ $[34] = inputClassName;
149
+ $[35] = shouldRenderInputFrame;
150
+ $[36] = ui;
151
+ $[37] = t13;
152
+ } else t13 = $[37];
153
+ const t14 = "";
142
154
  const t15 = isDisabled || void 0;
143
- const t16 = !!error || void 0;
144
- const t17 = selectedValue != null && selectedValue !== "" ? true : void 0;
145
- const t18 = "";
146
- const t19 = clsx(radioContentWrapperCva({
155
+ const t16 = isDisabled || void 0;
156
+ const t17 = !!error || void 0;
157
+ const t18 = selectedValue != null && selectedValue !== "" ? true : void 0;
158
+ const t19 = "";
159
+ const t20 = clsx(radioContentWrapperCva({
147
160
  variant,
148
161
  as,
149
162
  hasInputFrame: shouldRenderInputFrame,
@@ -152,31 +165,31 @@ var RadioGroupBase = (props) => {
152
165
  as,
153
166
  size
154
167
  }));
155
- const t20 = isDirty || void 0;
156
- const t21 = isRequired || void 0;
157
- let t22;
158
- if ($[34] !== as || $[35] !== headerProps || $[36] !== size) {
159
- t22 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
168
+ const t21 = isDirty || void 0;
169
+ const t22 = isRequired || void 0;
170
+ let t23;
171
+ if ($[38] !== as || $[39] !== headerProps || $[40] !== size) {
172
+ t23 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
160
173
  as,
161
174
  size,
162
175
  ...headerProps
163
176
  });
164
- $[34] = as;
165
- $[35] = headerProps;
166
- $[36] = size;
167
- $[37] = t22;
168
- } else t22 = $[37];
169
- const t23 = radioContentRowCva({
177
+ $[38] = as;
178
+ $[39] = headerProps;
179
+ $[40] = size;
180
+ $[41] = t23;
181
+ } else t23 = $[41];
182
+ const t24 = radioContentRowCva({
170
183
  variant,
171
184
  as,
172
185
  hasInputFrame: shouldRenderInputFrame,
173
186
  ...rest
174
187
  });
175
- let t24;
176
- if ($[38] !== labelClassName || $[39] !== options || $[40] !== radioClassName || $[41] !== radioContentClassNameValue || $[42] !== radioTypographyProps) {
177
- let t25;
178
- if ($[44] !== labelClassName || $[45] !== radioClassName || $[46] !== radioContentClassNameValue || $[47] !== radioTypographyProps) {
179
- t25 = (option) => /* @__PURE__ */ jsxs(Radio, {
188
+ let t25;
189
+ if ($[42] !== labelClassName || $[43] !== options || $[44] !== radioClassName || $[45] !== radioContentClassNameValue || $[46] !== radioTypographyProps) {
190
+ let t26;
191
+ if ($[48] !== labelClassName || $[49] !== radioClassName || $[50] !== radioContentClassNameValue || $[51] !== radioTypographyProps) {
192
+ t26 = (option) => /* @__PURE__ */ jsxs(Radio, {
180
193
  value: option.value,
181
194
  className: clsx("relative", radioIndicatorClass),
182
195
  children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
@@ -186,127 +199,129 @@ var RadioGroupBase = (props) => {
186
199
  children: option.label
187
200
  })]
188
201
  }, option.value);
189
- $[44] = labelClassName;
190
- $[45] = radioClassName;
191
- $[46] = radioContentClassNameValue;
192
- $[47] = radioTypographyProps;
193
- $[48] = t25;
194
- } else t25 = $[48];
195
- t24 = options.map(t25);
196
- $[38] = labelClassName;
197
- $[39] = options;
198
- $[40] = radioClassName;
199
- $[41] = radioContentClassNameValue;
200
- $[42] = radioTypographyProps;
201
- $[43] = t24;
202
- } else t24 = $[43];
203
- let t25;
204
- if ($[49] !== t23 || $[50] !== t24) {
205
- t25 = /* @__PURE__ */ jsx("div", {
206
- className: t23,
207
- children: t24
208
- });
209
- $[49] = t23;
210
- $[50] = t24;
211
- $[51] = t25;
212
- } else t25 = $[51];
202
+ $[48] = labelClassName;
203
+ $[49] = radioClassName;
204
+ $[50] = radioContentClassNameValue;
205
+ $[51] = radioTypographyProps;
206
+ $[52] = t26;
207
+ } else t26 = $[52];
208
+ t25 = options.map(t26);
209
+ $[42] = labelClassName;
210
+ $[43] = options;
211
+ $[44] = radioClassName;
212
+ $[45] = radioContentClassNameValue;
213
+ $[46] = radioTypographyProps;
214
+ $[47] = t25;
215
+ } else t25 = $[47];
213
216
  let t26;
214
- if ($[52] !== t19 || $[53] !== t20 || $[54] !== t21 || $[55] !== t22 || $[56] !== t25) {
215
- t26 = /* @__PURE__ */ jsxs("div", {
216
- className: t19,
217
- "data-is-dirty": t20,
218
- "data-is-required": t21,
219
- children: [t22, t25]
217
+ if ($[53] !== t24 || $[54] !== t25) {
218
+ t26 = /* @__PURE__ */ jsx("div", {
219
+ className: t24,
220
+ children: t25
220
221
  });
221
- $[52] = t19;
222
- $[53] = t20;
223
- $[54] = t21;
224
- $[55] = t22;
225
- $[56] = t25;
226
- $[57] = t26;
227
- } else t26 = $[57];
222
+ $[53] = t24;
223
+ $[54] = t25;
224
+ $[55] = t26;
225
+ } else t26 = $[55];
228
226
  let t27;
229
- if ($[58] !== t12 || $[59] !== t14 || $[60] !== t15 || $[61] !== t16 || $[62] !== t17 || $[63] !== t26) {
230
- t27 = /* @__PURE__ */ jsx("div", {
231
- className: t12,
232
- "data-rac": t13,
233
- "data-disabled": t14,
234
- "data-is-disabled": t15,
235
- "data-invalid": t16,
236
- "data-has-selection": t17,
237
- "data-radio-group-content": t18,
238
- children: t26
227
+ if ($[56] !== t20 || $[57] !== t21 || $[58] !== t22 || $[59] !== t23 || $[60] !== t26) {
228
+ t27 = /* @__PURE__ */ jsxs("div", {
229
+ className: t20,
230
+ "data-is-dirty": t21,
231
+ "data-is-required": t22,
232
+ children: [t23, t26]
239
233
  });
240
- $[58] = t12;
241
- $[59] = t14;
242
- $[60] = t15;
243
- $[61] = t16;
244
- $[62] = t17;
245
- $[63] = t26;
246
- $[64] = t27;
247
- } else t27 = $[64];
234
+ $[56] = t20;
235
+ $[57] = t21;
236
+ $[58] = t22;
237
+ $[59] = t23;
238
+ $[60] = t26;
239
+ $[61] = t27;
240
+ } else t27 = $[61];
248
241
  let t28;
249
- if ($[65] !== T2 || $[66] !== as || $[67] !== formFieldProps || $[68] !== labelProps || $[69] !== t10 || $[70] !== t11 || $[71] !== t27) {
250
- t28 = /* @__PURE__ */ jsx(T2, {
242
+ if ($[62] !== t13 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t27) {
243
+ t28 = /* @__PURE__ */ jsx("div", {
244
+ className: t13,
245
+ "data-rac": t14,
246
+ "data-disabled": t15,
247
+ "data-is-disabled": t16,
248
+ "data-invalid": t17,
249
+ "data-has-selection": t18,
250
+ "data-radio-group-content": t19,
251
+ children: t27
252
+ });
253
+ $[62] = t13;
254
+ $[63] = t15;
255
+ $[64] = t16;
256
+ $[65] = t17;
257
+ $[66] = t18;
258
+ $[67] = t27;
259
+ $[68] = t28;
260
+ } else t28 = $[68];
261
+ let t29;
262
+ if ($[69] !== T2 || $[70] !== as || $[71] !== formFieldProps || $[72] !== labelProps || $[73] !== t11 || $[74] !== t12 || $[75] !== t28) {
263
+ t29 = /* @__PURE__ */ jsx(T2, {
251
264
  ...formFieldProps,
252
265
  as,
253
266
  labelProps,
254
- className: t10,
255
- tabIndex: t11,
256
- children: t27
267
+ className: t11,
268
+ tabIndex: t12,
269
+ children: t28
257
270
  });
258
- $[65] = T2;
259
- $[66] = as;
260
- $[67] = formFieldProps;
261
- $[68] = labelProps;
262
- $[69] = t10;
263
- $[70] = t11;
264
- $[71] = t27;
265
- $[72] = t28;
266
- } else t28 = $[72];
267
- let t29;
268
- if ($[73] !== T1 || $[74] !== defaultValue || $[75] !== fieldProps || $[76] !== isDisabled || $[77] !== ref || $[78] !== rest || $[79] !== t28 || $[80] !== t6 || $[81] !== t7 || $[82] !== t8 || $[83] !== value) {
269
- t29 = /* @__PURE__ */ jsx(T1, {
271
+ $[69] = T2;
272
+ $[70] = as;
273
+ $[71] = formFieldProps;
274
+ $[72] = labelProps;
275
+ $[73] = t11;
276
+ $[74] = t12;
277
+ $[75] = t28;
278
+ $[76] = t29;
279
+ } else t29 = $[76];
280
+ let t30;
281
+ if ($[77] !== T1 || $[78] !== defaultValue || $[79] !== fieldProps || $[80] !== handleChange || $[81] !== isDisabled || $[82] !== ref || $[83] !== rest || $[84] !== t29 || $[85] !== t7 || $[86] !== t8 || $[87] !== t9 || $[88] !== value) {
282
+ t30 = /* @__PURE__ */ jsx(T1, {
270
283
  ...rest,
271
284
  ...fieldProps,
272
285
  ref,
273
286
  value,
274
287
  defaultValue,
288
+ onChange: handleChange,
275
289
  isDisabled,
276
- isInvalid: t6,
277
- "data-is-dirty": t7,
278
- "data-is-required": t8,
279
- children: t28
290
+ isInvalid: t7,
291
+ "data-is-dirty": t8,
292
+ "data-is-required": t9,
293
+ children: t29
280
294
  });
281
- $[73] = T1;
282
- $[74] = defaultValue;
283
- $[75] = fieldProps;
284
- $[76] = isDisabled;
285
- $[77] = ref;
286
- $[78] = rest;
287
- $[79] = t28;
288
- $[80] = t6;
289
- $[81] = t7;
290
- $[82] = t8;
291
- $[83] = value;
295
+ $[77] = T1;
296
+ $[78] = defaultValue;
297
+ $[79] = fieldProps;
298
+ $[80] = handleChange;
299
+ $[81] = isDisabled;
300
+ $[82] = ref;
301
+ $[83] = rest;
292
302
  $[84] = t29;
293
- } else t29 = $[84];
294
- let t30;
295
- if ($[85] !== T0 || $[86] !== as || $[87] !== error || $[88] !== t29 || $[89] !== t5) {
296
- t30 = /* @__PURE__ */ jsx(T0, {
303
+ $[85] = t7;
304
+ $[86] = t8;
305
+ $[87] = t9;
306
+ $[88] = value;
307
+ $[89] = t30;
308
+ } else t30 = $[89];
309
+ let t31;
310
+ if ($[90] !== T0 || $[91] !== as || $[92] !== error || $[93] !== t30 || $[94] !== t6) {
311
+ t31 = /* @__PURE__ */ jsx(T0, {
297
312
  as,
298
313
  error,
299
- triggerTabIndex: t5,
300
- children: t29
314
+ triggerTabIndex: t6,
315
+ children: t30
301
316
  });
302
- $[85] = T0;
303
- $[86] = as;
304
- $[87] = error;
305
- $[88] = t29;
306
- $[89] = t5;
307
- $[90] = t30;
308
- } else t30 = $[90];
309
- return t30;
317
+ $[90] = T0;
318
+ $[91] = as;
319
+ $[92] = error;
320
+ $[93] = t30;
321
+ $[94] = t6;
322
+ $[95] = t31;
323
+ } else t31 = $[95];
324
+ return t31;
310
325
  };
311
326
  var RadioGroup$1 = (props) => {
312
327
  const $ = c(15);
@@ -23,8 +23,8 @@ export declare namespace UIConfig {
23
23
  input: Pick<TextInputProps, "variant" | "isClearable" | "hideLabel" | "as" | "size">;
24
24
  button: Pick<ButtonProps, "variant" | "size">;
25
25
  numberInput: Pick<NumberInputProps, "formatOptions">;
26
- radioGroup: Pick<RadioGroupProps, "variant" | "hideLabel">;
27
- checkbox: Pick<CheckboxProps, "variant">;
26
+ radioGroup: Pick<RadioGroupProps, "variant" | "hideLabel" | "fireBlurOnChange">;
27
+ checkbox: Pick<CheckboxProps, "variant" | "fireBlurOnChange">;
28
28
  select: Pick<SelectBaseProps, "selectionMode" | "isSearchable" | "collapseAfter" | "selectedTagsType" | "hideSearchIcon" | "fireBlurOnChange">;
29
29
  queryAutocomplete: {
30
30
  isInitialQueryDisabled?: boolean;
@@ -28,9 +28,13 @@ var UIConfig;
28
28
  } },
29
29
  radioGroup: {
30
30
  variant: "default",
31
- hideLabel: false
31
+ hideLabel: false,
32
+ fireBlurOnChange: false
33
+ },
34
+ checkbox: {
35
+ variant: "default",
36
+ fireBlurOnChange: false
32
37
  },
33
- checkbox: { variant: "default" },
34
38
  select: {
35
39
  selectionMode: "single",
36
40
  isSearchable: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.3.0-rc.11",
3
+ "version": "2.3.0-rc.13",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",