@uxf/ui 1.0.0-beta.99 → 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 +12 -7
- package/flash-messages/index.d.ts +3 -0
- package/flash-messages/index.js +8 -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 -28
- 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/tw-tokens/tw-colors.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.twColors = {
|
|
|
19
19
|
700: "#334155",
|
|
20
20
|
800: "#1e293b",
|
|
21
21
|
900: "#0f172a",
|
|
22
|
+
950: "#020617",
|
|
22
23
|
},
|
|
23
24
|
gray: {
|
|
24
25
|
50: "#f9fafb",
|
|
@@ -31,6 +32,7 @@ exports.twColors = {
|
|
|
31
32
|
700: "#374151",
|
|
32
33
|
800: "#1f2937",
|
|
33
34
|
900: "#111827",
|
|
35
|
+
950: "#030712",
|
|
34
36
|
},
|
|
35
37
|
zinc: {
|
|
36
38
|
50: "#fafafa",
|
|
@@ -43,6 +45,7 @@ exports.twColors = {
|
|
|
43
45
|
700: "#3f3f46",
|
|
44
46
|
800: "#27272a",
|
|
45
47
|
900: "#18181b",
|
|
48
|
+
950: "#09090b",
|
|
46
49
|
},
|
|
47
50
|
neutral: {
|
|
48
51
|
50: "#fafafa",
|
|
@@ -55,6 +58,7 @@ exports.twColors = {
|
|
|
55
58
|
700: "#404040",
|
|
56
59
|
800: "#262626",
|
|
57
60
|
900: "#171717",
|
|
61
|
+
950: "#0a0a0a",
|
|
58
62
|
},
|
|
59
63
|
stone: {
|
|
60
64
|
50: "#fafaf9",
|
|
@@ -67,6 +71,7 @@ exports.twColors = {
|
|
|
67
71
|
700: "#44403c",
|
|
68
72
|
800: "#292524",
|
|
69
73
|
900: "#1c1917",
|
|
74
|
+
950: "#0c0a09",
|
|
70
75
|
},
|
|
71
76
|
red: {
|
|
72
77
|
50: "#fef2f2",
|
|
@@ -79,6 +84,7 @@ exports.twColors = {
|
|
|
79
84
|
700: "#b91c1c",
|
|
80
85
|
800: "#991b1b",
|
|
81
86
|
900: "#7f1d1d",
|
|
87
|
+
950: "#450a0a",
|
|
82
88
|
},
|
|
83
89
|
orange: {
|
|
84
90
|
50: "#fff7ed",
|
|
@@ -91,6 +97,7 @@ exports.twColors = {
|
|
|
91
97
|
700: "#c2410c",
|
|
92
98
|
800: "#9a3412",
|
|
93
99
|
900: "#7c2d12",
|
|
100
|
+
950: "#431407",
|
|
94
101
|
},
|
|
95
102
|
amber: {
|
|
96
103
|
50: "#fffbeb",
|
|
@@ -103,6 +110,7 @@ exports.twColors = {
|
|
|
103
110
|
700: "#b45309",
|
|
104
111
|
800: "#92400e",
|
|
105
112
|
900: "#78350f",
|
|
113
|
+
950: "#451a03",
|
|
106
114
|
},
|
|
107
115
|
yellow: {
|
|
108
116
|
50: "#fefce8",
|
|
@@ -115,6 +123,7 @@ exports.twColors = {
|
|
|
115
123
|
700: "#a16207",
|
|
116
124
|
800: "#854d0e",
|
|
117
125
|
900: "#713f12",
|
|
126
|
+
950: "#422006",
|
|
118
127
|
},
|
|
119
128
|
lime: {
|
|
120
129
|
50: "#f7fee7",
|
|
@@ -127,6 +136,7 @@ exports.twColors = {
|
|
|
127
136
|
700: "#4d7c0f",
|
|
128
137
|
800: "#3f6212",
|
|
129
138
|
900: "#365314",
|
|
139
|
+
950: "#1a2e05",
|
|
130
140
|
},
|
|
131
141
|
green: {
|
|
132
142
|
50: "#f0fdf4",
|
|
@@ -139,6 +149,7 @@ exports.twColors = {
|
|
|
139
149
|
700: "#15803d",
|
|
140
150
|
800: "#166534",
|
|
141
151
|
900: "#14532d",
|
|
152
|
+
950: "#052e16",
|
|
142
153
|
},
|
|
143
154
|
emerald: {
|
|
144
155
|
50: "#ecfdf5",
|
|
@@ -151,6 +162,7 @@ exports.twColors = {
|
|
|
151
162
|
700: "#047857",
|
|
152
163
|
800: "#065f46",
|
|
153
164
|
900: "#064e3b",
|
|
165
|
+
950: "#022c22",
|
|
154
166
|
},
|
|
155
167
|
teal: {
|
|
156
168
|
50: "#f0fdfa",
|
|
@@ -163,6 +175,7 @@ exports.twColors = {
|
|
|
163
175
|
700: "#0f766e",
|
|
164
176
|
800: "#115e59",
|
|
165
177
|
900: "#134e4a",
|
|
178
|
+
950: "#042f2e",
|
|
166
179
|
},
|
|
167
180
|
cyan: {
|
|
168
181
|
50: "#ecfeff",
|
|
@@ -175,6 +188,7 @@ exports.twColors = {
|
|
|
175
188
|
700: "#0e7490",
|
|
176
189
|
800: "#155e75",
|
|
177
190
|
900: "#164e63",
|
|
191
|
+
950: "#083344",
|
|
178
192
|
},
|
|
179
193
|
sky: {
|
|
180
194
|
50: "#f0f9ff",
|
|
@@ -187,6 +201,7 @@ exports.twColors = {
|
|
|
187
201
|
700: "#0369a1",
|
|
188
202
|
800: "#075985",
|
|
189
203
|
900: "#0c4a6e",
|
|
204
|
+
950: "#082f49",
|
|
190
205
|
},
|
|
191
206
|
blue: {
|
|
192
207
|
50: "#eff6ff",
|
|
@@ -199,6 +214,7 @@ exports.twColors = {
|
|
|
199
214
|
700: "#1d4ed8",
|
|
200
215
|
800: "#1e40af",
|
|
201
216
|
900: "#1e3a8a",
|
|
217
|
+
950: "#172554",
|
|
202
218
|
},
|
|
203
219
|
indigo: {
|
|
204
220
|
50: "#eef2ff",
|
|
@@ -211,6 +227,7 @@ exports.twColors = {
|
|
|
211
227
|
700: "#4338ca",
|
|
212
228
|
800: "#3730a3",
|
|
213
229
|
900: "#312e81",
|
|
230
|
+
950: "#1e1b4b",
|
|
214
231
|
},
|
|
215
232
|
violet: {
|
|
216
233
|
50: "#f5f3ff",
|
|
@@ -223,6 +240,7 @@ exports.twColors = {
|
|
|
223
240
|
700: "#6d28d9",
|
|
224
241
|
800: "#5b21b6",
|
|
225
242
|
900: "#4c1d95",
|
|
243
|
+
950: "#2e1065",
|
|
226
244
|
},
|
|
227
245
|
purple: {
|
|
228
246
|
50: "#faf5ff",
|
|
@@ -235,6 +253,7 @@ exports.twColors = {
|
|
|
235
253
|
700: "#7e22ce",
|
|
236
254
|
800: "#6b21a8",
|
|
237
255
|
900: "#581c87",
|
|
256
|
+
950: "#3b0764",
|
|
238
257
|
},
|
|
239
258
|
fuchsia: {
|
|
240
259
|
50: "#fdf4ff",
|
|
@@ -247,6 +266,7 @@ exports.twColors = {
|
|
|
247
266
|
700: "#a21caf",
|
|
248
267
|
800: "#86198f",
|
|
249
268
|
900: "#701a75",
|
|
269
|
+
950: "#4a044e",
|
|
250
270
|
},
|
|
251
271
|
pink: {
|
|
252
272
|
50: "#fdf2f8",
|
|
@@ -259,6 +279,7 @@ exports.twColors = {
|
|
|
259
279
|
700: "#be185d",
|
|
260
280
|
800: "#9d174d",
|
|
261
281
|
900: "#831843",
|
|
282
|
+
950: "#500724",
|
|
262
283
|
},
|
|
263
284
|
rose: {
|
|
264
285
|
50: "#fff1f2",
|
|
@@ -271,6 +292,7 @@ exports.twColors = {
|
|
|
271
292
|
700: "#be123c",
|
|
272
293
|
800: "#9f1239",
|
|
273
294
|
900: "#881337",
|
|
295
|
+
950: "#4c0519",
|
|
274
296
|
},
|
|
275
297
|
lightHigh: "#111827",
|
|
276
298
|
lightMedium: "#4b5563",
|
|
@@ -291,6 +313,7 @@ exports.twColors = {
|
|
|
291
313
|
700: "#1d4ed8",
|
|
292
314
|
800: "#1e40af",
|
|
293
315
|
900: "#1e3a8a",
|
|
316
|
+
DEFAULT: "#3b82f6",
|
|
294
317
|
},
|
|
295
318
|
success: {
|
|
296
319
|
50: "#f0fdf4",
|
|
@@ -303,6 +326,7 @@ exports.twColors = {
|
|
|
303
326
|
700: "#15803d",
|
|
304
327
|
800: "#166534",
|
|
305
328
|
900: "#14532d",
|
|
329
|
+
DEFAULT: "#22c55e",
|
|
306
330
|
},
|
|
307
331
|
warning: {
|
|
308
332
|
50: "#fff7ed",
|
|
@@ -315,6 +339,7 @@ exports.twColors = {
|
|
|
315
339
|
700: "#c2410c",
|
|
316
340
|
800: "#9a3412",
|
|
317
341
|
900: "#7c2d12",
|
|
342
|
+
DEFAULT: "#f97316",
|
|
318
343
|
},
|
|
319
344
|
error: {
|
|
320
345
|
50: "#fef2f2",
|
|
@@ -327,5 +352,6 @@ exports.twColors = {
|
|
|
327
352
|
700: "#b91c1c",
|
|
328
353
|
800: "#991b1b",
|
|
329
354
|
900: "#7f1d1d",
|
|
355
|
+
DEFAULT: "#ef4444",
|
|
330
356
|
},
|
|
331
357
|
};
|
package/types/color.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type ColorScheme = "dark" | "light";
|
|
2
|
+
export type HexColor = `#${string}`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FileResponse {
|
|
2
|
+
extension: string;
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
namespace?: string | null;
|
|
6
|
+
uuid: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UploadOptions {
|
|
9
|
+
abortController?: AbortController;
|
|
10
|
+
onUploadProgress?: (progressEvent: UploadProgressEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
export type UploadProgressEvent = Pick<ProgressEvent, "lengthComputable" | "loaded" | "total">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEventHandler } from "react";
|
|
2
2
|
export interface FormControlProps<ValueType, ElementType = HTMLInputElement, RestParams extends unknown[] = []> {
|
|
3
|
-
value
|
|
4
|
-
onChange
|
|
3
|
+
value: ValueType;
|
|
4
|
+
onChange: (value: ValueType, event?: ChangeEvent<ElementType>, ...args: RestParams) => void;
|
|
5
5
|
onBlur?: FocusEventHandler<ElementType>;
|
|
6
6
|
onFocus?: FocusEventHandler<ElementType>;
|
|
7
7
|
name?: string;
|
|
@@ -10,6 +10,11 @@ export interface FormControlProps<ValueType, ElementType = HTMLInputElement, Res
|
|
|
10
10
|
* The input element will be disabled.
|
|
11
11
|
*/
|
|
12
12
|
isDisabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @about
|
|
15
|
+
* Used to show forced focus indicator.
|
|
16
|
+
*/
|
|
17
|
+
isFocused?: boolean;
|
|
13
18
|
/**
|
|
14
19
|
* @about
|
|
15
20
|
* It prevents the user from changing the value of the field (not from interacting with the field).
|
|
@@ -18,7 +23,6 @@ export interface FormControlProps<ValueType, ElementType = HTMLInputElement, Res
|
|
|
18
23
|
isInvalid?: boolean;
|
|
19
24
|
isRequired?: boolean;
|
|
20
25
|
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
26
|
+
export interface Clearable {
|
|
27
|
+
isClearable?: boolean;
|
|
28
|
+
}
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./color"), exports);
|
|
18
18
|
__exportStar(require("./form-control-props"), exports);
|
|
19
|
+
__exportStar(require("./file-response"), exports);
|
|
@@ -5,17 +5,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
react_1.default.createElement("h2", { className: "uxf-typo-h2" }, ".uxf-typo-h2"),
|
|
11
|
-
react_1.default.createElement("h3", { className: "uxf-typo-h3" }, ".uxf-typo-h3"),
|
|
12
|
-
react_1.default.createElement("h4", { className: "uxf-typo-h4" }, ".uxf-typo-h4"),
|
|
13
|
-
react_1.default.createElement("h5", { className: "uxf-typo-h5" }, ".uxf-typo-h5"),
|
|
14
|
-
react_1.default.createElement("h6", { className: "uxf-typo-h6" }, ".uxf.typo-h6"),
|
|
15
|
-
react_1.default.createElement("p", { className: "uxf-typo-body" }, ".uxf-typo-body"),
|
|
16
|
-
react_1.default.createElement("p", { className: "uxf-typo-body2" }, ".uxf-typo-body2"),
|
|
17
|
-
react_1.default.createElement("p", { className: "uxf-typo-button" }, ".uxf-typo-button"),
|
|
18
|
-
react_1.default.createElement("p", { className: "uxf-typo-caption" }, ".uxf-typo-caption"),
|
|
19
|
-
react_1.default.createElement("p", { className: "uxf-typo-medium" }, ".uxf-typo-medium"),
|
|
20
|
-
react_1.default.createElement("p", { className: "uxf-typo-medium2" }, ".uxf-typo-medium2"),
|
|
21
|
-
react_1.default.createElement("p", { className: "uxf-typo-overline" }, ".uxf-typo-overline")));
|
|
8
|
+
const typography_stories_1 = require("./typography.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(typography_stories_1.Default, null));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
interface ComponentStructureAnalyzerProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
declare function ComponentStructureAnalyzer(props: ComponentStructureAnalyzerProps): JSX.Element;
|
|
5
|
+
declare function ComponentStructureAnalyzer(props: ComponentStructureAnalyzerProps): React.JSX.Element;
|
|
6
6
|
export default ComponentStructureAnalyzer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFileUrl = void 0;
|
|
4
|
+
function getFileUrl(domain, file) {
|
|
5
|
+
return `${domain}/upload/${file.namespace || "default"}/${file.uuid[0]}/${file.uuid[1]}/${file.uuid}.${file.extension}`;
|
|
6
|
+
}
|
|
7
|
+
exports.getFileUrl = getFileUrl;
|
package/utils/icons-config.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/** @type {import('@uxf/icons-generator/types').Config['icons']} */
|
|
2
2
|
module.exports = {
|
|
3
|
+
"arrow-left": {
|
|
4
|
+
width: 448,
|
|
5
|
+
height: 512,
|
|
6
|
+
data: `<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/>`,
|
|
7
|
+
},
|
|
8
|
+
"arrow-right": {
|
|
9
|
+
width: 448,
|
|
10
|
+
height: 512,
|
|
11
|
+
data: `<path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>`,
|
|
12
|
+
},
|
|
3
13
|
calendar: {
|
|
4
14
|
width: 448,
|
|
5
15
|
height: 512,
|
|
@@ -60,6 +70,36 @@ module.exports = {
|
|
|
60
70
|
height: 512,
|
|
61
71
|
data: `<path d="M256 82.7l22.6 22.6 192 192L493.3 320 448 365.3l-22.6-22.6L256 173.3 86.6 342.6 64 365.3 18.7 320l22.6-22.6 192-192L256 82.7z" fill="currentColor"/>`,
|
|
62
72
|
},
|
|
73
|
+
cloud: {
|
|
74
|
+
width: 640,
|
|
75
|
+
height: 512,
|
|
76
|
+
data: `<path d="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9-.1-2.7-.2-5.4-.2-8.1 0-88.4 71.6-160 160-160 59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96 0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-217c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39V392c0 13.3 10.7 24 24 24s24-10.7 24-24V257.9l39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z" fill="currentColor"/>`,
|
|
77
|
+
},
|
|
78
|
+
copy: {
|
|
79
|
+
width: 512,
|
|
80
|
+
height: 512,
|
|
81
|
+
data: `<path fill="currentColor" d="M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z" />`,
|
|
82
|
+
},
|
|
83
|
+
"ellipsis-vertical": {
|
|
84
|
+
width: 128,
|
|
85
|
+
height: 512,
|
|
86
|
+
data: `<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/>`,
|
|
87
|
+
},
|
|
88
|
+
file: {
|
|
89
|
+
width: 384,
|
|
90
|
+
height: 512,
|
|
91
|
+
data: `<path d="M0 64C0 28.65 28.65 0 64 0h165.5c17 0 33.2 6.743 45.2 18.75l90.6 90.55c12 12 18.7 28.2 18.7 45.2V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm336 384V160h-80c-17.7 0-32-14.3-32-32V48H64c-8.84 0-16 7.16-16 16v384c0 8.8 7.16 16 16 16h256c8.8 0 16-7.2 16-16z" fill="currentColor" />`,
|
|
92
|
+
},
|
|
93
|
+
imageFile: {
|
|
94
|
+
width: 384,
|
|
95
|
+
height: 512,
|
|
96
|
+
data: `<path d="m365.3 93.38-74.63-74.64C278.6 6.742 262.3 0 245.4 0H64C28.65 0 0 28.65 0 64l.0065 384c0 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64V138.6c0-16.9-6.7-33.2-18.7-45.22zM336 448c0 8.836-7.164 16-16 16H64.02c-8.838 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160V128c0 17.67 14.33 32 32 32h79.1v288zM215.3 292c-4.68 0-9.051 2.34-11.65 6.234L164 357.8l-11.68-17.53c-2.62-3.97-7.02-6.27-11.62-6.27-4.682 0-9.053 2.34-11.65 6.234l-46.67 70c-2.865 4.297-3.131 9.82-.6953 14.37C84.09 429.2 88.84 432 93.1 432h196c5.163 0 9.907-2.844 12.34-7.395 2.436-4.551 2.17-10.07-.6953-14.37l-74.67-112C224.4 294.3 220 292 215.3 292zm-87.3-4c17.67 0 32-14.33 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z" fill="currentColor" />`,
|
|
97
|
+
},
|
|
98
|
+
videoFile: {
|
|
99
|
+
width: 384,
|
|
100
|
+
height: 512,
|
|
101
|
+
data: `<path d="m365.3 93.38-74.63-74.64C278.6 6.742 262.3 0 245.4 0H64C28.65 0 0 28.65 0 64l.0065 384c0 35.34 28.65 64 64 64H320c35.2 0 64-28.8 64-64V138.6c0-16.9-6.7-33.2-18.7-45.22zM336 448c0 8.836-7.164 16-16 16H64.02c-8.838 0-16-7.164-16-16L48 64.13c0-8.836 7.164-16 16-16h160V128c0 17.67 14.33 32 32 32h79.1v288zm-96-160c0-17.67-14.33-32-32-32h-96c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h96c17.67 0 32-14.33 32-32v-16.52l43.84 30.2c8.46 5.82 20.16-.08 20.16-10.28V284.6c0-10.16-11.64-16.16-20.16-10.32L240 304.5V288z" fill="currentColor" />`,
|
|
102
|
+
},
|
|
63
103
|
user: {
|
|
64
104
|
width: 448,
|
|
65
105
|
height: 512,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.uploadFile = void 0;
|
|
4
|
+
function getRandomUuid() {
|
|
5
|
+
return "00000000-0000-0000-0000-000000000000"
|
|
6
|
+
.split("-")
|
|
7
|
+
.map((el) => Array(el.length)
|
|
8
|
+
.fill(0)
|
|
9
|
+
.map(() => Math.round(Math.random() * 9).toString())
|
|
10
|
+
.join(""))
|
|
11
|
+
.join("-");
|
|
12
|
+
}
|
|
13
|
+
function uploadFile(file, uploadOptions) {
|
|
14
|
+
// axios.put("/api/upload", file, { signal: uploadOptions?.abortController?.signal, onUploadProgress: uploadOptions?.onUploadProgress });
|
|
15
|
+
return new Promise((resolve) => {
|
|
16
|
+
const time = file.size / 10;
|
|
17
|
+
const interval = time / 10;
|
|
18
|
+
let loaded = 0;
|
|
19
|
+
const intervalTimer = window.setInterval(() => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
if ((_a = uploadOptions === null || uploadOptions === void 0 ? void 0 : uploadOptions.abortController) === null || _a === void 0 ? void 0 : _a.signal.aborted) {
|
|
22
|
+
clearInterval(intervalTimer);
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
24
|
+
clearTimeout(timeoutTimer);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
loaded += (file.size / time) * interval;
|
|
28
|
+
(_b = uploadOptions === null || uploadOptions === void 0 ? void 0 : uploadOptions.onUploadProgress) === null || _b === void 0 ? void 0 : _b.call(uploadOptions, {
|
|
29
|
+
lengthComputable: true,
|
|
30
|
+
loaded,
|
|
31
|
+
total: file.size,
|
|
32
|
+
});
|
|
33
|
+
}, interval);
|
|
34
|
+
const timeoutTimer = window.setTimeout(() => {
|
|
35
|
+
clearInterval(intervalTimer);
|
|
36
|
+
clearTimeout(timeoutTimer);
|
|
37
|
+
resolve({
|
|
38
|
+
id: Math.round(Math.random() * 100000000),
|
|
39
|
+
uuid: getRandomUuid(),
|
|
40
|
+
name: file.name,
|
|
41
|
+
extension: file.name.split(".").slice(-1).join(""),
|
|
42
|
+
});
|
|
43
|
+
}, time);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
exports.uploadFile = uploadFile;
|
package/utils/snap-test.js
CHANGED
|
@@ -8,7 +8,12 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const react_test_renderer_1 = require("react-test-renderer");
|
|
9
9
|
const get_provider_config_1 = require("../_private-utils/get-provider-config");
|
|
10
10
|
const context_1 = require("../context");
|
|
11
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
11
12
|
const snapTest = (name, component) => {
|
|
13
|
+
beforeAll(() => {
|
|
14
|
+
jest.useFakeTimers();
|
|
15
|
+
jest.setSystemTime((0, dayjs_1.default)().year(2008).month(1).date(22).hour(22).minute(4).second(35).millisecond(0).toDate());
|
|
16
|
+
});
|
|
12
17
|
it(name, () => {
|
|
13
18
|
const tree = (0, react_test_renderer_1.create)(react_1.default.createElement(context_1.UiContextProvider, { value: (0, get_provider_config_1.getProviderConfig)() }, component)).toJSON();
|
|
14
19
|
expect(tree).toMatchSnapshot();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { ButtonColor, ButtonSize, ButtonVariant } from "@uxf/ui/button";
|
|
3
3
|
import { ChipColor } from "../chip/chip";
|
|
4
4
|
import { InputGroupSizes } from "../input/theme";
|
|
@@ -22,5 +22,5 @@ interface StorybookContextProviderProps {
|
|
|
22
22
|
config: StorybookConfig;
|
|
23
23
|
children: ReactNode;
|
|
24
24
|
}
|
|
25
|
-
export declare function StorybookContextProvider(props: StorybookContextProviderProps): JSX.Element;
|
|
25
|
+
export declare function StorybookContextProvider(props: StorybookContextProviderProps): React.JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -32,7 +32,7 @@ exports.defaultConfig = {
|
|
|
32
32
|
variants: ["default", "outlined", "white", "text"],
|
|
33
33
|
},
|
|
34
34
|
Chip: {
|
|
35
|
-
colors: ["
|
|
35
|
+
colors: ["orange", "red", "yellow", "pink", "purple", "indigo", "green", "blue", "default"],
|
|
36
36
|
},
|
|
37
37
|
Input: {
|
|
38
38
|
sizes: ["small", "default", "large"],
|