@povio/ui 3.3.0 → 3.4.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/locales/en/translation.json.d.ts +158 -0
- package/dist/assets/locales/sl/translation.json.d.ts +154 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +95 -102
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +2 -3
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +111 -115
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +17 -22
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +17 -23
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -25
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +225 -238
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +7 -10
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +8 -12
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +8 -16
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +4 -5
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +10 -11
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- 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.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +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 +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +5 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -5
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +109 -107
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +265 -254
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +25 -24
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +3 -4
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +2 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +118 -117
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +2 -1
- package/dist/components/inputs/Input/shared/InputContent.js +50 -48
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +36 -37
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +109 -113
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +58 -56
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +57 -56
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- 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 +5 -4
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +5 -9
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +10 -7
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +5 -8
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +6 -9
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +61 -65
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +45 -28
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +64 -38
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +15 -8
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +6 -9
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +6 -8
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +14 -5
- package/dist/config/uiConfig.context.js +9 -11
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +23 -9
- 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.d.ts +1 -263
- package/dist/index.js +11 -71
- package/dist/rhf/Inputs.d.ts +60 -0
- package/dist/rhf/Inputs.js +148 -0
- package/dist/rhf/components.d.ts +80 -0
- package/dist/rhf/components.js +101 -0
- package/dist/rhf/dynamicInputs.d.ts +18 -0
- package/dist/rhf/dynamicInputs.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +7 -0
- package/dist/rhf/fieldAdapter.js +40 -0
- package/dist/rhf/form.types.d.ts +12 -0
- package/dist/rhf/useAutosave.d.ts +10 -0
- package/dist/rhf/useAutosave.js +71 -0
- package/dist/rhf/useForm.d.ts +18 -0
- package/dist/rhf/useForm.js +48 -0
- package/dist/rhf/useFormAutosave.d.ts +15 -0
- package/dist/rhf/useFormAutosave.js +59 -0
- package/dist/rhf.d.ts +225 -0
- package/dist/tanstack.d.ts +224 -0
- package/dist/tanstack.js +141 -0
- package/package.json +15 -3
- 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
- /package/dist/{hooks/useAutosave.spec.d.ts → rhf/entrypoints.type-test.d.ts} +0 -0
|
@@ -7,16 +7,16 @@ import { SelectContext } from "./select.context.js";
|
|
|
7
7
|
import { SelectInput } from "./SelectInput.js";
|
|
8
8
|
import { SelectListBox } from "./SelectListBox.js";
|
|
9
9
|
import { selectPopoverDefinition } from "./selectDesktop.cva.js";
|
|
10
|
-
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
10
|
import { clsx } from "clsx";
|
|
13
|
-
import { Fragment
|
|
11
|
+
import { Fragment, useLayoutEffect, useRef, useState } from "react";
|
|
14
12
|
import { ComboBox, DialogTrigger, Popover } from "react-aria-components";
|
|
13
|
+
import { c } from "react/compiler-runtime";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import { useLabel, usePreventScroll } from "react-aria";
|
|
16
16
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
17
|
//#region src/components/inputs/Selection/shared/SelectDesktop.tsx
|
|
18
18
|
var SelectDesktop = (t0) => {
|
|
19
|
-
const $ = c(
|
|
19
|
+
const $ = c(130);
|
|
20
20
|
let containerClassName;
|
|
21
21
|
let customTrigger;
|
|
22
22
|
let error;
|
|
@@ -61,7 +61,7 @@ var SelectDesktop = (t0) => {
|
|
|
61
61
|
showSelectionContent = $[12];
|
|
62
62
|
trailingContent = $[13];
|
|
63
63
|
}
|
|
64
|
-
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
64
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, isLoading, as, size, collapseAfter, selectedTagsType } = props;
|
|
65
65
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
66
66
|
const selectPopoverCva = UIOverrides.useCva("select.popoverCva", selectPopoverDefinition);
|
|
67
67
|
const t1 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
@@ -179,7 +179,7 @@ var SelectDesktop = (t0) => {
|
|
|
179
179
|
$[42] = t9;
|
|
180
180
|
} else t9 = $[42];
|
|
181
181
|
const openChangeHandler = t9;
|
|
182
|
-
const WrapperComponent = isSearchable ? ComboBox : Fragment
|
|
182
|
+
const WrapperComponent = isSearchable ? ComboBox : Fragment;
|
|
183
183
|
const t10 = isMultiple ? null : fieldState.value;
|
|
184
184
|
const t11 = fieldState.inputValue;
|
|
185
185
|
const t12 = !!error;
|
|
@@ -280,7 +280,7 @@ var SelectDesktop = (t0) => {
|
|
|
280
280
|
$[77] = t20;
|
|
281
281
|
} else t20 = $[77];
|
|
282
282
|
let t21;
|
|
283
|
-
if ($[78] !== as || $[79] !== className || $[80] !== collapseAfter || $[81] !== customTrigger || $[82] !== dialogTriggerProps || $[83] !== error || $[84] !== fieldProps || $[85] !== headerProps || $[86] !== hideDropdownIcon || $[87] !== inputClassName || $[88] !== isClearable || $[89] !==
|
|
283
|
+
if ($[78] !== as || $[79] !== className || $[80] !== collapseAfter || $[81] !== customTrigger || $[82] !== dialogTriggerProps || $[83] !== error || $[84] !== fieldProps || $[85] !== headerProps || $[86] !== hideDropdownIcon || $[87] !== inputClassName || $[88] !== isClearable || $[89] !== isClearableIfDisabled || $[90] !== isDirty || $[91] !== isDisabled || $[92] !== isRequired || $[93] !== isSearchable || $[94] !== leadingContent || $[95] !== onBlur || $[96] !== placeholder || $[97] !== ref || $[98] !== selectedTagsType || $[99] !== showSelectionContent || $[100] !== size || $[101] !== trailingContent || $[102] !== variant) {
|
|
284
284
|
t21 = customTrigger ? /* @__PURE__ */ jsx(DialogTrigger, {
|
|
285
285
|
...dialogTriggerProps,
|
|
286
286
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -300,6 +300,7 @@ var SelectDesktop = (t0) => {
|
|
|
300
300
|
hideDropdownIcon,
|
|
301
301
|
isSearchable,
|
|
302
302
|
isClearable,
|
|
303
|
+
isClearableIfDisabled,
|
|
303
304
|
showSelectionContent,
|
|
304
305
|
inputClassName,
|
|
305
306
|
leadingContent,
|
|
@@ -326,23 +327,24 @@ var SelectDesktop = (t0) => {
|
|
|
326
327
|
$[86] = hideDropdownIcon;
|
|
327
328
|
$[87] = inputClassName;
|
|
328
329
|
$[88] = isClearable;
|
|
329
|
-
$[89] =
|
|
330
|
-
$[90] =
|
|
331
|
-
$[91] =
|
|
332
|
-
$[92] =
|
|
333
|
-
$[93] =
|
|
334
|
-
$[94] =
|
|
335
|
-
$[95] =
|
|
336
|
-
$[96] =
|
|
337
|
-
$[97] =
|
|
338
|
-
$[98] =
|
|
339
|
-
$[99] =
|
|
340
|
-
$[100] =
|
|
341
|
-
$[101] =
|
|
342
|
-
$[102] =
|
|
343
|
-
|
|
330
|
+
$[89] = isClearableIfDisabled;
|
|
331
|
+
$[90] = isDirty;
|
|
332
|
+
$[91] = isDisabled;
|
|
333
|
+
$[92] = isRequired;
|
|
334
|
+
$[93] = isSearchable;
|
|
335
|
+
$[94] = leadingContent;
|
|
336
|
+
$[95] = onBlur;
|
|
337
|
+
$[96] = placeholder;
|
|
338
|
+
$[97] = ref;
|
|
339
|
+
$[98] = selectedTagsType;
|
|
340
|
+
$[99] = showSelectionContent;
|
|
341
|
+
$[100] = size;
|
|
342
|
+
$[101] = trailingContent;
|
|
343
|
+
$[102] = variant;
|
|
344
|
+
$[103] = t21;
|
|
345
|
+
} else t21 = $[103];
|
|
344
346
|
let t22;
|
|
345
|
-
if ($[
|
|
347
|
+
if ($[104] !== ignoreTriggerWidth || $[105] !== isOpen || $[106] !== isSearchable || $[107] !== popoverCva || $[108] !== popoverWidth || $[109] !== props || $[110] !== selectPopoverCva || $[111] !== setIsOpen || $[112] !== showPopover) {
|
|
346
348
|
t22 = (!isSearchable || showPopover) && /* @__PURE__ */ jsx(Popover, {
|
|
347
349
|
triggerRef,
|
|
348
350
|
isOpen,
|
|
@@ -356,19 +358,19 @@ var SelectDesktop = (t0) => {
|
|
|
356
358
|
autoFocus: !isSearchable
|
|
357
359
|
})
|
|
358
360
|
});
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else t22 = $[
|
|
361
|
+
$[104] = ignoreTriggerWidth;
|
|
362
|
+
$[105] = isOpen;
|
|
363
|
+
$[106] = isSearchable;
|
|
364
|
+
$[107] = popoverCva;
|
|
365
|
+
$[108] = popoverWidth;
|
|
366
|
+
$[109] = props;
|
|
367
|
+
$[110] = selectPopoverCva;
|
|
368
|
+
$[111] = setIsOpen;
|
|
369
|
+
$[112] = showPopover;
|
|
370
|
+
$[113] = t22;
|
|
371
|
+
} else t22 = $[113];
|
|
370
372
|
let t23;
|
|
371
|
-
if ($[
|
|
373
|
+
if ($[114] !== as || $[115] !== formFieldProps || $[116] !== onFocusCapture || $[117] !== onMouseEnter || $[118] !== t20 || $[119] !== t21 || $[120] !== t22) {
|
|
372
374
|
t23 = /* @__PURE__ */ jsxs(FormField, {
|
|
373
375
|
...formFieldProps,
|
|
374
376
|
...t20,
|
|
@@ -378,38 +380,38 @@ var SelectDesktop = (t0) => {
|
|
|
378
380
|
ref: wrapperRef,
|
|
379
381
|
children: [t21, t22]
|
|
380
382
|
});
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else t23 = $[
|
|
383
|
+
$[114] = as;
|
|
384
|
+
$[115] = formFieldProps;
|
|
385
|
+
$[116] = onFocusCapture;
|
|
386
|
+
$[117] = onMouseEnter;
|
|
387
|
+
$[118] = t20;
|
|
388
|
+
$[119] = t21;
|
|
389
|
+
$[120] = t22;
|
|
390
|
+
$[121] = t23;
|
|
391
|
+
} else t23 = $[121];
|
|
390
392
|
let t24;
|
|
391
|
-
if ($[
|
|
393
|
+
if ($[122] !== WrapperComponent || $[123] !== t19 || $[124] !== t23) {
|
|
392
394
|
t24 = /* @__PURE__ */ jsx(WrapperComponent, {
|
|
393
395
|
...t19,
|
|
394
396
|
children: t23
|
|
395
397
|
});
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
} else t24 = $[
|
|
398
|
+
$[122] = WrapperComponent;
|
|
399
|
+
$[123] = t19;
|
|
400
|
+
$[124] = t23;
|
|
401
|
+
$[125] = t24;
|
|
402
|
+
} else t24 = $[125];
|
|
401
403
|
let t25;
|
|
402
|
-
if ($[
|
|
404
|
+
if ($[126] !== as || $[127] !== error || $[128] !== t24) {
|
|
403
405
|
t25 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
404
406
|
as,
|
|
405
407
|
error,
|
|
406
408
|
children: t24
|
|
407
409
|
});
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
} else t25 = $[
|
|
410
|
+
$[126] = as;
|
|
411
|
+
$[127] = error;
|
|
412
|
+
$[128] = t24;
|
|
413
|
+
$[129] = t25;
|
|
414
|
+
} else t25 = $[129];
|
|
413
415
|
return t25;
|
|
414
416
|
};
|
|
415
417
|
function _temp(item) {
|
|
@@ -4,12 +4,12 @@ import { FormFieldHeaderProps } from '../../FormField/FormFieldHeader';
|
|
|
4
4
|
import { SelectBaseProps } from './SelectBase';
|
|
5
5
|
import { SelectItem } from './select.types';
|
|
6
6
|
import { InputVariantProps } from '../../shared/input.cva';
|
|
7
|
-
interface SelectInputProps extends InputVariantProps, Pick<SelectBaseProps, "ref" | "placeholder" | "isDisabled" | "hideDropdownIcon" | "isSearchable" | "isClearable" | "onBlur" | "showSelectionContent" | "inputClassName" | "selectedTagsType" | "collapseAfter" | "isRequired" | "isDirty" | "leadingContent" | "trailingContent" | "onMouseEnter" | "onFocusCapture"> {
|
|
7
|
+
interface SelectInputProps extends InputVariantProps, Pick<SelectBaseProps, "ref" | "placeholder" | "isDisabled" | "hideDropdownIcon" | "isSearchable" | "isClearable" | "isClearableIfDisabled" | "onBlur" | "showSelectionContent" | "inputClassName" | "selectedTagsType" | "collapseAfter" | "isRequired" | "isDirty" | "leadingContent" | "trailingContent" | "onMouseEnter" | "onFocusCapture"> {
|
|
8
8
|
isInvalid?: boolean;
|
|
9
9
|
className?: string;
|
|
10
10
|
fieldProps?: AriaFieldProps;
|
|
11
11
|
headerProps?: FormFieldHeaderProps;
|
|
12
12
|
onCloseComboBox?: (state: ComboBoxState<SelectItem> | null) => void;
|
|
13
13
|
}
|
|
14
|
-
export declare const SelectInput: ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props }: SelectInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const SelectInput: ({ ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props }: SelectInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
4
3
|
import "../../../../config/i18n.js";
|
|
@@ -9,17 +8,18 @@ import { SelectInputTags } from "./SelectInputTags.js";
|
|
|
9
8
|
import { SelectContext } from "./select.context.js";
|
|
10
9
|
import { selectInputTagsContentWrapperDefinition } from "./selectInput.cva.js";
|
|
11
10
|
import { useKeyInteractions } from "../../../../hooks/useKeyInteractions.js";
|
|
12
|
-
import {
|
|
13
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { ChevronDown } from "lucide-react";
|
|
14
12
|
import { clsx } from "clsx";
|
|
15
13
|
import { use, useRef, useState } from "react";
|
|
16
14
|
import { Button, ComboBoxStateContext, Input } from "react-aria-components";
|
|
15
|
+
import { c } from "react/compiler-runtime";
|
|
16
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
18
18
|
import { useTranslation } from "react-i18next";
|
|
19
19
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
20
20
|
var SelectInput = (t0) => {
|
|
21
|
-
const $0 = c(
|
|
22
|
-
const { ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props } = t0;
|
|
21
|
+
const $0 = c(137);
|
|
22
|
+
const { ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, isClearableIfDisabled, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props } = t0;
|
|
23
23
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
24
24
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
25
25
|
const inputClearClassCva = UIOverrides.useCva("input.clearClassCva", inputClearClassDefinition);
|
|
@@ -311,7 +311,7 @@ var SelectInput = (t0) => {
|
|
|
311
311
|
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-text-default-3", showTags && "absolute inset-0 z-base"),
|
|
312
312
|
onKeyDown: onTriggerKeyDown,
|
|
313
313
|
...fieldProps,
|
|
314
|
-
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
|
|
314
|
+
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment$1, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
|
|
315
315
|
size: "label-1",
|
|
316
316
|
as: "span",
|
|
317
317
|
className: clsx("truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-text-default-3 group-disabled/select-trigger:text-interactive-text-secondary-disabled"),
|
|
@@ -355,8 +355,8 @@ var SelectInput = (t0) => {
|
|
|
355
355
|
$0[92] = t38;
|
|
356
356
|
} else t38 = $0[92];
|
|
357
357
|
let t39;
|
|
358
|
-
if ($0[93] !== as || $0[94] !== inputClearClassCva || $0[95] !== isClearable || $0[96] !==
|
|
359
|
-
t39 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
|
|
358
|
+
if ($0[93] !== as || $0[94] !== inputClearClassCva || $0[95] !== isClearable || $0[96] !== isClearableIfDisabled || $0[97] !== isDisabled || $0[98] !== onClear || $0[99] !== showClearButton) {
|
|
359
|
+
t39 = isClearable && (!isDisabled || isClearableIfDisabled === true) && /* @__PURE__ */ jsx(InputClear, {
|
|
360
360
|
onClear: () => {
|
|
361
361
|
onClear();
|
|
362
362
|
},
|
|
@@ -366,22 +366,23 @@ var SelectInput = (t0) => {
|
|
|
366
366
|
$0[93] = as;
|
|
367
367
|
$0[94] = inputClearClassCva;
|
|
368
368
|
$0[95] = isClearable;
|
|
369
|
-
$0[96] =
|
|
370
|
-
$0[97] =
|
|
371
|
-
$0[98] =
|
|
372
|
-
$0[99] =
|
|
373
|
-
|
|
369
|
+
$0[96] = isClearableIfDisabled;
|
|
370
|
+
$0[97] = isDisabled;
|
|
371
|
+
$0[98] = onClear;
|
|
372
|
+
$0[99] = showClearButton;
|
|
373
|
+
$0[100] = t39;
|
|
374
|
+
} else t39 = $0[100];
|
|
374
375
|
let t40;
|
|
375
|
-
if ($0[
|
|
376
|
+
if ($0[101] !== trailingContent) {
|
|
376
377
|
t40 = trailingContent && /* @__PURE__ */ jsx("div", {
|
|
377
378
|
className: "flex shrink-0 items-center",
|
|
378
379
|
children: trailingContent
|
|
379
380
|
});
|
|
380
|
-
$0[
|
|
381
|
-
$0[
|
|
382
|
-
} else t40 = $0[
|
|
381
|
+
$0[101] = trailingContent;
|
|
382
|
+
$0[102] = t40;
|
|
383
|
+
} else t40 = $0[102];
|
|
383
384
|
let t41;
|
|
384
|
-
if ($0[
|
|
385
|
+
if ($0[103] !== hideDropdownIcon || $0[104] !== inputSizeCva || $0[105] !== isDisabled || $0[106] !== isOpen || $0[107] !== isSearchable || $0[108] !== setIsOpen || $0[109] !== size || $0[110] !== t) {
|
|
385
386
|
t41 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
386
387
|
excludeFromTabOrder: true,
|
|
387
388
|
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
@@ -390,23 +391,23 @@ var SelectInput = (t0) => {
|
|
|
390
391
|
onPress: () => {
|
|
391
392
|
if (!isSearchable) setIsOpen(!isOpen);
|
|
392
393
|
},
|
|
393
|
-
children: /* @__PURE__ */ jsx(
|
|
394
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
394
395
|
className: clsx("size-6 shrink-0", isOpen && "rotate-180", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle"),
|
|
395
396
|
"aria-hidden": "true"
|
|
396
397
|
})
|
|
397
398
|
});
|
|
398
|
-
$0[
|
|
399
|
-
$0[
|
|
400
|
-
$0[
|
|
401
|
-
$0[
|
|
402
|
-
$0[
|
|
403
|
-
$0[
|
|
404
|
-
$0[
|
|
405
|
-
$0[
|
|
406
|
-
$0[
|
|
407
|
-
} else t41 = $0[
|
|
399
|
+
$0[103] = hideDropdownIcon;
|
|
400
|
+
$0[104] = inputSizeCva;
|
|
401
|
+
$0[105] = isDisabled;
|
|
402
|
+
$0[106] = isOpen;
|
|
403
|
+
$0[107] = isSearchable;
|
|
404
|
+
$0[108] = setIsOpen;
|
|
405
|
+
$0[109] = size;
|
|
406
|
+
$0[110] = t;
|
|
407
|
+
$0[111] = t41;
|
|
408
|
+
} else t41 = $0[111];
|
|
408
409
|
let t42;
|
|
409
|
-
if ($0[
|
|
410
|
+
if ($0[112] !== focusWithinProps || $0[113] !== hoverProps || $0[114] !== onFocusCapture || $0[115] !== onMouseEnter || $0[116] !== ref || $0[117] !== t16 || $0[118] !== t18 || $0[119] !== t19 || $0[120] !== t20 || $0[121] !== t21 || $0[122] !== t22 || $0[123] !== t23 || $0[124] !== t24 || $0[125] !== t25 || $0[126] !== t26 || $0[127] !== t27 || $0[128] !== t28 || $0[129] !== t29 || $0[130] !== t30 || $0[131] !== t31 || $0[132] !== t38 || $0[133] !== t39 || $0[134] !== t40 || $0[135] !== t41) {
|
|
410
411
|
t42 = /* @__PURE__ */ jsxs("div", {
|
|
411
412
|
ref,
|
|
412
413
|
className: t16,
|
|
@@ -437,32 +438,32 @@ var SelectInput = (t0) => {
|
|
|
437
438
|
t41
|
|
438
439
|
]
|
|
439
440
|
});
|
|
440
|
-
$0[
|
|
441
|
-
$0[
|
|
442
|
-
$0[
|
|
443
|
-
$0[
|
|
444
|
-
$0[
|
|
445
|
-
$0[
|
|
446
|
-
$0[
|
|
447
|
-
$0[
|
|
448
|
-
$0[
|
|
449
|
-
$0[
|
|
450
|
-
$0[
|
|
451
|
-
$0[
|
|
452
|
-
$0[
|
|
453
|
-
$0[
|
|
454
|
-
$0[
|
|
455
|
-
$0[
|
|
456
|
-
$0[
|
|
457
|
-
$0[
|
|
458
|
-
$0[
|
|
459
|
-
$0[
|
|
460
|
-
$0[
|
|
461
|
-
$0[
|
|
462
|
-
$0[
|
|
463
|
-
$0[
|
|
464
|
-
$0[
|
|
465
|
-
} else t42 = $0[
|
|
441
|
+
$0[112] = focusWithinProps;
|
|
442
|
+
$0[113] = hoverProps;
|
|
443
|
+
$0[114] = onFocusCapture;
|
|
444
|
+
$0[115] = onMouseEnter;
|
|
445
|
+
$0[116] = ref;
|
|
446
|
+
$0[117] = t16;
|
|
447
|
+
$0[118] = t18;
|
|
448
|
+
$0[119] = t19;
|
|
449
|
+
$0[120] = t20;
|
|
450
|
+
$0[121] = t21;
|
|
451
|
+
$0[122] = t22;
|
|
452
|
+
$0[123] = t23;
|
|
453
|
+
$0[124] = t24;
|
|
454
|
+
$0[125] = t25;
|
|
455
|
+
$0[126] = t26;
|
|
456
|
+
$0[127] = t27;
|
|
457
|
+
$0[128] = t28;
|
|
458
|
+
$0[129] = t29;
|
|
459
|
+
$0[130] = t30;
|
|
460
|
+
$0[131] = t31;
|
|
461
|
+
$0[132] = t38;
|
|
462
|
+
$0[133] = t39;
|
|
463
|
+
$0[134] = t40;
|
|
464
|
+
$0[135] = t41;
|
|
465
|
+
$0[136] = t42;
|
|
466
|
+
} else t42 = $0[136];
|
|
466
467
|
return t42;
|
|
467
468
|
};
|
|
468
469
|
//#endregion
|
|
@@ -3,9 +3,9 @@ import { SelectContext } from "./select.context.js";
|
|
|
3
3
|
import { SelectListBoxItem } from "./SelectListBoxItem.js";
|
|
4
4
|
import { SelectListBoxItemSelectAll } from "./SelectListBoxItemSelectAll.js";
|
|
5
5
|
import { SelectListBoxLoadingItem } from "./SelectListBoxLoadingItem.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
import { ListBox, ListLayout, Virtualizer } from "react-aria-components";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/inputs/Selection/shared/SelectListBox.tsx
|
|
10
10
|
var SelectListBox = ({ label, selectionMode, isSearchable, isScrollable = true, virtualizerOptions, totalItems, newItemRender, onLoadMore, className, onClose, ...props }) => {
|
|
11
11
|
const { fieldState, onChange, listItems, selectableListItems, selectedIds, isMultiple, onClear, onSelectAll, hasLoadMore } = SelectContext.useSelect();
|
|
@@ -3,10 +3,10 @@ import "../../../../config/i18n.js";
|
|
|
3
3
|
import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
5
|
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
6
|
import { useRef } from "react";
|
|
9
7
|
import { ListBoxItem } from "react-aria-components";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/Selection/shared/SelectListBoxItem.tsx
|
|
12
12
|
var SelectListBoxItem = (t0) => {
|
|
@@ -3,10 +3,10 @@ import "../../../../config/i18n.js";
|
|
|
3
3
|
import { CheckboxCheckmark } from "../../Checkbox/CheckboxCheckmark.js";
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
5
|
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
6
|
import { useRef } from "react";
|
|
9
7
|
import { ListBoxItem } from "react-aria-components";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.tsx
|
|
12
12
|
var SelectListBoxItemSelectAll = (t0) => {
|
|
@@ -4,9 +4,9 @@ import "../../../../config/i18n.js";
|
|
|
4
4
|
import { SelectContext } from "./select.context.js";
|
|
5
5
|
import { selectListBoxItemDefinition } from "./selectItem.cva.js";
|
|
6
6
|
import { useIntersectionObserver } from "../../../../hooks/useIntersectionObserver.js";
|
|
7
|
+
import { ListBoxItem } from "react-aria-components";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
import { ListBoxItem } from "react-aria-components";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
//#region src/components/inputs/Selection/shared/SelectListBoxLoadingItem.tsx
|
|
12
12
|
var SelectListBoxLoadingItem = (t0) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../../../../config/i18n.js";
|
|
2
2
|
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
3
3
|
import { SelectContext } from "./select.context.js";
|
|
4
|
+
import { clsx } from "clsx";
|
|
4
5
|
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
8
|
//#region src/components/inputs/Selection/shared/SelectListBoxSelectionBar.tsx
|
|
9
9
|
var SelectListBoxSelectionBar = (t0) => {
|
|
@@ -3,18 +3,18 @@ import { FormField } from "../../FormField/FormField.js";
|
|
|
3
3
|
import { SelectContext } from "./select.context.js";
|
|
4
4
|
import { SelectInput } from "./SelectInput.js";
|
|
5
5
|
import { SelectListBox } from "./SelectListBox.js";
|
|
6
|
-
import { SearchIcon } from "../../../../assets/icons/Search.js";
|
|
7
6
|
import { FormFieldHeaderClose } from "../../FormField/FormFieldHeaderClose.js";
|
|
8
7
|
import { TextInput } from "../../Input/TextInput/TextInput.js";
|
|
9
8
|
import { SelectListBoxSelectionBar } from "./SelectListBoxSelectionBar.js";
|
|
10
|
-
import {
|
|
9
|
+
import { Search } from "lucide-react";
|
|
11
10
|
import { clsx } from "clsx";
|
|
12
11
|
import { useRef } from "react";
|
|
13
12
|
import { DialogTrigger } from "react-aria-components";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useLabel } from "react-aria";
|
|
15
15
|
//#region src/components/inputs/Selection/shared/SelectMobile.tsx
|
|
16
16
|
var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containerClassName, leadingContent, trailingContent, customTrigger, onBlur, onMouseEnter, onFocusCapture, bottomSheetProps, ...props }) => {
|
|
17
|
-
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, as, size, collapseAfter, selectedTagsType } = props;
|
|
17
|
+
const { label, tooltipText, helperText, isDirty, isRequired, rightContent, isHeaderHidden, headerClassName, errorClassName, placeholder, variant, isDisabled, className, hideLabel, hideDropdownIcon, hideSearchIcon, isSearchable, isClearable, isClearableIfDisabled, as, size, collapseAfter, selectedTagsType } = props;
|
|
18
18
|
const formFieldProps = {
|
|
19
19
|
error,
|
|
20
20
|
label,
|
|
@@ -77,6 +77,7 @@ var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containe
|
|
|
77
77
|
hideDropdownIcon,
|
|
78
78
|
isSearchable: false,
|
|
79
79
|
isClearable,
|
|
80
|
+
isClearableIfDisabled,
|
|
80
81
|
showSelectionContent,
|
|
81
82
|
onBlur: void 0,
|
|
82
83
|
fieldProps,
|
|
@@ -109,7 +110,7 @@ var SelectMobile = ({ ref, error, showSelectionContent, inputClassName, containe
|
|
|
109
110
|
rightContent: /* @__PURE__ */ jsx(FormFieldHeaderClose, { onClose: close }),
|
|
110
111
|
inputClassName,
|
|
111
112
|
className: "mb-list-height-title-bottom px-list-side-title",
|
|
112
|
-
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(
|
|
113
|
+
leadingIcon: !hideSearchIcon ? /* @__PURE__ */ jsx(Search, { className: "size-6" }) : void 0,
|
|
113
114
|
size: "default",
|
|
114
115
|
isClearable
|
|
115
116
|
}), /* @__PURE__ */ jsx(SelectListBox, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
3
2
|
import { inputSizeDefinition } from "../../shared/input.cva.js";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { clsx } from "clsx";
|
|
4
5
|
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { clsx } from "clsx";
|
|
7
7
|
//#region src/components/inputs/Selection/shared/StaticSelectTrailingContent.tsx
|
|
8
8
|
var StaticSelectTrailingContent = (t0) => {
|
|
9
9
|
const $ = c(10);
|
|
@@ -26,7 +26,7 @@ var StaticSelectTrailingContent = (t0) => {
|
|
|
26
26
|
tabIndex: -1,
|
|
27
27
|
className: clsx("self-stretch border-0! pl-1-5 outline-none", inputSizeCva({ size })),
|
|
28
28
|
"aria-hidden": "true",
|
|
29
|
-
children: /* @__PURE__ */ jsx(
|
|
29
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: clsx("size-6 shrink-0", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle") })
|
|
30
30
|
}) : void 0;
|
|
31
31
|
$[2] = hideDropdownIcon;
|
|
32
32
|
$[3] = inputSizeCva;
|
|
@@ -25,8 +25,8 @@ export declare namespace SelectContext {
|
|
|
25
25
|
isMultiple: boolean;
|
|
26
26
|
multiSelectAutoConfirm: boolean;
|
|
27
27
|
} & Pick<SelectBaseProps, "onInputChange" | "isLoading" | "hasLoadMore">;
|
|
28
|
-
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "
|
|
29
|
-
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering,
|
|
28
|
+
export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "searchDebounceDelay" | "multiSelectAutoConfirm" | "onBlur">;
|
|
29
|
+
export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, searchDebounceDelay, multiSelectAutoConfirm, onBlur: fieldOnBlur, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export const useSelect: () => Type;
|
|
31
31
|
export {};
|
|
32
32
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
2
1
|
import { useSelectItems } from "./useSelectItems.js";
|
|
3
|
-
import {
|
|
2
|
+
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
4
3
|
import { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/inputs/Selection/shared/select.context.tsx
|
|
6
6
|
var SelectContext;
|
|
7
7
|
(function(_SelectContext) {
|
|
@@ -10,7 +10,7 @@ var SelectContext;
|
|
|
10
10
|
id: item.id,
|
|
11
11
|
label: item.label ?? item.name ?? ""
|
|
12
12
|
});
|
|
13
|
-
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering,
|
|
13
|
+
_SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
|
|
14
14
|
const isMultiple = props.selectionMode === "multiple";
|
|
15
15
|
const initialSelectedItems = useMemo(() => {
|
|
16
16
|
if (!props.initialSelection) return null;
|
|
@@ -75,9 +75,6 @@ var SelectContext;
|
|
|
75
75
|
onSearchChangeDebounced,
|
|
76
76
|
updateValue
|
|
77
77
|
]);
|
|
78
|
-
const triggerBlurOnChange = useCallback(() => {
|
|
79
|
-
if (fireBlurOnChange) fieldOnBlur?.({});
|
|
80
|
-
}, [fireBlurOnChange, fieldOnBlur]);
|
|
81
78
|
const syncFieldState = (value_1) => {
|
|
82
79
|
const newFieldState = {
|
|
83
80
|
value: value_1,
|
|
@@ -120,7 +117,7 @@ var SelectContext;
|
|
|
120
117
|
searchValue: ""
|
|
121
118
|
};
|
|
122
119
|
setFieldState(newFieldState_1);
|
|
123
|
-
|
|
120
|
+
emitStateChanges(newFieldState_1);
|
|
124
121
|
}
|
|
125
122
|
if (!isMultiple) {
|
|
126
123
|
setIsOpen(false);
|
|
@@ -131,8 +128,7 @@ var SelectContext;
|
|
|
131
128
|
onNewItemOption,
|
|
132
129
|
fieldState.inputValue,
|
|
133
130
|
getItem_0,
|
|
134
|
-
isMultiple
|
|
135
|
-
triggerBlurOnChange
|
|
131
|
+
isMultiple
|
|
136
132
|
]);
|
|
137
133
|
const onClear = useCallback(() => {
|
|
138
134
|
if (selectedIds.length === 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Key } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from '../../shared/form.binding';
|
|
4
4
|
import { ControlProps } from '../../shared/form.types';
|
|
5
5
|
export interface SelectItem<TKey extends Key = Key> {
|
|
6
6
|
id: TKey;
|
|
@@ -59,6 +59,7 @@ export interface InputFrameProps extends InputVariantProps, Partial<FormFieldPro
|
|
|
59
59
|
isLoading?: boolean;
|
|
60
60
|
action?: InputFrameAction;
|
|
61
61
|
isClearable?: boolean;
|
|
62
|
+
isClearableIfDisabled?: boolean;
|
|
62
63
|
showClear?: boolean;
|
|
63
64
|
onStaticInteract?: (shouldFocus: boolean, target?: EventTarget | null) => void;
|
|
64
65
|
onStaticPress?: () => void;
|