@uxf/ui 1.0.0-beta.98 → 1.0.1
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 +4 -0
- package/_file-input-base/file-input-base.d.ts +12 -0
- package/_file-input-base/file-input-base.js +32 -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 +27 -0
- package/_input-with-popover/input-with-popover.js +89 -0
- package/_private-utils/get-provider-config.js +1 -0
- package/_select-base/_select-base.d.ts +53 -0
- package/_select-base/_select-base.js +94 -0
- package/_select-base/index.d.ts +2 -0
- package/_select-base/index.js +5 -0
- package/avatar/avatar.js +25 -5
- package/avatar/avatar.spec.js +2 -2
- package/avatar/avatar.stories.d.ts +1 -1
- package/avatar/index.d.ts +2 -1
- package/avatar/index.js +3 -15
- package/avatar-file-input/avatar-file-input.d.ts +5 -30
- package/avatar-file-input/avatar-file-input.js +12 -34
- 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 +1 -1
- package/avatar-file-input/avatar-file-input.stories.js +44 -18
- package/avatar-file-input/index.d.ts +2 -1
- package/avatar-file-input/index.js +3 -15
- package/badge/badge.d.ts +1 -1
- package/badge/badge.js +25 -5
- package/badge/badge.spec.d.ts +1 -0
- package/badge/badge.spec.js +9 -0
- package/badge/badge.stories.d.ts +1 -1
- package/badge/index.d.ts +3 -1
- package/badge/index.js +3 -15
- package/badge/theme.d.ts +1 -0
- package/button/button.d.ts +3 -3
- package/button/button.js +26 -8
- package/button/button.spec.d.ts +1 -0
- package/button/button.spec.js +9 -0
- package/button/button.stories.d.ts +2 -6
- package/button/button.stories.js +19 -17
- package/button/index.d.ts +3 -1
- package/button/index.js +3 -15
- package/button/theme.d.ts +3 -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 +7 -0
- package/button-group/button-group.stories.js +40 -0
- package/button-group/index.d.ts +2 -0
- package/button-group/index.js +5 -0
- package/button-list/button-list.d.ts +21 -0
- package/button-list/button-list.js +77 -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 +7 -0
- package/button-list/button-list.stories.js +55 -0
- package/button-list/index.d.ts +2 -0
- package/button-list/index.js +5 -0
- package/calendar/calendar-day-cell.d.ts +7 -0
- package/{date-picker-input/date-picker-day.js → calendar/calendar-day-cell.js} +8 -9
- package/calendar/calendar-provider.d.ts +6 -0
- package/{date-picker-input/date-picker-provider.js → calendar/calendar-provider.js} +9 -9
- package/calendar/calendar.d.ts +7 -0
- package/calendar/calendar.js +53 -0
- package/calendar/calendar.stories.d.ts +10 -0
- package/calendar/calendar.stories.js +49 -0
- package/calendar/index.d.ts +1 -0
- package/{form-control → calendar}/index.js +1 -1
- package/checkbox/checkbox.d.ts +6 -7
- package/checkbox/checkbox.js +48 -13
- package/checkbox/checkbox.spec.js +2 -4
- package/checkbox/checkbox.stories.d.ts +2 -2
- package/checkbox/checkbox.stories.js +8 -6
- package/checkbox/index.d.ts +3 -1
- package/checkbox/index.js +3 -15
- package/{checkbox-visual → checkbox}/theme.d.ts +1 -0
- package/checkbox-button/checkbox-button.d.ts +3 -2
- package/checkbox-button/checkbox-button.js +26 -6
- package/checkbox-button/checkbox-button.spec.js +2 -3
- package/checkbox-button/checkbox-button.stories.d.ts +1 -1
- package/checkbox-button/checkbox-button.stories.js +8 -18
- package/checkbox-button/index.d.ts +2 -1
- package/checkbox-button/index.js +3 -15
- package/checkbox-input/checkbox-input.d.ts +12 -0
- package/checkbox-input/checkbox-input.js +37 -0
- package/checkbox-input/checkbox-input.spec.d.ts +1 -0
- package/checkbox-input/checkbox-input.spec.js +9 -0
- package/{checkbox-visual/checkbox-visual.stories.d.ts → checkbox-input/checkbox-input.stories.d.ts} +2 -2
- package/{checkbox-visual/checkbox-visual.stories.js → checkbox-input/checkbox-input.stories.js} +9 -7
- package/checkbox-input/index.d.ts +2 -0
- package/checkbox-input/index.js +5 -0
- package/chip/chip.d.ts +5 -4
- package/chip/chip.js +26 -6
- package/chip/chip.stories.d.ts +2 -6
- package/chip/chip.stories.js +2 -2
- package/chip/theme.d.ts +5 -4
- package/color-radio/color-radio.d.ts +12 -0
- package/color-radio/color-radio.js +65 -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 +7 -0
- package/color-radio/color-radio.stories.js +31 -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 +3 -2
- package/color-radio-group/color-radio-group.js +12 -10
- 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 +1 -1
- package/color-radio-group/color-radio-group.stories.js +4 -2
- package/color-radio-group/index.d.ts +2 -1
- package/color-radio-group/index.js +3 -15
- package/color-scheme/index.d.ts +1 -0
- package/color-scheme/index.js +3 -1
- package/color-scheme/use-color-scheme.d.ts +1 -0
- package/color-scheme/use-color-scheme.js +19 -0
- package/combobox/combobox.d.ts +19 -20
- package/combobox/combobox.js +19 -31
- package/combobox/combobox.spec.d.ts +1 -0
- package/combobox/combobox.spec.js +10 -0
- package/combobox/combobox.stories.d.ts +7 -4
- package/combobox/combobox.stories.js +25 -12
- package/combobox/index.d.ts +2 -1
- package/combobox/index.js +3 -15
- package/config/icons-config.d.ts +1 -1
- package/config/icons-config.js +1 -1
- package/config/icons.d.ts +41 -1
- package/config/icons.js +8 -0
- package/content/types.d.ts +3 -3
- package/context/context.d.ts +2 -1
- package/context/provider.d.ts +1 -1
- package/context/provider.js +3 -0
- package/context/use-component-context.d.ts +1 -1
- package/date-picker/date-picker-content.d.ts +2 -0
- package/{date-picker-input/date-picker.js → date-picker/date-picker-content.js} +5 -3
- package/{date-picker-input → date-picker}/date-picker-decade.js +12 -10
- package/{date-picker-input → date-picker}/date-picker-month.js +21 -15
- package/date-picker/date-picker-navigation.d.ts +9 -0
- package/date-picker/date-picker-navigation.js +19 -0
- package/{date-picker-input → date-picker}/date-picker-year.js +16 -11
- package/date-picker/date-picker.d.ts +10 -0
- package/date-picker/date-picker.js +27 -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 +7 -0
- package/date-picker/date-picker.stories.js +43 -0
- package/date-picker/index.d.ts +3 -0
- package/date-picker/index.js +5 -0
- package/date-picker/types.d.ts +1 -0
- package/date-picker-input/date-picker-input.d.ts +9 -18
- package/date-picker-input/date-picker-input.js +54 -59
- 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 +1 -8
- package/date-picker-input/date-picker-input.stories.js +9 -14
- package/date-picker-input/index.d.ts +2 -3
- package/date-picker-input/index.js +6 -17
- package/datetime-picker/datetime-picker.d.ts +13 -0
- package/datetime-picker/datetime-picker.js +94 -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 +7 -0
- package/datetime-picker/datetime-picker.stories.js +43 -0
- package/datetime-picker/index.d.ts +2 -0
- package/datetime-picker/index.js +7 -0
- package/datetime-picker-input/datetime-picker-input.d.ts +12 -0
- package/datetime-picker-input/datetime-picker-input.js +81 -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 +7 -0
- package/datetime-picker-input/datetime-picker-input.stories.js +49 -0
- package/datetime-picker-input/index.d.ts +2 -0
- package/datetime-picker-input/index.js +7 -0
- package/dropdown/dropdown.d.ts +4 -4
- package/dropdown/dropdown.js +27 -6
- package/dropdown/dropdown.spec.d.ts +1 -0
- package/dropdown/dropdown.spec.js +9 -0
- package/dropdown/dropdown.stories.d.ts +2 -2
- package/dropdown/index.d.ts +2 -1
- package/dropdown/index.js +3 -15
- package/dropzone/dropzone-input.d.ts +19 -0
- package/dropzone/dropzone-input.js +121 -0
- package/dropzone/dropzone-list.d.ts +10 -0
- package/dropzone/dropzone-list.js +92 -0
- package/dropzone/dropzone.spec.d.ts +1 -0
- package/dropzone/dropzone.spec.js +9 -0
- package/dropzone/dropzone.stories.d.ts +10 -0
- package/dropzone/dropzone.stories.js +63 -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 +3 -4
- package/error-message/error-message.js +3 -2
- 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 +3 -4
- package/error-message/index.d.ts +1 -1
- package/error-message/index.js +3 -15
- package/file-input/file-input.d.ts +12 -0
- package/file-input/file-input.js +75 -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 +7 -0
- package/file-input/file-input.stories.js +50 -0
- package/file-input/index.d.ts +2 -0
- package/file-input/index.js +5 -0
- package/flash-messages/flash-message.d.ts +1 -1
- package/flash-messages/flash-message.js +1 -0
- package/flash-messages/flash-messages.js +1 -1
- 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 +1 -1
- package/flash-messages/flash-messages.stories.js +26 -7
- package/flash-messages/index.d.ts +3 -0
- package/flash-messages/index.js +8 -0
- package/flash-messages/theme.d.ts +2 -0
- package/{form-control/form-control.d.ts → form-component/form-component.d.ts} +2 -2
- 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-control/form-control.stories.d.ts → form-component/form-component.stories.d.ts} +2 -2
- package/form-component/form-component.stories.js +25 -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 +32 -0
- package/hooks/use-dropdown.d.ts +32 -2
- package/hooks/use-dropdown.js +4 -6
- package/hooks/use-input-submit.d.ts +1 -1
- package/icon/icon.d.ts +3 -3
- package/icon/icon.js +25 -5
- package/icon/icon.spec.d.ts +1 -0
- package/icon/icon.spec.js +10 -0
- package/icon/icon.stories.d.ts +6 -10
- package/icon/icon.stories.js +2 -2
- package/icon/index.d.ts +2 -1
- package/icon/index.js +3 -15
- package/icon/types.d.ts +1 -1
- package/image-gallery/components/arrow-button.d.ts +7 -0
- package/image-gallery/components/{previous-button.js → arrow-button.js} +7 -5
- package/image-gallery/components/close-button.d.ts +4 -3
- package/image-gallery/components/close-button.js +9 -5
- package/image-gallery/components/dot.d.ts +3 -3
- package/image-gallery/components/dot.js +6 -4
- package/image-gallery/components/gallery.d.ts +4 -3
- package/image-gallery/components/gallery.js +20 -20
- package/image-gallery/context.d.ts +1 -1
- package/image-gallery/image-gallery.d.ts +4 -4
- package/image-gallery/image-gallery.js +7 -8
- 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 +5 -4
- package/image-gallery/image-gallery.stories.js +21 -10
- package/image-gallery/image.d.ts +2 -3
- package/image-gallery/image.js +8 -4
- package/image-gallery/index.d.ts +6 -4
- package/image-gallery/index.js +6 -24
- package/image-gallery/types.d.ts +4 -2
- package/image-gallery/use-image.js +3 -2
- package/input/index.d.ts +9 -8
- package/input/index.js +4 -2
- package/input/input-element.d.ts +2 -1
- package/input/input-element.js +28 -6
- package/input/input-left-addon.d.ts +3 -7
- package/input/input-left-addon.js +6 -4
- package/input/input-left-element.d.ts +3 -7
- package/input/input-left-element.js +3 -3
- package/input/input-remove-button.d.ts +5 -0
- package/input/input-remove-button.js +29 -0
- package/input/input-right-addon.d.ts +2 -5
- package/input/input-right-addon.js +6 -4
- package/input/input-right-element.d.ts +3 -7
- package/input/input-right-element.js +3 -3
- package/input/input.d.ts +11 -1
- package/input/input.js +23 -23
- package/input/input.spec.d.ts +1 -0
- package/input/input.spec.js +10 -0
- package/input/input.stories.d.ts +10 -9
- package/input/input.stories.js +13 -10
- package/input/theme.d.ts +2 -0
- package/label/index.d.ts +2 -1
- package/label/index.js +3 -15
- package/label/label.js +28 -6
- package/label/label.spec.d.ts +1 -0
- package/label/label.spec.js +9 -0
- package/label/label.stories.d.ts +1 -1
- package/layout/index.d.ts +2 -1
- package/layout/index.js +3 -15
- package/layout/layout.js +5 -4
- package/layout/layout.spec.d.ts +1 -0
- package/layout/layout.spec.js +9 -0
- package/layout/layout.stories.d.ts +1 -1
- package/list-item/index.d.ts +2 -1
- package/list-item/index.js +3 -15
- package/list-item/list-item.js +25 -5
- 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 +1 -1
- package/list-item/list-item.stories.js +7 -5
- package/loader/index.d.ts +2 -0
- package/loader/index.js +5 -0
- package/loader/loader.d.ts +5 -2
- package/loader/loader.js +27 -6
- package/loader/loader.spec.d.ts +1 -0
- package/loader/loader.spec.js +9 -0
- package/loader/loader.stories.d.ts +2 -2
- package/loader/loader.stories.js +4 -3
- package/modal/index.d.ts +3 -0
- package/modal/index.js +9 -0
- package/modal/modal-dialog.d.ts +11 -0
- package/modal/modal-dialog.js +38 -0
- package/modal/modal-service.d.ts +5 -0
- package/modal/modal-service.js +21 -0
- package/modal/modal.d.ts +14 -0
- package/modal/modal.js +51 -0
- package/modal/modal.spec.d.ts +1 -0
- package/modal/modal.spec.js +9 -0
- package/modal/modal.stories.d.ts +7 -0
- package/modal/modal.stories.js +50 -0
- package/modal/theme.d.ts +5 -0
- package/modal/theme.js +2 -0
- package/multi-combobox/_multi-combobox-base.d.ts +8 -0
- package/multi-combobox/_multi-combobox-base.js +112 -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 +67 -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 +10 -0
- package/multi-combobox/multi-combobox.stories.js +86 -0
- package/multi-combobox/types.d.ts +36 -0
- package/multi-combobox/types.js +2 -0
- package/multi-select/_multi-select-base.d.ts +8 -0
- package/multi-select/_multi-select-base.js +77 -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 +55 -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 +9 -0
- package/{mutli-combobox/multi-combobox.stories.js → multi-select/multi-select.stories.js} +17 -22
- package/multi-select/types.d.ts +31 -0
- package/multi-select/types.js +2 -0
- package/package.json +11 -11
- package/pagination/index.d.ts +2 -0
- package/pagination/index.js +5 -0
- package/pagination/pagination.d.ts +3 -0
- package/pagination/pagination.js +11 -6
- package/pagination/pagination.spec.d.ts +1 -0
- package/pagination/pagination.spec.js +9 -0
- package/pagination/pagination.stories.d.ts +4 -1
- package/pagination/pagination.stories.js +23 -3
- 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 +2 -2
- package/paper/paper.js +25 -5
- package/paper/paper.spec.d.ts +1 -0
- package/paper/paper.spec.js +9 -0
- package/paper/paper.stories.d.ts +2 -2
- package/radio/index.d.ts +3 -1
- package/radio/index.js +3 -15
- package/radio/radio.d.ts +9 -6
- package/radio/radio.js +45 -9
- package/radio/radio.spec.js +2 -3
- package/radio/radio.stories.d.ts +2 -2
- package/radio/radio.stories.js +12 -12
- package/radio/theme.d.ts +1 -0
- package/radio-group/index.d.ts +3 -1
- package/radio-group/index.js +3 -15
- package/radio-group/radio-group.d.ts +3 -4
- package/radio-group/radio-group.js +10 -8
- package/radio-group/radio-group.spec.js +2 -17
- package/radio-group/radio-group.stories.d.ts +1 -1
- package/radio-group/radio-group.stories.js +7 -4
- package/radio-group/theme.d.ts +2 -0
- package/raster-image/index.d.ts +2 -1
- package/raster-image/index.js +3 -15
- package/raster-image/raster-image.d.ts +3 -3
- package/raster-image/raster-image.js +2 -1
- 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 -25
- package/select/index.d.ts +2 -1
- package/select/index.js +3 -15
- package/select/select.d.ts +16 -17
- package/select/select.js +16 -52
- package/select/select.spec.d.ts +1 -0
- package/select/select.spec.js +9 -0
- package/select/select.stories.d.ts +6 -4
- package/select/select.stories.js +24 -27
- package/select/theme.d.ts +5 -0
- package/select/theme.js +2 -0
- package/tabs/index.d.ts +2 -1
- package/tabs/index.js +3 -15
- package/tabs/tabs.d.ts +2 -1
- package/tabs/tabs.js +4 -3
- package/tabs/tabs.spec.d.ts +1 -0
- package/tabs/tabs.spec.js +9 -0
- package/tabs/tabs.stories.d.ts +1 -1
- package/text-input/index.d.ts +2 -1
- package/text-input/index.js +3 -15
- package/text-input/text-input.d.ts +2 -2
- package/text-input/text-input.js +12 -19
- package/text-input/text-input.spec.js +2 -2
- package/text-input/text-input.stories.d.ts +2 -2
- package/text-input/text-input.stories.js +23 -7
- package/text-link/index.d.ts +2 -1
- package/text-link/index.js +3 -15
- package/text-link/text-link.d.ts +3 -0
- package/text-link/text-link.js +27 -7
- 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 +1 -1
- package/text-link/text-link.stories.js +4 -2
- package/text-link/theme.d.ts +3 -0
- package/text-link/theme.js +2 -0
- package/textarea/index.d.ts +2 -1
- package/textarea/index.js +3 -15
- package/textarea/textarea.js +11 -19
- package/textarea/textarea.spec.d.ts +1 -0
- package/textarea/textarea.spec.js +9 -0
- package/textarea/textarea.stories.d.ts +1 -1
- package/textarea/textarea.stories.js +4 -2
- package/time-picker/index.d.ts +2 -0
- package/time-picker/index.js +5 -0
- package/{time-picker-input → time-picker}/time-picker-hour.js +2 -0
- package/{time-picker-input → time-picker}/time-picker-hours.js +1 -0
- package/time-picker/time-picker-input.spec.d.ts +1 -0
- package/time-picker/time-picker-input.spec.js +9 -0
- package/time-picker/time-picker-input.stories.d.ts +7 -0
- package/time-picker/time-picker-input.stories.js +43 -0
- package/{time-picker-input → time-picker}/time-picker-minute.js +2 -0
- package/{time-picker-input → time-picker}/time-picker-minutes.js +1 -0
- package/{time-picker-input → time-picker}/time-picker.d.ts +1 -1
- package/{time-picker-input → time-picker}/time-picker.js +2 -1
- package/time-picker-input/index.d.ts +2 -2
- package/time-picker-input/index.js +6 -16
- package/time-picker-input/time-picker-input.d.ts +7 -19
- package/time-picker-input/time-picker-input.js +51 -62
- 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 +1 -1
- package/time-picker-input/time-picker-input.stories.js +9 -6
- package/toggle/index.d.ts +3 -1
- package/toggle/index.js +3 -15
- package/toggle/theme.d.ts +1 -0
- package/toggle/toggle.d.ts +6 -6
- package/toggle/toggle.js +26 -6
- package/toggle/toggle.spec.d.ts +1 -0
- package/toggle/toggle.spec.js +9 -0
- package/toggle/toggle.stories.d.ts +1 -1
- package/toggle/toggle.stories.js +6 -12
- package/tooltip/index.d.ts +4 -0
- package/tooltip/index.js +7 -0
- package/tooltip/tooltip.d.ts +9 -0
- package/tooltip/tooltip.js +70 -0
- package/tooltip/tooltip.spec.d.ts +1 -0
- package/tooltip/tooltip.spec.js +9 -0
- package/tooltip/tooltip.stories.d.ts +7 -0
- package/tooltip/tooltip.stories.js +19 -0
- package/tooltip/use-tooltip.d.ts +43 -0
- package/tooltip/use-tooltip.js +36 -0
- package/tw-tokens/tw-box-shadow.d.ts +1 -1
- package/tw-tokens/tw-colors.d.ts +27 -1
- package/tw-tokens/tw-colors.js +26 -0
- package/tw-tokens/tw-containers.d.ts +1 -1
- package/tw-tokens/tw-font-size.d.ts +1 -1
- package/tw-tokens/tw-font-weight.d.ts +1 -1
- package/tw-tokens/tw-line-height.d.ts +1 -1
- package/tw-tokens/tw-screens.d.ts +1 -1
- package/tw-tokens/tw-spacing.d.ts +1 -1
- package/tw-tokens/tw-z-index.d.ts +1 -1
- package/types/color.d.ts +2 -2
- package/types/file-response.d.ts +12 -0
- package/types/file-response.js +2 -0
- package/types/form-control-props.d.ts +10 -6
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/typography/typography.spec.js +2 -14
- package/typography/typography.stories.d.ts +2 -2
- package/utils/component-structure-analyzer.d.ts +2 -2
- package/utils/files/get-file-url.d.ts +2 -0
- package/utils/files/get-file-url.js +7 -0
- package/utils/icons-config.js +40 -0
- package/utils/mocks/uploadFIle.mock.d.ts +2 -0
- package/utils/mocks/uploadFIle.mock.js +46 -0
- package/utils/snap-test.js +5 -0
- package/utils/storybook-config.d.ts +2 -2
- package/utils/storybook-config.js +1 -1
- package/utils/tailwind-config.js +17 -74
- package/utils/tailwind-plugins/container.js +39 -0
- package/utils/tailwind-plugins/variants.js +15 -0
- package/utils/tailwind-theme-defaults.js +20 -0
- package/checkbox-visual/checkbox-visual.d.ts +0 -10
- package/checkbox-visual/checkbox-visual.js +0 -17
- package/checkbox-visual/index.d.ts +0 -1
- package/checkbox-visual/index.js +0 -17
- package/color-radio-group/color-radio.d.ts +0 -7
- package/color-radio-group/color-radio.js +0 -22
- package/css/avatar-file-input.css +0 -7
- package/css/avatar.css +0 -15
- package/css/badge.css +0 -23
- package/css/button.css +0 -221
- package/css/button.old.css +0 -231
- package/css/checkbox-button.css +0 -98
- package/css/checkbox.css +0 -147
- package/css/chip.css +0 -171
- package/css/chip.old.css +0 -37
- package/css/color-radio-group.css +0 -21
- package/css/color-radio.css +0 -21
- package/css/combobox.css +0 -108
- package/css/combobox.old.css +0 -102
- package/css/component-structure-analyzer.css +0 -31
- package/css/date-picker-input.css +0 -135
- package/css/date-picker.css +0 -90
- package/css/dropdown.css +0 -24
- package/css/dropdown.old.css +0 -24
- package/css/error-message.css +0 -3
- package/css/flash-messages.css +0 -20
- package/css/form-control.css +0 -7
- package/css/icon.css +0 -7
- package/css/input-basic.css +0 -18
- package/css/input.css +0 -205
- package/css/input.old.css +0 -193
- package/css/label.css +0 -15
- package/css/layout.css +0 -47
- package/css/list-item.css +0 -29
- package/css/loader.css +0 -11
- package/css/multi-combobox.css +0 -72
- package/css/pagination.css +0 -28
- package/css/paper.css +0 -3
- package/css/radio-group.css +0 -160
- package/css/radio.css +0 -105
- package/css/raster-image.css +0 -20
- package/css/select.css +0 -72
- package/css/select.old.css +0 -66
- package/css/tabs.css +0 -131
- package/css/text-link.css +0 -12
- package/css/textarea.css +0 -117
- package/css/time-picker-input.css +0 -138
- package/css/time-picker.css +0 -27
- package/css/toggle.css +0 -80
- package/css/typography.css +0 -51
- package/date-picker-input/date-picker-day.d.ts +0 -8
- package/date-picker-input/date-picker-provider.d.ts +0 -8
- package/date-picker-input/date-picker.d.ts +0 -3
- package/date-picker-input/types.d.ts +0 -5
- package/form-control/form-control.js +0 -19
- package/form-control/form-control.stories.js +0 -25
- package/form-control/index.d.ts +0 -1
- package/image-gallery/components/next-button.d.ts +0 -6
- package/image-gallery/components/next-button.js +0 -12
- package/image-gallery/components/previous-button.d.ts +0 -6
- package/mutli-combobox/index.d.ts +0 -1
- package/mutli-combobox/index.js +0 -17
- package/mutli-combobox/multi-combobox.d.ts +0 -27
- package/mutli-combobox/multi-combobox.js +0 -94
- package/mutli-combobox/multi-combobox.stories.d.ts +0 -10
- /package/{checkbox-visual → checkbox}/theme.js +0 -0
- /package/{date-picker-input → date-picker}/date-picker-decade.d.ts +0 -0
- /package/{date-picker-input → date-picker}/date-picker-month.d.ts +0 -0
- /package/{date-picker-input → date-picker}/date-picker-year.d.ts +0 -0
- /package/{date-picker-input → date-picker}/types.js +0 -0
- /package/{time-picker-input → time-picker}/time-picker-hour.d.ts +0 -0
- /package/{time-picker-input → time-picker}/time-picker-hours.d.ts +0 -0
- /package/{time-picker-input → time-picker}/time-picker-minute.d.ts +0 -0
- /package/{time-picker-input → time-picker}/time-picker-minutes.d.ts +0 -0
package/hooks/use-dropdown.js
CHANGED
|
@@ -2,26 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDropdown = void 0;
|
|
4
4
|
const react_1 = require("@floating-ui/react");
|
|
5
|
-
function useDropdown(placement, matchWidth = false) {
|
|
5
|
+
function useDropdown(placement, matchWidth = false, strategy) {
|
|
6
6
|
return (0, react_1.useFloating)({
|
|
7
|
-
placement,
|
|
8
7
|
middleware: [
|
|
9
8
|
(0, react_1.flip)(),
|
|
10
9
|
(0, react_1.shift)(),
|
|
11
10
|
(0, react_1.size)({
|
|
12
|
-
apply({ availableHeight, availableWidth, elements
|
|
11
|
+
apply({ availableHeight, availableWidth, elements }) {
|
|
13
12
|
Object.assign(elements.floating.style, {
|
|
14
|
-
left: x + "px",
|
|
15
13
|
maxHeight: Math.min(240, availableHeight) + "px",
|
|
16
14
|
maxWidth: matchWidth
|
|
17
15
|
? Math.min(availableWidth, elements.reference.getBoundingClientRect().width) + "px"
|
|
18
16
|
: availableWidth,
|
|
19
|
-
position: strategy,
|
|
20
|
-
top: y + "px",
|
|
21
17
|
});
|
|
22
18
|
},
|
|
23
19
|
}),
|
|
24
20
|
],
|
|
21
|
+
placement,
|
|
22
|
+
strategy,
|
|
25
23
|
whileElementsMounted: (reference, floating, update) => (0, react_1.autoUpdate)(reference, floating, update, {
|
|
26
24
|
elementResize: typeof ResizeObserver !== "undefined",
|
|
27
25
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
|
|
2
|
+
type SubmitResolverType = "checkbox" | "radio-group";
|
|
3
3
|
export declare function useInputSubmit<T extends HTMLElement>(ref: RefObject<T>, type: SubmitResolverType, disabled: boolean | undefined): void;
|
|
4
4
|
export {};
|
package/icon/icon.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
2
|
import { IconName } from "./types";
|
|
3
|
-
|
|
3
|
+
type NameOrComponentType = {
|
|
4
4
|
name: IconName;
|
|
5
5
|
Component?: never;
|
|
6
6
|
} | {
|
|
7
7
|
name?: never;
|
|
8
8
|
Component: any;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type IconProps = {
|
|
11
11
|
className?: string;
|
|
12
12
|
mode?: "meet" | "slice";
|
|
13
13
|
size?: number;
|
|
14
|
-
style?:
|
|
14
|
+
style?: CSSProperties;
|
|
15
15
|
} & NameOrComponentType;
|
|
16
16
|
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
17
17
|
export {};
|
package/icon/icon.js
CHANGED
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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;
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
26
|
exports.Icon = void 0;
|
|
7
27
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
8
|
-
const forwardRef_1 = require("@uxf/core/utils/forwardRef");
|
|
9
28
|
const rem_1 = require("@uxf/styles/units/rem");
|
|
10
|
-
const react_1 =
|
|
29
|
+
const react_1 = __importStar(require("react"));
|
|
11
30
|
const context_1 = require("../context");
|
|
12
|
-
exports.Icon = (0,
|
|
31
|
+
exports.Icon = (0, react_1.forwardRef)((props, ref) => {
|
|
13
32
|
var _a, _b;
|
|
14
33
|
const componentContext = (0, context_1.useComponentContext)("icon");
|
|
15
34
|
const CustomComponent = props.Component;
|
|
@@ -36,3 +55,4 @@ exports.Icon = (0, forwardRef_1.forwardRef)("Icon", (props, ref) => {
|
|
|
36
55
|
react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", width: props.size, height: props.size },
|
|
37
56
|
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" }))));
|
|
38
57
|
});
|
|
58
|
+
exports.Icon.displayName = "UxfUiIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
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
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
/// <reference types="mdx" />
|
|
2
1
|
import React from "react";
|
|
3
|
-
import Docs from "./icon.docs.mdx";
|
|
4
2
|
declare const _default: {
|
|
5
3
|
title: string;
|
|
6
4
|
component: React.ForwardRefExoticComponent<import("./icon").IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
7
5
|
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
page: typeof Docs;
|
|
10
|
-
};
|
|
6
|
+
docs: {};
|
|
11
7
|
};
|
|
12
8
|
};
|
|
13
9
|
export default _default;
|
|
14
|
-
export declare function AllIcons(): JSX.Element;
|
|
15
|
-
export declare function ColorAndSizes(): JSX.Element;
|
|
16
|
-
export declare function CustomComponent(): JSX.Element;
|
|
17
|
-
export declare function SpriteIcon(): JSX.Element;
|
|
18
|
-
export declare function SpriteIconNotExists(): JSX.Element;
|
|
10
|
+
export declare function AllIcons(): React.JSX.Element;
|
|
11
|
+
export declare function ColorAndSizes(): React.JSX.Element;
|
|
12
|
+
export declare function CustomComponent(): React.JSX.Element;
|
|
13
|
+
export declare function SpriteIcon(): React.JSX.Element;
|
|
14
|
+
export declare function SpriteIconNotExists(): React.JSX.Element;
|
package/icon/icon.stories.js
CHANGED
|
@@ -7,13 +7,13 @@ exports.SpriteIconNotExists = exports.SpriteIcon = exports.CustomComponent = exp
|
|
|
7
7
|
const icon_1 = require("./icon");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const context_1 = require("../context");
|
|
10
|
-
|
|
10
|
+
// import Docs from "./icon.docs.mdx";
|
|
11
11
|
exports.default = {
|
|
12
12
|
title: "UI/Icon",
|
|
13
13
|
component: icon_1.Icon,
|
|
14
14
|
parameters: {
|
|
15
15
|
docs: {
|
|
16
|
-
|
|
16
|
+
// page: Docs,
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
};
|
package/icon/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { IconProps } from "./icon";
|
|
2
|
+
export { Icon } from "./icon";
|
package/icon/index.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.Icon = void 0;
|
|
4
|
+
var icon_1 = require("./icon");
|
|
5
|
+
Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return icon_1.Icon; } });
|
package/icon/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IconsSet } from "@uxf/ui/icon/theme";
|
|
2
|
-
export
|
|
2
|
+
export type IconName = keyof IconsSet;
|
|
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ArrowButton = void 0;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const icon_1 = require("../../icon");
|
|
8
|
-
|
|
9
|
-
return (react_1.default.createElement("button", { className:
|
|
10
|
-
react_1.default.createElement(icon_1.Icon, { className: "
|
|
11
|
-
}
|
|
12
|
-
exports.
|
|
9
|
+
const ArrowButton = (props) => {
|
|
10
|
+
return (react_1.default.createElement("button", { className: `uxf-image-gallery__button ${props.type === "prev" ? "uxf-image-gallery__button--prev" : "uxf-image-gallery__button--next"}`, onClick: props.onClick },
|
|
11
|
+
react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__button-icon", name: props.type === "prev" ? "chevronLeft" : "chevronRight" })));
|
|
12
|
+
};
|
|
13
|
+
exports.ArrowButton = ArrowButton;
|
|
14
|
+
exports.ArrowButton.displayName = "UxfUiArrowButton";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
interface CloseButtonProps {
|
|
3
|
+
text?: string;
|
|
3
4
|
onClick: () => void;
|
|
4
5
|
}
|
|
5
|
-
declare
|
|
6
|
-
export
|
|
6
|
+
export declare const CloseButton: FC<CloseButtonProps>;
|
|
7
|
+
export {};
|
|
@@ -3,10 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CloseButton = void 0;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const icon_1 = require("../../icon");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
9
|
+
const CloseButton = (props) => {
|
|
10
|
+
var _a;
|
|
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"),
|
|
13
|
+
react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__close-button-icon", name: "xmarkLarge" })));
|
|
14
|
+
};
|
|
15
|
+
exports.CloseButton = CloseButton;
|
|
16
|
+
exports.CloseButton.displayName = "UxfUiCloseButton";
|
|
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Dot = void 0;
|
|
6
7
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
|
|
9
|
-
const className = (0, cx_1.cx)("
|
|
9
|
+
const Dot = (props) => {
|
|
10
|
+
const className = (0, cx_1.cx)("uxf-image-gallery__dot", props.active ? "uxf-image-gallery__dot--active" : "");
|
|
10
11
|
return react_1.default.createElement("div", { className: className });
|
|
11
|
-
}
|
|
12
|
-
exports.
|
|
12
|
+
};
|
|
13
|
+
exports.Dot = Dot;
|
|
14
|
+
exports.Dot.displayName = "UxfUiDot";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
import { ImageGalleryImageProps } from "../types";
|
|
3
3
|
interface GalleryProps {
|
|
4
|
+
closeButtonTitle?: string;
|
|
4
5
|
onClose: () => void;
|
|
5
6
|
onNext: () => void;
|
|
6
7
|
onPrevious: () => void;
|
|
7
8
|
imageIndex: number;
|
|
8
9
|
images: ImageGalleryImageProps[];
|
|
9
10
|
}
|
|
10
|
-
declare
|
|
11
|
-
export
|
|
11
|
+
export declare const Gallery: FC<GalleryProps>;
|
|
12
|
+
export {};
|
|
@@ -22,18 +22,15 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Gallery = void 0;
|
|
29
27
|
const image_1 = require("@uxf/core/utils/image");
|
|
30
28
|
const resizer_1 = require("@uxf/core/utils/resizer");
|
|
31
29
|
const react_1 = __importStar(require("react"));
|
|
32
|
-
const close_button_1 =
|
|
33
|
-
const dot_1 =
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
function Gallery(props) {
|
|
30
|
+
const close_button_1 = require("./close-button");
|
|
31
|
+
const dot_1 = require("./dot");
|
|
32
|
+
const arrow_button_1 = require("./arrow-button");
|
|
33
|
+
const Gallery = (props) => {
|
|
37
34
|
var _a;
|
|
38
35
|
(0, react_1.useEffect)(() => {
|
|
39
36
|
const onKeyDown = (event) => {
|
|
@@ -58,15 +55,18 @@ function Gallery(props) {
|
|
|
58
55
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
56
|
}, []);
|
|
60
57
|
const imageSrc = props.images[props.imageIndex].src;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
react_1.default.createElement("
|
|
68
|
-
|
|
69
|
-
react_1.default.createElement(
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
58
|
+
const customContent = props.images[props.imageIndex].customContent;
|
|
59
|
+
return (react_1.default.createElement("div", { className: "uxf-image-gallery" },
|
|
60
|
+
react_1.default.createElement("div", { className: "uxf-image-gallery__close-button-wrapper" },
|
|
61
|
+
react_1.default.createElement(close_button_1.CloseButton, { onClick: props.onClose, text: props.closeButtonTitle })),
|
|
62
|
+
react_1.default.createElement("div", { className: "uxf-image-gallery__content" },
|
|
63
|
+
react_1.default.createElement("div", { className: "uxf-image-gallery__inner" },
|
|
64
|
+
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 : "" }),
|
|
65
|
+
props.images.length > 1 && (react_1.default.createElement("div", { className: "uxf-image-gallery__buttons" },
|
|
66
|
+
react_1.default.createElement(arrow_button_1.ArrowButton, { onClick: props.onPrevious, type: "prev" }),
|
|
67
|
+
react_1.default.createElement(arrow_button_1.ArrowButton, { onClick: props.onNext, type: "next" }))),
|
|
68
|
+
react_1.default.createElement("div", { className: "uxf-image-gallery__custom-content" }, customContent))),
|
|
69
|
+
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, { key: (0, image_1.getImgUniqueIdentifier)(image.src) || index, active: index === props.imageIndex })))))));
|
|
70
|
+
};
|
|
71
|
+
exports.Gallery = Gallery;
|
|
72
|
+
exports.Gallery.displayName = "UxfUiGallery";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ImageGalleryImageProps } from "./types";
|
|
3
|
-
|
|
3
|
+
type ContextType = {
|
|
4
4
|
registerImage: (props: ImageGalleryImageProps) => void;
|
|
5
5
|
unregisterImage: (props: ImageGalleryImageProps) => void;
|
|
6
6
|
openGallery: (props: ImageGalleryImageProps) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
interface
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
export interface ImageGalleryProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
closeButtonTitle?: string;
|
|
4
5
|
}
|
|
5
|
-
declare
|
|
6
|
-
export default ImageGallery;
|
|
6
|
+
export declare const ImageGallery: FC<ImageGalleryProps>;
|
|
@@ -22,14 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ImageGallery = void 0;
|
|
29
27
|
const react_1 = __importStar(require("react"));
|
|
30
28
|
const context_1 = require("./context");
|
|
31
|
-
const gallery_1 =
|
|
32
|
-
|
|
29
|
+
const gallery_1 = require("./components/gallery");
|
|
30
|
+
const ImageGallery = (props) => {
|
|
33
31
|
const [images, setImages] = (0, react_1.useState)([]);
|
|
34
32
|
const [imageIndex, setImageIndex] = (0, react_1.useState)(null);
|
|
35
33
|
const registerImage = (0, react_1.useCallback)((image) => setImages((v) => [...v, image]), []);
|
|
@@ -50,6 +48,7 @@ function ImageGallery(props) {
|
|
|
50
48
|
const contextValue = { registerImage, unregisterImage, openGallery };
|
|
51
49
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
52
50
|
react_1.default.createElement(context_1.ImageGalleryProvider, { value: contextValue }, props.children),
|
|
53
|
-
typeof moduloImageIndex === "number" && (react_1.default.createElement(gallery_1.
|
|
54
|
-
}
|
|
55
|
-
exports.
|
|
51
|
+
typeof moduloImageIndex === "number" && (react_1.default.createElement(gallery_1.Gallery, { closeButtonTitle: props.closeButtonTitle, onClose: () => setImageIndex(null), onNext: onNext, onPrevious: onPrevious, imageIndex: moduloImageIndex, images: images }))));
|
|
52
|
+
};
|
|
53
|
+
exports.ImageGallery = ImageGallery;
|
|
54
|
+
exports.ImageGallery.displayName = "UxfUiImageGallery";
|
|
@@ -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 image_gallery_stories_1 = require("./image-gallery.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(image_gallery_stories_1.Default, null));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import ImageGallery from "./image-gallery";
|
|
1
|
+
import React from "react";
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component:
|
|
4
|
+
component: React.FC<import("./image-gallery").ImageGalleryProps> & {
|
|
5
|
+
Image: React.FC<import("./types").ImageGalleryImageProps>;
|
|
6
|
+
};
|
|
6
7
|
parameters: {
|
|
7
8
|
actions: {
|
|
8
9
|
argTypesRegex: string;
|
|
@@ -10,4 +11,4 @@ declare const _default: {
|
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
export default _default;
|
|
13
|
-
export declare function Default(): JSX.Element;
|
|
14
|
+
export declare function Default(): React.JSX.Element;
|
|
@@ -6,22 +6,33 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Default = void 0;
|
|
7
7
|
const image_1 = require("@uxf/core/utils/image");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const
|
|
10
|
-
const image_gallery_1 = __importDefault(require("./image-gallery"));
|
|
9
|
+
const index_1 = require("./index");
|
|
11
10
|
exports.default = {
|
|
12
11
|
title: "Lab/ImageGallery",
|
|
13
|
-
component:
|
|
12
|
+
component: index_1.ImageGallery,
|
|
14
13
|
parameters: { actions: { argTypesRegex: "^on.*" } },
|
|
15
14
|
};
|
|
16
15
|
const images = [
|
|
17
|
-
"https://opentopo.app/hero_image.jpeg",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
{ src: "https://opentopo.app/hero_image.jpeg", title: "Obr. 1" },
|
|
17
|
+
{
|
|
18
|
+
src: "https://opentopo.app/generated/area-18/d/9/d9033d93-ea48-4f66-b0c1-6045c091b326_1024_1024_c.jpg",
|
|
19
|
+
title: "Obr. 2",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
src: "https://opentopo.app/generated/area-16/f/4/f4a4ca79-ea9e-44d1-a4ec-3c8ccfbcc218_1024_1024_c.jpg",
|
|
23
|
+
title: "Obr. 3",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
src: "https://opentopo.app/generated/area-1/8/b/8b84e378-1f55-4ce7-b750-b504091cb833_1024_1024_c.jpg",
|
|
27
|
+
title: "Obr. 4",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
src: "https://opentopo.app/generated/area-2/e/7/e7ec532b-20c2-407e-9305-fa7cfb71f01f_1024_1024_c.jpg",
|
|
31
|
+
title: "Obr. 5",
|
|
32
|
+
},
|
|
22
33
|
];
|
|
23
34
|
function Default() {
|
|
24
|
-
return (react_1.default.createElement(
|
|
25
|
-
react_1.default.createElement("div", { className: "flex-direction flex gap-2" }, images.map((
|
|
35
|
+
return (react_1.default.createElement(index_1.ImageGallery, null,
|
|
36
|
+
react_1.default.createElement("div", { className: "flex-direction flex gap-2" }, images.map((image, index) => (react_1.default.createElement(index_1.ImageGallery.Image, { key: (0, image_1.getImgUniqueIdentifier)(image.src) || index, src: image.src, className: "h-56 w-56 cursor-pointer object-cover transition-transform hover:scale-105", customContent: image.title }))))));
|
|
26
37
|
}
|
|
27
38
|
exports.Default = Default;
|
package/image-gallery/image.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
import { ImageGalleryImageProps } from "@uxf/ui/image-gallery/types";
|
|
3
|
-
declare
|
|
4
|
-
export default Image;
|
|
3
|
+
export declare const Image: FC<ImageGalleryImageProps>;
|
package/image-gallery/image.js
CHANGED
|
@@ -3,12 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Image = void 0;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const use_image_1 = require("./use-image");
|
|
8
9
|
const resizer_1 = require("@uxf/core/utils/resizer");
|
|
9
|
-
|
|
10
|
+
const Image = (props) => {
|
|
10
11
|
var _a;
|
|
11
12
|
const openGallery = (0, use_image_1.useImage)(props);
|
|
12
|
-
return (
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
return (
|
|
14
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions
|
|
15
|
+
react_1.default.createElement("img", { alt: props.alt, className: props.className, onClick: openGallery, src: typeof props.src === "string" ? props.src : (_a = (0, resizer_1.resizerImageUrl)(props.src)) !== null && _a !== void 0 ? _a : "", title: props.title }));
|
|
16
|
+
};
|
|
17
|
+
exports.Image = Image;
|
|
18
|
+
exports.Image.displayName = "UxfUiImageGalleryImage";
|
package/image-gallery/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export { useImage } from "./use-image";
|
|
3
|
+
export declare const ImageGallery: import("react").FC<import("./image-gallery").ImageGalleryProps> & {
|
|
4
|
+
Image: import("react").FC<import("./types").ImageGalleryImageProps>;
|
|
5
|
+
};
|
|
6
|
+
export type { ImageGalleryImageProps } from "./types";
|
package/image-gallery/index.js
CHANGED
|
@@ -1,26 +1,8 @@
|
|
|
1
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.ImageGallery = exports.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
|
|
26
|
-
__exportStar(require("./types"), exports);
|
|
3
|
+
exports.ImageGallery = exports.useImage = void 0;
|
|
4
|
+
const image_1 = require("./image");
|
|
5
|
+
const image_gallery_1 = require("./image-gallery");
|
|
6
|
+
var use_image_1 = require("./use-image");
|
|
7
|
+
Object.defineProperty(exports, "useImage", { enumerable: true, get: function () { return use_image_1.useImage; } });
|
|
8
|
+
exports.ImageGallery = Object.assign(image_gallery_1.ImageGallery, { Image: image_1.Image });
|
package/image-gallery/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ImageSource } from "@uxf/core/utils/resizer";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
export interface ImageGalleryImageProps {
|
|
3
|
-
src: ImageSource;
|
|
4
|
-
title?: string;
|
|
5
4
|
alt?: string;
|
|
6
5
|
className?: string;
|
|
6
|
+
customContent?: ReactNode;
|
|
7
|
+
src: ImageSource;
|
|
8
|
+
title?: string;
|
|
7
9
|
}
|
|
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useImage = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const context_1 = require("./context");
|
|
6
|
+
const useOnMount_1 = require("@uxf/core/hooks/useOnMount");
|
|
6
7
|
function useImage(props) {
|
|
7
8
|
const { registerImage, unregisterImage, openGallery } = (0, context_1.useImageGalleryContext)();
|
|
8
|
-
(0,
|
|
9
|
+
(0, useOnMount_1.useOnMount)(() => {
|
|
9
10
|
registerImage(props);
|
|
10
11
|
return () => {
|
|
11
12
|
unregisterImage(props);
|
|
12
13
|
};
|
|
13
|
-
}
|
|
14
|
+
});
|
|
14
15
|
return (0, react_1.useCallback)(() => openGallery(props), [props, openGallery]);
|
|
15
16
|
}
|
|
16
17
|
exports.useImage = useImage;
|