@povio/ui 3.0.0-rc.3 → 3.1.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/README.md +39 -0
- package/dist/assets/icons/AlignCenter.js +11 -26
- package/dist/assets/icons/AlignLeft.js +11 -26
- package/dist/assets/icons/AlignLeftRight.js +11 -26
- package/dist/assets/icons/AlignRight.js +11 -26
- package/dist/assets/icons/ArrowDropDown.js +11 -26
- package/dist/assets/icons/ArrowDropUp.js +11 -26
- package/dist/assets/icons/ArrowLeft.js +11 -26
- package/dist/assets/icons/ArrowRight.js +11 -26
- package/dist/assets/icons/Bold.js +11 -26
- package/dist/assets/icons/BulletedList.js +11 -26
- package/dist/assets/icons/Calendar.js +13 -28
- package/dist/assets/icons/Check.js +13 -28
- package/dist/assets/icons/CheckCircle.js +11 -26
- package/dist/assets/icons/CheckboxCheckmark.js +14 -29
- package/dist/assets/icons/CheckboxIndeterminate.js +14 -29
- package/dist/assets/icons/ChevronDown.js +13 -28
- package/dist/assets/icons/ChevronLeft.js +13 -28
- package/dist/assets/icons/ChevronRight.js +13 -28
- package/dist/assets/icons/ChevronUp.js +13 -28
- package/dist/assets/icons/ChevronsLeft.js +13 -28
- package/dist/assets/icons/ChevronsRight.js +13 -28
- package/dist/assets/icons/Clock.js +11 -26
- package/dist/assets/icons/Close.js +11 -26
- package/dist/assets/icons/DateTime.js +14 -35
- package/dist/assets/icons/DragIndicator.js +11 -26
- package/dist/assets/icons/File.js +13 -28
- package/dist/assets/icons/Highlight.js +11 -26
- package/dist/assets/icons/HighlightOn.js +15 -49
- package/dist/assets/icons/Home.js +11 -26
- package/dist/assets/icons/Info.js +16 -37
- package/dist/assets/icons/Italic.js +11 -26
- package/dist/assets/icons/Link.js +11 -26
- package/dist/assets/icons/Menu.js +11 -26
- package/dist/assets/icons/NumberedList.js +11 -26
- package/dist/assets/icons/PointerHorizontal.js +11 -26
- package/dist/assets/icons/PointerVertical.js +11 -26
- package/dist/assets/icons/Search.js +11 -26
- package/dist/assets/icons/Send.js +13 -28
- package/dist/assets/icons/Strikethrough.js +11 -26
- package/dist/assets/icons/TextColor.js +14 -48
- package/dist/assets/icons/Today.js +11 -26
- package/dist/assets/icons/Underlined.js +13 -28
- package/dist/assets/icons/Upload.js +14 -35
- package/dist/assets/icons/Visibility.js +11 -26
- package/dist/assets/icons/VisibilityOff.js +11 -26
- package/dist/assets/icons/WarningFilled.js +13 -28
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- package/dist/components/Menu/Menu.d.ts +4 -0
- package/dist/components/Menu/Menu.js +2 -18
- package/dist/components/Menu/MenuDesktop.js +7 -41
- package/dist/components/Menu/MenuItem.js +9 -32
- package/dist/components/Menu/MenuMobile.d.ts +1 -1
- package/dist/components/Menu/MenuMobile.js +39 -97
- package/dist/components/Menu/MenuPopover.js +29 -105
- package/dist/components/buttons/IconButton/IconButton.js +8 -40
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -2
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/PillButton/PillButton.js +17 -55
- package/dist/components/buttons/SplitButton/SplitButton.js +18 -103
- package/dist/components/buttons/TextButton/TextButton.js +8 -30
- package/dist/components/buttons/ToggleButton/ToggleButton.js +8 -28
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +35 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +0 -3
- package/dist/components/inputs/Checkbox/checkbox.cva.js +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +75 -373
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +186 -492
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -14
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +47 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -7
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +121 -611
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +3 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +120 -338
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +103 -310
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -4
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +98 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -286
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -14
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +129 -356
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +11 -96
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -81
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +110 -279
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +65 -210
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/File/FileUpload.js +45 -88
- package/dist/components/inputs/File/FileUploadContainer.js +7 -15
- package/dist/components/inputs/File/InputUpload.js +79 -317
- package/dist/components/inputs/File/shared/FileCard.js +41 -104
- package/dist/components/inputs/File/shared/FileCardList.js +12 -47
- package/dist/components/inputs/File/shared/FileUploadContent.js +44 -175
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +46 -149
- package/dist/components/inputs/File/shared/FileUploadContentError.js +93 -234
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +97 -230
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +55 -199
- package/dist/components/inputs/File/shared/InputUploadContent.js +34 -148
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -49
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +2 -2
- package/dist/components/inputs/File/shared/ProgressBar.js +20 -53
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +38 -0
- package/dist/components/inputs/File/shared/progressBar.cva.js +28 -0
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +37 -119
- package/dist/components/inputs/FormField/FormFieldError.js +5 -25
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -81
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +6 -26
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +2 -5
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +97 -447
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +9 -48
- package/dist/components/inputs/Input/TextArea/TextArea.js +90 -305
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -3
- package/dist/components/inputs/Input/TextInput/TextInput.js +90 -419
- package/dist/components/inputs/Input/shared/InputContent.js +59 -192
- package/dist/components/inputs/Inputs/Form.js +11 -40
- package/dist/components/inputs/Inputs/InputItem.d.ts +21 -15
- package/dist/components/inputs/Inputs/InputItem.js +14 -69
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/inputs/RadioGroup/RadioGroup.js +61 -353
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +0 -45
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -48
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -217
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -107
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -227
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +3 -8
- package/dist/components/inputs/Selection/shared/SelectBase.js +18 -69
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +138 -393
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +116 -397
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +25 -99
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +52 -164
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +21 -70
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +6 -11
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/select.context.js +36 -67
- package/dist/components/inputs/Selection/shared/select.types.d.ts +2 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +49 -109
- package/dist/components/inputs/Slider/Slider.d.ts +1 -2
- package/dist/components/inputs/Slider/Slider.js +76 -265
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +0 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +98 -447
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/Toggle/Toggle.d.ts +0 -1
- package/dist/components/inputs/Toggle/Toggle.js +37 -214
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +0 -3
- package/dist/components/inputs/Toggle/toggle.cva.js +1 -2
- package/dist/components/inputs/shared/CheckContent.d.ts +1 -2
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.d.ts +1 -2
- package/dist/components/inputs/shared/InputClear.js +12 -88
- package/dist/components/inputs/shared/TooltipWrapper.js +11 -50
- package/dist/components/inputs/shared/input.cva.d.ts +0 -28
- package/dist/components/inputs/shared/input.cva.js +4 -38
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/navigation/Stepper/StepperItem.js +31 -104
- package/dist/components/navigation/Stepper/StepperSeparator.js +5 -23
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/BottomSheet/BottomSheet.js +25 -98
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +22 -64
- package/dist/components/overlays/Modal/modal.cva.js +1 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +5 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +28 -83
- package/dist/components/overlays/Tooltip/Tooltip.js +28 -137
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +12 -37
- package/dist/components/segment/Segment.js +57 -218
- package/dist/components/segment/SegmentItem.js +10 -67
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/PaginationList.js +64 -167
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/status/Loader/Loader.js +22 -77
- package/dist/components/status/Toast/Toast.js +17 -22
- package/dist/components/status/Toast/toast.cva.d.ts +14 -3
- package/dist/components/status/Toast/toast.cva.js +12 -10
- package/dist/components/status/Toast/useToast.js +57 -62
- package/dist/components/table/ColumnConfig.js +54 -158
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/PaginatedTable.js +18 -84
- package/dist/components/table/Table.js +30 -30
- package/dist/components/table/table.cva.d.ts +7 -0
- package/dist/components/table/table.cva.js +2 -1
- package/dist/components/text/Link/Link.js +7 -19
- package/dist/components/text/Pill/Pill.d.ts +15 -0
- package/dist/components/text/Pill/Pill.js +44 -0
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +9 -23
- package/dist/config/router.context.js +16 -42
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +10 -21
- package/dist/config/uiConfig.context.js +18 -69
- package/dist/config/uiOverrides.context.d.ts +10 -20
- package/dist/config/uiOverrides.context.js +14 -54
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- package/dist/hooks/useAutosave.d.ts +1 -2
- package/dist/hooks/useAutosave.js +4 -12
- package/dist/hooks/useBreakpoint.js +3 -16
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFilters.js +64 -125
- package/dist/hooks/useForm.js +8 -42
- package/dist/hooks/useFormAutosave.d.ts +1 -3
- package/dist/hooks/useFormAutosave.js +30 -122
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +24 -91
- package/dist/hooks/useLocalStorage.js +10 -43
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/hooks/usePagination.js +19 -49
- package/dist/hooks/useScrollableListBox.js +16 -37
- package/dist/hooks/useSorting.js +28 -69
- package/dist/hooks/useStateAndRef.js +7 -21
- package/dist/hooks/useTableColumnConfig.js +31 -124
- package/dist/hooks/useTranslationMemo.js +5 -25
- package/dist/index.d.ts +7 -16
- package/dist/index.js +6 -13
- package/dist/tw-ui-plugin.js +0 -6
- package/dist/utils/date-time.utils.d.ts +10 -38
- package/dist/utils/date-time.utils.js +22 -136
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +0 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -16
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +0 -32
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -40
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +0 -85
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +0 -13
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -14
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +0 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +0 -571
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -35
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -575
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +0 -8
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +0 -5
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +0 -7
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +0 -37
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -178
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +0 -47
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -14
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -43
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -8
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -54
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -82
- package/dist/components/inputs/Skeleton/InputFrame.js +0 -548
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +0 -8
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +0 -5
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -14
- package/dist/components/inputs/shared/useStaticInputHandoff.js +0 -100
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.d.ts +0 -20
- package/dist/hooks/useKeyInteractions.js +0 -54
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -72
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -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"
|
|
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"> {
|
|
5
5
|
className?: string;
|
|
6
6
|
isScrollable?: boolean;
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const SelectListBox: ({ label, selectionMode, isSearchable, isScrollable, virtualizerOptions,
|
|
9
|
+
export declare const SelectListBox: ({ label, selectionMode, isSearchable, isScrollable, virtualizerOptions, newItemRender, onLoadMore, className, onClose, ...props }: SelectListBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,185 +3,73 @@ 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 { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
import { clsx } from "clsx";
|
|
9
8
|
import { ListBox, ListLayout, Virtualizer } from "react-aria-components";
|
|
10
9
|
//#region src/components/inputs/Selection/shared/SelectListBox.tsx
|
|
11
|
-
var SelectListBox = (
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let onClose;
|
|
18
|
-
let onLoadMore;
|
|
19
|
-
let props;
|
|
20
|
-
let selectionMode;
|
|
21
|
-
let t1;
|
|
22
|
-
let totalItems;
|
|
23
|
-
let virtualizerOptions;
|
|
24
|
-
if ($[0] !== t0) {
|
|
25
|
-
({label, selectionMode, isSearchable, isScrollable: t1, virtualizerOptions, totalItems, newItemRender, onLoadMore, className, onClose, ...props} = t0);
|
|
26
|
-
$[0] = t0;
|
|
27
|
-
$[1] = className;
|
|
28
|
-
$[2] = isSearchable;
|
|
29
|
-
$[3] = label;
|
|
30
|
-
$[4] = newItemRender;
|
|
31
|
-
$[5] = onClose;
|
|
32
|
-
$[6] = onLoadMore;
|
|
33
|
-
$[7] = props;
|
|
34
|
-
$[8] = selectionMode;
|
|
35
|
-
$[9] = t1;
|
|
36
|
-
$[10] = totalItems;
|
|
37
|
-
$[11] = virtualizerOptions;
|
|
38
|
-
} else {
|
|
39
|
-
className = $[1];
|
|
40
|
-
isSearchable = $[2];
|
|
41
|
-
label = $[3];
|
|
42
|
-
newItemRender = $[4];
|
|
43
|
-
onClose = $[5];
|
|
44
|
-
onLoadMore = $[6];
|
|
45
|
-
props = $[7];
|
|
46
|
-
selectionMode = $[8];
|
|
47
|
-
t1 = $[9];
|
|
48
|
-
totalItems = $[10];
|
|
49
|
-
virtualizerOptions = $[11];
|
|
50
|
-
}
|
|
51
|
-
const isScrollable = t1 === void 0 ? true : t1;
|
|
52
|
-
const { fieldState, onChange, listItems, selectableListItems, selectedIds, isMultiple, onClear, onSelectAll, hasLoadMore } = SelectContext.useSelect();
|
|
53
|
-
let t2;
|
|
54
|
-
if ($[12] !== fieldState || $[13] !== isMultiple || $[14] !== onChange || $[15] !== onClear || $[16] !== onClose || $[17] !== onSelectAll || $[18] !== selectableListItems) {
|
|
55
|
-
t2 = (value) => {
|
|
56
|
-
const ids = Array.from(value);
|
|
57
|
-
if (!isMultiple && ids.length === 0) {
|
|
58
|
-
if (fieldState.value) {
|
|
59
|
-
onClose?.();
|
|
60
|
-
onChange(fieldState.value);
|
|
61
|
-
}
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (isMultiple && ids.includes("all-item-id")) {
|
|
65
|
-
if (ids.length > selectableListItems.length) onClear();
|
|
66
|
-
else onSelectAll();
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (isMultiple) onChange(ids);
|
|
70
|
-
else {
|
|
10
|
+
var SelectListBox = ({ label, selectionMode, isSearchable, isScrollable = true, virtualizerOptions, newItemRender, onLoadMore, className, onClose, ...props }) => {
|
|
11
|
+
const { fieldState, onChange, listItems, selectableListItems, selectedIds, isMultiple, onClear, onSelectAll } = SelectContext.useSelect();
|
|
12
|
+
const onSelectionChange = (value) => {
|
|
13
|
+
const ids = Array.from(value);
|
|
14
|
+
if (!isMultiple && ids.length === 0) {
|
|
15
|
+
if (fieldState.value) {
|
|
71
16
|
onClose?.();
|
|
72
|
-
onChange(
|
|
17
|
+
onChange(fieldState.value);
|
|
73
18
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} else t3 = $[23];
|
|
105
|
-
const renderItem = t3;
|
|
106
|
-
if (virtualizerOptions || (totalItems ?? listItems.length) > 100 || hasLoadMore) {
|
|
107
|
-
const t4 = isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden";
|
|
108
|
-
let t5;
|
|
109
|
-
if ($[24] !== className || $[25] !== t4) {
|
|
110
|
-
t5 = clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", t4, className);
|
|
111
|
-
$[24] = className;
|
|
112
|
-
$[25] = t4;
|
|
113
|
-
$[26] = t5;
|
|
114
|
-
} else t5 = $[26];
|
|
115
|
-
let t6;
|
|
116
|
-
if ($[27] !== label || $[28] !== listItems || $[29] !== onSelectionChange || $[30] !== props || $[31] !== renderItem || $[32] !== selectedIds || $[33] !== selectionMode || $[34] !== t5) {
|
|
117
|
-
t6 = /* @__PURE__ */ jsx(ListBox, {
|
|
118
|
-
...props,
|
|
119
|
-
"aria-label": label,
|
|
120
|
-
selectionMode,
|
|
121
|
-
className: t5,
|
|
122
|
-
items: listItems,
|
|
123
|
-
selectedKeys: selectedIds,
|
|
124
|
-
onSelectionChange,
|
|
125
|
-
escapeKeyBehavior: "none",
|
|
126
|
-
shouldSelectOnPressUp: true,
|
|
127
|
-
children: renderItem
|
|
128
|
-
});
|
|
129
|
-
$[27] = label;
|
|
130
|
-
$[28] = listItems;
|
|
131
|
-
$[29] = onSelectionChange;
|
|
132
|
-
$[30] = props;
|
|
133
|
-
$[31] = renderItem;
|
|
134
|
-
$[32] = selectedIds;
|
|
135
|
-
$[33] = selectionMode;
|
|
136
|
-
$[34] = t5;
|
|
137
|
-
$[35] = t6;
|
|
138
|
-
} else t6 = $[35];
|
|
139
|
-
let t7;
|
|
140
|
-
if ($[36] !== t6 || $[37] !== virtualizerOptions) {
|
|
141
|
-
t7 = /* @__PURE__ */ jsx(Virtualizer, {
|
|
142
|
-
layout: ListLayout,
|
|
143
|
-
layoutOptions: virtualizerOptions,
|
|
144
|
-
children: t6
|
|
145
|
-
});
|
|
146
|
-
$[36] = t6;
|
|
147
|
-
$[37] = virtualizerOptions;
|
|
148
|
-
$[38] = t7;
|
|
149
|
-
} else t7 = $[38];
|
|
150
|
-
return t7;
|
|
151
|
-
}
|
|
152
|
-
const t4 = isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden";
|
|
153
|
-
let t5;
|
|
154
|
-
if ($[39] !== className || $[40] !== t4) {
|
|
155
|
-
t5 = clsx("flex-1 outline-none [&>div:last-child]:border-b-0", t4, className);
|
|
156
|
-
$[39] = className;
|
|
157
|
-
$[40] = t4;
|
|
158
|
-
$[41] = t5;
|
|
159
|
-
} else t5 = $[41];
|
|
160
|
-
let t6;
|
|
161
|
-
if ($[42] !== label || $[43] !== listItems || $[44] !== onSelectionChange || $[45] !== props || $[46] !== renderItem || $[47] !== selectedIds || $[48] !== selectionMode || $[49] !== t5) {
|
|
162
|
-
t6 = /* @__PURE__ */ jsx(ListBox, {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (isMultiple && ids.includes("all-item-id")) {
|
|
22
|
+
if (ids.length > selectableListItems.length) onClear();
|
|
23
|
+
else onSelectAll();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (isMultiple) onChange(ids);
|
|
27
|
+
else {
|
|
28
|
+
onClose?.();
|
|
29
|
+
onChange(ids[0]);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const renderItem = (item) => {
|
|
33
|
+
if (item.isSelectAllItem) return /* @__PURE__ */ jsx(SelectListBoxItemSelectAll, { ...item }, item.id);
|
|
34
|
+
if (item.isLoadingItem) return /* @__PURE__ */ jsx(SelectListBoxLoadingItem, {
|
|
35
|
+
...item,
|
|
36
|
+
onLoadMore
|
|
37
|
+
}, item.id);
|
|
38
|
+
return /* @__PURE__ */ jsx(SelectListBoxItem, {
|
|
39
|
+
...item,
|
|
40
|
+
isSearchable,
|
|
41
|
+
isNewItem: item.isNewItem,
|
|
42
|
+
newItemRender
|
|
43
|
+
}, item.id);
|
|
44
|
+
};
|
|
45
|
+
if (virtualizerOptions || listItems.length > 100) return /* @__PURE__ */ jsx(Virtualizer, {
|
|
46
|
+
layout: ListLayout,
|
|
47
|
+
layoutOptions: virtualizerOptions,
|
|
48
|
+
children: /* @__PURE__ */ jsx(ListBox, {
|
|
163
49
|
...props,
|
|
164
50
|
"aria-label": label,
|
|
165
51
|
selectionMode,
|
|
166
|
-
className:
|
|
52
|
+
className: clsx("flex-1 outline-none [&>div:last-child>*]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
167
53
|
items: listItems,
|
|
168
54
|
selectedKeys: selectedIds,
|
|
169
55
|
onSelectionChange,
|
|
170
56
|
escapeKeyBehavior: "none",
|
|
171
57
|
shouldSelectOnPressUp: true,
|
|
172
58
|
children: renderItem
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
return /* @__PURE__ */ jsx(ListBox, {
|
|
62
|
+
...props,
|
|
63
|
+
"aria-label": label,
|
|
64
|
+
selectionMode,
|
|
65
|
+
className: clsx("flex-1 outline-none [&>div:last-child]:border-b-0", isScrollable ? "max-h-full overflow-y-auto overflow-x-hidden" : "overflow-hidden", className),
|
|
66
|
+
items: listItems,
|
|
67
|
+
selectedKeys: selectedIds,
|
|
68
|
+
onSelectionChange,
|
|
69
|
+
escapeKeyBehavior: "none",
|
|
70
|
+
shouldSelectOnPressUp: true,
|
|
71
|
+
children: renderItem
|
|
72
|
+
});
|
|
185
73
|
};
|
|
186
74
|
//#endregion
|
|
187
75
|
export { SelectListBox };
|
|
@@ -3,102 +3,52 @@ 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
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { useRef } from "react";
|
|
7
|
+
import { useMemo, useRef } from "react";
|
|
9
8
|
import { ListBoxItem } from "react-aria-components";
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
10
|
//#region src/components/inputs/Selection/shared/SelectListBoxItem.tsx
|
|
12
|
-
var SelectListBoxItem = (
|
|
13
|
-
const $ = c(24);
|
|
14
|
-
const { isSearchable, isNewItem, newItemRender, id, label, content, isDisabled } = t0;
|
|
11
|
+
var SelectListBoxItem = ({ isSearchable, isNewItem, newItemRender, id, label, content, isDisabled }) => {
|
|
15
12
|
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
16
13
|
const ref = useRef(null);
|
|
17
14
|
const { t } = useTranslation("ui");
|
|
18
15
|
const { selectedIds, isMultiple } = SelectContext.useSelect();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const t2 = !isMultiple;
|
|
37
|
-
let t3;
|
|
38
|
-
if ($[4] !== isNewItem || $[5] !== selectListItemCva || $[6] !== t2) {
|
|
39
|
-
t3 = selectListItemCva({
|
|
40
|
-
isSingle: t2,
|
|
16
|
+
const itemContent = useMemo(() => {
|
|
17
|
+
if (isNewItem) return newItemRender?.(label) ?? `${t(($) => $.ui.autocomplete.createNewBtn)} '${label}'`;
|
|
18
|
+
return content ?? label;
|
|
19
|
+
}, [
|
|
20
|
+
isNewItem,
|
|
21
|
+
newItemRender,
|
|
22
|
+
label,
|
|
23
|
+
content,
|
|
24
|
+
t
|
|
25
|
+
]);
|
|
26
|
+
return /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
27
|
+
ref,
|
|
28
|
+
id,
|
|
29
|
+
textValue: label,
|
|
30
|
+
isDisabled,
|
|
31
|
+
className: selectListItemCva({
|
|
32
|
+
isSingle: !isMultiple,
|
|
41
33
|
isNewItem
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
$[6] = t2;
|
|
46
|
-
$[7] = t3;
|
|
47
|
-
} else t3 = $[7];
|
|
48
|
-
let t4;
|
|
49
|
-
if ($[8] !== isMultiple || $[9] !== isSearchable) {
|
|
50
|
-
t4 = isMultiple && !isSearchable && /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
51
|
-
variant: "default",
|
|
52
|
-
className: "group-focus-visible:outline-none!"
|
|
53
|
-
});
|
|
54
|
-
$[8] = isMultiple;
|
|
55
|
-
$[9] = isSearchable;
|
|
56
|
-
$[10] = t4;
|
|
57
|
-
} else t4 = $[10];
|
|
58
|
-
let t5;
|
|
59
|
-
if ($[11] !== id || $[12] !== isMultiple || $[13] !== isSearchable || $[14] !== selectedIds) {
|
|
60
|
-
t5 = isMultiple && isSearchable && /* @__PURE__ */ jsx("div", {
|
|
61
|
-
className: "group",
|
|
62
|
-
"data-rac": "",
|
|
63
|
-
"data-selected": selectedIds.includes(id) || void 0,
|
|
64
|
-
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
34
|
+
}),
|
|
35
|
+
children: [
|
|
36
|
+
isMultiple && !isSearchable && /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
65
37
|
variant: "default",
|
|
66
38
|
className: "group-focus-visible:outline-none!"
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
textValue: label,
|
|
81
|
-
isDisabled,
|
|
82
|
-
className: t3,
|
|
83
|
-
children: [
|
|
84
|
-
t4,
|
|
85
|
-
t5,
|
|
86
|
-
itemContent
|
|
87
|
-
]
|
|
88
|
-
});
|
|
89
|
-
$[16] = id;
|
|
90
|
-
$[17] = isDisabled;
|
|
91
|
-
$[18] = itemContent;
|
|
92
|
-
$[19] = label;
|
|
93
|
-
$[20] = t3;
|
|
94
|
-
$[21] = t4;
|
|
95
|
-
$[22] = t5;
|
|
96
|
-
$[23] = t6;
|
|
97
|
-
} else t6 = $[23];
|
|
98
|
-
return t6;
|
|
39
|
+
}),
|
|
40
|
+
isMultiple && isSearchable && /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: "group",
|
|
42
|
+
"data-rac": "",
|
|
43
|
+
"data-selected": selectedIds.includes(id) || void 0,
|
|
44
|
+
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
45
|
+
variant: "default",
|
|
46
|
+
className: "group-focus-visible:outline-none!"
|
|
47
|
+
})
|
|
48
|
+
}),
|
|
49
|
+
itemContent
|
|
50
|
+
]
|
|
51
|
+
});
|
|
99
52
|
};
|
|
100
|
-
function _temp($) {
|
|
101
|
-
return $.ui.autocomplete.createNewBtn;
|
|
102
|
-
}
|
|
103
53
|
//#endregion
|
|
104
54
|
export { SelectListBoxItem };
|
|
@@ -3,86 +3,33 @@ 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
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { useRef } from "react";
|
|
9
8
|
import { ListBoxItem } from "react-aria-components";
|
|
10
9
|
import { useTranslation } from "react-i18next";
|
|
11
10
|
//#region src/components/inputs/Selection/shared/SelectListBoxItemSelectAll.tsx
|
|
12
|
-
var SelectListBoxItemSelectAll = (
|
|
13
|
-
const $ = c(18);
|
|
14
|
-
const { id, label, isDisabled } = t0;
|
|
11
|
+
var SelectListBoxItemSelectAll = ({ id, label, isDisabled }) => {
|
|
15
12
|
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
16
13
|
const ref = useRef(null);
|
|
17
14
|
const { t } = useTranslation("ui");
|
|
18
15
|
const { selectableListItems, selectedIds } = SelectContext.useSelect();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
$
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let t2;
|
|
27
|
-
if ($[3] !== selectListItemCva) {
|
|
28
|
-
t2 = selectListItemCva({});
|
|
29
|
-
$[3] = selectListItemCva;
|
|
30
|
-
$[4] = t2;
|
|
31
|
-
} else t2 = $[4];
|
|
32
|
-
const t3 = selectedIds.length === selectableListItems.length || void 0;
|
|
33
|
-
const t4 = selectedIds.length > 0 && selectedIds.length < selectableListItems.length || void 0;
|
|
34
|
-
let t5;
|
|
35
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
36
|
-
t5 = /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
37
|
-
variant: "default",
|
|
38
|
-
className: "group-focus-visible:outline-none!"
|
|
39
|
-
});
|
|
40
|
-
$[5] = t5;
|
|
41
|
-
} else t5 = $[5];
|
|
42
|
-
let t6;
|
|
43
|
-
if ($[6] !== t3 || $[7] !== t4) {
|
|
44
|
-
t6 = /* @__PURE__ */ jsx("div", {
|
|
16
|
+
return /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
17
|
+
ref,
|
|
18
|
+
id,
|
|
19
|
+
textValue: label || t(($) => $.ui.select.allOption),
|
|
20
|
+
isDisabled,
|
|
21
|
+
className: selectListItemCva({}),
|
|
22
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
45
23
|
className: "group",
|
|
46
24
|
"data-rac": "",
|
|
47
|
-
"data-selected":
|
|
48
|
-
"data-indeterminate":
|
|
49
|
-
children:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
$
|
|
54
|
-
}
|
|
55
|
-
let t7;
|
|
56
|
-
if ($[9] !== t) {
|
|
57
|
-
t7 = t(_temp2);
|
|
58
|
-
$[9] = t;
|
|
59
|
-
$[10] = t7;
|
|
60
|
-
} else t7 = $[10];
|
|
61
|
-
let t8;
|
|
62
|
-
if ($[11] !== id || $[12] !== isDisabled || $[13] !== t1 || $[14] !== t2 || $[15] !== t6 || $[16] !== t7) {
|
|
63
|
-
t8 = /* @__PURE__ */ jsxs(ListBoxItem, {
|
|
64
|
-
ref,
|
|
65
|
-
id,
|
|
66
|
-
textValue: t1,
|
|
67
|
-
isDisabled,
|
|
68
|
-
className: t2,
|
|
69
|
-
children: [t6, t7]
|
|
70
|
-
});
|
|
71
|
-
$[11] = id;
|
|
72
|
-
$[12] = isDisabled;
|
|
73
|
-
$[13] = t1;
|
|
74
|
-
$[14] = t2;
|
|
75
|
-
$[15] = t6;
|
|
76
|
-
$[16] = t7;
|
|
77
|
-
$[17] = t8;
|
|
78
|
-
} else t8 = $[17];
|
|
79
|
-
return t8;
|
|
25
|
+
"data-selected": selectedIds.length === selectableListItems.length || void 0,
|
|
26
|
+
"data-indeterminate": selectedIds.length > 0 && selectedIds.length < selectableListItems.length || void 0,
|
|
27
|
+
children: /* @__PURE__ */ jsx(CheckboxCheckmark, {
|
|
28
|
+
variant: "default",
|
|
29
|
+
className: "group-focus-visible:outline-none!"
|
|
30
|
+
})
|
|
31
|
+
}), t(($) => $.ui.select.allOption)]
|
|
32
|
+
});
|
|
80
33
|
};
|
|
81
|
-
function _temp($) {
|
|
82
|
-
return $.ui.select.allOption;
|
|
83
|
-
}
|
|
84
|
-
function _temp2($_0) {
|
|
85
|
-
return $_0.ui.select.allOption;
|
|
86
|
-
}
|
|
87
34
|
//#endregion
|
|
88
35
|
export { SelectListBoxItemSelectAll };
|
|
@@ -4,86 +4,37 @@ 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 { c } from "react/compiler-runtime";
|
|
8
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { useCallback } from "react";
|
|
9
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
|
-
var SelectListBoxLoadingItem = (
|
|
13
|
-
const $ = c(20);
|
|
14
|
-
const { id, label, onLoadMore } = t0;
|
|
12
|
+
var SelectListBoxLoadingItem = ({ id, label, onLoadMore }) => {
|
|
15
13
|
const selectListItemCva = UIOverrides.useCva("select.listBoxItemCva", selectListBoxItemDefinition);
|
|
16
14
|
const { t } = useTranslation("ui");
|
|
17
15
|
const { isDebouncing, isLoading, hasLoadMore } = SelectContext.useSelect();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
t1 = () => {
|
|
16
|
+
const { ref } = useIntersectionObserver({
|
|
17
|
+
onIntersection: useCallback(() => {
|
|
21
18
|
if (!isDebouncing && !isLoading && hasLoadMore) onLoadMore?.();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
$[5] = onIntersection;
|
|
37
|
-
$[6] = t2;
|
|
38
|
-
} else t2 = $[6];
|
|
39
|
-
const { ref } = useIntersectionObserver(t2);
|
|
40
|
-
let t3;
|
|
41
|
-
if ($[7] !== label || $[8] !== t) {
|
|
42
|
-
t3 = label || t(_temp);
|
|
43
|
-
$[7] = label;
|
|
44
|
-
$[8] = t;
|
|
45
|
-
$[9] = t3;
|
|
46
|
-
} else t3 = $[9];
|
|
47
|
-
let t4;
|
|
48
|
-
if ($[10] !== selectListItemCva) {
|
|
49
|
-
t4 = selectListItemCva({});
|
|
50
|
-
$[10] = selectListItemCva;
|
|
51
|
-
$[11] = t4;
|
|
52
|
-
} else t4 = $[11];
|
|
53
|
-
let t5;
|
|
54
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
55
|
-
t5 = /* @__PURE__ */ jsx(Loader, {});
|
|
56
|
-
$[12] = t5;
|
|
57
|
-
} else t5 = $[12];
|
|
58
|
-
let t6;
|
|
59
|
-
if ($[13] !== ref) {
|
|
60
|
-
t6 = /* @__PURE__ */ jsx("div", {
|
|
19
|
+
}, [
|
|
20
|
+
isDebouncing,
|
|
21
|
+
isLoading,
|
|
22
|
+
hasLoadMore,
|
|
23
|
+
onLoadMore
|
|
24
|
+
]),
|
|
25
|
+
rootMargin: "40px"
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
28
|
+
id,
|
|
29
|
+
textValue: label || t(($) => $.ui.loadingState.text),
|
|
30
|
+
isDisabled: true,
|
|
31
|
+
className: selectListItemCva({}),
|
|
32
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
61
33
|
ref,
|
|
62
34
|
className: "flex flex-1 justify-center text-interactive-text-primary-idle",
|
|
63
|
-
children:
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
$[14] = t6;
|
|
67
|
-
} else t6 = $[14];
|
|
68
|
-
let t7;
|
|
69
|
-
if ($[15] !== id || $[16] !== t3 || $[17] !== t4 || $[18] !== t6) {
|
|
70
|
-
t7 = /* @__PURE__ */ jsx(ListBoxItem, {
|
|
71
|
-
id,
|
|
72
|
-
textValue: t3,
|
|
73
|
-
isDisabled: true,
|
|
74
|
-
className: t4,
|
|
75
|
-
children: t6
|
|
76
|
-
});
|
|
77
|
-
$[15] = id;
|
|
78
|
-
$[16] = t3;
|
|
79
|
-
$[17] = t4;
|
|
80
|
-
$[18] = t6;
|
|
81
|
-
$[19] = t7;
|
|
82
|
-
} else t7 = $[19];
|
|
83
|
-
return t7;
|
|
35
|
+
children: /* @__PURE__ */ jsx(Loader, {})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
84
38
|
};
|
|
85
|
-
function _temp($) {
|
|
86
|
-
return $.ui.loadingState.text;
|
|
87
|
-
}
|
|
88
39
|
//#endregion
|
|
89
40
|
export { SelectListBoxLoadingItem };
|