@povio/ui 2.2.6 → 2.2.8-rc
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 +2 -0
- package/dist/assets/icons/AlignCenter.js +3 -1
- package/dist/assets/icons/AlignLeft.js +3 -1
- package/dist/assets/icons/AlignLeftRight.js +3 -1
- package/dist/assets/icons/AlignRight.js +3 -1
- package/dist/assets/icons/ArrowDropDown.js +3 -1
- package/dist/assets/icons/ArrowDropUp.js +3 -1
- package/dist/assets/icons/ArrowLeft.js +3 -1
- package/dist/assets/icons/ArrowRight.js +3 -1
- package/dist/assets/icons/Bold.js +3 -1
- package/dist/assets/icons/BulletedList.js +3 -1
- package/dist/assets/icons/Calendar.js +3 -1
- package/dist/assets/icons/Check.js +3 -1
- package/dist/assets/icons/CheckCircle.js +3 -1
- package/dist/assets/icons/CheckboxCheckmark.js +3 -1
- package/dist/assets/icons/CheckboxIndeterminate.js +3 -1
- package/dist/assets/icons/ChevronDown.js +3 -1
- package/dist/assets/icons/ChevronLeft.js +3 -1
- package/dist/assets/icons/ChevronRight.js +3 -1
- package/dist/assets/icons/ChevronUp.js +3 -1
- package/dist/assets/icons/ChevronsLeft.js +3 -1
- package/dist/assets/icons/ChevronsRight.js +3 -1
- package/dist/assets/icons/Clock.js +3 -1
- package/dist/assets/icons/Close.js +3 -1
- package/dist/assets/icons/DateTime.js +3 -1
- package/dist/assets/icons/DragIndicator.js +3 -1
- package/dist/assets/icons/File.js +3 -1
- package/dist/assets/icons/Highlight.js +3 -1
- package/dist/assets/icons/HighlightOn.js +3 -1
- package/dist/assets/icons/Home.js +3 -1
- package/dist/assets/icons/Info.js +3 -1
- package/dist/assets/icons/Italic.js +3 -1
- package/dist/assets/icons/Link.js +3 -1
- package/dist/assets/icons/Menu.js +3 -1
- package/dist/assets/icons/NumberedList.js +3 -1
- package/dist/assets/icons/PointerHorizontal.js +3 -1
- package/dist/assets/icons/PointerVertical.js +3 -1
- package/dist/assets/icons/Search.js +3 -1
- package/dist/assets/icons/Send.js +3 -1
- package/dist/assets/icons/Strikethrough.js +3 -1
- package/dist/assets/icons/TextColor.js +3 -1
- package/dist/assets/icons/Today.js +3 -1
- package/dist/assets/icons/Underlined.js +3 -1
- package/dist/assets/icons/Upload.js +3 -1
- package/dist/assets/icons/Visibility.js +3 -1
- package/dist/assets/icons/VisibilityOff.js +3 -1
- package/dist/assets/icons/WarningFilled.js +3 -1
- package/dist/assets/locales/en/translation.json.js +1 -0
- package/dist/assets/locales/sl/translation.json.js +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +5 -3
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +7 -5
- package/dist/components/Menu/Menu.js +3 -1
- package/dist/components/Menu/MenuDesktop.js +3 -1
- package/dist/components/Menu/MenuItem.js +3 -1
- package/dist/components/Menu/MenuMobile.js +3 -1
- package/dist/components/Menu/MenuPopover.js +3 -1
- package/dist/components/Menu/menu.cva.js +6 -4
- package/dist/components/buttons/Button/Button.js +3 -1
- package/dist/components/buttons/Button/button.cva.js +7 -5
- package/dist/components/buttons/IconButton/IconButton.js +3 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +3 -1
- package/dist/components/buttons/PillButton/PillButton.js +3 -1
- package/dist/components/buttons/PillButton/pillButton.cva.js +6 -4
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -1
- package/dist/components/buttons/TextButton/TextButton.js +3 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.js +3 -1
- package/dist/components/buttons/shared/ButtonContent.js +3 -1
- package/dist/components/buttons/shared/buttonContent.cva.js +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +3 -1
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -1
- package/dist/components/inputs/Checkbox/checkbox.cva.js +6 -4
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +63 -4
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +98 -10
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +63 -4
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +64 -6
- package/dist/components/inputs/DateTime/shared/Calendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +3 -1
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +4 -2
- package/dist/components/inputs/DateTime/shared/DateField.js +3 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +3 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +4 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +3 -1
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +4 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +3 -1
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimeField.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +3 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +6 -5
- package/dist/components/inputs/DateTime/shared/YearPicker.js +3 -1
- package/dist/components/inputs/File/FileUpload.js +6 -4
- package/dist/components/inputs/File/FileUploadContainer.js +3 -1
- package/dist/components/inputs/File/InputUpload.js +3 -1
- package/dist/components/inputs/File/shared/FileCard.js +3 -1
- package/dist/components/inputs/File/shared/FileCardList.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +4 -2
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +4 -2
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +4 -2
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -2
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -1
- package/dist/components/inputs/File/shared/ProgressBar.js +3 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.js +4 -2
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +6 -3
- package/dist/components/inputs/FormField/FormField.js +3 -1
- package/dist/components/inputs/FormField/FormFieldError.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +3 -1
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +4 -2
- package/dist/components/inputs/FormField/FormFieldHelper.js +3 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +3 -1
- package/dist/components/inputs/FormField/formFieldError.cva.js +3 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +3 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +82 -8
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +1 -0
- package/dist/components/inputs/Input/TextInput/TextInput.js +85 -8
- package/dist/components/inputs/Input/shared/InputContent.js +3 -1
- package/dist/components/inputs/Inputs/Form.js +2 -0
- package/dist/components/inputs/Inputs/InputItem.js +2 -0
- package/dist/components/inputs/Inputs/Inputs.js +2 -0
- package/dist/components/inputs/RadioGroup/RadioGroup.js +3 -1
- package/dist/components/inputs/RadioGroup/radio.cva.js +5 -3
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +64 -2
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +3 -1
- package/dist/components/inputs/Selection/Select/Select.js +65 -2
- package/dist/components/inputs/Selection/shared/SelectBase.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +3 -1
- package/dist/components/inputs/Selection/shared/SelectListBox.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +5 -3
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +4 -2
- package/dist/components/inputs/Selection/shared/SelectMobile.js +3 -1
- package/dist/components/inputs/Selection/shared/select.context.js +20 -18
- package/dist/components/inputs/Selection/shared/useSelectItems.js +6 -4
- package/dist/components/inputs/Slider/Slider.js +3 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +3 -1
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +4 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +4 -2
- package/dist/components/inputs/TextEditor/textEditor.types.js +3 -1
- package/dist/components/inputs/Toggle/Toggle.js +3 -1
- package/dist/components/inputs/Toggle/toggle.cva.js +4 -2
- package/dist/components/inputs/shared/CheckContent.js +3 -1
- package/dist/components/inputs/shared/InputClear.js +5 -3
- package/dist/components/inputs/shared/StaticInput.d.ts +18 -0
- package/dist/components/inputs/shared/StaticInput.js +69 -0
- package/dist/components/inputs/shared/TooltipWrapper.js +3 -1
- package/dist/components/inputs/shared/input.cva.js +6 -4
- package/dist/components/inputs/shared/label.cva.js +4 -2
- package/dist/components/navigation/Accordion/Accordion.js +3 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -1
- package/dist/components/navigation/Accordion/accordion.cva.js +12 -10
- package/dist/components/navigation/Stepper/Stepper.js +3 -1
- package/dist/components/navigation/Stepper/StepperItem.js +3 -1
- package/dist/components/navigation/Stepper/StepperSeparator.js +3 -1
- package/dist/components/navigation/Stepper/stepper.cva.js +9 -7
- package/dist/components/outline.clsx.js +4 -2
- package/dist/components/overlays/ActionModal/ActionModal.js +3 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -1
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -2
- package/dist/components/overlays/Drawer/Drawer.js +3 -1
- package/dist/components/overlays/Modal/Modal.js +4 -2
- package/dist/components/overlays/Modal/modal.cva.js +5 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +3 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +7 -2
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +3 -1
- package/dist/components/overlays/Tooltip/tooltip.cva.js +6 -4
- package/dist/components/segment/Segment.js +3 -1
- package/dist/components/segment/SegmentItem.js +3 -1
- package/dist/components/segment/segment.cva.js +4 -2
- package/dist/components/shared/pagination/Pagination.js +4 -2
- package/dist/components/shared/pagination/PaginationList.js +4 -2
- package/dist/components/shared/pagination/minWidth.cva.js +3 -1
- package/dist/components/shared/popover.cva.js +3 -1
- package/dist/components/status/Alert/Alert.js +3 -1
- package/dist/components/status/Alert/alert.cva.js +3 -1
- package/dist/components/status/Loader/Loader.js +3 -1
- package/dist/components/status/Loader/loader.cva.js +4 -2
- package/dist/components/status/Toast/Toast.js +15 -6
- package/dist/components/status/Toast/toast.cva.js +6 -20
- package/dist/components/status/Toast/useToast.js +3 -1
- package/dist/components/status/shared/status.cva.js +4 -2
- package/dist/components/table/CellText.js +3 -1
- package/dist/components/table/ColumnConfig.js +3 -1
- package/dist/components/table/HeaderText.js +3 -1
- package/dist/components/table/InfiniteTable.js +3 -1
- package/dist/components/table/PaginatedTable.js +3 -1
- package/dist/components/table/Table.js +4 -2
- package/dist/components/table/table.cva.js +8 -6
- package/dist/components/text/Link/Link.js +3 -1
- package/dist/components/text/Link/link.cva.js +3 -1
- package/dist/components/text/Tag/Tag.d.ts +3 -0
- package/dist/components/text/Tag/Tag.js +9 -4
- package/dist/components/text/Tag/tag.cva.js +3 -1
- package/dist/components/text/Typography/Typography.js +3 -1
- package/dist/components/text/Typography/typography.cva.js +3 -1
- package/dist/config/confirmation.context.js +4 -2
- package/dist/config/i18n.js +4 -2
- package/dist/config/link.context.js +3 -1
- package/dist/config/router.context.js +3 -1
- package/dist/config/theme.context.js +8 -6
- package/dist/config/uiConfig.context.d.ts +5 -0
- package/dist/config/uiConfig.context.js +10 -2
- package/dist/config/uiStyle.context.js +3 -1
- package/dist/helpers/dynamicColumns.js +4 -2
- package/dist/helpers/dynamicInputs.js +5 -3
- package/dist/hooks/useAutosave.js +2 -0
- package/dist/hooks/useBreakpoint.js +5 -3
- package/dist/hooks/useDebounceCallback.js +2 -0
- package/dist/hooks/useDeepCompare.js +5 -3
- package/dist/hooks/useFilters.js +3 -1
- package/dist/hooks/useForm.js +2 -0
- package/dist/hooks/useFormAutosave.js +2 -0
- package/dist/hooks/useIntersectionObserver.js +3 -1
- package/dist/hooks/useLocalStorage.js +3 -1
- package/dist/hooks/useLongPressRepeat.js +3 -1
- package/dist/hooks/usePagination.js +2 -0
- package/dist/hooks/useScrollableListBox.js +2 -0
- package/dist/hooks/useSorting.js +2 -0
- package/dist/hooks/useStateAndRef.js +3 -1
- package/dist/hooks/useTableColumnConfig.js +2 -0
- package/dist/hooks/useTableNav.js +124 -20
- package/dist/hooks/useTranslationMemo.js +2 -0
- package/dist/tw-ui-plugin.js +4 -2
- package/dist/utils/array.utils.js +3 -1
- package/dist/utils/compoundMapper.js +3 -1
- package/dist/utils/date-time.utils.d.ts +10 -0
- package/dist/utils/date-time.utils.js +85 -2
- package/dist/utils/date.utils.js +3 -1
- package/dist/utils/dom.utils.js +3 -1
- package/dist/utils/file.utils.js +3 -1
- package/dist/utils/isEqual.js +3 -1
- package/dist/utils/logger.js +3 -1
- package/dist/utils/object.utils.js +3 -1
- package/dist/utils/queries.utils.js +3 -1
- package/dist/utils/rest.utils.js +3 -1
- package/dist/utils/routing.utils.js +3 -1
- package/dist/utils/string.utils.js +3 -1
- package/dist/utils/zod.utils.js +3 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/overlays/Modal/modal.cva.ts
|
|
3
|
+
var modalContent = cva([
|
|
3
4
|
"relative flex flex-col items-center gap-modal-gap-content px-modal-side-mobile py-modal-height-mobile md:px-modal-side-desktop md:py-modal-height-desktop",
|
|
4
5
|
"w-fit max-w-full [&>*]:max-w-full",
|
|
5
6
|
"border-elevation-outline-default-1 bg-elevation-fill-default-1 outline-none",
|
|
@@ -12,7 +13,7 @@ const modalContent = cva([
|
|
|
12
13
|
} },
|
|
13
14
|
defaultVariants: { aside: "center" }
|
|
14
15
|
});
|
|
15
|
-
|
|
16
|
+
var modalOverlay = cva(["fixed inset-0 z-10 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"], {
|
|
16
17
|
variants: { aside: {
|
|
17
18
|
left: "p-0",
|
|
18
19
|
right: "p-0",
|
|
@@ -20,7 +21,7 @@ const modalOverlay = cva(["fixed inset-0 z-10 flex h-(--visual-viewport-height)
|
|
|
20
21
|
} },
|
|
21
22
|
defaultVariants: { aside: "center" }
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
var modalMain = cva(["pointer-events-none my-auto flex w-full"], {
|
|
24
25
|
variants: { aside: {
|
|
25
26
|
left: "entering:animate-drawer-enter-left exiting:animate-drawer-exit-left justify-start",
|
|
26
27
|
right: "entering:animate-drawer-enter-right exiting:animate-drawer-exit-right justify-end",
|
|
@@ -28,4 +29,5 @@ const modalMain = cva(["pointer-events-none my-auto flex w-full"], {
|
|
|
28
29
|
} },
|
|
29
30
|
defaultVariants: { aside: "center" }
|
|
30
31
|
});
|
|
32
|
+
//#endregion
|
|
31
33
|
export { modalContent, modalMain, modalOverlay };
|
|
@@ -5,7 +5,8 @@ import { popover } from "../../shared/popover.cva.js";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { Dialog, DialogTrigger, Popover } from "react-aria-components";
|
|
8
|
-
|
|
8
|
+
//#region src/components/overlays/ResponsivePopover/ResponsivePopover.tsx
|
|
9
|
+
var ResponsivePopover = ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel }) => {
|
|
9
10
|
const popoverCva = UIStyle.useCva("popover.cva", popover);
|
|
10
11
|
if (!useBreakpoint("md")) return /* @__PURE__ */ jsx(BottomSheet, {
|
|
11
12
|
isOpen,
|
|
@@ -36,4 +37,5 @@ const ResponsivePopover = ({ trigger, isOpen, onOpenChange, children, popoverCla
|
|
|
36
37
|
})]
|
|
37
38
|
});
|
|
38
39
|
};
|
|
40
|
+
//#endregion
|
|
39
41
|
export { ResponsivePopover };
|
|
@@ -8,6 +8,7 @@ import { clsx } from "clsx";
|
|
|
8
8
|
import { Fragment as Fragment$1, useRef } from "react";
|
|
9
9
|
import { OverlayArrow, Tooltip, TooltipTrigger } from "react-aria-components";
|
|
10
10
|
import { useFocusable } from "react-aria";
|
|
11
|
+
//#region src/components/overlays/Tooltip/Tooltip.tsx
|
|
11
12
|
var CustomTrigger = ({ children, className, tabIndex }) => {
|
|
12
13
|
const ref = useRef(null);
|
|
13
14
|
const { focusableProps } = useFocusable({}, ref);
|
|
@@ -19,7 +20,7 @@ var CustomTrigger = ({ children, className, tabIndex }) => {
|
|
|
19
20
|
children
|
|
20
21
|
});
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
var Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNonInteractiveTrigger, triggerClassName, triggerTabIndex, ...tooltipProps }) => {
|
|
23
24
|
const tooltipCva$1 = UIStyle.useCva("tooltip.cva", tooltipCva);
|
|
24
25
|
const tooltipPointerHorizontalCva$1 = UIStyle.useCva("tooltip.pointerHorizontalCva", tooltipPointerHorizontalCva);
|
|
25
26
|
const tooltipPointerVerticalCva$1 = UIStyle.useCva("tooltip.pointerVerticalCva", tooltipPointerVerticalCva);
|
|
@@ -34,8 +35,11 @@ const Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNon
|
|
|
34
35
|
tabIndex: triggerTabIndex,
|
|
35
36
|
children
|
|
36
37
|
}) : /* @__PURE__ */ jsx(Trigger, { children }), /* @__PURE__ */ jsxs(Tooltip, {
|
|
37
|
-
className: tooltipCva$1({ color }),
|
|
38
38
|
...tooltipProps,
|
|
39
|
+
className: tooltipCva$1({
|
|
40
|
+
color,
|
|
41
|
+
className: tooltipProps.className
|
|
42
|
+
}),
|
|
39
43
|
offset: 13,
|
|
40
44
|
children: [/* @__PURE__ */ jsxs(OverlayArrow, { children: [/* @__PURE__ */ jsx(PointerHorizontalIcon, { className: tooltipPointerHorizontalCva$1({ color }) }), /* @__PURE__ */ jsx(PointerVerticalIcon, { className: tooltipPointerVerticalCva$1({ color }) })] }), /* @__PURE__ */ jsx(Typography, {
|
|
41
45
|
size: "body-4",
|
|
@@ -46,4 +50,5 @@ const Tooltip$1 = ({ children, text, isDisabled, delay, closeDelay, color, isNon
|
|
|
46
50
|
})]
|
|
47
51
|
});
|
|
48
52
|
};
|
|
53
|
+
//#endregion
|
|
49
54
|
export { Tooltip$1 as Tooltip };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Tooltip } from "./Tooltip.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
|
|
4
|
+
//#region src/components/overlays/Tooltip/TooltipEllipsis.tsx
|
|
5
|
+
var TooltipEllipsis = ({ text, children, isDisabled, isNonInteractiveTrigger }) => {
|
|
5
6
|
const [isEllipsisActive, setIsEllipsisActive] = useState(false);
|
|
6
7
|
const onContentRef = (ref) => {
|
|
7
8
|
if (ref) setIsEllipsisActive(ref.offsetWidth < ref.scrollWidth);
|
|
@@ -16,4 +17,5 @@ const TooltipEllipsis = ({ text, children, isDisabled, isNonInteractiveTrigger }
|
|
|
16
17
|
});
|
|
17
18
|
return content;
|
|
18
19
|
};
|
|
20
|
+
//#endregion
|
|
19
21
|
export { TooltipEllipsis };
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/overlays/Tooltip/tooltip.cva.ts
|
|
3
|
+
var tooltipCva = cva(["group max-w-64 rounded-tooltip-rounding-default px-tooltip-side-default py-tooltip-height-default shadow-2"], {
|
|
3
4
|
variants: { color: {
|
|
4
5
|
default: ["bg-interactive-contained-secondary-idle"],
|
|
5
6
|
error: ["w-max bg-elevation-fill-error-1"]
|
|
6
7
|
} },
|
|
7
8
|
defaultVariants: { color: "default" }
|
|
8
9
|
});
|
|
9
|
-
|
|
10
|
+
var tooltipPointerHorizontalCva = cva(["h-2-5 w-5 group-placement-left:hidden group-placement-right:hidden group-placement-top:rotate-180"], {
|
|
10
11
|
variants: { color: {
|
|
11
12
|
default: ["text-interactive-contained-secondary-idle"],
|
|
12
13
|
error: ["text-elevation-fill-error-1"]
|
|
13
14
|
} },
|
|
14
15
|
defaultVariants: { color: "default" }
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
+
var tooltipPointerVerticalCva = cva(["h-5 w-2-5 group-placement-bottom:hidden group-placement-top:hidden group-placement-left:rotate-180"], {
|
|
17
18
|
variants: { color: {
|
|
18
19
|
default: ["text-interactive-contained-secondary-idle"],
|
|
19
20
|
error: ["text-elevation-fill-error-1"]
|
|
20
21
|
} },
|
|
21
22
|
defaultVariants: { color: "default" }
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
var tooltipTextCva = cva([], {
|
|
24
25
|
variants: { color: {
|
|
25
26
|
default: ["text-interactive-contained-secondary-on-idle"],
|
|
26
27
|
error: ["text-text-error-inverted-1"]
|
|
27
28
|
} },
|
|
28
29
|
defaultVariants: { color: "default" }
|
|
29
30
|
});
|
|
31
|
+
//#endregion
|
|
30
32
|
export { tooltipCva, tooltipPointerHorizontalCva, tooltipPointerVerticalCva, tooltipTextCva };
|
|
@@ -10,6 +10,7 @@ import { useToggleButtonGroup } from "react-aria";
|
|
|
10
10
|
import { mergeRefs } from "@react-aria/utils";
|
|
11
11
|
import { Controller } from "react-hook-form";
|
|
12
12
|
import { useToggleGroupState } from "react-stately";
|
|
13
|
+
//#region src/components/segment/Segment.tsx
|
|
13
14
|
var SegmentBase = ({ className, items, error, onChange, value, defaultValue, ...rest }) => {
|
|
14
15
|
const props = {
|
|
15
16
|
...rest,
|
|
@@ -60,7 +61,7 @@ var SegmentBase = ({ className, items, error, onChange, value, defaultValue, ...
|
|
|
60
61
|
})
|
|
61
62
|
});
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
+
var Segment = (props) => {
|
|
64
65
|
if ("formControl" in props && props.formControl) {
|
|
65
66
|
const { formControl, ref, ...innerProps } = props;
|
|
66
67
|
return /* @__PURE__ */ jsx(Controller, {
|
|
@@ -78,4 +79,5 @@ const Segment = (props) => {
|
|
|
78
79
|
}
|
|
79
80
|
return /* @__PURE__ */ jsx(SegmentBase, { ...props });
|
|
80
81
|
};
|
|
82
|
+
//#endregion
|
|
81
83
|
export { Segment };
|
|
@@ -3,7 +3,8 @@ import { Typography } from "../text/Typography/Typography.js";
|
|
|
3
3
|
import { segmentItemCva } from "./segment.cva.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { ToggleButton } from "react-aria-components";
|
|
6
|
-
|
|
6
|
+
//#region src/components/segment/SegmentItem.tsx
|
|
7
|
+
var SegmentItem = ({ label, icon, id, isDisabled, ...props }) => {
|
|
7
8
|
const IconComponent = icon;
|
|
8
9
|
const iconOnly = !!(icon && !label);
|
|
9
10
|
const segmentItemCva$1 = UIStyle.useCva("segment.itemCva", segmentItemCva);
|
|
@@ -20,4 +21,5 @@ const SegmentItem = ({ label, icon, id, isDisabled, ...props }) => {
|
|
|
20
21
|
})]
|
|
21
22
|
});
|
|
22
23
|
};
|
|
24
|
+
//#endregion
|
|
23
25
|
export { SegmentItem };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/segment/segment.cva.ts
|
|
3
|
+
var segmentCva = cva([
|
|
3
4
|
"group/segment grid w-fit items-center gap-segmented-control-side-segmented-control p-segmented-control-side-segmented-control",
|
|
4
5
|
"bg-elevation-fill-default-3",
|
|
5
6
|
"rounded-segmented-control-rounding-segmented-control"
|
|
6
7
|
]);
|
|
7
|
-
|
|
8
|
+
var segmentItemCva = cva([
|
|
8
9
|
"flex items-center justify-center gap-segmented-control-gap-content-icon-to-text transition-all duration-200",
|
|
9
10
|
"border border-support-transparent-outline",
|
|
10
11
|
"py-segmented-control-height-segment",
|
|
@@ -22,4 +23,5 @@ const segmentItemCva = cva([
|
|
|
22
23
|
} },
|
|
23
24
|
defaultVariants: { iconOnly: false }
|
|
24
25
|
});
|
|
26
|
+
//#endregion
|
|
25
27
|
export { segmentCva, segmentItemCva };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
2
|
-
import
|
|
2
|
+
import "../../../config/i18n.js";
|
|
3
3
|
import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
|
|
4
4
|
import { PaginationList } from "./PaginationList.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
|
-
|
|
8
|
+
//#region src/components/shared/pagination/Pagination.tsx
|
|
9
|
+
var Pagination = ({ size = "s", variant = "subtle", color = "secondary", page, totalItems, totalPages, pageSize, hideText = true, hideFirstLast = true, hidePrevNext = false, hideNumbers = false, className, onPageChange, onPageSizeChange }) => {
|
|
9
10
|
const { t } = useTranslation("ui");
|
|
10
11
|
return /* @__PURE__ */ jsxs("nav", {
|
|
11
12
|
id: "pagination",
|
|
@@ -40,4 +41,5 @@ const Pagination = ({ size = "s", variant = "subtle", color = "secondary", page,
|
|
|
40
41
|
})]
|
|
41
42
|
});
|
|
42
43
|
};
|
|
44
|
+
//#endregion
|
|
43
45
|
export { Pagination };
|
|
@@ -3,13 +3,14 @@ import { ChevronRightIcon } from "../../../assets/icons/ChevronRight.js";
|
|
|
3
3
|
import { ChevronsLeftIcon } from "../../../assets/icons/ChevronsLeft.js";
|
|
4
4
|
import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
|
|
5
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
6
|
-
import
|
|
6
|
+
import "../../../config/i18n.js";
|
|
7
7
|
import { minWidth } from "./minWidth.cva.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
10
|
import { useMemo } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
|
-
|
|
12
|
+
//#region src/components/shared/pagination/PaginationList.tsx
|
|
13
|
+
var PaginationList = ({ page, totalPages, size, color, variant, hideText, hideFirstLast, hidePrevNext, hideNumbers, className, onPageChange }) => {
|
|
13
14
|
const { t } = useTranslation("ui");
|
|
14
15
|
const isPrevDisabled = page <= 1;
|
|
15
16
|
const isNextDisabled = page >= totalPages;
|
|
@@ -102,4 +103,5 @@ const PaginationList = ({ page, totalPages, size, color, variant, hideText, hide
|
|
|
102
103
|
]
|
|
103
104
|
});
|
|
104
105
|
};
|
|
106
|
+
//#endregion
|
|
105
107
|
export { PaginationList };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/shared/pagination/minWidth.cva.ts
|
|
3
|
+
var minWidth = cva("", { variants: { size: {
|
|
3
4
|
xxs: ["min-w-button-width-min-width-xxs"],
|
|
4
5
|
xs: ["min-w-button-width-min-width-xs"],
|
|
5
6
|
s: ["min-w-button-width-min-width-s"],
|
|
6
7
|
m: ["min-w-button-width-min-width-m"],
|
|
7
8
|
l: ["min-w-button-width-min-width-l"]
|
|
8
9
|
} } });
|
|
10
|
+
//#endregion
|
|
9
11
|
export { minWidth };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/shared/popover.cva.ts
|
|
3
|
+
var popover = cva("rounded-list-rounding-dropdown border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1 shadow-5 outline-none");
|
|
4
|
+
//#endregion
|
|
3
5
|
export { popover };
|
|
@@ -4,7 +4,8 @@ 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
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
//#region src/components/status/Alert/Alert.tsx
|
|
8
|
+
var Alert = ({ variant, color, text, isLoading = false, rightContent, hasSeparator, icon: Icon, className }) => {
|
|
8
9
|
const alertCva = UIStyle.useCva("alert.cva", alert);
|
|
9
10
|
const iconCva = UIStyle.useCva("status.iconCva", statusIcon);
|
|
10
11
|
const separatorCva = UIStyle.useCva("status.separatorCva", statusSeparator);
|
|
@@ -42,4 +43,5 @@ const Alert = ({ variant, color, text, isLoading = false, rightContent, hasSepar
|
|
|
42
43
|
})
|
|
43
44
|
});
|
|
44
45
|
};
|
|
46
|
+
//#endregion
|
|
45
47
|
export { Alert };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/status/Alert/alert.cva.ts
|
|
3
|
+
var alert = cva("min-h-0 overflow-hidden rounded-alert-rounding-default p-0", {
|
|
3
4
|
variants: {
|
|
4
5
|
variant: {
|
|
5
6
|
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
@@ -59,4 +60,5 @@ const alert = cva("min-h-0 overflow-hidden rounded-alert-rounding-default p-0",
|
|
|
59
60
|
color: "neutral"
|
|
60
61
|
}
|
|
61
62
|
});
|
|
63
|
+
//#endregion
|
|
62
64
|
export { alert };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { loader, loaderWrapper } from "./loader.cva.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
//#region src/components/status/Loader/Loader.tsx
|
|
4
|
+
var Loader = ({ size, className, ...props }) => {
|
|
4
5
|
return /* @__PURE__ */ jsx("div", {
|
|
5
6
|
className: loaderWrapper({
|
|
6
7
|
size,
|
|
@@ -29,4 +30,5 @@ const Loader = ({ size, className, ...props }) => {
|
|
|
29
30
|
})
|
|
30
31
|
});
|
|
31
32
|
};
|
|
33
|
+
//#endregion
|
|
32
34
|
export { Loader };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/status/Loader/loader.cva.ts
|
|
3
|
+
var loaderWrapper = cva("flex items-center justify-center", {
|
|
3
4
|
variants: { size: {
|
|
4
5
|
default: "size-6",
|
|
5
6
|
l: "size-16"
|
|
6
7
|
} },
|
|
7
8
|
defaultVariants: { size: "default" }
|
|
8
9
|
});
|
|
9
|
-
|
|
10
|
+
var loader = cva("animate-loader-spin", {
|
|
10
11
|
variants: { size: {
|
|
11
12
|
default: "size-3-5",
|
|
12
13
|
l: "size-8"
|
|
13
14
|
} },
|
|
14
15
|
defaultVariants: { size: "default" }
|
|
15
16
|
});
|
|
17
|
+
//#endregion
|
|
16
18
|
export { loader, loaderWrapper };
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
|
+
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
4
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
5
6
|
import { statusIcon, statusSeparator } from "../shared/status.cva.js";
|
|
6
7
|
import { buttonColorVariant, toast as toast$1, toastContainer, toastWrapper } from "./toast.cva.js";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { ToastContainer } from "react-toastify";
|
|
9
|
-
|
|
10
|
+
//#region src/components/status/Toast/Toast.tsx
|
|
11
|
+
var Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
12
|
+
const uiConfig = UIConfig.useConfig();
|
|
13
|
+
const { variant = uiConfig.toast.variant, ...restProps } = props;
|
|
10
14
|
const toastCva = UIStyle.useCva("toast.cva", toast$1);
|
|
11
15
|
const buttonColor = UIStyle.useMapper("toast.buttonColor", buttonColorVariant);
|
|
12
16
|
const iconCva = UIStyle.useCva("status.iconCva", statusIcon);
|
|
13
17
|
const separatorCva = UIStyle.useCva("status.separatorCva", statusSeparator);
|
|
18
|
+
const variantProps = {
|
|
19
|
+
variant,
|
|
20
|
+
...restProps
|
|
21
|
+
};
|
|
14
22
|
return /* @__PURE__ */ jsxs("div", {
|
|
15
|
-
className: toastCva(
|
|
23
|
+
className: toastCva(variantProps),
|
|
16
24
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
17
25
|
className: "flex items-start gap-toast-gap-icon-to-text px-toast-side-default py-toast-height-content",
|
|
18
26
|
children: [
|
|
@@ -20,17 +28,17 @@ const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props })
|
|
|
20
28
|
size: "default",
|
|
21
29
|
className: "shrink-0"
|
|
22
30
|
}),
|
|
23
|
-
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva(
|
|
31
|
+
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva(variantProps) }),
|
|
24
32
|
/* @__PURE__ */ jsx(Typography, {
|
|
25
33
|
size: "label-2",
|
|
26
34
|
children: text
|
|
27
35
|
})
|
|
28
36
|
]
|
|
29
|
-
}), actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: separatorCva(
|
|
37
|
+
}), actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: separatorCva(variantProps) }), /* @__PURE__ */ jsx("div", {
|
|
30
38
|
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-toast-gap-action px-toast-side-default py-toast-height-actions-mobile md:w-auto md:justify-center md:py-toast-height-actions-desktop",
|
|
31
39
|
children: actions.map(({ text: buttonText, onPress }) => /* @__PURE__ */ jsx(Button, {
|
|
32
40
|
onPress,
|
|
33
|
-
...buttonColor(
|
|
41
|
+
...buttonColor(variantProps),
|
|
34
42
|
variant: "text",
|
|
35
43
|
size: "none",
|
|
36
44
|
width: "hug",
|
|
@@ -39,7 +47,7 @@ const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props })
|
|
|
39
47
|
})] })]
|
|
40
48
|
});
|
|
41
49
|
};
|
|
42
|
-
|
|
50
|
+
var ToastContainer$1 = () => {
|
|
43
51
|
return /* @__PURE__ */ jsx(ToastContainer, {
|
|
44
52
|
className: (params) => {
|
|
45
53
|
return toastContainer({
|
|
@@ -54,4 +62,5 @@ const ToastContainer$1 = () => {
|
|
|
54
62
|
hideProgressBar: true
|
|
55
63
|
});
|
|
56
64
|
};
|
|
65
|
+
//#endregion
|
|
57
66
|
export { Toast, ToastContainer$1 as ToastContainer };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
2
2
|
import { clsx } from "clsx";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
|
|
4
|
+
//#region src/components/status/Toast/toast.cva.ts
|
|
5
|
+
var toastContainer = cva("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", { variants: { position: {
|
|
5
6
|
"bottom-right": "right-0 bottom-0",
|
|
6
7
|
"bottom-left": "bottom-0 left-0",
|
|
7
8
|
"top-right": "top-0 right-0",
|
|
@@ -9,8 +10,8 @@ const toastContainer = cva("m-toast-gap-margin-mobile w-auto p-0 md:m-toast-gap-
|
|
|
9
10
|
"bottom-center": "bottom-0",
|
|
10
11
|
"top-center": "top-0"
|
|
11
12
|
} } });
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
var toastWrapper = clsx("m-0! min-h-0! w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
14
|
+
var toast = cva("m-0 inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row", {
|
|
14
15
|
variants: {
|
|
15
16
|
variant: {
|
|
16
17
|
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
@@ -32,22 +33,6 @@ const toast = cva("inline-flex w-auto flex-col items-center overflow-hidden roun
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
compoundVariants: [
|
|
35
|
-
{
|
|
36
|
-
position: [
|
|
37
|
-
"bottom-right",
|
|
38
|
-
"bottom-left",
|
|
39
|
-
"bottom-center"
|
|
40
|
-
],
|
|
41
|
-
className: "mt-toast-gap-margin-mobile md:mt-toast-gap-margin-desktop"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
position: [
|
|
45
|
-
"top-right",
|
|
46
|
-
"top-left",
|
|
47
|
-
"top-center"
|
|
48
|
-
],
|
|
49
|
-
className: "mb-toast-gap-margin-mobile md:mb-toast-gap-margin-desktop"
|
|
50
|
-
},
|
|
51
36
|
{
|
|
52
37
|
variant: "outlined",
|
|
53
38
|
color: "neutral",
|
|
@@ -94,7 +79,7 @@ const toast = cva("inline-flex w-auto flex-col items-center overflow-hidden roun
|
|
|
94
79
|
color: "neutral"
|
|
95
80
|
}
|
|
96
81
|
});
|
|
97
|
-
|
|
82
|
+
var buttonColorVariant = compoundMapper({
|
|
98
83
|
compoundVariants: [
|
|
99
84
|
{
|
|
100
85
|
variant: "outlined",
|
|
@@ -155,4 +140,5 @@ const buttonColorVariant = compoundMapper({
|
|
|
155
140
|
},
|
|
156
141
|
default: { color: "secondary" }
|
|
157
142
|
});
|
|
143
|
+
//#endregion
|
|
158
144
|
export { buttonColorVariant, toast, toastContainer, toastWrapper };
|
|
@@ -2,7 +2,8 @@ import { Toast } from "./Toast.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { toast } from "react-toastify";
|
|
5
|
-
|
|
5
|
+
//#region src/components/status/Toast/useToast.tsx
|
|
6
|
+
var useToast = () => {
|
|
6
7
|
const successToast = useCallback((params, options) => {
|
|
7
8
|
return toast.success(/* @__PURE__ */ jsx(Toast, {
|
|
8
9
|
color: "success",
|
|
@@ -60,4 +61,5 @@ const useToast = () => {
|
|
|
60
61
|
closeToast
|
|
61
62
|
]);
|
|
62
63
|
};
|
|
64
|
+
//#endregion
|
|
63
65
|
export { useToast };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
2
|
+
//#region src/components/status/shared/status.cva.ts
|
|
3
|
+
var statusIcon = cva("size-6 shrink-0", {
|
|
3
4
|
variants: {
|
|
4
5
|
variant: {
|
|
5
6
|
outlined: "",
|
|
@@ -39,7 +40,7 @@ const statusIcon = cva("size-6 shrink-0", {
|
|
|
39
40
|
color: "neutral"
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
|
-
|
|
43
|
+
var statusSeparator = cva("h-px shrink-0 self-stretch md:h-auto md:w-px", {
|
|
43
44
|
variants: {
|
|
44
45
|
variant: {
|
|
45
46
|
outlined: "",
|
|
@@ -54,4 +55,5 @@ const statusSeparator = cva("h-px shrink-0 self-stretch md:h-auto md:w-px", {
|
|
|
54
55
|
},
|
|
55
56
|
defaultVariants: { color: "neutral" }
|
|
56
57
|
});
|
|
58
|
+
//#endregion
|
|
57
59
|
export { statusIcon, statusSeparator };
|
|
@@ -3,7 +3,8 @@ import { Typography } from "../text/Typography/Typography.js";
|
|
|
3
3
|
import { UIConfig } from "../../config/uiConfig.context.js";
|
|
4
4
|
import { tableCellText } from "./table.cva.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
//#region src/components/table/CellText.tsx
|
|
7
|
+
var CellText = (props) => {
|
|
7
8
|
const uiConfig = UIConfig.useConfig();
|
|
8
9
|
const { variant = uiConfig.tableCellText.variant, size = uiConfig.tableCellText.size, children, style, className } = props;
|
|
9
10
|
return /* @__PURE__ */ jsx(Typography, {
|
|
@@ -16,4 +17,5 @@ const CellText = (props) => {
|
|
|
16
17
|
children
|
|
17
18
|
});
|
|
18
19
|
};
|
|
20
|
+
//#endregion
|
|
19
21
|
export { CellText };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Typography } from "../text/Typography/Typography.js";
|
|
2
|
-
import
|
|
2
|
+
import "../../config/i18n.js";
|
|
3
3
|
import { Checkbox } from "../inputs/Checkbox/Checkbox.js";
|
|
4
4
|
import { Modal } from "../overlays/Modal/Modal.js";
|
|
5
5
|
import { Table } from "./Table.js";
|
|
@@ -7,6 +7,7 @@ import { useTranslationMemo } from "../../hooks/useTranslationMemo.js";
|
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useCallback, useEffect, useState } from "react";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
|
+
//#region src/components/table/ColumnConfig.tsx
|
|
10
11
|
var VisibilityCell = ({ original, onToggle }) => /* @__PURE__ */ jsx(Checkbox, {
|
|
11
12
|
isSelected: original.visible,
|
|
12
13
|
onChange: () => onToggle(original.id),
|
|
@@ -78,4 +79,5 @@ function ColumnConfigModal({ isOpen, onClose, configColumns, visibleColumns, onV
|
|
|
78
79
|
})
|
|
79
80
|
});
|
|
80
81
|
}
|
|
82
|
+
//#endregion
|
|
81
83
|
export { ColumnConfigModal };
|
|
@@ -3,7 +3,8 @@ import { Typography } from "../text/Typography/Typography.js";
|
|
|
3
3
|
import { UIConfig } from "../../config/uiConfig.context.js";
|
|
4
4
|
import { tableHeaderText } from "./table.cva.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
//#region src/components/table/HeaderText.tsx
|
|
7
|
+
var HeaderText = (props) => {
|
|
7
8
|
const uiConfig = UIConfig.useConfig();
|
|
8
9
|
const { variant = uiConfig.tableHeaderText.variant, size = uiConfig.tableHeaderText.size, children, style, className } = props;
|
|
9
10
|
return /* @__PURE__ */ jsx(Typography, {
|
|
@@ -15,4 +16,5 @@ const HeaderText = (props) => {
|
|
|
15
16
|
children
|
|
16
17
|
});
|
|
17
18
|
};
|
|
19
|
+
//#endregion
|
|
18
20
|
export { HeaderText };
|
|
@@ -3,7 +3,8 @@ import { useIntersectionObserver } from "../../hooks/useIntersectionObserver.js"
|
|
|
3
3
|
import { Table } from "./Table.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useCallback } from "react";
|
|
6
|
-
|
|
6
|
+
//#region src/components/table/InfiniteTable.tsx
|
|
7
|
+
var InfiniteTable = ({ hasNextPage, isFetchingNextPage = false, fetchNextPage, ...rest }) => {
|
|
7
8
|
const { ref } = useIntersectionObserver({
|
|
8
9
|
onIntersection: useCallback(() => {
|
|
9
10
|
if (!isFetchingNextPage && hasNextPage) fetchNextPage();
|
|
@@ -23,4 +24,5 @@ const InfiniteTable = ({ hasNextPage, isFetchingNextPage = false, fetchNextPage,
|
|
|
23
24
|
})]
|
|
24
25
|
});
|
|
25
26
|
};
|
|
27
|
+
//#endregion
|
|
26
28
|
export { InfiniteTable };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Pagination } from "../shared/pagination/Pagination.js";
|
|
2
2
|
import { Table } from "./Table.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
//#region src/components/table/PaginatedTable.tsx
|
|
5
|
+
var PaginatedTable = ({ pagination, setPagination, items, totalItems, ...rest }) => {
|
|
5
6
|
return /* @__PURE__ */ jsxs("div", {
|
|
6
7
|
className: "flex flex-col gap-4",
|
|
7
8
|
children: [/* @__PURE__ */ jsx(Table, {
|
|
@@ -23,4 +24,5 @@ const PaginatedTable = ({ pagination, setPagination, items, totalItems, ...rest
|
|
|
23
24
|
})]
|
|
24
25
|
});
|
|
25
26
|
};
|
|
27
|
+
//#endregion
|
|
26
28
|
export { PaginatedTable };
|
|
@@ -17,6 +17,7 @@ import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
|
17
17
|
import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
18
18
|
import { CSS } from "@dnd-kit/utilities";
|
|
19
19
|
import { flexRender, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
20
|
+
//#region src/components/table/Table.tsx
|
|
20
21
|
var CustomCellContext = (context) => {
|
|
21
22
|
return {
|
|
22
23
|
...context,
|
|
@@ -29,7 +30,7 @@ var CellRender = (Comp, props) => {
|
|
|
29
30
|
const rendered = typeof Comp === "function" ? Comp(props) : Comp;
|
|
30
31
|
return typeof rendered === "string" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
var RowDragHandleCell = ({ rowId }) => {
|
|
33
34
|
const { attributes, listeners } = useSortable({ id: rowId });
|
|
34
35
|
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
35
36
|
...attributes,
|
|
@@ -72,7 +73,7 @@ var DraggableRow = ({ row, showCellBorder, onRowClick, onDoubleClick, tableRowCv
|
|
|
72
73
|
})
|
|
73
74
|
});
|
|
74
75
|
};
|
|
75
|
-
|
|
76
|
+
var Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
|
|
76
77
|
const tableRowCva = UIStyle.useCva("table.rowCva", tableRow);
|
|
77
78
|
const tableHeadRowCva = UIStyle.useCva("table.headRowCva", tableHeadRow);
|
|
78
79
|
const tableHeadDataCva = UIStyle.useCva("table.headDataCva", tableHeadData);
|
|
@@ -260,4 +261,5 @@ const Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, clas
|
|
|
260
261
|
});
|
|
261
262
|
return tableElement;
|
|
262
263
|
};
|
|
264
|
+
//#endregion
|
|
263
265
|
export { Table };
|