@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,176 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { FileTrigger } from "react-aria-components";
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { CheckCircleIcon } from "../../../../assets/icons/CheckCircle.js";
|
|
6
|
-
import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
7
|
-
import { Button } from "../../../buttons/Button/Button.js";
|
|
8
|
-
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
9
|
-
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
10
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
11
|
-
import { ns } from "../../../../config/i18n.js";
|
|
12
|
-
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
13
|
-
const FileUploadContentFilled = ({
|
|
14
|
-
variant,
|
|
15
|
-
as,
|
|
16
|
-
isDisabled,
|
|
17
|
-
state,
|
|
18
|
-
browseText,
|
|
19
|
-
fileTriggerProps,
|
|
20
|
-
removeWithIcon = false,
|
|
21
|
-
singleFile,
|
|
22
|
-
onRemove
|
|
23
|
-
}) => {
|
|
24
|
-
const { t } = useTranslation(ns);
|
|
25
|
-
return /* @__PURE__ */ jsx("div", { className: clsx("flex w-full flex-fill flex-col items-start"), children: /* @__PURE__ */ jsxs(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
className: clsx("flex w-full items-center", {
|
|
29
|
-
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
30
|
-
"flex-col": variant === "vertical",
|
|
31
|
-
"gap-file-upload-content-gap-content-to-button": variant === "vertical" && as === "button",
|
|
32
|
-
"gap-file-upload-content-gap-text-to-text": variant === "vertical" && as === "link"
|
|
33
|
-
}),
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ jsxs(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: clsx(
|
|
39
|
-
"flex min-w-0 max-w-full flex-grow items-center gap-file-upload-content-gap-icon-to-content",
|
|
40
|
-
{
|
|
41
|
-
"flex-col": variant === "vertical",
|
|
42
|
-
"flex-row": variant === "horizontal",
|
|
43
|
-
"opacity-50": isDisabled
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-6 w-6 text-text-default-1" }),
|
|
48
|
-
/* @__PURE__ */ jsxs(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
className: clsx("flex flex-col gap-file-upload-content-gap-text-to-text", {
|
|
52
|
-
"max-w-full items-center": variant === "vertical",
|
|
53
|
-
"max-w-[calc(100%_-_32px)]": variant === "horizontal"
|
|
54
|
-
}),
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
Typography,
|
|
58
|
-
{
|
|
59
|
-
variant: "prominent-1",
|
|
60
|
-
size: "label-1",
|
|
61
|
-
as: "span",
|
|
62
|
-
className: "self-stretch truncate text-center text-text-default-1",
|
|
63
|
-
children: state.file.name
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ jsx(
|
|
67
|
-
Typography,
|
|
68
|
-
{
|
|
69
|
-
variant: "default",
|
|
70
|
-
size: singleFile ? "label-2" : "label-3",
|
|
71
|
-
as: "span",
|
|
72
|
-
className: "text-text-default-2",
|
|
73
|
-
children: FileUtils.getCalculatedFileSize(state.file)
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ jsx(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
className: clsx("flex flex-none items-center justify-end", {
|
|
86
|
-
"flex-col": variant === "vertical" && as === "button",
|
|
87
|
-
"gap-file-upload-content-gap-text-to-text": as === "link" && variant === "vertical",
|
|
88
|
-
"gap-file-upload-content-gap-content-to-button": as === "button" && variant === "vertical",
|
|
89
|
-
"gap-file-upload-content-gap-button-to-button": variant === "horizontal"
|
|
90
|
-
}),
|
|
91
|
-
children: as === "link" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
-
fileTriggerProps && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
-
/* @__PURE__ */ jsx(FileTrigger, { ...fileTriggerProps, children: /* @__PURE__ */ jsx(
|
|
94
|
-
TextButton,
|
|
95
|
-
{
|
|
96
|
-
className: clsx("text-interactive-text-primary-idle", {
|
|
97
|
-
"[&>span>span]:!font-medium": variant === "vertical"
|
|
98
|
-
}),
|
|
99
|
-
children: browseText ?? ""
|
|
100
|
-
}
|
|
101
|
-
) }),
|
|
102
|
-
variant === "vertical" && /* @__PURE__ */ jsx(
|
|
103
|
-
Typography,
|
|
104
|
-
{
|
|
105
|
-
variant: "default",
|
|
106
|
-
size: "label-2",
|
|
107
|
-
as: "span",
|
|
108
|
-
className: "text-text-default-2",
|
|
109
|
-
children: t(($) => $.ui.fileUpload.or)
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
] }),
|
|
113
|
-
removeWithIcon ? /* @__PURE__ */ jsx(
|
|
114
|
-
InlineIconButton,
|
|
115
|
-
{
|
|
116
|
-
label: "Cancel",
|
|
117
|
-
color: "secondary",
|
|
118
|
-
onPress: () => {
|
|
119
|
-
onRemove(state.id ?? "");
|
|
120
|
-
},
|
|
121
|
-
icon: CloseIcon
|
|
122
|
-
}
|
|
123
|
-
) : /* @__PURE__ */ jsx(
|
|
124
|
-
TextButton,
|
|
125
|
-
{
|
|
126
|
-
className: clsx(
|
|
127
|
-
variant === "vertical" && "[&>span>span]:!font-medium text-interactive-text-primary-idle lowercase"
|
|
128
|
-
),
|
|
129
|
-
color: variant === "horizontal" ? "secondary" : "primary",
|
|
130
|
-
onPress: () => {
|
|
131
|
-
onRemove(state.id ?? "");
|
|
132
|
-
},
|
|
133
|
-
children: t(($) => $.ui.fileUpload.removeFile)
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-file-upload-content-gap-button-to-button self-stretch", children: [
|
|
137
|
-
fileTriggerProps && /* @__PURE__ */ jsx(FileTrigger, { ...fileTriggerProps, children: /* @__PURE__ */ jsx(
|
|
138
|
-
Button,
|
|
139
|
-
{
|
|
140
|
-
variant: "outlined",
|
|
141
|
-
size: "xs",
|
|
142
|
-
width: "hug",
|
|
143
|
-
isDisabled,
|
|
144
|
-
children: browseText ?? ""
|
|
145
|
-
}
|
|
146
|
-
) }),
|
|
147
|
-
removeWithIcon ? /* @__PURE__ */ jsx(
|
|
148
|
-
InlineIconButton,
|
|
149
|
-
{
|
|
150
|
-
label: "Cancel",
|
|
151
|
-
color: "secondary",
|
|
152
|
-
onPress: () => {
|
|
153
|
-
onRemove(state.id ?? "");
|
|
154
|
-
},
|
|
155
|
-
icon: CloseIcon
|
|
156
|
-
}
|
|
157
|
-
) : /* @__PURE__ */ jsx(
|
|
158
|
-
TextButton,
|
|
159
|
-
{
|
|
160
|
-
color: "secondary",
|
|
161
|
-
onPress: () => {
|
|
162
|
-
onRemove(state.id ?? "");
|
|
163
|
-
},
|
|
164
|
-
children: t(($) => $.ui.fileUpload.removeFile)
|
|
165
|
-
}
|
|
166
|
-
)
|
|
167
|
-
] })
|
|
168
|
-
}
|
|
169
|
-
)
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
) });
|
|
173
|
-
};
|
|
174
|
-
export {
|
|
175
|
-
FileUploadContentFilled
|
|
176
|
-
};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
5
|
-
import { FileIcon } from "../../../../assets/icons/File.js";
|
|
6
|
-
import { Button } from "../../../buttons/Button/Button.js";
|
|
7
|
-
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
8
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
9
|
-
import { ns } from "../../../../config/i18n.js";
|
|
10
|
-
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
11
|
-
import { FileProgressBar } from "./FileProgressBar.js";
|
|
12
|
-
const FileUploadContentLoading = ({
|
|
13
|
-
index,
|
|
14
|
-
variant,
|
|
15
|
-
as,
|
|
16
|
-
state,
|
|
17
|
-
isDisabled,
|
|
18
|
-
singleFile,
|
|
19
|
-
onCancel
|
|
20
|
-
}) => {
|
|
21
|
-
const { t } = useTranslation(ns);
|
|
22
|
-
return /* @__PURE__ */ jsxs(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: clsx("flex w-full flex-col items-center", {
|
|
26
|
-
"flex-col": variant === "vertical",
|
|
27
|
-
"flex-row": variant === "horizontal",
|
|
28
|
-
"gap-file-upload-content-gap-content-to-button": as === "button"
|
|
29
|
-
}),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsxs(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
className: clsx("flex w-full items-center justify-between", {
|
|
35
|
-
"flex-col gap-file-upload-content-gap-text-to-progress": variant === "vertical",
|
|
36
|
-
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
37
|
-
"opacity-50": isDisabled
|
|
38
|
-
}),
|
|
39
|
-
children: [
|
|
40
|
-
/* @__PURE__ */ jsxs(
|
|
41
|
-
"div",
|
|
42
|
-
{
|
|
43
|
-
className: clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
|
|
44
|
-
"w-full flex-col": variant === "vertical",
|
|
45
|
-
"w-1/2": variant === "horizontal"
|
|
46
|
-
}),
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ jsx(FileIcon, { className: "h-6 w-6 text-text-default-1" }),
|
|
49
|
-
/* @__PURE__ */ jsxs(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
className: clsx("flex flex-col", {
|
|
53
|
-
"max-w-full gap-file-upload-content-gap-icon-to-content text-center": variant === "vertical",
|
|
54
|
-
"max-w-[calc(100%_-_32px)] gap-file-upload-content-gap-text-to-text": variant === "horizontal"
|
|
55
|
-
}),
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ jsx(
|
|
58
|
-
Typography,
|
|
59
|
-
{
|
|
60
|
-
variant: "prominent-1",
|
|
61
|
-
size: "label-1",
|
|
62
|
-
as: "span",
|
|
63
|
-
className: "self-stretch truncate text-center text-text-default-1",
|
|
64
|
-
children: state.file.name
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
/* @__PURE__ */ jsx(
|
|
68
|
-
Typography,
|
|
69
|
-
{
|
|
70
|
-
variant: "default",
|
|
71
|
-
size: singleFile ? "label-2" : "label-3",
|
|
72
|
-
as: "span",
|
|
73
|
-
className: "text-text-default-2",
|
|
74
|
-
children: FileUtils.getCalculatedFileSize(state.file)
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ jsxs(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: clsx("flex items-center gap-1", {
|
|
87
|
-
"w-1/2": variant === "horizontal",
|
|
88
|
-
"w-full": variant === "vertical"
|
|
89
|
-
}),
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ jsx(FileProgressBar, { progress: state.progress }),
|
|
92
|
-
(as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(
|
|
93
|
-
InlineIconButton,
|
|
94
|
-
{
|
|
95
|
-
label: "Cancel",
|
|
96
|
-
color: "secondary",
|
|
97
|
-
onPress: () => {
|
|
98
|
-
onCancel(index);
|
|
99
|
-
},
|
|
100
|
-
icon: CloseIcon
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(
|
|
110
|
-
Button,
|
|
111
|
-
{
|
|
112
|
-
variant: "outlined",
|
|
113
|
-
size: "xs",
|
|
114
|
-
color: "secondary",
|
|
115
|
-
width: "hug",
|
|
116
|
-
onPress: () => {
|
|
117
|
-
onCancel(index);
|
|
118
|
-
},
|
|
119
|
-
children: t(($) => $.ui.fileUpload.cancel)
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
};
|
|
126
|
-
export {
|
|
127
|
-
FileUploadContentLoading
|
|
128
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { FileTrigger, DropZone } from "react-aria-components";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { UploadIcon } from "../../../../assets/icons/Upload.js";
|
|
5
|
-
import { Button } from "../../../buttons/Button/Button.js";
|
|
6
|
-
import { TextButton } from "../../../buttons/TextButton/TextButton.js";
|
|
7
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
8
|
-
import { ns } from "../../../../config/i18n.js";
|
|
9
|
-
import { inputUploadButton, inputUploadDropZone } from "./inputUploadButton.cva.js";
|
|
10
|
-
const InputUploadContent = (props) => {
|
|
11
|
-
const { variant, isDisabled, error, ...rest } = props;
|
|
12
|
-
const { t } = useTranslation(ns);
|
|
13
|
-
return /* @__PURE__ */ jsx(FileTrigger, { ...rest, children: /* @__PURE__ */ jsxs(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
"data-rac": "",
|
|
17
|
-
"data-disabled": isDisabled || void 0,
|
|
18
|
-
"data-invalid": !!error || void 0,
|
|
19
|
-
className: inputUploadButton({
|
|
20
|
-
variant,
|
|
21
|
-
className: "group/input-upload"
|
|
22
|
-
}),
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ jsxs(
|
|
25
|
-
DropZone,
|
|
26
|
-
{
|
|
27
|
-
...rest,
|
|
28
|
-
isDisabled,
|
|
29
|
-
className: inputUploadDropZone({ variant }),
|
|
30
|
-
children: [
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
32
|
-
Typography,
|
|
33
|
-
{
|
|
34
|
-
variant: "default",
|
|
35
|
-
size: "label-1",
|
|
36
|
-
as: "span",
|
|
37
|
-
className: "flex-fill select-none overflow-hidden text-ellipsis text-text-default-3",
|
|
38
|
-
children: t(($) => $.ui.fileUpload.emptyText)
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
variant === "nested" && /* @__PURE__ */ jsx(
|
|
42
|
-
TextButton,
|
|
43
|
-
{
|
|
44
|
-
isDisabled,
|
|
45
|
-
icon: UploadIcon,
|
|
46
|
-
className: "!p-0",
|
|
47
|
-
children: t(($) => $.ui.fileUpload.upload)
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
variant !== "nested" && /* @__PURE__ */ jsx(
|
|
54
|
-
Button,
|
|
55
|
-
{
|
|
56
|
-
size: "s",
|
|
57
|
-
width: "hug",
|
|
58
|
-
isDisabled,
|
|
59
|
-
children: t(($) => $.ui.fileUpload.uploadFile)
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
) });
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
InputUploadContent
|
|
68
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CloseIcon } from "../../../../assets/icons/Close.js";
|
|
3
|
-
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
4
|
-
import { Typography } from "../../../text/Typography/Typography.js";
|
|
5
|
-
const InputUploadFilled = ({ files, onRemove, isDisabled }) => {
|
|
6
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle px-input-side-default py-input-height-default", children: [
|
|
7
|
-
/* @__PURE__ */ jsx(
|
|
8
|
-
Typography,
|
|
9
|
-
{
|
|
10
|
-
variant: "default",
|
|
11
|
-
size: "label-1",
|
|
12
|
-
as: "span",
|
|
13
|
-
className: "flex-fill select-none truncate text-ellipsis text-text-default-1",
|
|
14
|
-
children: files.map((file) => file.name).join(", ")
|
|
15
|
-
}
|
|
16
|
-
),
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
InlineIconButton,
|
|
19
|
-
{
|
|
20
|
-
label: "Remove files",
|
|
21
|
-
color: "secondary",
|
|
22
|
-
icon: CloseIcon,
|
|
23
|
-
isDisabled,
|
|
24
|
-
onPress: onRemove
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
] });
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
InputUploadFilled
|
|
31
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { cx, cva } from "class-variance-authority";
|
|
2
|
-
const fileUploadDropZoneBase = cva(["relative w-full rounded-input-rounding-default"], {
|
|
3
|
-
variants: {
|
|
4
|
-
variant: {
|
|
5
|
-
vertical: ["flex-col justify-center"],
|
|
6
|
-
horizontal: ["flex-row justify-between"]
|
|
7
|
-
},
|
|
8
|
-
isContainer: {
|
|
9
|
-
true: [
|
|
10
|
-
"data-[drop-target]:before:content-['']",
|
|
11
|
-
"data-[drop-target]:before:absolute",
|
|
12
|
-
"data-[drop-target]:before:z-40",
|
|
13
|
-
"data-[drop-target]:before:width-full",
|
|
14
|
-
"data-[drop-target]:before:height-full",
|
|
15
|
-
"data-[drop-target]:before:top-0",
|
|
16
|
-
"data-[drop-target]:before:left-0",
|
|
17
|
-
"data-[drop-target]:border data-[drop-target]:border-dashed",
|
|
18
|
-
"data-[drop-target]:border-elevation-outline-default-2",
|
|
19
|
-
"data-[drop-target]:before:pointer-events-none data-[drop-target]:before:inset-0",
|
|
20
|
-
"data-[drop-target]:before:bg-elevation-fill-default-2"
|
|
21
|
-
],
|
|
22
|
-
false: [
|
|
23
|
-
"flex items-center",
|
|
24
|
-
"py-file-upload-container-height-top-bottom",
|
|
25
|
-
"px-file-upload-container-side-default",
|
|
26
|
-
"gap-gap-file-upload-content-gap-icon-to-content",
|
|
27
|
-
"border border-input-outlined-outline-idle border-dashed bg-input-outlined-idle",
|
|
28
|
-
"hover:border-elevation-outline-default-2 hover:bg-elevation-fill-default-2",
|
|
29
|
-
"invalid:border invalid:border-input-outlined-outline-error",
|
|
30
|
-
"data-[drop-target]:border-elevation-outline-default-2 data-[drop-target]:bg-elevation-fill-default-2",
|
|
31
|
-
"data-[has-files]:border-solid"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
variant: "vertical"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const fileUploadDropZone = (props) => {
|
|
40
|
-
const { className, ...rest } = props;
|
|
41
|
-
return cx(fileUploadDropZoneBase(rest), className);
|
|
42
|
-
};
|
|
43
|
-
cva(["flex gap-3"], {
|
|
44
|
-
variants: {
|
|
45
|
-
variant: {
|
|
46
|
-
vertical: ["flex-col"],
|
|
47
|
-
horizontal: ["flex-row flex-wrap"]
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
variant: "vertical"
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
fileUploadDropZone,
|
|
56
|
-
fileUploadDropZoneBase
|
|
57
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { cva, cx } from "class-variance-authority";
|
|
2
|
-
const inputUploadButtonBase = cva(
|
|
3
|
-
["flex w-full items-center justify-between gap-file-upload-input-gap-input-to-button-gap"],
|
|
4
|
-
{
|
|
5
|
-
variants: {
|
|
6
|
-
variant: {
|
|
7
|
-
default: [],
|
|
8
|
-
nested: []
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
defaultVariants: {
|
|
12
|
-
variant: "default"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
const inputUploadButton = (props) => {
|
|
17
|
-
const { className, ...rest } = props;
|
|
18
|
-
return cx(inputUploadButtonBase(rest), className);
|
|
19
|
-
};
|
|
20
|
-
const inputUploadDropZone = cva(
|
|
21
|
-
[
|
|
22
|
-
"flex-1",
|
|
23
|
-
"flex items-center",
|
|
24
|
-
"group-data-[invalid]/input-upload:border group-data-[invalid]/input-upload:border-input-outlined-outline-error",
|
|
25
|
-
"data-[drop-target]:border-input-outlined-outline-hover",
|
|
26
|
-
"hover:border-input-outlined-outline-hover"
|
|
27
|
-
],
|
|
28
|
-
{
|
|
29
|
-
variants: {
|
|
30
|
-
variant: {
|
|
31
|
-
default: [
|
|
32
|
-
"rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle px-input-side-default py-input-height-default"
|
|
33
|
-
],
|
|
34
|
-
nested: [
|
|
35
|
-
"rounded-input-rounding-default border border-input-outlined-outline-idle border-solid bg-input-outlined-idle px-input-side-default py-input-height-default"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
variant: "default"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
export {
|
|
45
|
-
inputUploadButton,
|
|
46
|
-
inputUploadButtonBase,
|
|
47
|
-
inputUploadDropZone
|
|
48
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormFieldError } from "./FormFieldError.js";
|
|
3
|
-
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
4
|
-
const FormField = ({
|
|
5
|
-
ref,
|
|
6
|
-
as,
|
|
7
|
-
label,
|
|
8
|
-
tooltipText,
|
|
9
|
-
helperText,
|
|
10
|
-
isRequired,
|
|
11
|
-
rightContent,
|
|
12
|
-
isDisabled,
|
|
13
|
-
error,
|
|
14
|
-
hideLabel,
|
|
15
|
-
headerClassName,
|
|
16
|
-
errorClassName,
|
|
17
|
-
children,
|
|
18
|
-
className,
|
|
19
|
-
labelProps,
|
|
20
|
-
isHeaderHidden
|
|
21
|
-
}) => {
|
|
22
|
-
const headerProps = {
|
|
23
|
-
label,
|
|
24
|
-
tooltipText,
|
|
25
|
-
helperText,
|
|
26
|
-
isRequired,
|
|
27
|
-
rightContent,
|
|
28
|
-
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
29
|
-
isDisabled,
|
|
30
|
-
className: headerClassName,
|
|
31
|
-
labelProps
|
|
32
|
-
};
|
|
33
|
-
const errorProps = {
|
|
34
|
-
error,
|
|
35
|
-
isDisabled,
|
|
36
|
-
isHidden: isHeaderHidden,
|
|
37
|
-
className: errorClassName
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ jsxs(
|
|
40
|
-
"div",
|
|
41
|
-
{
|
|
42
|
-
ref,
|
|
43
|
-
className,
|
|
44
|
-
children: [
|
|
45
|
-
!["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps }),
|
|
46
|
-
children,
|
|
47
|
-
/* @__PURE__ */ jsx(FormFieldError, { ...errorProps })
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
FormField
|
|
54
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
4
|
-
const FormFieldError = ({ error, isDisabled, isHidden, className }) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
Typography,
|
|
7
|
-
{
|
|
8
|
-
className: clsx("text-text-error-1", !error || isDisabled || isHidden ? "sr-only" : "mt-1-5", className),
|
|
9
|
-
size: "label-3",
|
|
10
|
-
children: error
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
FormFieldError
|
|
16
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { Focusable } from "react-aria-components";
|
|
4
|
-
import { InfoIcon } from "../../../assets/icons/Info.js";
|
|
5
|
-
import { FormFieldLabel } from "./FormFieldLabel.js";
|
|
6
|
-
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
7
|
-
import { Typography } from "../../text/Typography/Typography.js";
|
|
8
|
-
const FormFieldHeader = ({
|
|
9
|
-
label,
|
|
10
|
-
tooltipText,
|
|
11
|
-
helperText,
|
|
12
|
-
isRequired,
|
|
13
|
-
rightContent,
|
|
14
|
-
isHeaderHidden,
|
|
15
|
-
isDisabled,
|
|
16
|
-
className,
|
|
17
|
-
labelProps
|
|
18
|
-
}) => {
|
|
19
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx(isHeaderHidden ? "sr-only" : "mb-1", className), children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
21
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1", children: [
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
FormFieldLabel,
|
|
24
|
-
{
|
|
25
|
-
label,
|
|
26
|
-
isRequired,
|
|
27
|
-
isDisabled,
|
|
28
|
-
labelProps
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
|
-
tooltipText && /* @__PURE__ */ jsx(Tooltip, { text: tooltipText, children: /* @__PURE__ */ jsx(Focusable, { children: /* @__PURE__ */ jsx(
|
|
32
|
-
InfoIcon,
|
|
33
|
-
{
|
|
34
|
-
className: clsx(
|
|
35
|
-
"size-6",
|
|
36
|
-
isDisabled ? "text-interactive-text-secondary-disabled" : "text-interactive-text-secondary-idle hover:text-interactive-text-secondary-hover"
|
|
37
|
-
),
|
|
38
|
-
tabIndex: 0
|
|
39
|
-
}
|
|
40
|
-
) }) })
|
|
41
|
-
] }),
|
|
42
|
-
rightContent
|
|
43
|
-
] }),
|
|
44
|
-
helperText && /* @__PURE__ */ jsx(
|
|
45
|
-
Typography,
|
|
46
|
-
{
|
|
47
|
-
slot: "description",
|
|
48
|
-
size: "label-2",
|
|
49
|
-
className: clsx(isDisabled ? "text-interactive-3" : "text-text-default-2"),
|
|
50
|
-
children: helperText
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] });
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
FormFieldHeader
|
|
57
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from "react-aria-components";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
5
|
-
import { ns } from "../../../config/i18n.js";
|
|
6
|
-
const FormFieldHeaderClose = ({ onClose }) => {
|
|
7
|
-
const { t } = useTranslation(ns);
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
Button,
|
|
10
|
-
{
|
|
11
|
-
onPress: onClose,
|
|
12
|
-
"aria-label": t(($) => $.ui.closeAlt),
|
|
13
|
-
className: "shrink-0 focus-visible:outline-interactive-text-secondary-focus",
|
|
14
|
-
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6 text-interactive-text-secondary-idle" })
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
FormFieldHeaderClose
|
|
20
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DOMAttributes } from '@react-types/shared';
|
|
2
|
-
import { RefCallback } from 'react';
|
|
3
|
-
import { LabelBaseProps } from '../shared/label.cva';
|
|
4
|
-
export interface FormFieldLabelProps extends LabelBaseProps {
|
|
5
|
-
label: string;
|
|
6
|
-
isRequired?: boolean;
|
|
7
|
-
isDisabled?: boolean;
|
|
8
|
-
ref?: RefCallback<HTMLOrSVGElement>;
|
|
9
|
-
labelProps?: DOMAttributes<HTMLLabelElement>;
|
|
10
|
-
}
|
|
11
|
-
export declare const FormFieldLabel: ({ ref, as, label, isRequired, isDisabled, labelProps }: FormFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|