@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,113 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
import { useRef, Fragment } from "react";
|
|
5
|
-
import { useToggleButtonGroup } from "react-aria";
|
|
6
|
-
import { ToggleButtonGroup } from "react-aria-components";
|
|
7
|
-
import { Controller } from "react-hook-form";
|
|
8
|
-
import { useToggleGroupState } from "react-stately";
|
|
9
|
-
import { FormField } from "../inputs/FormField/FormField.js";
|
|
10
|
-
import { SegmentItem } from "./SegmentItem.js";
|
|
11
|
-
const SegmentBase = ({
|
|
12
|
-
className,
|
|
13
|
-
items,
|
|
14
|
-
error,
|
|
15
|
-
onChange,
|
|
16
|
-
value,
|
|
17
|
-
defaultValue,
|
|
18
|
-
...rest
|
|
19
|
-
}) => {
|
|
20
|
-
const props = {
|
|
21
|
-
...rest,
|
|
22
|
-
defaultSelectedKeys: defaultValue ? Array.isArray(defaultValue) ? defaultValue : [defaultValue] : void 0,
|
|
23
|
-
selectedKeys: value ? Array.isArray(value) ? value : [value] : void 0
|
|
24
|
-
};
|
|
25
|
-
const buttonGroupRef = useRef(null);
|
|
26
|
-
const state = useToggleGroupState(props);
|
|
27
|
-
const { groupProps } = useToggleButtonGroup(props, state, buttonGroupRef);
|
|
28
|
-
const formFieldProps = {
|
|
29
|
-
error,
|
|
30
|
-
label: "",
|
|
31
|
-
hideLabel: true,
|
|
32
|
-
isDisabled: props.isDisabled
|
|
33
|
-
};
|
|
34
|
-
const onSelectionChange = (keys) => {
|
|
35
|
-
if (props.selectionMode === "multiple") {
|
|
36
|
-
onChange?.(Array.from(keys.values()));
|
|
37
|
-
} else {
|
|
38
|
-
onChange?.(Array.from(keys.values())[0]);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
-
FormField,
|
|
43
|
-
{
|
|
44
|
-
...formFieldProps,
|
|
45
|
-
className: clsx("relative w-full", className),
|
|
46
|
-
children: /* @__PURE__ */ jsx(
|
|
47
|
-
ToggleButtonGroup,
|
|
48
|
-
{
|
|
49
|
-
...props,
|
|
50
|
-
...groupProps,
|
|
51
|
-
ref: buttonGroupRef,
|
|
52
|
-
onSelectionChange,
|
|
53
|
-
className: clsx(
|
|
54
|
-
"group/segment flex w-fit items-center gap-segmented-control-side-segmented-control p-segmented-control-side-segmented-control",
|
|
55
|
-
"bg-elevation-fill-default-3",
|
|
56
|
-
"rounded-segmented-control-rounding-segmented-control",
|
|
57
|
-
className
|
|
58
|
-
),
|
|
59
|
-
children: items.map((item, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
SegmentItem,
|
|
62
|
-
{
|
|
63
|
-
...item,
|
|
64
|
-
isDisabled: item.isDisabled || props.isDisabled,
|
|
65
|
-
isSelected: state.selectedKeys.has(item.id),
|
|
66
|
-
onPress: () => {
|
|
67
|
-
state.toggleKey(item.id);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
index !== items.length - 1 && items.length > 2 && /* @__PURE__ */ jsx(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
className: clsx(
|
|
75
|
-
"h-5 w-px rounded-2xl",
|
|
76
|
-
!state.selectedKeys.has(item.id) && !state.selectedKeys.has(items[index + 1].id) && "bg-elevation-outline-default-1"
|
|
77
|
-
),
|
|
78
|
-
children: /* @__PURE__ */ jsx("span", { className: "flex h-full w-px" })
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
] }, item.id))
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
const Segment = (props) => {
|
|
88
|
-
if ("formControl" in props && props.formControl) {
|
|
89
|
-
const { formControl, ref, ...innerProps } = props;
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
Controller,
|
|
92
|
-
{
|
|
93
|
-
control: formControl.control,
|
|
94
|
-
name: formControl.name,
|
|
95
|
-
render: ({ field, fieldState: { error } }) => /* @__PURE__ */ jsx(
|
|
96
|
-
SegmentBase,
|
|
97
|
-
{
|
|
98
|
-
...innerProps,
|
|
99
|
-
ref: mergeRefs(ref, field.ref),
|
|
100
|
-
value: field.value,
|
|
101
|
-
onChange: field.onChange,
|
|
102
|
-
isDisabled: field.disabled || props.isDisabled,
|
|
103
|
-
error: props.error ?? error?.message
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return /* @__PURE__ */ jsx(SegmentBase, { ...props });
|
|
110
|
-
};
|
|
111
|
-
export {
|
|
112
|
-
Segment
|
|
113
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { ToggleButton } from "react-aria-components";
|
|
4
|
-
import { Typography } from "../text/Typography/Typography.js";
|
|
5
|
-
const SegmentItem = ({ label, icon, id, isDisabled, ...props }) => {
|
|
6
|
-
const IconComponent = icon;
|
|
7
|
-
return /* @__PURE__ */ jsxs(
|
|
8
|
-
ToggleButton,
|
|
9
|
-
{
|
|
10
|
-
...props,
|
|
11
|
-
id,
|
|
12
|
-
className: clsx(
|
|
13
|
-
"flex items-center justify-center gap-1 transition-all duration-200",
|
|
14
|
-
"px-segmented-control-side-segment py-segmented-control-height-segment",
|
|
15
|
-
"rounded-segmented-control-rounding-segment",
|
|
16
|
-
"hover:bg-interactive-subtle-secondary-hover",
|
|
17
|
-
"pressed:bg-interactive-subtle-secondary-pressed",
|
|
18
|
-
"selected:text-interactive-subtle-secondary-on-toggled-idle text-interactive-subtle-secondary-on-idle hover:text-interactive-subtle-secondary-on-hover",
|
|
19
|
-
"disabled:selected:text-interactive-subtle-secondary-on-toggled-disabled disabled:text-interactive-subtle-secondary-on-disabled",
|
|
20
|
-
"selected:bg-interactive-subtle-secondary-toggled-idle disabled:selected:bg-interactive-subtle-secondary-toggled-disabled"
|
|
21
|
-
),
|
|
22
|
-
isDisabled,
|
|
23
|
-
children: [
|
|
24
|
-
icon && /* @__PURE__ */ jsx(IconComponent, { className: "size-6" }),
|
|
25
|
-
label && /* @__PURE__ */ jsx(
|
|
26
|
-
Typography,
|
|
27
|
-
{
|
|
28
|
-
variant: props.isSelected ? "prominent-1" : "default",
|
|
29
|
-
size: "label-2",
|
|
30
|
-
as: "span",
|
|
31
|
-
className: "overflow-hidden text-ellipsis text-center",
|
|
32
|
-
children: label
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
SegmentItem
|
|
41
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
|
|
5
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
6
|
-
import { ns } from "../../../config/i18n.js";
|
|
7
|
-
import { PaginationList } from "./PaginationList.js";
|
|
8
|
-
const Pagination = ({
|
|
9
|
-
size = "s",
|
|
10
|
-
variant = "subtle",
|
|
11
|
-
color = "secondary",
|
|
12
|
-
page,
|
|
13
|
-
totalItems,
|
|
14
|
-
totalPages,
|
|
15
|
-
pageSize,
|
|
16
|
-
hideText = true,
|
|
17
|
-
hideFirstLast = true,
|
|
18
|
-
hidePrevNext = false,
|
|
19
|
-
hideNumbers = false,
|
|
20
|
-
className,
|
|
21
|
-
onPageChange,
|
|
22
|
-
onPageSizeChange
|
|
23
|
-
}) => {
|
|
24
|
-
const { t } = useTranslation(ns);
|
|
25
|
-
return /* @__PURE__ */ jsxs(
|
|
26
|
-
"nav",
|
|
27
|
-
{
|
|
28
|
-
id: "pagination",
|
|
29
|
-
className: clsx("flex items-center gap-2", className),
|
|
30
|
-
children: [
|
|
31
|
-
totalItems > pageSize && /* @__PURE__ */ jsx(
|
|
32
|
-
PaginationList,
|
|
33
|
-
{
|
|
34
|
-
page,
|
|
35
|
-
size,
|
|
36
|
-
color,
|
|
37
|
-
variant,
|
|
38
|
-
hideText,
|
|
39
|
-
hideFirstLast,
|
|
40
|
-
hidePrevNext,
|
|
41
|
-
hideNumbers,
|
|
42
|
-
totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
|
|
43
|
-
onPageChange
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
48
|
-
Typography,
|
|
49
|
-
{
|
|
50
|
-
variant: "default",
|
|
51
|
-
size: "label-2",
|
|
52
|
-
as: "span",
|
|
53
|
-
className: "whitespace-nowrap text-text-default-1",
|
|
54
|
-
children: t(($) => $.ui.pagination.resultsPerPage)
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
NumberInput,
|
|
59
|
-
{
|
|
60
|
-
value: pageSize,
|
|
61
|
-
onChange: (value) => onPageSizeChange?.(Number(value)),
|
|
62
|
-
label: t(($) => $.ui.pagination.resultsPerPage),
|
|
63
|
-
hideLabel: true,
|
|
64
|
-
className: "w-min",
|
|
65
|
-
inputClassName: "min-w-12 !px-3 !py-0-5"
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] })
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
Pagination
|
|
75
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { ChevronLeftIcon } from "../../../assets/icons/ChevronLeft.js";
|
|
6
|
-
import { ChevronRightIcon } from "../../../assets/icons/ChevronRight.js";
|
|
7
|
-
import { ChevronsLeftIcon } from "../../../assets/icons/ChevronsLeft.js";
|
|
8
|
-
import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
|
|
9
|
-
import { Button } from "../../buttons/Button/Button.js";
|
|
10
|
-
import { ns } from "../../../config/i18n.js";
|
|
11
|
-
import { minWidth } from "./minWidth.cva.js";
|
|
12
|
-
const PaginationList = ({
|
|
13
|
-
page,
|
|
14
|
-
totalPages,
|
|
15
|
-
size,
|
|
16
|
-
color,
|
|
17
|
-
variant,
|
|
18
|
-
hideText,
|
|
19
|
-
hideFirstLast,
|
|
20
|
-
hidePrevNext,
|
|
21
|
-
hideNumbers,
|
|
22
|
-
className,
|
|
23
|
-
onPageChange
|
|
24
|
-
}) => {
|
|
25
|
-
const { t } = useTranslation(ns);
|
|
26
|
-
const isPrevDisabled = page <= 1;
|
|
27
|
-
const isNextDisabled = page >= totalPages;
|
|
28
|
-
const renderPageNumbers = useMemo(() => {
|
|
29
|
-
const pagesToShow = [];
|
|
30
|
-
pagesToShow.push(1);
|
|
31
|
-
if (page > 3) {
|
|
32
|
-
pagesToShow.push("ellipsis");
|
|
33
|
-
}
|
|
34
|
-
for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i++) {
|
|
35
|
-
pagesToShow.push(i);
|
|
36
|
-
}
|
|
37
|
-
if (page < totalPages - 2) {
|
|
38
|
-
pagesToShow.push("ellipsis");
|
|
39
|
-
}
|
|
40
|
-
if (totalPages > 1 && !pagesToShow.includes(totalPages)) {
|
|
41
|
-
pagesToShow.push(totalPages);
|
|
42
|
-
}
|
|
43
|
-
return pagesToShow.map((p, index) => {
|
|
44
|
-
if (p === "ellipsis") {
|
|
45
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
-
Button,
|
|
47
|
-
{
|
|
48
|
-
variant,
|
|
49
|
-
color,
|
|
50
|
-
size,
|
|
51
|
-
width: "fill",
|
|
52
|
-
className: clsx(minWidth({ size })),
|
|
53
|
-
children: "..."
|
|
54
|
-
},
|
|
55
|
-
`ellipsis-${index}`
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
return /* @__PURE__ */ jsx(
|
|
59
|
-
Button,
|
|
60
|
-
{
|
|
61
|
-
width: "hug",
|
|
62
|
-
size,
|
|
63
|
-
variant,
|
|
64
|
-
color,
|
|
65
|
-
"data-selected": p === page ? true : void 0,
|
|
66
|
-
className: clsx(p.toString().length <= 2 && minWidth({ size })),
|
|
67
|
-
onPress: () => onPageChange?.(p),
|
|
68
|
-
children: p.toString()
|
|
69
|
-
},
|
|
70
|
-
`page-${p}`
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
}, [page, color, size, variant, totalPages, onPageChange]);
|
|
74
|
-
if (totalPages <= 1) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const onNext = () => {
|
|
78
|
-
if (!isNextDisabled) {
|
|
79
|
-
onPageChange?.(page + 1);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const onPrevious = () => {
|
|
83
|
-
if (!isPrevDisabled) {
|
|
84
|
-
onPageChange?.(page - 1);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
return /* @__PURE__ */ jsxs("nav", { className: clsx("flex items-center gap-pagination-button-to-button", className), children: [
|
|
88
|
-
!hideFirstLast && /* @__PURE__ */ jsx(
|
|
89
|
-
Button,
|
|
90
|
-
{
|
|
91
|
-
onClick: () => onPageChange?.(1),
|
|
92
|
-
isDisabled: isPrevDisabled,
|
|
93
|
-
size,
|
|
94
|
-
color,
|
|
95
|
-
variant,
|
|
96
|
-
iconOnly: hideText,
|
|
97
|
-
icon: ChevronsLeftIcon,
|
|
98
|
-
children: t(($) => $.ui.pagination.firstBtn)
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
!hidePrevNext && /* @__PURE__ */ jsx(
|
|
102
|
-
Button,
|
|
103
|
-
{
|
|
104
|
-
onClick: onPrevious,
|
|
105
|
-
isDisabled: isPrevDisabled,
|
|
106
|
-
size,
|
|
107
|
-
color,
|
|
108
|
-
variant,
|
|
109
|
-
iconOnly: hideText,
|
|
110
|
-
icon: ChevronLeftIcon,
|
|
111
|
-
children: t(($) => $.ui.pagination.backBtn)
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
!hideNumbers && renderPageNumbers,
|
|
115
|
-
!hidePrevNext && /* @__PURE__ */ jsx(
|
|
116
|
-
Button,
|
|
117
|
-
{
|
|
118
|
-
onClick: onNext,
|
|
119
|
-
isDisabled: isNextDisabled,
|
|
120
|
-
size,
|
|
121
|
-
color,
|
|
122
|
-
variant,
|
|
123
|
-
iconOnly: hideText,
|
|
124
|
-
icon: ChevronRightIcon,
|
|
125
|
-
children: t(($) => $.ui.pagination.nextBtn)
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
!hideFirstLast && /* @__PURE__ */ jsx(
|
|
129
|
-
Button,
|
|
130
|
-
{
|
|
131
|
-
onClick: () => onPageChange?.(totalPages),
|
|
132
|
-
isDisabled: isNextDisabled,
|
|
133
|
-
size,
|
|
134
|
-
color,
|
|
135
|
-
variant,
|
|
136
|
-
iconOnly: hideText,
|
|
137
|
-
icon: ChevronsRightIcon,
|
|
138
|
-
children: t(($) => $.ui.pagination.lastBtn)
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
] });
|
|
142
|
-
};
|
|
143
|
-
export {
|
|
144
|
-
PaginationList
|
|
145
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const minWidth = cva("", {
|
|
3
|
-
variants: {
|
|
4
|
-
size: {
|
|
5
|
-
xxs: ["min-w-button-width-min-width-xxs"],
|
|
6
|
-
xs: ["min-w-button-width-min-width-xs"],
|
|
7
|
-
s: ["min-w-button-width-min-width-s"],
|
|
8
|
-
m: ["min-w-button-width-min-width-m"],
|
|
9
|
-
l: ["min-w-button-width-min-width-l"]
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export {
|
|
14
|
-
minWidth
|
|
15
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { alert } from "./alert.cva.js";
|
|
3
|
-
import { Loader } from "../Loader/Loader.js";
|
|
4
|
-
import { statusIcon, statusSeparator } from "../shared/status.cva.js";
|
|
5
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
6
|
-
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
7
|
-
const Alert = ({
|
|
8
|
-
variant,
|
|
9
|
-
color,
|
|
10
|
-
text,
|
|
11
|
-
isLoading = false,
|
|
12
|
-
rightContent,
|
|
13
|
-
hasSeparator,
|
|
14
|
-
icon: Icon,
|
|
15
|
-
className
|
|
16
|
-
}) => {
|
|
17
|
-
const uiStyle = UIStyle.useConfig();
|
|
18
|
-
const alertCva = uiStyle?.alert?.cva ?? alert;
|
|
19
|
-
const iconCva = uiStyle?.status?.iconCva ?? statusIcon;
|
|
20
|
-
const separatorCva = uiStyle?.status?.separatorCva ?? statusSeparator;
|
|
21
|
-
return /* @__PURE__ */ jsx("div", { className: alertCva({ variant, color, className }), children: /* @__PURE__ */ jsxs("div", { className: "flex w-auto flex-col items-center md:flex-row", children: [
|
|
22
|
-
/* @__PURE__ */ jsxs("div", { className: "flex w-full items-start gap-alert-gap-icon-to-text px-alert-side-default py-alert-height-content", children: [
|
|
23
|
-
isLoading && /* @__PURE__ */ jsx(
|
|
24
|
-
Loader,
|
|
25
|
-
{
|
|
26
|
-
size: "default",
|
|
27
|
-
className: "shrink-0"
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({ variant, color }) }),
|
|
31
|
-
/* @__PURE__ */ jsx(Typography, { size: "label-2", children: text })
|
|
32
|
-
] }),
|
|
33
|
-
!!rightContent && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
|
-
hasSeparator && /* @__PURE__ */ jsx("div", { className: separatorCva({ variant, color }) }),
|
|
35
|
-
/* @__PURE__ */ jsx("div", { className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-alert-gap-action px-alert-side-default py-alert-height-actions-mobile md:w-auto md:justify-center md:py-alert-height-actions-desktop", children: rightContent })
|
|
36
|
-
] })
|
|
37
|
-
] }) });
|
|
38
|
-
};
|
|
39
|
-
export {
|
|
40
|
-
Alert
|
|
41
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const alert = cva("min-h-0 overflow-hidden rounded-alert-rounding-default p-0", {
|
|
3
|
-
variants: {
|
|
4
|
-
variant: {
|
|
5
|
-
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
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
|
-
className: "border-elevation-outline-default-1"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
variant: "outlined",
|
|
23
|
-
color: "success",
|
|
24
|
-
className: "border-elevation-outline-success-1"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
variant: "outlined",
|
|
28
|
-
color: "warning",
|
|
29
|
-
className: "border-elevation-outline-warning-1"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
variant: "outlined",
|
|
33
|
-
color: "error",
|
|
34
|
-
className: "border-elevation-outline-error-1"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
variant: "contained",
|
|
38
|
-
color: "neutral",
|
|
39
|
-
className: "bg-elevation-fill-inverted-1"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
variant: "contained",
|
|
43
|
-
color: "success",
|
|
44
|
-
className: "bg-elevation-fill-success-1"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
variant: "contained",
|
|
48
|
-
color: "warning",
|
|
49
|
-
className: "bg-elevation-fill-warning-1"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
variant: "contained",
|
|
53
|
-
color: "error",
|
|
54
|
-
className: "bg-elevation-fill-error-1"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
defaultVariants: {
|
|
58
|
-
variant: "outlined",
|
|
59
|
-
color: "neutral"
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
export {
|
|
63
|
-
alert
|
|
64
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { loaderWrapper, loader } from "./loader.cva.js";
|
|
3
|
-
const Loader = ({ size, className, ...props }) => {
|
|
4
|
-
return /* @__PURE__ */ jsx("div", { className: loaderWrapper({ size, className }), children: /* @__PURE__ */ jsxs(
|
|
5
|
-
"svg",
|
|
6
|
-
{
|
|
7
|
-
className: loader({ size, className }),
|
|
8
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
-
fill: "none",
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
...props,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx(
|
|
14
|
-
"circle",
|
|
15
|
-
{
|
|
16
|
-
className: "opacity-20",
|
|
17
|
-
cx: "12",
|
|
18
|
-
cy: "12",
|
|
19
|
-
r: "10",
|
|
20
|
-
stroke: "currentColor",
|
|
21
|
-
strokeWidth: "4"
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
25
|
-
"path",
|
|
26
|
-
{
|
|
27
|
-
fill: "currentColor",
|
|
28
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
) });
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
Loader
|
|
37
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
const loaderWrapper = cva("flex items-center justify-center", {
|
|
3
|
-
variants: {
|
|
4
|
-
size: {
|
|
5
|
-
default: "size-6",
|
|
6
|
-
l: "size-16"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
defaultVariants: {
|
|
10
|
-
size: "default"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
const loader = cva("animate-loader-spin", {
|
|
14
|
-
variants: {
|
|
15
|
-
size: {
|
|
16
|
-
default: "size-3-5",
|
|
17
|
-
l: "size-8"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
size: "default"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
export {
|
|
25
|
-
loader,
|
|
26
|
-
loaderWrapper
|
|
27
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { ToastContainer as ToastContainer$1 } from "react-toastify";
|
|
3
|
-
import { Button } from "../../buttons/Button/Button.js";
|
|
4
|
-
import { Loader } from "../Loader/Loader.js";
|
|
5
|
-
import { statusIcon, statusSeparator } from "../shared/status.cva.js";
|
|
6
|
-
import { toast, buttonColorVariant, toastWrapper, toastContainer } from "./toast.cva.js";
|
|
7
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
8
|
-
import { UIStyle } from "../../../config/uiStyle.context.js";
|
|
9
|
-
const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
10
|
-
const uiStyle = UIStyle.useConfig();
|
|
11
|
-
const toastCva = uiStyle?.toast?.cva ?? toast;
|
|
12
|
-
const buttonColor = uiStyle?.toast?.buttonColor ?? buttonColorVariant;
|
|
13
|
-
const iconCva = uiStyle?.status?.iconCva ?? statusIcon;
|
|
14
|
-
const separatorCva = uiStyle?.status?.separatorCva ?? statusSeparator;
|
|
15
|
-
return /* @__PURE__ */ jsxs("div", { className: toastCva({ ...props }), children: [
|
|
16
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-toast-gap-icon-to-text px-toast-side-default py-toast-height-content", children: [
|
|
17
|
-
isLoading && /* @__PURE__ */ jsx(
|
|
18
|
-
Loader,
|
|
19
|
-
{
|
|
20
|
-
size: "default",
|
|
21
|
-
className: "shrink-0"
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({ ...props }) }),
|
|
25
|
-
/* @__PURE__ */ jsx(Typography, { size: "label-2", children: text })
|
|
26
|
-
] }),
|
|
27
|
-
actions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: separatorCva({ ...props }) }),
|
|
29
|
-
/* @__PURE__ */ jsx("div", { 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", children: actions.map(({ text: buttonText, onPress }) => /* @__PURE__ */ jsx(
|
|
30
|
-
Button,
|
|
31
|
-
{
|
|
32
|
-
onPress,
|
|
33
|
-
...buttonColor({ ...props }),
|
|
34
|
-
variant: "text",
|
|
35
|
-
size: "xs",
|
|
36
|
-
children: buttonText
|
|
37
|
-
},
|
|
38
|
-
buttonText
|
|
39
|
-
)) })
|
|
40
|
-
] })
|
|
41
|
-
] });
|
|
42
|
-
};
|
|
43
|
-
const ToastContainer = () => {
|
|
44
|
-
return /* @__PURE__ */ jsx(
|
|
45
|
-
ToastContainer$1,
|
|
46
|
-
{
|
|
47
|
-
className: (params) => {
|
|
48
|
-
return toastContainer({
|
|
49
|
-
position: params?.position,
|
|
50
|
-
className: params?.defaultClassName
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
toastClassName: toastWrapper,
|
|
54
|
-
autoClose: 2500,
|
|
55
|
-
icon: false,
|
|
56
|
-
closeButton: false,
|
|
57
|
-
hideProgressBar: true
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
Toast,
|
|
63
|
-
ToastContainer
|
|
64
|
-
};
|