@povio/ui 3.4.0-rc.4 → 3.4.0-rc.6
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/Breadcrumbs/Breadcrumbs.js +13 -4
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +6 -3
- package/dist/components/Menu/MenuMobile.js +6 -3
- package/dist/components/Menu/MenuPopover.js +1 -1
- package/dist/components/buttons/IconButton/IconButton.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +3 -3
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.js +1 -1
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +2 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +2 -1
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +2 -1
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +196 -191
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +13 -9
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +7 -11
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +1 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimeField.js +1 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +3 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +46 -44
- package/dist/components/inputs/DateTime/shared/YearPicker.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +46 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/FileUploadContainer.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +5 -2
- package/dist/components/inputs/File/shared/FileUploadContentError.js +8 -5
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +8 -5
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +7 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormField.js +1 -1
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -3
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +6 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +89 -87
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +264 -253
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +5 -4
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +99 -98
- package/dist/components/inputs/Input/TextInput/TextInput.js +92 -90
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +49 -47
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.js +1 -1
- package/dist/components/inputs/Inputs/Inputs.js +1 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/SelectBase.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +55 -53
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +56 -54
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +7 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +6 -3
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +2 -2
- package/dist/components/inputs/Slider/Slider.js +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -3
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +6 -9
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +1 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +9 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +1 -1
- package/dist/components/inputs/Toggle/Toggle.js +1 -1
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +7 -4
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/TooltipWrapper.js +1 -1
- package/dist/components/inputs/shared/form.binding.js +1 -1
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- package/dist/components/navigation/Accordion/AccordionItem.js +5 -2
- package/dist/components/navigation/Stepper/StepperItem.js +6 -3
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +6 -3
- package/dist/components/overlays/Drawer/Drawer.js +1 -1
- package/dist/components/overlays/Modal/Modal.js +2 -2
- package/dist/components/overlays/Tooltip/Tooltip.js +14 -5
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.js +1 -1
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +6 -9
- package/dist/components/status/Loader/Loader.js +1 -1
- package/dist/components/status/Toast/Toast.js +1 -1
- package/dist/components/status/Toast/useToast.js +1 -1
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/PaginatedTable.js +1 -1
- package/dist/components/table/Table.js +148 -40
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +5 -2
- package/dist/components/text/Tag/Tag.js +5 -2
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/uiConfig.context.js +13 -6
- package/dist/config/uiOverrides.context.js +1 -1
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.js +1 -1
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.js +1 -40
- package/dist/node_modules/.pnpm/react-icons-sprite@1.1.1_lucide-react@1.28.0_react@19.2.3__react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-icons-sprite/dist/icon.js +15 -0
- package/dist/react-icons-sprite-4cbd6962.svg +1 -0
- package/dist/rhf/Inputs.js +1 -1
- package/dist/rhf.d.ts +0 -39
- package/dist/tanstack.d.ts +0 -39
- package/dist/tanstack.js +1 -40
- package/package.json +2 -1
- package/dist/assets/icons/Account.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.d.ts +0 -2
- package/dist/assets/icons/AlignCenter.js +0 -30
- package/dist/assets/icons/AlignLeft.d.ts +0 -2
- package/dist/assets/icons/AlignLeft.js +0 -30
- package/dist/assets/icons/AlignLeftRight.d.ts +0 -2
- package/dist/assets/icons/AlignLeftRight.js +0 -30
- package/dist/assets/icons/AlignRight.d.ts +0 -2
- package/dist/assets/icons/AlignRight.js +0 -30
- package/dist/assets/icons/ArrowDropDown.d.ts +0 -2
- package/dist/assets/icons/ArrowDropDown.js +0 -30
- package/dist/assets/icons/ArrowDropUp.d.ts +0 -2
- package/dist/assets/icons/ArrowDropUp.js +0 -30
- package/dist/assets/icons/ArrowLeft.d.ts +0 -2
- package/dist/assets/icons/ArrowLeft.js +0 -30
- package/dist/assets/icons/ArrowRight.d.ts +0 -2
- package/dist/assets/icons/ArrowRight.js +0 -30
- package/dist/assets/icons/Board.d.ts +0 -2
- package/dist/assets/icons/Bold.d.ts +0 -2
- package/dist/assets/icons/Bold.js +0 -30
- package/dist/assets/icons/BulletedList.d.ts +0 -2
- package/dist/assets/icons/BulletedList.js +0 -30
- package/dist/assets/icons/Calendar.d.ts +0 -2
- package/dist/assets/icons/Calendar.js +0 -32
- package/dist/assets/icons/Check.d.ts +0 -2
- package/dist/assets/icons/Check.js +0 -32
- package/dist/assets/icons/CheckCircle.d.ts +0 -2
- package/dist/assets/icons/CheckCircle.js +0 -30
- package/dist/assets/icons/CheckboxCheckmark.d.ts +0 -2
- package/dist/assets/icons/CheckboxCheckmark.js +0 -33
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +0 -2
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -33
- package/dist/assets/icons/ChevronDown.d.ts +0 -2
- package/dist/assets/icons/ChevronDown.js +0 -32
- package/dist/assets/icons/ChevronLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronLeft.js +0 -32
- package/dist/assets/icons/ChevronRight.d.ts +0 -2
- package/dist/assets/icons/ChevronRight.js +0 -32
- package/dist/assets/icons/ChevronUp.d.ts +0 -2
- package/dist/assets/icons/ChevronUp.js +0 -32
- package/dist/assets/icons/ChevronsLeft.d.ts +0 -2
- package/dist/assets/icons/ChevronsLeft.js +0 -32
- package/dist/assets/icons/ChevronsRight.d.ts +0 -2
- package/dist/assets/icons/ChevronsRight.js +0 -32
- package/dist/assets/icons/Clock.d.ts +0 -2
- package/dist/assets/icons/Clock.js +0 -30
- package/dist/assets/icons/Close.d.ts +0 -2
- package/dist/assets/icons/Close.js +0 -30
- package/dist/assets/icons/DateTime.d.ts +0 -2
- package/dist/assets/icons/DateTime.js +0 -39
- package/dist/assets/icons/DragIndicator.d.ts +0 -2
- package/dist/assets/icons/DragIndicator.js +0 -30
- package/dist/assets/icons/Edit.d.ts +0 -2
- package/dist/assets/icons/Emoji.d.ts +0 -2
- package/dist/assets/icons/File.d.ts +0 -2
- package/dist/assets/icons/File.js +0 -32
- package/dist/assets/icons/Grid.d.ts +0 -2
- package/dist/assets/icons/Highlight.d.ts +0 -2
- package/dist/assets/icons/Highlight.js +0 -30
- package/dist/assets/icons/HighlightOn.d.ts +0 -6
- package/dist/assets/icons/HighlightOn.js +0 -55
- package/dist/assets/icons/Home.d.ts +0 -2
- package/dist/assets/icons/Home.js +0 -30
- package/dist/assets/icons/Image.d.ts +0 -2
- package/dist/assets/icons/ImageError.d.ts +0 -2
- package/dist/assets/icons/Info.d.ts +0 -2
- package/dist/assets/icons/Info.js +0 -41
- package/dist/assets/icons/Italic.d.ts +0 -2
- package/dist/assets/icons/Italic.js +0 -30
- package/dist/assets/icons/Link.d.ts +0 -2
- package/dist/assets/icons/Link.js +0 -30
- package/dist/assets/icons/Loader.d.ts +0 -2
- package/dist/assets/icons/MapPin.d.ts +0 -2
- package/dist/assets/icons/Menu.d.ts +0 -2
- package/dist/assets/icons/Menu.js +0 -30
- package/dist/assets/icons/Minus.d.ts +0 -2
- package/dist/assets/icons/MoreHoriz.d.ts +0 -2
- package/dist/assets/icons/NumberedList.d.ts +0 -2
- package/dist/assets/icons/NumberedList.js +0 -30
- package/dist/assets/icons/Pause.d.ts +0 -2
- package/dist/assets/icons/Plus.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.d.ts +0 -2
- package/dist/assets/icons/PointerHorizontal.js +0 -30
- package/dist/assets/icons/PointerVertical.d.ts +0 -2
- package/dist/assets/icons/PointerVertical.js +0 -30
- package/dist/assets/icons/Retry.d.ts +0 -2
- package/dist/assets/icons/Search.d.ts +0 -2
- package/dist/assets/icons/Search.js +0 -30
- package/dist/assets/icons/Send.d.ts +0 -2
- package/dist/assets/icons/Send.js +0 -32
- package/dist/assets/icons/Share.d.ts +0 -2
- package/dist/assets/icons/Slash.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.d.ts +0 -2
- package/dist/assets/icons/Strikethrough.js +0 -30
- package/dist/assets/icons/TextColor.d.ts +0 -6
- package/dist/assets/icons/TextColor.js +0 -52
- package/dist/assets/icons/Today.d.ts +0 -2
- package/dist/assets/icons/Today.js +0 -30
- package/dist/assets/icons/Trash.d.ts +0 -2
- package/dist/assets/icons/Underlined.d.ts +0 -2
- package/dist/assets/icons/Underlined.js +0 -32
- package/dist/assets/icons/Upload.d.ts +0 -2
- package/dist/assets/icons/Upload.js +0 -39
- package/dist/assets/icons/User.d.ts +0 -2
- package/dist/assets/icons/Visibility.d.ts +0 -2
- package/dist/assets/icons/Visibility.js +0 -30
- package/dist/assets/icons/VisibilityOff.d.ts +0 -2
- package/dist/assets/icons/VisibilityOff.js +0 -30
- package/dist/assets/icons/WarningFilled.d.ts +0 -2
- package/dist/assets/icons/WarningFilled.js +0 -32
- package/dist/assets/icons/WarningOutlined.d.ts +0 -2
|
@@ -22,6 +22,7 @@ interface NumberRangeInputBaseProps extends FormFieldProps, InputVariantProps, O
|
|
|
22
22
|
hideInnerLabels?: boolean;
|
|
23
23
|
isDirty?: boolean;
|
|
24
24
|
isClearable?: boolean;
|
|
25
|
+
isClearableIfDisabled?: boolean;
|
|
25
26
|
autoFocusOnMount?: boolean;
|
|
26
27
|
onChange?: (value: NumberRangeValue) => void;
|
|
27
28
|
onMinChange?: (value: number | null) => void;
|
|
@@ -9,11 +9,11 @@ import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
|
9
9
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
10
10
|
import { getStaticNumberDisplayValue } from "../shared/numberStatic.utils.js";
|
|
11
11
|
import { NumberRangeField } from "./NumberRangeField.js";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
13
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { clsx } from "clsx";
|
|
15
14
|
import { useRef, useState } from "react";
|
|
16
15
|
import { useLocale } from "react-aria-components";
|
|
16
|
+
import { c } from "react/compiler-runtime";
|
|
17
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
18
18
|
//#region src/components/inputs/Input/NumberRangeInput/NumberRangeInput.tsx
|
|
19
19
|
var EMPTY_RANGE = {
|
|
@@ -31,7 +31,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
31
31
|
const ui = UIConfig.useConfig();
|
|
32
32
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
33
33
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
34
|
-
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder = "Min", maxPlaceholder = "Max", minLabel = "Minimum", maxLabel = "Maximum", invalidRangeError = "Minimum cannot be greater than maximum", hideInnerLabels = true, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest } = props;
|
|
34
|
+
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, inputClassName, minInputClassName, maxInputClassName, value, minValue, maxValue, minPlaceholder = "Min", maxPlaceholder = "Max", minLabel = "Minimum", maxLabel = "Maximum", invalidRangeError = "Minimum cannot be greater than maximum", hideInnerLabels = true, isDirty, autoFocusOnMount, onChange, onMinChange, onMaxChange, onBlur, isClearable: isClearableProps, isClearableIfDisabled, as: asProp, variant: variantProps, size: sizeProps, hideLabel: hideLabelProps, ...rest } = props;
|
|
35
35
|
const isClearable = isClearableProps ?? ui.input.isClearable;
|
|
36
36
|
const as = asProp ?? ui.input.as;
|
|
37
37
|
const variant = variantProps ?? ui.input.variant;
|
|
@@ -108,6 +108,7 @@ var NumberRangeInputBase = (props) => {
|
|
|
108
108
|
hideInnerLabels,
|
|
109
109
|
isDirty,
|
|
110
110
|
isClearable,
|
|
111
|
+
isClearableIfDisabled,
|
|
111
112
|
autoFocusOnMount,
|
|
112
113
|
isDisabled,
|
|
113
114
|
isRequired,
|
|
@@ -203,7 +204,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
203
204
|
className: clsx("w-full min-w-0 bg-transparent outline-none", props.minInputClassName),
|
|
204
205
|
...dataAttributeProps,
|
|
205
206
|
"data-rac": true
|
|
206
|
-
}), isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
207
|
+
}), isClearable && (!isDisabled || props.isClearableIfDisabled === true) && /* @__PURE__ */ jsx(InputClear, {
|
|
207
208
|
onClear: _temp,
|
|
208
209
|
show: staticValue.min !== null,
|
|
209
210
|
renderStatic: true
|
|
@@ -233,7 +234,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
233
234
|
className: clsx("w-full min-w-0 bg-transparent outline-none", props.maxInputClassName),
|
|
234
235
|
...dataAttributeProps,
|
|
235
236
|
"data-rac": true
|
|
236
|
-
}), isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
237
|
+
}), isClearable && (!isDisabled || props.isClearableIfDisabled === true) && /* @__PURE__ */ jsx(InputClear, {
|
|
237
238
|
onClear: _temp2,
|
|
238
239
|
show: staticValue.max !== null,
|
|
239
240
|
renderStatic: true
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { VisibilityIcon } from "../../../../assets/icons/Visibility.js";
|
|
2
|
-
import { VisibilityOffIcon } from "../../../../assets/icons/VisibilityOff.js";
|
|
3
1
|
import "../../../../config/i18n.js";
|
|
4
2
|
import { TextInput } from "../TextInput/TextInput.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
3
|
import { jsx } from "react/jsx-runtime";
|
|
7
4
|
import { useState } from "react";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { Eye, EyeOff } from "lucide-react";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/inputs/Input/PasswordInput/PasswordInput.tsx
|
|
10
9
|
var PasswordInput = (props) => {
|
|
@@ -12,7 +11,7 @@ var PasswordInput = (props) => {
|
|
|
12
11
|
const { t } = useTranslation("ui");
|
|
13
12
|
const [isRevealed, setIsRevealed] = useState(false);
|
|
14
13
|
const t0 = isRevealed ? "text" : "password";
|
|
15
|
-
const t1 = isRevealed ?
|
|
14
|
+
const t1 = isRevealed ? Eye : EyeOff;
|
|
16
15
|
let t2;
|
|
17
16
|
if ($0[0] !== isRevealed) {
|
|
18
17
|
t2 = ($) => isRevealed ? $.ui.password.hide : $.ui.password.reveal;
|
|
@@ -8,6 +8,7 @@ import { InputVariantProps } from '../../shared/input.cva';
|
|
|
8
8
|
interface TextAreaBaseProps extends FormFieldProps, InputVariantProps, Omit<AriaTextAreaProps, "value" | "defaultValue" | "onChange" | "disabled" | "required" | "className" | keyof AriaTextFieldProps>, Omit<AriaTextFieldProps<HTMLTextAreaElement>, "label"> {
|
|
9
9
|
ref?: Ref<HTMLTextAreaElement>;
|
|
10
10
|
isClearable?: boolean;
|
|
11
|
+
isClearableIfDisabled?: boolean;
|
|
11
12
|
isDirty?: boolean;
|
|
12
13
|
inputClassName?: string;
|
|
13
14
|
}
|
|
@@ -7,22 +7,22 @@ import { inputSideDefinition, inputSizeDefinition, useInputCva } from "../../sha
|
|
|
7
7
|
import { InputClear } from "../../shared/InputClear.js";
|
|
8
8
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
9
9
|
import { textAreaWrapperDefinition } from "./TextArea.cva.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
12
|
import { useRef } from "react";
|
|
14
13
|
import { TextArea } from "react-aria-components";
|
|
14
|
+
import { c } from "react/compiler-runtime";
|
|
15
15
|
import { useTextField } from "react-aria";
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
//#region src/components/inputs/Input/TextArea/TextArea.tsx
|
|
18
18
|
var TextAreaBase = (props) => {
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(84);
|
|
20
20
|
const ui = UIConfig.useConfig();
|
|
21
21
|
const inputCva = useInputCva();
|
|
22
22
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
23
23
|
const inputSideCva = UIOverrides.useCva("input.sideCva", inputSideDefinition);
|
|
24
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;
|
|
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, isClearableIfDisabled, ...rest } = props;
|
|
26
26
|
const as = asProp ?? ui.input.as;
|
|
27
27
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
28
28
|
const variant = variantProp ?? ui.input.variant;
|
|
@@ -83,7 +83,7 @@ var TextAreaBase = (props) => {
|
|
|
83
83
|
let t7;
|
|
84
84
|
let t8;
|
|
85
85
|
let t9;
|
|
86
|
-
if ($[12] !== as || $[13] !== className || $[14] !== error || $[15] !== formFieldProps || $[16] !== headerClassName || $[17] !== helperText || $[18] !== inputSideCva || $[19] !== isClearable || $[20] !==
|
|
86
|
+
if ($[12] !== as || $[13] !== className || $[14] !== error || $[15] !== formFieldProps || $[16] !== headerClassName || $[17] !== helperText || $[18] !== inputSideCva || $[19] !== isClearable || $[20] !== isClearableIfDisabled || $[21] !== isDisabled || $[22] !== isRequired || $[23] !== label || $[24] !== labelProps || $[25] !== rightContent || $[26] !== t2 || $[27] !== textAreaWrapperCva || $[28] !== tooltipText || $[29] !== value) {
|
|
87
87
|
const headerProps = {
|
|
88
88
|
label,
|
|
89
89
|
tooltipText,
|
|
@@ -95,7 +95,7 @@ var TextAreaBase = (props) => {
|
|
|
95
95
|
className: headerClassName,
|
|
96
96
|
labelProps
|
|
97
97
|
};
|
|
98
|
-
showClear = isClearable && value != null && value !== "" && !isDisabled;
|
|
98
|
+
showClear = isClearable && value != null && value !== "" && (!isDisabled || isClearableIfDisabled === true);
|
|
99
99
|
T1 = TooltipWrapper;
|
|
100
100
|
t11 = as;
|
|
101
101
|
t12 = error;
|
|
@@ -104,17 +104,17 @@ var TextAreaBase = (props) => {
|
|
|
104
104
|
t6 = formFieldProps;
|
|
105
105
|
t7 = as;
|
|
106
106
|
t8 = labelProps;
|
|
107
|
-
if ($[
|
|
107
|
+
if ($[44] !== className) {
|
|
108
108
|
t9 = clsx("group w-full flex flex-col", className);
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
} else t9 = $[
|
|
109
|
+
$[44] = className;
|
|
110
|
+
$[45] = t9;
|
|
111
|
+
} else t9 = $[45];
|
|
112
112
|
t10 = as === "inline" ? -1 : void 0;
|
|
113
|
-
if ($[
|
|
113
|
+
if ($[46] !== textAreaWrapperCva) {
|
|
114
114
|
t3 = textAreaWrapperCva({});
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
} else t3 = $[
|
|
115
|
+
$[46] = textAreaWrapperCva;
|
|
116
|
+
$[47] = t3;
|
|
117
|
+
} else t3 = $[47];
|
|
118
118
|
t4 = true;
|
|
119
119
|
t5 = as === "floating" && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
120
120
|
as,
|
|
@@ -132,54 +132,55 @@ var TextAreaBase = (props) => {
|
|
|
132
132
|
$[17] = helperText;
|
|
133
133
|
$[18] = inputSideCva;
|
|
134
134
|
$[19] = isClearable;
|
|
135
|
-
$[20] =
|
|
136
|
-
$[21] =
|
|
137
|
-
$[22] =
|
|
138
|
-
$[23] =
|
|
139
|
-
$[24] =
|
|
140
|
-
$[25] =
|
|
141
|
-
$[26] =
|
|
142
|
-
$[27] =
|
|
143
|
-
$[28] =
|
|
144
|
-
$[29] =
|
|
145
|
-
$[30] =
|
|
146
|
-
$[31] =
|
|
147
|
-
$[32] =
|
|
148
|
-
$[33] =
|
|
149
|
-
$[34] =
|
|
150
|
-
$[35] =
|
|
151
|
-
$[36] =
|
|
152
|
-
$[37] =
|
|
153
|
-
$[38] =
|
|
154
|
-
$[39] =
|
|
155
|
-
$[40] =
|
|
156
|
-
$[41] =
|
|
157
|
-
$[42] =
|
|
135
|
+
$[20] = isClearableIfDisabled;
|
|
136
|
+
$[21] = isDisabled;
|
|
137
|
+
$[22] = isRequired;
|
|
138
|
+
$[23] = label;
|
|
139
|
+
$[24] = labelProps;
|
|
140
|
+
$[25] = rightContent;
|
|
141
|
+
$[26] = t2;
|
|
142
|
+
$[27] = textAreaWrapperCva;
|
|
143
|
+
$[28] = tooltipText;
|
|
144
|
+
$[29] = value;
|
|
145
|
+
$[30] = T0;
|
|
146
|
+
$[31] = T1;
|
|
147
|
+
$[32] = showClear;
|
|
148
|
+
$[33] = t10;
|
|
149
|
+
$[34] = t11;
|
|
150
|
+
$[35] = t12;
|
|
151
|
+
$[36] = t13;
|
|
152
|
+
$[37] = t3;
|
|
153
|
+
$[38] = t4;
|
|
154
|
+
$[39] = t5;
|
|
155
|
+
$[40] = t6;
|
|
156
|
+
$[41] = t7;
|
|
157
|
+
$[42] = t8;
|
|
158
|
+
$[43] = t9;
|
|
158
159
|
} else {
|
|
159
|
-
T0 = $[
|
|
160
|
-
T1 = $[
|
|
161
|
-
showClear = $[
|
|
162
|
-
t10 = $[
|
|
163
|
-
t11 = $[
|
|
164
|
-
t12 = $[
|
|
165
|
-
t13 = $[
|
|
166
|
-
t3 = $[
|
|
167
|
-
t4 = $[
|
|
168
|
-
t5 = $[
|
|
169
|
-
t6 = $[
|
|
170
|
-
t7 = $[
|
|
171
|
-
t8 = $[
|
|
172
|
-
t9 = $[
|
|
160
|
+
T0 = $[30];
|
|
161
|
+
T1 = $[31];
|
|
162
|
+
showClear = $[32];
|
|
163
|
+
t10 = $[33];
|
|
164
|
+
t11 = $[34];
|
|
165
|
+
t12 = $[35];
|
|
166
|
+
t13 = $[36];
|
|
167
|
+
t3 = $[37];
|
|
168
|
+
t4 = $[38];
|
|
169
|
+
t5 = $[39];
|
|
170
|
+
t6 = $[40];
|
|
171
|
+
t7 = $[41];
|
|
172
|
+
t8 = $[42];
|
|
173
|
+
t9 = $[43];
|
|
173
174
|
}
|
|
174
175
|
const T2 = TextArea;
|
|
175
176
|
const t14 = isDirty || void 0;
|
|
176
177
|
const t15 = isRequired || void 0;
|
|
177
178
|
let t16;
|
|
178
|
-
if ($[
|
|
179
|
+
if ($[48] !== value) {
|
|
179
180
|
t16 = value?.trim() === "" || value === null || value === void 0 || void 0;
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else t16 = $[
|
|
181
|
+
$[48] = value;
|
|
182
|
+
$[49] = t16;
|
|
183
|
+
} else t16 = $[49];
|
|
183
184
|
const t17 = as === "floating" ? "" : inputProps.placeholder;
|
|
184
185
|
const t18 = inputCva({
|
|
185
186
|
variant,
|
|
@@ -188,7 +189,7 @@ var TextAreaBase = (props) => {
|
|
|
188
189
|
className: clsx("block h-full min-h-8", inputClassName)
|
|
189
190
|
});
|
|
190
191
|
let t19;
|
|
191
|
-
if ($[
|
|
192
|
+
if ($[50] !== T2 || $[51] !== inputProps || $[52] !== ref || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t17 || $[57] !== t18) {
|
|
192
193
|
t19 = /* @__PURE__ */ jsx(T2, {
|
|
193
194
|
...inputProps,
|
|
194
195
|
"data-is-dirty": t14,
|
|
@@ -198,18 +199,18 @@ var TextAreaBase = (props) => {
|
|
|
198
199
|
className: t18,
|
|
199
200
|
ref
|
|
200
201
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
} else t19 = $[
|
|
202
|
+
$[50] = T2;
|
|
203
|
+
$[51] = inputProps;
|
|
204
|
+
$[52] = ref;
|
|
205
|
+
$[53] = t14;
|
|
206
|
+
$[54] = t15;
|
|
207
|
+
$[55] = t16;
|
|
208
|
+
$[56] = t17;
|
|
209
|
+
$[57] = t18;
|
|
210
|
+
$[58] = t19;
|
|
211
|
+
} else t19 = $[58];
|
|
211
212
|
let t20;
|
|
212
|
-
if ($[
|
|
213
|
+
if ($[59] !== inputSizeCva || $[60] !== onBlur || $[61] !== onChange || $[62] !== showClear) {
|
|
213
214
|
t20 = showClear && /* @__PURE__ */ jsx("span", {
|
|
214
215
|
className: clsx("absolute top-0 right-0", inputSizeCva({ size: "default" })),
|
|
215
216
|
children: /* @__PURE__ */ jsx(InputClear, {
|
|
@@ -220,14 +221,14 @@ var TextAreaBase = (props) => {
|
|
|
220
221
|
show: true
|
|
221
222
|
})
|
|
222
223
|
});
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
} else t20 = $[
|
|
224
|
+
$[59] = inputSizeCva;
|
|
225
|
+
$[60] = onBlur;
|
|
226
|
+
$[61] = onChange;
|
|
227
|
+
$[62] = showClear;
|
|
228
|
+
$[63] = t20;
|
|
229
|
+
} else t20 = $[63];
|
|
229
230
|
let t21;
|
|
230
|
-
if ($[
|
|
231
|
+
if ($[64] !== t19 || $[65] !== t20 || $[66] !== t3 || $[67] !== t4 || $[68] !== t5) {
|
|
231
232
|
t21 = /* @__PURE__ */ jsxs("div", {
|
|
232
233
|
className: t3,
|
|
233
234
|
"data-text-area": t4,
|
|
@@ -237,15 +238,15 @@ var TextAreaBase = (props) => {
|
|
|
237
238
|
t20
|
|
238
239
|
]
|
|
239
240
|
});
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else t21 = $[
|
|
241
|
+
$[64] = t19;
|
|
242
|
+
$[65] = t20;
|
|
243
|
+
$[66] = t3;
|
|
244
|
+
$[67] = t4;
|
|
245
|
+
$[68] = t5;
|
|
246
|
+
$[69] = t21;
|
|
247
|
+
} else t21 = $[69];
|
|
247
248
|
let t22;
|
|
248
|
-
if ($[
|
|
249
|
+
if ($[70] !== T0 || $[71] !== t10 || $[72] !== t21 || $[73] !== t6 || $[74] !== t7 || $[75] !== t8 || $[76] !== t9) {
|
|
249
250
|
t22 = /* @__PURE__ */ jsx(T0, {
|
|
250
251
|
...t6,
|
|
251
252
|
as: t7,
|
|
@@ -254,30 +255,30 @@ var TextAreaBase = (props) => {
|
|
|
254
255
|
tabIndex: t10,
|
|
255
256
|
children: t21
|
|
256
257
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
} else t22 = $[
|
|
258
|
+
$[70] = T0;
|
|
259
|
+
$[71] = t10;
|
|
260
|
+
$[72] = t21;
|
|
261
|
+
$[73] = t6;
|
|
262
|
+
$[74] = t7;
|
|
263
|
+
$[75] = t8;
|
|
264
|
+
$[76] = t9;
|
|
265
|
+
$[77] = t22;
|
|
266
|
+
} else t22 = $[77];
|
|
266
267
|
let t23;
|
|
267
|
-
if ($[
|
|
268
|
+
if ($[78] !== T1 || $[79] !== t11 || $[80] !== t12 || $[81] !== t13 || $[82] !== t22) {
|
|
268
269
|
t23 = /* @__PURE__ */ jsx(T1, {
|
|
269
270
|
as: t11,
|
|
270
271
|
error: t12,
|
|
271
272
|
triggerTabIndex: t13,
|
|
272
273
|
children: t22
|
|
273
274
|
});
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else t23 = $[
|
|
275
|
+
$[78] = T1;
|
|
276
|
+
$[79] = t11;
|
|
277
|
+
$[80] = t12;
|
|
278
|
+
$[81] = t13;
|
|
279
|
+
$[82] = t22;
|
|
280
|
+
$[83] = t23;
|
|
281
|
+
} else t23 = $[83];
|
|
281
282
|
return t23;
|
|
282
283
|
};
|
|
283
284
|
var TextArea$1 = (props) => {
|