@povio/ui 2.3.0-rc.9 → 2.3.1
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 +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.js +38 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -172
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +20 -121
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -10
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -215
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -11
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +19 -123
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -5
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +104 -448
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +119 -330
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -283
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -142
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -296
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -6
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -355
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -14
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -97
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +27 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -207
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +44 -87
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.js +9 -48
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +88 -334
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +79 -319
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -16
- package/dist/components/inputs/Inputs/InputItem.js +14 -71
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +60 -352
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -17
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +7 -109
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -34
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +5 -132
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -338
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +34 -57
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.js +74 -250
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.js +37 -189
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +13 -79
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -10
- package/dist/components/inputs/shared/input.cva.js +4 -32
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +49 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +20 -62
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +13 -21
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +27 -28
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +6 -16
- package/dist/config/uiConfig.context.js +13 -56
- package/dist/config/uiStyle.context.d.ts +4 -27
- package/dist/config/uiStyle.context.js +5 -15
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.js +30 -101
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +0 -7
- package/dist/index.js +3 -5
- package/dist/tw-ui-plugin.js +0 -2
- package/dist/utils/date-time.utils.d.ts +10 -31
- package/dist/utils/date-time.utils.js +22 -123
- package/dist/utils/dom.utils.js +1 -1
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -4
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -7
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -6
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -21
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -31
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -80
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -479
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -4
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -36
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -122
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -13
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -79
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -526
- package/dist/components/inputs/shared/StaticInput.d.ts +0 -38
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -57
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -5,8 +5,6 @@ import { InputClear } from "../../shared/InputClear.js";
|
|
|
5
5
|
import { inputSide, inputSize, useInputCva } from "../../shared/input.cva.js";
|
|
6
6
|
import { FormField } from "../../FormField/FormField.js";
|
|
7
7
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
8
|
-
import { textAreaWrapper } from "./TextArea.cva.js";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
9
|
import { clsx } from "clsx";
|
|
12
10
|
import { useRef } from "react";
|
|
@@ -16,17 +14,11 @@ import { mergeRefs } from "@react-aria/utils";
|
|
|
16
14
|
import { Controller } from "react-hook-form";
|
|
17
15
|
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
18
16
|
var TextAreaBase = (props) => {
|
|
19
|
-
const $ = c(83);
|
|
20
17
|
const ui = UIConfig.useConfig();
|
|
21
18
|
const inputCva = useInputCva();
|
|
22
19
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
23
20
|
const inputSideCva = UIStyle.useCva("input.sideCva", inputSide);
|
|
24
|
-
const
|
|
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;
|
|
21
|
+
const { ref, className, inputClassName, error, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, value, onChange, onBlur, as = ui.input.as, hideLabel = ui.input.hideLabel, variant = ui.input.variant, isClearable = ui.input.isClearable, ...rest } = props;
|
|
30
22
|
const textFieldRef = useRef(null);
|
|
31
23
|
const { labelProps, inputProps } = useTextField({
|
|
32
24
|
...rest,
|
|
@@ -38,308 +30,101 @@ var TextAreaBase = (props) => {
|
|
|
38
30
|
onChange,
|
|
39
31
|
onBlur
|
|
40
32
|
}, textFieldRef);
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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 !== "";
|
|
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("w-full", 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, {
|
|
120
|
-
as,
|
|
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,
|
|
33
|
+
const formFieldProps = {
|
|
34
|
+
error,
|
|
35
|
+
label,
|
|
36
|
+
tooltipText,
|
|
37
|
+
helperText,
|
|
38
|
+
isRequired,
|
|
39
|
+
rightContent,
|
|
40
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
41
|
+
hideLabel,
|
|
42
|
+
isDisabled,
|
|
43
|
+
headerClassName,
|
|
44
|
+
errorClassName
|
|
45
|
+
};
|
|
46
|
+
const headerProps = {
|
|
47
|
+
label,
|
|
48
|
+
tooltipText,
|
|
49
|
+
helperText,
|
|
50
|
+
isRequired,
|
|
51
|
+
rightContent,
|
|
52
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
53
|
+
isDisabled,
|
|
54
|
+
className: headerClassName,
|
|
55
|
+
labelProps
|
|
56
|
+
};
|
|
57
|
+
const showClear = isClearable && value != null && value !== "";
|
|
58
|
+
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
186
59
|
as,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
60
|
+
error,
|
|
61
|
+
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
62
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
63
|
+
...formFieldProps,
|
|
64
|
+
as,
|
|
65
|
+
labelProps,
|
|
66
|
+
className: clsx("w-full", className),
|
|
67
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
68
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
69
|
+
className: "group/text-area relative h-full",
|
|
70
|
+
"data-text-area": true,
|
|
71
|
+
children: [
|
|
72
|
+
as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
73
|
+
as,
|
|
74
|
+
...headerProps,
|
|
75
|
+
className: clsx(headerProps.className, inputSideCva({
|
|
76
|
+
size: "default",
|
|
77
|
+
type: "left"
|
|
78
|
+
}))
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx(TextArea, {
|
|
81
|
+
...inputProps,
|
|
82
|
+
"data-is-dirty": isDirty || void 0,
|
|
83
|
+
"data-is-required": isRequired || void 0,
|
|
84
|
+
"data-is-empty": value?.trim() === "" || value === null || value === void 0 || void 0,
|
|
85
|
+
placeholder: as === "floating" ? "" : inputProps.placeholder,
|
|
86
|
+
className: inputCva({
|
|
87
|
+
variant,
|
|
88
|
+
as,
|
|
89
|
+
...rest,
|
|
90
|
+
className: clsx("block h-full min-h-8", inputClassName)
|
|
91
|
+
}),
|
|
92
|
+
ref
|
|
93
|
+
}),
|
|
94
|
+
showClear && /* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })),
|
|
96
|
+
children: /* @__PURE__ */ jsx(InputClear, {
|
|
97
|
+
onClear: () => {
|
|
98
|
+
onChange?.("");
|
|
99
|
+
onBlur?.(null);
|
|
100
|
+
},
|
|
101
|
+
show: true
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
]
|
|
221
105
|
})
|
|
222
|
-
})
|
|
223
|
-
|
|
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;
|
|
106
|
+
})
|
|
107
|
+
});
|
|
282
108
|
};
|
|
283
109
|
var TextArea$1 = (props) => {
|
|
284
|
-
const $ = c(15);
|
|
285
110
|
if ("formControl" in props && props.formControl) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
({
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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;
|
|
111
|
+
const { formControl, ref, ...innerProps } = props;
|
|
112
|
+
return /* @__PURE__ */ jsx(Controller, {
|
|
113
|
+
control: formControl.control,
|
|
114
|
+
name: formControl.name,
|
|
115
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(TextAreaBase, {
|
|
116
|
+
...innerProps,
|
|
117
|
+
ref: mergeRefs(ref, field.ref),
|
|
118
|
+
value: field.value ?? "",
|
|
119
|
+
onChange: field.onChange,
|
|
120
|
+
onBlur: field.onBlur,
|
|
121
|
+
isDirty,
|
|
122
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
123
|
+
error: props.error ?? error?.message
|
|
124
|
+
})
|
|
125
|
+
});
|
|
335
126
|
}
|
|
336
|
-
|
|
337
|
-
if ($[13] !== props) {
|
|
338
|
-
t0 = /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
339
|
-
$[13] = props;
|
|
340
|
-
$[14] = t0;
|
|
341
|
-
} else t0 = $[14];
|
|
342
|
-
return t0;
|
|
127
|
+
return /* @__PURE__ */ jsx(TextAreaBase, { ...props });
|
|
343
128
|
};
|
|
344
129
|
//#endregion
|
|
345
130
|
export { TextArea$1 as TextArea };
|
|
@@ -13,11 +13,9 @@ interface TextInputBaseProps extends FormFieldProps, InputVariantProps, Omit<Inp
|
|
|
13
13
|
type?: AllowedHTMLInputTypeAttribute;
|
|
14
14
|
todayIcon?: boolean;
|
|
15
15
|
isDirty?: boolean;
|
|
16
|
-
autoFocusOnMount?: boolean;
|
|
17
16
|
}
|
|
18
17
|
export interface TextInputProps extends TextInputBaseProps {
|
|
19
|
-
renderStaticInput?: boolean;
|
|
20
18
|
}
|
|
21
19
|
export type ControlledTextInputProps<TFieldValues extends FieldValues> = ControlProps<TextInputProps, TFieldValues>;
|
|
22
|
-
export declare const TextInput: <TFieldValues extends FieldValues>(
|
|
20
|
+
export declare const TextInput: <TFieldValues extends FieldValues>(props: ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
23
21
|
export {};
|