@uxf/ui 11.74.0 → 11.74.2
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/_file-input-base/file-input-base.d.ts +13 -0
- package/_file-input-base/file-input-base.js +50 -0
- package/_file-input-base/index.d.ts +2 -0
- package/_file-input-base/index.js +5 -0
- package/_input-with-popover/index.d.ts +2 -0
- package/_input-with-popover/index.js +5 -0
- package/_input-with-popover/input-with-popover.d.ts +25 -0
- package/_input-with-popover/input-with-popover.js +93 -0
- package/_private-utils/get-provider-config.d.ts +2 -0
- package/_private-utils/get-provider-config.js +19 -0
- package/accordion/accordion.d.ts +33 -0
- package/accordion/accordion.js +78 -0
- package/accordion/accordion.spec.d.ts +1 -0
- package/accordion/accordion.spec.js +9 -0
- package/accordion/accordion.stories.d.ts +2 -0
- package/accordion/accordion.stories.js +20 -0
- package/accordion/index.d.ts +2 -0
- package/accordion/index.js +5 -0
- package/alert-bubble/alert-bubble.d.ts +10 -0
- package/alert-bubble/alert-bubble.js +22 -0
- package/alert-bubble/alert-bubble.spec.d.ts +1 -0
- package/alert-bubble/alert-bubble.spec.js +9 -0
- package/alert-bubble/alert-bubble.stories.d.ts +2 -0
- package/alert-bubble/alert-bubble.stories.js +43 -0
- package/alert-bubble/index.d.ts +3 -0
- package/alert-bubble/index.js +5 -0
- package/alert-bubble/theme.d.ts +16 -0
- package/alert-bubble/theme.js +2 -0
- package/announcement-bar/announcement-bar.d.ts +9 -0
- package/announcement-bar/announcement-bar.js +40 -0
- package/announcement-bar/announcement-bar.spec.d.ts +1 -0
- package/announcement-bar/announcement-bar.spec.js +9 -0
- package/announcement-bar/announcement-bar.stories.d.ts +2 -0
- package/announcement-bar/announcement-bar.stories.js +36 -0
- package/announcement-bar/index.d.ts +2 -0
- package/announcement-bar/index.js +5 -0
- package/announcement-bar/theme.d.ts +9 -0
- package/announcement-bar/theme.js +2 -0
- package/avatar/avatar.d.ts +6 -0
- package/avatar/avatar.js +35 -0
- package/avatar/avatar.spec.d.ts +1 -0
- package/avatar/avatar.spec.js +9 -0
- package/avatar/avatar.stories.d.ts +2 -0
- package/avatar/avatar.stories.js +13 -0
- package/avatar/index.d.ts +2 -0
- package/avatar/index.js +5 -0
- package/avatar-file-input/avatar-file-input.d.ts +18 -0
- package/avatar-file-input/avatar-file-input.js +71 -0
- package/avatar-file-input/avatar-file-input.spec.d.ts +1 -0
- package/avatar-file-input/avatar-file-input.spec.js +9 -0
- package/avatar-file-input/avatar-file-input.stories.d.ts +2 -0
- package/avatar-file-input/avatar-file-input.stories.js +48 -0
- package/avatar-file-input/index.d.ts +2 -0
- package/avatar-file-input/index.js +5 -0
- package/avatar-file-input/theme.d.ts +5 -0
- package/avatar-file-input/theme.js +2 -0
- package/badge/badge.d.ts +7 -0
- package/badge/badge.js +35 -0
- package/badge/badge.spec.d.ts +1 -0
- package/badge/badge.spec.js +9 -0
- package/badge/badge.stories.d.ts +2 -0
- package/badge/badge.stories.js +32 -0
- package/badge/index.d.ts +3 -0
- package/badge/index.js +5 -0
- package/badge/theme.d.ts +6 -0
- package/badge/theme.js +2 -0
- package/button/button.d.ts +17 -0
- package/button/button.js +50 -0
- package/button/button.spec.d.ts +1 -0
- package/button/button.spec.js +9 -0
- package/button/button.stories.d.ts +4 -0
- package/button/button.stories.js +94 -0
- package/button/index.d.ts +3 -0
- package/button/index.js +5 -0
- package/button/theme.d.ts +22 -0
- package/button/theme.js +2 -0
- package/button-group/button-group.d.ts +6 -0
- package/button-group/button-group.js +13 -0
- package/button-group/button-group.spec.d.ts +1 -0
- package/button-group/button-group.spec.js +9 -0
- package/button-group/button-group.stories.d.ts +2 -0
- package/button-group/button-group.stories.js +34 -0
- package/button-group/index.d.ts +2 -0
- package/button-group/index.js +5 -0
- package/button-list/button-list.d.ts +25 -0
- package/button-list/button-list.js +85 -0
- package/button-list/button-list.spec.d.ts +1 -0
- package/button-list/button-list.spec.js +9 -0
- package/button-list/button-list.stories.d.ts +2 -0
- package/button-list/button-list.stories.js +58 -0
- package/button-list/index.d.ts +2 -0
- package/button-list/index.js +5 -0
- package/calendar/calendar-day-cell.d.ts +10 -0
- package/calendar/calendar-day-cell.js +65 -0
- package/calendar/calendar-navigation.d.ts +9 -0
- package/calendar/calendar-navigation.js +26 -0
- package/calendar/calendar-provider.d.ts +6 -0
- package/calendar/calendar-provider.js +26 -0
- package/calendar/calendar.d.ts +12 -0
- package/calendar/calendar.js +51 -0
- package/calendar/calendar.stories.d.ts +2 -0
- package/calendar/calendar.stories.js +35 -0
- package/calendar/index.d.ts +4 -0
- package/calendar/index.js +7 -0
- package/calendar/utils/get-class-names-from-flags.d.ts +2 -0
- package/calendar/utils/get-class-names-from-flags.js +7 -0
- package/checkbox/checkbox.d.ts +12 -0
- package/checkbox/checkbox.js +54 -0
- package/checkbox/checkbox.spec.d.ts +1 -0
- package/checkbox/checkbox.spec.js +9 -0
- package/checkbox/checkbox.stories.d.ts +2 -0
- package/checkbox/checkbox.stories.js +40 -0
- package/checkbox/index.d.ts +3 -0
- package/checkbox/index.js +5 -0
- package/checkbox/theme.d.ts +5 -0
- package/checkbox/theme.js +2 -0
- package/checkbox-button/checkbox-button.d.ts +9 -0
- package/checkbox-button/checkbox-button.js +39 -0
- package/checkbox-button/checkbox-button.spec.d.ts +1 -0
- package/checkbox-button/checkbox-button.spec.js +9 -0
- package/checkbox-button/checkbox-button.stories.d.ts +2 -0
- package/checkbox-button/checkbox-button.stories.js +38 -0
- package/checkbox-button/index.d.ts +2 -0
- package/checkbox-button/index.js +5 -0
- package/checkbox-input/checkbox-input.d.ts +14 -0
- package/checkbox-input/checkbox-input.js +43 -0
- package/checkbox-input/checkbox-input.spec.d.ts +1 -0
- package/checkbox-input/checkbox-input.spec.js +9 -0
- package/checkbox-input/checkbox-input.stories.d.ts +2 -0
- package/checkbox-input/checkbox-input.stories.js +40 -0
- package/checkbox-input/index.d.ts +2 -0
- package/checkbox-input/index.js +5 -0
- package/checkbox-list/checkbox-list.d.ts +6 -0
- package/checkbox-list/checkbox-list.js +52 -0
- package/checkbox-list/checkbox-list.spec.d.ts +1 -0
- package/checkbox-list/checkbox-list.spec.js +9 -0
- package/checkbox-list/checkbox-list.stories.d.ts +2 -0
- package/checkbox-list/checkbox-list.stories.js +40 -0
- package/checkbox-list/index.d.ts +2 -0
- package/checkbox-list/index.js +5 -0
- package/checkbox-list/types.d.ts +16 -0
- package/checkbox-list/types.js +2 -0
- package/chip/chip.d.ts +13 -0
- package/chip/chip.js +60 -0
- package/chip/chip.spec.d.ts +1 -0
- package/chip/chip.spec.js +9 -0
- package/chip/chip.stories.d.ts +2 -0
- package/chip/chip.stories.js +47 -0
- package/chip/index.d.ts +3 -0
- package/chip/index.js +5 -0
- package/chip/theme.d.ts +25 -0
- package/chip/theme.js +2 -0
- package/chip/translations.d.ts +11 -0
- package/chip/translations.js +12 -0
- package/color-radio/color-radio.d.ts +12 -0
- package/color-radio/color-radio.js +66 -0
- package/color-radio/color-radio.spec.d.ts +1 -0
- package/color-radio/color-radio.spec.js +9 -0
- package/color-radio/color-radio.stories.d.ts +2 -0
- package/color-radio/color-radio.stories.js +25 -0
- package/color-radio/index.d.ts +2 -0
- package/color-radio/index.js +5 -0
- package/color-radio-group/color-radio-group.d.ts +18 -0
- package/color-radio-group/color-radio-group.js +49 -0
- package/color-radio-group/color-radio-group.spec.d.ts +1 -0
- package/color-radio-group/color-radio-group.spec.js +9 -0
- package/color-radio-group/color-radio-group.stories.d.ts +2 -0
- package/color-radio-group/color-radio-group.stories.js +75 -0
- package/color-radio-group/index.d.ts +2 -0
- package/color-radio-group/index.js +5 -0
- package/color-scheme/color-scheme-defaults.d.ts +8 -0
- package/color-scheme/color-scheme-defaults.js +10 -0
- package/color-scheme/get-color-scheme-class-name.d.ts +2 -0
- package/color-scheme/get-color-scheme-class-name.js +13 -0
- package/color-scheme/get-color-scheme.d.ts +2 -0
- package/color-scheme/get-color-scheme.js +16 -0
- package/color-scheme/index.d.ts +5 -0
- package/color-scheme/index.js +13 -0
- package/color-scheme/use-color-scheme.d.ts +2 -0
- package/color-scheme/use-color-scheme.js +15 -0
- package/color-scheme/use-handle-color-scheme.d.ts +9 -0
- package/color-scheme/use-handle-color-scheme.js +23 -0
- package/color-scheme/use-toggle-color-scheme.d.ts +1 -0
- package/color-scheme/use-toggle-color-scheme.js +29 -0
- package/combobox/combobox.d.ts +51 -0
- package/combobox/combobox.js +108 -0
- package/combobox/combobox.spec.d.ts +1 -0
- package/combobox/combobox.spec.js +10 -0
- package/combobox/combobox.stories.d.ts +3 -0
- package/combobox/combobox.stories.js +55 -0
- package/combobox/index.d.ts +2 -0
- package/combobox/index.js +5 -0
- package/combobox/translations.d.ts +17 -0
- package/combobox/translations.js +18 -0
- package/components.d.ts +317 -0
- package/components.js +344 -0
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +127 -0
- package/config/icons.js +30 -0
- package/content/content-schema.d.ts +3 -0
- package/content/content-schema.js +2 -0
- package/content/types.d.ts +27 -0
- package/content/types.js +2 -0
- package/context/context.d.ts +17 -0
- package/context/context.js +5 -0
- package/context/index.d.ts +3 -0
- package/context/index.js +19 -0
- package/context/provider.d.ts +8 -0
- package/context/provider.js +20 -0
- package/context/use-component-context.d.ts +3 -0
- package/context/use-component-context.js +13 -0
- package/create-component-preview-page/create-component-preview-page.d.ts +13 -0
- package/create-component-preview-page/create-component-preview-page.js +43 -0
- package/create-component-preview-page/index.d.ts +2 -0
- package/create-component-preview-page/index.js +18 -0
- package/date-picker/date-picker-content.d.ts +10 -0
- package/date-picker/date-picker-content.js +58 -0
- package/date-picker/date-picker-decade.d.ts +9 -0
- package/date-picker/date-picker-decade.js +91 -0
- package/date-picker/date-picker-month.d.ts +10 -0
- package/date-picker/date-picker-month.js +87 -0
- package/date-picker/date-picker-year.d.ts +9 -0
- package/date-picker/date-picker-year.js +96 -0
- package/date-picker/date-picker.d.ts +20 -0
- package/date-picker/date-picker.js +31 -0
- package/date-picker/date-picker.spec.d.ts +1 -0
- package/date-picker/date-picker.spec.js +9 -0
- package/date-picker/date-picker.stories.d.ts +2 -0
- package/date-picker/date-picker.stories.js +80 -0
- package/date-picker/index.d.ts +3 -0
- package/date-picker/index.js +5 -0
- package/date-picker/translations.d.ts +53 -0
- package/date-picker/translations.js +54 -0
- package/date-picker/types.d.ts +11 -0
- package/date-picker/types.js +2 -0
- package/date-picker-input/date-picker-input.d.ts +23 -0
- package/date-picker-input/date-picker-input.js +88 -0
- package/date-picker-input/date-picker-input.spec.d.ts +1 -0
- package/date-picker-input/date-picker-input.spec.js +9 -0
- package/date-picker-input/date-picker-input.stories.d.ts +2 -0
- package/date-picker-input/date-picker-input.stories.js +55 -0
- package/date-picker-input/index.d.ts +2 -0
- package/date-picker-input/index.js +8 -0
- package/date-range-picker/date-range-picker-content.d.ts +6 -0
- package/date-range-picker/date-range-picker-content.js +56 -0
- package/date-range-picker/date-range-picker-decade.d.ts +9 -0
- package/date-range-picker/date-range-picker-decade.js +95 -0
- package/date-range-picker/date-range-picker-month.d.ts +10 -0
- package/date-range-picker/date-range-picker-month.js +84 -0
- package/date-range-picker/date-range-picker-year.d.ts +9 -0
- package/date-range-picker/date-range-picker-year.js +93 -0
- package/date-range-picker/date-range-picker.d.ts +15 -0
- package/date-range-picker/date-range-picker.js +53 -0
- package/date-range-picker/date-range-picker.spec.d.ts +1 -0
- package/date-range-picker/date-range-picker.spec.js +9 -0
- package/date-range-picker/date-range-picker.stories.d.ts +2 -0
- package/date-range-picker/date-range-picker.stories.js +36 -0
- package/date-range-picker/index.d.ts +3 -0
- package/date-range-picker/index.js +5 -0
- package/date-range-picker/translations.d.ts +53 -0
- package/date-range-picker/translations.js +54 -0
- package/date-range-picker/types.d.ts +5 -0
- package/date-range-picker/types.js +2 -0
- package/date-range-picker-input/date-range-picker-input.d.ts +21 -0
- package/date-range-picker-input/date-range-picker-input.js +62 -0
- package/date-range-picker-input/date-range-picker-input.spec.d.ts +1 -0
- package/date-range-picker-input/date-range-picker-input.spec.js +9 -0
- package/date-range-picker-input/date-range-picker-input.stories.d.ts +2 -0
- package/date-range-picker-input/date-range-picker-input.stories.js +44 -0
- package/date-range-picker-input/index.d.ts +2 -0
- package/date-range-picker-input/index.js +5 -0
- package/datetime-picker/datetime-picker.d.ts +17 -0
- package/datetime-picker/datetime-picker.js +98 -0
- package/datetime-picker/datetime-picker.spec.d.ts +1 -0
- package/datetime-picker/datetime-picker.spec.js +9 -0
- package/datetime-picker/datetime-picker.stories.d.ts +2 -0
- package/datetime-picker/datetime-picker.stories.js +37 -0
- package/datetime-picker/index.d.ts +2 -0
- package/datetime-picker/index.js +7 -0
- package/datetime-picker/translations.d.ts +17 -0
- package/datetime-picker/translations.js +18 -0
- package/datetime-picker-input/datetime-picker-input.d.ts +21 -0
- package/datetime-picker-input/datetime-picker-input.js +85 -0
- package/datetime-picker-input/datetime-picker-input.spec.d.ts +1 -0
- package/datetime-picker-input/datetime-picker-input.spec.js +9 -0
- package/datetime-picker-input/datetime-picker-input.stories.d.ts +2 -0
- package/datetime-picker-input/datetime-picker-input.stories.js +45 -0
- package/datetime-picker-input/get-datetime-string.d.ts +6 -0
- package/datetime-picker-input/get-datetime-string.js +18 -0
- package/datetime-picker-input/index.d.ts +2 -0
- package/datetime-picker-input/index.js +7 -0
- package/dialog/dialog-panel.d.ts +12 -0
- package/dialog/dialog-panel.js +13 -0
- package/dialog/dialog.d.ts +28 -0
- package/dialog/dialog.js +75 -0
- package/dialog/dialog.spec.d.ts +1 -0
- package/dialog/dialog.spec.js +9 -0
- package/dialog/dialog.stories.d.ts +2 -0
- package/dialog/dialog.stories.js +20 -0
- package/dialog/index.d.ts +4 -0
- package/dialog/index.js +7 -0
- package/dialog/theme.d.ts +11 -0
- package/dialog/theme.js +2 -0
- package/dropdown/dropdown.d.ts +13 -0
- package/dropdown/dropdown.js +50 -0
- package/dropdown/dropdown.spec.d.ts +1 -0
- package/dropdown/dropdown.spec.js +9 -0
- package/dropdown/dropdown.stories.d.ts +2 -0
- package/dropdown/dropdown.stories.js +23 -0
- package/dropdown/index.d.ts +2 -0
- package/dropdown/index.js +5 -0
- package/dropzone/dropzone-input.d.ts +24 -0
- package/dropzone/dropzone-input.js +146 -0
- package/dropzone/dropzone-list.d.ts +15 -0
- package/dropzone/dropzone-list.js +81 -0
- package/dropzone/dropzone.spec.d.ts +1 -0
- package/dropzone/dropzone.spec.js +9 -0
- package/dropzone/dropzone.stories.d.ts +2 -0
- package/dropzone/dropzone.stories.js +63 -0
- package/dropzone/handle-rejected-files.d.ts +2 -0
- package/dropzone/handle-rejected-files.js +17 -0
- package/dropzone/index.d.ts +6 -0
- package/dropzone/index.js +6 -0
- package/dropzone/types.d.ts +10 -0
- package/dropzone/types.js +2 -0
- package/error-message/error-message.d.ts +6 -0
- package/error-message/error-message.js +12 -0
- package/error-message/error-message.spec.d.ts +1 -0
- package/error-message/error-message.spec.js +9 -0
- package/error-message/error-message.stories.d.ts +2 -0
- package/error-message/error-message.stories.js +12 -0
- package/error-message/index.d.ts +1 -0
- package/error-message/index.js +5 -0
- package/file-input/file-input.d.ts +15 -0
- package/file-input/file-input.js +72 -0
- package/file-input/file-input.spec.d.ts +1 -0
- package/file-input/file-input.spec.js +9 -0
- package/file-input/file-input.stories.d.ts +2 -0
- package/file-input/file-input.stories.js +43 -0
- package/file-input/index.d.ts +2 -0
- package/file-input/index.js +5 -0
- package/flash-messages/flash-message.d.ts +17 -0
- package/flash-messages/flash-message.js +47 -0
- package/flash-messages/flash-messages-service.d.ts +4 -0
- package/flash-messages/flash-messages-service.js +14 -0
- package/flash-messages/flash-messages.d.ts +8 -0
- package/flash-messages/flash-messages.js +116 -0
- package/flash-messages/flash-messages.spec.d.ts +1 -0
- package/flash-messages/flash-messages.spec.js +9 -0
- package/flash-messages/flash-messages.stories.d.ts +2 -0
- package/flash-messages/flash-messages.stories.js +70 -0
- package/flash-messages/index.d.ts +3 -0
- package/flash-messages/index.js +8 -0
- package/flash-messages/theme.d.ts +6 -0
- package/flash-messages/theme.js +2 -0
- package/form-component/form-component.d.ts +14 -0
- package/form-component/form-component.js +41 -0
- package/form-component/form-component.spec.d.ts +1 -0
- package/form-component/form-component.spec.js +9 -0
- package/form-component/form-component.stories.d.ts +2 -0
- package/form-component/form-component.stories.js +19 -0
- package/form-component/index.d.ts +2 -0
- package/form-component/index.js +5 -0
- package/hooks/use-async-loading.d.ts +4 -0
- package/hooks/use-async-loading.js +31 -0
- package/hooks/use-dropdown.d.ts +39 -0
- package/hooks/use-dropdown.js +28 -0
- package/hooks/use-input-submit.d.ts +4 -0
- package/hooks/use-input-submit.js +39 -0
- package/icon/icon.d.ts +20 -0
- package/icon/icon.js +59 -0
- package/icon/icon.spec.d.ts +1 -0
- package/icon/icon.spec.js +10 -0
- package/icon/icon.stories.d.ts +6 -0
- package/icon/icon.stories.js +43 -0
- package/icon/index.d.ts +3 -0
- package/icon/index.js +5 -0
- package/icon/theme.d.ts +10 -0
- package/icon/theme.js +2 -0
- package/icon/types.d.ts +2 -0
- package/icon/types.js +2 -0
- package/icon-button/icon-button.d.ts +9 -0
- package/icon-button/icon-button.js +36 -0
- package/icon-button/icon-button.spec.d.ts +1 -0
- package/icon-button/icon-button.spec.js +9 -0
- package/icon-button/icon-button.stories.d.ts +2 -0
- package/icon-button/icon-button.stories.js +58 -0
- package/icon-button/index.d.ts +2 -0
- package/icon-button/index.js +5 -0
- package/image-gallery/components/close-button.d.ts +8 -0
- package/image-gallery/components/close-button.js +17 -0
- package/image-gallery/components/dot.d.ts +6 -0
- package/image-gallery/components/dot.js +14 -0
- package/image-gallery/components/gallery.d.ts +15 -0
- package/image-gallery/components/gallery.js +80 -0
- package/image-gallery/components/next-button.d.ts +7 -0
- package/image-gallery/components/next-button.js +14 -0
- package/image-gallery/components/prev-button.d.ts +7 -0
- package/image-gallery/components/prev-button.js +14 -0
- package/image-gallery/context.d.ts +9 -0
- package/image-gallery/context.js +12 -0
- package/image-gallery/image-gallery.d.ts +14 -0
- package/image-gallery/image-gallery.js +58 -0
- package/image-gallery/image-gallery.spec.d.ts +1 -0
- package/image-gallery/image-gallery.spec.js +9 -0
- package/image-gallery/image-gallery.stories.d.ts +2 -0
- package/image-gallery/image-gallery.stories.js +36 -0
- package/image-gallery/image.d.ts +3 -0
- package/image-gallery/image.js +18 -0
- package/image-gallery/index.d.ts +5 -0
- package/image-gallery/index.js +8 -0
- package/image-gallery/translations.d.ts +11 -0
- package/image-gallery/translations.js +12 -0
- package/image-gallery/types.d.ts +9 -0
- package/image-gallery/types.js +2 -0
- package/image-gallery/use-image.d.ts +2 -0
- package/image-gallery/use-image.js +16 -0
- package/info-box/index.d.ts +2 -0
- package/info-box/index.js +5 -0
- package/info-box/info-box.d.ts +15 -0
- package/info-box/info-box.js +61 -0
- package/info-box/info-box.spec.d.ts +1 -0
- package/info-box/info-box.spec.js +9 -0
- package/info-box/info-box.stories.d.ts +2 -0
- package/info-box/info-box.stories.js +20 -0
- package/info-box/theme.d.ts +15 -0
- package/info-box/theme.js +2 -0
- package/info-box/types.d.ts +3 -0
- package/info-box/types.js +2 -0
- package/input/index.d.ts +14 -0
- package/input/index.js +20 -0
- package/input/input-arrow-icon.d.ts +8 -0
- package/input/input-arrow-icon.js +15 -0
- package/input/input-element.d.ts +24 -0
- package/input/input-element.js +33 -0
- package/input/input-left-addon.d.ts +5 -0
- package/input/input-left-addon.js +14 -0
- package/input/input-left-element.d.ts +5 -0
- package/input/input-left-element.js +12 -0
- package/input/input-remove-button.d.ts +5 -0
- package/input/input-remove-button.js +29 -0
- package/input/input-right-addon.d.ts +5 -0
- package/input/input-right-addon.js +14 -0
- package/input/input-right-element.d.ts +5 -0
- package/input/input-right-element.js +12 -0
- package/input/input.d.ts +20 -0
- package/input/input.js +66 -0
- package/input/input.spec.d.ts +1 -0
- package/input/input.spec.js +10 -0
- package/input/input.stories.d.ts +4 -0
- package/input/input.stories.js +90 -0
- package/input/theme.d.ts +10 -0
- package/input/theme.js +2 -0
- package/label/index.d.ts +2 -0
- package/label/index.js +5 -0
- package/label/label.d.ts +12 -0
- package/label/label.js +37 -0
- package/label/label.spec.d.ts +1 -0
- package/label/label.spec.js +9 -0
- package/label/label.stories.d.ts +2 -0
- package/label/label.stories.js +12 -0
- package/layout/index.d.ts +2 -0
- package/layout/index.js +5 -0
- package/layout/layout.d.ts +13 -0
- package/layout/layout.js +46 -0
- package/layout/layout.spec.d.ts +1 -0
- package/layout/layout.spec.js +9 -0
- package/layout/layout.stories.d.ts +2 -0
- package/layout/layout.stories.js +15 -0
- package/layout/translations.d.ts +11 -0
- package/layout/translations.js +12 -0
- package/layout/uxf-logo.d.ts +6 -0
- package/layout/uxf-logo.js +13 -0
- package/lightbox/components/lightbox-close-button.d.ts +6 -0
- package/lightbox/components/lightbox-close-button.js +16 -0
- package/lightbox/components/lightbox-dialog.d.ts +15 -0
- package/lightbox/components/lightbox-dialog.js +49 -0
- package/lightbox/components/lightbox-dot.d.ts +9 -0
- package/lightbox/components/lightbox-dot.js +13 -0
- package/lightbox/components/lightbox-next-button.d.ts +6 -0
- package/lightbox/components/lightbox-next-button.js +16 -0
- package/lightbox/components/lightbox-prev-button.d.ts +6 -0
- package/lightbox/components/lightbox-prev-button.js +16 -0
- package/lightbox/components/use-lightbox-dialog.d.ts +34 -0
- package/lightbox/components/use-lightbox-dialog.js +51 -0
- package/lightbox/context.d.ts +11 -0
- package/lightbox/context.js +17 -0
- package/lightbox/index.d.ts +4 -0
- package/lightbox/index.js +9 -0
- package/lightbox/lightbox.d.ts +14 -0
- package/lightbox/lightbox.js +27 -0
- package/lightbox/lightbox.spec.d.ts +1 -0
- package/lightbox/lightbox.spec.js +9 -0
- package/lightbox/lightbox.stories.d.ts +2 -0
- package/lightbox/lightbox.stories.js +43 -0
- package/lightbox/translations.d.ts +23 -0
- package/lightbox/translations.js +24 -0
- package/lightbox/types.d.ts +20 -0
- package/lightbox/types.js +2 -0
- package/lightbox/use-lightbox-image.d.ts +2 -0
- package/lightbox/use-lightbox-image.js +17 -0
- package/lightbox/use-lightbox.d.ts +11 -0
- package/lightbox/use-lightbox.js +34 -0
- package/list-item/index.d.ts +2 -0
- package/list-item/index.js +5 -0
- package/list-item/list-item.d.ts +10 -0
- package/list-item/list-item.js +45 -0
- package/list-item/list-item.spec.d.ts +1 -0
- package/list-item/list-item.spec.js +9 -0
- package/list-item/list-item.stories.d.ts +2 -0
- package/list-item/list-item.stories.js +28 -0
- package/loader/index.d.ts +2 -0
- package/loader/index.js +5 -0
- package/loader/loader.d.ts +5 -0
- package/loader/loader.js +34 -0
- package/loader/loader.spec.d.ts +1 -0
- package/loader/loader.spec.js +9 -0
- package/loader/loader.stories.d.ts +2 -0
- package/loader/loader.stories.js +16 -0
- package/lozenge/index.d.ts +3 -0
- package/lozenge/index.js +5 -0
- package/lozenge/lozenge.d.ts +7 -0
- package/lozenge/lozenge.js +35 -0
- package/lozenge/lozenge.spec.d.ts +1 -0
- package/lozenge/lozenge.spec.js +9 -0
- package/lozenge/lozenge.stories.d.ts +2 -0
- package/lozenge/lozenge.stories.js +16 -0
- package/lozenge/theme.d.ts +14 -0
- package/lozenge/theme.js +2 -0
- package/message/index.d.ts +3 -0
- package/message/index.js +7 -0
- package/message/message-content.d.ts +20 -0
- package/message/message-content.js +42 -0
- package/message/message-service.d.ts +13 -0
- package/message/message-service.js +30 -0
- package/message/message.d.ts +24 -0
- package/message/message.js +55 -0
- package/message/message.spec.d.ts +1 -0
- package/message/message.spec.js +9 -0
- package/message/message.stories.d.ts +2 -0
- package/message/message.stories.js +71 -0
- package/message/theme.d.ts +12 -0
- package/message/theme.js +2 -0
- package/modal/index.d.ts +4 -0
- package/modal/index.js +11 -0
- package/modal/modal-provider.d.ts +3 -0
- package/modal/modal-provider.js +57 -0
- package/modal/modal-service.d.ts +4 -0
- package/modal/modal-service.js +20 -0
- package/modal/modal.d.ts +3 -0
- package/modal/modal.js +27 -0
- package/modal/modal.spec.d.ts +1 -0
- package/modal/modal.spec.js +9 -0
- package/modal/modal.stories.d.ts +3 -0
- package/modal/modal.stories.js +109 -0
- package/modal/theme.d.ts +4 -0
- package/modal/theme.js +2 -0
- package/modal/types.d.ts +23 -0
- package/modal/types.js +2 -0
- package/modal-dialog/modal-dialog.d.ts +13 -0
- package/modal-dialog/modal-dialog.js +18 -0
- package/modal-dialog/modal-dialog.stories.d.ts +2 -0
- package/modal-dialog/modal-dialog.stories.js +28 -0
- package/modal-header/index.d.ts +2 -0
- package/modal-header/index.js +5 -0
- package/modal-header/modal-header.d.ts +10 -0
- package/modal-header/modal-header.js +27 -0
- package/modal-header/modal-header.spec.d.ts +1 -0
- package/modal-header/modal-header.spec.js +9 -0
- package/modal-header/modal-header.stories.d.ts +2 -0
- package/modal-header/modal-header.stories.js +19 -0
- package/multi-combobox/index.d.ts +2 -0
- package/multi-combobox/index.js +5 -0
- package/multi-combobox/multi-combobox.d.ts +3 -0
- package/multi-combobox/multi-combobox.js +174 -0
- package/multi-combobox/multi-combobox.spec.d.ts +1 -0
- package/multi-combobox/multi-combobox.spec.js +10 -0
- package/multi-combobox/multi-combobox.stories.d.ts +4 -0
- package/multi-combobox/multi-combobox.stories.js +89 -0
- package/multi-combobox/translations.d.ts +29 -0
- package/multi-combobox/translations.js +30 -0
- package/multi-combobox/types.d.ts +48 -0
- package/multi-combobox/types.js +2 -0
- package/multi-select/index.d.ts +2 -0
- package/multi-select/index.js +5 -0
- package/multi-select/multi-select.d.ts +3 -0
- package/multi-select/multi-select.js +138 -0
- package/multi-select/multi-select.spec.d.ts +1 -0
- package/multi-select/multi-select.spec.js +9 -0
- package/multi-select/multi-select.stories.d.ts +3 -0
- package/multi-select/multi-select.stories.js +75 -0
- package/multi-select/translations.d.ts +17 -0
- package/multi-select/translations.js +18 -0
- package/multi-select/types.d.ts +43 -0
- package/multi-select/types.js +2 -0
- package/package.json +2 -2
- package/pagination/index.d.ts +2 -0
- package/pagination/index.js +5 -0
- package/pagination/pagination.d.ts +12 -0
- package/pagination/pagination.js +62 -0
- package/pagination/pagination.spec.d.ts +1 -0
- package/pagination/pagination.spec.js +9 -0
- package/pagination/pagination.stories.d.ts +2 -0
- package/pagination/pagination.stories.js +40 -0
- package/pagination/theme.d.ts +7 -0
- package/pagination/theme.js +2 -0
- package/paper/index.d.ts +2 -0
- package/paper/index.js +5 -0
- package/paper/paper.d.ts +5 -0
- package/paper/paper.js +33 -0
- package/paper/paper.spec.d.ts +1 -0
- package/paper/paper.spec.js +9 -0
- package/paper/paper.stories.d.ts +2 -0
- package/paper/paper.stories.js +13 -0
- package/radio/index.d.ts +3 -0
- package/radio/index.js +5 -0
- package/radio/radio.d.ts +12 -0
- package/radio/radio.js +53 -0
- package/radio/radio.spec.d.ts +1 -0
- package/radio/radio.spec.js +9 -0
- package/radio/radio.stories.d.ts +2 -0
- package/radio/radio.stories.js +29 -0
- package/radio/theme.d.ts +5 -0
- package/radio/theme.js +2 -0
- package/radio-group/index.d.ts +3 -0
- package/radio-group/index.js +5 -0
- package/radio-group/radio-group.d.ts +23 -0
- package/radio-group/radio-group.js +51 -0
- package/radio-group/radio-group.spec.d.ts +1 -0
- package/radio-group/radio-group.spec.js +9 -0
- package/radio-group/radio-group.stories.d.ts +2 -0
- package/radio-group/radio-group.stories.js +55 -0
- package/radio-group/theme.d.ts +7 -0
- package/radio-group/theme.js +2 -0
- package/raster-image/empty-image.d.ts +9 -0
- package/raster-image/empty-image.js +12 -0
- package/raster-image/img-sources.d.ts +17 -0
- package/raster-image/img-sources.js +44 -0
- package/raster-image/index.d.ts +2 -0
- package/raster-image/index.js +5 -0
- package/raster-image/raster-image.d.ts +35 -0
- package/raster-image/raster-image.js +36 -0
- package/raster-image/raster-image.spec.d.ts +1 -0
- package/raster-image/raster-image.spec.js +9 -0
- package/raster-image/raster-image.stories.d.ts +2 -0
- package/raster-image/raster-image.stories.js +12 -0
- package/raster-image/responsive-img-sources.d.ts +15 -0
- package/raster-image/responsive-img-sources.js +19 -0
- package/readmes.d.ts +66 -0
- package/readmes.js +135 -0
- package/select/index.d.ts +2 -0
- package/select/index.js +5 -0
- package/select/select.d.ts +47 -0
- package/select/select.js +103 -0
- package/select/select.spec.d.ts +1 -0
- package/select/select.spec.js +9 -0
- package/select/select.stories.d.ts +3 -0
- package/select/select.stories.js +78 -0
- package/select/translations.d.ts +11 -0
- package/select/translations.js +12 -0
- package/tabs/components/tabs-button-list.d.ts +12 -0
- package/tabs/components/tabs-button-list.js +36 -0
- package/tabs/components/tabs-button.d.ts +17 -0
- package/tabs/components/tabs-button.js +40 -0
- package/tabs/components/tabs-panel.d.ts +11 -0
- package/tabs/components/tabs-panel.js +16 -0
- package/tabs/components/tabs-panels.d.ts +2 -0
- package/tabs/components/tabs-panels.js +10 -0
- package/tabs/components/tabs-root.d.ts +10 -0
- package/tabs/components/tabs-root.js +12 -0
- package/tabs/create-tab-id.d.ts +1 -0
- package/tabs/create-tab-id.js +6 -0
- package/tabs/index.d.ts +2 -0
- package/tabs/index.js +18 -0
- package/tabs/panel-content.d.ts +9 -0
- package/tabs/panel-content.js +35 -0
- package/tabs/panel.d.ts +21 -0
- package/tabs/panel.js +11 -0
- package/tabs/tabs.d.ts +22 -0
- package/tabs/tabs.js +74 -0
- package/tabs/tabs.spec.d.ts +1 -0
- package/tabs/tabs.spec.js +10 -0
- package/tabs/tabs.stories.d.ts +3 -0
- package/tabs/tabs.stories.js +68 -0
- package/tabs/theme.d.ts +4 -0
- package/tabs/theme.js +2 -0
- package/tabs/types.d.ts +2 -0
- package/tabs/types.js +2 -0
- package/text-input/index.d.ts +2 -0
- package/text-input/index.js +5 -0
- package/text-input/text-input.d.ts +33 -0
- package/text-input/text-input.js +51 -0
- package/text-input/text-input.spec.d.ts +1 -0
- package/text-input/text-input.spec.js +9 -0
- package/text-input/text-input.stories.d.ts +3 -0
- package/text-input/text-input.stories.js +64 -0
- package/text-link/index.d.ts +2 -0
- package/text-link/index.js +5 -0
- package/text-link/text-link.d.ts +10 -0
- package/text-link/text-link.js +41 -0
- package/text-link/text-link.spec.d.ts +1 -0
- package/text-link/text-link.spec.js +9 -0
- package/text-link/text-link.stories.d.ts +2 -0
- package/text-link/text-link.stories.js +17 -0
- package/text-link/theme.d.ts +4 -0
- package/text-link/theme.js +2 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.js +5 -0
- package/textarea/textarea.d.ts +18 -0
- package/textarea/textarea.js +59 -0
- package/textarea/textarea.spec.d.ts +1 -0
- package/textarea/textarea.spec.js +9 -0
- package/textarea/textarea.stories.d.ts +2 -0
- package/textarea/textarea.stories.js +39 -0
- package/time-picker/index.d.ts +2 -0
- package/time-picker/index.js +5 -0
- package/time-picker/time-picker-hour.d.ts +5 -0
- package/time-picker/time-picker-hour.js +49 -0
- package/time-picker/time-picker-hours.d.ts +2 -0
- package/time-picker/time-picker-hours.js +15 -0
- package/time-picker/time-picker-minute.d.ts +5 -0
- package/time-picker/time-picker-minute.js +49 -0
- package/time-picker/time-picker-minutes.d.ts +2 -0
- package/time-picker/time-picker-minutes.js +15 -0
- package/time-picker/time-picker.d.ts +9 -0
- package/time-picker/time-picker.js +74 -0
- package/time-picker/time-picker.spec.d.ts +1 -0
- package/time-picker/time-picker.spec.js +9 -0
- package/time-picker/time-picker.stories.d.ts +2 -0
- package/time-picker/time-picker.stories.js +36 -0
- package/time-picker/translations.d.ts +17 -0
- package/time-picker/translations.js +18 -0
- package/time-picker-input/index.d.ts +2 -0
- package/time-picker-input/index.js +8 -0
- package/time-picker-input/time-picker-input.d.ts +17 -0
- package/time-picker-input/time-picker-input.js +83 -0
- package/time-picker-input/time-picker-input.spec.d.ts +1 -0
- package/time-picker-input/time-picker-input.spec.js +9 -0
- package/time-picker-input/time-picker-input.stories.d.ts +2 -0
- package/time-picker-input/time-picker-input.stories.js +45 -0
- package/toggle/index.d.ts +3 -0
- package/toggle/index.js +5 -0
- package/toggle/theme.d.ts +10 -0
- package/toggle/theme.js +2 -0
- package/toggle/toggle.d.ts +13 -0
- package/toggle/toggle.js +39 -0
- package/toggle/toggle.spec.d.ts +1 -0
- package/toggle/toggle.spec.js +9 -0
- package/toggle/toggle.stories.d.ts +2 -0
- package/toggle/toggle.stories.js +41 -0
- package/tooltip/index.d.ts +4 -0
- package/tooltip/index.js +7 -0
- package/tooltip/tooltip.d.ts +9 -0
- package/tooltip/tooltip.js +73 -0
- package/tooltip/tooltip.spec.d.ts +1 -0
- package/tooltip/tooltip.spec.js +9 -0
- package/tooltip/tooltip.stories.d.ts +2 -0
- package/tooltip/tooltip.stories.js +38 -0
- package/tooltip/use-tooltip.d.ts +55 -0
- package/tooltip/use-tooltip.js +39 -0
- package/translations/cs.json +61 -0
- package/translations/de.json +61 -0
- package/translations/en.json +61 -0
- package/translations/sk.json +61 -0
- package/tw-tokens/tw-box-shadow.d.ts +12 -0
- package/tw-tokens/tw-box-shadow.js +15 -0
- package/tw-tokens/tw-colors.d.ts +468 -0
- package/tw-tokens/tw-colors.js +471 -0
- package/tw-tokens/tw-containers.d.ts +8 -0
- package/tw-tokens/tw-containers.js +5 -0
- package/tw-tokens/tw-font-size.d.ts +55 -0
- package/tw-tokens/tw-font-size.js +32 -0
- package/tw-tokens/tw-font-weight.d.ts +12 -0
- package/tw-tokens/tw-font-weight.js +15 -0
- package/tw-tokens/tw-line-height.d.ts +17 -0
- package/tw-tokens/tw-line-height.js +20 -0
- package/tw-tokens/tw-screens.d.ts +8 -0
- package/tw-tokens/tw-screens.js +5 -0
- package/tw-tokens/tw-spacing.d.ts +39 -0
- package/tw-tokens/tw-spacing.js +42 -0
- package/tw-tokens/tw-z-index.d.ts +21 -0
- package/tw-tokens/tw-z-index.js +24 -0
- package/types/color.d.ts +2 -0
- package/types/color.js +2 -0
- package/types/file-response.d.ts +6 -0
- package/types/file-response.js +2 -0
- package/types/form-control-props.d.ts +30 -0
- package/types/form-control-props.js +2 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +19 -0
- package/typography/typography.spec.d.ts +1 -0
- package/typography/typography.spec.js +9 -0
- package/typography/typography.stories.d.ts +2 -0
- package/typography/typography.stories.js +23 -0
- package/utils/action.d.ts +3 -0
- package/utils/action.js +10 -0
- package/utils/component-structure-analyzer.d.ts +6 -0
- package/utils/component-structure-analyzer.js +10 -0
- package/utils/files/get-file-icon.d.ts +2 -0
- package/utils/files/get-file-icon.js +18 -0
- package/utils/files/get-file-icon.test.d.ts +1 -0
- package/utils/files/get-file-icon.test.js +22 -0
- package/utils/files/get-file-url.d.ts +2 -0
- package/utils/files/get-file-url.js +6 -0
- package/utils/files/get-file-url.test.d.ts +1 -0
- package/utils/files/get-file-url.test.js +44 -0
- package/utils/get-default-icon-name.d.ts +4 -0
- package/utils/get-default-icon-name.js +19 -0
- package/utils/get-dropzone-state.d.ts +7 -0
- package/utils/get-dropzone-state.js +23 -0
- package/utils/get-dropzone-state.test.d.ts +1 -0
- package/utils/get-dropzone-state.test.js +88 -0
- package/utils/mocks/upload-file.mock.d.ts +3 -0
- package/utils/mocks/upload-file.mock.js +46 -0
- package/utils/mocks/upload-file.mock.test.d.ts +1 -0
- package/utils/mocks/upload-file.mock.test.js +34 -0
- package/utils/next-link.d.ts +22 -0
- package/utils/next-link.js +2 -0
- package/utils/snap-test.d.ts +2 -0
- package/utils/snap-test.js +22 -0
- package/utils/storybook-config.d.ts +49 -0
- package/utils/storybook-config.js +72 -0
- package/utils/validator/validator-exceptions.d.ts +3 -0
- package/utils/validator/validator-exceptions.js +7 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const twSpacing: {
|
|
2
|
+
"0": string;
|
|
3
|
+
"1": string;
|
|
4
|
+
"2": string;
|
|
5
|
+
"3": string;
|
|
6
|
+
"4": string;
|
|
7
|
+
"5": string;
|
|
8
|
+
"6": string;
|
|
9
|
+
"7": string;
|
|
10
|
+
"8": string;
|
|
11
|
+
"9": string;
|
|
12
|
+
"10": string;
|
|
13
|
+
"11": string;
|
|
14
|
+
"12": string;
|
|
15
|
+
"14": string;
|
|
16
|
+
"16": string;
|
|
17
|
+
"20": string;
|
|
18
|
+
"24": string;
|
|
19
|
+
"28": string;
|
|
20
|
+
"32": string;
|
|
21
|
+
"36": string;
|
|
22
|
+
"40": string;
|
|
23
|
+
"44": string;
|
|
24
|
+
"48": string;
|
|
25
|
+
"52": string;
|
|
26
|
+
"56": string;
|
|
27
|
+
"60": string;
|
|
28
|
+
"64": string;
|
|
29
|
+
"72": string;
|
|
30
|
+
"80": string;
|
|
31
|
+
"96": string;
|
|
32
|
+
px: string;
|
|
33
|
+
"0.5": string;
|
|
34
|
+
"1.5": string;
|
|
35
|
+
"2.5": string;
|
|
36
|
+
"3.5": string;
|
|
37
|
+
inherit: string;
|
|
38
|
+
};
|
|
39
|
+
export type TwSpacing = typeof twSpacing;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file is generated automatically, do not change anything manually in the contents of this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.twSpacing = void 0;
|
|
5
|
+
exports.twSpacing = {
|
|
6
|
+
"0": "0px",
|
|
7
|
+
"1": "0.25rem",
|
|
8
|
+
"2": "0.5rem",
|
|
9
|
+
"3": "0.75rem",
|
|
10
|
+
"4": "1rem",
|
|
11
|
+
"5": "1.25rem",
|
|
12
|
+
"6": "1.5rem",
|
|
13
|
+
"7": "1.75rem",
|
|
14
|
+
"8": "2rem",
|
|
15
|
+
"9": "2.25rem",
|
|
16
|
+
"10": "2.5rem",
|
|
17
|
+
"11": "2.75rem",
|
|
18
|
+
"12": "3rem",
|
|
19
|
+
"14": "3.5rem",
|
|
20
|
+
"16": "4rem",
|
|
21
|
+
"20": "5rem",
|
|
22
|
+
"24": "6rem",
|
|
23
|
+
"28": "7rem",
|
|
24
|
+
"32": "8rem",
|
|
25
|
+
"36": "9rem",
|
|
26
|
+
"40": "10rem",
|
|
27
|
+
"44": "11rem",
|
|
28
|
+
"48": "12rem",
|
|
29
|
+
"52": "13rem",
|
|
30
|
+
"56": "14rem",
|
|
31
|
+
"60": "15rem",
|
|
32
|
+
"64": "16rem",
|
|
33
|
+
"72": "18rem",
|
|
34
|
+
"80": "20rem",
|
|
35
|
+
"96": "24rem",
|
|
36
|
+
px: "1px",
|
|
37
|
+
"0.5": "0.125rem",
|
|
38
|
+
"1.5": "0.375rem",
|
|
39
|
+
"2.5": "0.625rem",
|
|
40
|
+
"3.5": "0.875rem",
|
|
41
|
+
inherit: "inherit",
|
|
42
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const twZIndex: {
|
|
2
|
+
"0": string;
|
|
3
|
+
"1": string;
|
|
4
|
+
"10": string;
|
|
5
|
+
"20": string;
|
|
6
|
+
"30": string;
|
|
7
|
+
"40": string;
|
|
8
|
+
"50": string;
|
|
9
|
+
auto: string;
|
|
10
|
+
focus: string;
|
|
11
|
+
fixed: string;
|
|
12
|
+
menu: string;
|
|
13
|
+
header: string;
|
|
14
|
+
modal: string;
|
|
15
|
+
imageGallery: string;
|
|
16
|
+
lightbox: string;
|
|
17
|
+
dropdown: string;
|
|
18
|
+
flashMessage: string;
|
|
19
|
+
tooltip: string;
|
|
20
|
+
};
|
|
21
|
+
export type TwZIndex = typeof twZIndex;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file is generated automatically, do not change anything manually in the contents of this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.twZIndex = void 0;
|
|
5
|
+
exports.twZIndex = {
|
|
6
|
+
"0": "0",
|
|
7
|
+
"1": "1",
|
|
8
|
+
"10": "10",
|
|
9
|
+
"20": "20",
|
|
10
|
+
"30": "30",
|
|
11
|
+
"40": "40",
|
|
12
|
+
"50": "50",
|
|
13
|
+
auto: "auto",
|
|
14
|
+
focus: "5",
|
|
15
|
+
fixed: "10",
|
|
16
|
+
menu: "25",
|
|
17
|
+
header: "50",
|
|
18
|
+
modal: "100",
|
|
19
|
+
imageGallery: "150",
|
|
20
|
+
lightbox: "150",
|
|
21
|
+
dropdown: "200",
|
|
22
|
+
flashMessage: "250",
|
|
23
|
+
tooltip: "300",
|
|
24
|
+
};
|
package/types/color.d.ts
ADDED
package/types/color.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type UploadProgressEvent = Pick<ProgressEvent, "lengthComputable" | "loaded" | "total">;
|
|
2
|
+
/** @deprecated use @uxf/core/types */
|
|
3
|
+
export interface UploadOptions {
|
|
4
|
+
abortController?: AbortController;
|
|
5
|
+
onUploadProgress?: (progressEvent: UploadProgressEvent) => void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChangeEvent, FocusEventHandler } from "react";
|
|
2
|
+
export interface ControlProps<ValueType, ElementType = HTMLInputElement, RestParams extends unknown[] = []> {
|
|
3
|
+
value: ValueType;
|
|
4
|
+
onChange: (value: ValueType, event?: ChangeEvent<ElementType>, ...args: RestParams) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface FormControlProps<ValueType, ElementType = HTMLInputElement, RestParams extends unknown[] = []> extends ControlProps<ValueType, ElementType, RestParams> {
|
|
7
|
+
onBlur?: FocusEventHandler<ElementType>;
|
|
8
|
+
onFocus?: FocusEventHandler<ElementType>;
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* @about
|
|
12
|
+
* The input element will be disabled.
|
|
13
|
+
*/
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @about
|
|
17
|
+
* Used to show forced focus indicator.
|
|
18
|
+
*/
|
|
19
|
+
isFocused?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @about
|
|
22
|
+
* It prevents the user from changing the value of the field (not from interacting with the field).
|
|
23
|
+
*/
|
|
24
|
+
isReadOnly?: boolean;
|
|
25
|
+
isInvalid?: boolean;
|
|
26
|
+
isRequired?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface Clearable {
|
|
29
|
+
isClearable?: boolean;
|
|
30
|
+
}
|
package/types/index.d.ts
ADDED
package/types/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./color"), exports);
|
|
18
|
+
__exportStar(require("./file-response"), exports);
|
|
19
|
+
__exportStar(require("./form-control-props"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
+
const typography_stories_1 = require("./typography.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(typography_stories_1.Default, null));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Default = Default;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
function Default() {
|
|
9
|
+
return (react_1.default.createElement("div", { className: "space-y-4 dark:text-white" },
|
|
10
|
+
react_1.default.createElement("h1", { className: "uxf-typo-h1" }, ".uxf-typo-h1"),
|
|
11
|
+
react_1.default.createElement("h2", { className: "uxf-typo-h2" }, ".uxf-typo-h2"),
|
|
12
|
+
react_1.default.createElement("h3", { className: "uxf-typo-h3" }, ".uxf-typo-h3"),
|
|
13
|
+
react_1.default.createElement("h4", { className: "uxf-typo-h4" }, ".uxf-typo-h4"),
|
|
14
|
+
react_1.default.createElement("h5", { className: "uxf-typo-h5" }, ".uxf-typo-h5"),
|
|
15
|
+
react_1.default.createElement("h6", { className: "uxf-typo-h6" }, ".uxf.typo-h6"),
|
|
16
|
+
react_1.default.createElement("p", { className: "uxf-typo-body" }, ".uxf-typo-body"),
|
|
17
|
+
react_1.default.createElement("p", { className: "uxf-typo-body2" }, ".uxf-typo-body2"),
|
|
18
|
+
react_1.default.createElement("p", { className: "uxf-typo-button" }, ".uxf-typo-button"),
|
|
19
|
+
react_1.default.createElement("p", { className: "uxf-typo-caption" }, ".uxf-typo-caption"),
|
|
20
|
+
react_1.default.createElement("p", { className: "uxf-typo-medium" }, ".uxf-typo-medium"),
|
|
21
|
+
react_1.default.createElement("p", { className: "uxf-typo-medium2" }, ".uxf-typo-medium2"),
|
|
22
|
+
react_1.default.createElement("p", { className: "uxf-typo-overline" }, ".uxf-typo-overline")));
|
|
23
|
+
}
|
package/utils/action.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.action = action;
|
|
4
|
+
function action(name, handler) {
|
|
5
|
+
return function (...args) {
|
|
6
|
+
// eslint-disable-next-line no-console
|
|
7
|
+
console.log(name, ...args);
|
|
8
|
+
handler(...args);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
function ComponentStructureAnalyzer(props) {
|
|
8
|
+
return react_1.default.createElement("div", { className: "uxf-component-structure-analyzer" }, props.children);
|
|
9
|
+
}
|
|
10
|
+
exports.default = ComponentStructureAnalyzer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getIconNameFromFileExtension = getIconNameFromFileExtension;
|
|
4
|
+
function getIconNameFromFileExtension(extension) {
|
|
5
|
+
switch (extension) {
|
|
6
|
+
case "jpg":
|
|
7
|
+
case "jpeg":
|
|
8
|
+
case "png":
|
|
9
|
+
case "gif":
|
|
10
|
+
return "imageFile";
|
|
11
|
+
case "mp4":
|
|
12
|
+
case "avi":
|
|
13
|
+
case "mov":
|
|
14
|
+
return "videoFile";
|
|
15
|
+
default:
|
|
16
|
+
return "file";
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const get_file_icon_1 = require("./get-file-icon");
|
|
4
|
+
describe("getIconNameFromFileExtension", () => {
|
|
5
|
+
it("should return 'imageFile' for image extensions", () => {
|
|
6
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("jpg")).toBe("imageFile");
|
|
7
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("jpeg")).toBe("imageFile");
|
|
8
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("png")).toBe("imageFile");
|
|
9
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("gif")).toBe("imageFile");
|
|
10
|
+
});
|
|
11
|
+
it("should return 'videoFile' for video extensions", () => {
|
|
12
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("mp4")).toBe("videoFile");
|
|
13
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("avi")).toBe("videoFile");
|
|
14
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("mov")).toBe("videoFile");
|
|
15
|
+
});
|
|
16
|
+
it("should return 'file' for unknown extensions", () => {
|
|
17
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("pdf")).toBe("file");
|
|
18
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("docx")).toBe("file");
|
|
19
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("txt")).toBe("file");
|
|
20
|
+
expect((0, get_file_icon_1.getIconNameFromFileExtension)("exe")).toBe("file");
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileUrl = getFileUrl;
|
|
4
|
+
function getFileUrl(domain, file) {
|
|
5
|
+
return `${domain}/upload/${file.namespace || "default"}/${file.uuid[0]}/${file.uuid[1]}/${file.uuid}.${file.extension}`;
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const get_file_url_1 = require("./get-file-url");
|
|
4
|
+
describe("getFileUrl", () => {
|
|
5
|
+
it("should generate a correct file URL with default namespace", () => {
|
|
6
|
+
const domain = "https://example.com";
|
|
7
|
+
const file = {
|
|
8
|
+
id: 1,
|
|
9
|
+
name: "test",
|
|
10
|
+
namespace: null,
|
|
11
|
+
uuid: "123-456-789",
|
|
12
|
+
extension: "jpg",
|
|
13
|
+
type: "image/jpeg",
|
|
14
|
+
};
|
|
15
|
+
const result = (0, get_file_url_1.getFileUrl)(domain, file);
|
|
16
|
+
expect(result).toBe("https://example.com/upload/default/1/2/123-456-789.jpg");
|
|
17
|
+
});
|
|
18
|
+
it("should generate a correct file URL with specified namespace", () => {
|
|
19
|
+
const domain = "https://example.com";
|
|
20
|
+
const file = {
|
|
21
|
+
id: 2,
|
|
22
|
+
name: "anotherTest",
|
|
23
|
+
namespace: "customNamespace",
|
|
24
|
+
uuid: "123-456-789",
|
|
25
|
+
extension: "png",
|
|
26
|
+
type: "image/png",
|
|
27
|
+
};
|
|
28
|
+
const result = (0, get_file_url_1.getFileUrl)(domain, file);
|
|
29
|
+
expect(result).toBe("https://example.com/upload/customNamespace/1/2/123-456-789.png");
|
|
30
|
+
});
|
|
31
|
+
it("should generate a correct file URL with default namespace and different extension", () => {
|
|
32
|
+
const domain = "https://example.com";
|
|
33
|
+
const file = {
|
|
34
|
+
id: 3,
|
|
35
|
+
name: "document",
|
|
36
|
+
namespace: null,
|
|
37
|
+
uuid: "111-222-333",
|
|
38
|
+
extension: "pdf",
|
|
39
|
+
type: "application/pdf",
|
|
40
|
+
};
|
|
41
|
+
const result = (0, get_file_url_1.getFileUrl)(domain, file);
|
|
42
|
+
expect(result).toBe("https://example.com/upload/default/1/1/111-222-333.pdf");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultIconName = void 0;
|
|
4
|
+
const getDefaultIconName = (color) => {
|
|
5
|
+
switch (color) {
|
|
6
|
+
case "negative":
|
|
7
|
+
return "solid-octagon-xmark";
|
|
8
|
+
case "positive":
|
|
9
|
+
return "solid-badge-check";
|
|
10
|
+
case "warning":
|
|
11
|
+
return "solid-triangle-exclamation";
|
|
12
|
+
case "brand":
|
|
13
|
+
case "info":
|
|
14
|
+
case "neutral":
|
|
15
|
+
default:
|
|
16
|
+
return "solid-circle-info";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.getDefaultIconName = getDefaultIconName;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDropzoneState = getDropzoneState;
|
|
4
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
5
|
+
function getDropzoneState(files) {
|
|
6
|
+
const errors = files
|
|
7
|
+
.filter((file) => file.error)
|
|
8
|
+
.map((file) => file.error)
|
|
9
|
+
.join("; ");
|
|
10
|
+
const isUploading = (0, is_not_nil_1.isNotNil)(files.find((file) => file.id < 0));
|
|
11
|
+
if (errors) {
|
|
12
|
+
return {
|
|
13
|
+
errorMessage: errors,
|
|
14
|
+
status: "ERROR",
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
if (isUploading) {
|
|
18
|
+
return {
|
|
19
|
+
status: "UPLOADING",
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return { status: "OK" };
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const get_dropzone_state_1 = require("./get-dropzone-state");
|
|
4
|
+
describe("getDropzoneState", () => {
|
|
5
|
+
it("should return OK state when there are no files", () => {
|
|
6
|
+
const files = [];
|
|
7
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
8
|
+
expect(result).toEqual({ status: "OK" });
|
|
9
|
+
});
|
|
10
|
+
it("should return UPLOADING state when there are files with negative IDs", () => {
|
|
11
|
+
const files = [
|
|
12
|
+
{
|
|
13
|
+
id: -1,
|
|
14
|
+
name: "file1.txt",
|
|
15
|
+
uuid: "uuid1",
|
|
16
|
+
extension: "txt",
|
|
17
|
+
error: null,
|
|
18
|
+
progress: null,
|
|
19
|
+
namespace: null,
|
|
20
|
+
},
|
|
21
|
+
{ id: 1, name: "file2.txt", uuid: "uuid2", extension: "txt", error: null, progress: null, namespace: null },
|
|
22
|
+
];
|
|
23
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
24
|
+
expect(result).toEqual({ status: "UPLOADING" });
|
|
25
|
+
});
|
|
26
|
+
it("should return ERROR state with error messages when files have errors", () => {
|
|
27
|
+
const files = [
|
|
28
|
+
{
|
|
29
|
+
id: 1,
|
|
30
|
+
name: "file1.txt",
|
|
31
|
+
uuid: "uuid1",
|
|
32
|
+
extension: "txt",
|
|
33
|
+
error: "File too large",
|
|
34
|
+
progress: null,
|
|
35
|
+
namespace: null,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 2,
|
|
39
|
+
name: "file2.txt",
|
|
40
|
+
uuid: "uuid2",
|
|
41
|
+
extension: "txt",
|
|
42
|
+
error: "Unsupported format",
|
|
43
|
+
progress: null,
|
|
44
|
+
namespace: null,
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
48
|
+
expect(result).toEqual({
|
|
49
|
+
errorMessage: "File too large; Unsupported format",
|
|
50
|
+
status: "ERROR",
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
it("should return OK state when files are uploaded successfully", () => {
|
|
54
|
+
const files = [
|
|
55
|
+
{ id: 1, name: "file1.txt", uuid: "uuid1", extension: "txt", error: null, progress: null, namespace: null },
|
|
56
|
+
{ id: 2, name: "file2.txt", uuid: "uuid2", extension: "txt", error: null, progress: null, namespace: null },
|
|
57
|
+
];
|
|
58
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
59
|
+
expect(result).toEqual({ status: "OK" });
|
|
60
|
+
});
|
|
61
|
+
it("should return OK state when some files are uploading but no errors", () => {
|
|
62
|
+
const files = [
|
|
63
|
+
{ id: 1, name: "file1.txt", uuid: "uuid1", extension: "txt", error: null, progress: 50, namespace: null },
|
|
64
|
+
{ id: 2, name: "file2.txt", uuid: "uuid2", extension: "txt", error: null, progress: 75, namespace: null },
|
|
65
|
+
];
|
|
66
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
67
|
+
expect(result).toEqual({ status: "OK" });
|
|
68
|
+
});
|
|
69
|
+
it("should return ERROR state when there is a file with an error and uploading files", () => {
|
|
70
|
+
const files = [
|
|
71
|
+
{
|
|
72
|
+
id: -1,
|
|
73
|
+
name: "file1.txt",
|
|
74
|
+
uuid: "uuid1",
|
|
75
|
+
extension: "txt",
|
|
76
|
+
error: "File too large",
|
|
77
|
+
progress: null,
|
|
78
|
+
namespace: null,
|
|
79
|
+
},
|
|
80
|
+
{ id: -2, name: "file2.txt", uuid: "uuid2", extension: "txt", error: null, progress: 50, namespace: null },
|
|
81
|
+
];
|
|
82
|
+
const result = (0, get_dropzone_state_1.getDropzoneState)(files);
|
|
83
|
+
expect(result).toEqual({
|
|
84
|
+
errorMessage: "File too large",
|
|
85
|
+
status: "ERROR",
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadFile = uploadFile;
|
|
4
|
+
function getRandomUuid() {
|
|
5
|
+
return "00000000-0000-0000-0000-000000000000"
|
|
6
|
+
.split("-")
|
|
7
|
+
.map((el) => Array(el.length)
|
|
8
|
+
.fill(0)
|
|
9
|
+
.map(() => Math.round(Math.random() * 9).toString())
|
|
10
|
+
.join(""))
|
|
11
|
+
.join("-");
|
|
12
|
+
}
|
|
13
|
+
function uploadFile(file, uploadOptions) {
|
|
14
|
+
// axios.put("/api/upload", file, { signal: uploadOptions?.abortController?.signal, onUploadProgress: uploadOptions?.onUploadProgress });
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
const time = file.size / 100;
|
|
17
|
+
const interval = time / 10;
|
|
18
|
+
let loaded = 0;
|
|
19
|
+
const intervalTimer = window.setInterval(() => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
if ((_a = uploadOptions === null || uploadOptions === void 0 ? void 0 : uploadOptions.abortController) === null || _a === void 0 ? void 0 : _a.signal.aborted) {
|
|
22
|
+
clearInterval(intervalTimer);
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
24
|
+
clearTimeout(timeoutTimer);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
loaded += (file.size / time) * interval;
|
|
28
|
+
(_b = uploadOptions === null || uploadOptions === void 0 ? void 0 : uploadOptions.onUploadProgress) === null || _b === void 0 ? void 0 : _b.call(uploadOptions, {
|
|
29
|
+
lengthComputable: true,
|
|
30
|
+
loaded,
|
|
31
|
+
total: file.size,
|
|
32
|
+
});
|
|
33
|
+
}, interval);
|
|
34
|
+
const timeoutTimer = window.setTimeout(() => {
|
|
35
|
+
clearInterval(intervalTimer);
|
|
36
|
+
clearTimeout(timeoutTimer);
|
|
37
|
+
resolve({
|
|
38
|
+
id: Math.round(Math.random() * 100000000),
|
|
39
|
+
uuid: getRandomUuid(),
|
|
40
|
+
name: file.name,
|
|
41
|
+
namespace: null,
|
|
42
|
+
extension: file.name.split(".").slice(-1).join(""),
|
|
43
|
+
});
|
|
44
|
+
}, time);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const upload_file_mock_1 = require("./upload-file.mock");
|
|
4
|
+
describe("uploadFile", () => {
|
|
5
|
+
const mockFile = new File(["file content"], "test.txt", { type: "text/plain" });
|
|
6
|
+
it("should resolve with a FileResponse object after upload", async () => {
|
|
7
|
+
const mockOnUploadProgress = jest.fn();
|
|
8
|
+
const mockAbortController = new AbortController();
|
|
9
|
+
const response = await (0, upload_file_mock_1.uploadFile)(mockFile, {
|
|
10
|
+
onUploadProgress: mockOnUploadProgress,
|
|
11
|
+
abortController: mockAbortController,
|
|
12
|
+
});
|
|
13
|
+
expect(response).toEqual({
|
|
14
|
+
id: expect.any(Number),
|
|
15
|
+
uuid: expect.any(String),
|
|
16
|
+
name: "test.txt",
|
|
17
|
+
namespace: null,
|
|
18
|
+
extension: "txt",
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
it("should call onUploadProgress with correct values", async () => {
|
|
22
|
+
const mockOnUploadProgress = jest.fn();
|
|
23
|
+
const mockAbortController = new AbortController();
|
|
24
|
+
await (0, upload_file_mock_1.uploadFile)(mockFile, {
|
|
25
|
+
onUploadProgress: mockOnUploadProgress,
|
|
26
|
+
abortController: mockAbortController,
|
|
27
|
+
});
|
|
28
|
+
expect(mockOnUploadProgress).toHaveBeenCalledWith(expect.objectContaining({
|
|
29
|
+
lengthComputable: true,
|
|
30
|
+
loaded: expect.any(Number),
|
|
31
|
+
total: mockFile.size,
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
});
|