@povio/ui 0.0.9 → 0.0.10
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 +53 -45
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +86 -77
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +63 -55
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +46 -38
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +1 -0
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +1 -0
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +30 -21
- package/dist/components/inputs/Input/TextArea/TextArea.js +41 -32
- package/dist/components/inputs/Input/TextInput/TextInput.js +32 -40
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +72 -60
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +3 -0
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +2 -1
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +43 -16
- package/dist/components/inputs/Selection/shared/SelectListBox.js +74 -55
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -2
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +8 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +21 -0
- package/dist/components/inputs/shared/label.cva.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +2 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +4 -2
- package/dist/components/table/HeaderText.js +1 -1
- package/dist/components/table/table.cva.js +6 -6
- package/dist/config/uiConfig.context.d.ts +1 -1
- package/dist/config/uiConfig.context.js +2 -1
- package/dist/hooks/useTableNav.js +0 -15
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
|
12
12
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
13
13
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
14
14
|
import { FormField } from "../../FormField/FormField.js";
|
|
15
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
15
16
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
16
17
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
17
18
|
const PLACEHOLDER_VALUE = new CalendarDate(2024, 1, 1);
|
|
@@ -115,59 +116,66 @@ const DatePickerBase = (props) => {
|
|
|
115
116
|
dialogState.setValue(state.value);
|
|
116
117
|
}
|
|
117
118
|
};
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
TooltipWrapper,
|
|
120
121
|
{
|
|
121
|
-
...formFieldProps,
|
|
122
122
|
as,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
isDisabled,
|
|
135
|
-
isInvalid: !!error,
|
|
136
|
-
disableDropdown,
|
|
137
|
-
variant,
|
|
138
|
-
size,
|
|
139
|
-
isClearable,
|
|
140
|
-
headerProps,
|
|
141
|
-
todayIcon
|
|
142
|
-
}
|
|
143
|
-
),
|
|
144
|
-
!disableDropdown && /* @__PURE__ */ jsx(
|
|
145
|
-
DateTimeDialog,
|
|
146
|
-
{
|
|
147
|
-
footer: /* @__PURE__ */ jsx(
|
|
148
|
-
DateTimeDialogFooter,
|
|
123
|
+
error,
|
|
124
|
+
children: /* @__PURE__ */ jsxs(
|
|
125
|
+
FormField,
|
|
126
|
+
{
|
|
127
|
+
...formFieldProps,
|
|
128
|
+
as,
|
|
129
|
+
labelProps,
|
|
130
|
+
className: clsx("relative inline-flex w-full flex-col text-left", className),
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
DatePickerInput,
|
|
149
134
|
{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
135
|
+
ref: mergeRefs(ref, datePickerRef),
|
|
136
|
+
as,
|
|
137
|
+
groupProps,
|
|
138
|
+
fieldProps: { ...fieldProps, placeholderValue: PLACEHOLDER_VALUE },
|
|
139
|
+
buttonProps,
|
|
140
|
+
isDisabled,
|
|
141
|
+
isInvalid: !!error,
|
|
142
|
+
disableDropdown,
|
|
143
|
+
variant,
|
|
144
|
+
size,
|
|
145
|
+
isClearable,
|
|
146
|
+
headerProps,
|
|
147
|
+
todayIcon
|
|
153
148
|
}
|
|
154
149
|
),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
dialogProps,
|
|
158
|
-
isOpen: state.isOpen,
|
|
159
|
-
onOpenChange,
|
|
160
|
-
children: /* @__PURE__ */ jsx(
|
|
161
|
-
Calendar,
|
|
150
|
+
!disableDropdown && /* @__PURE__ */ jsx(
|
|
151
|
+
DateTimeDialog,
|
|
162
152
|
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
153
|
+
footer: /* @__PURE__ */ jsx(
|
|
154
|
+
DateTimeDialogFooter,
|
|
155
|
+
{
|
|
156
|
+
isValid: !dialogState.isInvalid && !!dialogState.value,
|
|
157
|
+
onTodayPress,
|
|
158
|
+
onApply
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
label,
|
|
162
|
+
triggerRef: datePickerRef,
|
|
163
|
+
dialogProps,
|
|
164
|
+
isOpen: state.isOpen,
|
|
165
|
+
onOpenChange,
|
|
166
|
+
children: /* @__PURE__ */ jsx(
|
|
167
|
+
Calendar,
|
|
168
|
+
{
|
|
169
|
+
state: calendarState,
|
|
170
|
+
calendarProps,
|
|
171
|
+
onApply
|
|
172
|
+
}
|
|
173
|
+
)
|
|
166
174
|
}
|
|
167
175
|
)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
)
|
|
171
179
|
}
|
|
172
180
|
);
|
|
173
181
|
};
|
|
@@ -14,6 +14,7 @@ import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
|
14
14
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
15
15
|
import { RangeCalendar } from "../shared/RangeCalendar.js";
|
|
16
16
|
import { FormField } from "../../FormField/FormField.js";
|
|
17
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
17
18
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
18
19
|
import { ns } from "../../../../config/i18n.js";
|
|
19
20
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
@@ -367,6 +368,7 @@ const DateRangePickerBase = (props) => {
|
|
|
367
368
|
const todayDate2 = today(getLocalTimeZone());
|
|
368
369
|
leftCalendarState.setFocusedDate(todayDate2);
|
|
369
370
|
rightCalendarState.setFocusedDate(todayDate2.add({ months: 1 }));
|
|
371
|
+
syncCalendarStates({ start: todayDate2, end: todayDate2 });
|
|
370
372
|
};
|
|
371
373
|
const onOpenChange = (isOpen) => {
|
|
372
374
|
state.toggle();
|
|
@@ -492,90 +494,97 @@ const DateRangePickerBase = (props) => {
|
|
|
492
494
|
rightCalendarState.setFocusedDate(rightCalendarMonth);
|
|
493
495
|
}
|
|
494
496
|
};
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
|
|
497
|
+
return /* @__PURE__ */ jsx(
|
|
498
|
+
TooltipWrapper,
|
|
497
499
|
{
|
|
498
|
-
...formFieldProps,
|
|
499
500
|
as,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
buttonProps,
|
|
512
|
-
isDisabled,
|
|
513
|
-
isInvalid: !!error,
|
|
514
|
-
disableDropdown,
|
|
515
|
-
variant,
|
|
516
|
-
size,
|
|
517
|
-
isClearable,
|
|
518
|
-
headerProps,
|
|
519
|
-
todayIcon
|
|
520
|
-
}
|
|
521
|
-
),
|
|
522
|
-
/* @__PURE__ */ jsx(
|
|
523
|
-
DateTimeDialog,
|
|
524
|
-
{
|
|
525
|
-
hideSidebar,
|
|
526
|
-
sidebar: /* @__PURE__ */ jsx("div", { className: "flex w-full flex-row overflow-auto border-elevation-outline-default-1 border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden", children: presets.map((preset) => /* @__PURE__ */ jsx(
|
|
527
|
-
Button,
|
|
501
|
+
error,
|
|
502
|
+
children: /* @__PURE__ */ jsxs(
|
|
503
|
+
FormField,
|
|
504
|
+
{
|
|
505
|
+
...formFieldProps,
|
|
506
|
+
as,
|
|
507
|
+
labelProps,
|
|
508
|
+
className: clsx("relative inline-flex w-full flex-col text-left", className),
|
|
509
|
+
children: [
|
|
510
|
+
/* @__PURE__ */ jsx(
|
|
511
|
+
DatePickerInput,
|
|
528
512
|
{
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
)
|
|
545
|
-
},
|
|
546
|
-
preset.label
|
|
547
|
-
)) }),
|
|
548
|
-
footer: /* @__PURE__ */ jsx(
|
|
549
|
-
DateTimeDialogFooter,
|
|
550
|
-
{
|
|
551
|
-
isValid: !dialogState.isInvalid && !!dialogState.value,
|
|
552
|
-
onTodayPress,
|
|
553
|
-
onApply
|
|
513
|
+
ref: mergeRefs(ref, dateRangePickerRef),
|
|
514
|
+
as,
|
|
515
|
+
groupProps,
|
|
516
|
+
fieldProps: { ...startFieldProps, placeholderValue: PLACEHOLDER_VALUE },
|
|
517
|
+
endFieldProps: { ...endFieldProps, placeholderValue: PLACEHOLDER_VALUE },
|
|
518
|
+
buttonProps,
|
|
519
|
+
isDisabled,
|
|
520
|
+
isInvalid: !!error,
|
|
521
|
+
disableDropdown,
|
|
522
|
+
variant,
|
|
523
|
+
size,
|
|
524
|
+
isClearable,
|
|
525
|
+
headerProps,
|
|
526
|
+
todayIcon
|
|
554
527
|
}
|
|
555
528
|
),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
dialogProps,
|
|
559
|
-
isOpen: state.isOpen,
|
|
560
|
-
onOpenChange,
|
|
561
|
-
children: /* @__PURE__ */ jsx("div", { className: "mb-4 flex max-w-[804px] md:mb-0", children: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ jsx(
|
|
562
|
-
RangeCalendar,
|
|
529
|
+
/* @__PURE__ */ jsx(
|
|
530
|
+
DateTimeDialog,
|
|
563
531
|
{
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
532
|
+
hideSidebar,
|
|
533
|
+
sidebar: /* @__PURE__ */ jsx("div", { className: "flex w-full flex-row overflow-auto border-elevation-outline-default-1 border-solid [-ms-overflow-style:none] [scrollbar-width:none] md:w-[156px] md:flex-col md:border-r [&::-webkit-scrollbar]:hidden", children: presets.map((preset) => /* @__PURE__ */ jsx(
|
|
534
|
+
Button,
|
|
535
|
+
{
|
|
536
|
+
onClick: () => selectPreset(preset),
|
|
537
|
+
className: clsx(
|
|
538
|
+
"w-full px-2 py-1 text-left md:px-list-side-item md:py-list-height-item",
|
|
539
|
+
activePreset !== preset.label && "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover",
|
|
540
|
+
activePreset === preset.label && "bg-interactive-contained-primary-idle text-interactive-text-secondary-idle-inverted"
|
|
541
|
+
),
|
|
542
|
+
children: /* @__PURE__ */ jsx(
|
|
543
|
+
Typography,
|
|
544
|
+
{
|
|
545
|
+
size: "label-2",
|
|
546
|
+
sizeMobile: "label-3",
|
|
547
|
+
as: "span",
|
|
548
|
+
className: "whitespace-nowrap",
|
|
549
|
+
children: preset.label
|
|
550
|
+
}
|
|
551
|
+
)
|
|
552
|
+
},
|
|
553
|
+
preset.label
|
|
554
|
+
)) }),
|
|
555
|
+
footer: /* @__PURE__ */ jsx(
|
|
556
|
+
DateTimeDialogFooter,
|
|
557
|
+
{
|
|
558
|
+
isValid: !dialogState.isInvalid && !!dialogState.value,
|
|
559
|
+
onTodayPress,
|
|
560
|
+
onApply
|
|
561
|
+
}
|
|
562
|
+
),
|
|
563
|
+
label,
|
|
564
|
+
triggerRef: dateRangePickerRef,
|
|
565
|
+
dialogProps,
|
|
566
|
+
isOpen: state.isOpen,
|
|
567
|
+
onOpenChange,
|
|
568
|
+
children: /* @__PURE__ */ jsx("div", { className: "mb-4 flex max-w-[804px] md:mb-0", children: /* @__PURE__ */ jsx("div", { className: "flex flex-1 justify-center", children: /* @__PURE__ */ jsx(
|
|
569
|
+
RangeCalendar,
|
|
570
|
+
{
|
|
571
|
+
leftCalendarState,
|
|
572
|
+
rightCalendarState,
|
|
573
|
+
calendarProps,
|
|
574
|
+
onApply,
|
|
575
|
+
onRangeChange: syncCalendarStates,
|
|
576
|
+
onDateSelection: handleDateSelection,
|
|
577
|
+
onDateHover: handleDateHover,
|
|
578
|
+
rangeSelection,
|
|
579
|
+
hoverDate,
|
|
580
|
+
onKeyboardNavigation: handleKeyboardNavigation
|
|
581
|
+
}
|
|
582
|
+
) }) })
|
|
574
583
|
}
|
|
575
|
-
)
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
584
|
+
)
|
|
585
|
+
]
|
|
586
|
+
}
|
|
587
|
+
)
|
|
579
588
|
}
|
|
580
589
|
);
|
|
581
590
|
};
|
|
@@ -10,6 +10,7 @@ import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
|
10
10
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
11
11
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
12
12
|
import { FormField } from "../../FormField/FormField.js";
|
|
13
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
13
14
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
14
15
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
15
16
|
const PLACEHOLDER_VALUE = new CalendarDateTime(2024, 1, 1);
|
|
@@ -130,69 +131,76 @@ const DateTimePickerBase = (props) => {
|
|
|
130
131
|
dialogState.setTimeValue(new Time(0, 0));
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
TooltipWrapper,
|
|
135
136
|
{
|
|
136
|
-
...formFieldProps,
|
|
137
137
|
as,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
placeholderValue: PLACEHOLDER_VALUE,
|
|
150
|
-
onBlur: (e) => {
|
|
151
|
-
fieldProps.onBlur?.(e);
|
|
152
|
-
onInputBlur(e);
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
buttonProps,
|
|
156
|
-
isDisabled,
|
|
157
|
-
isInvalid: !!error,
|
|
158
|
-
disableDropdown,
|
|
159
|
-
variant,
|
|
160
|
-
size,
|
|
161
|
-
isDateTime: true,
|
|
162
|
-
isClearable,
|
|
163
|
-
headerProps,
|
|
164
|
-
todayIcon
|
|
165
|
-
}
|
|
166
|
-
),
|
|
167
|
-
!disableDropdown && /* @__PURE__ */ jsx(
|
|
168
|
-
DateTimeDialog,
|
|
169
|
-
{
|
|
170
|
-
footer: /* @__PURE__ */ jsx(
|
|
171
|
-
DateTimeDialogFooter,
|
|
138
|
+
error,
|
|
139
|
+
children: /* @__PURE__ */ jsxs(
|
|
140
|
+
FormField,
|
|
141
|
+
{
|
|
142
|
+
...formFieldProps,
|
|
143
|
+
as,
|
|
144
|
+
labelProps,
|
|
145
|
+
className: "relative inline-flex w-full flex-col text-left",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
DatePickerInput,
|
|
172
149
|
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
150
|
+
ref: mergeRefs(ref, datePickerRef),
|
|
151
|
+
as,
|
|
152
|
+
groupProps,
|
|
153
|
+
fieldProps: {
|
|
154
|
+
...fieldProps,
|
|
155
|
+
placeholderValue: PLACEHOLDER_VALUE,
|
|
156
|
+
onBlur: (e) => {
|
|
157
|
+
fieldProps.onBlur?.(e);
|
|
158
|
+
onInputBlur(e);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
buttonProps,
|
|
162
|
+
isDisabled,
|
|
163
|
+
isInvalid: !!error,
|
|
164
|
+
disableDropdown,
|
|
165
|
+
variant,
|
|
166
|
+
size,
|
|
167
|
+
isDateTime: true,
|
|
168
|
+
isClearable,
|
|
169
|
+
headerProps,
|
|
170
|
+
todayIcon
|
|
176
171
|
}
|
|
177
172
|
),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
dialogProps,
|
|
181
|
-
isOpen: state.isOpen,
|
|
182
|
-
onOpenChange,
|
|
183
|
-
children: /* @__PURE__ */ jsx(
|
|
184
|
-
Calendar,
|
|
173
|
+
!disableDropdown && /* @__PURE__ */ jsx(
|
|
174
|
+
DateTimeDialog,
|
|
185
175
|
{
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
176
|
+
footer: /* @__PURE__ */ jsx(
|
|
177
|
+
DateTimeDialogFooter,
|
|
178
|
+
{
|
|
179
|
+
isValid: !dialogState.isInvalid && !!dialogState.value,
|
|
180
|
+
onTodayPress,
|
|
181
|
+
onApply
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
label,
|
|
185
|
+
triggerRef: datePickerRef,
|
|
186
|
+
dialogProps,
|
|
187
|
+
isOpen: state.isOpen,
|
|
188
|
+
onOpenChange,
|
|
189
|
+
children: /* @__PURE__ */ jsx(
|
|
190
|
+
Calendar,
|
|
191
|
+
{
|
|
192
|
+
state: calendarState,
|
|
193
|
+
calendarProps,
|
|
194
|
+
includesTime: true,
|
|
195
|
+
datePickerState: dialogState,
|
|
196
|
+
onApply
|
|
197
|
+
}
|
|
198
|
+
)
|
|
191
199
|
}
|
|
192
200
|
)
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
)
|
|
196
204
|
}
|
|
197
205
|
);
|
|
198
206
|
};
|
|
@@ -11,6 +11,7 @@ import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
|
11
11
|
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
12
12
|
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
13
13
|
import { FormField } from "../../FormField/FormField.js";
|
|
14
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
14
15
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
15
16
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
16
17
|
const TimePickerBase = (props) => {
|
|
@@ -125,49 +126,56 @@ const TimePickerBase = (props) => {
|
|
|
125
126
|
dialogState.setValue(state.value);
|
|
126
127
|
setIsOpen(true);
|
|
127
128
|
};
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
TooltipWrapper,
|
|
130
131
|
{
|
|
131
|
-
...formFieldProps,
|
|
132
132
|
as,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
isDisabled,
|
|
145
|
-
isInvalid: !!error,
|
|
146
|
-
disableDropdown,
|
|
147
|
-
variant,
|
|
148
|
-
size,
|
|
149
|
-
isClearable,
|
|
150
|
-
headerProps
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
!disableDropdown && /* @__PURE__ */ jsx(
|
|
154
|
-
DateTimeDialog,
|
|
155
|
-
{
|
|
156
|
-
footer: /* @__PURE__ */ jsx(
|
|
157
|
-
DateTimeDialogFooter,
|
|
133
|
+
error,
|
|
134
|
+
children: /* @__PURE__ */ jsxs(
|
|
135
|
+
FormField,
|
|
136
|
+
{
|
|
137
|
+
...formFieldProps,
|
|
138
|
+
as,
|
|
139
|
+
labelProps,
|
|
140
|
+
className: "relative inline-flex w-full flex-col text-left",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
TimePickerInput,
|
|
158
144
|
{
|
|
159
|
-
|
|
160
|
-
|
|
145
|
+
ref: mergeRefs(ref, timeFieldRef),
|
|
146
|
+
as,
|
|
147
|
+
fieldProps,
|
|
148
|
+
state,
|
|
149
|
+
onPress: onOpen,
|
|
150
|
+
isDisabled,
|
|
151
|
+
isInvalid: !!error,
|
|
152
|
+
disableDropdown,
|
|
153
|
+
variant,
|
|
154
|
+
size,
|
|
155
|
+
isClearable,
|
|
156
|
+
headerProps
|
|
161
157
|
}
|
|
162
158
|
),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
159
|
+
!disableDropdown && /* @__PURE__ */ jsx(
|
|
160
|
+
DateTimeDialog,
|
|
161
|
+
{
|
|
162
|
+
footer: /* @__PURE__ */ jsx(
|
|
163
|
+
DateTimeDialogFooter,
|
|
164
|
+
{
|
|
165
|
+
onApply,
|
|
166
|
+
isValid: !dialogState.isInvalid && !!dialogState.value
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
label,
|
|
170
|
+
triggerRef: timeFieldRef,
|
|
171
|
+
isOpen,
|
|
172
|
+
onOpenChange,
|
|
173
|
+
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
)
|
|
171
179
|
}
|
|
172
180
|
);
|
|
173
181
|
};
|
|
@@ -92,6 +92,7 @@ const DatePickerInput = ({
|
|
|
92
92
|
"data-hovered": isHovered || void 0,
|
|
93
93
|
"data-disabled": isDisabled || void 0,
|
|
94
94
|
"data-invalid": isInvalid || void 0,
|
|
95
|
+
"data-is-empty": fieldProps.value === null || void 0,
|
|
95
96
|
"data-focus-within": isFocused || void 0,
|
|
96
97
|
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
97
98
|
"data-has-selection": fieldProps.value !== null || void 0,
|
|
@@ -58,6 +58,7 @@ const TimePickerInput = ({
|
|
|
58
58
|
"data-hovered": isHovered || void 0,
|
|
59
59
|
"data-disabled": isDisabled || void 0,
|
|
60
60
|
"data-invalid": isInvalid || void 0,
|
|
61
|
+
"data-is-empty": state.value === null || void 0,
|
|
61
62
|
"data-focus-within": isFocused || void 0,
|
|
62
63
|
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
63
64
|
"data-has-selection": state.value !== null || void 0,
|
|
@@ -70,7 +70,7 @@ const FileUploadContentEmpty = ({
|
|
|
70
70
|
children: uploadText
|
|
71
71
|
}
|
|
72
72
|
),
|
|
73
|
-
!hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(TextButton, { className: "
|
|
73
|
+
!hideButton && browseText && (as === "link" ? /* @__PURE__ */ jsx(TextButton, { className: "text-interactive-text-primary-idle lowercase", children: browseText }) : /* @__PURE__ */ jsx(
|
|
74
74
|
Button,
|
|
75
75
|
{
|
|
76
76
|
variant: "outlined",
|
|
@@ -9,6 +9,7 @@ import { useNumberFieldState } from "react-stately";
|
|
|
9
9
|
import { FormField } from "../../FormField/FormField.js";
|
|
10
10
|
import { InputContent } from "../shared/InputContent.js";
|
|
11
11
|
import { useInputCva } from "../../shared/input.cva.js";
|
|
12
|
+
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
12
13
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
13
14
|
const NumberInputBase = (props) => {
|
|
14
15
|
const ui = UIConfig.useConfig();
|
|
@@ -93,33 +94,41 @@ const NumberInputBase = (props) => {
|
|
|
93
94
|
labelProps
|
|
94
95
|
};
|
|
95
96
|
return /* @__PURE__ */ jsx(
|
|
96
|
-
|
|
97
|
+
TooltipWrapper,
|
|
97
98
|
{
|
|
98
|
-
...formFieldProps,
|
|
99
99
|
as,
|
|
100
|
-
|
|
101
|
-
className: clsx("group w-full", className),
|
|
100
|
+
error,
|
|
102
101
|
children: /* @__PURE__ */ jsx(
|
|
103
|
-
|
|
102
|
+
FormField,
|
|
104
103
|
{
|
|
105
|
-
...
|
|
106
|
-
headerProps,
|
|
104
|
+
...formFieldProps,
|
|
107
105
|
as,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
labelProps,
|
|
107
|
+
className: clsx("group w-full", className),
|
|
108
|
+
children: /* @__PURE__ */ jsx(
|
|
109
|
+
InputContent,
|
|
111
110
|
{
|
|
112
|
-
...
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
111
|
+
...inputContentProps,
|
|
112
|
+
headerProps,
|
|
113
|
+
as,
|
|
114
|
+
size,
|
|
115
|
+
children: (style) => /* @__PURE__ */ jsx(
|
|
116
|
+
Input,
|
|
117
|
+
{
|
|
118
|
+
...inputProps,
|
|
119
|
+
ref,
|
|
120
|
+
"data-is-empty": value === null || value === void 0 || void 0,
|
|
121
|
+
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
122
|
+
className: inputCva({
|
|
123
|
+
variant,
|
|
124
|
+
as,
|
|
125
|
+
size,
|
|
126
|
+
...rest,
|
|
127
|
+
className: inputClassName
|
|
128
|
+
}),
|
|
129
|
+
style
|
|
130
|
+
}
|
|
131
|
+
)
|
|
123
132
|
}
|
|
124
133
|
)
|
|
125
134
|
}
|