@povio/ui 2.3.2-rc.3 → 2.3.3
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 +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/assets/locales/sl/translation.json.js +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.js +56 -207
- 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.js +38 -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 -368
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +5 -12
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +298 -506
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +5 -13
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +56 -273
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -6
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +130 -606
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +2 -5
- package/dist/components/inputs/DateTime/shared/Calendar.js +119 -332
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +102 -301
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +2 -3
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +33 -146
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +93 -249
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +137 -318
- package/dist/components/inputs/DateTime/shared/DateField.js +112 -311
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +3 -13
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +139 -383
- 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.js +27 -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 +44 -87
- 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.js +9 -48
- 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 -17
- package/dist/components/inputs/RadioGroup/radio.cva.js +1 -42
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +2 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +22 -214
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +18 -3
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +8 -104
- package/dist/components/inputs/Selection/Select/Select.d.ts +3 -7
- package/dist/components/inputs/Selection/Select/Select.js +18 -225
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -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 -330
- 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 +3 -9
- 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 -10
- package/dist/components/inputs/shared/input.cva.js +4 -32
- 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 +23 -96
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +8 -48
- package/dist/components/overlays/Drawer/Drawer.js +20 -62
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +27 -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 +13 -21
- 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 +27 -28
- package/dist/components/text/Link/Link.js +7 -19
- 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 +6 -19
- package/dist/config/uiConfig.context.js +14 -67
- package/dist/config/uiStyle.context.d.ts +4 -27
- package/dist/config/uiStyle.context.js +5 -15
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +0 -3
- 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.js +30 -101
- 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 +0 -7
- package/dist/index.js +2 -4
- 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 -134
- 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 -7
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +0 -13
- 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 -39
- 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 -6
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +0 -11
- 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 -4
- 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 -36
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -173
- 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 -12
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -36
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +0 -3
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +0 -5
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +0 -37
- 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 -4
- 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/useQueryAutocomplete.d.ts +0 -14
- package/dist/hooks/useQueryAutocomplete.js +0 -57
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/query.utils.js +0 -8
|
@@ -1,85 +1,28 @@
|
|
|
1
1
|
import { UIStyle } from "../../config/uiStyle.context.js";
|
|
2
2
|
import { Typography } from "../text/Typography/Typography.js";
|
|
3
3
|
import { segmentItemCva } from "./segment.cva.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { ToggleButton } from "react-aria-components";
|
|
7
6
|
//#region src/components/segment/SegmentItem.tsx
|
|
8
|
-
var SegmentItem = (
|
|
9
|
-
const $ = c(23);
|
|
10
|
-
let className;
|
|
11
|
-
let icon;
|
|
12
|
-
let id;
|
|
13
|
-
let isDisabled;
|
|
14
|
-
let label;
|
|
15
|
-
let props;
|
|
16
|
-
if ($[0] !== t0) {
|
|
17
|
-
({label, icon, id, isDisabled, className, ...props} = t0);
|
|
18
|
-
$[0] = t0;
|
|
19
|
-
$[1] = className;
|
|
20
|
-
$[2] = icon;
|
|
21
|
-
$[3] = id;
|
|
22
|
-
$[4] = isDisabled;
|
|
23
|
-
$[5] = label;
|
|
24
|
-
$[6] = props;
|
|
25
|
-
} else {
|
|
26
|
-
className = $[1];
|
|
27
|
-
icon = $[2];
|
|
28
|
-
id = $[3];
|
|
29
|
-
isDisabled = $[4];
|
|
30
|
-
label = $[5];
|
|
31
|
-
props = $[6];
|
|
32
|
-
}
|
|
7
|
+
var SegmentItem = ({ label, icon, id, isDisabled, className, ...props }) => {
|
|
33
8
|
const IconComponent = icon;
|
|
34
9
|
const iconOnly = !!(icon && !label);
|
|
35
10
|
const segmentItemCva$1 = UIStyle.useCva("segment.itemCva", segmentItemCva);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
11
|
+
return /* @__PURE__ */ jsxs(ToggleButton, {
|
|
12
|
+
...props,
|
|
13
|
+
id,
|
|
14
|
+
className: segmentItemCva$1({
|
|
39
15
|
iconOnly,
|
|
40
16
|
className
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
$[9] = segmentItemCva$1;
|
|
45
|
-
$[10] = t1;
|
|
46
|
-
} else t1 = $[10];
|
|
47
|
-
let t2;
|
|
48
|
-
if ($[11] !== IconComponent || $[12] !== icon) {
|
|
49
|
-
t2 = icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" });
|
|
50
|
-
$[11] = IconComponent;
|
|
51
|
-
$[12] = icon;
|
|
52
|
-
$[13] = t2;
|
|
53
|
-
} else t2 = $[13];
|
|
54
|
-
let t3;
|
|
55
|
-
if ($[14] !== label) {
|
|
56
|
-
t3 = label && /* @__PURE__ */ jsx(Typography, {
|
|
17
|
+
}),
|
|
18
|
+
isDisabled,
|
|
19
|
+
children: [icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }), label && /* @__PURE__ */ jsx(Typography, {
|
|
57
20
|
size: "label-2",
|
|
58
21
|
as: "span",
|
|
59
22
|
className: "overflow-hidden text-ellipsis text-center",
|
|
60
23
|
children: label
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
$[15] = t3;
|
|
64
|
-
} else t3 = $[15];
|
|
65
|
-
let t4;
|
|
66
|
-
if ($[16] !== id || $[17] !== isDisabled || $[18] !== props || $[19] !== t1 || $[20] !== t2 || $[21] !== t3) {
|
|
67
|
-
t4 = /* @__PURE__ */ jsxs(ToggleButton, {
|
|
68
|
-
...props,
|
|
69
|
-
id,
|
|
70
|
-
className: t1,
|
|
71
|
-
isDisabled,
|
|
72
|
-
children: [t2, t3]
|
|
73
|
-
});
|
|
74
|
-
$[16] = id;
|
|
75
|
-
$[17] = isDisabled;
|
|
76
|
-
$[18] = props;
|
|
77
|
-
$[19] = t1;
|
|
78
|
-
$[20] = t2;
|
|
79
|
-
$[21] = t3;
|
|
80
|
-
$[22] = t4;
|
|
81
|
-
} else t4 = $[22];
|
|
82
|
-
return t4;
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
83
26
|
};
|
|
84
27
|
//#endregion
|
|
85
28
|
export { SegmentItem };
|
|
@@ -2,31 +2,16 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
2
2
|
import "../../../config/i18n.js";
|
|
3
3
|
import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
|
|
4
4
|
import { PaginationList } from "./PaginationList.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 { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/shared/pagination/Pagination.tsx
|
|
10
|
-
var Pagination = (
|
|
11
|
-
const $ = c(34);
|
|
12
|
-
const { size: t1, variant: t2, color: t3, page, totalItems, totalPages, pageSize, hideText: t4, hideFirstLast: t5, hidePrevNext: t6, hideNumbers: t7, className, onPageChange, onPageSizeChange } = t0;
|
|
13
|
-
const size = t1 === void 0 ? "s" : t1;
|
|
14
|
-
const variant = t2 === void 0 ? "subtle" : t2;
|
|
15
|
-
const color = t3 === void 0 ? "secondary" : t3;
|
|
16
|
-
const hideText = t4 === void 0 ? true : t4;
|
|
17
|
-
const hideFirstLast = t5 === void 0 ? true : t5;
|
|
18
|
-
const hidePrevNext = t6 === void 0 ? false : t6;
|
|
19
|
-
const hideNumbers = t7 === void 0 ? false : t7;
|
|
9
|
+
var Pagination = ({ size = "s", variant = "subtle", color = "secondary", page, totalItems, totalPages, pageSize, hideText = true, hideFirstLast = true, hidePrevNext = false, hideNumbers = false, className, onPageChange, onPageSizeChange }) => {
|
|
20
10
|
const { t } = useTranslation("ui");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
$[1] = t8;
|
|
26
|
-
} else t8 = $[1];
|
|
27
|
-
let t9;
|
|
28
|
-
if ($[2] !== color || $[3] !== hideFirstLast || $[4] !== hideNumbers || $[5] !== hidePrevNext || $[6] !== hideText || $[7] !== onPageChange || $[8] !== page || $[9] !== pageSize || $[10] !== size || $[11] !== totalItems || $[12] !== totalPages || $[13] !== variant) {
|
|
29
|
-
t9 = totalItems > pageSize && /* @__PURE__ */ jsx(PaginationList, {
|
|
11
|
+
return /* @__PURE__ */ jsxs("nav", {
|
|
12
|
+
id: "pagination",
|
|
13
|
+
className: clsx("flex items-center gap-2", className),
|
|
14
|
+
children: [totalItems > pageSize && /* @__PURE__ */ jsx(PaginationList, {
|
|
30
15
|
page,
|
|
31
16
|
size,
|
|
32
17
|
color,
|
|
@@ -37,95 +22,24 @@ var Pagination = (t0) => {
|
|
|
37
22
|
hideNumbers,
|
|
38
23
|
totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
|
|
39
24
|
onPageChange
|
|
40
|
-
})
|
|
41
|
-
$[2] = color;
|
|
42
|
-
$[3] = hideFirstLast;
|
|
43
|
-
$[4] = hideNumbers;
|
|
44
|
-
$[5] = hidePrevNext;
|
|
45
|
-
$[6] = hideText;
|
|
46
|
-
$[7] = onPageChange;
|
|
47
|
-
$[8] = page;
|
|
48
|
-
$[9] = pageSize;
|
|
49
|
-
$[10] = size;
|
|
50
|
-
$[11] = totalItems;
|
|
51
|
-
$[12] = totalPages;
|
|
52
|
-
$[13] = variant;
|
|
53
|
-
$[14] = t9;
|
|
54
|
-
} else t9 = $[14];
|
|
55
|
-
let t10;
|
|
56
|
-
if ($[15] !== t) {
|
|
57
|
-
t10 = t(_temp);
|
|
58
|
-
$[15] = t;
|
|
59
|
-
$[16] = t10;
|
|
60
|
-
} else t10 = $[16];
|
|
61
|
-
let t11;
|
|
62
|
-
if ($[17] !== t10) {
|
|
63
|
-
t11 = /* @__PURE__ */ jsx(Typography, {
|
|
64
|
-
variant: "default",
|
|
65
|
-
size: "label-2",
|
|
66
|
-
as: "span",
|
|
67
|
-
className: "whitespace-nowrap text-text-default-1",
|
|
68
|
-
children: t10
|
|
69
|
-
});
|
|
70
|
-
$[17] = t10;
|
|
71
|
-
$[18] = t11;
|
|
72
|
-
} else t11 = $[18];
|
|
73
|
-
let t12;
|
|
74
|
-
if ($[19] !== onPageSizeChange) {
|
|
75
|
-
t12 = (value) => onPageSizeChange?.(Number(value));
|
|
76
|
-
$[19] = onPageSizeChange;
|
|
77
|
-
$[20] = t12;
|
|
78
|
-
} else t12 = $[20];
|
|
79
|
-
let t13;
|
|
80
|
-
if ($[21] !== t) {
|
|
81
|
-
t13 = t(_temp2);
|
|
82
|
-
$[21] = t;
|
|
83
|
-
$[22] = t13;
|
|
84
|
-
} else t13 = $[22];
|
|
85
|
-
let t14;
|
|
86
|
-
if ($[23] !== pageSize || $[24] !== t12 || $[25] !== t13) {
|
|
87
|
-
t14 = /* @__PURE__ */ jsx(NumberInput, {
|
|
88
|
-
value: pageSize,
|
|
89
|
-
onChange: t12,
|
|
90
|
-
label: t13,
|
|
91
|
-
hideLabel: true,
|
|
92
|
-
className: "w-min",
|
|
93
|
-
inputClassName: "min-w-12 !px-3 !py-0-5"
|
|
94
|
-
});
|
|
95
|
-
$[23] = pageSize;
|
|
96
|
-
$[24] = t12;
|
|
97
|
-
$[25] = t13;
|
|
98
|
-
$[26] = t14;
|
|
99
|
-
} else t14 = $[26];
|
|
100
|
-
let t15;
|
|
101
|
-
if ($[27] !== t11 || $[28] !== t14) {
|
|
102
|
-
t15 = /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
103
26
|
className: "flex items-center gap-2",
|
|
104
|
-
children: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
$[33] = t16;
|
|
121
|
-
} else t16 = $[33];
|
|
122
|
-
return t16;
|
|
27
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "label-2",
|
|
30
|
+
as: "span",
|
|
31
|
+
className: "whitespace-nowrap text-text-default-1",
|
|
32
|
+
children: t(($) => $.ui.pagination.resultsPerPage)
|
|
33
|
+
}), /* @__PURE__ */ jsx(NumberInput, {
|
|
34
|
+
value: pageSize,
|
|
35
|
+
onChange: (value) => onPageSizeChange?.(Number(value)),
|
|
36
|
+
label: t(($) => $.ui.pagination.resultsPerPage),
|
|
37
|
+
hideLabel: true,
|
|
38
|
+
className: "w-min",
|
|
39
|
+
inputClassName: "min-w-12 !px-3 !py-0-5"
|
|
40
|
+
})]
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
123
43
|
};
|
|
124
|
-
function _temp($) {
|
|
125
|
-
return $.ui.pagination.resultsPerPage;
|
|
126
|
-
}
|
|
127
|
-
function _temp2($_0) {
|
|
128
|
-
return $_0.ui.pagination.resultsPerPage;
|
|
129
|
-
}
|
|
130
44
|
//#endregion
|
|
131
45
|
export { Pagination };
|
|
@@ -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 { alert } from "./alert.cva.js";
|
|
5
5
|
import { statusIcon, statusSeparator } 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 = UIStyle.useCva("alert.cva", alert);
|
|
14
10
|
const iconCva = UIStyle.useCva("status.iconCva", statusIcon);
|
|
15
11
|
const separatorCva = UIStyle.useCva("status.separatorCva", statusSeparator);
|
|
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 };
|