@povio/ui 2.3.0-rc.5 → 2.3.0-rc.7
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.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.js +164 -34
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +16 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +111 -107
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +17 -13
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +384 -116
- package/dist/components/inputs/DateTime/shared/Calendar.js +331 -137
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +283 -102
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +142 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +245 -90
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +296 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +345 -142
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +94 -21
- 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.js +205 -70
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/File/FileUpload.js +86 -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 -35
- package/dist/components/inputs/File/shared/InputUploadFilled.js +49 -8
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +25 -5
- package/dist/components/inputs/FormField/FormFieldHeader.js +79 -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.js +40 -9
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +253 -82
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +541 -116
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +321 -77
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.js +298 -89
- package/dist/components/inputs/Input/TextInput/TextInput.js +241 -81
- package/dist/components/inputs/Input/shared/InputContent.js +190 -58
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.js +65 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.js +317 -106
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +9 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +107 -27
- package/dist/components/inputs/Selection/Select/Select.js +9 -3
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -20
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +390 -143
- package/dist/components/inputs/Selection/shared/SelectInput.js +334 -136
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
- 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/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/select.context.js +34 -34
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +1 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +444 -116
- package/dist/components/inputs/Slider/Slider.js +247 -74
- package/dist/components/inputs/TextEditor/TextEditor.js +447 -103
- 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.js +187 -41
- package/dist/components/inputs/shared/CheckContent.js +21 -10
- package/dist/components/inputs/shared/InputClear.js +78 -21
- package/dist/components/inputs/shared/TooltipWrapper.js +47 -12
- package/dist/components/inputs/shared/input.cva.js +13 -3
- package/dist/components/inputs/shared/useStaticInputHandoff.js +97 -39
- 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 +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 +23 -23
- 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.js +39 -8
- package/dist/config/uiStyle.context.js +15 -5
- 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.js +86 -32
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- 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/package.json +1 -1
|
@@ -2,41 +2,121 @@ import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
|
2
2
|
import { Select } from "./Select.js";
|
|
3
3
|
import { getQueryItems } from "../shared/querySelect.utils.js";
|
|
4
4
|
import { useQueryAutocomplete } from "../../../../hooks/useQueryAutocomplete.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
import { useState } from "react";
|
|
7
8
|
//#region src/components/inputs/Selection/Select/QuerySelect.tsx
|
|
8
|
-
var QuerySelect = (
|
|
9
|
+
var QuerySelect = (t0) => {
|
|
10
|
+
const $ = c(33);
|
|
11
|
+
let props;
|
|
12
|
+
let query;
|
|
13
|
+
let queryMap;
|
|
14
|
+
let queryOptions;
|
|
15
|
+
let queryParams;
|
|
16
|
+
if ($[0] !== t0) {
|
|
17
|
+
({query, queryParams, queryOptions, queryMap, ...props} = t0);
|
|
18
|
+
$[0] = t0;
|
|
19
|
+
$[1] = props;
|
|
20
|
+
$[2] = query;
|
|
21
|
+
$[3] = queryMap;
|
|
22
|
+
$[4] = queryOptions;
|
|
23
|
+
$[5] = queryParams;
|
|
24
|
+
} else {
|
|
25
|
+
props = $[1];
|
|
26
|
+
query = $[2];
|
|
27
|
+
queryMap = $[3];
|
|
28
|
+
queryOptions = $[4];
|
|
29
|
+
queryParams = $[5];
|
|
30
|
+
}
|
|
9
31
|
const ui = UIConfig.useConfig();
|
|
10
32
|
const [search, setSearch] = useState("");
|
|
11
33
|
const isSearchable = props.isSearchable ?? ui.select.isSearchable;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
let t1;
|
|
35
|
+
if ($[6] !== queryMap) {
|
|
36
|
+
t1 = (data) => getQueryItems(data, queryMap);
|
|
37
|
+
$[6] = queryMap;
|
|
38
|
+
$[7] = t1;
|
|
39
|
+
} else t1 = $[7];
|
|
40
|
+
const t2 = isSearchable ? search : void 0;
|
|
41
|
+
const t3 = props.isInitialQueryDisabled ?? ui.querySelect?.isInitialQueryDisabled;
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[8] !== query || $[9] !== queryOptions || $[10] !== queryParams || $[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
|
|
44
|
+
t4 = {
|
|
45
|
+
query,
|
|
46
|
+
queryParams,
|
|
47
|
+
queryOptions,
|
|
48
|
+
mapItems: t1,
|
|
49
|
+
search: t2,
|
|
50
|
+
initialQueryState: t3
|
|
51
|
+
};
|
|
52
|
+
$[8] = query;
|
|
53
|
+
$[9] = queryOptions;
|
|
54
|
+
$[10] = queryParams;
|
|
55
|
+
$[11] = t1;
|
|
56
|
+
$[12] = t2;
|
|
57
|
+
$[13] = t3;
|
|
58
|
+
$[14] = t4;
|
|
59
|
+
} else t4 = $[14];
|
|
60
|
+
const { items, totalItems, isLoading, handleEnableQuery, hasNextPage, fetchNextPage } = useQueryAutocomplete(t4);
|
|
61
|
+
let onSearchChange;
|
|
62
|
+
let selectProps;
|
|
63
|
+
if ($[15] !== props) {
|
|
64
|
+
const { isInitialQueryDisabled: _, onSearchChange: t5, ...t6 } = props;
|
|
65
|
+
onSearchChange = t5;
|
|
66
|
+
selectProps = t6;
|
|
67
|
+
$[15] = props;
|
|
68
|
+
$[16] = onSearchChange;
|
|
69
|
+
$[17] = selectProps;
|
|
70
|
+
} else {
|
|
71
|
+
onSearchChange = $[16];
|
|
72
|
+
selectProps = $[17];
|
|
73
|
+
}
|
|
74
|
+
let t5;
|
|
75
|
+
if ($[18] !== handleEnableQuery || $[19] !== onSearchChange) {
|
|
76
|
+
t5 = (value) => {
|
|
77
|
+
setSearch(value);
|
|
78
|
+
handleEnableQuery();
|
|
79
|
+
onSearchChange?.(value);
|
|
80
|
+
};
|
|
81
|
+
$[18] = handleEnableQuery;
|
|
82
|
+
$[19] = onSearchChange;
|
|
83
|
+
$[20] = t5;
|
|
84
|
+
} else t5 = $[20];
|
|
85
|
+
const handleSearchChange = t5;
|
|
86
|
+
let t6;
|
|
87
|
+
if ($[21] !== handleSearchChange || $[22] !== isSearchable) {
|
|
88
|
+
t6 = isSearchable && {
|
|
36
89
|
isClientSearchDisabled: true,
|
|
37
90
|
onSearchChange: handleSearchChange
|
|
38
|
-
}
|
|
39
|
-
|
|
91
|
+
};
|
|
92
|
+
$[21] = handleSearchChange;
|
|
93
|
+
$[22] = isSearchable;
|
|
94
|
+
$[23] = t6;
|
|
95
|
+
} else t6 = $[23];
|
|
96
|
+
let t7;
|
|
97
|
+
if ($[24] !== fetchNextPage || $[25] !== handleEnableQuery || $[26] !== hasNextPage || $[27] !== isLoading || $[28] !== items || $[29] !== selectProps || $[30] !== t6 || $[31] !== totalItems) {
|
|
98
|
+
t7 = /* @__PURE__ */ jsx(Select, {
|
|
99
|
+
...selectProps,
|
|
100
|
+
items,
|
|
101
|
+
isLoading,
|
|
102
|
+
totalItems,
|
|
103
|
+
hasLoadMore: hasNextPage,
|
|
104
|
+
onLoadMore: fetchNextPage,
|
|
105
|
+
onMouseEnter: handleEnableQuery,
|
|
106
|
+
onFocusCapture: handleEnableQuery,
|
|
107
|
+
...t6
|
|
108
|
+
});
|
|
109
|
+
$[24] = fetchNextPage;
|
|
110
|
+
$[25] = handleEnableQuery;
|
|
111
|
+
$[26] = hasNextPage;
|
|
112
|
+
$[27] = isLoading;
|
|
113
|
+
$[28] = items;
|
|
114
|
+
$[29] = selectProps;
|
|
115
|
+
$[30] = t6;
|
|
116
|
+
$[31] = totalItems;
|
|
117
|
+
$[32] = t7;
|
|
118
|
+
} else t7 = $[32];
|
|
119
|
+
return t7;
|
|
40
120
|
};
|
|
41
121
|
//#endregion
|
|
42
122
|
export { QuerySelect };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ArrowDropDownIcon } from "../../../../assets/icons/ArrowDropDown.js";
|
|
2
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
4
3
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
5
4
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
6
5
|
import { SelectBase } from "../shared/SelectBase.js";
|
|
6
|
+
import { StaticSelectTrailingContent } from "../shared/StaticSelectTrailingContent.js";
|
|
7
7
|
import { getStaticSelectValue } from "../shared/staticSelect.utils.js";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
@@ -51,6 +51,7 @@ function Select({ renderStaticInput, ...props }) {
|
|
|
51
51
|
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
52
52
|
if (!renderInput) {
|
|
53
53
|
const as = props.as ?? ui.input.as;
|
|
54
|
+
const size = props.size ?? ui.input.size;
|
|
54
55
|
let isDisabled = !!props.isDisabled;
|
|
55
56
|
if (isFormControlDisabled) isDisabled = true;
|
|
56
57
|
const mode = props.selectionMode ?? ui.select.selectionMode;
|
|
@@ -67,7 +68,12 @@ function Select({ renderStaticInput, ...props }) {
|
|
|
67
68
|
selectedTagsType: props.selectedTagsType ?? ui.select.selectedTagsType
|
|
68
69
|
});
|
|
69
70
|
const isSearchable = props.isSearchable ?? ui.select.isSearchable;
|
|
70
|
-
const trailingContent =
|
|
71
|
+
const trailingContent = /* @__PURE__ */ jsx(StaticSelectTrailingContent, {
|
|
72
|
+
trailingContent: props.trailingContent,
|
|
73
|
+
hideDropdownIcon: props.hideDropdownIcon,
|
|
74
|
+
isDisabled,
|
|
75
|
+
size
|
|
76
|
+
});
|
|
71
77
|
const placeholder = as === "floating" ? null : props.placeholder;
|
|
72
78
|
const inputValue = !isMultiple && selectedItem ? selectedItem.label : "";
|
|
73
79
|
const shouldRenderPlaceholderAfterValue = isMultiple && props.placeholder && !isEmpty;
|
|
@@ -102,7 +108,7 @@ function Select({ renderStaticInput, ...props }) {
|
|
|
102
108
|
labelPlacement: "content-row",
|
|
103
109
|
dataAttributes,
|
|
104
110
|
renderStatic: true,
|
|
105
|
-
|
|
111
|
+
wrapTrailingContent: false,
|
|
106
112
|
onStaticInteract: renderRealInput,
|
|
107
113
|
leadingContent: props.leadingContent && /* @__PURE__ */ jsx("div", {
|
|
108
114
|
className: "ml-input-side-default flex shrink-0 items-center",
|
|
@@ -3,31 +3,80 @@ import { useBreakpoint } from "../../../../hooks/useBreakpoint.js";
|
|
|
3
3
|
import { SelectContext } from "./select.context.js";
|
|
4
4
|
import { SelectDesktop } from "./SelectDesktop.js";
|
|
5
5
|
import { SelectMobile } from "./SelectMobile.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/inputs/Selection/shared/SelectBase.tsx
|
|
8
9
|
var SelectBase = (dProps) => {
|
|
10
|
+
const $ = c(21);
|
|
9
11
|
const ui = UIConfig.useConfig();
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
const t0 = dProps.selectionMode ?? ui.select.selectionMode;
|
|
13
|
+
const t1 = dProps.variant ?? ui.input.variant;
|
|
14
|
+
const t2 = dProps.as ?? ui.input.as;
|
|
15
|
+
const t3 = dProps.size ?? ui.input.size;
|
|
16
|
+
const t4 = dProps.hideLabel ?? ui.input.hideLabel;
|
|
17
|
+
const t5 = dProps.isClearable ?? ui.input.isClearable;
|
|
18
|
+
const t6 = dProps.isSearchable ?? ui.select.isSearchable;
|
|
19
|
+
const t7 = dProps.selectedTagsType ?? ui.select.selectedTagsType;
|
|
20
|
+
const t8 = dProps.virtualizerOptions || (dProps.totalItems ?? 0) > 100 || dProps.hasLoadMore ? false : dProps.ignoreTriggerWidth ?? false;
|
|
21
|
+
const t9 = dProps.collapseAfter ?? ui.select.collapseAfter;
|
|
22
|
+
const t10 = dProps.hideSearchIcon ?? ui.select.hideSearchIcon;
|
|
23
|
+
const t11 = dProps.fireBlurOnChange ?? ui.select.fireBlurOnChange;
|
|
24
|
+
const t12 = dProps.ignoreInputValueFiltering ?? dProps.isClientSearchDisabled;
|
|
25
|
+
let t13;
|
|
26
|
+
if ($[0] !== dProps || $[1] !== t0 || $[2] !== t1 || $[3] !== t10 || $[4] !== t11 || $[5] !== t12 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== t6 || $[11] !== t7 || $[12] !== t8 || $[13] !== t9) {
|
|
27
|
+
t13 = {
|
|
28
|
+
...dProps,
|
|
29
|
+
selectionMode: t0,
|
|
30
|
+
variant: t1,
|
|
31
|
+
as: t2,
|
|
32
|
+
size: t3,
|
|
33
|
+
hideLabel: t4,
|
|
34
|
+
isClearable: t5,
|
|
35
|
+
isSearchable: t6,
|
|
36
|
+
selectedTagsType: t7,
|
|
37
|
+
ignoreTriggerWidth: t8,
|
|
38
|
+
collapseAfter: t9,
|
|
39
|
+
hideSearchIcon: t10,
|
|
40
|
+
fireBlurOnChange: t11,
|
|
41
|
+
isClientSearchDisabled: t12
|
|
42
|
+
};
|
|
43
|
+
$[0] = dProps;
|
|
44
|
+
$[1] = t0;
|
|
45
|
+
$[2] = t1;
|
|
46
|
+
$[3] = t10;
|
|
47
|
+
$[4] = t11;
|
|
48
|
+
$[5] = t12;
|
|
49
|
+
$[6] = t2;
|
|
50
|
+
$[7] = t3;
|
|
51
|
+
$[8] = t4;
|
|
52
|
+
$[9] = t5;
|
|
53
|
+
$[10] = t6;
|
|
54
|
+
$[11] = t7;
|
|
55
|
+
$[12] = t8;
|
|
56
|
+
$[13] = t9;
|
|
57
|
+
$[14] = t13;
|
|
58
|
+
} else t13 = $[14];
|
|
59
|
+
const props = t13;
|
|
26
60
|
const isDesktop = useBreakpoint("md");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
61
|
+
const t14 = props;
|
|
62
|
+
let t15;
|
|
63
|
+
if ($[15] !== isDesktop || $[16] !== props) {
|
|
64
|
+
t15 = isDesktop ? /* @__PURE__ */ jsx(SelectDesktop, { ...props }) : /* @__PURE__ */ jsx(SelectMobile, { ...props });
|
|
65
|
+
$[15] = isDesktop;
|
|
66
|
+
$[16] = props;
|
|
67
|
+
$[17] = t15;
|
|
68
|
+
} else t15 = $[17];
|
|
69
|
+
let t16;
|
|
70
|
+
if ($[18] !== t14 || $[19] !== t15) {
|
|
71
|
+
t16 = /* @__PURE__ */ jsx(SelectContext.Provider, {
|
|
72
|
+
...t14,
|
|
73
|
+
children: t15
|
|
74
|
+
});
|
|
75
|
+
$[18] = t14;
|
|
76
|
+
$[19] = t15;
|
|
77
|
+
$[20] = t16;
|
|
78
|
+
} else t16 = $[20];
|
|
79
|
+
return t16;
|
|
31
80
|
};
|
|
32
81
|
//#endregion
|
|
33
82
|
export { SelectBase };
|