@povio/ui 0.0.7 → 0.0.8
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/index.js +62585 -0
- package/package.json +5 -57
- package/povio-ui-0.0.8.tgz +0 -0
- package/{dist → src}/components/Menu/MenuDesktop.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuItem.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuMobile.d.ts +1 -1
- package/{dist → src}/components/Menu/MenuPopover.d.ts +1 -1
- package/{dist → src}/components/buttons/Button/Button.d.ts +1 -1
- package/{dist → src}/components/buttons/Button/button.cva.d.ts +1 -1
- package/{dist → src}/components/buttons/IconButton/IconButton.d.ts +1 -1
- package/{dist → src}/components/buttons/InlineIconButton/InlineIconButton.d.ts +1 -1
- package/{dist → src}/components/buttons/PillButton/PillButton.d.ts +2 -2
- package/{dist → src}/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/{dist → src}/components/buttons/SplitButton/SplitButton.d.ts +2 -2
- package/{dist → src}/components/buttons/TextButton/TextButton.d.ts +3 -3
- package/{dist → src}/components/buttons/ToggleButton/ToggleButton.d.ts +3 -3
- package/{dist → src}/components/buttons/shared/ButtonContent.d.ts +3 -3
- package/{dist → src}/components/inputs/Checkbox/Checkbox.d.ts +3 -3
- package/{dist → src}/components/inputs/Checkbox/CheckboxCheckmark.d.ts +1 -1
- package/{dist → src}/components/inputs/Checkbox/checkbox.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/DateTime/DatePicker/DatePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/TimePicker/TimePicker.d.ts +3 -3
- package/{dist → src}/components/inputs/DateTime/shared/CalendarHeader.d.ts +1 -1
- package/{dist → src}/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/{dist → src}/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/{dist → src}/components/inputs/File/fileUpload.types.d.ts +3 -3
- package/{dist → src}/components/inputs/File/inputUpload.types.d.ts +2 -2
- package/{dist → src}/components/inputs/File/shared/FileCard.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileCardList.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentEmpty.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentError.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentFilled.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/FileUploadContentLoading.d.ts +1 -1
- package/{dist → src}/components/inputs/File/shared/InputUploadContent.d.ts +1 -1
- package/{dist → src}/components/inputs/FormField/FormField.d.ts +3 -3
- package/src/components/inputs/FormField/FormFieldLabel.d.ts +12 -0
- package/{dist → src}/components/inputs/Input/NumberInput/NumberInput.d.ts +4 -4
- package/{dist → src}/components/inputs/Input/PasswordInput/PasswordInput.d.ts +2 -2
- package/{dist → src}/components/inputs/Input/TextArea/TextArea.d.ts +3 -3
- package/{dist → src}/components/inputs/Input/TextInput/TextInput.d.ts +5 -4
- package/{dist → src}/components/inputs/Input/shared/InputContent.d.ts +3 -3
- package/{dist → src}/components/inputs/Inputs/Form.d.ts +2 -2
- package/{dist → src}/components/inputs/Inputs/InputItem.d.ts +16 -16
- package/{dist → src}/components/inputs/RadioGroup/RadioGroup.d.ts +3 -3
- package/{dist → src}/components/inputs/RadioGroup/radio.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/Select/Select.d.ts +3 -3
- package/{dist → src}/components/inputs/Selection/shared/SelectBase.d.ts +5 -4
- package/{dist → src}/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectInput.d.ts +6 -6
- package/src/components/inputs/Selection/shared/SelectInputTags.d.ts +11 -0
- package/src/components/inputs/Selection/shared/SelectListBox.d.ts +9 -0
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxItem.d.ts +2 -2
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/{dist → src}/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/{dist → src}/components/inputs/Selection/shared/select.types.d.ts +9 -1
- package/{dist → src}/components/inputs/Selection/shared/useSelectItems.d.ts +2 -2
- package/{dist → src}/components/inputs/Slider/Slider.d.ts +2 -2
- package/{dist → src}/components/inputs/TextEditor/TextEditor.d.ts +2 -2
- package/{dist → src}/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +1 -1
- package/{dist → src}/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +1 -1
- package/{dist → src}/components/inputs/Toggle/Toggle.d.ts +3 -3
- package/{dist → src}/components/inputs/Toggle/toggle.cva.d.ts +1 -1
- package/{dist → src}/components/inputs/shared/CheckContent.d.ts +1 -1
- package/src/components/inputs/shared/InputClear.d.ts +8 -0
- package/{dist → src}/components/inputs/shared/label.cva.d.ts +1 -1
- package/{dist → src}/components/overlays/ActionModal/ActionModal.d.ts +2 -2
- package/{dist → src}/components/overlays/Modal/Modal.d.ts +1 -1
- package/{dist → src}/components/overlays/Tooltip/Tooltip.d.ts +4 -2
- package/src/components/overlays/Tooltip/tooltip.cva.d.ts +21 -0
- package/{dist → src}/components/segment/segment.types.d.ts +1 -1
- package/{dist → src}/components/shared/pagination/PaginationList.d.ts +1 -1
- package/{dist → src}/components/status/Alert/Alert.d.ts +1 -1
- package/{dist → src}/components/status/Loader/Loader.d.ts +1 -1
- package/{dist → src}/components/status/Toast/Toast.d.ts +1 -1
- package/{dist → src}/components/status/Toast/toast.cva.d.ts +1 -1
- package/{dist → src}/components/table/table.cva.d.ts +7 -3
- package/{dist → src}/components/text/Link/Link.d.ts +1 -1
- package/{dist → src}/components/text/Tag/Tag.d.ts +1 -1
- package/{dist → src}/components/text/Typography/Typography.d.ts +1 -1
- package/{dist → src}/config/confirmation.context.d.ts +1 -1
- package/{dist → src}/config/uiConfig.context.d.ts +10 -8
- package/{dist → src}/config/uiStyle.context.d.ts +15 -14
- package/{dist → src}/helpers/dynamicInputs.d.ts +4 -2
- package/{dist → src}/hooks/useFormAutosave.d.ts +2 -2
- package/{dist → src}/index.d.ts +12 -6
- package/{dist → src}/types/react-query.d.ts +1 -1
- package/src/utils/vendor/acl/AclGuard.d.ts +8 -0
- package/src/utils/vendor/acl/Can.d.ts +9 -0
- package/src/utils/vendor/acl/ability.context.d.ts +15 -0
- package/src/utils/vendor/acl/appAbility.types.d.ts +3 -0
- package/src/utils/vendor/auth/AuthGuard.d.ts +6 -0
- package/src/utils/vendor/auth/auth.context.d.ts +21 -0
- package/src/utils/vendor/auth/withPrivateAuthGuard.d.ts +6 -0
- package/{dist/utils/rest/rest-client.d.ts → src/utils/vendor/rest-client.types.d.ts} +8 -14
- package/{dist → src}/utils/zod.utils.d.ts +2 -1
- package/vite.config.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.js +0 -21
- package/dist/assets/icons/AlignLeft.js +0 -21
- package/dist/assets/icons/AlignLeftRight.js +0 -21
- package/dist/assets/icons/AlignRight.js +0 -21
- package/dist/assets/icons/ArrowDropDown.js +0 -21
- package/dist/assets/icons/ArrowDropUp.js +0 -21
- package/dist/assets/icons/ArrowLeft.js +0 -21
- package/dist/assets/icons/ArrowRight.js +0 -21
- package/dist/assets/icons/Bold.js +0 -21
- package/dist/assets/icons/BulletedList.js +0 -21
- package/dist/assets/icons/Calendar.js +0 -23
- package/dist/assets/icons/Check.js +0 -23
- package/dist/assets/icons/CheckCircle.js +0 -21
- package/dist/assets/icons/CheckboxCheckmark.js +0 -24
- package/dist/assets/icons/CheckboxIndeterminate.js +0 -24
- package/dist/assets/icons/ChevronDown.js +0 -23
- package/dist/assets/icons/ChevronLeft.js +0 -23
- package/dist/assets/icons/ChevronRight.js +0 -23
- package/dist/assets/icons/ChevronUp.js +0 -23
- package/dist/assets/icons/ChevronsLeft.js +0 -34
- package/dist/assets/icons/ChevronsRight.js +0 -34
- package/dist/assets/icons/Clock.js +0 -21
- package/dist/assets/icons/Close.js +0 -21
- package/dist/assets/icons/DateTime.js +0 -25
- package/dist/assets/icons/Drag.js +0 -21
- package/dist/assets/icons/File.js +0 -23
- package/dist/assets/icons/Highlight.js +0 -21
- package/dist/assets/icons/HighlightOn.js +0 -30
- package/dist/assets/icons/Info.js +0 -34
- package/dist/assets/icons/Italic.js +0 -21
- package/dist/assets/icons/Link.js +0 -21
- package/dist/assets/icons/Menu.js +0 -23
- package/dist/assets/icons/NumberedList.js +0 -21
- package/dist/assets/icons/PointerHorizontal.js +0 -21
- package/dist/assets/icons/PointerVertical.js +0 -21
- package/dist/assets/icons/Send.js +0 -23
- package/dist/assets/icons/Strikethrough.js +0 -21
- package/dist/assets/icons/TextColor.js +0 -30
- package/dist/assets/icons/Today.js +0 -21
- package/dist/assets/icons/Underlined.js +0 -23
- package/dist/assets/icons/Upload.js +0 -30
- package/dist/assets/icons/View.js +0 -18
- package/dist/assets/icons/ViewOff.js +0 -18
- package/dist/assets/icons/Warningfilled.js +0 -23
- package/dist/assets/locales/en/translation.json.js +0 -14
- package/dist/assets/locales/sl/translation.json.js +0 -14
- package/dist/components/Menu/Menu.js +0 -14
- package/dist/components/Menu/MenuDesktop.js +0 -68
- package/dist/components/Menu/MenuItem.js +0 -33
- package/dist/components/Menu/MenuMobile.js +0 -78
- package/dist/components/Menu/MenuPopover.js +0 -38
- package/dist/components/buttons/Button/Button.js +0 -68
- package/dist/components/buttons/Button/button.cva.js +0 -672
- package/dist/components/buttons/IconButton/IconButton.js +0 -17
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -18
- package/dist/components/buttons/PillButton/PillButton.js +0 -44
- package/dist/components/buttons/PillButton/pillButton.cva.js +0 -86
- package/dist/components/buttons/SplitButton/SplitButton.js +0 -62
- package/dist/components/buttons/TextButton/TextButton.js +0 -18
- package/dist/components/buttons/ToggleButton/ToggleButton.js +0 -21
- package/dist/components/buttons/shared/ButtonContent.js +0 -53
- package/dist/components/buttons/shared/buttonContent.cva.js +0 -16
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -81
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +0 -49
- package/dist/components/inputs/Checkbox/checkbox.cva.js +0 -47
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +0 -234
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +0 -668
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +0 -248
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +0 -224
- package/dist/components/inputs/DateTime/shared/Calendar.js +0 -85
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +0 -160
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +0 -67
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +0 -89
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +0 -203
- package/dist/components/inputs/DateTime/shared/DateField.js +0 -62
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -163
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +0 -54
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +0 -76
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +0 -41
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +0 -82
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +0 -131
- package/dist/components/inputs/DateTime/shared/TimeField.js +0 -26
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +0 -186
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +0 -107
- package/dist/components/inputs/DateTime/shared/YearPicker.js +0 -89
- package/dist/components/inputs/File/FileUpload.js +0 -254
- package/dist/components/inputs/File/FileUploadContainer.js +0 -17
- package/dist/components/inputs/File/InputUpload.js +0 -176
- package/dist/components/inputs/File/shared/FileCard.js +0 -67
- package/dist/components/inputs/File/shared/FileCardList.js +0 -20
- package/dist/components/inputs/File/shared/FileProgressBar.js +0 -32
- package/dist/components/inputs/File/shared/FileUploadContent.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +0 -92
- package/dist/components/inputs/File/shared/FileUploadContentError.js +0 -167
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +0 -176
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +0 -128
- package/dist/components/inputs/File/shared/InputUploadContent.js +0 -68
- package/dist/components/inputs/File/shared/InputUploadFilled.js +0 -31
- package/dist/components/inputs/File/shared/fileUpload.cva.js +0 -57
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +0 -48
- package/dist/components/inputs/FormField/FormField.js +0 -54
- package/dist/components/inputs/FormField/FormFieldError.js +0 -16
- package/dist/components/inputs/FormField/FormFieldHeader.js +0 -57
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +0 -20
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -11
- package/dist/components/inputs/FormField/FormFieldLabel.js +0 -31
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -157
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -26
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -149
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -147
- package/dist/components/inputs/Input/shared/InputContent.js +0 -106
- package/dist/components/inputs/Inputs/Form.js +0 -68
- package/dist/components/inputs/Inputs/InputItem.js +0 -63
- package/dist/components/inputs/Inputs/Inputs.js +0 -32
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -113
- package/dist/components/inputs/RadioGroup/radio.cva.js +0 -47
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +0 -39
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -25
- package/dist/components/inputs/Selection/Select/Select.js +0 -32
- package/dist/components/inputs/Selection/shared/SelectBase.js +0 -24
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +0 -211
- package/dist/components/inputs/Selection/shared/SelectInput.js +0 -237
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBox.js +0 -97
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +0 -78
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +0 -45
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +0 -47
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +0 -42
- package/dist/components/inputs/Selection/shared/SelectMobile.js +0 -161
- package/dist/components/inputs/Selection/shared/select.context.js +0 -243
- package/dist/components/inputs/Selection/shared/useSelectItems.js +0 -94
- package/dist/components/inputs/Slider/Slider.js +0 -137
- package/dist/components/inputs/TextEditor/TextEditor.js +0 -223
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +0 -34
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +0 -80
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +0 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +0 -56
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +0 -33
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +0 -31
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +0 -37
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +0 -51
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +0 -73
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +0 -61
- package/dist/components/inputs/TextEditor/textEditor.types.js +0 -40
- package/dist/components/inputs/Toggle/Toggle.js +0 -65
- package/dist/components/inputs/Toggle/toggle.cva.js +0 -44
- package/dist/components/inputs/shared/CheckContent.js +0 -22
- package/dist/components/inputs/shared/InputClear.d.ts +0 -6
- package/dist/components/inputs/shared/InputClear.js +0 -26
- package/dist/components/inputs/shared/input.cva.js +0 -167
- package/dist/components/inputs/shared/label.cva.js +0 -133
- package/dist/components/outline.clsx.js +0 -11
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -80
- package/dist/components/overlays/BottomSheet/BottomSheet.js +0 -256
- package/dist/components/overlays/Drawer/Drawer.js +0 -84
- package/dist/components/overlays/Modal/Modal.js +0 -53
- package/dist/components/overlays/Modal/modal.cva.js +0 -53
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -71
- package/dist/components/overlays/Tooltip/Tooltip.js +0 -44
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +0 -27
- package/dist/components/segment/Segment.js +0 -113
- package/dist/components/segment/SegmentItem.js +0 -41
- package/dist/components/shared/pagination/Pagination.js +0 -75
- package/dist/components/shared/pagination/PaginationList.js +0 -145
- package/dist/components/shared/pagination/minWidth.cva.js +0 -15
- package/dist/components/status/Alert/Alert.js +0 -41
- package/dist/components/status/Alert/alert.cva.js +0 -64
- package/dist/components/status/Loader/Loader.js +0 -37
- package/dist/components/status/Loader/loader.cva.js +0 -27
- package/dist/components/status/Toast/Toast.js +0 -64
- package/dist/components/status/Toast/toast.cva.js +0 -150
- package/dist/components/status/Toast/useToast.js +0 -83
- package/dist/components/status/shared/status.cva.js +0 -62
- package/dist/components/table/CellText.js +0 -18
- package/dist/components/table/ColumnConfig.js +0 -124
- package/dist/components/table/HeaderText.js +0 -15
- package/dist/components/table/InfiniteTable.js +0 -40
- package/dist/components/table/PaginatedTable.js +0 -33
- package/dist/components/table/Table.js +0 -352
- package/dist/components/table/table.cva.js +0 -37
- package/dist/components/text/Link/Link.js +0 -18
- package/dist/components/text/Link/link.cva.js +0 -18
- package/dist/components/text/Tag/Tag.js +0 -49
- package/dist/components/text/Tag/tag.cva.js +0 -59
- package/dist/components/text/Typography/Typography.js +0 -22
- package/dist/components/text/Typography/typography.cva.js +0 -100
- package/dist/config/confirmation.context.js +0 -107
- package/dist/config/i18n.js +0 -15
- package/dist/config/router.context.js +0 -43
- package/dist/config/uiConfig.context.js +0 -62
- package/dist/config/uiStyle.context.js +0 -16
- package/dist/helpers/dynamicColumns.js +0 -359
- package/dist/helpers/dynamicInputs.js +0 -214
- package/dist/hooks/useAutosave.js +0 -80
- package/dist/hooks/useBreakpoint.js +0 -20
- package/dist/hooks/useDebounceCallback.js +0 -29
- package/dist/hooks/useDeepCompare.js +0 -25
- package/dist/hooks/useFilters.js +0 -120
- package/dist/hooks/useForm.js +0 -22
- package/dist/hooks/useFormAutosave.js +0 -67
- package/dist/hooks/useIntersectionObserver.js +0 -27
- package/dist/hooks/useLocalStorage.js +0 -63
- package/dist/hooks/useLongPressRepeat.js +0 -33
- package/dist/hooks/usePagination.js +0 -35
- package/dist/hooks/useScrollableListBox.js +0 -30
- package/dist/hooks/useSingletonMutation.d.ts +0 -4
- package/dist/hooks/useSingletonMutation.js +0 -27
- package/dist/hooks/useSorting.js +0 -30
- package/dist/hooks/useStateAndRef.js +0 -17
- package/dist/hooks/useTableColumnConfig.js +0 -59
- package/dist/hooks/useTableNav.js +0 -409
- package/dist/hooks/useTranslationMemo.js +0 -14
- package/dist/index.js +0 -280
- package/dist/utils/array.utils.js +0 -12
- package/dist/utils/compoundMapper.js +0 -14
- package/dist/utils/date-time.utils.js +0 -77
- package/dist/utils/date.utils.js +0 -12
- package/dist/utils/dom.utils.js +0 -13
- package/dist/utils/file.utils.js +0 -63
- package/dist/utils/isEqual.js +0 -94
- package/dist/utils/logger.js +0 -19
- package/dist/utils/object.utils.js +0 -53
- package/dist/utils/queries.utils.js +0 -9
- package/dist/utils/rest/interceptors/logging.interceptor.d.ts +0 -2
- package/dist/utils/rest/interceptors/logging.interceptor.js +0 -17
- package/dist/utils/rest/interceptors/response.interceptor.d.ts +0 -2
- package/dist/utils/rest/interceptors/response.interceptor.js +0 -25
- package/dist/utils/rest/interceptors/rest-interceptor.js +0 -21
- package/dist/utils/rest/rest-client.js +0 -62
- package/dist/utils/rest/rest.utils.js +0 -51
- package/dist/utils/routing.utils.js +0 -15
- package/dist/utils/string.utils.js +0 -12
- package/dist/utils/vendor/error-handling.js +0 -119
- package/dist/utils/zod.utils.js +0 -25
- /package/{dist → src}/assets/icons/AlignCenter.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignLeftRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/AlignRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowDropDown.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowDropUp.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ArrowRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/Bold.d.ts +0 -0
- /package/{dist → src}/assets/icons/BulletedList.d.ts +0 -0
- /package/{dist → src}/assets/icons/Calendar.d.ts +0 -0
- /package/{dist → src}/assets/icons/Check.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckCircle.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckboxCheckmark.d.ts +0 -0
- /package/{dist → src}/assets/icons/CheckboxIndeterminate.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronDown.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronUp.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronsLeft.d.ts +0 -0
- /package/{dist → src}/assets/icons/ChevronsRight.d.ts +0 -0
- /package/{dist → src}/assets/icons/Clock.d.ts +0 -0
- /package/{dist → src}/assets/icons/Close.d.ts +0 -0
- /package/{dist → src}/assets/icons/DateTime.d.ts +0 -0
- /package/{dist → src}/assets/icons/Drag.d.ts +0 -0
- /package/{dist → src}/assets/icons/File.d.ts +0 -0
- /package/{dist → src}/assets/icons/Highlight.d.ts +0 -0
- /package/{dist → src}/assets/icons/HighlightOn.d.ts +0 -0
- /package/{dist → src}/assets/icons/Info.d.ts +0 -0
- /package/{dist → src}/assets/icons/Italic.d.ts +0 -0
- /package/{dist → src}/assets/icons/Link.d.ts +0 -0
- /package/{dist → src}/assets/icons/Menu.d.ts +0 -0
- /package/{dist → src}/assets/icons/NumberedList.d.ts +0 -0
- /package/{dist → src}/assets/icons/PointerHorizontal.d.ts +0 -0
- /package/{dist → src}/assets/icons/PointerVertical.d.ts +0 -0
- /package/{dist → src}/assets/icons/Send.d.ts +0 -0
- /package/{dist → src}/assets/icons/Strikethrough.d.ts +0 -0
- /package/{dist → src}/assets/icons/TextColor.d.ts +0 -0
- /package/{dist → src}/assets/icons/Today.d.ts +0 -0
- /package/{dist → src}/assets/icons/Underlined.d.ts +0 -0
- /package/{dist → src}/assets/icons/Upload.d.ts +0 -0
- /package/{dist → src}/assets/icons/View.d.ts +0 -0
- /package/{dist → src}/assets/icons/ViewOff.d.ts +0 -0
- /package/{dist/assets/icons/Warningfilled.d.ts → src/assets/icons/WarningFilled.d.ts} +0 -0
- /package/{dist → src}/components/Menu/Menu.d.ts +0 -0
- /package/{dist → src}/components/buttons/shared/buttonContent.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/Calendar.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateField.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/TimeField.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -0
- /package/{dist → src}/components/inputs/DateTime/shared/YearPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/FileUpload.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/FileUploadContainer.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/InputUpload.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/index.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/FileProgressBar.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/InputUploadFilled.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/fileUpload.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/File/shared/inputUploadButton.cva.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldError.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldHeader.d.ts +0 -0
- /package/{dist → src}/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -0
- /package/{dist → src}/components/inputs/Inputs/Inputs.d.ts +0 -0
- /package/{dist → src}/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -0
- /package/{dist → src}/components/inputs/TextEditor/textEditor.types.d.ts +0 -0
- /package/{dist → src}/components/inputs/shared/form.types.d.ts +0 -0
- /package/{dist → src}/components/inputs/shared/input.cva.d.ts +0 -0
- /package/{dist → src}/components/outline.clsx.d.ts +0 -0
- /package/{dist → src}/components/overlays/BottomSheet/BottomSheet.d.ts +0 -0
- /package/{dist → src}/components/overlays/Drawer/Drawer.d.ts +0 -0
- /package/{dist → src}/components/overlays/Modal/modal.cva.d.ts +0 -0
- /package/{dist → src}/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -0
- /package/{dist → src}/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -0
- /package/{dist → src}/components/segment/Segment.d.ts +0 -0
- /package/{dist → src}/components/segment/SegmentItem.d.ts +0 -0
- /package/{dist → src}/components/shared/pagination/Pagination.d.ts +0 -0
- /package/{dist → src}/components/shared/pagination/minWidth.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Alert/alert.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Loader/loader.cva.d.ts +0 -0
- /package/{dist → src}/components/status/Toast/useToast.d.ts +0 -0
- /package/{dist → src}/components/status/shared/status.cva.d.ts +0 -0
- /package/{dist → src}/components/table/CellText.d.ts +0 -0
- /package/{dist → src}/components/table/ColumnConfig.d.ts +0 -0
- /package/{dist → src}/components/table/HeaderText.d.ts +0 -0
- /package/{dist → src}/components/table/InfiniteTable.d.ts +0 -0
- /package/{dist → src}/components/table/PaginatedTable.d.ts +0 -0
- /package/{dist → src}/components/table/Table.d.ts +0 -0
- /package/{dist → src}/components/text/Link/link.cva.d.ts +0 -0
- /package/{dist → src}/components/text/Tag/tag.cva.d.ts +0 -0
- /package/{dist → src}/components/text/Typography/typography.cva.d.ts +0 -0
- /package/{dist → src}/config/i18n.d.ts +0 -0
- /package/{dist → src}/config/router.context.d.ts +0 -0
- /package/{dist → src}/helpers/dynamicColumns.d.ts +0 -0
- /package/{dist → src}/hooks/useAutosave.d.ts +0 -0
- /package/{dist → src}/hooks/useBreakpoint.d.ts +0 -0
- /package/{dist → src}/hooks/useDebounceCallback.d.ts +0 -0
- /package/{dist → src}/hooks/useDeepCompare.d.ts +0 -0
- /package/{dist → src}/hooks/useFilters.d.ts +0 -0
- /package/{dist → src}/hooks/useForm.d.ts +0 -0
- /package/{dist → src}/hooks/useIntersectionObserver.d.ts +0 -0
- /package/{dist → src}/hooks/useLocalStorage.d.ts +0 -0
- /package/{dist → src}/hooks/useLongPressRepeat.d.ts +0 -0
- /package/{dist → src}/hooks/usePagination.d.ts +0 -0
- /package/{dist → src}/hooks/useScrollableListBox.d.ts +0 -0
- /package/{dist → src}/hooks/useSorting.d.ts +0 -0
- /package/{dist → src}/hooks/useStateAndRef.d.ts +0 -0
- /package/{dist → src}/hooks/useTableColumnConfig.d.ts +0 -0
- /package/{dist → src}/hooks/useTableNav.d.ts +0 -0
- /package/{dist → src}/hooks/useTranslationMemo.d.ts +0 -0
- /package/{dist → src}/types/common.d.ts +0 -0
- /package/{dist → src}/utils/array.utils.d.ts +0 -0
- /package/{dist → src}/utils/array.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/compoundMapper.d.ts +0 -0
- /package/{dist → src}/utils/compoundMapper.spec.d.ts +0 -0
- /package/{dist → src}/utils/date-time.utils.d.ts +0 -0
- /package/{dist → src}/utils/date-time.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/date.utils.d.ts +0 -0
- /package/{dist → src}/utils/date.utils.spec.d.ts +0 -0
- /package/{dist → src}/utils/dom.utils.d.ts +0 -0
- /package/{dist → src}/utils/file.utils.d.ts +0 -0
- /package/{dist → src}/utils/isEqual.d.ts +0 -0
- /package/{dist → src}/utils/logger.d.ts +0 -0
- /package/{dist → src}/utils/object.utils.d.ts +0 -0
- /package/{dist → src}/utils/queries.utils.d.ts +0 -0
- /package/{dist/utils/rest → src/utils}/rest.utils.d.ts +0 -0
- /package/{dist → src}/utils/routing.utils.d.ts +0 -0
- /package/{dist → src}/utils/string.utils.d.ts +0 -0
- /package/{dist → src}/utils/vendor/error-handling.d.ts +0 -0
- /package/{dist/utils/rest/interceptors → src/utils/vendor}/rest-interceptor.d.ts +0 -0
- /package/{dist/styles → styles}/editor.css +0 -0
- /package/{dist/styles → styles}/index.css +0 -0
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
4
|
-
const toastContainer = cva("m-toast-gap-margin-mobile w-auto p-0 md:m-toast-gap-margin-desktop", {
|
|
5
|
-
variants: {
|
|
6
|
-
position: {
|
|
7
|
-
"bottom-right": "right-0 bottom-0",
|
|
8
|
-
"bottom-left": "bottom-0 left-0",
|
|
9
|
-
"top-right": "top-0 right-0",
|
|
10
|
-
"top-left": "top-0 left-0",
|
|
11
|
-
"bottom-center": "bottom-0",
|
|
12
|
-
"top-center": "top-0"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
const toastWrapper = clsx("m-0! min-h-0 w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
17
|
-
const toast = cva(
|
|
18
|
-
"inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row",
|
|
19
|
-
{
|
|
20
|
-
variants: {
|
|
21
|
-
variant: {
|
|
22
|
-
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
23
|
-
contained: "text-text-inverted-1"
|
|
24
|
-
},
|
|
25
|
-
color: {
|
|
26
|
-
neutral: "",
|
|
27
|
-
success: "",
|
|
28
|
-
warning: "",
|
|
29
|
-
error: ""
|
|
30
|
-
},
|
|
31
|
-
position: {
|
|
32
|
-
"bottom-right": "",
|
|
33
|
-
"bottom-left": "",
|
|
34
|
-
"bottom-center": "",
|
|
35
|
-
"top-right": "",
|
|
36
|
-
"top-left": "",
|
|
37
|
-
"top-center": ""
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
compoundVariants: [
|
|
41
|
-
{
|
|
42
|
-
position: ["bottom-right", "bottom-left", "bottom-center"],
|
|
43
|
-
className: "mt-toast-gap-margin-mobile md:mt-toast-gap-margin-desktop"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
position: ["top-right", "top-left", "top-center"],
|
|
47
|
-
className: "mb-toast-gap-margin-mobile md:mb-toast-gap-margin-desktop"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
variant: "outlined",
|
|
51
|
-
color: "neutral",
|
|
52
|
-
className: "border-elevation-outline-default-1"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
variant: "outlined",
|
|
56
|
-
color: "success",
|
|
57
|
-
className: "border-elevation-outline-success-1"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
variant: "outlined",
|
|
61
|
-
color: "warning",
|
|
62
|
-
className: "border-elevation-outline-warning-1"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
variant: "outlined",
|
|
66
|
-
color: "error",
|
|
67
|
-
className: "border-elevation-outline-error-1"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
variant: "contained",
|
|
71
|
-
color: "neutral",
|
|
72
|
-
className: "bg-elevation-fill-inverted-1"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
variant: "contained",
|
|
76
|
-
color: "success",
|
|
77
|
-
className: "bg-elevation-fill-success-1"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
variant: "contained",
|
|
81
|
-
color: "warning",
|
|
82
|
-
className: "bg-elevation-fill-warning-1"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
variant: "contained",
|
|
86
|
-
color: "error",
|
|
87
|
-
className: "bg-elevation-fill-error-1"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
defaultVariants: {
|
|
91
|
-
variant: "outlined",
|
|
92
|
-
color: "neutral"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
const buttonColorVariant = compoundMapper({
|
|
97
|
-
compoundVariants: [
|
|
98
|
-
{
|
|
99
|
-
variant: "outlined",
|
|
100
|
-
color: "neutral",
|
|
101
|
-
value: { color: "secondary" }
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
variant: "outlined",
|
|
105
|
-
color: "success",
|
|
106
|
-
value: { color: "success" }
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
variant: "outlined",
|
|
110
|
-
color: "warning",
|
|
111
|
-
value: { color: "warning" }
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
variant: "outlined",
|
|
115
|
-
color: "error",
|
|
116
|
-
value: { color: "error" }
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
variant: "contained",
|
|
120
|
-
color: "neutral",
|
|
121
|
-
value: { color: "primary", inverted: true }
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
variant: "contained",
|
|
125
|
-
color: "success",
|
|
126
|
-
value: { color: "success", inverted: true }
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
variant: "contained",
|
|
130
|
-
color: "warning",
|
|
131
|
-
value: { color: "warning", inverted: true }
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
variant: "contained",
|
|
135
|
-
color: "error",
|
|
136
|
-
value: { color: "error", inverted: true }
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
defaultVariants: {
|
|
140
|
-
variant: "outlined",
|
|
141
|
-
color: "neutral"
|
|
142
|
-
},
|
|
143
|
-
default: { color: "secondary" }
|
|
144
|
-
});
|
|
145
|
-
export {
|
|
146
|
-
buttonColorVariant,
|
|
147
|
-
toast,
|
|
148
|
-
toastContainer,
|
|
149
|
-
toastWrapper
|
|
150
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { toast } from "react-toastify";
|
|
4
|
-
import { Toast } from "./Toast.js";
|
|
5
|
-
const useToast = () => {
|
|
6
|
-
const successToast = useCallback((params) => {
|
|
7
|
-
toast.success(
|
|
8
|
-
/* @__PURE__ */ jsx(
|
|
9
|
-
Toast,
|
|
10
|
-
{
|
|
11
|
-
color: "success",
|
|
12
|
-
...params
|
|
13
|
-
}
|
|
14
|
-
),
|
|
15
|
-
{
|
|
16
|
-
position: params.position,
|
|
17
|
-
data: {
|
|
18
|
-
variant: params.variant
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
}, []);
|
|
23
|
-
const errorToast = useCallback((params) => {
|
|
24
|
-
toast.error(
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
Toast,
|
|
27
|
-
{
|
|
28
|
-
color: "error",
|
|
29
|
-
...params
|
|
30
|
-
}
|
|
31
|
-
),
|
|
32
|
-
{
|
|
33
|
-
position: params.position,
|
|
34
|
-
data: {
|
|
35
|
-
variant: params.variant
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}, []);
|
|
40
|
-
const warningToast = useCallback((params) => {
|
|
41
|
-
toast.warning(
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
43
|
-
Toast,
|
|
44
|
-
{
|
|
45
|
-
color: "warning",
|
|
46
|
-
...params
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
{
|
|
50
|
-
position: params.position,
|
|
51
|
-
data: {
|
|
52
|
-
variant: params.variant
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
}, []);
|
|
57
|
-
const neutralToast = useCallback((params) => {
|
|
58
|
-
toast.info(
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
60
|
-
Toast,
|
|
61
|
-
{
|
|
62
|
-
color: "neutral",
|
|
63
|
-
...params
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
{
|
|
67
|
-
position: params.position,
|
|
68
|
-
data: {
|
|
69
|
-
variant: params.variant
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}, []);
|
|
74
|
-
return {
|
|
75
|
-
successToast,
|
|
76
|
-
errorToast,
|
|
77
|
-
warningToast,
|
|
78
|
-
neutralToast
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
useToast
|
|
83
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const statusIcon = cva("size-6 shrink-0", {
|
|
3
|
-
variants: {
|
|
4
|
-
variant: {
|
|
5
|
-
outlined: "",
|
|
6
|
-
contained: "text-text-inverted-1"
|
|
7
|
-
},
|
|
8
|
-
color: {
|
|
9
|
-
neutral: "",
|
|
10
|
-
success: "",
|
|
11
|
-
warning: "",
|
|
12
|
-
error: ""
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
compoundVariants: [
|
|
16
|
-
{
|
|
17
|
-
variant: "outlined",
|
|
18
|
-
color: "neutral",
|
|
19
|
-
class: "text-text-default-2"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
variant: "outlined",
|
|
23
|
-
color: "success",
|
|
24
|
-
class: "text-text-success-1"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
variant: "outlined",
|
|
28
|
-
color: "warning",
|
|
29
|
-
class: "text-text-warning-1"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
variant: "outlined",
|
|
33
|
-
color: "error",
|
|
34
|
-
class: "text-text-error-1"
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
variant: "outlined",
|
|
39
|
-
color: "neutral"
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const statusSeparator = cva("h-px shrink-0 self-stretch md:h-auto md:w-px", {
|
|
43
|
-
variants: {
|
|
44
|
-
variant: {
|
|
45
|
-
outlined: "",
|
|
46
|
-
contained: "hidden"
|
|
47
|
-
},
|
|
48
|
-
color: {
|
|
49
|
-
neutral: "bg-elevation-outline-default-1",
|
|
50
|
-
success: "bg-elevation-outline-success-1",
|
|
51
|
-
warning: "bg-elevation-outline-warning-1",
|
|
52
|
-
error: "bg-elevation-outline-error-1"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
defaultVariants: {
|
|
56
|
-
color: "neutral"
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
statusIcon,
|
|
61
|
-
statusSeparator
|
|
62
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { Typography } from "../text/Typography/Typography.js";
|
|
4
|
-
const CellText = ({ children, style, className }) => /* @__PURE__ */ jsx(
|
|
5
|
-
Typography,
|
|
6
|
-
{
|
|
7
|
-
variant: "default",
|
|
8
|
-
size: "label-2",
|
|
9
|
-
as: "span",
|
|
10
|
-
className: clsx("overflow-hidden text-ellipsis text-text-default-2", className),
|
|
11
|
-
style,
|
|
12
|
-
"data-rac": true,
|
|
13
|
-
children
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
export {
|
|
17
|
-
CellText
|
|
18
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect, useCallback } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { Checkbox } from "../inputs/Checkbox/Checkbox.js";
|
|
5
|
-
import { Modal } from "../overlays/Modal/Modal.js";
|
|
6
|
-
import { Table } from "./Table.js";
|
|
7
|
-
import { Typography } from "../text/Typography/Typography.js";
|
|
8
|
-
import { ns } from "../../config/i18n.js";
|
|
9
|
-
import { useTranslationMemo } from "../../hooks/useTranslationMemo.js";
|
|
10
|
-
const VisibilityCell = ({ original, onToggle }) => /* @__PURE__ */ jsx(
|
|
11
|
-
Checkbox,
|
|
12
|
-
{
|
|
13
|
-
isSelected: original.visible,
|
|
14
|
-
onChange: () => onToggle(original.id),
|
|
15
|
-
hideLabel: true,
|
|
16
|
-
children: original.label
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
const getColumns = (t, handleToggleVisibility) => [
|
|
20
|
-
{
|
|
21
|
-
id: "name",
|
|
22
|
-
header: t(($) => $.ui.table.column, { ns }),
|
|
23
|
-
meta: {
|
|
24
|
-
width: "flex-1"
|
|
25
|
-
},
|
|
26
|
-
accessorKey: "label"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: "visible",
|
|
30
|
-
header: t(($) => $.ui.table.show, { ns }),
|
|
31
|
-
meta: {
|
|
32
|
-
width: "w-20"
|
|
33
|
-
},
|
|
34
|
-
cell: ({ original }) => /* @__PURE__ */ jsx(
|
|
35
|
-
VisibilityCell,
|
|
36
|
-
{
|
|
37
|
-
original,
|
|
38
|
-
onToggle: handleToggleVisibility
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
];
|
|
43
|
-
function ColumnConfigModal({
|
|
44
|
-
isOpen,
|
|
45
|
-
onClose,
|
|
46
|
-
configColumns,
|
|
47
|
-
visibleColumns,
|
|
48
|
-
onVisibilityChange,
|
|
49
|
-
onOrderChange
|
|
50
|
-
}) {
|
|
51
|
-
const { t } = useTranslation(ns);
|
|
52
|
-
const [data, setData] = useState([]);
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
setData(
|
|
55
|
-
configColumns.map((column) => {
|
|
56
|
-
const columnId = column.id ?? column.accessorKey;
|
|
57
|
-
return {
|
|
58
|
-
id: columnId,
|
|
59
|
-
label: column.header,
|
|
60
|
-
visible: visibleColumns?.[columnId] ?? true
|
|
61
|
-
};
|
|
62
|
-
})
|
|
63
|
-
);
|
|
64
|
-
}, [configColumns, visibleColumns]);
|
|
65
|
-
const handleToggleVisibility = useCallback(
|
|
66
|
-
(columnId) => {
|
|
67
|
-
const newVisible = {
|
|
68
|
-
...visibleColumns,
|
|
69
|
-
[columnId]: !visibleColumns[columnId]
|
|
70
|
-
};
|
|
71
|
-
onVisibilityChange(newVisible);
|
|
72
|
-
},
|
|
73
|
-
[visibleColumns, onVisibilityChange]
|
|
74
|
-
);
|
|
75
|
-
const getColumnsWithTranslation = useCallback(
|
|
76
|
-
(translateFn) => getColumns(translateFn, handleToggleVisibility),
|
|
77
|
-
[handleToggleVisibility]
|
|
78
|
-
);
|
|
79
|
-
const columns = useTranslationMemo(getColumnsWithTranslation);
|
|
80
|
-
const handleReorder = useCallback(
|
|
81
|
-
(reorderedItems) => {
|
|
82
|
-
setData(reorderedItems);
|
|
83
|
-
onOrderChange(reorderedItems.map((item) => item.id));
|
|
84
|
-
},
|
|
85
|
-
[onOrderChange]
|
|
86
|
-
);
|
|
87
|
-
if (!isOpen) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
Modal,
|
|
92
|
-
{
|
|
93
|
-
isOpen,
|
|
94
|
-
onClose,
|
|
95
|
-
showCloseIcon: true,
|
|
96
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 p-4", children: [
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
Typography,
|
|
99
|
-
{
|
|
100
|
-
as: "h2",
|
|
101
|
-
variant: "prominent-1",
|
|
102
|
-
size: "title-5",
|
|
103
|
-
children: t(($) => $.ui.table.configureColumns)
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-96 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
107
|
-
Table,
|
|
108
|
-
{
|
|
109
|
-
items: data,
|
|
110
|
-
columns,
|
|
111
|
-
showCellBorder: true,
|
|
112
|
-
className: "w-full",
|
|
113
|
-
enableDragDrop: true,
|
|
114
|
-
getRowId: (row) => row.id,
|
|
115
|
-
onReorder: handleReorder
|
|
116
|
-
}
|
|
117
|
-
) })
|
|
118
|
-
] })
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
export {
|
|
123
|
-
ColumnConfigModal
|
|
124
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Typography } from "../text/Typography/Typography.js";
|
|
3
|
-
const HeaderText = ({ children }) => /* @__PURE__ */ jsx(
|
|
4
|
-
Typography,
|
|
5
|
-
{
|
|
6
|
-
variant: "default",
|
|
7
|
-
size: "label-2",
|
|
8
|
-
as: "span",
|
|
9
|
-
className: "overflow-hidden text-ellipsis text-text-default-1",
|
|
10
|
-
children
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
export {
|
|
14
|
-
HeaderText
|
|
15
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback } from "react";
|
|
3
|
-
import { Loader } from "../status/Loader/Loader.js";
|
|
4
|
-
import { useIntersectionObserver } from "../../hooks/useIntersectionObserver.js";
|
|
5
|
-
import { Table } from "./Table.js";
|
|
6
|
-
const InfiniteTable = ({
|
|
7
|
-
hasNextPage,
|
|
8
|
-
isFetchingNextPage = false,
|
|
9
|
-
fetchNextPage,
|
|
10
|
-
...rest
|
|
11
|
-
}) => {
|
|
12
|
-
const handleLoadMore = useCallback(() => {
|
|
13
|
-
if (!isFetchingNextPage && hasNextPage) {
|
|
14
|
-
fetchNextPage();
|
|
15
|
-
}
|
|
16
|
-
}, [isFetchingNextPage, hasNextPage, fetchNextPage]);
|
|
17
|
-
const { setRef } = useIntersectionObserver({
|
|
18
|
-
onIntersection: handleLoadMore,
|
|
19
|
-
rootMargin: "100px"
|
|
20
|
-
});
|
|
21
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
22
|
-
/* @__PURE__ */ jsx(Table, { ...rest }),
|
|
23
|
-
(hasNextPage || isFetchingNextPage) && /* @__PURE__ */ jsx(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
ref: (ref) => {
|
|
27
|
-
setRef(ref);
|
|
28
|
-
return () => {
|
|
29
|
-
setRef(null);
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
className: "flex justify-center py-4",
|
|
33
|
-
children: /* @__PURE__ */ jsx(Loader, {})
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
] });
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
InfiniteTable
|
|
40
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Pagination } from "../shared/pagination/Pagination.js";
|
|
3
|
-
import { Table } from "./Table.js";
|
|
4
|
-
const PaginatedTable = ({
|
|
5
|
-
pagination,
|
|
6
|
-
setPagination,
|
|
7
|
-
items,
|
|
8
|
-
totalItems,
|
|
9
|
-
...rest
|
|
10
|
-
}) => {
|
|
11
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
12
|
-
/* @__PURE__ */ jsx(
|
|
13
|
-
Table,
|
|
14
|
-
{
|
|
15
|
-
...rest,
|
|
16
|
-
items: items ?? []
|
|
17
|
-
}
|
|
18
|
-
),
|
|
19
|
-
/* @__PURE__ */ jsx(
|
|
20
|
-
Pagination,
|
|
21
|
-
{
|
|
22
|
-
page: pagination.pageIndex,
|
|
23
|
-
pageSize: pagination.pageSize,
|
|
24
|
-
totalItems: totalItems ?? 0,
|
|
25
|
-
onPageChange: (page) => setPagination({ ...pagination, pageIndex: page }),
|
|
26
|
-
onPageSizeChange: (pageSize) => setPagination({ ...pagination, pageSize, pageIndex: 1 })
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
] });
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
PaginatedTable
|
|
33
|
-
};
|