@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,88 +1,46 @@
|
|
|
1
1
|
import { modalOverlay } from "../Modal/modal.cva.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
|
|
6
5
|
//#region src/components/overlays/Drawer/Drawer.tsx
|
|
7
|
-
var Drawer = (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
14
|
-
label,
|
|
15
|
-
portalContainerRef,
|
|
16
|
-
isDismissable,
|
|
17
|
-
overlayClassName,
|
|
18
|
-
dialogClassName,
|
|
19
|
-
className,
|
|
20
|
-
shouldCloseOnInteractOutside,
|
|
21
|
-
children
|
|
22
|
-
});
|
|
23
|
-
$[0] = children;
|
|
24
|
-
$[1] = className;
|
|
25
|
-
$[2] = dialogClassName;
|
|
26
|
-
$[3] = isDismissable;
|
|
27
|
-
$[4] = label;
|
|
28
|
-
$[5] = overlayClassName;
|
|
29
|
-
$[6] = portalContainerRef;
|
|
30
|
-
$[7] = shouldCloseOnInteractOutside;
|
|
31
|
-
$[8] = t1;
|
|
32
|
-
} else t1 = $[8];
|
|
33
|
-
let t2;
|
|
34
|
-
if ($[9] !== isOpen || $[10] !== onOpenChange || $[11] !== t1 || $[12] !== trigger) {
|
|
35
|
-
t2 = /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
36
|
-
isOpen,
|
|
37
|
-
onOpenChange,
|
|
38
|
-
children: [trigger, t1]
|
|
39
|
-
});
|
|
40
|
-
$[9] = isOpen;
|
|
41
|
-
$[10] = onOpenChange;
|
|
42
|
-
$[11] = t1;
|
|
43
|
-
$[12] = trigger;
|
|
44
|
-
$[13] = t2;
|
|
45
|
-
} else t2 = $[13];
|
|
46
|
-
return t2;
|
|
47
|
-
}
|
|
48
|
-
let t1;
|
|
49
|
-
if ($[14] !== children || $[15] !== className || $[16] !== dialogClassName || $[17] !== isDismissable || $[18] !== isOpen || $[19] !== label || $[20] !== onOpenChange || $[21] !== overlayClassName || $[22] !== portalContainerRef || $[23] !== shouldCloseOnInteractOutside) {
|
|
50
|
-
t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
51
|
-
isOpen,
|
|
52
|
-
onOpenChange,
|
|
6
|
+
var Drawer = ({ label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
|
|
7
|
+
if (trigger) return /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
8
|
+
isOpen,
|
|
9
|
+
onOpenChange,
|
|
10
|
+
children: [trigger, /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
11
|
+
label,
|
|
53
12
|
portalContainerRef,
|
|
54
13
|
isDismissable,
|
|
55
14
|
overlayClassName,
|
|
56
15
|
dialogClassName,
|
|
57
16
|
className,
|
|
58
|
-
label,
|
|
59
17
|
shouldCloseOnInteractOutside,
|
|
60
18
|
children
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
22
|
+
isOpen,
|
|
23
|
+
onOpenChange,
|
|
24
|
+
portalContainerRef,
|
|
25
|
+
isDismissable,
|
|
26
|
+
overlayClassName,
|
|
27
|
+
dialogClassName,
|
|
28
|
+
className,
|
|
29
|
+
label,
|
|
30
|
+
shouldCloseOnInteractOutside,
|
|
31
|
+
children
|
|
32
|
+
});
|
|
75
33
|
};
|
|
76
34
|
var DrawerOverlay = ({ label, isOpen, onOpenChange, portalContainerRef, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
|
|
77
35
|
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
78
36
|
isOpen,
|
|
79
37
|
onOpenChange,
|
|
80
38
|
UNSTABLE_portalContainer: portalContainerRef?.current,
|
|
81
|
-
className: clsx(modalOverlay(), overlayClassName),
|
|
39
|
+
className: clsx(modalOverlay(), "z-drawer", overlayClassName),
|
|
82
40
|
isDismissable,
|
|
83
41
|
shouldCloseOnInteractOutside,
|
|
84
42
|
children: /* @__PURE__ */ jsx(Modal, {
|
|
85
|
-
className: clsx("fixed inset-y-0 right-0 z-
|
|
43
|
+
className: clsx("fixed inset-y-0 right-0 z-drawer w-fit entering:animate-drawer-enter-right exiting:animate-drawer-exit-right bg-elevation-fill-default-1", className),
|
|
86
44
|
children: /* @__PURE__ */ jsx(Dialog, {
|
|
87
45
|
"aria-label": label,
|
|
88
46
|
className: clsx("outline-none", dialogClassName),
|
|
@@ -18,7 +18,7 @@ var modalContentDefinition = UIOverrides.defineConfig({
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
var modalOverlayDefinition = UIOverrides.defineConfig({
|
|
21
|
-
base: ["fixed inset-0 z-
|
|
21
|
+
base: ["fixed inset-0 z-modal flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"],
|
|
22
22
|
config: {
|
|
23
23
|
variants: { aside: {
|
|
24
24
|
left: "p-0",
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { BottomSheetProps } from '../BottomSheet/BottomSheet';
|
|
3
|
+
type ResponsivePopoverBottomSheetProps = Partial<Omit<BottomSheetProps, "children" | "isOpen" | "onOpenChange" | "trigger">>;
|
|
2
4
|
export interface ResponsivePopoverProps {
|
|
3
5
|
trigger: ReactElement;
|
|
4
6
|
children: ReactNode;
|
|
@@ -6,5 +8,7 @@ export interface ResponsivePopoverProps {
|
|
|
6
8
|
onOpenChange: (isOpen: boolean) => void;
|
|
7
9
|
popoverClassName?: string;
|
|
8
10
|
sheetLabel: string;
|
|
11
|
+
bottomSheetProps?: ResponsivePopoverBottomSheetProps;
|
|
9
12
|
}
|
|
10
|
-
export declare const ResponsivePopover: ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, }: ResponsivePopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ResponsivePopover: ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, }: ResponsivePopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -2,96 +2,41 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { BottomSheet } from "../BottomSheet/BottomSheet.js";
|
|
3
3
|
import { useBreakpoint } from "../../../hooks/useBreakpoint.js";
|
|
4
4
|
import { popoverDefinition } from "../../shared/popover.cva.js";
|
|
5
|
-
import { c } from "react/compiler-runtime";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
import { Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
9
8
|
//#region src/components/overlays/ResponsivePopover/ResponsivePopover.tsx
|
|
10
|
-
var ResponsivePopover = (
|
|
11
|
-
const $ = c(23);
|
|
12
|
-
const { trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel } = t0;
|
|
9
|
+
var ResponsivePopover = ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps }) => {
|
|
13
10
|
const popoverCva = UIOverrides.useCva("popover.cva", popoverDefinition);
|
|
14
|
-
if (!useBreakpoint("md")) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
label: sheetLabel,
|
|
33
|
-
children: t1
|
|
34
|
-
});
|
|
35
|
-
$[2] = isOpen;
|
|
36
|
-
$[3] = onOpenChange;
|
|
37
|
-
$[4] = sheetLabel;
|
|
38
|
-
$[5] = t1;
|
|
39
|
-
$[6] = trigger;
|
|
40
|
-
$[7] = t2;
|
|
41
|
-
} else t2 = $[7];
|
|
42
|
-
return t2;
|
|
43
|
-
}
|
|
44
|
-
let t1;
|
|
45
|
-
if ($[8] !== popoverClassName) {
|
|
46
|
-
t1 = clsx("my-4 outline-none", popoverClassName);
|
|
47
|
-
$[8] = popoverClassName;
|
|
48
|
-
$[9] = t1;
|
|
49
|
-
} else t1 = $[9];
|
|
50
|
-
let t2;
|
|
51
|
-
if ($[10] !== popoverCva) {
|
|
52
|
-
t2 = clsx(popoverCva({}), "overflow-hidden p-2");
|
|
53
|
-
$[10] = popoverCva;
|
|
54
|
-
$[11] = t2;
|
|
55
|
-
} else t2 = $[11];
|
|
56
|
-
let t3;
|
|
57
|
-
if ($[12] !== children || $[13] !== t2) {
|
|
58
|
-
t3 = /* @__PURE__ */ jsx(Dialog, {
|
|
59
|
-
className: "outline-none",
|
|
60
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
61
|
-
className: t2,
|
|
62
|
-
children
|
|
63
|
-
})
|
|
64
|
-
});
|
|
65
|
-
$[12] = children;
|
|
66
|
-
$[13] = t2;
|
|
67
|
-
$[14] = t3;
|
|
68
|
-
} else t3 = $[14];
|
|
69
|
-
let t4;
|
|
70
|
-
if ($[15] !== t1 || $[16] !== t3) {
|
|
71
|
-
t4 = /* @__PURE__ */ jsx(Popover, {
|
|
72
|
-
className: t1,
|
|
11
|
+
if (!useBreakpoint("md")) return /* @__PURE__ */ jsx(BottomSheet, {
|
|
12
|
+
height: "auto",
|
|
13
|
+
isDismissable: true,
|
|
14
|
+
label: sheetLabel,
|
|
15
|
+
...bottomSheetProps,
|
|
16
|
+
isOpen,
|
|
17
|
+
onOpenChange,
|
|
18
|
+
trigger,
|
|
19
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: "p-4",
|
|
21
|
+
children
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
25
|
+
isOpen,
|
|
26
|
+
onOpenChange,
|
|
27
|
+
children: [trigger, /* @__PURE__ */ jsx(Popover, {
|
|
28
|
+
className: clsx("my-4 outline-none", popoverClassName),
|
|
73
29
|
offset: 0,
|
|
74
30
|
placement: "bottom start",
|
|
75
|
-
children:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
isOpen,
|
|
85
|
-
onOpenChange,
|
|
86
|
-
children: [trigger, t4]
|
|
87
|
-
});
|
|
88
|
-
$[18] = isOpen;
|
|
89
|
-
$[19] = onOpenChange;
|
|
90
|
-
$[20] = t4;
|
|
91
|
-
$[21] = trigger;
|
|
92
|
-
$[22] = t5;
|
|
93
|
-
} else t5 = $[22];
|
|
94
|
-
return t5;
|
|
31
|
+
children: /* @__PURE__ */ jsx(Dialog, {
|
|
32
|
+
className: "outline-none",
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: clsx(popoverCva({}), "overflow-hidden p-2"),
|
|
35
|
+
children
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
95
40
|
};
|
|
96
41
|
//#endregion
|
|
97
42
|
export { ResponsivePopover };
|
|
@@ -3,161 +3,52 @@ import { PointerVerticalIcon } from "../../../assets/icons/PointerVertical.js";
|
|
|
3
3
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
4
4
|
import { tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition } from "./tooltip.cva.js";
|
|
5
5
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { clsx } from "clsx";
|
|
9
8
|
import { Fragment as Fragment$1, useRef } from "react";
|
|
10
9
|
import { OverlayArrow, Tooltip, TooltipTrigger } from "react-aria-components";
|
|
11
10
|
import { useFocusable } from "react-aria";
|
|
12
11
|
//#region src/components/overlays/Tooltip/Tooltip.tsx
|
|
13
|
-
var CustomTrigger = (
|
|
14
|
-
const $ = c(8);
|
|
15
|
-
const { children, className, tabIndex } = t0;
|
|
12
|
+
var CustomTrigger = ({ children, className, tabIndex }) => {
|
|
16
13
|
const ref = useRef(null);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if ($[1] !== className) {
|
|
26
|
-
t3 = clsx("inline-flex", className);
|
|
27
|
-
$[1] = className;
|
|
28
|
-
$[2] = t3;
|
|
29
|
-
} else t3 = $[2];
|
|
30
|
-
let t4;
|
|
31
|
-
if ($[3] !== children || $[4] !== focusableProps || $[5] !== t2 || $[6] !== t3) {
|
|
32
|
-
t4 = /* @__PURE__ */ jsx("div", {
|
|
33
|
-
ref,
|
|
34
|
-
...focusableProps,
|
|
35
|
-
tabIndex: t2,
|
|
36
|
-
className: t3,
|
|
37
|
-
children
|
|
38
|
-
});
|
|
39
|
-
$[3] = children;
|
|
40
|
-
$[4] = focusableProps;
|
|
41
|
-
$[5] = t2;
|
|
42
|
-
$[6] = t3;
|
|
43
|
-
$[7] = t4;
|
|
44
|
-
} else t4 = $[7];
|
|
45
|
-
return t4;
|
|
14
|
+
const { focusableProps } = useFocusable({}, ref);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
ref,
|
|
17
|
+
...focusableProps,
|
|
18
|
+
tabIndex: tabIndex ?? 0,
|
|
19
|
+
className: clsx("inline-flex", className),
|
|
20
|
+
children
|
|
21
|
+
});
|
|
46
22
|
};
|
|
47
|
-
var Tooltip$1 = (
|
|
48
|
-
const $ = c(38);
|
|
49
|
-
const { children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps } = t0;
|
|
23
|
+
var Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps }) => {
|
|
50
24
|
const tooltipCva = UIOverrides.useCva("tooltip.cva", tooltipDefinition);
|
|
51
25
|
const tooltipPointerHorizontalCva = UIOverrides.useCva("tooltip.pointerHorizontalCva", tooltipPointerHorizontalDefinition);
|
|
52
26
|
const tooltipPointerVerticalCva = UIOverrides.useCva("tooltip.pointerVerticalCva", tooltipPointerVerticalDefinition);
|
|
53
27
|
const tooltipTextCva = UIOverrides.useCva("tooltip.textCva", tooltipTextDefinition);
|
|
54
28
|
const Trigger = isNonInteractiveTrigger ? CustomTrigger : Fragment$1;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
t3 = isNonInteractiveTrigger ? /* @__PURE__ */ jsx(Trigger, {
|
|
29
|
+
return /* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
30
|
+
delay: delay ?? 0,
|
|
31
|
+
closeDelay: closeDelay ?? 0,
|
|
32
|
+
isDisabled,
|
|
33
|
+
children: [isNonInteractiveTrigger ? /* @__PURE__ */ jsx(Trigger, {
|
|
61
34
|
...isNonInteractiveTrigger && { className: triggerClassName },
|
|
62
35
|
tabIndex: triggerTabIndex,
|
|
63
36
|
children
|
|
64
|
-
}) : /* @__PURE__ */ jsx(Trigger, { children })
|
|
65
|
-
$[0] = Trigger;
|
|
66
|
-
$[1] = children;
|
|
67
|
-
$[2] = isNonInteractiveTrigger;
|
|
68
|
-
$[3] = triggerClassName;
|
|
69
|
-
$[4] = triggerTabIndex;
|
|
70
|
-
$[5] = t3;
|
|
71
|
-
} else t3 = $[5];
|
|
72
|
-
const T1 = Tooltip;
|
|
73
|
-
const t4 = tooltipCva({
|
|
74
|
-
color,
|
|
75
|
-
className: tooltipProps.className
|
|
76
|
-
});
|
|
77
|
-
let t5;
|
|
78
|
-
if ($[6] !== color || $[7] !== tooltipPointerHorizontalCva) {
|
|
79
|
-
t5 = tooltipPointerHorizontalCva({ color });
|
|
80
|
-
$[6] = color;
|
|
81
|
-
$[7] = tooltipPointerHorizontalCva;
|
|
82
|
-
$[8] = t5;
|
|
83
|
-
} else t5 = $[8];
|
|
84
|
-
let t6;
|
|
85
|
-
if ($[9] !== t5) {
|
|
86
|
-
t6 = /* @__PURE__ */ jsx(PointerHorizontalIcon, { className: t5 });
|
|
87
|
-
$[9] = t5;
|
|
88
|
-
$[10] = t6;
|
|
89
|
-
} else t6 = $[10];
|
|
90
|
-
let t7;
|
|
91
|
-
if ($[11] !== color || $[12] !== tooltipPointerVerticalCva) {
|
|
92
|
-
t7 = tooltipPointerVerticalCva({ color });
|
|
93
|
-
$[11] = color;
|
|
94
|
-
$[12] = tooltipPointerVerticalCva;
|
|
95
|
-
$[13] = t7;
|
|
96
|
-
} else t7 = $[13];
|
|
97
|
-
let t8;
|
|
98
|
-
if ($[14] !== t7) {
|
|
99
|
-
t8 = /* @__PURE__ */ jsx(PointerVerticalIcon, { className: t7 });
|
|
100
|
-
$[14] = t7;
|
|
101
|
-
$[15] = t8;
|
|
102
|
-
} else t8 = $[15];
|
|
103
|
-
let t9;
|
|
104
|
-
if ($[16] !== t6 || $[17] !== t8) {
|
|
105
|
-
t9 = /* @__PURE__ */ jsxs(OverlayArrow, { children: [t6, t8] });
|
|
106
|
-
$[16] = t6;
|
|
107
|
-
$[17] = t8;
|
|
108
|
-
$[18] = t9;
|
|
109
|
-
} else t9 = $[18];
|
|
110
|
-
let t10;
|
|
111
|
-
if ($[19] !== color || $[20] !== tooltipTextCva) {
|
|
112
|
-
t10 = tooltipTextCva({ color });
|
|
113
|
-
$[19] = color;
|
|
114
|
-
$[20] = tooltipTextCva;
|
|
115
|
-
$[21] = t10;
|
|
116
|
-
} else t10 = $[21];
|
|
117
|
-
let t11;
|
|
118
|
-
if ($[22] !== t10 || $[23] !== text) {
|
|
119
|
-
t11 = /* @__PURE__ */ jsx(Typography, {
|
|
120
|
-
size: "body-4",
|
|
121
|
-
variant: "prominent-1",
|
|
122
|
-
className: t10,
|
|
123
|
-
children: text
|
|
124
|
-
});
|
|
125
|
-
$[22] = t10;
|
|
126
|
-
$[23] = text;
|
|
127
|
-
$[24] = t11;
|
|
128
|
-
} else t11 = $[24];
|
|
129
|
-
let t12;
|
|
130
|
-
if ($[25] !== T1 || $[26] !== t11 || $[27] !== t4 || $[28] !== t9 || $[29] !== tooltipProps) {
|
|
131
|
-
t12 = /* @__PURE__ */ jsxs(T1, {
|
|
37
|
+
}) : /* @__PURE__ */ jsx(Trigger, { children }), /* @__PURE__ */ jsxs(Tooltip, {
|
|
132
38
|
...tooltipProps,
|
|
133
|
-
className:
|
|
39
|
+
className: tooltipCva({
|
|
40
|
+
color,
|
|
41
|
+
className: tooltipProps.className
|
|
42
|
+
}),
|
|
134
43
|
offset: 13,
|
|
135
|
-
children: [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} else t12 = $[30];
|
|
144
|
-
let t13;
|
|
145
|
-
if ($[31] !== T0 || $[32] !== isDisabled || $[33] !== t1 || $[34] !== t12 || $[35] !== t2 || $[36] !== t3) {
|
|
146
|
-
t13 = /* @__PURE__ */ jsxs(T0, {
|
|
147
|
-
delay: t1,
|
|
148
|
-
closeDelay: t2,
|
|
149
|
-
isDisabled,
|
|
150
|
-
children: [t3, t12]
|
|
151
|
-
});
|
|
152
|
-
$[31] = T0;
|
|
153
|
-
$[32] = isDisabled;
|
|
154
|
-
$[33] = t1;
|
|
155
|
-
$[34] = t12;
|
|
156
|
-
$[35] = t2;
|
|
157
|
-
$[36] = t3;
|
|
158
|
-
$[37] = t13;
|
|
159
|
-
} else t13 = $[37];
|
|
160
|
-
return t13;
|
|
44
|
+
children: [/* @__PURE__ */ jsxs(OverlayArrow, { children: [/* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva({ color }) }), /* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva({ color }) })] }), /* @__PURE__ */ jsx(Typography, {
|
|
45
|
+
size: "body-4",
|
|
46
|
+
variant: "prominent-1",
|
|
47
|
+
className: tooltipTextCva({ color }),
|
|
48
|
+
children: text
|
|
49
|
+
})]
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
161
52
|
};
|
|
162
53
|
//#endregion
|
|
163
54
|
export { Tooltip$1 as Tooltip };
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
import { Tooltip } from "./Tooltip.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { useState } from "react";
|
|
5
4
|
//#region src/components/overlays/Tooltip/TooltipEllipsis.tsx
|
|
6
|
-
var TooltipEllipsis = (
|
|
7
|
-
const $ = c(8);
|
|
8
|
-
const { text, children, isDisabled, isNonInteractiveTrigger } = t0;
|
|
5
|
+
var TooltipEllipsis = ({ text, children, isDisabled, isNonInteractiveTrigger }) => {
|
|
9
6
|
const [isEllipsisActive, setIsEllipsisActive] = useState(false);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
$[1] = children;
|
|
22
|
-
$[2] = t2;
|
|
23
|
-
} else t2 = $[2];
|
|
24
|
-
const content = t2;
|
|
25
|
-
if (isEllipsisActive && !isDisabled) {
|
|
26
|
-
let t3;
|
|
27
|
-
if ($[3] !== content || $[4] !== isDisabled || $[5] !== isNonInteractiveTrigger || $[6] !== text) {
|
|
28
|
-
t3 = /* @__PURE__ */ jsx(Tooltip, {
|
|
29
|
-
text,
|
|
30
|
-
placement: "bottom",
|
|
31
|
-
isDisabled,
|
|
32
|
-
isNonInteractiveTrigger,
|
|
33
|
-
children: content
|
|
34
|
-
});
|
|
35
|
-
$[3] = content;
|
|
36
|
-
$[4] = isDisabled;
|
|
37
|
-
$[5] = isNonInteractiveTrigger;
|
|
38
|
-
$[6] = text;
|
|
39
|
-
$[7] = t3;
|
|
40
|
-
} else t3 = $[7];
|
|
41
|
-
return t3;
|
|
42
|
-
}
|
|
7
|
+
const onContentRef = (ref) => {
|
|
8
|
+
if (ref) setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
|
|
9
|
+
};
|
|
10
|
+
const content = children(onContentRef);
|
|
11
|
+
if (isEllipsisActive && !isDisabled) return /* @__PURE__ */ jsx(Tooltip, {
|
|
12
|
+
text,
|
|
13
|
+
placement: "bottom",
|
|
14
|
+
isDisabled,
|
|
15
|
+
isNonInteractiveTrigger,
|
|
16
|
+
children: content
|
|
17
|
+
});
|
|
43
18
|
return content;
|
|
44
19
|
};
|
|
45
20
|
//#endregion
|