@povio/ui 3.1.0 → 3.2.0
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/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -5,6 +5,8 @@ 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 { textAreaWrapperDefinition } from "./TextArea.cva.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
8
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { clsx } from "clsx";
|
|
10
12
|
import { useRef } from "react";
|
|
@@ -14,11 +16,17 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
14
16
|
import { Controller } from "react-hook-form";
|
|
15
17
|
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
16
18
|
var TextAreaBase = (props) => {
|
|
19
|
+
const $ = c(83);
|
|
17
20
|
const ui = UIConfig.useConfig();
|
|
18
21
|
const inputCva = useInputCva();
|
|
19
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
20
23
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
21
|
-
const
|
|
24
|
+
const textAreaWrapperCva = UIOverrides.useCva("textArea.wrapperCva", textAreaWrapperDefinition);
|
|
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
|
+
const as = asProp ?? ui.input.as;
|
|
27
|
+
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
28
|
+
const variant = variantProp ?? ui.input.variant;
|
|
29
|
+
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
22
30
|
const textFieldRef = useRef(null);
|
|
23
31
|
const { labelProps, inputProps } = useTextField({
|
|
24
32
|
...rest,
|
|
@@ -30,101 +38,308 @@ var TextAreaBase = (props) => {
|
|
|
30
38
|
onChange,
|
|
31
39
|
onBlur
|
|
32
40
|
}, textFieldRef);
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
42
|
+
let t1;
|
|
43
|
+
if ($[0] !== error || $[1] !== errorClassName || $[2] !== headerClassName || $[3] !== helperText || $[4] !== hideLabel || $[5] !== isDisabled || $[6] !== isRequired || $[7] !== label || $[8] !== rightContent || $[9] !== t0 || $[10] !== tooltipText) {
|
|
44
|
+
t1 = {
|
|
45
|
+
error,
|
|
46
|
+
label,
|
|
47
|
+
tooltipText,
|
|
48
|
+
helperText,
|
|
49
|
+
isRequired,
|
|
50
|
+
rightContent,
|
|
51
|
+
isHeaderHidden: t0,
|
|
52
|
+
hideLabel,
|
|
53
|
+
isDisabled,
|
|
54
|
+
headerClassName,
|
|
55
|
+
errorClassName
|
|
56
|
+
};
|
|
57
|
+
$[0] = error;
|
|
58
|
+
$[1] = errorClassName;
|
|
59
|
+
$[2] = headerClassName;
|
|
60
|
+
$[3] = helperText;
|
|
61
|
+
$[4] = hideLabel;
|
|
62
|
+
$[5] = isDisabled;
|
|
63
|
+
$[6] = isRequired;
|
|
64
|
+
$[7] = label;
|
|
65
|
+
$[8] = rightContent;
|
|
66
|
+
$[9] = t0;
|
|
67
|
+
$[10] = tooltipText;
|
|
68
|
+
$[11] = t1;
|
|
69
|
+
} else t1 = $[11];
|
|
70
|
+
const formFieldProps = t1;
|
|
71
|
+
const t2 = hideLabel || isHeaderHidden;
|
|
72
|
+
let T0;
|
|
73
|
+
let T1;
|
|
74
|
+
let showClear;
|
|
75
|
+
let t10;
|
|
76
|
+
let t11;
|
|
77
|
+
let t12;
|
|
78
|
+
let t13;
|
|
79
|
+
let t3;
|
|
80
|
+
let t4;
|
|
81
|
+
let t5;
|
|
82
|
+
let t6;
|
|
83
|
+
let t7;
|
|
84
|
+
let t8;
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[12] !== as || $[13] !== className || $[14] !== error || $[15] !== formFieldProps || $[16] !== headerClassName || $[17] !== helperText || $[18] !== inputSideCva || $[19] !== isClearable || $[20] !== isDisabled || $[21] !== isRequired || $[22] !== label || $[23] !== labelProps || $[24] !== rightContent || $[25] !== t2 || $[26] !== textAreaWrapperCva || $[27] !== tooltipText || $[28] !== value) {
|
|
87
|
+
const headerProps = {
|
|
88
|
+
label,
|
|
89
|
+
tooltipText,
|
|
90
|
+
helperText,
|
|
91
|
+
isRequired,
|
|
92
|
+
rightContent,
|
|
93
|
+
isHeaderHidden: t2,
|
|
94
|
+
isDisabled,
|
|
95
|
+
className: headerClassName,
|
|
96
|
+
labelProps
|
|
97
|
+
};
|
|
98
|
+
showClear = isClearable && value != null && value !== "" && !isDisabled;
|
|
99
|
+
T1 = TooltipWrapper;
|
|
100
|
+
t11 = as;
|
|
101
|
+
t12 = error;
|
|
102
|
+
t13 = as === "inline" ? -1 : void 0;
|
|
103
|
+
T0 = FormField;
|
|
104
|
+
t6 = formFieldProps;
|
|
105
|
+
t7 = as;
|
|
106
|
+
t8 = labelProps;
|
|
107
|
+
if ($[43] !== className) {
|
|
108
|
+
t9 = clsx("group w-full flex flex-col", className);
|
|
109
|
+
$[43] = className;
|
|
110
|
+
$[44] = t9;
|
|
111
|
+
} else t9 = $[44];
|
|
112
|
+
t10 = as === "inline" ? -1 : void 0;
|
|
113
|
+
if ($[45] !== textAreaWrapperCva) {
|
|
114
|
+
t3 = textAreaWrapperCva({});
|
|
115
|
+
$[45] = textAreaWrapperCva;
|
|
116
|
+
$[46] = t3;
|
|
117
|
+
} else t3 = $[46];
|
|
118
|
+
t4 = true;
|
|
119
|
+
t5 = as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
64
120
|
as,
|
|
65
|
-
|
|
66
|
-
className: clsx(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
...headerProps,
|
|
122
|
+
className: clsx(headerProps.className, inputSideCva({
|
|
123
|
+
size: "default",
|
|
124
|
+
type: "left"
|
|
125
|
+
}))
|
|
126
|
+
});
|
|
127
|
+
$[12] = as;
|
|
128
|
+
$[13] = className;
|
|
129
|
+
$[14] = error;
|
|
130
|
+
$[15] = formFieldProps;
|
|
131
|
+
$[16] = headerClassName;
|
|
132
|
+
$[17] = helperText;
|
|
133
|
+
$[18] = inputSideCva;
|
|
134
|
+
$[19] = isClearable;
|
|
135
|
+
$[20] = isDisabled;
|
|
136
|
+
$[21] = isRequired;
|
|
137
|
+
$[22] = label;
|
|
138
|
+
$[23] = labelProps;
|
|
139
|
+
$[24] = rightContent;
|
|
140
|
+
$[25] = t2;
|
|
141
|
+
$[26] = textAreaWrapperCva;
|
|
142
|
+
$[27] = tooltipText;
|
|
143
|
+
$[28] = value;
|
|
144
|
+
$[29] = T0;
|
|
145
|
+
$[30] = T1;
|
|
146
|
+
$[31] = showClear;
|
|
147
|
+
$[32] = t10;
|
|
148
|
+
$[33] = t11;
|
|
149
|
+
$[34] = t12;
|
|
150
|
+
$[35] = t13;
|
|
151
|
+
$[36] = t3;
|
|
152
|
+
$[37] = t4;
|
|
153
|
+
$[38] = t5;
|
|
154
|
+
$[39] = t6;
|
|
155
|
+
$[40] = t7;
|
|
156
|
+
$[41] = t8;
|
|
157
|
+
$[42] = t9;
|
|
158
|
+
} else {
|
|
159
|
+
T0 = $[29];
|
|
160
|
+
T1 = $[30];
|
|
161
|
+
showClear = $[31];
|
|
162
|
+
t10 = $[32];
|
|
163
|
+
t11 = $[33];
|
|
164
|
+
t12 = $[34];
|
|
165
|
+
t13 = $[35];
|
|
166
|
+
t3 = $[36];
|
|
167
|
+
t4 = $[37];
|
|
168
|
+
t5 = $[38];
|
|
169
|
+
t6 = $[39];
|
|
170
|
+
t7 = $[40];
|
|
171
|
+
t8 = $[41];
|
|
172
|
+
t9 = $[42];
|
|
173
|
+
}
|
|
174
|
+
const T2 = TextArea;
|
|
175
|
+
const t14 = isDirty || void 0;
|
|
176
|
+
const t15 = isRequired || void 0;
|
|
177
|
+
let t16;
|
|
178
|
+
if ($[47] !== value) {
|
|
179
|
+
t16 = value?.trim() === "" || value === null || value === void 0 || void 0;
|
|
180
|
+
$[47] = value;
|
|
181
|
+
$[48] = t16;
|
|
182
|
+
} else t16 = $[48];
|
|
183
|
+
const t17 = as === "floating" ? "" : inputProps.placeholder;
|
|
184
|
+
const t18 = inputCva({
|
|
185
|
+
variant,
|
|
186
|
+
as,
|
|
187
|
+
...rest,
|
|
188
|
+
className: clsx("block h-full min-h-8", inputClassName)
|
|
107
189
|
});
|
|
190
|
+
let t19;
|
|
191
|
+
if ($[49] !== T2 || $[50] !== inputProps || $[51] !== ref || $[52] !== t14 || $[53] !== t15 || $[54] !== t16 || $[55] !== t17 || $[56] !== t18) {
|
|
192
|
+
t19 = /* @__PURE__ */ jsx(T2, {
|
|
193
|
+
...inputProps,
|
|
194
|
+
"data-is-dirty": t14,
|
|
195
|
+
"data-is-required": t15,
|
|
196
|
+
"data-is-empty": t16,
|
|
197
|
+
placeholder: t17,
|
|
198
|
+
className: t18,
|
|
199
|
+
ref
|
|
200
|
+
});
|
|
201
|
+
$[49] = T2;
|
|
202
|
+
$[50] = inputProps;
|
|
203
|
+
$[51] = ref;
|
|
204
|
+
$[52] = t14;
|
|
205
|
+
$[53] = t15;
|
|
206
|
+
$[54] = t16;
|
|
207
|
+
$[55] = t17;
|
|
208
|
+
$[56] = t18;
|
|
209
|
+
$[57] = t19;
|
|
210
|
+
} else t19 = $[57];
|
|
211
|
+
let t20;
|
|
212
|
+
if ($[58] !== inputSizeCva || $[59] !== onBlur || $[60] !== onChange || $[61] !== showClear) {
|
|
213
|
+
t20 = showClear && /* @__PURE__ */ jsx("span", {
|
|
214
|
+
className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })),
|
|
215
|
+
children: /* @__PURE__ */ jsx(InputClear, {
|
|
216
|
+
onClear: () => {
|
|
217
|
+
onChange?.("");
|
|
218
|
+
onBlur?.(null);
|
|
219
|
+
},
|
|
220
|
+
show: true
|
|
221
|
+
})
|
|
222
|
+
});
|
|
223
|
+
$[58] = inputSizeCva;
|
|
224
|
+
$[59] = onBlur;
|
|
225
|
+
$[60] = onChange;
|
|
226
|
+
$[61] = showClear;
|
|
227
|
+
$[62] = t20;
|
|
228
|
+
} else t20 = $[62];
|
|
229
|
+
let t21;
|
|
230
|
+
if ($[63] !== t19 || $[64] !== t20 || $[65] !== t3 || $[66] !== t4 || $[67] !== t5) {
|
|
231
|
+
t21 = /* @__PURE__ */ jsxs("div", {
|
|
232
|
+
className: t3,
|
|
233
|
+
"data-text-area": t4,
|
|
234
|
+
children: [
|
|
235
|
+
t5,
|
|
236
|
+
t19,
|
|
237
|
+
t20
|
|
238
|
+
]
|
|
239
|
+
});
|
|
240
|
+
$[63] = t19;
|
|
241
|
+
$[64] = t20;
|
|
242
|
+
$[65] = t3;
|
|
243
|
+
$[66] = t4;
|
|
244
|
+
$[67] = t5;
|
|
245
|
+
$[68] = t21;
|
|
246
|
+
} else t21 = $[68];
|
|
247
|
+
let t22;
|
|
248
|
+
if ($[69] !== T0 || $[70] !== t10 || $[71] !== t21 || $[72] !== t6 || $[73] !== t7 || $[74] !== t8 || $[75] !== t9) {
|
|
249
|
+
t22 = /* @__PURE__ */ jsx(T0, {
|
|
250
|
+
...t6,
|
|
251
|
+
as: t7,
|
|
252
|
+
labelProps: t8,
|
|
253
|
+
className: t9,
|
|
254
|
+
tabIndex: t10,
|
|
255
|
+
children: t21
|
|
256
|
+
});
|
|
257
|
+
$[69] = T0;
|
|
258
|
+
$[70] = t10;
|
|
259
|
+
$[71] = t21;
|
|
260
|
+
$[72] = t6;
|
|
261
|
+
$[73] = t7;
|
|
262
|
+
$[74] = t8;
|
|
263
|
+
$[75] = t9;
|
|
264
|
+
$[76] = t22;
|
|
265
|
+
} else t22 = $[76];
|
|
266
|
+
let t23;
|
|
267
|
+
if ($[77] !== T1 || $[78] !== t11 || $[79] !== t12 || $[80] !== t13 || $[81] !== t22) {
|
|
268
|
+
t23 = /* @__PURE__ */ jsx(T1, {
|
|
269
|
+
as: t11,
|
|
270
|
+
error: t12,
|
|
271
|
+
triggerTabIndex: t13,
|
|
272
|
+
children: t22
|
|
273
|
+
});
|
|
274
|
+
$[77] = T1;
|
|
275
|
+
$[78] = t11;
|
|
276
|
+
$[79] = t12;
|
|
277
|
+
$[80] = t13;
|
|
278
|
+
$[81] = t22;
|
|
279
|
+
$[82] = t23;
|
|
280
|
+
} else t23 = $[82];
|
|
281
|
+
return t23;
|
|
108
282
|
};
|
|
109
283
|
var TextArea$1 = (props) => {
|
|
284
|
+
const $ = c(15);
|
|
110
285
|
if ("formControl" in props && props.formControl) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
286
|
+
let formControl;
|
|
287
|
+
let innerProps;
|
|
288
|
+
let ref;
|
|
289
|
+
if ($[0] !== props) {
|
|
290
|
+
({formControl, ref, ...innerProps} = props);
|
|
291
|
+
$[0] = props;
|
|
292
|
+
$[1] = formControl;
|
|
293
|
+
$[2] = innerProps;
|
|
294
|
+
$[3] = ref;
|
|
295
|
+
} else {
|
|
296
|
+
formControl = $[1];
|
|
297
|
+
innerProps = $[2];
|
|
298
|
+
ref = $[3];
|
|
299
|
+
}
|
|
300
|
+
let t0;
|
|
301
|
+
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
302
|
+
t0 = (t1) => {
|
|
303
|
+
const { field, fieldState: t2 } = t1;
|
|
304
|
+
const { error, isDirty } = t2;
|
|
305
|
+
return /* @__PURE__ */ jsx(TextAreaBase, {
|
|
306
|
+
...innerProps,
|
|
307
|
+
ref: mergeRefs(ref, field.ref),
|
|
308
|
+
value: field.value ?? "",
|
|
309
|
+
onChange: field.onChange,
|
|
310
|
+
onBlur: field.onBlur,
|
|
311
|
+
isDirty,
|
|
312
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
313
|
+
error: props.error ?? error?.message
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
$[4] = innerProps;
|
|
317
|
+
$[5] = props.error;
|
|
318
|
+
$[6] = props.isDisabled;
|
|
319
|
+
$[7] = ref;
|
|
320
|
+
$[8] = t0;
|
|
321
|
+
} else t0 = $[8];
|
|
322
|
+
let t1;
|
|
323
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
324
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
325
|
+
control: formControl.control,
|
|
326
|
+
name: formControl.name,
|
|
327
|
+
render: t0
|
|
328
|
+
});
|
|
329
|
+
$[9] = formControl.control;
|
|
330
|
+
$[10] = formControl.name;
|
|
331
|
+
$[11] = t0;
|
|
332
|
+
$[12] = t1;
|
|
333
|
+
} else t1 = $[12];
|
|
334
|
+
return t1;
|
|
126
335
|
}
|
|
127
|
-
|
|
336
|
+
let t0;
|
|
337
|
+
if ($[13] !== props) {
|
|
338
|
+
t0 = /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
339
|
+
$[13] = props;
|
|
340
|
+
$[14] = t0;
|
|
341
|
+
} else t0 = $[14];
|
|
342
|
+
return t0;
|
|
128
343
|
};
|
|
129
344
|
//#endregion
|
|
130
345
|
export { TextArea$1 as TextArea };
|
|
@@ -13,9 +13,11 @@ interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<Inp
|
|
|
13
13
|
type?: AllowedHTMLInputTypeAttribute;
|
|
14
14
|
todayIcon?: boolean;
|
|
15
15
|
isDirty?: boolean;
|
|
16
|
+
autoFocusOnMount?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface TextInputProps extends TextInputBaseProps {
|
|
19
|
+
renderStaticInput?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export type ControlledTextInputProps<TFieldValues extends FieldValues> = ControlProps<TextInputProps, TFieldValues>;
|
|
20
|
-
export declare const TextInput: <TFieldValues extends FieldValues>(props: ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const TextInput: <TFieldValues extends FieldValues>({ renderStaticInput, ...props }: ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
export {};
|