@uxf/ui 11.72.3 → 11.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +2 -2
- package/translations/translations.d.ts +237 -0
- package/translations/translations.js +31 -0
- package/_file-input-base/file-input-base.d.ts +0 -13
- package/_file-input-base/file-input-base.js +0 -50
- package/_file-input-base/index.d.ts +0 -2
- package/_file-input-base/index.js +0 -5
- package/_input-with-popover/index.d.ts +0 -2
- package/_input-with-popover/index.js +0 -5
- package/_input-with-popover/input-with-popover.d.ts +0 -25
- package/_input-with-popover/input-with-popover.js +0 -93
- package/_private-utils/get-provider-config.d.ts +0 -2
- package/_private-utils/get-provider-config.js +0 -19
- package/accordion/accordion.d.ts +0 -33
- package/accordion/accordion.js +0 -78
- package/accordion/accordion.spec.d.ts +0 -1
- package/accordion/accordion.spec.js +0 -9
- package/accordion/accordion.stories.d.ts +0 -2
- package/accordion/accordion.stories.js +0 -20
- package/accordion/index.d.ts +0 -2
- package/accordion/index.js +0 -5
- package/alert-bubble/alert-bubble.d.ts +0 -10
- package/alert-bubble/alert-bubble.js +0 -22
- package/alert-bubble/alert-bubble.spec.d.ts +0 -1
- package/alert-bubble/alert-bubble.spec.js +0 -9
- package/alert-bubble/alert-bubble.stories.d.ts +0 -2
- package/alert-bubble/alert-bubble.stories.js +0 -43
- package/alert-bubble/index.d.ts +0 -3
- package/alert-bubble/index.js +0 -5
- package/alert-bubble/theme.d.ts +0 -16
- package/alert-bubble/theme.js +0 -2
- package/announcement-bar/announcement-bar.d.ts +0 -9
- package/announcement-bar/announcement-bar.js +0 -40
- package/announcement-bar/announcement-bar.spec.d.ts +0 -1
- package/announcement-bar/announcement-bar.spec.js +0 -9
- package/announcement-bar/announcement-bar.stories.d.ts +0 -2
- package/announcement-bar/announcement-bar.stories.js +0 -36
- package/announcement-bar/index.d.ts +0 -2
- package/announcement-bar/index.js +0 -5
- package/announcement-bar/theme.d.ts +0 -9
- package/announcement-bar/theme.js +0 -2
- package/avatar/avatar.d.ts +0 -6
- package/avatar/avatar.js +0 -35
- package/avatar/avatar.spec.d.ts +0 -1
- package/avatar/avatar.spec.js +0 -9
- package/avatar/avatar.stories.d.ts +0 -2
- package/avatar/avatar.stories.js +0 -13
- package/avatar/index.d.ts +0 -2
- package/avatar/index.js +0 -5
- package/avatar-file-input/avatar-file-input.d.ts +0 -18
- package/avatar-file-input/avatar-file-input.js +0 -71
- package/avatar-file-input/avatar-file-input.spec.d.ts +0 -1
- package/avatar-file-input/avatar-file-input.spec.js +0 -9
- package/avatar-file-input/avatar-file-input.stories.d.ts +0 -2
- package/avatar-file-input/avatar-file-input.stories.js +0 -48
- package/avatar-file-input/index.d.ts +0 -2
- package/avatar-file-input/index.js +0 -5
- package/avatar-file-input/theme.d.ts +0 -5
- package/avatar-file-input/theme.js +0 -2
- package/badge/badge.d.ts +0 -7
- package/badge/badge.js +0 -35
- package/badge/badge.spec.d.ts +0 -1
- package/badge/badge.spec.js +0 -9
- package/badge/badge.stories.d.ts +0 -2
- package/badge/badge.stories.js +0 -32
- package/badge/index.d.ts +0 -3
- package/badge/index.js +0 -5
- package/badge/theme.d.ts +0 -6
- package/badge/theme.js +0 -2
- package/button/button.d.ts +0 -17
- package/button/button.js +0 -50
- package/button/button.spec.d.ts +0 -1
- package/button/button.spec.js +0 -9
- package/button/button.stories.d.ts +0 -4
- package/button/button.stories.js +0 -94
- package/button/index.d.ts +0 -3
- package/button/index.js +0 -5
- package/button/theme.d.ts +0 -22
- package/button/theme.js +0 -2
- package/button-group/button-group.d.ts +0 -6
- package/button-group/button-group.js +0 -13
- package/button-group/button-group.spec.d.ts +0 -1
- package/button-group/button-group.spec.js +0 -9
- package/button-group/button-group.stories.d.ts +0 -2
- package/button-group/button-group.stories.js +0 -34
- package/button-group/index.d.ts +0 -2
- package/button-group/index.js +0 -5
- package/button-list/button-list.d.ts +0 -25
- package/button-list/button-list.js +0 -85
- package/button-list/button-list.spec.d.ts +0 -1
- package/button-list/button-list.spec.js +0 -9
- package/button-list/button-list.stories.d.ts +0 -2
- package/button-list/button-list.stories.js +0 -58
- package/button-list/index.d.ts +0 -2
- package/button-list/index.js +0 -5
- package/calendar/calendar-day-cell.d.ts +0 -10
- package/calendar/calendar-day-cell.js +0 -65
- package/calendar/calendar-navigation.d.ts +0 -9
- package/calendar/calendar-navigation.js +0 -26
- package/calendar/calendar-provider.d.ts +0 -6
- package/calendar/calendar-provider.js +0 -26
- package/calendar/calendar.d.ts +0 -12
- package/calendar/calendar.js +0 -51
- package/calendar/calendar.stories.d.ts +0 -2
- package/calendar/calendar.stories.js +0 -35
- package/calendar/index.d.ts +0 -4
- package/calendar/index.js +0 -7
- package/calendar/utils/get-class-names-from-flags.d.ts +0 -2
- package/calendar/utils/get-class-names-from-flags.js +0 -7
- package/checkbox/checkbox.d.ts +0 -12
- package/checkbox/checkbox.js +0 -54
- package/checkbox/checkbox.spec.d.ts +0 -1
- package/checkbox/checkbox.spec.js +0 -9
- package/checkbox/checkbox.stories.d.ts +0 -2
- package/checkbox/checkbox.stories.js +0 -40
- package/checkbox/index.d.ts +0 -3
- package/checkbox/index.js +0 -5
- package/checkbox/theme.d.ts +0 -5
- package/checkbox/theme.js +0 -2
- package/checkbox-button/checkbox-button.d.ts +0 -9
- package/checkbox-button/checkbox-button.js +0 -39
- package/checkbox-button/checkbox-button.spec.d.ts +0 -1
- package/checkbox-button/checkbox-button.spec.js +0 -9
- package/checkbox-button/checkbox-button.stories.d.ts +0 -2
- package/checkbox-button/checkbox-button.stories.js +0 -38
- package/checkbox-button/index.d.ts +0 -2
- package/checkbox-button/index.js +0 -5
- package/checkbox-input/checkbox-input.d.ts +0 -14
- package/checkbox-input/checkbox-input.js +0 -43
- package/checkbox-input/checkbox-input.spec.d.ts +0 -1
- package/checkbox-input/checkbox-input.spec.js +0 -9
- package/checkbox-input/checkbox-input.stories.d.ts +0 -2
- package/checkbox-input/checkbox-input.stories.js +0 -40
- package/checkbox-input/index.d.ts +0 -2
- package/checkbox-input/index.js +0 -5
- package/checkbox-list/checkbox-list.d.ts +0 -6
- package/checkbox-list/checkbox-list.js +0 -52
- package/checkbox-list/checkbox-list.spec.d.ts +0 -1
- package/checkbox-list/checkbox-list.spec.js +0 -9
- package/checkbox-list/checkbox-list.stories.d.ts +0 -2
- package/checkbox-list/checkbox-list.stories.js +0 -40
- package/checkbox-list/index.d.ts +0 -2
- package/checkbox-list/index.js +0 -5
- package/checkbox-list/types.d.ts +0 -16
- package/checkbox-list/types.js +0 -2
- package/chip/chip.d.ts +0 -13
- package/chip/chip.js +0 -58
- package/chip/chip.spec.d.ts +0 -1
- package/chip/chip.spec.js +0 -9
- package/chip/chip.stories.d.ts +0 -2
- package/chip/chip.stories.js +0 -47
- package/chip/index.d.ts +0 -3
- package/chip/index.js +0 -5
- package/chip/theme.d.ts +0 -25
- package/chip/theme.js +0 -2
- package/color-radio/color-radio.d.ts +0 -12
- package/color-radio/color-radio.js +0 -66
- package/color-radio/color-radio.spec.d.ts +0 -1
- package/color-radio/color-radio.spec.js +0 -9
- package/color-radio/color-radio.stories.d.ts +0 -2
- package/color-radio/color-radio.stories.js +0 -25
- package/color-radio/index.d.ts +0 -2
- package/color-radio/index.js +0 -5
- package/color-radio-group/color-radio-group.d.ts +0 -18
- package/color-radio-group/color-radio-group.js +0 -49
- package/color-radio-group/color-radio-group.spec.d.ts +0 -1
- package/color-radio-group/color-radio-group.spec.js +0 -9
- package/color-radio-group/color-radio-group.stories.d.ts +0 -2
- package/color-radio-group/color-radio-group.stories.js +0 -75
- package/color-radio-group/index.d.ts +0 -2
- package/color-radio-group/index.js +0 -5
- package/color-scheme/color-scheme-defaults.d.ts +0 -8
- package/color-scheme/color-scheme-defaults.js +0 -10
- package/color-scheme/get-color-scheme-class-name.d.ts +0 -2
- package/color-scheme/get-color-scheme-class-name.js +0 -13
- package/color-scheme/get-color-scheme.d.ts +0 -2
- package/color-scheme/get-color-scheme.js +0 -16
- package/color-scheme/index.d.ts +0 -5
- package/color-scheme/index.js +0 -13
- package/color-scheme/use-color-scheme.d.ts +0 -2
- package/color-scheme/use-color-scheme.js +0 -15
- package/color-scheme/use-handle-color-scheme.d.ts +0 -9
- package/color-scheme/use-handle-color-scheme.js +0 -23
- package/color-scheme/use-toggle-color-scheme.d.ts +0 -1
- package/color-scheme/use-toggle-color-scheme.js +0 -29
- package/combobox/combobox.d.ts +0 -51
- package/combobox/combobox.js +0 -106
- package/combobox/combobox.spec.d.ts +0 -1
- package/combobox/combobox.spec.js +0 -10
- package/combobox/combobox.stories.d.ts +0 -3
- package/combobox/combobox.stories.js +0 -55
- package/combobox/index.d.ts +0 -2
- package/combobox/index.js +0 -5
- package/components.d.ts +0 -317
- package/components.js +0 -344
- package/config/icons-config.d.ts +0 -2
- package/config/icons-config.js +0 -5
- package/config/icons.d.ts +0 -127
- package/config/icons.js +0 -30
- package/content/content-schema.d.ts +0 -3
- package/content/content-schema.js +0 -2
- package/content/types.d.ts +0 -27
- package/content/types.js +0 -2
- package/context/context.d.ts +0 -17
- package/context/context.js +0 -5
- package/context/index.d.ts +0 -3
- package/context/index.js +0 -19
- package/context/provider.d.ts +0 -8
- package/context/provider.js +0 -20
- package/context/use-component-context.d.ts +0 -3
- package/context/use-component-context.js +0 -13
- package/create-component-preview-page/create-component-preview-page.d.ts +0 -13
- package/create-component-preview-page/create-component-preview-page.js +0 -43
- package/create-component-preview-page/index.d.ts +0 -2
- package/create-component-preview-page/index.js +0 -18
- package/date-picker/date-picker-content.d.ts +0 -10
- package/date-picker/date-picker-content.js +0 -58
- package/date-picker/date-picker-decade.d.ts +0 -9
- package/date-picker/date-picker-decade.js +0 -89
- package/date-picker/date-picker-month.d.ts +0 -10
- package/date-picker/date-picker-month.js +0 -85
- package/date-picker/date-picker-year.d.ts +0 -9
- package/date-picker/date-picker-year.js +0 -94
- package/date-picker/date-picker.d.ts +0 -20
- package/date-picker/date-picker.js +0 -31
- package/date-picker/date-picker.spec.d.ts +0 -1
- package/date-picker/date-picker.spec.js +0 -9
- package/date-picker/date-picker.stories.d.ts +0 -2
- package/date-picker/date-picker.stories.js +0 -80
- package/date-picker/index.d.ts +0 -3
- package/date-picker/index.js +0 -5
- package/date-picker/types.d.ts +0 -11
- package/date-picker/types.js +0 -2
- package/date-picker-input/date-picker-input.d.ts +0 -23
- package/date-picker-input/date-picker-input.js +0 -88
- package/date-picker-input/date-picker-input.spec.d.ts +0 -1
- package/date-picker-input/date-picker-input.spec.js +0 -9
- package/date-picker-input/date-picker-input.stories.d.ts +0 -2
- package/date-picker-input/date-picker-input.stories.js +0 -55
- package/date-picker-input/index.d.ts +0 -2
- package/date-picker-input/index.js +0 -8
- package/date-range-picker/date-range-picker-content.d.ts +0 -6
- package/date-range-picker/date-range-picker-content.js +0 -56
- package/date-range-picker/date-range-picker-decade.d.ts +0 -9
- package/date-range-picker/date-range-picker-decade.js +0 -93
- package/date-range-picker/date-range-picker-month.d.ts +0 -10
- package/date-range-picker/date-range-picker-month.js +0 -82
- package/date-range-picker/date-range-picker-year.d.ts +0 -9
- package/date-range-picker/date-range-picker-year.js +0 -91
- package/date-range-picker/date-range-picker.d.ts +0 -15
- package/date-range-picker/date-range-picker.js +0 -53
- package/date-range-picker/date-range-picker.spec.d.ts +0 -1
- package/date-range-picker/date-range-picker.spec.js +0 -9
- package/date-range-picker/date-range-picker.stories.d.ts +0 -2
- package/date-range-picker/date-range-picker.stories.js +0 -36
- package/date-range-picker/index.d.ts +0 -3
- package/date-range-picker/index.js +0 -5
- package/date-range-picker/types.d.ts +0 -5
- package/date-range-picker/types.js +0 -2
- package/date-range-picker-input/date-range-picker-input.d.ts +0 -21
- package/date-range-picker-input/date-range-picker-input.js +0 -62
- package/date-range-picker-input/date-range-picker-input.spec.d.ts +0 -1
- package/date-range-picker-input/date-range-picker-input.spec.js +0 -9
- package/date-range-picker-input/date-range-picker-input.stories.d.ts +0 -2
- package/date-range-picker-input/date-range-picker-input.stories.js +0 -44
- package/date-range-picker-input/index.d.ts +0 -2
- package/date-range-picker-input/index.js +0 -5
- package/datetime-picker/datetime-picker.d.ts +0 -17
- package/datetime-picker/datetime-picker.js +0 -96
- package/datetime-picker/datetime-picker.spec.d.ts +0 -1
- package/datetime-picker/datetime-picker.spec.js +0 -9
- package/datetime-picker/datetime-picker.stories.d.ts +0 -2
- package/datetime-picker/datetime-picker.stories.js +0 -37
- package/datetime-picker/index.d.ts +0 -2
- package/datetime-picker/index.js +0 -7
- package/datetime-picker-input/datetime-picker-input.d.ts +0 -21
- package/datetime-picker-input/datetime-picker-input.js +0 -85
- package/datetime-picker-input/datetime-picker-input.spec.d.ts +0 -1
- package/datetime-picker-input/datetime-picker-input.spec.js +0 -9
- package/datetime-picker-input/datetime-picker-input.stories.d.ts +0 -2
- package/datetime-picker-input/datetime-picker-input.stories.js +0 -45
- package/datetime-picker-input/get-datetime-string.d.ts +0 -6
- package/datetime-picker-input/get-datetime-string.js +0 -18
- package/datetime-picker-input/index.d.ts +0 -2
- package/datetime-picker-input/index.js +0 -7
- package/dialog/dialog-panel.d.ts +0 -12
- package/dialog/dialog-panel.js +0 -13
- package/dialog/dialog.d.ts +0 -28
- package/dialog/dialog.js +0 -75
- package/dialog/dialog.spec.d.ts +0 -1
- package/dialog/dialog.spec.js +0 -9
- package/dialog/dialog.stories.d.ts +0 -2
- package/dialog/dialog.stories.js +0 -20
- package/dialog/index.d.ts +0 -4
- package/dialog/index.js +0 -7
- package/dialog/theme.d.ts +0 -11
- package/dialog/theme.js +0 -2
- package/dropdown/dropdown.d.ts +0 -13
- package/dropdown/dropdown.js +0 -50
- package/dropdown/dropdown.spec.d.ts +0 -1
- package/dropdown/dropdown.spec.js +0 -9
- package/dropdown/dropdown.stories.d.ts +0 -2
- package/dropdown/dropdown.stories.js +0 -23
- package/dropdown/index.d.ts +0 -2
- package/dropdown/index.js +0 -5
- package/dropzone/dropzone-input.d.ts +0 -24
- package/dropzone/dropzone-input.js +0 -146
- package/dropzone/dropzone-list.d.ts +0 -15
- package/dropzone/dropzone-list.js +0 -81
- package/dropzone/dropzone.spec.d.ts +0 -1
- package/dropzone/dropzone.spec.js +0 -9
- package/dropzone/dropzone.stories.d.ts +0 -2
- package/dropzone/dropzone.stories.js +0 -63
- package/dropzone/handle-rejected-files.d.ts +0 -2
- package/dropzone/handle-rejected-files.js +0 -17
- package/dropzone/index.d.ts +0 -6
- package/dropzone/index.js +0 -6
- package/dropzone/types.d.ts +0 -10
- package/dropzone/types.js +0 -2
- package/error-message/error-message.d.ts +0 -6
- package/error-message/error-message.js +0 -12
- package/error-message/error-message.spec.d.ts +0 -1
- package/error-message/error-message.spec.js +0 -9
- package/error-message/error-message.stories.d.ts +0 -2
- package/error-message/error-message.stories.js +0 -12
- package/error-message/index.d.ts +0 -1
- package/error-message/index.js +0 -5
- package/file-input/file-input.d.ts +0 -15
- package/file-input/file-input.js +0 -72
- package/file-input/file-input.spec.d.ts +0 -1
- package/file-input/file-input.spec.js +0 -9
- package/file-input/file-input.stories.d.ts +0 -2
- package/file-input/file-input.stories.js +0 -43
- package/file-input/index.d.ts +0 -2
- package/file-input/index.js +0 -5
- package/flash-messages/flash-message.d.ts +0 -17
- package/flash-messages/flash-message.js +0 -47
- package/flash-messages/flash-messages-service.d.ts +0 -4
- package/flash-messages/flash-messages-service.js +0 -14
- package/flash-messages/flash-messages.d.ts +0 -8
- package/flash-messages/flash-messages.js +0 -116
- package/flash-messages/flash-messages.spec.d.ts +0 -1
- package/flash-messages/flash-messages.spec.js +0 -9
- package/flash-messages/flash-messages.stories.d.ts +0 -2
- package/flash-messages/flash-messages.stories.js +0 -70
- package/flash-messages/index.d.ts +0 -3
- package/flash-messages/index.js +0 -8
- package/flash-messages/theme.d.ts +0 -6
- package/flash-messages/theme.js +0 -2
- package/form-component/form-component.d.ts +0 -14
- package/form-component/form-component.js +0 -41
- package/form-component/form-component.spec.d.ts +0 -1
- package/form-component/form-component.spec.js +0 -9
- package/form-component/form-component.stories.d.ts +0 -2
- package/form-component/form-component.stories.js +0 -19
- package/form-component/index.d.ts +0 -2
- package/form-component/index.js +0 -5
- package/hooks/use-async-loading.d.ts +0 -4
- package/hooks/use-async-loading.js +0 -31
- package/hooks/use-dropdown.d.ts +0 -39
- package/hooks/use-dropdown.js +0 -28
- package/hooks/use-input-submit.d.ts +0 -4
- package/hooks/use-input-submit.js +0 -39
- package/icon/icon.d.ts +0 -20
- package/icon/icon.js +0 -59
- package/icon/icon.spec.d.ts +0 -1
- package/icon/icon.spec.js +0 -10
- package/icon/icon.stories.d.ts +0 -6
- package/icon/icon.stories.js +0 -43
- package/icon/index.d.ts +0 -3
- package/icon/index.js +0 -5
- package/icon/theme.d.ts +0 -10
- package/icon/theme.js +0 -2
- package/icon/types.d.ts +0 -2
- package/icon/types.js +0 -2
- package/icon-button/icon-button.d.ts +0 -9
- package/icon-button/icon-button.js +0 -36
- package/icon-button/icon-button.spec.d.ts +0 -1
- package/icon-button/icon-button.spec.js +0 -9
- package/icon-button/icon-button.stories.d.ts +0 -2
- package/icon-button/icon-button.stories.js +0 -58
- package/icon-button/index.d.ts +0 -2
- package/icon-button/index.js +0 -5
- package/image-gallery/components/close-button.d.ts +0 -8
- package/image-gallery/components/close-button.js +0 -15
- package/image-gallery/components/dot.d.ts +0 -6
- package/image-gallery/components/dot.js +0 -14
- package/image-gallery/components/gallery.d.ts +0 -15
- package/image-gallery/components/gallery.js +0 -80
- package/image-gallery/components/next-button.d.ts +0 -7
- package/image-gallery/components/next-button.js +0 -14
- package/image-gallery/components/prev-button.d.ts +0 -7
- package/image-gallery/components/prev-button.js +0 -14
- package/image-gallery/context.d.ts +0 -9
- package/image-gallery/context.js +0 -12
- package/image-gallery/image-gallery.d.ts +0 -14
- package/image-gallery/image-gallery.js +0 -58
- package/image-gallery/image-gallery.spec.d.ts +0 -1
- package/image-gallery/image-gallery.spec.js +0 -9
- package/image-gallery/image-gallery.stories.d.ts +0 -2
- package/image-gallery/image-gallery.stories.js +0 -36
- package/image-gallery/image.d.ts +0 -3
- package/image-gallery/image.js +0 -18
- package/image-gallery/index.d.ts +0 -5
- package/image-gallery/index.js +0 -8
- package/image-gallery/types.d.ts +0 -9
- package/image-gallery/types.js +0 -2
- package/image-gallery/use-image.d.ts +0 -2
- package/image-gallery/use-image.js +0 -16
- package/info-box/index.d.ts +0 -2
- package/info-box/index.js +0 -5
- package/info-box/info-box.d.ts +0 -15
- package/info-box/info-box.js +0 -61
- package/info-box/info-box.spec.d.ts +0 -1
- package/info-box/info-box.spec.js +0 -9
- package/info-box/info-box.stories.d.ts +0 -2
- package/info-box/info-box.stories.js +0 -20
- package/info-box/theme.d.ts +0 -15
- package/info-box/theme.js +0 -2
- package/info-box/types.d.ts +0 -3
- package/info-box/types.js +0 -2
- package/input/index.d.ts +0 -14
- package/input/index.js +0 -20
- package/input/input-arrow-icon.d.ts +0 -8
- package/input/input-arrow-icon.js +0 -15
- package/input/input-element.d.ts +0 -24
- package/input/input-element.js +0 -33
- package/input/input-left-addon.d.ts +0 -5
- package/input/input-left-addon.js +0 -14
- package/input/input-left-element.d.ts +0 -5
- package/input/input-left-element.js +0 -12
- package/input/input-remove-button.d.ts +0 -5
- package/input/input-remove-button.js +0 -29
- package/input/input-right-addon.d.ts +0 -5
- package/input/input-right-addon.js +0 -14
- package/input/input-right-element.d.ts +0 -5
- package/input/input-right-element.js +0 -12
- package/input/input.d.ts +0 -20
- package/input/input.js +0 -66
- package/input/input.spec.d.ts +0 -1
- package/input/input.spec.js +0 -10
- package/input/input.stories.d.ts +0 -4
- package/input/input.stories.js +0 -90
- package/input/theme.d.ts +0 -10
- package/input/theme.js +0 -2
- package/label/index.d.ts +0 -2
- package/label/index.js +0 -5
- package/label/label.d.ts +0 -12
- package/label/label.js +0 -37
- package/label/label.spec.d.ts +0 -1
- package/label/label.spec.js +0 -9
- package/label/label.stories.d.ts +0 -2
- package/label/label.stories.js +0 -12
- package/layout/index.d.ts +0 -2
- package/layout/index.js +0 -5
- package/layout/layout.d.ts +0 -13
- package/layout/layout.js +0 -44
- package/layout/layout.spec.d.ts +0 -1
- package/layout/layout.spec.js +0 -9
- package/layout/layout.stories.d.ts +0 -2
- package/layout/layout.stories.js +0 -15
- package/layout/uxf-logo.d.ts +0 -6
- package/layout/uxf-logo.js +0 -13
- package/lightbox/components/lightbox-close-button.d.ts +0 -6
- package/lightbox/components/lightbox-close-button.js +0 -14
- package/lightbox/components/lightbox-dialog.d.ts +0 -15
- package/lightbox/components/lightbox-dialog.js +0 -49
- package/lightbox/components/lightbox-dot.d.ts +0 -9
- package/lightbox/components/lightbox-dot.js +0 -13
- package/lightbox/components/lightbox-next-button.d.ts +0 -6
- package/lightbox/components/lightbox-next-button.js +0 -14
- package/lightbox/components/lightbox-prev-button.d.ts +0 -6
- package/lightbox/components/lightbox-prev-button.js +0 -14
- package/lightbox/components/use-lightbox-dialog.d.ts +0 -34
- package/lightbox/components/use-lightbox-dialog.js +0 -51
- package/lightbox/context.d.ts +0 -11
- package/lightbox/context.js +0 -17
- package/lightbox/index.d.ts +0 -4
- package/lightbox/index.js +0 -9
- package/lightbox/lightbox.d.ts +0 -14
- package/lightbox/lightbox.js +0 -27
- package/lightbox/lightbox.spec.d.ts +0 -1
- package/lightbox/lightbox.spec.js +0 -9
- package/lightbox/lightbox.stories.d.ts +0 -2
- package/lightbox/lightbox.stories.js +0 -43
- package/lightbox/types.d.ts +0 -20
- package/lightbox/types.js +0 -2
- package/lightbox/use-lightbox-image.d.ts +0 -2
- package/lightbox/use-lightbox-image.js +0 -17
- package/lightbox/use-lightbox.d.ts +0 -11
- package/lightbox/use-lightbox.js +0 -34
- package/list-item/index.d.ts +0 -2
- package/list-item/index.js +0 -5
- package/list-item/list-item.d.ts +0 -10
- package/list-item/list-item.js +0 -45
- package/list-item/list-item.spec.d.ts +0 -1
- package/list-item/list-item.spec.js +0 -9
- package/list-item/list-item.stories.d.ts +0 -2
- package/list-item/list-item.stories.js +0 -28
- package/loader/index.d.ts +0 -2
- package/loader/index.js +0 -5
- package/loader/loader.d.ts +0 -5
- package/loader/loader.js +0 -34
- package/loader/loader.spec.d.ts +0 -1
- package/loader/loader.spec.js +0 -9
- package/loader/loader.stories.d.ts +0 -2
- package/loader/loader.stories.js +0 -16
- package/lozenge/index.d.ts +0 -3
- package/lozenge/index.js +0 -5
- package/lozenge/lozenge.d.ts +0 -7
- package/lozenge/lozenge.js +0 -35
- package/lozenge/lozenge.spec.d.ts +0 -1
- package/lozenge/lozenge.spec.js +0 -9
- package/lozenge/lozenge.stories.d.ts +0 -2
- package/lozenge/lozenge.stories.js +0 -16
- package/lozenge/theme.d.ts +0 -14
- package/lozenge/theme.js +0 -2
- package/message/index.d.ts +0 -3
- package/message/index.js +0 -7
- package/message/message-content.d.ts +0 -20
- package/message/message-content.js +0 -42
- package/message/message-service.d.ts +0 -13
- package/message/message-service.js +0 -30
- package/message/message.d.ts +0 -24
- package/message/message.js +0 -55
- package/message/message.spec.d.ts +0 -1
- package/message/message.spec.js +0 -9
- package/message/message.stories.d.ts +0 -2
- package/message/message.stories.js +0 -71
- package/message/theme.d.ts +0 -12
- package/message/theme.js +0 -2
- package/modal/index.d.ts +0 -4
- package/modal/index.js +0 -11
- package/modal/modal-provider.d.ts +0 -3
- package/modal/modal-provider.js +0 -57
- package/modal/modal-service.d.ts +0 -4
- package/modal/modal-service.js +0 -20
- package/modal/modal.d.ts +0 -3
- package/modal/modal.js +0 -27
- package/modal/modal.spec.d.ts +0 -1
- package/modal/modal.spec.js +0 -9
- package/modal/modal.stories.d.ts +0 -3
- package/modal/modal.stories.js +0 -109
- package/modal/theme.d.ts +0 -4
- package/modal/theme.js +0 -2
- package/modal/types.d.ts +0 -23
- package/modal/types.js +0 -2
- package/modal-dialog/modal-dialog.d.ts +0 -13
- package/modal-dialog/modal-dialog.js +0 -18
- package/modal-dialog/modal-dialog.stories.d.ts +0 -2
- package/modal-dialog/modal-dialog.stories.js +0 -28
- package/modal-header/index.d.ts +0 -2
- package/modal-header/index.js +0 -5
- package/modal-header/modal-header.d.ts +0 -10
- package/modal-header/modal-header.js +0 -27
- package/modal-header/modal-header.spec.d.ts +0 -1
- package/modal-header/modal-header.spec.js +0 -9
- package/modal-header/modal-header.stories.d.ts +0 -2
- package/modal-header/modal-header.stories.js +0 -19
- package/multi-combobox/index.d.ts +0 -2
- package/multi-combobox/index.js +0 -5
- package/multi-combobox/multi-combobox.d.ts +0 -3
- package/multi-combobox/multi-combobox.js +0 -172
- package/multi-combobox/multi-combobox.spec.d.ts +0 -1
- package/multi-combobox/multi-combobox.spec.js +0 -10
- package/multi-combobox/multi-combobox.stories.d.ts +0 -4
- package/multi-combobox/multi-combobox.stories.js +0 -89
- package/multi-combobox/types.d.ts +0 -48
- package/multi-combobox/types.js +0 -2
- package/multi-select/index.d.ts +0 -2
- package/multi-select/index.js +0 -5
- package/multi-select/multi-select.d.ts +0 -3
- package/multi-select/multi-select.js +0 -136
- package/multi-select/multi-select.spec.d.ts +0 -1
- package/multi-select/multi-select.spec.js +0 -9
- package/multi-select/multi-select.stories.d.ts +0 -3
- package/multi-select/multi-select.stories.js +0 -75
- package/multi-select/types.d.ts +0 -43
- package/multi-select/types.js +0 -2
- package/pagination/index.d.ts +0 -2
- package/pagination/index.js +0 -5
- package/pagination/pagination.d.ts +0 -12
- package/pagination/pagination.js +0 -62
- package/pagination/pagination.spec.d.ts +0 -1
- package/pagination/pagination.spec.js +0 -9
- package/pagination/pagination.stories.d.ts +0 -2
- package/pagination/pagination.stories.js +0 -40
- package/pagination/theme.d.ts +0 -7
- package/pagination/theme.js +0 -2
- package/paper/index.d.ts +0 -2
- package/paper/index.js +0 -5
- package/paper/paper.d.ts +0 -5
- package/paper/paper.js +0 -33
- package/paper/paper.spec.d.ts +0 -1
- package/paper/paper.spec.js +0 -9
- package/paper/paper.stories.d.ts +0 -2
- package/paper/paper.stories.js +0 -13
- package/radio/index.d.ts +0 -3
- package/radio/index.js +0 -5
- package/radio/radio.d.ts +0 -12
- package/radio/radio.js +0 -53
- package/radio/radio.spec.d.ts +0 -1
- package/radio/radio.spec.js +0 -9
- package/radio/radio.stories.d.ts +0 -2
- package/radio/radio.stories.js +0 -29
- package/radio/theme.d.ts +0 -5
- package/radio/theme.js +0 -2
- package/radio-group/index.d.ts +0 -3
- package/radio-group/index.js +0 -5
- package/radio-group/radio-group.d.ts +0 -23
- package/radio-group/radio-group.js +0 -51
- package/radio-group/radio-group.spec.d.ts +0 -1
- package/radio-group/radio-group.spec.js +0 -9
- package/radio-group/radio-group.stories.d.ts +0 -2
- package/radio-group/radio-group.stories.js +0 -55
- package/radio-group/theme.d.ts +0 -7
- package/radio-group/theme.js +0 -2
- package/raster-image/empty-image.d.ts +0 -9
- package/raster-image/empty-image.js +0 -12
- package/raster-image/img-sources.d.ts +0 -17
- package/raster-image/img-sources.js +0 -44
- package/raster-image/index.d.ts +0 -2
- package/raster-image/index.js +0 -5
- package/raster-image/raster-image.d.ts +0 -35
- package/raster-image/raster-image.js +0 -36
- package/raster-image/raster-image.spec.d.ts +0 -1
- package/raster-image/raster-image.spec.js +0 -9
- package/raster-image/raster-image.stories.d.ts +0 -2
- package/raster-image/raster-image.stories.js +0 -12
- package/raster-image/responsive-img-sources.d.ts +0 -15
- package/raster-image/responsive-img-sources.js +0 -19
- package/readmes.d.ts +0 -66
- package/readmes.js +0 -135
- package/select/index.d.ts +0 -2
- package/select/index.js +0 -5
- package/select/select.d.ts +0 -47
- package/select/select.js +0 -101
- package/select/select.spec.d.ts +0 -1
- package/select/select.spec.js +0 -9
- package/select/select.stories.d.ts +0 -3
- package/select/select.stories.js +0 -78
- package/tabs/components/tabs-button-list.d.ts +0 -12
- package/tabs/components/tabs-button-list.js +0 -36
- package/tabs/components/tabs-button.d.ts +0 -17
- package/tabs/components/tabs-button.js +0 -40
- package/tabs/components/tabs-panel.d.ts +0 -11
- package/tabs/components/tabs-panel.js +0 -16
- package/tabs/components/tabs-panels.d.ts +0 -2
- package/tabs/components/tabs-panels.js +0 -10
- package/tabs/components/tabs-root.d.ts +0 -10
- package/tabs/components/tabs-root.js +0 -12
- package/tabs/create-tab-id.d.ts +0 -1
- package/tabs/create-tab-id.js +0 -6
- package/tabs/index.d.ts +0 -2
- package/tabs/index.js +0 -18
- package/tabs/panel-content.d.ts +0 -9
- package/tabs/panel-content.js +0 -35
- package/tabs/panel.d.ts +0 -21
- package/tabs/panel.js +0 -11
- package/tabs/tabs.d.ts +0 -22
- package/tabs/tabs.js +0 -74
- package/tabs/tabs.spec.d.ts +0 -1
- package/tabs/tabs.spec.js +0 -10
- package/tabs/tabs.stories.d.ts +0 -3
- package/tabs/tabs.stories.js +0 -68
- package/tabs/theme.d.ts +0 -4
- package/tabs/theme.js +0 -2
- package/tabs/types.d.ts +0 -2
- package/tabs/types.js +0 -2
- package/text-input/index.d.ts +0 -2
- package/text-input/index.js +0 -5
- package/text-input/text-input.d.ts +0 -33
- package/text-input/text-input.js +0 -51
- package/text-input/text-input.spec.d.ts +0 -1
- package/text-input/text-input.spec.js +0 -9
- package/text-input/text-input.stories.d.ts +0 -3
- package/text-input/text-input.stories.js +0 -64
- package/text-link/index.d.ts +0 -2
- package/text-link/index.js +0 -5
- package/text-link/text-link.d.ts +0 -10
- package/text-link/text-link.js +0 -41
- package/text-link/text-link.spec.d.ts +0 -1
- package/text-link/text-link.spec.js +0 -9
- package/text-link/text-link.stories.d.ts +0 -2
- package/text-link/text-link.stories.js +0 -17
- package/text-link/theme.d.ts +0 -4
- package/text-link/theme.js +0 -2
- package/textarea/index.d.ts +0 -2
- package/textarea/index.js +0 -5
- package/textarea/textarea.d.ts +0 -18
- package/textarea/textarea.js +0 -59
- package/textarea/textarea.spec.d.ts +0 -1
- package/textarea/textarea.spec.js +0 -9
- package/textarea/textarea.stories.d.ts +0 -2
- package/textarea/textarea.stories.js +0 -39
- package/time-picker/index.d.ts +0 -2
- package/time-picker/index.js +0 -5
- package/time-picker/time-picker-hour.d.ts +0 -5
- package/time-picker/time-picker-hour.js +0 -49
- package/time-picker/time-picker-hours.d.ts +0 -2
- package/time-picker/time-picker-hours.js +0 -15
- package/time-picker/time-picker-minute.d.ts +0 -5
- package/time-picker/time-picker-minute.js +0 -49
- package/time-picker/time-picker-minutes.d.ts +0 -2
- package/time-picker/time-picker-minutes.js +0 -15
- package/time-picker/time-picker.d.ts +0 -9
- package/time-picker/time-picker.js +0 -72
- package/time-picker/time-picker.spec.d.ts +0 -1
- package/time-picker/time-picker.spec.js +0 -9
- package/time-picker/time-picker.stories.d.ts +0 -2
- package/time-picker/time-picker.stories.js +0 -36
- package/time-picker-input/index.d.ts +0 -2
- package/time-picker-input/index.js +0 -8
- package/time-picker-input/time-picker-input.d.ts +0 -17
- package/time-picker-input/time-picker-input.js +0 -83
- package/time-picker-input/time-picker-input.spec.d.ts +0 -1
- package/time-picker-input/time-picker-input.spec.js +0 -9
- package/time-picker-input/time-picker-input.stories.d.ts +0 -2
- package/time-picker-input/time-picker-input.stories.js +0 -45
- package/toggle/index.d.ts +0 -3
- package/toggle/index.js +0 -5
- package/toggle/theme.d.ts +0 -10
- package/toggle/theme.js +0 -2
- package/toggle/toggle.d.ts +0 -13
- package/toggle/toggle.js +0 -39
- package/toggle/toggle.spec.d.ts +0 -1
- package/toggle/toggle.spec.js +0 -9
- package/toggle/toggle.stories.d.ts +0 -2
- package/toggle/toggle.stories.js +0 -41
- package/tooltip/index.d.ts +0 -4
- package/tooltip/index.js +0 -7
- package/tooltip/tooltip.d.ts +0 -9
- package/tooltip/tooltip.js +0 -73
- package/tooltip/tooltip.spec.d.ts +0 -1
- package/tooltip/tooltip.spec.js +0 -9
- package/tooltip/tooltip.stories.d.ts +0 -2
- package/tooltip/tooltip.stories.js +0 -38
- package/tooltip/use-tooltip.d.ts +0 -55
- package/tooltip/use-tooltip.js +0 -39
- package/tw-tokens/tw-box-shadow.d.ts +0 -12
- package/tw-tokens/tw-box-shadow.js +0 -15
- package/tw-tokens/tw-colors.d.ts +0 -468
- package/tw-tokens/tw-colors.js +0 -471
- package/tw-tokens/tw-containers.d.ts +0 -8
- package/tw-tokens/tw-containers.js +0 -5
- package/tw-tokens/tw-font-size.d.ts +0 -55
- package/tw-tokens/tw-font-size.js +0 -32
- package/tw-tokens/tw-font-weight.d.ts +0 -12
- package/tw-tokens/tw-font-weight.js +0 -15
- package/tw-tokens/tw-line-height.d.ts +0 -17
- package/tw-tokens/tw-line-height.js +0 -20
- package/tw-tokens/tw-screens.d.ts +0 -8
- package/tw-tokens/tw-screens.js +0 -5
- package/tw-tokens/tw-spacing.d.ts +0 -39
- package/tw-tokens/tw-spacing.js +0 -42
- package/tw-tokens/tw-z-index.d.ts +0 -21
- package/tw-tokens/tw-z-index.js +0 -24
- package/types/color.d.ts +0 -2
- package/types/color.js +0 -2
- package/types/file-response.d.ts +0 -6
- package/types/file-response.js +0 -2
- package/types/form-control-props.d.ts +0 -30
- package/types/form-control-props.js +0 -2
- package/types/index.d.ts +0 -3
- package/types/index.js +0 -19
- package/typography/typography.spec.d.ts +0 -1
- package/typography/typography.spec.js +0 -9
- package/typography/typography.stories.d.ts +0 -2
- package/typography/typography.stories.js +0 -23
- package/utils/action.d.ts +0 -3
- package/utils/action.js +0 -10
- package/utils/component-structure-analyzer.d.ts +0 -6
- package/utils/component-structure-analyzer.js +0 -10
- package/utils/files/get-file-icon.d.ts +0 -2
- package/utils/files/get-file-icon.js +0 -18
- package/utils/files/get-file-icon.test.d.ts +0 -1
- package/utils/files/get-file-icon.test.js +0 -22
- package/utils/files/get-file-url.d.ts +0 -2
- package/utils/files/get-file-url.js +0 -6
- package/utils/files/get-file-url.test.d.ts +0 -1
- package/utils/files/get-file-url.test.js +0 -44
- package/utils/get-default-icon-name.d.ts +0 -4
- package/utils/get-default-icon-name.js +0 -19
- package/utils/get-dropzone-state.d.ts +0 -7
- package/utils/get-dropzone-state.js +0 -23
- package/utils/get-dropzone-state.test.d.ts +0 -1
- package/utils/get-dropzone-state.test.js +0 -88
- package/utils/mocks/upload-file.mock.d.ts +0 -3
- package/utils/mocks/upload-file.mock.js +0 -46
- package/utils/mocks/upload-file.mock.test.d.ts +0 -1
- package/utils/mocks/upload-file.mock.test.js +0 -34
- package/utils/next-link.d.ts +0 -22
- package/utils/next-link.js +0 -2
- package/utils/snap-test.d.ts +0 -2
- package/utils/snap-test.js +0 -22
- package/utils/storybook-config.d.ts +0 -49
- package/utils/storybook-config.js +0 -72
- package/utils/validator/validator-exceptions.d.ts +0 -3
- package/utils/validator/validator-exceptions.js +0 -7
package/hooks/use-dropdown.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Placement, Strategy } from "@floating-ui/react";
|
|
2
|
-
export declare function useDropdown(placement: Placement, matchWidth?: boolean, maxHeight?: number, strategy?: Strategy): {
|
|
3
|
-
placement: Placement;
|
|
4
|
-
strategy: Strategy;
|
|
5
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
isPositioned: boolean;
|
|
9
|
-
update: () => void;
|
|
10
|
-
floatingStyles: React.CSSProperties;
|
|
11
|
-
refs: {
|
|
12
|
-
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
13
|
-
floating: React.MutableRefObject<HTMLElement | null>;
|
|
14
|
-
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
15
|
-
setFloating: (node: HTMLElement | null) => void;
|
|
16
|
-
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
17
|
-
elements: {
|
|
18
|
-
reference: import("@floating-ui/react-dom").ReferenceType | null;
|
|
19
|
-
floating: HTMLElement | null;
|
|
20
|
-
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
21
|
-
context: {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
placement: Placement;
|
|
25
|
-
strategy: Strategy;
|
|
26
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
27
|
-
isPositioned: boolean;
|
|
28
|
-
update: () => void;
|
|
29
|
-
floatingStyles: React.CSSProperties;
|
|
30
|
-
open: boolean;
|
|
31
|
-
onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
|
32
|
-
events: import("@floating-ui/react").FloatingEvents;
|
|
33
|
-
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
34
|
-
nodeId: string | undefined;
|
|
35
|
-
floatingId: string;
|
|
36
|
-
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
37
|
-
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
38
|
-
};
|
|
39
|
-
};
|
package/hooks/use-dropdown.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDropdown = useDropdown;
|
|
4
|
-
const react_1 = require("@floating-ui/react");
|
|
5
|
-
const with_unit_1 = require("@uxf/styles/units/with-unit");
|
|
6
|
-
function useDropdown(placement, matchWidth = false, maxHeight, strategy) {
|
|
7
|
-
return (0, react_1.useFloating)({
|
|
8
|
-
middleware: [
|
|
9
|
-
(0, react_1.flip)(),
|
|
10
|
-
(0, react_1.shift)(),
|
|
11
|
-
(0, react_1.size)({
|
|
12
|
-
apply({ availableHeight, availableWidth, elements }) {
|
|
13
|
-
Object.assign(elements.floating.style, {
|
|
14
|
-
maxHeight: (0, with_unit_1.withUnit)(Math.min(maxHeight !== null && maxHeight !== void 0 ? maxHeight : 240, availableHeight), "px"),
|
|
15
|
-
maxWidth: matchWidth
|
|
16
|
-
? (0, with_unit_1.withUnit)(Math.min(availableWidth, elements.reference.getBoundingClientRect().width), "px")
|
|
17
|
-
: (0, with_unit_1.withUnit)(availableWidth, "px"),
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
}),
|
|
21
|
-
],
|
|
22
|
-
placement,
|
|
23
|
-
strategy,
|
|
24
|
-
whileElementsMounted: (reference, floating, update) => (0, react_1.autoUpdate)(reference, floating, update, {
|
|
25
|
-
elementResize: typeof ResizeObserver !== "undefined",
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useInputSubmit = useInputSubmit;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function childrenHasFocus(node) {
|
|
6
|
-
node.childNodes.forEach((child) => {
|
|
7
|
-
if (document.activeElement === child) {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
function submitResolver(type, node) {
|
|
14
|
-
switch (type) {
|
|
15
|
-
case "checkbox":
|
|
16
|
-
return document.activeElement === node.firstChild;
|
|
17
|
-
case "radio-group":
|
|
18
|
-
return childrenHasFocus(node);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function useInputSubmit(ref, type, disabled) {
|
|
22
|
-
(0, react_1.useEffect)(() => {
|
|
23
|
-
const node = ref.current;
|
|
24
|
-
if (!node || disabled) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const handleSubmit = (e) => {
|
|
28
|
-
var _a;
|
|
29
|
-
if (e instanceof KeyboardEvent && e.key === "Enter" && submitResolver(type, node)) {
|
|
30
|
-
const closestForm = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest("form");
|
|
31
|
-
if (closestForm) {
|
|
32
|
-
closestForm.dispatchEvent(new Event("submit", { bubbles: true, cancelable: true }));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
node.addEventListener("keydown", handleSubmit);
|
|
37
|
-
return () => node.removeEventListener("keydown", handleSubmit);
|
|
38
|
-
}, [disabled, ref, type]);
|
|
39
|
-
}
|
package/icon/icon.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
2
|
-
import { IconColor } from "./theme";
|
|
3
|
-
import { IconName } from "./types";
|
|
4
|
-
type NameOrComponentType = {
|
|
5
|
-
name: IconName;
|
|
6
|
-
Component?: never;
|
|
7
|
-
} | {
|
|
8
|
-
name?: never;
|
|
9
|
-
Component: any;
|
|
10
|
-
};
|
|
11
|
-
export type IconProps = {
|
|
12
|
-
"aria-label"?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
mode?: "meet" | "slice";
|
|
15
|
-
size?: number;
|
|
16
|
-
style?: CSSProperties;
|
|
17
|
-
color?: IconColor;
|
|
18
|
-
} & NameOrComponentType;
|
|
19
|
-
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
20
|
-
export {};
|
package/icon/icon.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.Icon = void 0;
|
|
28
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
29
|
-
const rem_1 = require("@uxf/styles/units/rem");
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const context_1 = require("../context");
|
|
32
|
-
exports.Icon = (0, react_1.forwardRef)((props, ref) => {
|
|
33
|
-
var _a;
|
|
34
|
-
const componentContext = (0, context_1.useComponentContext)("icon");
|
|
35
|
-
const CustomComponent = props.Component;
|
|
36
|
-
const className = (0, cx_1.cx)("uxf-icon", props.color && `uxf-icon--color-${props.color}`, props.className);
|
|
37
|
-
const preserveAspectRatio = `xMidYMid ${(_a = props.mode) !== null && _a !== void 0 ? _a : "meet"}`;
|
|
38
|
-
const style = props.size
|
|
39
|
-
? {
|
|
40
|
-
"--i-h": (0, rem_1.rem)(props.size),
|
|
41
|
-
"--i-w": (0, rem_1.rem)(props.size),
|
|
42
|
-
...props.style,
|
|
43
|
-
}
|
|
44
|
-
: props.style;
|
|
45
|
-
if (CustomComponent) {
|
|
46
|
-
return (react_1.default.createElement(CustomComponent, { "aria-label": props["aria-label"], className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style }));
|
|
47
|
-
}
|
|
48
|
-
if (props.name && props.name in componentContext.iconsConfig) {
|
|
49
|
-
const icon = componentContext.iconsConfig[props.name];
|
|
50
|
-
return (react_1.default.createElement("svg", { "aria-label": props["aria-label"], className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style, viewBox: `0 0 ${icon.w} ${icon.h}` },
|
|
51
|
-
react_1.default.createElement("use", { xlinkHref: `${componentContext.spriteFilePath}#icon-sprite--${props.name}` })));
|
|
52
|
-
}
|
|
53
|
-
// eslint-disable-next-line no-console
|
|
54
|
-
console.warn(`Icon "${props.name}" not found.`);
|
|
55
|
-
return (react_1.default.createElement("span", { title: `icon "${props.name}" not found` },
|
|
56
|
-
react_1.default.createElement("svg", { "aria-label": props["aria-label"], height: props.size, viewBox: "0 0 320 512", width: props.size, xmlns: "http://www.w3.org/2000/svg" },
|
|
57
|
-
react_1.default.createElement("path", { d: "M144 416c-17.67 0-32 14.33-32 32s14.33 32.01 32 32.01s32-14.34 32-32.01S161.7 416 144 416zM211.2 32H104C46.66 32 0 78.66 0 136v16C0 165.3 10.75 176 24 176S48 165.3 48 152v-16c0-30.88 25.12-56 56-56h107.2C244.7 80 272 107.3 272 140.8c0 22.66-12.44 43.27-32.5 53.81L167 232.8C137.1 248 120 277.9 120 310.6V328c0 13.25 10.75 24.01 24 24.01S168 341.3 168 328V310.6c0-14.89 8.188-28.47 21.38-35.41l72.47-38.14C297.7 218.2 320 181.3 320 140.8C320 80.81 271.2 32 211.2 32z" }))));
|
|
58
|
-
});
|
|
59
|
-
exports.Icon.displayName = "UxfUiIcon";
|
package/icon/icon.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/icon/icon.spec.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
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 icon_stories_1 = require("./icon.stories");
|
|
9
|
-
(0, snap_test_1.snapTest)("render all icons stories", react_1.default.createElement(icon_stories_1.AllIcons, null));
|
|
10
|
-
(0, snap_test_1.snapTest)("render color and sizes stories", react_1.default.createElement(icon_stories_1.ColorAndSizes, null));
|
package/icon/icon.stories.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare function AllIcons(): React.JSX.Element;
|
|
3
|
-
export declare function ColorAndSizes(): React.JSX.Element;
|
|
4
|
-
export declare function CustomComponent(): React.JSX.Element;
|
|
5
|
-
export declare function SpriteIcon(): React.JSX.Element;
|
|
6
|
-
export declare function SpriteIconNotExists(): React.JSX.Element;
|
package/icon/icon.stories.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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.AllIcons = AllIcons;
|
|
7
|
-
exports.ColorAndSizes = ColorAndSizes;
|
|
8
|
-
exports.CustomComponent = CustomComponent;
|
|
9
|
-
exports.SpriteIcon = SpriteIcon;
|
|
10
|
-
exports.SpriteIconNotExists = SpriteIconNotExists;
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const context_1 = require("../context");
|
|
13
|
-
const icon_1 = require("./icon");
|
|
14
|
-
// import Docs from "./icon.docs.mdx";
|
|
15
|
-
function AllIcons() {
|
|
16
|
-
const iconContext = (0, context_1.useComponentContext)("icon");
|
|
17
|
-
return (react_1.default.createElement("div", { className: "flex flex-row flex-wrap" }, Object.keys(iconContext.iconsConfig).map((iconName) => (react_1.default.createElement("div", { className: "flex size-28 flex-col items-center justify-center gap-3", key: iconName },
|
|
18
|
-
react_1.default.createElement(icon_1.Icon, { className: "dark:text-white", name: iconName, size: 24 }),
|
|
19
|
-
react_1.default.createElement("div", { className: "text-gray-400" },
|
|
20
|
-
react_1.default.createElement("small", null, iconName)))))));
|
|
21
|
-
}
|
|
22
|
-
function ColorAndSizes() {
|
|
23
|
-
return (react_1.default.createElement("div", { className: "flex flex-row flex-wrap gap-4" },
|
|
24
|
-
react_1.default.createElement(icon_1.Icon, { name: "camera", size: 12 }),
|
|
25
|
-
react_1.default.createElement(icon_1.Icon, { name: "camera", size: 16 }),
|
|
26
|
-
react_1.default.createElement(icon_1.Icon, { name: "camera", size: 20 }),
|
|
27
|
-
react_1.default.createElement(icon_1.Icon, { className: "text-primary-600", name: "camera", size: 12 }),
|
|
28
|
-
react_1.default.createElement(icon_1.Icon, { className: "text-orange-600", name: "camera", size: 16 }),
|
|
29
|
-
react_1.default.createElement(icon_1.Icon, { className: "text-green-600", name: "camera", size: 20 })));
|
|
30
|
-
}
|
|
31
|
-
function CustomComponent() {
|
|
32
|
-
const SvgIcon = (props) => {
|
|
33
|
-
return (react_1.default.createElement("svg", { viewBox: "0 0 29.65 40", ...props },
|
|
34
|
-
react_1.default.createElement("path", { clipRule: "evenodd", d: "M0 14.83C0 6.61 6.61 0 14.83 0c8.11 0 14.83 6.61 14.83 14.83 0 8.64-8.85 19.41-14.83 25.17C8.75 34.24 0 23.47 0 14.83zm9.28 0c0-3.09 2.45-5.55 5.55-5.55 2.99 0 5.44 2.45 5.44 5.55 0 2.99-2.45 5.44-5.44 5.44-3.1 0-5.55-2.46-5.55-5.44z", fill: "currentColor", fillRule: "evenodd" })));
|
|
35
|
-
};
|
|
36
|
-
return react_1.default.createElement(icon_1.Icon, { Component: SvgIcon, size: 16 });
|
|
37
|
-
}
|
|
38
|
-
function SpriteIcon() {
|
|
39
|
-
return react_1.default.createElement(icon_1.Icon, { name: "camera", size: 16 });
|
|
40
|
-
}
|
|
41
|
-
function SpriteIconNotExists() {
|
|
42
|
-
return react_1.default.createElement(icon_1.Icon, { name: "not-exists", size: 16 });
|
|
43
|
-
}
|
package/icon/index.d.ts
DELETED
package/icon/index.js
DELETED
package/icon/theme.d.ts
DELETED
package/icon/theme.js
DELETED
package/icon/types.d.ts
DELETED
package/icon/types.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from "@uxf/ui/button";
|
|
2
|
-
import { IconName } from "@uxf/ui/icon/types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
export interface IconButtonProps extends Omit<ButtonProps, "children" | "isIconButton"> {
|
|
5
|
-
iconName: IconName;
|
|
6
|
-
iconSize?: number;
|
|
7
|
-
label: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1,36 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.IconButton = void 0;
|
|
27
|
-
const button_1 = require("@uxf/ui/button");
|
|
28
|
-
const icon_1 = require("@uxf/ui/icon");
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
exports.IconButton = (0, react_1.forwardRef)((props, ref) => {
|
|
31
|
-
// eslint-disable-next-line react/destructuring-assignment
|
|
32
|
-
const { className, iconName, iconSize, label, ...buttonProps } = props;
|
|
33
|
-
return (react_1.default.createElement(button_1.Button, { className: `uxf-icon-button ${className !== null && className !== void 0 ? className : ""}`, ref: ref, ...buttonProps },
|
|
34
|
-
react_1.default.createElement(icon_1.Icon, { "aria-label": label, name: iconName, size: iconSize })));
|
|
35
|
-
});
|
|
36
|
-
exports.IconButton.displayName = "UxfUiIconButton";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
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 icon_button_stories_1 = require("./icon-button.stories");
|
|
9
|
-
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(icon_button_stories_1.Default, null));
|
|
@@ -1,58 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Default = Default;
|
|
27
|
-
const storybook_config_1 = require("@uxf/ui/utils/storybook-config");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
const toggle_1 = require("../toggle");
|
|
30
|
-
const icon_button_1 = require("./icon-button");
|
|
31
|
-
function Default() {
|
|
32
|
-
const [isDisabled, setIsDisabled] = (0, react_1.useState)(false);
|
|
33
|
-
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
34
|
-
const config = (0, storybook_config_1.useStorybookConfig)("IconButton");
|
|
35
|
-
// eslint-disable-next-line no-console
|
|
36
|
-
const onClick = console.log;
|
|
37
|
-
const gridColumnsCount = config.variants.length * config.sizes.length + 1;
|
|
38
|
-
const gridTemplateColumns = `repeat(${gridColumnsCount}, 100px)`;
|
|
39
|
-
return (react_1.default.createElement("div", { className: "p-4" },
|
|
40
|
-
react_1.default.createElement("div", { className: "grid gap-3 p-4", style: { gridTemplateColumns } },
|
|
41
|
-
react_1.default.createElement("div", null,
|
|
42
|
-
react_1.default.createElement(toggle_1.Toggle, { className: "p-0", label: "Disabled", name: "is-disabled", onChange: (value) => setIsDisabled(Boolean(value)), size: "sm", value: isDisabled }),
|
|
43
|
-
react_1.default.createElement(toggle_1.Toggle, { className: "p-0 pt-2", label: "Loading", name: "is-loading", onChange: (value) => setIsLoading(Boolean(value)), size: "sm", value: isLoading })),
|
|
44
|
-
config.variants.map((variant) => (react_1.default.createElement("div", { className: "border-b border-blue-500 pb-2 text-center text-xs text-gray-400", key: variant, style: { gridColumn: "span 4" } },
|
|
45
|
-
"variant=",
|
|
46
|
-
variant))),
|
|
47
|
-
react_1.default.createElement("div", null),
|
|
48
|
-
config.variants.flatMap((variant) => config.sizes.map((size) => (react_1.default.createElement("div", { className: "text-center text-xs text-gray-400", key: `${variant}${size}` },
|
|
49
|
-
"size=",
|
|
50
|
-
size))))),
|
|
51
|
-
config.colors.map((color) => (react_1.default.createElement("div", { className: color === "inverted" ? "min-w-fit bg-[#1F2A37] dark:bg-white" : undefined, key: color },
|
|
52
|
-
react_1.default.createElement("div", { className: "grid gap-3 px-4 py-2", style: { gridTemplateColumns } },
|
|
53
|
-
react_1.default.createElement("div", { className: "flex items-center text-center text-xs text-gray-400" },
|
|
54
|
-
"color=",
|
|
55
|
-
color),
|
|
56
|
-
config.variants.map((variant) => (react_1.default.createElement(react_1.Fragment, { key: variant }, config.sizes.map((size) => (react_1.default.createElement("div", { className: "flex items-center justify-center gap-2", key: `${size}${color}${variant}` },
|
|
57
|
-
react_1.default.createElement(icon_button_1.IconButton, { color: color, iconName: "user", isDisabled: isDisabled, isLoading: isLoading, label: "User", onClick: onClick, size: size, variant: variant })))))))))))));
|
|
58
|
-
}
|
package/icon-button/index.d.ts
DELETED
package/icon-button/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconButton = void 0;
|
|
4
|
-
var icon_button_1 = require("./icon-button");
|
|
5
|
-
Object.defineProperty(exports, "IconButton", { enumerable: true, get: function () { return icon_button_1.IconButton; } });
|
|
@@ -1,15 +0,0 @@
|
|
|
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.CloseButton = void 0;
|
|
7
|
-
const icon_1 = require("@uxf/ui/icon");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const CloseButton = (props) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
return (react_1.default.createElement("button", { className: "uxf-image-gallery__close-button", onClick: () => props.onClick() },
|
|
12
|
-
react_1.default.createElement("span", { className: "uxf-image-gallery__close-button-text" }, (_a = props.text) !== null && _a !== void 0 ? _a : "Zavřít"), (_b = props.buttonElement) !== null && _b !== void 0 ? _b : react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__close-button-icon", name: "xmarkLarge" })));
|
|
13
|
-
};
|
|
14
|
-
exports.CloseButton = CloseButton;
|
|
15
|
-
exports.CloseButton.displayName = "UxfUiCloseButton";
|
|
@@ -1,14 +0,0 @@
|
|
|
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.Dot = void 0;
|
|
7
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const Dot = (props) => {
|
|
10
|
-
const className = (0, cx_1.cx)("uxf-image-gallery__dot", props.active ? "uxf-image-gallery__dot--active" : "");
|
|
11
|
-
return react_1.default.createElement("div", { className: className });
|
|
12
|
-
};
|
|
13
|
-
exports.Dot = Dot;
|
|
14
|
-
exports.Dot.displayName = "UxfUiDot";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC, ReactElement } from "react";
|
|
2
|
-
import { ImageGalleryImageProps } from "../types";
|
|
3
|
-
export interface GalleryProps {
|
|
4
|
-
closeButtonTitle?: string;
|
|
5
|
-
disableBackdropClose?: boolean;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
onNext: () => void;
|
|
8
|
-
onPrevious: () => void;
|
|
9
|
-
imageIndex: number;
|
|
10
|
-
images: ImageGalleryImageProps[];
|
|
11
|
-
prevButtonElement?: ReactElement;
|
|
12
|
-
nextButtonElement?: ReactElement;
|
|
13
|
-
closeButtonElement?: ReactElement;
|
|
14
|
-
}
|
|
15
|
-
export declare const Gallery: FC<GalleryProps>;
|
|
@@ -1,80 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Gallery = void 0;
|
|
27
|
-
const use_swipeable_1 = require("@uxf/core-react/swipeable/use-swipeable");
|
|
28
|
-
const image_1 = require("@uxf/core/utils/image");
|
|
29
|
-
const resizer_1 = require("@uxf/core/utils/resizer");
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const close_button_1 = require("./close-button");
|
|
32
|
-
const dot_1 = require("./dot");
|
|
33
|
-
const next_button_1 = require("./next-button");
|
|
34
|
-
const prev_button_1 = require("./prev-button");
|
|
35
|
-
const Gallery = (props) => {
|
|
36
|
-
var _a;
|
|
37
|
-
(0, react_1.useEffect)(() => {
|
|
38
|
-
const onKeyDown = (event) => {
|
|
39
|
-
switch (event.key) {
|
|
40
|
-
case "ArrowRight":
|
|
41
|
-
props.onNext();
|
|
42
|
-
break;
|
|
43
|
-
case "ArrowLeft":
|
|
44
|
-
props.onPrevious();
|
|
45
|
-
break;
|
|
46
|
-
case "Escape":
|
|
47
|
-
props.onClose();
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
document.body.style.overflow = "hidden";
|
|
52
|
-
window.addEventListener("keydown", onKeyDown);
|
|
53
|
-
return () => {
|
|
54
|
-
document.body.style.overflow = "auto";
|
|
55
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
56
|
-
};
|
|
57
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
|
-
}, []);
|
|
59
|
-
const imageSrc = props.images[props.imageIndex].src;
|
|
60
|
-
const customContent = props.images[props.imageIndex].customContent;
|
|
61
|
-
const handlers = (0, use_swipeable_1.useSwipeable)({
|
|
62
|
-
onSwipedLeft: () => props.onNext(),
|
|
63
|
-
onSwipedRight: () => props.onPrevious(),
|
|
64
|
-
swipeDuration: 500,
|
|
65
|
-
});
|
|
66
|
-
return (react_1.default.createElement("div", { "aria-modal": true, className: "uxf-image-gallery", role: "dialog" },
|
|
67
|
-
react_1.default.createElement("div", { "aria-hidden": true, className: "uxf-image-gallery__backdrop", onClick: !props.disableBackdropClose ? props.onClose : undefined }),
|
|
68
|
-
react_1.default.createElement("div", { className: "uxf-image-gallery__close-button-wrapper" },
|
|
69
|
-
react_1.default.createElement(close_button_1.CloseButton, { buttonElement: props.closeButtonElement, onClick: props.onClose, text: props.closeButtonTitle })),
|
|
70
|
-
props.images.length > 1 && (react_1.default.createElement("div", { className: "uxf-image-gallery__buttons" },
|
|
71
|
-
react_1.default.createElement(prev_button_1.PrevButton, { buttonElement: props.prevButtonElement, onClick: props.onPrevious }),
|
|
72
|
-
react_1.default.createElement(next_button_1.NextButton, { buttonElement: props.nextButtonElement, onClick: props.onNext }))),
|
|
73
|
-
react_1.default.createElement("div", { className: "uxf-image-gallery__content", ...handlers },
|
|
74
|
-
react_1.default.createElement("div", { className: "uxf-image-gallery__inner" },
|
|
75
|
-
react_1.default.createElement("img", { alt: "", className: "uxf-image-gallery__image", src: typeof imageSrc === "string" ? imageSrc : ((_a = (0, resizer_1.resizerImageUrl)(imageSrc)) !== null && _a !== void 0 ? _a : "") }),
|
|
76
|
-
react_1.default.createElement("div", { className: "uxf-image-gallery__custom-content" }, customContent))),
|
|
77
|
-
props.images.length > 1 && (react_1.default.createElement("div", { className: "uxf-image-gallery__dots" }, props.images.map((image, index) => (react_1.default.createElement(dot_1.Dot, { active: index === props.imageIndex, key: (0, image_1.getImgUniqueIdentifier)(image.src) || index })))))));
|
|
78
|
-
};
|
|
79
|
-
exports.Gallery = Gallery;
|
|
80
|
-
exports.Gallery.displayName = "UxfUiGallery";
|
|
@@ -1,14 +0,0 @@
|
|
|
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.NextButton = void 0;
|
|
7
|
-
const icon_1 = require("@uxf/ui/icon");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const NextButton = (props) => {
|
|
10
|
-
var _a;
|
|
11
|
-
return (react_1.default.createElement("button", { className: "uxf-image-gallery__button uxf-image-gallery__button--next", onClick: props.onClick }, (_a = props.buttonElement) !== null && _a !== void 0 ? _a : react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__button-icon", name: "chevronRight" })));
|
|
12
|
-
};
|
|
13
|
-
exports.NextButton = NextButton;
|
|
14
|
-
exports.NextButton.displayName = "UxfUiNextButton";
|
|
@@ -1,14 +0,0 @@
|
|
|
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.PrevButton = void 0;
|
|
7
|
-
const icon_1 = require("@uxf/ui/icon");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const PrevButton = (props) => {
|
|
10
|
-
var _a;
|
|
11
|
-
return (react_1.default.createElement("button", { className: "uxf-image-gallery__button uxf-image-gallery__button--prev", onClick: props.onClick }, (_a = props.buttonElement) !== null && _a !== void 0 ? _a : react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__button-icon", name: "chevronLeft" })));
|
|
12
|
-
};
|
|
13
|
-
exports.PrevButton = PrevButton;
|
|
14
|
-
exports.PrevButton.displayName = "UxfUiPrevButton";
|