@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
|
@@ -5,26 +5,23 @@ import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
|
|
|
5
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
6
6
|
import "../../../config/i18n.js";
|
|
7
7
|
import { minWidth } from "./minWidth.cva.js";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { clsx } from "clsx";
|
|
10
|
+
import { useMemo } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
//#region src/components/shared/pagination/PaginationList.tsx
|
|
13
|
-
var PaginationList = (
|
|
14
|
-
const $ = c(61);
|
|
15
|
-
const { page, totalPages, size, color, variant, hideText, hideFirstLast, hidePrevNext, hideNumbers, className, onPageChange } = t0;
|
|
13
|
+
var PaginationList = ({ page, totalPages, size, color, variant, hideText, hideFirstLast, hidePrevNext, hideNumbers, className, onPageChange }) => {
|
|
16
14
|
const { t } = useTranslation("ui");
|
|
17
15
|
const isPrevDisabled = page <= 1;
|
|
18
16
|
const isNextDisabled = page >= totalPages;
|
|
19
|
-
|
|
20
|
-
if ($[0] !== color || $[1] !== onPageChange || $[2] !== page || $[3] !== size || $[4] !== totalPages || $[5] !== variant) {
|
|
17
|
+
const renderPageNumbers = useMemo(() => {
|
|
21
18
|
const pagesToShow = [];
|
|
22
19
|
pagesToShow.push(1);
|
|
23
20
|
if (page > 3) pagesToShow.push("ellipsis");
|
|
24
21
|
for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i++) pagesToShow.push(i);
|
|
25
22
|
if (page < totalPages - 2) pagesToShow.push("ellipsis");
|
|
26
23
|
if (totalPages > 1 && !pagesToShow.includes(totalPages)) pagesToShow.push(totalPages);
|
|
27
|
-
|
|
24
|
+
return pagesToShow.map((p, index) => {
|
|
28
25
|
if (p === "ellipsis") return /* @__PURE__ */ jsx(Button, {
|
|
29
26
|
variant,
|
|
30
27
|
color,
|
|
@@ -44,167 +41,67 @@ var PaginationList = (t0) => {
|
|
|
44
41
|
children: p.toString()
|
|
45
42
|
}, `page-${p}`);
|
|
46
43
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const renderPageNumbers = t1;
|
|
44
|
+
}, [
|
|
45
|
+
page,
|
|
46
|
+
color,
|
|
47
|
+
size,
|
|
48
|
+
variant,
|
|
49
|
+
totalPages,
|
|
50
|
+
onPageChange
|
|
51
|
+
]);
|
|
56
52
|
if (totalPages <= 1) return null;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
t6 = !hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
110
|
-
onClick: onPrevious,
|
|
111
|
-
isDisabled: isPrevDisabled,
|
|
112
|
-
size,
|
|
113
|
-
color,
|
|
114
|
-
variant,
|
|
115
|
-
iconOnly: hideText,
|
|
116
|
-
icon: ChevronLeftIcon,
|
|
117
|
-
children: t(_temp2)
|
|
118
|
-
});
|
|
119
|
-
$[26] = color;
|
|
120
|
-
$[27] = hidePrevNext;
|
|
121
|
-
$[28] = hideText;
|
|
122
|
-
$[29] = isPrevDisabled;
|
|
123
|
-
$[30] = onPrevious;
|
|
124
|
-
$[31] = size;
|
|
125
|
-
$[32] = t;
|
|
126
|
-
$[33] = variant;
|
|
127
|
-
$[34] = t6;
|
|
128
|
-
} else t6 = $[34];
|
|
129
|
-
const t7 = !hideNumbers && renderPageNumbers;
|
|
130
|
-
let t8;
|
|
131
|
-
if ($[35] !== color || $[36] !== hidePrevNext || $[37] !== hideText || $[38] !== isNextDisabled || $[39] !== onNext || $[40] !== size || $[41] !== t || $[42] !== variant) {
|
|
132
|
-
t8 = !hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
133
|
-
onClick: onNext,
|
|
134
|
-
isDisabled: isNextDisabled,
|
|
135
|
-
size,
|
|
136
|
-
color,
|
|
137
|
-
variant,
|
|
138
|
-
iconOnly: hideText,
|
|
139
|
-
icon: ChevronRightIcon,
|
|
140
|
-
children: t(_temp3)
|
|
141
|
-
});
|
|
142
|
-
$[35] = color;
|
|
143
|
-
$[36] = hidePrevNext;
|
|
144
|
-
$[37] = hideText;
|
|
145
|
-
$[38] = isNextDisabled;
|
|
146
|
-
$[39] = onNext;
|
|
147
|
-
$[40] = size;
|
|
148
|
-
$[41] = t;
|
|
149
|
-
$[42] = variant;
|
|
150
|
-
$[43] = t8;
|
|
151
|
-
} else t8 = $[43];
|
|
152
|
-
let t9;
|
|
153
|
-
if ($[44] !== color || $[45] !== hideFirstLast || $[46] !== hideText || $[47] !== isNextDisabled || $[48] !== onPageChange || $[49] !== size || $[50] !== t || $[51] !== totalPages || $[52] !== variant) {
|
|
154
|
-
t9 = !hideFirstLast && /* @__PURE__ */ jsx(Button, {
|
|
155
|
-
onClick: () => onPageChange?.(totalPages),
|
|
156
|
-
isDisabled: isNextDisabled,
|
|
157
|
-
size,
|
|
158
|
-
color,
|
|
159
|
-
variant,
|
|
160
|
-
iconOnly: hideText,
|
|
161
|
-
icon: ChevronsRightIcon,
|
|
162
|
-
children: t(_temp4)
|
|
163
|
-
});
|
|
164
|
-
$[44] = color;
|
|
165
|
-
$[45] = hideFirstLast;
|
|
166
|
-
$[46] = hideText;
|
|
167
|
-
$[47] = isNextDisabled;
|
|
168
|
-
$[48] = onPageChange;
|
|
169
|
-
$[49] = size;
|
|
170
|
-
$[50] = t;
|
|
171
|
-
$[51] = totalPages;
|
|
172
|
-
$[52] = variant;
|
|
173
|
-
$[53] = t9;
|
|
174
|
-
} else t9 = $[53];
|
|
175
|
-
let t10;
|
|
176
|
-
if ($[54] !== t4 || $[55] !== t5 || $[56] !== t6 || $[57] !== t7 || $[58] !== t8 || $[59] !== t9) {
|
|
177
|
-
t10 = /* @__PURE__ */ jsxs("nav", {
|
|
178
|
-
className: t4,
|
|
179
|
-
children: [
|
|
180
|
-
t5,
|
|
181
|
-
t6,
|
|
182
|
-
t7,
|
|
183
|
-
t8,
|
|
184
|
-
t9
|
|
185
|
-
]
|
|
186
|
-
});
|
|
187
|
-
$[54] = t4;
|
|
188
|
-
$[55] = t5;
|
|
189
|
-
$[56] = t6;
|
|
190
|
-
$[57] = t7;
|
|
191
|
-
$[58] = t8;
|
|
192
|
-
$[59] = t9;
|
|
193
|
-
$[60] = t10;
|
|
194
|
-
} else t10 = $[60];
|
|
195
|
-
return t10;
|
|
53
|
+
const onNext = () => {
|
|
54
|
+
if (!isNextDisabled) onPageChange?.(page + 1);
|
|
55
|
+
};
|
|
56
|
+
const onPrevious = () => {
|
|
57
|
+
if (!isPrevDisabled) onPageChange?.(page - 1);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ jsxs("nav", {
|
|
60
|
+
className: clsx("flex items-center gap-pagination-button-to-button", className),
|
|
61
|
+
children: [
|
|
62
|
+
!hideFirstLast && /* @__PURE__ */ jsx(Button, {
|
|
63
|
+
onClick: () => onPageChange?.(1),
|
|
64
|
+
isDisabled: isPrevDisabled,
|
|
65
|
+
size,
|
|
66
|
+
color,
|
|
67
|
+
variant,
|
|
68
|
+
iconOnly: hideText,
|
|
69
|
+
icon: ChevronsLeftIcon,
|
|
70
|
+
children: t(($) => $.ui.pagination.firstBtn)
|
|
71
|
+
}),
|
|
72
|
+
!hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
73
|
+
onClick: onPrevious,
|
|
74
|
+
isDisabled: isPrevDisabled,
|
|
75
|
+
size,
|
|
76
|
+
color,
|
|
77
|
+
variant,
|
|
78
|
+
iconOnly: hideText,
|
|
79
|
+
icon: ChevronLeftIcon,
|
|
80
|
+
children: t(($) => $.ui.pagination.backBtn)
|
|
81
|
+
}),
|
|
82
|
+
!hideNumbers && renderPageNumbers,
|
|
83
|
+
!hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
84
|
+
onClick: onNext,
|
|
85
|
+
isDisabled: isNextDisabled,
|
|
86
|
+
size,
|
|
87
|
+
color,
|
|
88
|
+
variant,
|
|
89
|
+
iconOnly: hideText,
|
|
90
|
+
icon: ChevronRightIcon,
|
|
91
|
+
children: t(($) => $.ui.pagination.nextBtn)
|
|
92
|
+
}),
|
|
93
|
+
!hideFirstLast && /* @__PURE__ */ jsx(Button, {
|
|
94
|
+
onClick: () => onPageChange?.(totalPages),
|
|
95
|
+
isDisabled: isNextDisabled,
|
|
96
|
+
size,
|
|
97
|
+
color,
|
|
98
|
+
variant,
|
|
99
|
+
iconOnly: hideText,
|
|
100
|
+
icon: ChevronsRightIcon,
|
|
101
|
+
children: t(($) => $.ui.pagination.lastBtn)
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
196
105
|
};
|
|
197
|
-
function _temp($) {
|
|
198
|
-
return $.ui.pagination.firstBtn;
|
|
199
|
-
}
|
|
200
|
-
function _temp2($_0) {
|
|
201
|
-
return $_0.ui.pagination.backBtn;
|
|
202
|
-
}
|
|
203
|
-
function _temp3($_1) {
|
|
204
|
-
return $_1.ui.pagination.nextBtn;
|
|
205
|
-
}
|
|
206
|
-
function _temp4($_2) {
|
|
207
|
-
return $_2.ui.pagination.lastBtn;
|
|
208
|
-
}
|
|
209
106
|
//#endregion
|
|
210
107
|
export { PaginationList };
|
|
@@ -3,112 +3,45 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
4
|
import { alertDefinition } from "./alert.cva.js";
|
|
5
5
|
import { statusIconDefinition, statusSeparatorDefinition } from "../shared/status.cva.js";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
//#region src/components/status/Alert/Alert.tsx
|
|
9
|
-
var Alert = (
|
|
10
|
-
const $ = c(31);
|
|
11
|
-
const { variant, color, text, isLoading: t1, rightContent, hasSeparator, icon: Icon, className } = t0;
|
|
12
|
-
const isLoading = t1 === void 0 ? false : t1;
|
|
8
|
+
var Alert = ({ variant, color, text, isLoading = false, rightContent, hasSeparator, icon: Icon, className }) => {
|
|
13
9
|
const alertCva = UIOverrides.useCva("alert.cva", alertDefinition);
|
|
14
10
|
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
15
11
|
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
t2 = alertCva({
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: alertCva({
|
|
19
14
|
variant,
|
|
20
15
|
color,
|
|
21
16
|
className
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
$[1] = className;
|
|
25
|
-
$[2] = color;
|
|
26
|
-
$[3] = variant;
|
|
27
|
-
$[4] = t2;
|
|
28
|
-
} else t2 = $[4];
|
|
29
|
-
let t3;
|
|
30
|
-
if ($[5] !== isLoading) {
|
|
31
|
-
t3 = isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
32
|
-
size: "default",
|
|
33
|
-
className: "shrink-0"
|
|
34
|
-
});
|
|
35
|
-
$[5] = isLoading;
|
|
36
|
-
$[6] = t3;
|
|
37
|
-
} else t3 = $[6];
|
|
38
|
-
let t4;
|
|
39
|
-
if ($[7] !== Icon || $[8] !== color || $[9] !== iconCva || $[10] !== isLoading || $[11] !== variant) {
|
|
40
|
-
t4 = !isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({
|
|
41
|
-
variant,
|
|
42
|
-
color
|
|
43
|
-
}) });
|
|
44
|
-
$[7] = Icon;
|
|
45
|
-
$[8] = color;
|
|
46
|
-
$[9] = iconCva;
|
|
47
|
-
$[10] = isLoading;
|
|
48
|
-
$[11] = variant;
|
|
49
|
-
$[12] = t4;
|
|
50
|
-
} else t4 = $[12];
|
|
51
|
-
let t5;
|
|
52
|
-
if ($[13] !== text) {
|
|
53
|
-
t5 = /* @__PURE__ */ jsx(Typography, {
|
|
54
|
-
size: "label-2",
|
|
55
|
-
children: text
|
|
56
|
-
});
|
|
57
|
-
$[13] = text;
|
|
58
|
-
$[14] = t5;
|
|
59
|
-
} else t5 = $[14];
|
|
60
|
-
let t6;
|
|
61
|
-
if ($[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
62
|
-
t6 = /* @__PURE__ */ jsxs("div", {
|
|
63
|
-
className: "flex w-full items-start gap-alert-gap-icon-to-text px-alert-side-default py-alert-height-content",
|
|
64
|
-
children: [
|
|
65
|
-
t3,
|
|
66
|
-
t4,
|
|
67
|
-
t5
|
|
68
|
-
]
|
|
69
|
-
});
|
|
70
|
-
$[15] = t3;
|
|
71
|
-
$[16] = t4;
|
|
72
|
-
$[17] = t5;
|
|
73
|
-
$[18] = t6;
|
|
74
|
-
} else t6 = $[18];
|
|
75
|
-
let t7;
|
|
76
|
-
if ($[19] !== color || $[20] !== hasSeparator || $[21] !== rightContent || $[22] !== separatorCva || $[23] !== variant) {
|
|
77
|
-
t7 = !!rightContent && /* @__PURE__ */ jsxs(Fragment, { children: [hasSeparator && /* @__PURE__ */ jsx("div", { className: separatorCva({
|
|
78
|
-
variant,
|
|
79
|
-
color
|
|
80
|
-
}) }), /* @__PURE__ */ jsx("div", {
|
|
81
|
-
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-alert-gap-action px-alert-side-default py-alert-height-actions-mobile md:w-auto md:justify-center md:py-alert-height-actions-desktop",
|
|
82
|
-
children: rightContent
|
|
83
|
-
})] });
|
|
84
|
-
$[19] = color;
|
|
85
|
-
$[20] = hasSeparator;
|
|
86
|
-
$[21] = rightContent;
|
|
87
|
-
$[22] = separatorCva;
|
|
88
|
-
$[23] = variant;
|
|
89
|
-
$[24] = t7;
|
|
90
|
-
} else t7 = $[24];
|
|
91
|
-
let t8;
|
|
92
|
-
if ($[25] !== t6 || $[26] !== t7) {
|
|
93
|
-
t8 = /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
}),
|
|
18
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
94
19
|
className: "flex w-auto flex-col items-center md:flex-row",
|
|
95
|
-
children: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
20
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "flex w-full items-start gap-alert-gap-icon-to-text px-alert-side-default py-alert-height-content",
|
|
22
|
+
children: [
|
|
23
|
+
isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
24
|
+
size: "default",
|
|
25
|
+
className: "shrink-0"
|
|
26
|
+
}),
|
|
27
|
+
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({
|
|
28
|
+
variant,
|
|
29
|
+
color
|
|
30
|
+
}) }),
|
|
31
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
32
|
+
size: "label-2",
|
|
33
|
+
children: text
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
}), !!rightContent && /* @__PURE__ */ jsxs(Fragment, { children: [hasSeparator && /* @__PURE__ */ jsx("div", { className: separatorCva({
|
|
37
|
+
variant,
|
|
38
|
+
color
|
|
39
|
+
}) }), /* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-alert-gap-action px-alert-side-default py-alert-height-actions-mobile md:w-auto md:justify-center md:py-alert-height-actions-desktop",
|
|
41
|
+
children: rightContent
|
|
42
|
+
})] })]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
112
45
|
};
|
|
113
46
|
//#endregion
|
|
114
47
|
export { Alert };
|
|
@@ -1,89 +1,34 @@
|
|
|
1
1
|
import { loader, loaderWrapper } from "./loader.cva.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
//#region src/components/status/Loader/Loader.tsx
|
|
5
|
-
var Loader = (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let props;
|
|
9
|
-
let size;
|
|
10
|
-
if ($[0] !== t0) {
|
|
11
|
-
({size, className, ...props} = t0);
|
|
12
|
-
$[0] = t0;
|
|
13
|
-
$[1] = className;
|
|
14
|
-
$[2] = props;
|
|
15
|
-
$[3] = size;
|
|
16
|
-
} else {
|
|
17
|
-
className = $[1];
|
|
18
|
-
props = $[2];
|
|
19
|
-
size = $[3];
|
|
20
|
-
}
|
|
21
|
-
let t1;
|
|
22
|
-
if ($[4] !== className || $[5] !== size) {
|
|
23
|
-
t1 = loaderWrapper({
|
|
4
|
+
var Loader = ({ size, className, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
className: loaderWrapper({
|
|
24
7
|
size,
|
|
25
8
|
className
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if ($[7] !== className || $[8] !== size) {
|
|
33
|
-
t2 = loader({
|
|
34
|
-
size,
|
|
35
|
-
className
|
|
36
|
-
});
|
|
37
|
-
$[7] = className;
|
|
38
|
-
$[8] = size;
|
|
39
|
-
$[9] = t2;
|
|
40
|
-
} else t2 = $[9];
|
|
41
|
-
let t3;
|
|
42
|
-
let t4;
|
|
43
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44
|
-
t3 = /* @__PURE__ */ jsx("circle", {
|
|
45
|
-
className: "opacity-20",
|
|
46
|
-
cx: "12",
|
|
47
|
-
cy: "12",
|
|
48
|
-
r: "10",
|
|
49
|
-
stroke: "currentColor",
|
|
50
|
-
strokeWidth: "4"
|
|
51
|
-
});
|
|
52
|
-
t4 = /* @__PURE__ */ jsx("path", {
|
|
53
|
-
fill: "currentColor",
|
|
54
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
55
|
-
});
|
|
56
|
-
$[10] = t3;
|
|
57
|
-
$[11] = t4;
|
|
58
|
-
} else {
|
|
59
|
-
t3 = $[10];
|
|
60
|
-
t4 = $[11];
|
|
61
|
-
}
|
|
62
|
-
let t5;
|
|
63
|
-
if ($[12] !== props || $[13] !== t2) {
|
|
64
|
-
t5 = /* @__PURE__ */ jsxs("svg", {
|
|
65
|
-
className: t2,
|
|
9
|
+
}),
|
|
10
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
11
|
+
className: loader({
|
|
12
|
+
size,
|
|
13
|
+
className
|
|
14
|
+
}),
|
|
66
15
|
xmlns: "http://www.w3.org/2000/svg",
|
|
67
16
|
fill: "none",
|
|
68
17
|
viewBox: "0 0 24 24",
|
|
69
18
|
...props,
|
|
70
|
-
children: [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
$[16] = t5;
|
|
84
|
-
$[17] = t6;
|
|
85
|
-
} else t6 = $[17];
|
|
86
|
-
return t6;
|
|
19
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
20
|
+
className: "opacity-20",
|
|
21
|
+
cx: "12",
|
|
22
|
+
cy: "12",
|
|
23
|
+
r: "10",
|
|
24
|
+
stroke: "currentColor",
|
|
25
|
+
strokeWidth: "4"
|
|
26
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
29
|
+
})]
|
|
30
|
+
})
|
|
31
|
+
});
|
|
87
32
|
};
|
|
88
33
|
//#endregion
|
|
89
34
|
export { Loader };
|
|
@@ -3,8 +3,7 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
4
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
5
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
6
|
-
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition,
|
|
7
|
-
import { c } from "react/compiler-runtime";
|
|
6
|
+
import { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainerDefinition, toastDefinition, toastWrapper } from "./toast.cva.js";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { ToastContainer } from "react-toastify";
|
|
10
9
|
//#region src/components/status/Toast/Toast.tsx
|
|
@@ -48,26 +47,22 @@ var Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) =>
|
|
|
48
47
|
});
|
|
49
48
|
};
|
|
50
49
|
var ToastContainer$1 = () => {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
function _temp(params) {
|
|
67
|
-
return toastContainer({
|
|
68
|
-
position: params?.position,
|
|
69
|
-
className: params?.defaultClassName
|
|
50
|
+
const uiConfig = UIConfig.useConfig();
|
|
51
|
+
const containerCva = UIOverrides.useCva("toast.containerCva", toastContainerDefinition);
|
|
52
|
+
return /* @__PURE__ */ jsx(ToastContainer, {
|
|
53
|
+
position: uiConfig.toast.position,
|
|
54
|
+
className: (params) => {
|
|
55
|
+
return containerCva({
|
|
56
|
+
position: params?.position ?? uiConfig.toast.position,
|
|
57
|
+
className: params?.defaultClassName
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
toastClassName: toastWrapper,
|
|
61
|
+
autoClose: 2500,
|
|
62
|
+
icon: false,
|
|
63
|
+
closeButton: false,
|
|
64
|
+
hideProgressBar: true
|
|
70
65
|
});
|
|
71
|
-
}
|
|
66
|
+
};
|
|
72
67
|
//#endregion
|
|
73
68
|
export { Toast, ToastContainer$1 as ToastContainer };
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import { ButtonVariantProps } from '../../buttons/Button/button.cva';
|
|
2
2
|
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const toastContainerDefinition: {
|
|
4
|
+
base: string[];
|
|
5
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
6
|
+
readonly position: {
|
|
7
|
+
readonly "bottom-right": "right-0 bottom-0";
|
|
8
|
+
readonly "bottom-left": "bottom-0 left-0";
|
|
9
|
+
readonly "top-right": "top-0 right-0";
|
|
10
|
+
readonly "top-left": "top-0 left-0";
|
|
11
|
+
readonly "bottom-center": "bottom-0";
|
|
12
|
+
readonly "top-center": "top-0";
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
export type ToastContainerConfig = NonNullable<typeof toastContainerDefinition.config>;
|
|
6
17
|
export declare const toastWrapper: string;
|
|
7
18
|
export declare const toastDefinition: {
|
|
8
19
|
base: string[];
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
4
|
//#region src/components/status/Toast/toast.cva.ts
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
var toastContainerDefinition = UIOverrides.defineConfig({
|
|
6
|
+
base: ["m-toast-gap-margin-mobile w-auto gap-toast-gap-margin-mobile p-0 md:m-toast-gap-margin-desktop md:gap-toast-gap-margin-desktop"],
|
|
7
|
+
config: { variants: { position: {
|
|
8
|
+
"bottom-right": "right-0 bottom-0",
|
|
9
|
+
"bottom-left": "bottom-0 left-0",
|
|
10
|
+
"top-right": "top-0 right-0",
|
|
11
|
+
"top-left": "top-0 left-0",
|
|
12
|
+
"bottom-center": "bottom-0",
|
|
13
|
+
"top-center": "top-0"
|
|
14
|
+
} } }
|
|
15
|
+
});
|
|
14
16
|
var toastWrapper = clsx("m-0! min-h-0! w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
15
17
|
var toastDefinition = UIOverrides.defineConfig({
|
|
16
18
|
base: ["m-0 inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row"],
|
|
@@ -206,4 +208,4 @@ var statusSeparatorDefinition = UIOverrides.defineConfig({
|
|
|
206
208
|
}
|
|
207
209
|
});
|
|
208
210
|
//#endregion
|
|
209
|
-
export { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition,
|
|
211
|
+
export { buttonColorVariant, statusIconDefinition, statusSeparatorDefinition, toastContainerDefinition, toastDefinition, toastWrapper };
|