@povio/ui 2.3.0 → 2.3.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/AlignCenter.js +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 +97 -38
- package/dist/components/Menu/MenuPopover.js +105 -29
- 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/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 +4 -1
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +11 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +364 -76
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +11 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +452 -167
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +269 -57
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +6 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +605 -130
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +332 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +3 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +301 -102
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +3 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +146 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +311 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +12 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +382 -138
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +81 -27
- 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 +210 -65
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +4 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +7 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +13 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +14 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +117 -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 +39 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- 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 +50 -9
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- 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 +6 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +11 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -95
- 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 +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +4 -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 +421 -91
- package/dist/components/inputs/Input/shared/InputContent.js +192 -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 -60
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +17 -0
- package/dist/components/inputs/RadioGroup/radio.cva.js +42 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +213 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +34 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +104 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +224 -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 +330 -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 +12 -5
- 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 +7 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +24 -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 +3 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -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 +80 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +528 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -75
- 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 +4 -2
- 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 +89 -10
- package/dist/components/inputs/shared/StaticInput.d.ts +38 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +10 -0
- package/dist/components/inputs/shared/input.cva.js +54 -14
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +4 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +5 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -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 +122 -25
- 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 +83 -27
- 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/status/Alert/Alert.js +97 -30
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Toast/Toast.js +21 -13
- 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 +21 -7
- package/dist/config/uiConfig.context.js +68 -15
- package/dist/config/uiStyle.context.d.ts +27 -4
- package/dist/config/uiStyle.context.js +15 -5
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -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.js +101 -30
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- 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 +57 -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 +7 -0
- package/dist/index.js +4 -2
- package/dist/tw-ui-plugin.js +8 -1
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +134 -22
- package/dist/utils/dom.utils.js +1 -1
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/package.json +1 -1
|
@@ -4,145 +4,359 @@ 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 { inputBase, inputSize } from "../../shared/input.cva.js";
|
|
7
|
+
import { inputBase, inputClearClass, inputSize } from "../../shared/input.cva.js";
|
|
8
8
|
import { SelectInputTags } from "./SelectInputTags.js";
|
|
9
9
|
import { SelectContext } from "./select.context.js";
|
|
10
|
+
import { selectInputTagsContentWrapperCva } from "./selectInput.cva.js";
|
|
11
|
+
import { c } from "react/compiler-runtime";
|
|
10
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
13
|
import { clsx } from "clsx";
|
|
12
|
-
import { use,
|
|
14
|
+
import { use, useRef, useState } from "react";
|
|
13
15
|
import { Button, ComboBoxStateContext, Input } from "react-aria-components";
|
|
14
16
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
15
17
|
import { useTranslation } from "react-i18next";
|
|
16
18
|
//#region src/components/inputs/Selection/shared/SelectInput.tsx
|
|
17
|
-
var SelectInput = (
|
|
19
|
+
var SelectInput = (t0) => {
|
|
20
|
+
const $0 = c(108);
|
|
21
|
+
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
22
|
const inputSizeCva = UIStyle.useCva("input.sizeCva", inputSize);
|
|
19
23
|
const inputBaseCva = UIStyle.useCva("input.baseCva", inputBase);
|
|
24
|
+
const inputClearClassCva = UIStyle.useCva("input.clearClassCva", inputClearClass);
|
|
20
25
|
const { t } = useTranslation("ui");
|
|
21
26
|
const state = use(ComboBoxStateContext);
|
|
22
|
-
|
|
27
|
+
let t1;
|
|
28
|
+
if ($0[0] !== isDisabled) {
|
|
29
|
+
t1 = { isDisabled };
|
|
30
|
+
$0[0] = isDisabled;
|
|
31
|
+
$0[1] = t1;
|
|
32
|
+
} else t1 = $0[1];
|
|
33
|
+
const { hoverProps, isHovered } = useHover(t1);
|
|
23
34
|
const [isFocused, setIsFocused] = useState(false);
|
|
24
|
-
|
|
35
|
+
let t2;
|
|
36
|
+
if ($0[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
37
|
+
t2 = { onFocusWithinChange: setIsFocused };
|
|
38
|
+
$0[2] = t2;
|
|
39
|
+
} else t2 = $0[2];
|
|
40
|
+
const { focusWithinProps } = useFocusWithin(t2);
|
|
25
41
|
const { isFocusVisible } = useFocusVisible();
|
|
26
42
|
const inputRef = useRef(null);
|
|
27
43
|
const { fieldState, isOpen, setIsOpen, listItems, selectedItems, onChange, onClear, onRemove, isMultiple, isLoading } = SelectContext.useSelect();
|
|
28
44
|
const isEmpty = selectedItems.length === 0;
|
|
29
45
|
const showTags = isMultiple && !isEmpty;
|
|
30
|
-
const showClearButton =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
const showClearButton = !isDisabled && isClearable && (selectedItems.length > 0 || isSearchable && fieldState.inputValue !== "");
|
|
47
|
+
let t3;
|
|
48
|
+
bb0: {
|
|
49
|
+
let t4;
|
|
50
|
+
if ($0[3] !== headerProps) {
|
|
51
|
+
t4 = headerProps ?? {};
|
|
52
|
+
$0[3] = headerProps;
|
|
53
|
+
$0[4] = t4;
|
|
54
|
+
} else t4 = $0[4];
|
|
55
|
+
const { labelProps: headerLabelProps } = t4;
|
|
56
|
+
if (!(as && ["filter", "floating"].includes(as)) || isSearchable) {
|
|
57
|
+
t3 = headerLabelProps;
|
|
58
|
+
break bb0;
|
|
59
|
+
}
|
|
60
|
+
const t5 = headerLabelProps?.className;
|
|
61
|
+
let t6;
|
|
62
|
+
if ($0[5] !== t5) {
|
|
63
|
+
t6 = clsx(t5, "pointer-events-none");
|
|
64
|
+
$0[5] = t5;
|
|
65
|
+
$0[6] = t6;
|
|
66
|
+
} else t6 = $0[6];
|
|
67
|
+
let t7;
|
|
68
|
+
if ($0[7] !== headerLabelProps || $0[8] !== t6) {
|
|
69
|
+
t7 = {
|
|
70
|
+
...headerLabelProps,
|
|
71
|
+
className: t6
|
|
72
|
+
};
|
|
73
|
+
$0[7] = headerLabelProps;
|
|
74
|
+
$0[8] = t6;
|
|
75
|
+
$0[9] = t7;
|
|
76
|
+
} else t7 = $0[9];
|
|
77
|
+
t3 = t7;
|
|
78
|
+
}
|
|
79
|
+
const labelProps = t3;
|
|
80
|
+
let t4;
|
|
81
|
+
if ($0[10] !== fieldState.inputValue || $0[11] !== fieldState.value || $0[12] !== isLoading || $0[13] !== isMultiple || $0[14] !== listItems || $0[15] !== onChange || $0[16] !== onCloseComboBox || $0[17] !== state) {
|
|
82
|
+
t4 = (e) => {
|
|
83
|
+
if (e.key === "Enter" && !isMultiple && !isLoading && listItems.length === 1 && !listItems[0].isDisabled) {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
onChange(listItems[0].id);
|
|
86
|
+
onCloseComboBox?.(state);
|
|
87
|
+
}
|
|
88
|
+
if (e.key === "Backspace" && isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0) onChange(fieldState.value.slice(0, -1));
|
|
89
|
+
};
|
|
90
|
+
$0[10] = fieldState.inputValue;
|
|
91
|
+
$0[11] = fieldState.value;
|
|
92
|
+
$0[12] = isLoading;
|
|
93
|
+
$0[13] = isMultiple;
|
|
94
|
+
$0[14] = listItems;
|
|
95
|
+
$0[15] = onChange;
|
|
96
|
+
$0[16] = onCloseComboBox;
|
|
97
|
+
$0[17] = state;
|
|
98
|
+
$0[18] = t4;
|
|
99
|
+
} else t4 = $0[18];
|
|
100
|
+
const onKeyDown = t4;
|
|
101
|
+
let t5;
|
|
102
|
+
if ($0[19] !== isDisabled || $0[20] !== isOpen || $0[21] !== isSearchable || $0[22] !== setIsOpen) {
|
|
103
|
+
t5 = () => {
|
|
104
|
+
if (isDisabled) return;
|
|
105
|
+
if (!isSearchable) {
|
|
106
|
+
setIsOpen(!isOpen);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
inputRef.current?.focus();
|
|
37
110
|
};
|
|
38
|
-
|
|
111
|
+
$0[19] = isDisabled;
|
|
112
|
+
$0[20] = isOpen;
|
|
113
|
+
$0[21] = isSearchable;
|
|
114
|
+
$0[22] = setIsOpen;
|
|
115
|
+
$0[23] = t5;
|
|
116
|
+
} else t5 = $0[23];
|
|
117
|
+
const onClick = t5;
|
|
118
|
+
const t6 = inputBaseCva({
|
|
119
|
+
variant,
|
|
39
120
|
as,
|
|
40
|
-
|
|
41
|
-
isSearchable
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
121
|
+
...props,
|
|
122
|
+
className: clsx("group/select-content relative flex px-0!", !isDisabled && isSearchable && "cursor-text", className)
|
|
123
|
+
});
|
|
124
|
+
const t7 = "";
|
|
125
|
+
const t8 = isDisabled || void 0;
|
|
126
|
+
const t9 = isDisabled || void 0;
|
|
127
|
+
const t10 = isHovered || void 0;
|
|
128
|
+
const t11 = isOpen || isFocused || void 0;
|
|
129
|
+
const t12 = isFocused || void 0;
|
|
130
|
+
const t13 = isFocused && isSearchable || void 0;
|
|
131
|
+
const t14 = isFocused && isFocusVisible || void 0;
|
|
132
|
+
const t15 = !isEmpty || void 0;
|
|
133
|
+
const t16 = fieldState.searchValue !== "" || void 0;
|
|
134
|
+
const t17 = isInvalid || void 0;
|
|
135
|
+
const t18 = isEmpty || void 0;
|
|
136
|
+
const t19 = !isEmpty || void 0;
|
|
137
|
+
const t20 = isRequired || void 0;
|
|
138
|
+
const t21 = isDirty || void 0;
|
|
139
|
+
const t22 = "";
|
|
140
|
+
const t23 = clsx("relative flex flex-1 items-center gap-input-gap-input-text-to-elements truncate", !isDisabled && isSearchable && "cursor-text", !isDisabled && !isSearchable && "cursor-pointer", inputSizeCva({
|
|
141
|
+
as,
|
|
142
|
+
size,
|
|
143
|
+
...props
|
|
144
|
+
}));
|
|
145
|
+
let t24;
|
|
146
|
+
if ($0[24] !== as || $0[25] !== headerProps || $0[26] !== labelProps) {
|
|
147
|
+
t24 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
63
148
|
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-1"),
|
|
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-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("w-full truncate text-start outline-none disabled:text-interactive-text-secondary-disabled", showTags && "absolute inset-0 z-0"),
|
|
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"),
|
|
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 })),
|
|
149
|
+
...headerProps,
|
|
150
|
+
labelProps
|
|
151
|
+
});
|
|
152
|
+
$0[24] = as;
|
|
153
|
+
$0[25] = headerProps;
|
|
154
|
+
$0[26] = labelProps;
|
|
155
|
+
$0[27] = t24;
|
|
156
|
+
} else t24 = $0[27];
|
|
157
|
+
let t25;
|
|
158
|
+
if ($0[28] !== leadingContent) {
|
|
159
|
+
t25 = leadingContent && /* @__PURE__ */ jsx("div", {
|
|
160
|
+
className: "ml-input-side-default flex shrink-0 items-center",
|
|
161
|
+
children: leadingContent
|
|
162
|
+
});
|
|
163
|
+
$0[28] = leadingContent;
|
|
164
|
+
$0[29] = t25;
|
|
165
|
+
} else t25 = $0[29];
|
|
166
|
+
let t26;
|
|
167
|
+
if ($0[30] !== as || $0[31] !== collapseAfter || $0[32] !== fieldProps || $0[33] !== inputClassName || $0[34] !== isDisabled || $0[35] !== isSearchable || $0[36] !== onBlur || $0[37] !== onKeyDown || $0[38] !== onRemove || $0[39] !== placeholder || $0[40] !== selectedItems || $0[41] !== selectedTagsType || $0[42] !== showTags) {
|
|
168
|
+
t26 = (showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
|
|
169
|
+
className: selectInputTagsContentWrapperCva({ isSearchable }),
|
|
170
|
+
children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
|
|
171
|
+
selectedItems,
|
|
135
172
|
isDisabled,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
173
|
+
collapseAfter,
|
|
174
|
+
selectedTagsType,
|
|
175
|
+
onRemove
|
|
176
|
+
}), isSearchable && /* @__PURE__ */ jsx(Input, {
|
|
177
|
+
ref: inputRef,
|
|
178
|
+
placeholder: as === "floating" ? void 0 : placeholder,
|
|
179
|
+
onBlur,
|
|
180
|
+
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),
|
|
181
|
+
onKeyDown,
|
|
182
|
+
...fieldProps
|
|
183
|
+
})]
|
|
184
|
+
});
|
|
185
|
+
$0[30] = as;
|
|
186
|
+
$0[31] = collapseAfter;
|
|
187
|
+
$0[32] = fieldProps;
|
|
188
|
+
$0[33] = inputClassName;
|
|
189
|
+
$0[34] = isDisabled;
|
|
190
|
+
$0[35] = isSearchable;
|
|
191
|
+
$0[36] = onBlur;
|
|
192
|
+
$0[37] = onKeyDown;
|
|
193
|
+
$0[38] = onRemove;
|
|
194
|
+
$0[39] = placeholder;
|
|
195
|
+
$0[40] = selectedItems;
|
|
196
|
+
$0[41] = selectedTagsType;
|
|
197
|
+
$0[42] = showTags;
|
|
198
|
+
$0[43] = t26;
|
|
199
|
+
} else t26 = $0[43];
|
|
200
|
+
let t27;
|
|
201
|
+
if ($0[44] !== as || $0[45] !== fieldProps || $0[46] !== isDisabled || $0[47] !== isEmpty || $0[48] !== isMultiple || $0[49] !== isOpen || $0[50] !== isSearchable || $0[51] !== onBlur || $0[52] !== placeholder || $0[53] !== selectedItems[0] || $0[54] !== setIsOpen || $0[55] !== showSelectionContent || $0[56] !== showTags) {
|
|
202
|
+
t27 = !isSearchable && /* @__PURE__ */ jsxs(Button, {
|
|
203
|
+
isDisabled,
|
|
204
|
+
onPress: () => setIsOpen(!isOpen),
|
|
205
|
+
onBlur,
|
|
206
|
+
"data-type": "select-trigger",
|
|
207
|
+
className: clsx("group/select-trigger w-full truncate text-start outline-none disabled:text-text-default-3", showTags && "absolute inset-0 z-0"),
|
|
208
|
+
...fieldProps,
|
|
209
|
+
children: [(as === "floating" && isEmpty || isMultiple && !isEmpty) && /* @__PURE__ */ jsx(Fragment, { children: "\xA0" }), (isEmpty || !isMultiple) && (as !== "floating" || !isEmpty) && /* @__PURE__ */ jsxs(Typography, {
|
|
210
|
+
size: "label-1",
|
|
211
|
+
className: clsx("truncate empty:before:inline-block empty:before:content-['']", isEmpty && "text-text-default-3 group-disabled/select-trigger:text-interactive-text-secondary-disabled"),
|
|
212
|
+
children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
|
|
213
|
+
})]
|
|
214
|
+
});
|
|
215
|
+
$0[44] = as;
|
|
216
|
+
$0[45] = fieldProps;
|
|
217
|
+
$0[46] = isDisabled;
|
|
218
|
+
$0[47] = isEmpty;
|
|
219
|
+
$0[48] = isMultiple;
|
|
220
|
+
$0[49] = isOpen;
|
|
221
|
+
$0[50] = isSearchable;
|
|
222
|
+
$0[51] = onBlur;
|
|
223
|
+
$0[52] = placeholder;
|
|
224
|
+
$0[53] = selectedItems[0];
|
|
225
|
+
$0[54] = setIsOpen;
|
|
226
|
+
$0[55] = showSelectionContent;
|
|
227
|
+
$0[56] = showTags;
|
|
228
|
+
$0[57] = t27;
|
|
229
|
+
} else t27 = $0[57];
|
|
230
|
+
let t28;
|
|
231
|
+
if ($0[58] !== onClick || $0[59] !== t23 || $0[60] !== t24 || $0[61] !== t25 || $0[62] !== t26 || $0[63] !== t27) {
|
|
232
|
+
t28 = /* @__PURE__ */ jsxs("div", {
|
|
233
|
+
className: t23,
|
|
234
|
+
onClick,
|
|
235
|
+
children: [
|
|
236
|
+
t24,
|
|
237
|
+
t25,
|
|
238
|
+
t26,
|
|
239
|
+
t27
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
$0[58] = onClick;
|
|
243
|
+
$0[59] = t23;
|
|
244
|
+
$0[60] = t24;
|
|
245
|
+
$0[61] = t25;
|
|
246
|
+
$0[62] = t26;
|
|
247
|
+
$0[63] = t27;
|
|
248
|
+
$0[64] = t28;
|
|
249
|
+
} else t28 = $0[64];
|
|
250
|
+
let t29;
|
|
251
|
+
if ($0[65] !== as || $0[66] !== inputClearClassCva || $0[67] !== isClearable || $0[68] !== isDisabled || $0[69] !== onClear || $0[70] !== showClearButton) {
|
|
252
|
+
t29 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
|
|
253
|
+
onClear: () => {
|
|
254
|
+
onClear();
|
|
255
|
+
},
|
|
256
|
+
className: inputClearClassCva({ as }),
|
|
257
|
+
show: showClearButton
|
|
258
|
+
});
|
|
259
|
+
$0[65] = as;
|
|
260
|
+
$0[66] = inputClearClassCva;
|
|
261
|
+
$0[67] = isClearable;
|
|
262
|
+
$0[68] = isDisabled;
|
|
263
|
+
$0[69] = onClear;
|
|
264
|
+
$0[70] = showClearButton;
|
|
265
|
+
$0[71] = t29;
|
|
266
|
+
} else t29 = $0[71];
|
|
267
|
+
let t30;
|
|
268
|
+
if ($0[72] !== trailingContent) {
|
|
269
|
+
t30 = trailingContent && /* @__PURE__ */ jsx("div", {
|
|
270
|
+
className: "flex shrink-0 items-center",
|
|
271
|
+
children: trailingContent
|
|
272
|
+
});
|
|
273
|
+
$0[72] = trailingContent;
|
|
274
|
+
$0[73] = t30;
|
|
275
|
+
} else t30 = $0[73];
|
|
276
|
+
let t31;
|
|
277
|
+
if ($0[74] !== hideDropdownIcon || $0[75] !== inputSizeCva || $0[76] !== isDisabled || $0[77] !== isOpen || $0[78] !== isSearchable || $0[79] !== setIsOpen || $0[80] !== size || $0[81] !== t) {
|
|
278
|
+
t31 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
|
|
279
|
+
excludeFromTabOrder: true,
|
|
280
|
+
"aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
|
|
281
|
+
className: clsx("self-stretch pl-1-5 outline-none", inputSizeCva({ size })),
|
|
282
|
+
isDisabled,
|
|
283
|
+
onPress: () => {
|
|
284
|
+
if (!isSearchable) setIsOpen(!isOpen);
|
|
285
|
+
},
|
|
286
|
+
children: /* @__PURE__ */ jsx(ArrowDropDownIcon, {
|
|
287
|
+
className: clsx("size-6 shrink-0", isOpen && "rotate-180", isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle"),
|
|
288
|
+
"aria-hidden": "true"
|
|
143
289
|
})
|
|
144
|
-
|
|
145
|
-
|
|
290
|
+
});
|
|
291
|
+
$0[74] = hideDropdownIcon;
|
|
292
|
+
$0[75] = inputSizeCva;
|
|
293
|
+
$0[76] = isDisabled;
|
|
294
|
+
$0[77] = isOpen;
|
|
295
|
+
$0[78] = isSearchable;
|
|
296
|
+
$0[79] = setIsOpen;
|
|
297
|
+
$0[80] = size;
|
|
298
|
+
$0[81] = t;
|
|
299
|
+
$0[82] = t31;
|
|
300
|
+
} else t31 = $0[82];
|
|
301
|
+
let t32;
|
|
302
|
+
if ($0[83] !== focusWithinProps || $0[84] !== hoverProps || $0[85] !== onFocusCapture || $0[86] !== onMouseEnter || $0[87] !== ref || $0[88] !== t10 || $0[89] !== t11 || $0[90] !== t12 || $0[91] !== t13 || $0[92] !== t14 || $0[93] !== t15 || $0[94] !== t16 || $0[95] !== t17 || $0[96] !== t18 || $0[97] !== t19 || $0[98] !== t20 || $0[99] !== t21 || $0[100] !== t28 || $0[101] !== t29 || $0[102] !== t30 || $0[103] !== t31 || $0[104] !== t6 || $0[105] !== t8 || $0[106] !== t9) {
|
|
303
|
+
t32 = /* @__PURE__ */ jsxs("div", {
|
|
304
|
+
ref,
|
|
305
|
+
className: t6,
|
|
306
|
+
"data-rac": t7,
|
|
307
|
+
"data-disabled": t8,
|
|
308
|
+
"data-is-disabled": t9,
|
|
309
|
+
"data-hovered": t10,
|
|
310
|
+
"data-focused": t11,
|
|
311
|
+
"data-focus-within": t12,
|
|
312
|
+
"data-searchable-focus-within": t13,
|
|
313
|
+
"data-focus-visible": t14,
|
|
314
|
+
"data-has-selection": t15,
|
|
315
|
+
"data-has-search": t16,
|
|
316
|
+
"data-invalid": t17,
|
|
317
|
+
"data-is-empty": t18,
|
|
318
|
+
"data-is-filled": t19,
|
|
319
|
+
"data-is-required": t20,
|
|
320
|
+
"data-is-dirty": t21,
|
|
321
|
+
"data-select-input": t22,
|
|
322
|
+
onMouseEnter,
|
|
323
|
+
onFocusCapture,
|
|
324
|
+
...hoverProps,
|
|
325
|
+
...focusWithinProps,
|
|
326
|
+
children: [
|
|
327
|
+
t28,
|
|
328
|
+
t29,
|
|
329
|
+
t30,
|
|
330
|
+
t31
|
|
331
|
+
]
|
|
332
|
+
});
|
|
333
|
+
$0[83] = focusWithinProps;
|
|
334
|
+
$0[84] = hoverProps;
|
|
335
|
+
$0[85] = onFocusCapture;
|
|
336
|
+
$0[86] = onMouseEnter;
|
|
337
|
+
$0[87] = ref;
|
|
338
|
+
$0[88] = t10;
|
|
339
|
+
$0[89] = t11;
|
|
340
|
+
$0[90] = t12;
|
|
341
|
+
$0[91] = t13;
|
|
342
|
+
$0[92] = t14;
|
|
343
|
+
$0[93] = t15;
|
|
344
|
+
$0[94] = t16;
|
|
345
|
+
$0[95] = t17;
|
|
346
|
+
$0[96] = t18;
|
|
347
|
+
$0[97] = t19;
|
|
348
|
+
$0[98] = t20;
|
|
349
|
+
$0[99] = t21;
|
|
350
|
+
$0[100] = t28;
|
|
351
|
+
$0[101] = t29;
|
|
352
|
+
$0[102] = t30;
|
|
353
|
+
$0[103] = t31;
|
|
354
|
+
$0[104] = t6;
|
|
355
|
+
$0[105] = t8;
|
|
356
|
+
$0[106] = t9;
|
|
357
|
+
$0[107] = t32;
|
|
358
|
+
} else t32 = $0[107];
|
|
359
|
+
return t32;
|
|
146
360
|
};
|
|
147
361
|
//#endregion
|
|
148
362
|
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-1",
|
|
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 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AriaListBoxProps } from 'react-aria';
|
|
2
2
|
import { SelectBaseProps } from './SelectBase';
|
|
3
3
|
import { SelectItem } from './select.types';
|
|
4
|
-
export interface SelectListBoxProps extends Pick<SelectBaseProps, "label" | "newItemRender" | "onLoadMore" | "selectionMode" | "isSearchable" | "virtualizerOptions">, Omit<AriaListBoxProps<SelectItem>, "children" | "aria-label" | "selectionMode" | "items" | "selectedKeys" | "onSelectionChange" | "escapeKeyBehavior" | "shouldSelectOnPressUp" | "label"> {
|
|
4
|
+
export interface SelectListBoxProps extends Pick<SelectBaseProps, "label" | "newItemRender" | "onLoadMore" | "selectionMode" | "isSearchable" | "virtualizerOptions" | "totalItems" | "hasLoadMore">, Omit<AriaListBoxProps<SelectItem>, "children" | "aria-label" | "selectionMode" | "items" | "selectedKeys" | "onSelectionChange" | "escapeKeyBehavior" | "shouldSelectOnPressUp" | "label"> {
|
|
5
5
|
className?: string;
|
|
6
6
|
isScrollable?: boolean;
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const SelectListBox: ({ label, selectionMode, isSearchable, isScrollable, virtualizerOptions, newItemRender, onLoadMore, className, onClose, ...props }: SelectListBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const SelectListBox: ({ label, selectionMode, isSearchable, isScrollable, virtualizerOptions, totalItems, newItemRender, onLoadMore, className, onClose, ...props }: SelectListBoxProps) => import("react/jsx-runtime").JSX.Element;
|