@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/combobox/combobox.d.ts
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare type ComboboxOption<T = ComboboxValue> = {
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
id: T;
|
|
1
|
+
import React, { ReactNode, Ref } from "react";
|
|
2
|
+
import { SelectBaseProps, SelectBaseValueId } from "../_select-base";
|
|
3
|
+
export type ComboboxValueId = SelectBaseValueId;
|
|
4
|
+
export type ComboboxValue<ValueId = ComboboxValueId> = {
|
|
5
|
+
id: ValueId;
|
|
9
6
|
label: string;
|
|
10
7
|
};
|
|
11
|
-
export interface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
options: Option[];
|
|
21
|
-
placeholder?: string;
|
|
8
|
+
export interface ComboboxOption<ValueId = ComboboxValueId> extends ComboboxValue<ValueId> {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
type ComboboxTypeRef = HTMLDivElement;
|
|
12
|
+
export interface ComboboxProps<ValueId = SelectBaseValueId, Option = ComboboxOption<ValueId>, Value = Option> extends Omit<SelectBaseProps<Value, Option>, "children" | "customInputElementDisplayName" | "emptyMessage"> {
|
|
13
|
+
forwardRef?: Ref<ComboboxTypeRef> | undefined;
|
|
14
|
+
loadOptions?: (query: string) => Promise<Option[]>;
|
|
15
|
+
noQueryMessage?: string;
|
|
16
|
+
notFoundMessage?: string;
|
|
22
17
|
renderOption?: (option: Option) => ReactNode;
|
|
23
18
|
}
|
|
24
|
-
export declare const Combobox:
|
|
19
|
+
export declare const Combobox: {
|
|
20
|
+
<ValueId = SelectBaseValueId, Option = ComboboxOption<ValueId>, Value = Option>(props: ComboboxProps<ValueId, Option, Value>): React.JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
package/combobox/combobox.js
CHANGED
|
@@ -25,37 +25,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.Combobox = void 0;
|
|
27
27
|
const react_1 = require("@headlessui/react");
|
|
28
|
-
const classes_1 = require("@uxf/core/constants/classes");
|
|
29
|
-
const useInputFocus_1 = require("@uxf/core/hooks/useInputFocus");
|
|
30
|
-
const composeRefs_1 = require("@uxf/core/utils/composeRefs");
|
|
31
|
-
const cx_1 = require("@uxf/core/utils/cx");
|
|
32
|
-
const forwardRef_1 = require("@uxf/core/utils/forwardRef");
|
|
33
28
|
const slugify_1 = require("@uxf/core/utils/slugify");
|
|
29
|
+
const use_async_loading_1 = require("@uxf/ui/hooks/use-async-loading");
|
|
34
30
|
const react_2 = __importStar(require("react"));
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
const generatedId = (0, react_2.useId)();
|
|
41
|
-
const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
31
|
+
const _select_base_1 = require("../_select-base");
|
|
32
|
+
const Combobox = (props) => {
|
|
33
|
+
var _a, _b, _c, _d;
|
|
34
|
+
const isAsync = !!props.loadOptions;
|
|
42
35
|
const [query, setQuery] = (0, react_2.useState)("");
|
|
43
|
-
const
|
|
44
|
-
const filteredData = query === "" ?
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
react_2.default.createElement(react_1.Combobox.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var _a, _b, _c, _d;
|
|
58
|
-
return (react_2.default.createElement(react_1.Combobox.Option, { key: (_b = (_a = props.keyExtractor) === null || _a === void 0 ? void 0 : _a.call(props, option)) !== null && _b !== void 0 ? _b : option.id, value: option, className: (optionState) => (0, cx_1.cx)("uxf-dropdown__item", optionState.active && classes_1.CLASSES.IS_ACTIVE, optionState.disabled && classes_1.CLASSES.IS_DISABLED, optionState.selected && classes_1.CLASSES.IS_SELECTED) }, (_d = (_c = props.renderOption) === null || _c === void 0 ? void 0 : _c.call(props, option)) !== null && _d !== void 0 ? _d : option.label));
|
|
59
|
-
})),
|
|
60
|
-
props.helperText && (react_2.default.createElement("div", { className: (0, cx_1.cx)("uxf-helper-text", props.isInvalid && classes_1.CLASSES.IS_INVALID), id: errorId }, props.helperText))))));
|
|
61
|
-
});
|
|
36
|
+
const options = (0, use_async_loading_1.useAsyncLoading)(query, (_a = props.options) !== null && _a !== void 0 ? _a : [], props.loadOptions);
|
|
37
|
+
const filteredData = query === "" || isAsync ? options : options.filter((item) => (0, slugify_1.slugify)(item.label).includes((0, slugify_1.slugify)(query)));
|
|
38
|
+
const emptyMessage = query.length === 0
|
|
39
|
+
? (_b = props.noQueryMessage) !== null && _b !== void 0 ? _b : "Pro zobrazení možností začněte psát"
|
|
40
|
+
: (_c = props.notFoundMessage) !== null && _c !== void 0 ? _c : "Nic nenalezeno";
|
|
41
|
+
const onChange = (v) => props.onChange(v);
|
|
42
|
+
const onInputChange = (event) => setQuery(event.target.value);
|
|
43
|
+
const displayValue = (item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : ""; };
|
|
44
|
+
const selectedOption = (_d = props.value) !== null && _d !== void 0 ? _d : null;
|
|
45
|
+
return (react_2.default.createElement(_select_base_1._SelectBase, { HUIComponent: react_1.Combobox, className: props.className, customInputElementDisplayName: react_1.Combobox.Input.displayName, dropdownPlacement: props.dropdownPlacement, dropdownStrategy: props.dropdownStrategy, emptyMessage: emptyMessage, forwardRef: props.forwardRef, helperText: props.helperText, hiddenLabel: props.hiddenLabel, iconName: props.iconName, id: props.id, isClearable: props.isClearable, isDisabled: props.isDisabled, isFocused: props.isFocused, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, keyExtractor: props.keyExtractor, label: props.label, leftAddon: props.leftAddon, leftElement: props.leftElement, name: props.name, onBlur: props.onBlur, onChange: onChange, onFocus: props.onFocus, options: filteredData, placeholder: props.placeholder, renderOption: props.renderOption, rightAddon: props.rightAddon, rightElement: props.rightElement, size: props.size, value: selectedOption, variant: props.variant },
|
|
46
|
+
react_2.default.createElement(react_1.Combobox.Input, { autoComplete: "off", className: "uxf-input__element", displayValue: displayValue, onBlur: props.onBlur, onChange: onInputChange, placeholder: props.placeholder, type: "text" })));
|
|
47
|
+
};
|
|
48
|
+
exports.Combobox = Combobox;
|
|
49
|
+
exports.Combobox.displayName = "UxfUiCombobox";
|
|
@@ -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 combobox_stories_1 = require("./combobox.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render default stories", react_1.default.createElement(combobox_stories_1.Default, null));
|
|
10
|
+
(0, snap_test_1.snapTest)("render async stories", react_1.default.createElement(combobox_stories_1.Async, null));
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ComboboxValue } from "./combobox";
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component:
|
|
4
|
+
component: {
|
|
5
|
+
<ValueId = import("../_select-base").SelectBaseValueId, Option = import("./combobox").ComboboxOption<ValueId>, Value = Option>(props: import("./combobox").ComboboxProps<ValueId, Option, Value>): React.JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
6
8
|
};
|
|
7
9
|
export default _default;
|
|
8
|
-
export declare function Default(): JSX.Element;
|
|
9
|
-
export declare function
|
|
10
|
+
export declare function Default(): React.JSX.Element;
|
|
11
|
+
export declare function Async(): React.JSX.Element;
|
|
12
|
+
export declare function ComponentStructure(): React.JSX.Element;
|
|
@@ -26,10 +26,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ComponentStructure = exports.Default = void 0;
|
|
29
|
+
exports.ComponentStructure = exports.Async = exports.Default = void 0;
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
31
|
const component_structure_analyzer_1 = __importDefault(require("../utils/component-structure-analyzer"));
|
|
32
32
|
const index_1 = require("./index");
|
|
33
|
+
const action_1 = require("../utils/action");
|
|
33
34
|
exports.default = {
|
|
34
35
|
title: "UI/Combobox",
|
|
35
36
|
component: index_1.Combobox,
|
|
@@ -41,28 +42,40 @@ const options = [
|
|
|
41
42
|
{ id: "four", label: "Option with diacritics (ěščřžýáíé)" },
|
|
42
43
|
];
|
|
43
44
|
function Default() {
|
|
44
|
-
const [value, setValue] = (0, react_1.useState)();
|
|
45
|
-
const
|
|
45
|
+
const [value, setValue] = (0, react_1.useState)(null);
|
|
46
|
+
const onChange = (0, action_1.action)("onChange", (v) => {
|
|
46
47
|
// eslint-disable-next-line no-console
|
|
47
48
|
console.log("Select value: ", v);
|
|
48
49
|
setValue(v);
|
|
49
|
-
};
|
|
50
|
+
});
|
|
50
51
|
const storyComboboxes = (react_1.default.createElement("div", { className: "space-y-8" },
|
|
51
|
-
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange:
|
|
52
|
-
react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-1", label: "Combobox with helper text", name: "combobox", onChange:
|
|
53
|
-
react_1.default.createElement(index_1.Combobox, { helperText: "Error message", id: "combobox-1", isInvalid: true, isRequired: true, label: "Combobox invalid", name: "combobox", onChange:
|
|
54
|
-
react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange:
|
|
52
|
+
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
53
|
+
react_1.default.createElement(index_1.Combobox, { helperText: "Start typing to see options...", id: "combobox-1", label: "Combobox with helper text", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
54
|
+
react_1.default.createElement(index_1.Combobox, { helperText: "Error message", id: "combobox-1", isInvalid: true, isRequired: true, label: "Combobox invalid", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
55
|
+
react_1.default.createElement(index_1.Combobox, { dropdownPlacement: "top", id: "combobox-1", label: "Combobox with dropdown top", name: "combobox", onChange: onChange, options: options, placeholder: "Vyberte...", isClearable: true, value: value })));
|
|
55
56
|
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
56
57
|
react_1.default.createElement("div", { className: "light space-y-2 p-20 lg:w-1/2" }, storyComboboxes),
|
|
57
58
|
react_1.default.createElement("div", { className: "dark space-y-2 bg-gray-900 p-20 lg:w-1/2" }, storyComboboxes)));
|
|
58
59
|
}
|
|
59
60
|
exports.Default = Default;
|
|
60
|
-
function
|
|
61
|
+
function Async() {
|
|
61
62
|
const [value, setValue] = (0, react_1.useState)(null);
|
|
62
|
-
const
|
|
63
|
+
const onChange = (0, action_1.action)("onChange", (v) => {
|
|
64
|
+
// eslint-disable-next-line no-console
|
|
65
|
+
console.log("Select value: ", v);
|
|
63
66
|
setValue(v);
|
|
64
|
-
};
|
|
67
|
+
});
|
|
68
|
+
const loadOptions = (query) => Promise.resolve(options.filter((option) => !query || option.label.toLowerCase().includes(query.toLowerCase())));
|
|
69
|
+
const storyComboboxes = (react_1.default.createElement("div", { className: "space-y-8" },
|
|
70
|
+
react_1.default.createElement(index_1.Combobox, { id: "combobox-1", label: "Combobox", name: "combobox", onChange: onChange, loadOptions: loadOptions, placeholder: "Vyberte...", value: value })));
|
|
71
|
+
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
72
|
+
react_1.default.createElement("div", { className: "light space-y-2 p-20 lg:w-1/2" }, storyComboboxes),
|
|
73
|
+
react_1.default.createElement("div", { className: "dark space-y-2 bg-gray-900 p-20 lg:w-1/2" }, storyComboboxes)));
|
|
74
|
+
}
|
|
75
|
+
exports.Async = Async;
|
|
76
|
+
function ComponentStructure() {
|
|
77
|
+
const [value, onChange] = (0, react_1.useState)(null);
|
|
65
78
|
return (react_1.default.createElement(component_structure_analyzer_1.default, null,
|
|
66
|
-
react_1.default.createElement(index_1.Combobox, { id: "combobox-structure", name: "combobox", label: "Combobox with helper text", options: options, onChange:
|
|
79
|
+
react_1.default.createElement(index_1.Combobox, { id: "combobox-structure", name: "combobox", label: "Combobox with helper text", options: options, onChange: onChange, value: value, helperText: "Start typing to see options..." })));
|
|
67
80
|
}
|
|
68
81
|
exports.ComponentStructure = ComponentStructure;
|
package/combobox/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { ComboboxProps, ComboboxOption, ComboboxValue, ComboboxValueId } from "./combobox";
|
|
2
|
+
export { Combobox } from "./combobox";
|
package/combobox/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.Combobox = void 0;
|
|
4
|
+
var combobox_1 = require("./combobox");
|
|
5
|
+
Object.defineProperty(exports, "Combobox", { enumerable: true, get: function () { return combobox_1.Combobox; } });
|
package/config/icons-config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ICONS_VERSION = "
|
|
1
|
+
export declare const ICONS_VERSION = "1685632683041";
|
|
2
2
|
export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/config/icons-config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
|
|
4
|
-
exports.ICONS_VERSION = "
|
|
4
|
+
exports.ICONS_VERSION = "1685632683041";
|
|
5
5
|
exports.ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/config/icons.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare const ICONS: {
|
|
2
|
+
readonly "arrow-left": {
|
|
3
|
+
readonly w: 448;
|
|
4
|
+
readonly h: 512;
|
|
5
|
+
};
|
|
6
|
+
readonly "arrow-right": {
|
|
7
|
+
readonly w: 448;
|
|
8
|
+
readonly h: 512;
|
|
9
|
+
};
|
|
2
10
|
readonly calendar: {
|
|
3
11
|
readonly w: 448;
|
|
4
12
|
readonly h: 512;
|
|
@@ -47,6 +55,30 @@ export declare const ICONS: {
|
|
|
47
55
|
readonly w: 512;
|
|
48
56
|
readonly h: 512;
|
|
49
57
|
};
|
|
58
|
+
readonly cloud: {
|
|
59
|
+
readonly w: 640;
|
|
60
|
+
readonly h: 512;
|
|
61
|
+
};
|
|
62
|
+
readonly copy: {
|
|
63
|
+
readonly w: 512;
|
|
64
|
+
readonly h: 512;
|
|
65
|
+
};
|
|
66
|
+
readonly "ellipsis-vertical": {
|
|
67
|
+
readonly w: 128;
|
|
68
|
+
readonly h: 512;
|
|
69
|
+
};
|
|
70
|
+
readonly file: {
|
|
71
|
+
readonly w: 384;
|
|
72
|
+
readonly h: 512;
|
|
73
|
+
};
|
|
74
|
+
readonly imageFile: {
|
|
75
|
+
readonly w: 384;
|
|
76
|
+
readonly h: 512;
|
|
77
|
+
};
|
|
78
|
+
readonly videoFile: {
|
|
79
|
+
readonly w: 384;
|
|
80
|
+
readonly h: 512;
|
|
81
|
+
};
|
|
50
82
|
readonly user: {
|
|
51
83
|
readonly w: 448;
|
|
52
84
|
readonly h: 512;
|
|
@@ -56,9 +88,11 @@ export declare const ICONS: {
|
|
|
56
88
|
readonly h: 512;
|
|
57
89
|
};
|
|
58
90
|
};
|
|
59
|
-
export
|
|
91
|
+
export type IconsType = keyof typeof ICONS;
|
|
60
92
|
declare module "@uxf/ui/icon/theme" {
|
|
61
93
|
interface IconsSet {
|
|
94
|
+
"arrow-left": true;
|
|
95
|
+
"arrow-right": true;
|
|
62
96
|
"calendar": true;
|
|
63
97
|
"camera": true;
|
|
64
98
|
"caretDown": true;
|
|
@@ -71,6 +105,12 @@ declare module "@uxf/ui/icon/theme" {
|
|
|
71
105
|
"chevronRight": true;
|
|
72
106
|
"chevronsRight": true;
|
|
73
107
|
"chevronUp": true;
|
|
108
|
+
"cloud": true;
|
|
109
|
+
"copy": true;
|
|
110
|
+
"ellipsis-vertical": true;
|
|
111
|
+
"file": true;
|
|
112
|
+
"imageFile": true;
|
|
113
|
+
"videoFile": true;
|
|
74
114
|
"user": true;
|
|
75
115
|
"xmarkLarge": true;
|
|
76
116
|
}
|
package/config/icons.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ICONS = void 0;
|
|
5
5
|
exports.ICONS = {
|
|
6
|
+
"arrow-left": { w: 448, h: 512 },
|
|
7
|
+
"arrow-right": { w: 448, h: 512 },
|
|
6
8
|
"calendar": { w: 448, h: 512 },
|
|
7
9
|
"camera": { w: 512, h: 512 },
|
|
8
10
|
"caretDown": { w: 320, h: 512 },
|
|
@@ -15,6 +17,12 @@ exports.ICONS = {
|
|
|
15
17
|
"chevronRight": { w: 384, h: 512 },
|
|
16
18
|
"chevronsRight": { w: 512, h: 512 },
|
|
17
19
|
"chevronUp": { w: 512, h: 512 },
|
|
20
|
+
"cloud": { w: 640, h: 512 },
|
|
21
|
+
"copy": { w: 512, h: 512 },
|
|
22
|
+
"ellipsis-vertical": { w: 128, h: 512 },
|
|
23
|
+
"file": { w: 384, h: 512 },
|
|
24
|
+
"imageFile": { w: 384, h: 512 },
|
|
25
|
+
"videoFile": { w: 384, h: 512 },
|
|
18
26
|
"user": { w: 448, h: 512 },
|
|
19
27
|
"xmarkLarge": { w: 448, h: 512 },
|
|
20
28
|
};
|
package/content/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ReactNode, FC } from "react";
|
|
2
2
|
import { ContentSchema } from "@uxf/ui/content/content-schema";
|
|
3
3
|
import { UseControllerProps } from "react-hook-form";
|
|
4
|
-
export
|
|
4
|
+
export type ContentType = keyof ContentSchema;
|
|
5
5
|
interface ContentFormProps<TYPE extends ContentType> extends UseControllerProps<ContentSchema[TYPE]> {
|
|
6
6
|
type: TYPE;
|
|
7
7
|
index: number;
|
|
8
8
|
onRemove: () => void;
|
|
9
9
|
TypeInputProps: any;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type ContentFormComponent<TYPE extends ContentType> = FC<ContentFormProps<TYPE>> & {
|
|
12
12
|
getConfig: () => {
|
|
13
13
|
type: TYPE;
|
|
14
14
|
label: ReactNode;
|
|
@@ -19,7 +19,7 @@ interface ContentRendererProps<TYPE extends ContentType> {
|
|
|
19
19
|
data: ContentSchema[TYPE];
|
|
20
20
|
index: number;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ContentRendererComponent<TYPE extends ContentType> = FC<ContentRendererProps<TYPE>> & {
|
|
23
23
|
getConfig: () => {
|
|
24
24
|
type: TYPE;
|
|
25
25
|
};
|
package/context/context.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ColorSchemeOptions } from "../color-scheme/use-handle-color-scheme";
|
|
3
3
|
import { IconName } from "../icon/types";
|
|
4
|
-
export
|
|
4
|
+
export type UiContextType = {
|
|
5
5
|
colorScheme: ColorSchemeOptions;
|
|
6
|
+
domain: string;
|
|
6
7
|
icon: {
|
|
7
8
|
spriteFilePath: string;
|
|
8
9
|
iconsConfig: Record<IconName, {
|
package/context/provider.d.ts
CHANGED
package/context/provider.js
CHANGED
|
@@ -6,12 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.UiContextProvider = void 0;
|
|
7
7
|
const dayjs_1 = require("dayjs");
|
|
8
8
|
const localizedFormat_1 = __importDefault(require("dayjs/plugin/localizedFormat"));
|
|
9
|
+
const customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFormat"));
|
|
9
10
|
const react_1 = __importDefault(require("react"));
|
|
10
11
|
const use_handle_color_scheme_1 = require("../color-scheme/use-handle-color-scheme");
|
|
11
12
|
const context_1 = require("./context");
|
|
12
13
|
(0, dayjs_1.extend)(localizedFormat_1.default);
|
|
14
|
+
(0, dayjs_1.extend)(customParseFormat_1.default);
|
|
13
15
|
const UiContextProvider = (props) => {
|
|
14
16
|
(0, use_handle_color_scheme_1.useHandleColorScheme)(props.value.colorScheme);
|
|
15
17
|
return react_1.default.createElement(context_1.UiContext.Provider, { value: props.value }, props.children);
|
|
16
18
|
};
|
|
17
19
|
exports.UiContextProvider = UiContextProvider;
|
|
20
|
+
exports.UiContextProvider.displayName = "UxfUiContextProvider";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UiContextType } from "./context";
|
|
2
|
-
export
|
|
2
|
+
export type UiContextComponent = keyof UiContextType;
|
|
3
3
|
export declare const useComponentContext: <T extends keyof UiContextType>(componentName: T) => UiContextType[T];
|
|
@@ -23,13 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.DatePickerContent = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
const date_picker_year_1 = require("./date-picker-year");
|
|
29
29
|
const date_picker_decade_1 = require("./date-picker-decade");
|
|
30
30
|
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
31
31
|
const date_picker_month_1 = require("./date-picker-month");
|
|
32
|
-
const
|
|
32
|
+
const DatePickerContent = (props) => {
|
|
33
|
+
// eslint-disable-next-line react/destructuring-assignment
|
|
33
34
|
const { goToDate, activeMonths } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
34
35
|
const [viewMode, setViewMode] = (0, react_1.useState)("month");
|
|
35
36
|
const onYearSelect = (0, react_1.useCallback)(() => setViewMode("decade"), [setViewMode]);
|
|
@@ -50,4 +51,5 @@ const DatePicker = (props) => {
|
|
|
50
51
|
props.children,
|
|
51
52
|
datePickerComponents[viewMode]));
|
|
52
53
|
};
|
|
53
|
-
exports.
|
|
54
|
+
exports.DatePickerContent = DatePickerContent;
|
|
55
|
+
exports.DatePickerContent.displayName = "UxfUiDatePickerContent";
|
|
@@ -31,10 +31,9 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
32
|
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
33
33
|
const use_decade_1 = require("@uxf/datepicker/hooks/use-decade");
|
|
34
|
-
const button_1 = require("../button");
|
|
35
|
-
const icon_1 = require("../icon");
|
|
36
34
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
37
35
|
const classes_1 = require("@uxf/core/constants/classes");
|
|
36
|
+
const date_picker_navigation_1 = require("./date-picker-navigation");
|
|
38
37
|
exports.DatePickerDecade = (0, react_1.memo)((props) => {
|
|
39
38
|
const { onYearSelect } = props;
|
|
40
39
|
const { canGoToYear, goToNextYear, goToPrevYear, activeMonths } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
@@ -60,12 +59,15 @@ exports.DatePickerDecade = (0, react_1.memo)((props) => {
|
|
|
60
59
|
}
|
|
61
60
|
}, [canGoToYear, onYearSelect]);
|
|
62
61
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
63
|
-
react_1.default.createElement(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
react_1.default.createElement(date_picker_navigation_1.DatePickerNavigation, { prevButtonProps: {
|
|
63
|
+
onClick: handleGoToPrevDecadeClick,
|
|
64
|
+
title: "Zpět",
|
|
65
|
+
}, nextButtonProps: {
|
|
66
|
+
onClick: handleGoToNextDecadeClick,
|
|
67
|
+
title: "Nadcházející rok",
|
|
68
|
+
}, selectButtonProps: {
|
|
69
|
+
children: decadeLabel,
|
|
70
|
+
} }),
|
|
71
|
+
react_1.default.createElement("div", { className: "uxf-calendar__decade" }, years.map((year, index) => (react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-calendar__cell uxf-calendar__cell-year", !canGoToYear(year.date) && classes_1.CLASSES.IS_DISABLED), key: year.yearLabel + index, onClick: handleSelectYear(year.date), type: "button" }, year.yearLabel))))));
|
|
70
72
|
});
|
|
71
|
-
exports.DatePickerDecade.displayName = "
|
|
73
|
+
exports.DatePickerDecade.displayName = "UxfUiDatePickerDecade";
|
|
@@ -31,15 +31,14 @@ const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-cont
|
|
|
31
31
|
const use_month_1 = require("@uxf/datepicker/hooks/use-month");
|
|
32
32
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
33
33
|
const react_1 = __importStar(require("react"));
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const date_picker_day_1 = require("./date-picker-day");
|
|
34
|
+
const calendar_1 = require("../calendar");
|
|
35
|
+
const date_picker_navigation_1 = require("./date-picker-navigation");
|
|
37
36
|
exports.DatePickerMonth = (0, react_1.memo)((props) => {
|
|
38
37
|
const { setViewMode } = props;
|
|
39
38
|
const { activeMonths, canGoToNextMonth, canGoToPrevMonth, firstDayOfWeek, goToNextMonthsByOneMonth, goToPrevMonthsByOneMonth, } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
40
39
|
const currentMonth = activeMonths[0].month;
|
|
41
40
|
const currentYear = activeMonths[0].year;
|
|
42
|
-
const {
|
|
41
|
+
const { monthLabel } = (0, use_month_1.useMonth)({
|
|
43
42
|
dayLabelFormat: (date) => (0, dayjs_1.default)(date).format("D"),
|
|
44
43
|
firstDayOfWeek,
|
|
45
44
|
month: currentMonth,
|
|
@@ -47,20 +46,27 @@ exports.DatePickerMonth = (0, react_1.memo)((props) => {
|
|
|
47
46
|
weekdayLabelFormat: (date) => (0, dayjs_1.default)(date).format("dd"),
|
|
48
47
|
year: currentYear,
|
|
49
48
|
});
|
|
50
|
-
const handleGoToPrevMonth = (0, react_1.useCallback)(() =>
|
|
49
|
+
const handleGoToPrevMonth = (0, react_1.useCallback)(() => {
|
|
50
|
+
goToPrevMonthsByOneMonth();
|
|
51
|
+
}, [goToPrevMonthsByOneMonth]);
|
|
51
52
|
const handleGoToNextMonth = (0, react_1.useCallback)(() => goToNextMonthsByOneMonth(), [goToNextMonthsByOneMonth]);
|
|
52
53
|
const handleMonthClick = (0, react_1.useCallback)(() => {
|
|
53
54
|
setViewMode("year");
|
|
54
55
|
}, [setViewMode]);
|
|
55
56
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
56
|
-
react_1.default.createElement(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
react_1.default.createElement(date_picker_navigation_1.DatePickerNavigation, { prevButtonProps: {
|
|
58
|
+
disabled: !canGoToPrevMonth,
|
|
59
|
+
onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
|
|
60
|
+
title: "Zpět",
|
|
61
|
+
}, nextButtonProps: {
|
|
62
|
+
disabled: !canGoToNextMonth,
|
|
63
|
+
onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
|
|
64
|
+
title: "Vpřed",
|
|
65
|
+
}, selectButtonProps: {
|
|
66
|
+
children: monthLabel,
|
|
67
|
+
onClick: handleMonthClick,
|
|
68
|
+
title: "Vybrat měsíc",
|
|
69
|
+
} }),
|
|
70
|
+
react_1.default.createElement(calendar_1.Calendar, null)));
|
|
65
71
|
});
|
|
66
|
-
exports.DatePickerMonth.displayName = "
|
|
72
|
+
exports.DatePickerMonth.displayName = "UxfUiDatePickerMonth";
|
|
@@ -0,0 +1,19 @@
|
|
|
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.DatePickerNavigation = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const button_1 = require("../button");
|
|
9
|
+
const icon_1 = require("../icon");
|
|
10
|
+
const DatePickerNavigation = (props) => {
|
|
11
|
+
return (react_1.default.createElement("div", { className: "uxf-date-picker__navigation" },
|
|
12
|
+
react_1.default.createElement(button_1.Button, { isIconButton: true, size: "sm", variant: "white", ...props.prevButtonProps },
|
|
13
|
+
react_1.default.createElement(icon_1.Icon, { name: "arrow-left", size: 16 })),
|
|
14
|
+
props.selectButtonProps.onClick ? (react_1.default.createElement(button_1.Button, { variant: "text", size: "sm", color: "default", ...props.selectButtonProps })) : (react_1.default.createElement("p", { className: "uxf-date-picker__navigation-title" }, props.selectButtonProps.children)),
|
|
15
|
+
react_1.default.createElement(button_1.Button, { isIconButton: true, size: "sm", variant: "white", ...props.nextButtonProps },
|
|
16
|
+
react_1.default.createElement(icon_1.Icon, { name: "arrow-right", size: 16 }))));
|
|
17
|
+
};
|
|
18
|
+
exports.DatePickerNavigation = DatePickerNavigation;
|
|
19
|
+
exports.DatePickerNavigation.displayName = "UxfUiDatePickerArrowsViewMode";
|
|
@@ -33,11 +33,9 @@ const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-cont
|
|
|
33
33
|
const use_year_1 = require("@uxf/datepicker/hooks/use-year");
|
|
34
34
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
35
35
|
const react_1 = __importStar(require("react"));
|
|
36
|
-
const
|
|
37
|
-
const icon_1 = require("../icon");
|
|
36
|
+
const date_picker_navigation_1 = require("./date-picker-navigation");
|
|
38
37
|
exports.DatePickerYear = (0, react_1.memo)((props) => {
|
|
39
38
|
const { canGoToNextYear, canGoToPrevYear, goToNextYear, goToPrevYear, canGoToMonth, activeMonths } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
40
|
-
const currentMonth = activeMonths[0].month;
|
|
41
39
|
const currentYear = activeMonths[0].year;
|
|
42
40
|
const { months, yearLabel } = (0, use_year_1.useYear)({
|
|
43
41
|
year: currentYear,
|
|
@@ -63,12 +61,19 @@ exports.DatePickerYear = (0, react_1.memo)((props) => {
|
|
|
63
61
|
}
|
|
64
62
|
}, [canGoToMonth, props]);
|
|
65
63
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
66
|
-
react_1.default.createElement(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
react_1.default.createElement(date_picker_navigation_1.DatePickerNavigation, { prevButtonProps: {
|
|
65
|
+
disabled: !canGoToPrevYear,
|
|
66
|
+
onClick: canGoToPrevYear ? handleGoToPrevYear : undefined,
|
|
67
|
+
title: "Předchozí rok",
|
|
68
|
+
}, nextButtonProps: {
|
|
69
|
+
disabled: !canGoToNextYear,
|
|
70
|
+
onClick: canGoToNextYear ? handleGoToNextYear : undefined,
|
|
71
|
+
title: "Nadcházející rok",
|
|
72
|
+
}, selectButtonProps: {
|
|
73
|
+
children: yearLabel,
|
|
74
|
+
onClick: handleYearClick,
|
|
75
|
+
title: "Vybrat rok",
|
|
76
|
+
} }),
|
|
77
|
+
react_1.default.createElement("div", { className: "uxf-calendar__year" }, months.map((month, index) => (react_1.default.createElement("button", { className: (0, cx_1.cx)("uxf-calendar__cell uxf-calendar__cell-month", !canGoToMonth(month.date) && classes_1.CLASSES.IS_DISABLED), key: month.monthLabel + index, onClick: handleMonthClick(month.date), type: "button" }, month.monthLabel))))));
|
|
73
78
|
});
|
|
74
|
-
exports.DatePickerYear.displayName = "
|
|
79
|
+
exports.DatePickerYear.displayName = "UxfUiDatePickerYear";
|