@povio/ui 3.0.0-rc.2 → 3.0.0-rc.3
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/dist/components/inputs/DateTime/DatePicker/DatePicker.js +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +5 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +126 -124
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +3 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +2 -2
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +3 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +4 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +3 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +2 -2
- package/dist/components/inputs/Input/shared/InputContent.js +2 -2
- package/dist/components/inputs/Inputs/InputItem.d.ts +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +6 -6
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -44
- package/dist/components/inputs/RadioGroup/radio.cva.js +3 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +14 -11
- package/dist/components/inputs/Selection/Select/Select.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +5 -5
- package/dist/components/inputs/Selection/shared/SelectInput.js +89 -87
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +2 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +3 -2
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +6 -3
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +25 -8
- package/dist/components/inputs/Skeleton/InputFrame.js +6 -6
- package/dist/components/inputs/shared/TooltipWrapper.js +2 -2
- package/dist/components/inputs/shared/input.cva.d.ts +0 -54
- package/dist/components/inputs/shared/input.cva.js +3 -5
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +3 -2
- package/dist/components/text/Typography/typography.cva.d.ts +0 -45
- package/dist/components/text/Typography/typography.cva.js +1 -2
- package/dist/config/uiOverrides.context.d.ts +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.js +9 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { Calendar } from "../shared/Calendar.js";
|
|
4
4
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
5
|
-
import {
|
|
5
|
+
import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
|
|
6
6
|
import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
|
|
7
7
|
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
8
8
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
@@ -264,7 +264,7 @@ var DatePickerInner = (t0) => {
|
|
|
264
264
|
const fullIso = t1 === void 0 ? true : t1;
|
|
265
265
|
const granularity = t2 === void 0 ? "day" : t2;
|
|
266
266
|
const ui = UIConfig.useConfig();
|
|
267
|
-
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva",
|
|
267
|
+
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
268
268
|
const { locale } = useLocale();
|
|
269
269
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
270
270
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -3,7 +3,7 @@ import { Typography } from "../../../text/Typography/Typography.js";
|
|
|
3
3
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
6
|
-
import {
|
|
6
|
+
import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
|
|
7
7
|
import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
|
|
8
8
|
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
9
9
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
@@ -692,7 +692,7 @@ var DateRangePickerInner = (t0) => {
|
|
|
692
692
|
const { fullIso: t1, minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
693
693
|
const fullIso = t1 === void 0 ? true : t1;
|
|
694
694
|
const ui = UIConfig.useConfig();
|
|
695
|
-
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva",
|
|
695
|
+
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
696
696
|
const { locale } = useLocale$1();
|
|
697
697
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
698
698
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -22,6 +22,7 @@ interface DateTimePickerBaseProps extends FormFieldProps, InputVariantProps, Omi
|
|
|
22
22
|
setDateValueOnDateSelection?: boolean;
|
|
23
23
|
placeholder?: string;
|
|
24
24
|
inputClassName?: string;
|
|
25
|
+
shouldShrinkInput?: boolean;
|
|
25
26
|
shouldUpdateDateOnMonthYearChange?: boolean;
|
|
26
27
|
timeZone?: string;
|
|
27
28
|
format?: string;
|
|
@@ -2,7 +2,7 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { Calendar } from "../shared/Calendar.js";
|
|
4
4
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
5
|
-
import {
|
|
5
|
+
import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
|
|
6
6
|
import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
|
|
7
7
|
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
8
8
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
@@ -25,7 +25,7 @@ import { useCalendarState, useDatePickerState } from "react-stately";
|
|
|
25
25
|
//#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
|
|
26
26
|
var DateTimePickerBase = (props) => {
|
|
27
27
|
const ui = UIConfig.useConfig();
|
|
28
|
-
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, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: timeZoneProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
|
|
28
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, isTimeOptional, placeholder, inputClassName, shouldShrinkInput, hideLabel: hideLabelProp, variant: variantProp, as: asProp, size: sizeProp, isClearable: isClearableProp, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, timeZone: timeZoneProp, autoFixYear: autoFixYearProp, fireBlurOnChange: fireBlurOnChangeProp, format, setDateValueOnDateSelection: setDateValueOnDateSelectionProp, ...rest } = props;
|
|
29
29
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
30
30
|
const variant = variantProp ?? ui.input.variant;
|
|
31
31
|
const as = asProp ?? ui.input.as;
|
|
@@ -209,6 +209,7 @@ var DateTimePickerBase = (props) => {
|
|
|
209
209
|
variant,
|
|
210
210
|
size,
|
|
211
211
|
isDateTime: true,
|
|
212
|
+
shouldShrinkInput,
|
|
212
213
|
isClearable,
|
|
213
214
|
headerProps,
|
|
214
215
|
todayIcon,
|
|
@@ -256,7 +257,7 @@ var DateTimePickerInner = (t0) => {
|
|
|
256
257
|
const $ = c(9);
|
|
257
258
|
const { fullIso: t1, renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
258
259
|
const ui = UIConfig.useConfig();
|
|
259
|
-
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva",
|
|
260
|
+
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
260
261
|
const { locale } = useLocale();
|
|
261
262
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
262
263
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -309,7 +310,7 @@ var DateTimePickerInner = (t0) => {
|
|
|
309
310
|
...props,
|
|
310
311
|
isDisabled,
|
|
311
312
|
className: clsx("group relative inline-flex w-full flex-col text-left", props.className),
|
|
312
|
-
inputClassName: clsx("min-w-input-width-min-width", props.inputClassName),
|
|
313
|
+
inputClassName: clsx(props.shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", props.inputClassName),
|
|
313
314
|
contentClassName: "pr-0!",
|
|
314
315
|
contentWrapperClassName: datePickerInputContentRowCva({ size }),
|
|
315
316
|
contentGroup: "date-picker",
|
|
@@ -21,6 +21,7 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
21
21
|
isInvalid?: boolean;
|
|
22
22
|
disableDropdown?: boolean;
|
|
23
23
|
isDateTime?: boolean;
|
|
24
|
+
shouldShrinkInput?: boolean;
|
|
24
25
|
isClearable?: boolean;
|
|
25
26
|
headerProps?: FormFieldHeaderProps;
|
|
26
27
|
todayIcon?: DatePickerTodayIcon;
|
|
@@ -41,5 +42,5 @@ interface DatePickerInputProps extends InputVariantProps {
|
|
|
41
42
|
fireBlurOnChange?: boolean;
|
|
42
43
|
onClear?: () => void;
|
|
43
44
|
}
|
|
44
|
-
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const DatePickerInput: ({ ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize, todayIconButtonComponent, todayIconPlacement, isDirty, isRequired, disableManualEntry, autoFixYear, placeholder, className, onOpenDropdown, dateGranularity, timeZone: timeZoneProp, isTimeOptional, format, fireBlurOnChange, onClear: onClearProp, ...props }: DatePickerInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
46
|
export {};
|
|
@@ -4,7 +4,7 @@ import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
6
6
|
import { DateField } from "./DateField.js";
|
|
7
|
-
import {
|
|
7
|
+
import { datePickerInputContentRowDefinition } from "./datePickerInput.cva.js";
|
|
8
8
|
import { renderDatePickerTodayIcon } from "./datePickerTodayIcon.js";
|
|
9
9
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
10
10
|
import { InputClear } from "../../shared/InputClear.js";
|
|
@@ -18,8 +18,8 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
|
18
18
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
19
19
|
//#region src/components/inputs/DateTime/shared/DatePickerInput.tsx
|
|
20
20
|
var DatePickerInput = (t0) => {
|
|
21
|
-
const $ = c(
|
|
22
|
-
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone: timeZoneProp, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
21
|
+
const $ = c(96);
|
|
22
|
+
const { ref, as, groupProps, fieldProps, endFieldProps, fieldValue, endFieldValue, isValueControlled, hasValue, buttonProps, isDisabled, isInvalid, disableDropdown, variant, size, isDateTime, shouldShrinkInput, isClearable, headerProps, todayIcon, todayIconButtonSize: t1, todayIconButtonComponent, todayIconPlacement: t2, isDirty, isRequired, disableManualEntry, autoFixYear: t3, placeholder, className, onOpenDropdown, dateGranularity: t4, timeZone: timeZoneProp, isTimeOptional: t5, format, fireBlurOnChange, onClear: onClearProp, ...props } = t0;
|
|
23
23
|
const todayIconButtonSize = t1 === void 0 ? "none" : t1;
|
|
24
24
|
const todayIconPlacement = t2 === void 0 ? "content" : t2;
|
|
25
25
|
const autoFixYear = t3 === void 0 ? false : t3;
|
|
@@ -31,7 +31,7 @@ var DatePickerInput = (t0) => {
|
|
|
31
31
|
if (timeZone !== "clientLocal") effectiveTimeZone = timeZone;
|
|
32
32
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
33
33
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
34
|
-
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva",
|
|
34
|
+
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
35
35
|
const [canClear, setCanClear] = useState(false);
|
|
36
36
|
let t6;
|
|
37
37
|
if ($[0] !== isDisabled) {
|
|
@@ -155,7 +155,7 @@ var DatePickerInput = (t0) => {
|
|
|
155
155
|
});
|
|
156
156
|
const shouldRenderTodayIconWithFieldLabel = todayIconPlacement === "fieldLabel";
|
|
157
157
|
const pickerIcon = isDateTime ? uiConfig.dateInput.dateTimeIcon : uiConfig.dateInput.calendarIcon;
|
|
158
|
-
const t15 = clsx("group group/date-picker-content relative flex
|
|
158
|
+
const t15 = clsx("group group/date-picker-content relative flex items-center justify-between gap-2", shouldShrinkInput ? "min-w-0" : "min-w-input-width-min-width", groupProps.className, inputBaseCva({
|
|
159
159
|
variant,
|
|
160
160
|
as,
|
|
161
161
|
...props
|
|
@@ -171,9 +171,10 @@ var DatePickerInput = (t0) => {
|
|
|
171
171
|
const t24 = isDirty || void 0;
|
|
172
172
|
const t25 = isRequired || void 0;
|
|
173
173
|
const t26 = normalizedFieldProps.value != null || void 0;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
const t27 = shouldShrinkInput ? "min-w-0 flex-1 w-full" : "w-full";
|
|
175
|
+
let t28;
|
|
176
|
+
if ($[20] !== as || $[21] !== inputSizeCva || $[22] !== size || $[23] !== t27) {
|
|
177
|
+
t28 = clsx("flex items-center gap-input-gap-input-text-to-elements pr-0!", t27, inputSizeCva({
|
|
177
178
|
size,
|
|
178
179
|
as
|
|
179
180
|
}));
|
|
@@ -181,41 +182,42 @@ var DatePickerInput = (t0) => {
|
|
|
181
182
|
$[21] = inputSizeCva;
|
|
182
183
|
$[22] = size;
|
|
183
184
|
$[23] = t27;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
$[24] = t28;
|
|
186
|
+
} else t28 = $[24];
|
|
187
|
+
let t29;
|
|
188
|
+
if ($[25] !== as || $[26] !== headerProps) {
|
|
189
|
+
t29 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
188
190
|
as,
|
|
189
191
|
...headerProps
|
|
190
192
|
});
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
} else
|
|
195
|
-
const
|
|
196
|
-
let t30;
|
|
197
|
-
if ($[27] !== datePickerInputContentRowCva || $[28] !== size) {
|
|
198
|
-
t30 = datePickerInputContentRowCva({ size });
|
|
199
|
-
$[27] = datePickerInputContentRowCva;
|
|
200
|
-
$[28] = size;
|
|
201
|
-
$[29] = t30;
|
|
202
|
-
} else t30 = $[29];
|
|
193
|
+
$[25] = as;
|
|
194
|
+
$[26] = headerProps;
|
|
195
|
+
$[27] = t29;
|
|
196
|
+
} else t29 = $[27];
|
|
197
|
+
const t30 = shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
203
198
|
let t31;
|
|
204
|
-
if ($[
|
|
205
|
-
t31 =
|
|
199
|
+
if ($[28] !== datePickerInputContentRowCva || $[29] !== size) {
|
|
200
|
+
t31 = datePickerInputContentRowCva({ size });
|
|
201
|
+
$[28] = datePickerInputContentRowCva;
|
|
202
|
+
$[29] = size;
|
|
203
|
+
$[30] = t31;
|
|
204
|
+
} else t31 = $[30];
|
|
205
|
+
let t32;
|
|
206
|
+
if ($[31] !== disableManualEntry || $[32] !== isDisabled || $[33] !== onOpenDropdown) {
|
|
207
|
+
t32 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
206
208
|
onPress: onOpenDropdown,
|
|
207
209
|
className: "absolute inset-0 z-0",
|
|
208
210
|
isDisabled
|
|
209
211
|
});
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
} else
|
|
215
|
-
const
|
|
216
|
-
let
|
|
217
|
-
if ($[
|
|
218
|
-
|
|
212
|
+
$[31] = disableManualEntry;
|
|
213
|
+
$[32] = isDisabled;
|
|
214
|
+
$[33] = onOpenDropdown;
|
|
215
|
+
$[34] = t32;
|
|
216
|
+
} else t32 = $[34];
|
|
217
|
+
const t33 = !shouldRenderTodayIconWithFieldLabel && todayIconButton;
|
|
218
|
+
let t34;
|
|
219
|
+
if ($[35] !== as || $[36] !== dateGranularity || $[37] !== disableManualEntry || $[38] !== effectiveTimeZone || $[39] !== fieldProps || $[40] !== format || $[41] !== hidePlaceholder || $[42] !== isDisabled || $[43] !== isInvalid || $[44] !== isTimeOptional || $[45] !== normalizedEndFieldProps || $[46] !== normalizedFieldProps || $[47] !== onClearChange || $[48] !== placeholder) {
|
|
220
|
+
t34 = disableManualEntry && placeholder && !fieldProps.value ? /* @__PURE__ */ jsx(Typography, {
|
|
219
221
|
size: "label-1",
|
|
220
222
|
className: "text-text-default-3",
|
|
221
223
|
children: placeholder
|
|
@@ -246,79 +248,79 @@ var DatePickerInput = (t0) => {
|
|
|
246
248
|
format,
|
|
247
249
|
timeZone: effectiveTimeZone
|
|
248
250
|
})] })] });
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
} else
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
268
|
-
className:
|
|
251
|
+
$[35] = as;
|
|
252
|
+
$[36] = dateGranularity;
|
|
253
|
+
$[37] = disableManualEntry;
|
|
254
|
+
$[38] = effectiveTimeZone;
|
|
255
|
+
$[39] = fieldProps;
|
|
256
|
+
$[40] = format;
|
|
257
|
+
$[41] = hidePlaceholder;
|
|
258
|
+
$[42] = isDisabled;
|
|
259
|
+
$[43] = isInvalid;
|
|
260
|
+
$[44] = isTimeOptional;
|
|
261
|
+
$[45] = normalizedEndFieldProps;
|
|
262
|
+
$[46] = normalizedFieldProps;
|
|
263
|
+
$[47] = onClearChange;
|
|
264
|
+
$[48] = placeholder;
|
|
265
|
+
$[49] = t34;
|
|
266
|
+
} else t34 = $[49];
|
|
267
|
+
let t35;
|
|
268
|
+
if ($[50] !== t31 || $[51] !== t32 || $[52] !== t33 || $[53] !== t34) {
|
|
269
|
+
t35 = /* @__PURE__ */ jsxs("div", {
|
|
270
|
+
className: t31,
|
|
269
271
|
children: [
|
|
270
|
-
t31,
|
|
271
272
|
t32,
|
|
272
|
-
t33
|
|
273
|
+
t33,
|
|
274
|
+
t34
|
|
273
275
|
]
|
|
274
276
|
});
|
|
275
|
-
$[49] = t30;
|
|
276
277
|
$[50] = t31;
|
|
277
278
|
$[51] = t32;
|
|
278
279
|
$[52] = t33;
|
|
279
280
|
$[53] = t34;
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
$[54] = t35;
|
|
282
|
+
} else t35 = $[54];
|
|
283
|
+
let t36;
|
|
284
|
+
if ($[55] !== t28 || $[56] !== t29 || $[57] !== t30 || $[58] !== t35) {
|
|
285
|
+
t36 = /* @__PURE__ */ jsxs("div", {
|
|
286
|
+
className: t28,
|
|
285
287
|
children: [
|
|
286
|
-
t28,
|
|
287
288
|
t29,
|
|
288
|
-
|
|
289
|
+
t30,
|
|
290
|
+
t35
|
|
289
291
|
]
|
|
290
292
|
});
|
|
291
|
-
$[54] = t27;
|
|
292
293
|
$[55] = t28;
|
|
293
294
|
$[56] = t29;
|
|
294
|
-
$[57] =
|
|
295
|
+
$[57] = t30;
|
|
295
296
|
$[58] = t35;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
297
|
+
$[59] = t36;
|
|
298
|
+
} else t36 = $[59];
|
|
299
|
+
let t37;
|
|
300
|
+
if ($[60] !== as || $[61] !== inputSizeCva || $[62] !== size) {
|
|
301
|
+
t37 = clsx(inputSizeCva({
|
|
300
302
|
size,
|
|
301
303
|
as
|
|
302
304
|
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
} else
|
|
308
|
-
let
|
|
309
|
-
if ($[
|
|
310
|
-
|
|
305
|
+
$[60] = as;
|
|
306
|
+
$[61] = inputSizeCva;
|
|
307
|
+
$[62] = size;
|
|
308
|
+
$[63] = t37;
|
|
309
|
+
} else t37 = $[63];
|
|
310
|
+
let t38;
|
|
311
|
+
if ($[64] !== clearInput || $[65] !== isClearable || $[66] !== showClear) {
|
|
312
|
+
t38 = isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
311
313
|
onClear: clearInput,
|
|
312
314
|
show: showClear
|
|
313
315
|
});
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
} else
|
|
319
|
-
let
|
|
320
|
-
if ($[
|
|
321
|
-
|
|
316
|
+
$[64] = clearInput;
|
|
317
|
+
$[65] = isClearable;
|
|
318
|
+
$[66] = showClear;
|
|
319
|
+
$[67] = t38;
|
|
320
|
+
} else t38 = $[67];
|
|
321
|
+
let t39;
|
|
322
|
+
if ($[68] !== buttonProps || $[69] !== disableDropdown || $[70] !== disableManualEntry || $[71] !== isDisabled || $[72] !== pickerIcon) {
|
|
323
|
+
t39 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
322
324
|
label: "",
|
|
323
325
|
color: "secondary",
|
|
324
326
|
...buttonProps,
|
|
@@ -326,27 +328,27 @@ var DatePickerInput = (t0) => {
|
|
|
326
328
|
isDisabled,
|
|
327
329
|
className: "border-0!"
|
|
328
330
|
});
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
} else
|
|
336
|
-
let
|
|
337
|
-
if ($[
|
|
338
|
-
|
|
339
|
-
className:
|
|
340
|
-
children: [
|
|
331
|
+
$[68] = buttonProps;
|
|
332
|
+
$[69] = disableDropdown;
|
|
333
|
+
$[70] = disableManualEntry;
|
|
334
|
+
$[71] = isDisabled;
|
|
335
|
+
$[72] = pickerIcon;
|
|
336
|
+
$[73] = t39;
|
|
337
|
+
} else t39 = $[73];
|
|
338
|
+
let t40;
|
|
339
|
+
if ($[74] !== t37 || $[75] !== t38 || $[76] !== t39) {
|
|
340
|
+
t40 = /* @__PURE__ */ jsxs("div", {
|
|
341
|
+
className: t37,
|
|
342
|
+
children: [t38, t39]
|
|
341
343
|
});
|
|
342
|
-
$[73] = t36;
|
|
343
344
|
$[74] = t37;
|
|
344
345
|
$[75] = t38;
|
|
345
346
|
$[76] = t39;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
$[77] = t40;
|
|
348
|
+
} else t40 = $[77];
|
|
349
|
+
let t41;
|
|
350
|
+
if ($[78] !== focusWithinProps || $[79] !== groupProps || $[80] !== hoverProps || $[81] !== t15 || $[82] !== t16 || $[83] !== t17 || $[84] !== t18 || $[85] !== t19 || $[86] !== t20 || $[87] !== t21 || $[88] !== t22 || $[89] !== t23 || $[90] !== t24 || $[91] !== t25 || $[92] !== t26 || $[93] !== t36 || $[94] !== t40) {
|
|
351
|
+
t41 = /* @__PURE__ */ jsxs("div", {
|
|
350
352
|
ref: containerRef,
|
|
351
353
|
...groupProps,
|
|
352
354
|
...focusWithinProps,
|
|
@@ -365,28 +367,28 @@ var DatePickerInput = (t0) => {
|
|
|
365
367
|
"data-is-dirty": t24,
|
|
366
368
|
"data-is-required": t25,
|
|
367
369
|
"data-is-filled": t26,
|
|
368
|
-
children: [
|
|
370
|
+
children: [t36, t40]
|
|
369
371
|
});
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[93] = t39;
|
|
372
|
+
$[78] = focusWithinProps;
|
|
373
|
+
$[79] = groupProps;
|
|
374
|
+
$[80] = hoverProps;
|
|
375
|
+
$[81] = t15;
|
|
376
|
+
$[82] = t16;
|
|
377
|
+
$[83] = t17;
|
|
378
|
+
$[84] = t18;
|
|
379
|
+
$[85] = t19;
|
|
380
|
+
$[86] = t20;
|
|
381
|
+
$[87] = t21;
|
|
382
|
+
$[88] = t22;
|
|
383
|
+
$[89] = t23;
|
|
384
|
+
$[90] = t24;
|
|
385
|
+
$[91] = t25;
|
|
386
|
+
$[92] = t26;
|
|
387
|
+
$[93] = t36;
|
|
387
388
|
$[94] = t40;
|
|
388
|
-
|
|
389
|
-
|
|
389
|
+
$[95] = t41;
|
|
390
|
+
} else t41 = $[95];
|
|
391
|
+
return t41;
|
|
390
392
|
};
|
|
391
393
|
//#endregion
|
|
392
394
|
export { DatePickerInput };
|
|
@@ -11,17 +11,6 @@ export declare const datePickerInputContentRowDefinition: {
|
|
|
11
11
|
};
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
|
-
export declare const datePickerInputContentRow: {
|
|
15
|
-
base: string[];
|
|
16
|
-
config: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
17
|
-
readonly size: {
|
|
18
|
-
readonly "extra-small": "";
|
|
19
|
-
readonly small: "";
|
|
20
|
-
readonly default: "";
|
|
21
|
-
readonly large: "";
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
};
|
|
25
14
|
export type DatePickerInputContentRowConfig = NonNullable<typeof datePickerInputContentRowDefinition.config>;
|
|
26
15
|
export interface DatePickerInputContentRowProps extends UIOverrides.VariantProps<DatePickerInputContentRowConfig>, InputSizeProps {
|
|
27
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/DateTime/shared/datePickerInput.cva.ts
|
|
3
|
+
var datePickerInputContentRowDefinition = UIOverrides.defineConfig({
|
|
3
4
|
base: ["flex items-center gap-input-gap-input-text-to-elements"],
|
|
4
5
|
config: {
|
|
5
6
|
variants: { size: {
|
|
@@ -12,4 +13,4 @@ var datePickerInputContentRow = UIOverrides.defineConfig({
|
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
//#endregion
|
|
15
|
-
export {
|
|
16
|
+
export { datePickerInputContentRowDefinition };
|
|
@@ -3,7 +3,7 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
3
3
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
4
|
import { Tooltip as Tooltip$1 } from "../../overlays/Tooltip/Tooltip.js";
|
|
5
5
|
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
6
|
-
import {
|
|
6
|
+
import { formFieldHeaderDefinition } from "./formFieldHeader.cva.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
@@ -12,7 +12,7 @@ import { Focusable } from "react-aria-components";
|
|
|
12
12
|
var FormFieldHeader = (t0) => {
|
|
13
13
|
const $ = c(24);
|
|
14
14
|
const { label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps } = t0;
|
|
15
|
-
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva",
|
|
15
|
+
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva", formFieldHeaderDefinition);
|
|
16
16
|
const t1 = !isHeaderHidden;
|
|
17
17
|
let t2;
|
|
18
18
|
if ($[0] !== className || $[1] !== formFieldHeaderCva || $[2] !== t1) {
|
|
@@ -8,15 +8,6 @@ export declare const formFieldHeaderDefinition: {
|
|
|
8
8
|
};
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
export declare const formFieldHeader: {
|
|
12
|
-
base: string[];
|
|
13
|
-
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
14
|
-
readonly visible: {
|
|
15
|
-
readonly true: "mb-1";
|
|
16
|
-
readonly false: "sr-only";
|
|
17
|
-
};
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
20
11
|
export type FormFieldHeaderConfig = NonNullable<typeof formFieldHeaderDefinition.config>;
|
|
21
12
|
export interface FormFieldHeaderVariantProps extends UIOverrides.VariantProps<FormFieldHeaderConfig> {
|
|
22
13
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/FormField/formFieldHeader.cva.ts
|
|
3
|
+
var formFieldHeaderDefinition = UIOverrides.defineConfig({
|
|
3
4
|
base: [""],
|
|
4
5
|
config: {
|
|
5
6
|
variants: { visible: {
|
|
@@ -10,4 +11,4 @@ var formFieldHeader = UIOverrides.defineConfig({
|
|
|
10
11
|
}
|
|
11
12
|
});
|
|
12
13
|
//#endregion
|
|
13
|
-
export {
|
|
14
|
+
export { formFieldHeaderDefinition };
|
|
@@ -2,7 +2,7 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
4
4
|
import { InputClear } from "../../shared/InputClear.js";
|
|
5
|
-
import {
|
|
5
|
+
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
6
6
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
7
7
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
8
8
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
@@ -29,8 +29,8 @@ var normalizeRangeValue = (value, minValue, maxValue) => {
|
|
|
29
29
|
var NumberRangeInputBase = (props) => {
|
|
30
30
|
const $ = c(114);
|
|
31
31
|
const ui = UIConfig.useConfig();
|
|
32
|
-
const inputBaseCva = UIOverrides.useCva("input.baseCva",
|
|
33
|
-
const inputSizeCva = UIOverrides.useCva("input.sizeCva",
|
|
32
|
+
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
33
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
34
34
|
let asProp;
|
|
35
35
|
let autoFocusOnMount;
|
|
36
36
|
let className;
|
|
@@ -362,7 +362,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
362
362
|
var NumberRangeInputInner = (t0) => {
|
|
363
363
|
const $ = c(5);
|
|
364
364
|
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
365
|
-
const inputSizeCva = UIOverrides.useCva("input.sizeCva",
|
|
365
|
+
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
366
366
|
const ui = UIConfig.useConfig();
|
|
367
367
|
const { locale } = useLocale();
|
|
368
368
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -3,10 +3,6 @@ export declare const textAreaWrapperDefinition: {
|
|
|
3
3
|
base: string[];
|
|
4
4
|
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
5
|
};
|
|
6
|
-
export declare const textAreaWrapper: {
|
|
7
|
-
base: string[];
|
|
8
|
-
config?: import("../../../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
9
|
-
};
|
|
10
6
|
export type TextAreaWrapperConfig = NonNullable<typeof textAreaWrapperDefinition.config>;
|
|
11
7
|
export interface TextAreaWrapperVariantProps extends UIOverrides.VariantProps<TextAreaWrapperConfig> {
|
|
12
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
|
-
|
|
2
|
+
//#region src/components/inputs/Input/TextArea/TextArea.cva.ts
|
|
3
|
+
var textAreaWrapperDefinition = UIOverrides.defineConfig({ base: ["group/text-area relative h-full"] });
|
|
3
4
|
//#endregion
|
|
4
|
-
export {
|
|
5
|
+
export { textAreaWrapperDefinition };
|
|
@@ -5,7 +5,7 @@ import { InputClear } from "../../shared/InputClear.js";
|
|
|
5
5
|
import { inputSideDefinition, inputSizeDefinition, useInputCva } from "../../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../../FormField/FormField.js";
|
|
7
7
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
|
-
import {
|
|
8
|
+
import { textAreaWrapperDefinition } from "./TextArea.cva.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { clsx } from "clsx";
|
|
@@ -21,7 +21,7 @@ var TextAreaBase = (props) => {
|
|
|
21
21
|
const inputCva = useInputCva();
|
|
22
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
23
23
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
24
|
-
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva",
|
|
24
|
+
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva", textAreaWrapperDefinition);
|
|
25
25
|
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as: asProp, hideLabel: hideLabelProp, variant: variantProp, isClearable: isClearableProp, ...rest } = props;
|
|
26
26
|
const as = asProp ?? ui.input.as;
|
|
27
27
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
@@ -4,7 +4,7 @@ import { Loader } from "../../../status/Loader/Loader.js";
|
|
|
4
4
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
5
5
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
6
6
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
|
-
import {
|
|
7
|
+
import { inputContentWrapperDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { clsx } from "clsx";
|
|
@@ -15,7 +15,7 @@ var InputContent = (t0) => {
|
|
|
15
15
|
const { leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, value, onChange, onBlur, children, headerProps, as, size } = t0;
|
|
16
16
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
17
17
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
18
|
-
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva",
|
|
18
|
+
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapperDefinition);
|
|
19
19
|
let t1;
|
|
20
20
|
if ($[0] !== LeadingIcon) {
|
|
21
21
|
t1 = LeadingIcon && isValidElement(LeadingIcon);
|