@povio/ui 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +207 -56
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +32 -9
- package/dist/components/Menu/MenuMobile.js +102 -39
- package/dist/components/Menu/MenuPopover.js +105 -29
- package/dist/components/buttons/Button/button.cva.d.ts +3 -3
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +55 -17
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +201 -35
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +3 -0
- package/dist/components/inputs/Checkbox/checkbox.cva.js +2 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +380 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +499 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +14 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +280 -46
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +616 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +342 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +233 -98
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/DateField.js +288 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +14 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +359 -129
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +18 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +104 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +83 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +211 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +16 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +41 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +99 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +91 -46
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/index.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +148 -34
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +0 -11
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -18
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +26 -6
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +40 -9
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +14 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +446 -97
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +574 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +5 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +305 -90
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +429 -90
- package/dist/components/inputs/Input/shared/InputContent.js +193 -59
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +353 -61
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +45 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +48 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +217 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +107 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +37 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +178 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +227 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +393 -138
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +397 -116
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +85 -35
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +69 -16
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +70 -21
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +14 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +43 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +6 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +8 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +54 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +83 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +612 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -98
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +102 -30
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +214 -37
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +3 -0
- package/dist/components/inputs/Toggle/toggle.cva.js +2 -1
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +21 -11
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +28 -0
- package/dist/components/inputs/shared/input.cva.js +38 -4
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +8 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +15 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +112 -0
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +104 -31
- package/dist/components/navigation/Stepper/StepperSeparator.js +23 -5
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +85 -28
- package/dist/components/overlays/Tooltip/Tooltip.js +137 -28
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/segment/Segment.js +218 -57
- package/dist/components/segment/SegmentItem.js +67 -10
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +28 -14
- package/dist/components/status/Toast/toast.cva.d.ts +1 -1
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +28 -27
- package/dist/components/text/Link/Link.js +19 -7
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +30 -11
- package/dist/config/uiOverrides.context.js +54 -14
- package/dist/helpers/dynamicInputs.d.ts +12 -9
- package/dist/helpers/dynamicInputs.js +13 -8
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +72 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +18 -3
- package/dist/index.js +15 -5
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/zod.utils.d.ts +2 -0
- package/dist/utils/zod.utils.js +5 -0
- package/package.json +2 -2
|
@@ -4,145 +4,426 @@ import { Typography } from "../../../text/Typography/Typography.js";
|
|
|
4
4
|
import "../../../../config/i18n.js";
|
|
5
5
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
6
6
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
|
-
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
7
|
+
import { inputBaseDefinition, inputClearClassDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
8
8
|
import { SelectInputTags } from "./SelectInputTags.js";
|
|
9
9
|
import { SelectContext } from "./select.context.js";
|
|
10
|
+
import { selectInputTagsContentWrapperDefinition } from "./selectInput.cva.js";
|
|
11
|
+
import { useKeyInteractions } from "../../../../hooks/useKeyInteractions.js";
|
|
12
|
+
import { c } from "react/compiler-runtime";
|
|
10
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
14
|
import { clsx } from "clsx";
|
|
12
|
-
import { use,
|
|
15
|
+
import { use, useRef, useState } from "react";
|
|
13
16
|
import { Button, ComboBoxStateContext, Input } from "react-aria-components";
|
|
14
17
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
15
18
|
import { useTranslation } from "react-i18next";
|
|
16
19
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
17
|
-
var SelectInput = (
|
|
20
|
+
var SelectInput = (t0) => {
|
|
21
|
+
const $0 = c(124);
|
|
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;
|
|
18
23
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
19
24
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
25
|
+
const inputClearClassCva = UIOverrides.useCva("input.clearClassCva", inputClearClassDefinition);
|
|
26
|
+
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
20
27
|
const { t } = useTranslation("ui");
|
|
21
28
|
const state = use(ComboBoxStateContext);
|
|
22
|
-
|
|
29
|
+
let t1;
|
|
30
|
+
if ($0[0] !== isDisabled) {
|
|
31
|
+
t1 = { isDisabled };
|
|
32
|
+
$0[0] = isDisabled;
|
|
33
|
+
$0[1] = t1;
|
|
34
|
+
} else t1 = $0[1];
|
|
35
|
+
const { hoverProps, isHovered } = useHover(t1);
|
|
23
36
|
const [isFocused, setIsFocused] = useState(false);
|
|
24
|
-
|
|
37
|
+
let t2;
|
|
38
|
+
if ($0[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
39
|
+
t2 = { onFocusWithinChange: setIsFocused };
|
|
40
|
+
$0[2] = t2;
|
|
41
|
+
} else t2 = $0[2];
|
|
42
|
+
const { focusWithinProps } = useFocusWithin(t2);
|
|
25
43
|
const { isFocusVisible } = useFocusVisible();
|
|
26
44
|
const inputRef = useRef(null);
|
|
27
45
|
const { fieldState, isOpen, setIsOpen, listItems, selectedItems, onChange, onClear, onRemove, isMultiple, isLoading } = SelectContext.useSelect();
|
|
28
46
|
const isEmpty = selectedItems.length === 0;
|
|
29
47
|
const showTags = isMultiple && !isEmpty;
|
|
30
|
-
const showClearButton = isClearable && (selectedItems.length > 0 || isSearchable && fieldState.inputValue !== "");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
const showClearButton = !isDisabled && isClearable && (selectedItems.length > 0 || isSearchable && fieldState.inputValue !== "");
|
|
49
|
+
let t3;
|
|
50
|
+
bb0: {
|
|
51
|
+
let t4;
|
|
52
|
+
if ($0[3] !== headerProps) {
|
|
53
|
+
t4 = headerProps ?? {};
|
|
54
|
+
$0[3] = headerProps;
|
|
55
|
+
$0[4] = t4;
|
|
56
|
+
} else t4 = $0[4];
|
|
57
|
+
const { labelProps: headerLabelProps } = t4;
|
|
58
|
+
if (!(as && ["filter", "floating"].includes(as)) || isSearchable) {
|
|
59
|
+
t3 = headerLabelProps;
|
|
60
|
+
break bb0;
|
|
61
|
+
}
|
|
62
|
+
const t5 = headerLabelProps?.className;
|
|
63
|
+
let t6;
|
|
64
|
+
if ($0[5] !== t5) {
|
|
65
|
+
t6 = clsx(t5, "pointer-events-none");
|
|
66
|
+
$0[5] = t5;
|
|
67
|
+
$0[6] = t6;
|
|
68
|
+
} else t6 = $0[6];
|
|
69
|
+
let t7;
|
|
70
|
+
if ($0[7] !== headerLabelProps || $0[8] !== t6) {
|
|
71
|
+
t7 = {
|
|
72
|
+
...headerLabelProps,
|
|
73
|
+
className: t6
|
|
74
|
+
};
|
|
75
|
+
$0[7] = headerLabelProps;
|
|
76
|
+
$0[8] = t6;
|
|
77
|
+
$0[9] = t7;
|
|
78
|
+
} else t7 = $0[9];
|
|
79
|
+
t3 = t7;
|
|
80
|
+
}
|
|
81
|
+
const labelProps = t3;
|
|
82
|
+
const t4 = !isMultiple && !isLoading && listItems.length === 1 && !listItems[0].isDisabled;
|
|
83
|
+
let t5;
|
|
84
|
+
if ($0[10] !== listItems || $0[11] !== onChange || $0[12] !== onCloseComboBox || $0[13] !== state) {
|
|
85
|
+
t5 = () => {
|
|
46
86
|
onChange(listItems[0].id);
|
|
47
87
|
onCloseComboBox?.(state);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
88
|
+
};
|
|
89
|
+
$0[10] = listItems;
|
|
90
|
+
$0[11] = onChange;
|
|
91
|
+
$0[12] = onCloseComboBox;
|
|
92
|
+
$0[13] = state;
|
|
93
|
+
$0[14] = t5;
|
|
94
|
+
} else t5 = $0[14];
|
|
95
|
+
let t6;
|
|
96
|
+
if ($0[15] !== t4 || $0[16] !== t5) {
|
|
97
|
+
t6 = {
|
|
98
|
+
enabled: t4,
|
|
99
|
+
preventDefault: true,
|
|
100
|
+
callback: t5
|
|
101
|
+
};
|
|
102
|
+
$0[15] = t4;
|
|
103
|
+
$0[16] = t5;
|
|
104
|
+
$0[17] = t6;
|
|
105
|
+
} else t6 = $0[17];
|
|
106
|
+
const t7 = isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0;
|
|
107
|
+
let t8;
|
|
108
|
+
if ($0[18] !== fieldState.value || $0[19] !== onChange) {
|
|
109
|
+
t8 = () => {
|
|
110
|
+
if (!Array.isArray(fieldState.value)) return;
|
|
111
|
+
onChange(fieldState.value.slice(0, -1));
|
|
112
|
+
};
|
|
113
|
+
$0[18] = fieldState.value;
|
|
114
|
+
$0[19] = onChange;
|
|
115
|
+
$0[20] = t8;
|
|
116
|
+
} else t8 = $0[20];
|
|
117
|
+
let t9;
|
|
118
|
+
if ($0[21] !== t7 || $0[22] !== t8) {
|
|
119
|
+
t9 = {
|
|
120
|
+
enabled: t7,
|
|
121
|
+
callback: t8
|
|
122
|
+
};
|
|
123
|
+
$0[21] = t7;
|
|
124
|
+
$0[22] = t8;
|
|
125
|
+
$0[23] = t9;
|
|
126
|
+
} else t9 = $0[23];
|
|
127
|
+
let t10;
|
|
128
|
+
if ($0[24] !== t6 || $0[25] !== t9) {
|
|
129
|
+
t10 = {
|
|
130
|
+
enter: t6,
|
|
131
|
+
backspace: t9
|
|
132
|
+
};
|
|
133
|
+
$0[24] = t6;
|
|
134
|
+
$0[25] = t9;
|
|
135
|
+
$0[26] = t10;
|
|
136
|
+
} else t10 = $0[26];
|
|
137
|
+
const { onKeyDown } = useKeyInteractions(t10);
|
|
138
|
+
let t11;
|
|
139
|
+
if ($0[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
140
|
+
t11 = ["up", "down"];
|
|
141
|
+
$0[27] = t11;
|
|
142
|
+
} else t11 = $0[27];
|
|
143
|
+
const t12 = !isSearchable && !isDisabled && !isOpen;
|
|
144
|
+
let t13;
|
|
145
|
+
if ($0[28] !== setIsOpen) {
|
|
146
|
+
t13 = () => {
|
|
147
|
+
setIsOpen(true);
|
|
148
|
+
};
|
|
149
|
+
$0[28] = setIsOpen;
|
|
150
|
+
$0[29] = t13;
|
|
151
|
+
} else t13 = $0[29];
|
|
152
|
+
let t14;
|
|
153
|
+
if ($0[30] !== t12 || $0[31] !== t13) {
|
|
154
|
+
t14 = { interactions: [{
|
|
155
|
+
actions: t11,
|
|
156
|
+
enabled: t12,
|
|
157
|
+
preventDefault: true,
|
|
158
|
+
callback: t13
|
|
159
|
+
}] };
|
|
160
|
+
$0[30] = t12;
|
|
161
|
+
$0[31] = t13;
|
|
162
|
+
$0[32] = t14;
|
|
163
|
+
} else t14 = $0[32];
|
|
164
|
+
const { onKeyDown: onTriggerKeyDown } = useKeyInteractions(t14);
|
|
165
|
+
let t15;
|
|
166
|
+
if ($0[33] !== isDisabled || $0[34] !== isOpen || $0[35] !== isSearchable || $0[36] !== setIsOpen) {
|
|
167
|
+
t15 = () => {
|
|
168
|
+
if (isDisabled) return;
|
|
169
|
+
if (!isSearchable) {
|
|
170
|
+
setIsOpen(!isOpen);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
inputRef.current?.focus();
|
|
174
|
+
};
|
|
175
|
+
$0[33] = isDisabled;
|
|
176
|
+
$0[34] = isOpen;
|
|
177
|
+
$0[35] = isSearchable;
|
|
178
|
+
$0[36] = setIsOpen;
|
|
179
|
+
$0[37] = t15;
|
|
180
|
+
} else t15 = $0[37];
|
|
181
|
+
const onClick = t15;
|
|
182
|
+
const t16 = inputBaseCva({
|
|
183
|
+
variant,
|
|
184
|
+
as,
|
|
185
|
+
...props,
|
|
186
|
+
className: clsx("group/select-content relative flex px-0!", !isDisabled && isSearchable && "cursor-text", className)
|
|
187
|
+
});
|
|
188
|
+
const t17 = "";
|
|
189
|
+
const t18 = isDisabled || void 0;
|
|
190
|
+
const t19 = isDisabled || void 0;
|
|
191
|
+
const t20 = isHovered || void 0;
|
|
192
|
+
const t21 = isOpen || isFocused || void 0;
|
|
193
|
+
const t22 = isFocused || void 0;
|
|
194
|
+
const t23 = isFocused && isSearchable || void 0;
|
|
195
|
+
const t24 = isFocused && isFocusVisible || void 0;
|
|
196
|
+
const t25 = !isEmpty || void 0;
|
|
197
|
+
const t26 = fieldState.searchValue !== "" || void 0;
|
|
198
|
+
const t27 = isInvalid || void 0;
|
|
199
|
+
const t28 = isEmpty || void 0;
|
|
200
|
+
const t29 = !isEmpty || void 0;
|
|
201
|
+
const t30 = isRequired || void 0;
|
|
202
|
+
const t31 = isDirty || void 0;
|
|
203
|
+
const t32 = "";
|
|
204
|
+
const t33 = clsx("relative flex flex-1 items-center gap-input-gap-input-text-to-elements truncate", !isDisabled && isSearchable && "cursor-text", !isDisabled && !isSearchable && "cursor-pointer", inputSizeCva({
|
|
205
|
+
as,
|
|
206
|
+
size,
|
|
207
|
+
...props
|
|
208
|
+
}));
|
|
209
|
+
let t34;
|
|
210
|
+
if ($0[38] !== as || $0[39] !== headerProps || $0[40] !== labelProps) {
|
|
211
|
+
t34 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
63
212
|
as,
|
|
64
|
-
...
|
|
65
|
-
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
})),
|
|
88
|
-
onClick,
|
|
89
|
-
children: [
|
|
90
|
-
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
91
|
-
as,
|
|
92
|
-
...headerProps,
|
|
93
|
-
labelProps
|
|
94
|
-
}),
|
|
95
|
-
(showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
96
|
-
className: clsx("flex flex-1 flex-wrap gap-input-gap-input-text-to-elements truncate", !isSearchable && "pointer-events-none z-raised"),
|
|
97
|
-
children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
|
|
98
|
-
selectedItems,
|
|
99
|
-
isDisabled,
|
|
100
|
-
collapseAfter,
|
|
101
|
-
selectedTagsType,
|
|
102
|
-
onRemove
|
|
103
|
-
}), isSearchable && /* @__PURE__ */ jsx(Input, {
|
|
104
|
-
ref: inputRef,
|
|
105
|
-
placeholder: as === "floating" ? void 0 : placeholder,
|
|
106
|
-
onBlur,
|
|
107
|
-
className: clsx("w-full flex-1 bg-transparent outline-none placeholder:text-text-default-3", "disabled:text-text-default-3 disabled:placeholder:text-interactive-text-secondary-disabled", inputClassName),
|
|
108
|
-
onKeyDown,
|
|
109
|
-
...fieldProps
|
|
110
|
-
})]
|
|
111
|
-
}),
|
|
112
|
-
!isSearchable && /* @__PURE__ */ jsxs(Button, {
|
|
113
|
-
isDisabled,
|
|
114
|
-
onPress: () => setIsOpen(!isOpen),
|
|
115
|
-
onBlur,
|
|
116
|
-
"data-type": "select-trigger",
|
|
117
|
-
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-text-default-3", showTags && "absolute inset-0 z-base"),
|
|
118
|
-
...fieldProps,
|
|
119
|
-
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
|
|
120
|
-
size: "label-1",
|
|
121
|
-
className: clsx("truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-text-default-3 group-disabled/select-trigger:text-interactive-text-secondary-disabled"),
|
|
122
|
-
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
123
|
-
})]
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
}),
|
|
127
|
-
isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
128
|
-
onClear,
|
|
129
|
-
show: showClearButton
|
|
130
|
-
}),
|
|
131
|
-
!hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
132
|
-
excludeFromTabOrder: true,
|
|
133
|
-
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
134
|
-
className: clsx("self-stretch pl-1-5 outline-none", inputSizeCva({ size })),
|
|
213
|
+
...headerProps,
|
|
214
|
+
labelProps
|
|
215
|
+
});
|
|
216
|
+
$0[38] = as;
|
|
217
|
+
$0[39] = headerProps;
|
|
218
|
+
$0[40] = labelProps;
|
|
219
|
+
$0[41] = t34;
|
|
220
|
+
} else t34 = $0[41];
|
|
221
|
+
let t35;
|
|
222
|
+
if ($0[42] !== leadingContent) {
|
|
223
|
+
t35 = leadingContent && /* @__PURE__ */ jsx("div", {
|
|
224
|
+
className: "ml-input-side-default flex shrink-0 items-center",
|
|
225
|
+
children: leadingContent
|
|
226
|
+
});
|
|
227
|
+
$0[42] = leadingContent;
|
|
228
|
+
$0[43] = t35;
|
|
229
|
+
} else t35 = $0[43];
|
|
230
|
+
let t36;
|
|
231
|
+
if ($0[44] !== as || $0[45] !== collapseAfter || $0[46] !== fieldProps || $0[47] !== inputClassName || $0[48] !== isDisabled || $0[49] !== isSearchable || $0[50] !== onBlur || $0[51] !== onKeyDown || $0[52] !== onRemove || $0[53] !== placeholder || $0[54] !== selectInputTagsContentWrapperCva || $0[55] !== selectedItems || $0[56] !== selectedTagsType || $0[57] !== showTags) {
|
|
232
|
+
t36 = (showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
233
|
+
className: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
234
|
+
children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
|
|
235
|
+
selectedItems,
|
|
135
236
|
isDisabled,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
237
|
+
collapseAfter,
|
|
238
|
+
selectedTagsType,
|
|
239
|
+
onRemove
|
|
240
|
+
}), isSearchable && /* @__PURE__ */ jsx(Input, {
|
|
241
|
+
ref: inputRef,
|
|
242
|
+
placeholder: as === "floating" ? void 0 : placeholder,
|
|
243
|
+
onBlur,
|
|
244
|
+
className: clsx("w-full flex-1 bg-transparent outline-none placeholder:text-text-default-3", "disabled:text-text-default-3 disabled:placeholder:text-interactive-text-secondary-disabled", inputClassName),
|
|
245
|
+
onKeyDown,
|
|
246
|
+
...fieldProps
|
|
247
|
+
})]
|
|
248
|
+
});
|
|
249
|
+
$0[44] = as;
|
|
250
|
+
$0[45] = collapseAfter;
|
|
251
|
+
$0[46] = fieldProps;
|
|
252
|
+
$0[47] = inputClassName;
|
|
253
|
+
$0[48] = isDisabled;
|
|
254
|
+
$0[49] = isSearchable;
|
|
255
|
+
$0[50] = onBlur;
|
|
256
|
+
$0[51] = onKeyDown;
|
|
257
|
+
$0[52] = onRemove;
|
|
258
|
+
$0[53] = placeholder;
|
|
259
|
+
$0[54] = selectInputTagsContentWrapperCva;
|
|
260
|
+
$0[55] = selectedItems;
|
|
261
|
+
$0[56] = selectedTagsType;
|
|
262
|
+
$0[57] = showTags;
|
|
263
|
+
$0[58] = t36;
|
|
264
|
+
} else t36 = $0[58];
|
|
265
|
+
let t37;
|
|
266
|
+
if ($0[59] !== as || $0[60] !== fieldProps || $0[61] !== isDisabled || $0[62] !== isEmpty || $0[63] !== isMultiple || $0[64] !== isOpen || $0[65] !== isSearchable || $0[66] !== onBlur || $0[67] !== onTriggerKeyDown || $0[68] !== placeholder || $0[69] !== selectedItems[0] || $0[70] !== setIsOpen || $0[71] !== showSelectionContent || $0[72] !== showTags) {
|
|
267
|
+
t37 = !isSearchable && /* @__PURE__ */ jsxs(Button, {
|
|
268
|
+
isDisabled,
|
|
269
|
+
onPress: () => setIsOpen(!isOpen),
|
|
270
|
+
onBlur,
|
|
271
|
+
"data-type": "select-trigger",
|
|
272
|
+
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-text-default-3", showTags && "absolute inset-0 z-base"),
|
|
273
|
+
onKeyDown: onTriggerKeyDown,
|
|
274
|
+
...fieldProps,
|
|
275
|
+
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
|
|
276
|
+
size: "label-1",
|
|
277
|
+
className: clsx("truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-text-default-3 group-disabled/select-trigger:text-interactive-text-secondary-disabled"),
|
|
278
|
+
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
279
|
+
})]
|
|
280
|
+
});
|
|
281
|
+
$0[59] = as;
|
|
282
|
+
$0[60] = fieldProps;
|
|
283
|
+
$0[61] = isDisabled;
|
|
284
|
+
$0[62] = isEmpty;
|
|
285
|
+
$0[63] = isMultiple;
|
|
286
|
+
$0[64] = isOpen;
|
|
287
|
+
$0[65] = isSearchable;
|
|
288
|
+
$0[66] = onBlur;
|
|
289
|
+
$0[67] = onTriggerKeyDown;
|
|
290
|
+
$0[68] = placeholder;
|
|
291
|
+
$0[69] = selectedItems[0];
|
|
292
|
+
$0[70] = setIsOpen;
|
|
293
|
+
$0[71] = showSelectionContent;
|
|
294
|
+
$0[72] = showTags;
|
|
295
|
+
$0[73] = t37;
|
|
296
|
+
} else t37 = $0[73];
|
|
297
|
+
let t38;
|
|
298
|
+
if ($0[74] !== onClick || $0[75] !== t33 || $0[76] !== t34 || $0[77] !== t35 || $0[78] !== t36 || $0[79] !== t37) {
|
|
299
|
+
t38 = /* @__PURE__ */ jsxs("div", {
|
|
300
|
+
className: t33,
|
|
301
|
+
onClick,
|
|
302
|
+
children: [
|
|
303
|
+
t34,
|
|
304
|
+
t35,
|
|
305
|
+
t36,
|
|
306
|
+
t37
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
$0[74] = onClick;
|
|
310
|
+
$0[75] = t33;
|
|
311
|
+
$0[76] = t34;
|
|
312
|
+
$0[77] = t35;
|
|
313
|
+
$0[78] = t36;
|
|
314
|
+
$0[79] = t37;
|
|
315
|
+
$0[80] = t38;
|
|
316
|
+
} else t38 = $0[80];
|
|
317
|
+
let t39;
|
|
318
|
+
if ($0[81] !== as || $0[82] !== inputClearClassCva || $0[83] !== isClearable || $0[84] !== isDisabled || $0[85] !== onClear || $0[86] !== showClearButton) {
|
|
319
|
+
t39 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
|
|
320
|
+
onClear: () => {
|
|
321
|
+
onClear();
|
|
322
|
+
},
|
|
323
|
+
className: inputClearClassCva({ as }),
|
|
324
|
+
show: showClearButton
|
|
325
|
+
});
|
|
326
|
+
$0[81] = as;
|
|
327
|
+
$0[82] = inputClearClassCva;
|
|
328
|
+
$0[83] = isClearable;
|
|
329
|
+
$0[84] = isDisabled;
|
|
330
|
+
$0[85] = onClear;
|
|
331
|
+
$0[86] = showClearButton;
|
|
332
|
+
$0[87] = t39;
|
|
333
|
+
} else t39 = $0[87];
|
|
334
|
+
let t40;
|
|
335
|
+
if ($0[88] !== trailingContent) {
|
|
336
|
+
t40 = trailingContent && /* @__PURE__ */ jsx("div", {
|
|
337
|
+
className: "flex shrink-0 items-center",
|
|
338
|
+
children: trailingContent
|
|
339
|
+
});
|
|
340
|
+
$0[88] = trailingContent;
|
|
341
|
+
$0[89] = t40;
|
|
342
|
+
} else t40 = $0[89];
|
|
343
|
+
let t41;
|
|
344
|
+
if ($0[90] !== hideDropdownIcon || $0[91] !== inputSizeCva || $0[92] !== isDisabled || $0[93] !== isOpen || $0[94] !== isSearchable || $0[95] !== setIsOpen || $0[96] !== size || $0[97] !== t) {
|
|
345
|
+
t41 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
346
|
+
excludeFromTabOrder: true,
|
|
347
|
+
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
348
|
+
className: clsx("self-stretch pl-1-5 outline-none", inputSizeCva({ size })),
|
|
349
|
+
isDisabled,
|
|
350
|
+
onPress: () => {
|
|
351
|
+
if (!isSearchable) setIsOpen(!isOpen);
|
|
352
|
+
},
|
|
353
|
+
children: /* @__PURE__ */ jsx(ArrowDropDownIcon, {
|
|
354
|
+
className: clsx("size-6 shrink-0", isOpen && "rotate-180", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle"),
|
|
355
|
+
"aria-hidden": "true"
|
|
143
356
|
})
|
|
144
|
-
|
|
145
|
-
|
|
357
|
+
});
|
|
358
|
+
$0[90] = hideDropdownIcon;
|
|
359
|
+
$0[91] = inputSizeCva;
|
|
360
|
+
$0[92] = isDisabled;
|
|
361
|
+
$0[93] = isOpen;
|
|
362
|
+
$0[94] = isSearchable;
|
|
363
|
+
$0[95] = setIsOpen;
|
|
364
|
+
$0[96] = size;
|
|
365
|
+
$0[97] = t;
|
|
366
|
+
$0[98] = t41;
|
|
367
|
+
} else t41 = $0[98];
|
|
368
|
+
let t42;
|
|
369
|
+
if ($0[99] !== focusWithinProps || $0[100] !== hoverProps || $0[101] !== onFocusCapture || $0[102] !== onMouseEnter || $0[103] !== ref || $0[104] !== t16 || $0[105] !== t18 || $0[106] !== t19 || $0[107] !== t20 || $0[108] !== t21 || $0[109] !== t22 || $0[110] !== t23 || $0[111] !== t24 || $0[112] !== t25 || $0[113] !== t26 || $0[114] !== t27 || $0[115] !== t28 || $0[116] !== t29 || $0[117] !== t30 || $0[118] !== t31 || $0[119] !== t38 || $0[120] !== t39 || $0[121] !== t40 || $0[122] !== t41) {
|
|
370
|
+
t42 = /* @__PURE__ */ jsxs("div", {
|
|
371
|
+
ref,
|
|
372
|
+
className: t16,
|
|
373
|
+
"data-rac": t17,
|
|
374
|
+
"data-disabled": t18,
|
|
375
|
+
"data-is-disabled": t19,
|
|
376
|
+
"data-hovered": t20,
|
|
377
|
+
"data-focused": t21,
|
|
378
|
+
"data-focus-within": t22,
|
|
379
|
+
"data-searchable-focus-within": t23,
|
|
380
|
+
"data-focus-visible": t24,
|
|
381
|
+
"data-has-selection": t25,
|
|
382
|
+
"data-has-search": t26,
|
|
383
|
+
"data-invalid": t27,
|
|
384
|
+
"data-is-empty": t28,
|
|
385
|
+
"data-is-filled": t29,
|
|
386
|
+
"data-is-required": t30,
|
|
387
|
+
"data-is-dirty": t31,
|
|
388
|
+
"data-select-input": t32,
|
|
389
|
+
onMouseEnter,
|
|
390
|
+
onFocusCapture,
|
|
391
|
+
...hoverProps,
|
|
392
|
+
...focusWithinProps,
|
|
393
|
+
children: [
|
|
394
|
+
t38,
|
|
395
|
+
t39,
|
|
396
|
+
t40,
|
|
397
|
+
t41
|
|
398
|
+
]
|
|
399
|
+
});
|
|
400
|
+
$0[99] = focusWithinProps;
|
|
401
|
+
$0[100] = hoverProps;
|
|
402
|
+
$0[101] = onFocusCapture;
|
|
403
|
+
$0[102] = onMouseEnter;
|
|
404
|
+
$0[103] = ref;
|
|
405
|
+
$0[104] = t16;
|
|
406
|
+
$0[105] = t18;
|
|
407
|
+
$0[106] = t19;
|
|
408
|
+
$0[107] = t20;
|
|
409
|
+
$0[108] = t21;
|
|
410
|
+
$0[109] = t22;
|
|
411
|
+
$0[110] = t23;
|
|
412
|
+
$0[111] = t24;
|
|
413
|
+
$0[112] = t25;
|
|
414
|
+
$0[113] = t26;
|
|
415
|
+
$0[114] = t27;
|
|
416
|
+
$0[115] = t28;
|
|
417
|
+
$0[116] = t29;
|
|
418
|
+
$0[117] = t30;
|
|
419
|
+
$0[118] = t31;
|
|
420
|
+
$0[119] = t38;
|
|
421
|
+
$0[120] = t39;
|
|
422
|
+
$0[121] = t40;
|
|
423
|
+
$0[122] = t41;
|
|
424
|
+
$0[123] = t42;
|
|
425
|
+
} else t42 = $0[123];
|
|
426
|
+
return t42;
|
|
146
427
|
};
|
|
147
428
|
//#endregion
|
|
148
429
|
export { SelectInput };
|
|
@@ -1,31 +1,105 @@
|
|
|
1
1
|
import { Tag } from "../../../text/Tag/Tag.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
4
|
//#region src/components/inputs/Selection/shared/SelectInputTags.tsx
|
|
5
|
-
var SelectInputTags = (
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
5
|
+
var SelectInputTags = (t0) => {
|
|
6
|
+
const $ = c(25);
|
|
7
|
+
const { selectedItems, isDisabled, selectedTagsType, collapseAfter, onRemove } = t0;
|
|
8
|
+
let t1;
|
|
9
|
+
bb0: {
|
|
10
|
+
if (!collapseAfter || selectedItems.length <= collapseAfter) {
|
|
11
|
+
let t2;
|
|
12
|
+
if ($[0] !== selectedItems) {
|
|
13
|
+
t2 = {
|
|
14
|
+
displayedItems: selectedItems,
|
|
15
|
+
remainingCount: 0
|
|
16
|
+
};
|
|
17
|
+
$[0] = selectedItems;
|
|
18
|
+
$[1] = t2;
|
|
19
|
+
} else t2 = $[1];
|
|
20
|
+
t1 = t2;
|
|
21
|
+
break bb0;
|
|
22
|
+
}
|
|
23
|
+
let t2;
|
|
24
|
+
if ($[2] !== collapseAfter || $[3] !== selectedItems) {
|
|
25
|
+
t2 = selectedItems.slice(0, collapseAfter - 1);
|
|
26
|
+
$[2] = collapseAfter;
|
|
27
|
+
$[3] = selectedItems;
|
|
28
|
+
$[4] = t2;
|
|
29
|
+
} else t2 = $[4];
|
|
30
|
+
const t3 = selectedItems.length - (collapseAfter - 1);
|
|
31
|
+
let t4;
|
|
32
|
+
if ($[5] !== t2 || $[6] !== t3) {
|
|
33
|
+
t4 = {
|
|
34
|
+
displayedItems: t2,
|
|
35
|
+
remainingCount: t3
|
|
36
|
+
};
|
|
37
|
+
$[5] = t2;
|
|
38
|
+
$[6] = t3;
|
|
39
|
+
$[7] = t4;
|
|
40
|
+
} else t4 = $[7];
|
|
41
|
+
t1 = t4;
|
|
42
|
+
}
|
|
43
|
+
const { displayedItems, remainingCount } = t1;
|
|
44
|
+
if (selectedTagsType === "tags") {
|
|
45
|
+
let t2;
|
|
46
|
+
if ($[8] !== displayedItems || $[9] !== isDisabled || $[10] !== onRemove) {
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[12] !== isDisabled || $[13] !== onRemove) {
|
|
49
|
+
t3 = (item) => /* @__PURE__ */ jsx(Tag, {
|
|
50
|
+
dismissable: true,
|
|
51
|
+
isDisabled,
|
|
52
|
+
onDismiss: () => onRemove(item.id),
|
|
53
|
+
excludeFromTabOrder: true,
|
|
54
|
+
className: "z-raised",
|
|
55
|
+
children: item.label
|
|
56
|
+
}, item.id);
|
|
57
|
+
$[12] = isDisabled;
|
|
58
|
+
$[13] = onRemove;
|
|
59
|
+
$[14] = t3;
|
|
60
|
+
} else t3 = $[14];
|
|
61
|
+
t2 = displayedItems.map(t3);
|
|
62
|
+
$[8] = displayedItems;
|
|
63
|
+
$[9] = isDisabled;
|
|
64
|
+
$[10] = onRemove;
|
|
65
|
+
$[11] = t2;
|
|
66
|
+
} else t2 = $[11];
|
|
67
|
+
let t3;
|
|
68
|
+
if ($[15] !== isDisabled || $[16] !== remainingCount) {
|
|
69
|
+
t3 = remainingCount > 0 && /* @__PURE__ */ jsx(Tag, {
|
|
70
|
+
isDisabled,
|
|
71
|
+
excludeFromTabOrder: true,
|
|
72
|
+
children: `+${remainingCount} more`
|
|
73
|
+
}, "remaining-count");
|
|
74
|
+
$[15] = isDisabled;
|
|
75
|
+
$[16] = remainingCount;
|
|
76
|
+
$[17] = t3;
|
|
77
|
+
} else t3 = $[17];
|
|
78
|
+
let t4;
|
|
79
|
+
if ($[18] !== t2 || $[19] !== t3) {
|
|
80
|
+
t4 = /* @__PURE__ */ jsxs(Fragment, { children: [t2, t3] });
|
|
81
|
+
$[18] = t2;
|
|
82
|
+
$[19] = t3;
|
|
83
|
+
$[20] = t4;
|
|
84
|
+
} else t4 = $[20];
|
|
85
|
+
return t4;
|
|
86
|
+
}
|
|
87
|
+
let t2;
|
|
88
|
+
if ($[21] !== selectedItems) {
|
|
89
|
+
t2 = selectedItems.map(_temp).join(", ");
|
|
90
|
+
$[21] = selectedItems;
|
|
91
|
+
$[22] = t2;
|
|
92
|
+
} else t2 = $[22];
|
|
93
|
+
let t3;
|
|
94
|
+
if ($[23] !== t2) {
|
|
95
|
+
t3 = /* @__PURE__ */ jsx("p", { children: t2 });
|
|
96
|
+
$[23] = t2;
|
|
97
|
+
$[24] = t3;
|
|
98
|
+
} else t3 = $[24];
|
|
99
|
+
return t3;
|
|
29
100
|
};
|
|
101
|
+
function _temp(item_0) {
|
|
102
|
+
return item_0.label;
|
|
103
|
+
}
|
|
30
104
|
//#endregion
|
|
31
105
|
export { SelectInputTags };
|