@uxf/ui 11.74.0 → 11.74.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/_file-input-base/file-input-base.d.ts +13 -0
- package/_file-input-base/file-input-base.js +50 -0
- package/_file-input-base/index.d.ts +2 -0
- package/_file-input-base/index.js +5 -0
- package/_input-with-popover/index.d.ts +2 -0
- package/_input-with-popover/index.js +5 -0
- package/_input-with-popover/input-with-popover.d.ts +25 -0
- package/_input-with-popover/input-with-popover.js +93 -0
- package/_private-utils/get-provider-config.d.ts +2 -0
- package/_private-utils/get-provider-config.js +19 -0
- package/accordion/accordion.d.ts +33 -0
- package/accordion/accordion.js +78 -0
- package/accordion/accordion.spec.d.ts +1 -0
- package/accordion/accordion.spec.js +9 -0
- package/accordion/accordion.stories.d.ts +2 -0
- package/accordion/accordion.stories.js +20 -0
- package/accordion/index.d.ts +2 -0
- package/accordion/index.js +5 -0
- package/alert-bubble/alert-bubble.d.ts +10 -0
- package/alert-bubble/alert-bubble.js +22 -0
- package/alert-bubble/alert-bubble.spec.d.ts +1 -0
- package/alert-bubble/alert-bubble.spec.js +9 -0
- package/alert-bubble/alert-bubble.stories.d.ts +2 -0
- package/alert-bubble/alert-bubble.stories.js +43 -0
- package/alert-bubble/index.d.ts +3 -0
- package/alert-bubble/index.js +5 -0
- package/alert-bubble/theme.d.ts +16 -0
- package/alert-bubble/theme.js +2 -0
- package/announcement-bar/announcement-bar.d.ts +9 -0
- package/announcement-bar/announcement-bar.js +40 -0
- package/announcement-bar/announcement-bar.spec.d.ts +1 -0
- package/announcement-bar/announcement-bar.spec.js +9 -0
- package/announcement-bar/announcement-bar.stories.d.ts +2 -0
- package/announcement-bar/announcement-bar.stories.js +36 -0
- package/announcement-bar/index.d.ts +2 -0
- package/announcement-bar/index.js +5 -0
- package/announcement-bar/theme.d.ts +9 -0
- package/announcement-bar/theme.js +2 -0
- package/avatar/avatar.d.ts +6 -0
- package/avatar/avatar.js +35 -0
- package/avatar/avatar.spec.d.ts +1 -0
- package/avatar/avatar.spec.js +9 -0
- package/avatar/avatar.stories.d.ts +2 -0
- package/avatar/avatar.stories.js +13 -0
- package/avatar/index.d.ts +2 -0
- package/avatar/index.js +5 -0
- package/avatar-file-input/avatar-file-input.d.ts +18 -0
- package/avatar-file-input/avatar-file-input.js +71 -0
- package/avatar-file-input/avatar-file-input.spec.d.ts +1 -0
- package/avatar-file-input/avatar-file-input.spec.js +9 -0
- package/avatar-file-input/avatar-file-input.stories.d.ts +2 -0
- package/avatar-file-input/avatar-file-input.stories.js +48 -0
- package/avatar-file-input/index.d.ts +2 -0
- package/avatar-file-input/index.js +5 -0
- package/avatar-file-input/theme.d.ts +5 -0
- package/avatar-file-input/theme.js +2 -0
- package/badge/badge.d.ts +7 -0
- package/badge/badge.js +35 -0
- package/badge/badge.spec.d.ts +1 -0
- package/badge/badge.spec.js +9 -0
- package/badge/badge.stories.d.ts +2 -0
- package/badge/badge.stories.js +32 -0
- package/badge/index.d.ts +3 -0
- package/badge/index.js +5 -0
- package/badge/theme.d.ts +6 -0
- package/badge/theme.js +2 -0
- package/button/button.d.ts +17 -0
- package/button/button.js +50 -0
- package/button/button.spec.d.ts +1 -0
- package/button/button.spec.js +9 -0
- package/button/button.stories.d.ts +4 -0
- package/button/button.stories.js +94 -0
- package/button/index.d.ts +3 -0
- package/button/index.js +5 -0
- package/button/theme.d.ts +22 -0
- package/button/theme.js +2 -0
- package/button-group/button-group.d.ts +6 -0
- package/button-group/button-group.js +13 -0
- package/button-group/button-group.spec.d.ts +1 -0
- package/button-group/button-group.spec.js +9 -0
- package/button-group/button-group.stories.d.ts +2 -0
- package/button-group/button-group.stories.js +34 -0
- package/button-group/index.d.ts +2 -0
- package/button-group/index.js +5 -0
- package/button-list/button-list.d.ts +25 -0
- package/button-list/button-list.js +85 -0
- package/button-list/button-list.spec.d.ts +1 -0
- package/button-list/button-list.spec.js +9 -0
- package/button-list/button-list.stories.d.ts +2 -0
- package/button-list/button-list.stories.js +58 -0
- package/button-list/index.d.ts +2 -0
- package/button-list/index.js +5 -0
- package/calendar/calendar-day-cell.d.ts +10 -0
- package/calendar/calendar-day-cell.js +65 -0
- package/calendar/calendar-navigation.d.ts +9 -0
- package/calendar/calendar-navigation.js +26 -0
- package/calendar/calendar-provider.d.ts +6 -0
- package/calendar/calendar-provider.js +26 -0
- package/calendar/calendar.d.ts +12 -0
- package/calendar/calendar.js +51 -0
- package/calendar/calendar.stories.d.ts +2 -0
- package/calendar/calendar.stories.js +35 -0
- package/calendar/index.d.ts +4 -0
- package/calendar/index.js +7 -0
- package/calendar/utils/get-class-names-from-flags.d.ts +2 -0
- package/calendar/utils/get-class-names-from-flags.js +7 -0
- package/checkbox/checkbox.d.ts +12 -0
- package/checkbox/checkbox.js +54 -0
- package/checkbox/checkbox.spec.d.ts +1 -0
- package/checkbox/checkbox.spec.js +9 -0
- package/checkbox/checkbox.stories.d.ts +2 -0
- package/checkbox/checkbox.stories.js +40 -0
- package/checkbox/index.d.ts +3 -0
- package/checkbox/index.js +5 -0
- package/checkbox/theme.d.ts +5 -0
- package/checkbox/theme.js +2 -0
- package/checkbox-button/checkbox-button.d.ts +9 -0
- package/checkbox-button/checkbox-button.js +39 -0
- package/checkbox-button/checkbox-button.spec.d.ts +1 -0
- package/checkbox-button/checkbox-button.spec.js +9 -0
- package/checkbox-button/checkbox-button.stories.d.ts +2 -0
- package/checkbox-button/checkbox-button.stories.js +38 -0
- package/checkbox-button/index.d.ts +2 -0
- package/checkbox-button/index.js +5 -0
- package/checkbox-input/checkbox-input.d.ts +14 -0
- package/checkbox-input/checkbox-input.js +43 -0
- package/checkbox-input/checkbox-input.spec.d.ts +1 -0
- package/checkbox-input/checkbox-input.spec.js +9 -0
- package/checkbox-input/checkbox-input.stories.d.ts +2 -0
- package/checkbox-input/checkbox-input.stories.js +40 -0
- package/checkbox-input/index.d.ts +2 -0
- package/checkbox-input/index.js +5 -0
- package/checkbox-list/checkbox-list.d.ts +6 -0
- package/checkbox-list/checkbox-list.js +52 -0
- package/checkbox-list/checkbox-list.spec.d.ts +1 -0
- package/checkbox-list/checkbox-list.spec.js +9 -0
- package/checkbox-list/checkbox-list.stories.d.ts +2 -0
- package/checkbox-list/checkbox-list.stories.js +40 -0
- package/checkbox-list/index.d.ts +2 -0
- package/checkbox-list/index.js +5 -0
- package/checkbox-list/types.d.ts +16 -0
- package/checkbox-list/types.js +2 -0
- package/chip/chip.d.ts +13 -0
- package/chip/chip.js +60 -0
- package/chip/chip.spec.d.ts +1 -0
- package/chip/chip.spec.js +9 -0
- package/chip/chip.stories.d.ts +2 -0
- package/chip/chip.stories.js +47 -0
- package/chip/index.d.ts +3 -0
- package/chip/index.js +5 -0
- package/chip/theme.d.ts +25 -0
- package/chip/theme.js +2 -0
- package/chip/translations.d.ts +11 -0
- package/chip/translations.js +12 -0
- package/color-radio/color-radio.d.ts +12 -0
- package/color-radio/color-radio.js +66 -0
- package/color-radio/color-radio.spec.d.ts +1 -0
- package/color-radio/color-radio.spec.js +9 -0
- package/color-radio/color-radio.stories.d.ts +2 -0
- package/color-radio/color-radio.stories.js +25 -0
- package/color-radio/index.d.ts +2 -0
- package/color-radio/index.js +5 -0
- package/color-radio-group/color-radio-group.d.ts +18 -0
- package/color-radio-group/color-radio-group.js +49 -0
- package/color-radio-group/color-radio-group.spec.d.ts +1 -0
- package/color-radio-group/color-radio-group.spec.js +9 -0
- package/color-radio-group/color-radio-group.stories.d.ts +2 -0
- package/color-radio-group/color-radio-group.stories.js +75 -0
- package/color-radio-group/index.d.ts +2 -0
- package/color-radio-group/index.js +5 -0
- package/color-scheme/color-scheme-defaults.d.ts +8 -0
- package/color-scheme/color-scheme-defaults.js +10 -0
- package/color-scheme/get-color-scheme-class-name.d.ts +2 -0
- package/color-scheme/get-color-scheme-class-name.js +13 -0
- package/color-scheme/get-color-scheme.d.ts +2 -0
- package/color-scheme/get-color-scheme.js +16 -0
- package/color-scheme/index.d.ts +5 -0
- package/color-scheme/index.js +13 -0
- package/color-scheme/use-color-scheme.d.ts +2 -0
- package/color-scheme/use-color-scheme.js +15 -0
- package/color-scheme/use-handle-color-scheme.d.ts +9 -0
- package/color-scheme/use-handle-color-scheme.js +23 -0
- package/color-scheme/use-toggle-color-scheme.d.ts +1 -0
- package/color-scheme/use-toggle-color-scheme.js +29 -0
- package/combobox/combobox.d.ts +51 -0
- package/combobox/combobox.js +108 -0
- package/combobox/combobox.spec.d.ts +1 -0
- package/combobox/combobox.spec.js +10 -0
- package/combobox/combobox.stories.d.ts +3 -0
- package/combobox/combobox.stories.js +55 -0
- package/combobox/index.d.ts +2 -0
- package/combobox/index.js +5 -0
- package/combobox/translations.d.ts +17 -0
- package/combobox/translations.js +18 -0
- package/components.d.ts +317 -0
- package/components.js +344 -0
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +127 -0
- package/config/icons.js +30 -0
- package/content/content-schema.d.ts +3 -0
- package/content/content-schema.js +2 -0
- package/content/types.d.ts +27 -0
- package/content/types.js +2 -0
- package/context/context.d.ts +17 -0
- package/context/context.js +5 -0
- package/context/index.d.ts +3 -0
- package/context/index.js +19 -0
- package/context/provider.d.ts +8 -0
- package/context/provider.js +20 -0
- package/context/use-component-context.d.ts +3 -0
- package/context/use-component-context.js +13 -0
- package/create-component-preview-page/create-component-preview-page.d.ts +13 -0
- package/create-component-preview-page/create-component-preview-page.js +43 -0
- package/create-component-preview-page/index.d.ts +2 -0
- package/create-component-preview-page/index.js +18 -0
- package/date-picker/date-picker-content.d.ts +10 -0
- package/date-picker/date-picker-content.js +58 -0
- package/date-picker/date-picker-decade.d.ts +9 -0
- package/date-picker/date-picker-decade.js +91 -0
- package/date-picker/date-picker-month.d.ts +10 -0
- package/date-picker/date-picker-month.js +87 -0
- package/date-picker/date-picker-year.d.ts +9 -0
- package/date-picker/date-picker-year.js +96 -0
- package/date-picker/date-picker.d.ts +20 -0
- package/date-picker/date-picker.js +31 -0
- package/date-picker/date-picker.spec.d.ts +1 -0
- package/date-picker/date-picker.spec.js +9 -0
- package/date-picker/date-picker.stories.d.ts +2 -0
- package/date-picker/date-picker.stories.js +80 -0
- package/date-picker/index.d.ts +3 -0
- package/date-picker/index.js +5 -0
- package/date-picker/translations.d.ts +53 -0
- package/date-picker/translations.js +54 -0
- package/date-picker/types.d.ts +11 -0
- package/date-picker/types.js +2 -0
- package/date-picker-input/date-picker-input.d.ts +23 -0
- package/date-picker-input/date-picker-input.js +88 -0
- package/date-picker-input/date-picker-input.spec.d.ts +1 -0
- package/date-picker-input/date-picker-input.spec.js +9 -0
- package/date-picker-input/date-picker-input.stories.d.ts +2 -0
- package/date-picker-input/date-picker-input.stories.js +55 -0
- package/date-picker-input/index.d.ts +2 -0
- package/date-picker-input/index.js +8 -0
- package/date-range-picker/date-range-picker-content.d.ts +6 -0
- package/date-range-picker/date-range-picker-content.js +56 -0
- package/date-range-picker/date-range-picker-decade.d.ts +9 -0
- package/date-range-picker/date-range-picker-decade.js +95 -0
- package/date-range-picker/date-range-picker-month.d.ts +10 -0
- package/date-range-picker/date-range-picker-month.js +84 -0
- package/date-range-picker/date-range-picker-year.d.ts +9 -0
- package/date-range-picker/date-range-picker-year.js +93 -0
- package/date-range-picker/date-range-picker.d.ts +15 -0
- package/date-range-picker/date-range-picker.js +53 -0
- package/date-range-picker/date-range-picker.spec.d.ts +1 -0
- package/date-range-picker/date-range-picker.spec.js +9 -0
- package/date-range-picker/date-range-picker.stories.d.ts +2 -0
- package/date-range-picker/date-range-picker.stories.js +36 -0
- package/date-range-picker/index.d.ts +3 -0
- package/date-range-picker/index.js +5 -0
- package/date-range-picker/translations.d.ts +53 -0
- package/date-range-picker/translations.js +54 -0
- package/date-range-picker/types.d.ts +5 -0
- package/date-range-picker/types.js +2 -0
- package/date-range-picker-input/date-range-picker-input.d.ts +21 -0
- package/date-range-picker-input/date-range-picker-input.js +62 -0
- package/date-range-picker-input/date-range-picker-input.spec.d.ts +1 -0
- package/date-range-picker-input/date-range-picker-input.spec.js +9 -0
- package/date-range-picker-input/date-range-picker-input.stories.d.ts +2 -0
- package/date-range-picker-input/date-range-picker-input.stories.js +44 -0
- package/date-range-picker-input/index.d.ts +2 -0
- package/date-range-picker-input/index.js +5 -0
- package/datetime-picker/datetime-picker.d.ts +17 -0
- package/datetime-picker/datetime-picker.js +98 -0
- package/datetime-picker/datetime-picker.spec.d.ts +1 -0
- package/datetime-picker/datetime-picker.spec.js +9 -0
- package/datetime-picker/datetime-picker.stories.d.ts +2 -0
- package/datetime-picker/datetime-picker.stories.js +37 -0
- package/datetime-picker/index.d.ts +2 -0
- package/datetime-picker/index.js +7 -0
- package/datetime-picker/translations.d.ts +17 -0
- package/datetime-picker/translations.js +18 -0
- package/datetime-picker-input/datetime-picker-input.d.ts +21 -0
- package/datetime-picker-input/datetime-picker-input.js +85 -0
- package/datetime-picker-input/datetime-picker-input.spec.d.ts +1 -0
- package/datetime-picker-input/datetime-picker-input.spec.js +9 -0
- package/datetime-picker-input/datetime-picker-input.stories.d.ts +2 -0
- package/datetime-picker-input/datetime-picker-input.stories.js +45 -0
- package/datetime-picker-input/get-datetime-string.d.ts +6 -0
- package/datetime-picker-input/get-datetime-string.js +18 -0
- package/datetime-picker-input/index.d.ts +2 -0
- package/datetime-picker-input/index.js +7 -0
- package/dialog/dialog-panel.d.ts +12 -0
- package/dialog/dialog-panel.js +13 -0
- package/dialog/dialog.d.ts +28 -0
- package/dialog/dialog.js +75 -0
- package/dialog/dialog.spec.d.ts +1 -0
- package/dialog/dialog.spec.js +9 -0
- package/dialog/dialog.stories.d.ts +2 -0
- package/dialog/dialog.stories.js +20 -0
- package/dialog/index.d.ts +4 -0
- package/dialog/index.js +7 -0
- package/dialog/theme.d.ts +11 -0
- package/dialog/theme.js +2 -0
- package/dropdown/dropdown.d.ts +13 -0
- package/dropdown/dropdown.js +50 -0
- package/dropdown/dropdown.spec.d.ts +1 -0
- package/dropdown/dropdown.spec.js +9 -0
- package/dropdown/dropdown.stories.d.ts +2 -0
- package/dropdown/dropdown.stories.js +23 -0
- package/dropdown/index.d.ts +2 -0
- package/dropdown/index.js +5 -0
- package/dropzone/dropzone-input.d.ts +24 -0
- package/dropzone/dropzone-input.js +146 -0
- package/dropzone/dropzone-list.d.ts +15 -0
- package/dropzone/dropzone-list.js +81 -0
- package/dropzone/dropzone.spec.d.ts +1 -0
- package/dropzone/dropzone.spec.js +9 -0
- package/dropzone/dropzone.stories.d.ts +2 -0
- package/dropzone/dropzone.stories.js +63 -0
- package/dropzone/handle-rejected-files.d.ts +2 -0
- package/dropzone/handle-rejected-files.js +17 -0
- package/dropzone/index.d.ts +6 -0
- package/dropzone/index.js +6 -0
- package/dropzone/types.d.ts +10 -0
- package/dropzone/types.js +2 -0
- package/error-message/error-message.d.ts +6 -0
- package/error-message/error-message.js +12 -0
- package/error-message/error-message.spec.d.ts +1 -0
- package/error-message/error-message.spec.js +9 -0
- package/error-message/error-message.stories.d.ts +2 -0
- package/error-message/error-message.stories.js +12 -0
- package/error-message/index.d.ts +1 -0
- package/error-message/index.js +5 -0
- package/file-input/file-input.d.ts +15 -0
- package/file-input/file-input.js +72 -0
- package/file-input/file-input.spec.d.ts +1 -0
- package/file-input/file-input.spec.js +9 -0
- package/file-input/file-input.stories.d.ts +2 -0
- package/file-input/file-input.stories.js +43 -0
- package/file-input/index.d.ts +2 -0
- package/file-input/index.js +5 -0
- package/flash-messages/flash-message.d.ts +17 -0
- package/flash-messages/flash-message.js +47 -0
- package/flash-messages/flash-messages-service.d.ts +4 -0
- package/flash-messages/flash-messages-service.js +14 -0
- package/flash-messages/flash-messages.d.ts +8 -0
- package/flash-messages/flash-messages.js +116 -0
- package/flash-messages/flash-messages.spec.d.ts +1 -0
- package/flash-messages/flash-messages.spec.js +9 -0
- package/flash-messages/flash-messages.stories.d.ts +2 -0
- package/flash-messages/flash-messages.stories.js +70 -0
- package/flash-messages/index.d.ts +3 -0
- package/flash-messages/index.js +8 -0
- package/flash-messages/theme.d.ts +6 -0
- package/flash-messages/theme.js +2 -0
- package/form-component/form-component.d.ts +14 -0
- package/form-component/form-component.js +41 -0
- package/form-component/form-component.spec.d.ts +1 -0
- package/form-component/form-component.spec.js +9 -0
- package/form-component/form-component.stories.d.ts +2 -0
- package/form-component/form-component.stories.js +19 -0
- package/form-component/index.d.ts +2 -0
- package/form-component/index.js +5 -0
- package/hooks/use-async-loading.d.ts +4 -0
- package/hooks/use-async-loading.js +31 -0
- package/hooks/use-dropdown.d.ts +39 -0
- package/hooks/use-dropdown.js +28 -0
- package/hooks/use-input-submit.d.ts +4 -0
- package/hooks/use-input-submit.js +39 -0
- package/icon/icon.d.ts +20 -0
- package/icon/icon.js +59 -0
- package/icon/icon.spec.d.ts +1 -0
- package/icon/icon.spec.js +10 -0
- package/icon/icon.stories.d.ts +6 -0
- package/icon/icon.stories.js +43 -0
- package/icon/index.d.ts +3 -0
- package/icon/index.js +5 -0
- package/icon/theme.d.ts +10 -0
- package/icon/theme.js +2 -0
- package/icon/types.d.ts +2 -0
- package/icon/types.js +2 -0
- package/icon-button/icon-button.d.ts +9 -0
- package/icon-button/icon-button.js +36 -0
- package/icon-button/icon-button.spec.d.ts +1 -0
- package/icon-button/icon-button.spec.js +9 -0
- package/icon-button/icon-button.stories.d.ts +2 -0
- package/icon-button/icon-button.stories.js +58 -0
- package/icon-button/index.d.ts +2 -0
- package/icon-button/index.js +5 -0
- package/image-gallery/components/close-button.d.ts +8 -0
- package/image-gallery/components/close-button.js +17 -0
- package/image-gallery/components/dot.d.ts +6 -0
- package/image-gallery/components/dot.js +14 -0
- package/image-gallery/components/gallery.d.ts +15 -0
- package/image-gallery/components/gallery.js +80 -0
- package/image-gallery/components/next-button.d.ts +7 -0
- package/image-gallery/components/next-button.js +14 -0
- package/image-gallery/components/prev-button.d.ts +7 -0
- package/image-gallery/components/prev-button.js +14 -0
- package/image-gallery/context.d.ts +9 -0
- package/image-gallery/context.js +12 -0
- package/image-gallery/image-gallery.d.ts +14 -0
- package/image-gallery/image-gallery.js +58 -0
- package/image-gallery/image-gallery.spec.d.ts +1 -0
- package/image-gallery/image-gallery.spec.js +9 -0
- package/image-gallery/image-gallery.stories.d.ts +2 -0
- package/image-gallery/image-gallery.stories.js +36 -0
- package/image-gallery/image.d.ts +3 -0
- package/image-gallery/image.js +18 -0
- package/image-gallery/index.d.ts +5 -0
- package/image-gallery/index.js +8 -0
- package/image-gallery/translations.d.ts +11 -0
- package/image-gallery/translations.js +12 -0
- package/image-gallery/types.d.ts +9 -0
- package/image-gallery/types.js +2 -0
- package/image-gallery/use-image.d.ts +2 -0
- package/image-gallery/use-image.js +16 -0
- package/info-box/index.d.ts +2 -0
- package/info-box/index.js +5 -0
- package/info-box/info-box.d.ts +15 -0
- package/info-box/info-box.js +61 -0
- package/info-box/info-box.spec.d.ts +1 -0
- package/info-box/info-box.spec.js +9 -0
- package/info-box/info-box.stories.d.ts +2 -0
- package/info-box/info-box.stories.js +20 -0
- package/info-box/theme.d.ts +15 -0
- package/info-box/theme.js +2 -0
- package/info-box/types.d.ts +3 -0
- package/info-box/types.js +2 -0
- package/input/index.d.ts +14 -0
- package/input/index.js +20 -0
- package/input/input-arrow-icon.d.ts +8 -0
- package/input/input-arrow-icon.js +15 -0
- package/input/input-element.d.ts +24 -0
- package/input/input-element.js +33 -0
- package/input/input-left-addon.d.ts +5 -0
- package/input/input-left-addon.js +14 -0
- package/input/input-left-element.d.ts +5 -0
- package/input/input-left-element.js +12 -0
- package/input/input-remove-button.d.ts +5 -0
- package/input/input-remove-button.js +29 -0
- package/input/input-right-addon.d.ts +5 -0
- package/input/input-right-addon.js +14 -0
- package/input/input-right-element.d.ts +5 -0
- package/input/input-right-element.js +12 -0
- package/input/input.d.ts +20 -0
- package/input/input.js +66 -0
- package/input/input.spec.d.ts +1 -0
- package/input/input.spec.js +10 -0
- package/input/input.stories.d.ts +4 -0
- package/input/input.stories.js +90 -0
- package/input/theme.d.ts +10 -0
- package/input/theme.js +2 -0
- package/label/index.d.ts +2 -0
- package/label/index.js +5 -0
- package/label/label.d.ts +12 -0
- package/label/label.js +37 -0
- package/label/label.spec.d.ts +1 -0
- package/label/label.spec.js +9 -0
- package/label/label.stories.d.ts +2 -0
- package/label/label.stories.js +12 -0
- package/layout/index.d.ts +2 -0
- package/layout/index.js +5 -0
- package/layout/layout.d.ts +13 -0
- package/layout/layout.js +46 -0
- package/layout/layout.spec.d.ts +1 -0
- package/layout/layout.spec.js +9 -0
- package/layout/layout.stories.d.ts +2 -0
- package/layout/layout.stories.js +15 -0
- package/layout/translations.d.ts +11 -0
- package/layout/translations.js +12 -0
- package/layout/uxf-logo.d.ts +6 -0
- package/layout/uxf-logo.js +13 -0
- package/lightbox/components/lightbox-close-button.d.ts +6 -0
- package/lightbox/components/lightbox-close-button.js +16 -0
- package/lightbox/components/lightbox-dialog.d.ts +15 -0
- package/lightbox/components/lightbox-dialog.js +49 -0
- package/lightbox/components/lightbox-dot.d.ts +9 -0
- package/lightbox/components/lightbox-dot.js +13 -0
- package/lightbox/components/lightbox-next-button.d.ts +6 -0
- package/lightbox/components/lightbox-next-button.js +16 -0
- package/lightbox/components/lightbox-prev-button.d.ts +6 -0
- package/lightbox/components/lightbox-prev-button.js +16 -0
- package/lightbox/components/use-lightbox-dialog.d.ts +34 -0
- package/lightbox/components/use-lightbox-dialog.js +51 -0
- package/lightbox/context.d.ts +11 -0
- package/lightbox/context.js +17 -0
- package/lightbox/index.d.ts +4 -0
- package/lightbox/index.js +9 -0
- package/lightbox/lightbox.d.ts +14 -0
- package/lightbox/lightbox.js +27 -0
- package/lightbox/lightbox.spec.d.ts +1 -0
- package/lightbox/lightbox.spec.js +9 -0
- package/lightbox/lightbox.stories.d.ts +2 -0
- package/lightbox/lightbox.stories.js +43 -0
- package/lightbox/translations.d.ts +23 -0
- package/lightbox/translations.js +24 -0
- package/lightbox/types.d.ts +20 -0
- package/lightbox/types.js +2 -0
- package/lightbox/use-lightbox-image.d.ts +2 -0
- package/lightbox/use-lightbox-image.js +17 -0
- package/lightbox/use-lightbox.d.ts +11 -0
- package/lightbox/use-lightbox.js +34 -0
- package/list-item/index.d.ts +2 -0
- package/list-item/index.js +5 -0
- package/list-item/list-item.d.ts +10 -0
- package/list-item/list-item.js +45 -0
- package/list-item/list-item.spec.d.ts +1 -0
- package/list-item/list-item.spec.js +9 -0
- package/list-item/list-item.stories.d.ts +2 -0
- package/list-item/list-item.stories.js +28 -0
- package/loader/index.d.ts +2 -0
- package/loader/index.js +5 -0
- package/loader/loader.d.ts +5 -0
- package/loader/loader.js +34 -0
- package/loader/loader.spec.d.ts +1 -0
- package/loader/loader.spec.js +9 -0
- package/loader/loader.stories.d.ts +2 -0
- package/loader/loader.stories.js +16 -0
- package/lozenge/index.d.ts +3 -0
- package/lozenge/index.js +5 -0
- package/lozenge/lozenge.d.ts +7 -0
- package/lozenge/lozenge.js +35 -0
- package/lozenge/lozenge.spec.d.ts +1 -0
- package/lozenge/lozenge.spec.js +9 -0
- package/lozenge/lozenge.stories.d.ts +2 -0
- package/lozenge/lozenge.stories.js +16 -0
- package/lozenge/theme.d.ts +14 -0
- package/lozenge/theme.js +2 -0
- package/message/index.d.ts +3 -0
- package/message/index.js +7 -0
- package/message/message-content.d.ts +20 -0
- package/message/message-content.js +42 -0
- package/message/message-service.d.ts +13 -0
- package/message/message-service.js +30 -0
- package/message/message.d.ts +24 -0
- package/message/message.js +55 -0
- package/message/message.spec.d.ts +1 -0
- package/message/message.spec.js +9 -0
- package/message/message.stories.d.ts +2 -0
- package/message/message.stories.js +71 -0
- package/message/theme.d.ts +12 -0
- package/message/theme.js +2 -0
- package/modal/index.d.ts +4 -0
- package/modal/index.js +11 -0
- package/modal/modal-provider.d.ts +3 -0
- package/modal/modal-provider.js +57 -0
- package/modal/modal-service.d.ts +4 -0
- package/modal/modal-service.js +20 -0
- package/modal/modal.d.ts +3 -0
- package/modal/modal.js +27 -0
- package/modal/modal.spec.d.ts +1 -0
- package/modal/modal.spec.js +9 -0
- package/modal/modal.stories.d.ts +3 -0
- package/modal/modal.stories.js +109 -0
- package/modal/theme.d.ts +4 -0
- package/modal/theme.js +2 -0
- package/modal/types.d.ts +23 -0
- package/modal/types.js +2 -0
- package/modal-dialog/modal-dialog.d.ts +13 -0
- package/modal-dialog/modal-dialog.js +18 -0
- package/modal-dialog/modal-dialog.stories.d.ts +2 -0
- package/modal-dialog/modal-dialog.stories.js +28 -0
- package/modal-header/index.d.ts +2 -0
- package/modal-header/index.js +5 -0
- package/modal-header/modal-header.d.ts +10 -0
- package/modal-header/modal-header.js +27 -0
- package/modal-header/modal-header.spec.d.ts +1 -0
- package/modal-header/modal-header.spec.js +9 -0
- package/modal-header/modal-header.stories.d.ts +2 -0
- package/modal-header/modal-header.stories.js +19 -0
- package/multi-combobox/index.d.ts +2 -0
- package/multi-combobox/index.js +5 -0
- package/multi-combobox/multi-combobox.d.ts +3 -0
- package/multi-combobox/multi-combobox.js +174 -0
- package/multi-combobox/multi-combobox.spec.d.ts +1 -0
- package/multi-combobox/multi-combobox.spec.js +10 -0
- package/multi-combobox/multi-combobox.stories.d.ts +4 -0
- package/multi-combobox/multi-combobox.stories.js +89 -0
- package/multi-combobox/translations.d.ts +29 -0
- package/multi-combobox/translations.js +30 -0
- package/multi-combobox/types.d.ts +48 -0
- package/multi-combobox/types.js +2 -0
- package/multi-select/index.d.ts +2 -0
- package/multi-select/index.js +5 -0
- package/multi-select/multi-select.d.ts +3 -0
- package/multi-select/multi-select.js +138 -0
- package/multi-select/multi-select.spec.d.ts +1 -0
- package/multi-select/multi-select.spec.js +9 -0
- package/multi-select/multi-select.stories.d.ts +3 -0
- package/multi-select/multi-select.stories.js +75 -0
- package/multi-select/translations.d.ts +17 -0
- package/multi-select/translations.js +18 -0
- package/multi-select/types.d.ts +43 -0
- package/multi-select/types.js +2 -0
- package/package.json +2 -2
- package/pagination/index.d.ts +2 -0
- package/pagination/index.js +5 -0
- package/pagination/pagination.d.ts +12 -0
- package/pagination/pagination.js +62 -0
- package/pagination/pagination.spec.d.ts +1 -0
- package/pagination/pagination.spec.js +9 -0
- package/pagination/pagination.stories.d.ts +2 -0
- package/pagination/pagination.stories.js +40 -0
- package/pagination/theme.d.ts +7 -0
- package/pagination/theme.js +2 -0
- package/paper/index.d.ts +2 -0
- package/paper/index.js +5 -0
- package/paper/paper.d.ts +5 -0
- package/paper/paper.js +33 -0
- package/paper/paper.spec.d.ts +1 -0
- package/paper/paper.spec.js +9 -0
- package/paper/paper.stories.d.ts +2 -0
- package/paper/paper.stories.js +13 -0
- package/radio/index.d.ts +3 -0
- package/radio/index.js +5 -0
- package/radio/radio.d.ts +12 -0
- package/radio/radio.js +53 -0
- package/radio/radio.spec.d.ts +1 -0
- package/radio/radio.spec.js +9 -0
- package/radio/radio.stories.d.ts +2 -0
- package/radio/radio.stories.js +29 -0
- package/radio/theme.d.ts +5 -0
- package/radio/theme.js +2 -0
- package/radio-group/index.d.ts +3 -0
- package/radio-group/index.js +5 -0
- package/radio-group/radio-group.d.ts +23 -0
- package/radio-group/radio-group.js +51 -0
- package/radio-group/radio-group.spec.d.ts +1 -0
- package/radio-group/radio-group.spec.js +9 -0
- package/radio-group/radio-group.stories.d.ts +2 -0
- package/radio-group/radio-group.stories.js +55 -0
- package/radio-group/theme.d.ts +7 -0
- package/radio-group/theme.js +2 -0
- package/raster-image/empty-image.d.ts +9 -0
- package/raster-image/empty-image.js +12 -0
- package/raster-image/img-sources.d.ts +17 -0
- package/raster-image/img-sources.js +44 -0
- package/raster-image/index.d.ts +2 -0
- package/raster-image/index.js +5 -0
- package/raster-image/raster-image.d.ts +35 -0
- package/raster-image/raster-image.js +36 -0
- package/raster-image/raster-image.spec.d.ts +1 -0
- package/raster-image/raster-image.spec.js +9 -0
- package/raster-image/raster-image.stories.d.ts +2 -0
- package/raster-image/raster-image.stories.js +12 -0
- package/raster-image/responsive-img-sources.d.ts +15 -0
- package/raster-image/responsive-img-sources.js +19 -0
- package/readmes.d.ts +66 -0
- package/readmes.js +135 -0
- package/select/index.d.ts +2 -0
- package/select/index.js +5 -0
- package/select/select.d.ts +47 -0
- package/select/select.js +103 -0
- package/select/select.spec.d.ts +1 -0
- package/select/select.spec.js +9 -0
- package/select/select.stories.d.ts +3 -0
- package/select/select.stories.js +78 -0
- package/select/translations.d.ts +11 -0
- package/select/translations.js +12 -0
- package/tabs/components/tabs-button-list.d.ts +12 -0
- package/tabs/components/tabs-button-list.js +36 -0
- package/tabs/components/tabs-button.d.ts +17 -0
- package/tabs/components/tabs-button.js +40 -0
- package/tabs/components/tabs-panel.d.ts +11 -0
- package/tabs/components/tabs-panel.js +16 -0
- package/tabs/components/tabs-panels.d.ts +2 -0
- package/tabs/components/tabs-panels.js +10 -0
- package/tabs/components/tabs-root.d.ts +10 -0
- package/tabs/components/tabs-root.js +12 -0
- package/tabs/create-tab-id.d.ts +1 -0
- package/tabs/create-tab-id.js +6 -0
- package/tabs/index.d.ts +2 -0
- package/tabs/index.js +18 -0
- package/tabs/panel-content.d.ts +9 -0
- package/tabs/panel-content.js +35 -0
- package/tabs/panel.d.ts +21 -0
- package/tabs/panel.js +11 -0
- package/tabs/tabs.d.ts +22 -0
- package/tabs/tabs.js +74 -0
- package/tabs/tabs.spec.d.ts +1 -0
- package/tabs/tabs.spec.js +10 -0
- package/tabs/tabs.stories.d.ts +3 -0
- package/tabs/tabs.stories.js +68 -0
- package/tabs/theme.d.ts +4 -0
- package/tabs/theme.js +2 -0
- package/tabs/types.d.ts +2 -0
- package/tabs/types.js +2 -0
- package/text-input/index.d.ts +2 -0
- package/text-input/index.js +5 -0
- package/text-input/text-input.d.ts +33 -0
- package/text-input/text-input.js +51 -0
- package/text-input/text-input.spec.d.ts +1 -0
- package/text-input/text-input.spec.js +9 -0
- package/text-input/text-input.stories.d.ts +3 -0
- package/text-input/text-input.stories.js +64 -0
- package/text-link/index.d.ts +2 -0
- package/text-link/index.js +5 -0
- package/text-link/text-link.d.ts +10 -0
- package/text-link/text-link.js +41 -0
- package/text-link/text-link.spec.d.ts +1 -0
- package/text-link/text-link.spec.js +9 -0
- package/text-link/text-link.stories.d.ts +2 -0
- package/text-link/text-link.stories.js +17 -0
- package/text-link/theme.d.ts +4 -0
- package/text-link/theme.js +2 -0
- package/textarea/index.d.ts +2 -0
- package/textarea/index.js +5 -0
- package/textarea/textarea.d.ts +18 -0
- package/textarea/textarea.js +59 -0
- package/textarea/textarea.spec.d.ts +1 -0
- package/textarea/textarea.spec.js +9 -0
- package/textarea/textarea.stories.d.ts +2 -0
- package/textarea/textarea.stories.js +39 -0
- package/time-picker/index.d.ts +2 -0
- package/time-picker/index.js +5 -0
- package/time-picker/time-picker-hour.d.ts +5 -0
- package/time-picker/time-picker-hour.js +49 -0
- package/time-picker/time-picker-hours.d.ts +2 -0
- package/time-picker/time-picker-hours.js +15 -0
- package/time-picker/time-picker-minute.d.ts +5 -0
- package/time-picker/time-picker-minute.js +49 -0
- package/time-picker/time-picker-minutes.d.ts +2 -0
- package/time-picker/time-picker-minutes.js +15 -0
- package/time-picker/time-picker.d.ts +9 -0
- package/time-picker/time-picker.js +74 -0
- package/time-picker/time-picker.spec.d.ts +1 -0
- package/time-picker/time-picker.spec.js +9 -0
- package/time-picker/time-picker.stories.d.ts +2 -0
- package/time-picker/time-picker.stories.js +36 -0
- package/time-picker/translations.d.ts +17 -0
- package/time-picker/translations.js +18 -0
- package/time-picker-input/index.d.ts +2 -0
- package/time-picker-input/index.js +8 -0
- package/time-picker-input/time-picker-input.d.ts +17 -0
- package/time-picker-input/time-picker-input.js +83 -0
- package/time-picker-input/time-picker-input.spec.d.ts +1 -0
- package/time-picker-input/time-picker-input.spec.js +9 -0
- package/time-picker-input/time-picker-input.stories.d.ts +2 -0
- package/time-picker-input/time-picker-input.stories.js +45 -0
- package/toggle/index.d.ts +3 -0
- package/toggle/index.js +5 -0
- package/toggle/theme.d.ts +10 -0
- package/toggle/theme.js +2 -0
- package/toggle/toggle.d.ts +13 -0
- package/toggle/toggle.js +39 -0
- package/toggle/toggle.spec.d.ts +1 -0
- package/toggle/toggle.spec.js +9 -0
- package/toggle/toggle.stories.d.ts +2 -0
- package/toggle/toggle.stories.js +41 -0
- package/tooltip/index.d.ts +4 -0
- package/tooltip/index.js +7 -0
- package/tooltip/tooltip.d.ts +9 -0
- package/tooltip/tooltip.js +73 -0
- package/tooltip/tooltip.spec.d.ts +1 -0
- package/tooltip/tooltip.spec.js +9 -0
- package/tooltip/tooltip.stories.d.ts +2 -0
- package/tooltip/tooltip.stories.js +38 -0
- package/tooltip/use-tooltip.d.ts +55 -0
- package/tooltip/use-tooltip.js +39 -0
- package/tw-tokens/tw-box-shadow.d.ts +12 -0
- package/tw-tokens/tw-box-shadow.js +15 -0
- package/tw-tokens/tw-colors.d.ts +468 -0
- package/tw-tokens/tw-colors.js +471 -0
- package/tw-tokens/tw-containers.d.ts +8 -0
- package/tw-tokens/tw-containers.js +5 -0
- package/tw-tokens/tw-font-size.d.ts +55 -0
- package/tw-tokens/tw-font-size.js +32 -0
- package/tw-tokens/tw-font-weight.d.ts +12 -0
- package/tw-tokens/tw-font-weight.js +15 -0
- package/tw-tokens/tw-line-height.d.ts +17 -0
- package/tw-tokens/tw-line-height.js +20 -0
- package/tw-tokens/tw-screens.d.ts +8 -0
- package/tw-tokens/tw-screens.js +5 -0
- package/tw-tokens/tw-spacing.d.ts +39 -0
- package/tw-tokens/tw-spacing.js +42 -0
- package/tw-tokens/tw-z-index.d.ts +21 -0
- package/tw-tokens/tw-z-index.js +24 -0
- package/types/color.d.ts +2 -0
- package/types/color.js +2 -0
- package/types/file-response.d.ts +6 -0
- package/types/file-response.js +2 -0
- package/types/form-control-props.d.ts +30 -0
- package/types/form-control-props.js +2 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +19 -0
- package/typography/typography.spec.d.ts +1 -0
- package/typography/typography.spec.js +9 -0
- package/typography/typography.stories.d.ts +2 -0
- package/typography/typography.stories.js +23 -0
- package/utils/action.d.ts +3 -0
- package/utils/action.js +10 -0
- package/utils/component-structure-analyzer.d.ts +6 -0
- package/utils/component-structure-analyzer.js +10 -0
- package/utils/files/get-file-icon.d.ts +2 -0
- package/utils/files/get-file-icon.js +18 -0
- package/utils/files/get-file-icon.test.d.ts +1 -0
- package/utils/files/get-file-icon.test.js +22 -0
- package/utils/files/get-file-url.d.ts +2 -0
- package/utils/files/get-file-url.js +6 -0
- package/utils/files/get-file-url.test.d.ts +1 -0
- package/utils/files/get-file-url.test.js +44 -0
- package/utils/get-default-icon-name.d.ts +4 -0
- package/utils/get-default-icon-name.js +19 -0
- package/utils/get-dropzone-state.d.ts +7 -0
- package/utils/get-dropzone-state.js +23 -0
- package/utils/get-dropzone-state.test.d.ts +1 -0
- package/utils/get-dropzone-state.test.js +88 -0
- package/utils/mocks/upload-file.mock.d.ts +3 -0
- package/utils/mocks/upload-file.mock.js +46 -0
- package/utils/mocks/upload-file.mock.test.d.ts +1 -0
- package/utils/mocks/upload-file.mock.test.js +34 -0
- package/utils/next-link.d.ts +22 -0
- package/utils/next-link.js +2 -0
- package/utils/snap-test.d.ts +2 -0
- package/utils/snap-test.js +22 -0
- package/utils/storybook-config.d.ts +49 -0
- package/utils/storybook-config.js +72 -0
- package/utils/validator/validator-exceptions.d.ts +3 -0
- package/utils/validator/validator-exceptions.js +7 -0
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
};
|
|
10
|
+
readonly calendar: {
|
|
11
|
+
readonly w: 448;
|
|
12
|
+
readonly h: 512;
|
|
13
|
+
};
|
|
14
|
+
readonly camera: {
|
|
15
|
+
readonly w: 512;
|
|
16
|
+
readonly h: 512;
|
|
17
|
+
};
|
|
18
|
+
readonly caretDown: {
|
|
19
|
+
readonly w: 320;
|
|
20
|
+
readonly h: 512;
|
|
21
|
+
};
|
|
22
|
+
readonly clock: {
|
|
23
|
+
readonly w: 512;
|
|
24
|
+
readonly h: 512;
|
|
25
|
+
};
|
|
26
|
+
readonly bars: {
|
|
27
|
+
readonly w: 448;
|
|
28
|
+
readonly h: 512;
|
|
29
|
+
};
|
|
30
|
+
readonly check: {
|
|
31
|
+
readonly w: 512;
|
|
32
|
+
readonly h: 512;
|
|
33
|
+
};
|
|
34
|
+
readonly chevronDown: {
|
|
35
|
+
readonly w: 512;
|
|
36
|
+
readonly h: 512;
|
|
37
|
+
};
|
|
38
|
+
readonly chevronLeft: {
|
|
39
|
+
readonly w: 384;
|
|
40
|
+
readonly h: 512;
|
|
41
|
+
};
|
|
42
|
+
readonly chevronsLeft: {
|
|
43
|
+
readonly w: 512;
|
|
44
|
+
readonly h: 512;
|
|
45
|
+
};
|
|
46
|
+
readonly chevronRight: {
|
|
47
|
+
readonly w: 384;
|
|
48
|
+
readonly h: 512;
|
|
49
|
+
};
|
|
50
|
+
readonly chevronsRight: {
|
|
51
|
+
readonly w: 512;
|
|
52
|
+
readonly h: 512;
|
|
53
|
+
};
|
|
54
|
+
readonly chevronUp: {
|
|
55
|
+
readonly w: 512;
|
|
56
|
+
readonly h: 512;
|
|
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 "triangle-exclamation": {
|
|
79
|
+
readonly w: 512;
|
|
80
|
+
readonly h: 512;
|
|
81
|
+
};
|
|
82
|
+
readonly user: {
|
|
83
|
+
readonly w: 448;
|
|
84
|
+
readonly h: 512;
|
|
85
|
+
};
|
|
86
|
+
readonly videoFile: {
|
|
87
|
+
readonly w: 384;
|
|
88
|
+
readonly h: 512;
|
|
89
|
+
};
|
|
90
|
+
readonly xmark: {
|
|
91
|
+
readonly w: 384;
|
|
92
|
+
readonly h: 512;
|
|
93
|
+
};
|
|
94
|
+
readonly xmarkLarge: {
|
|
95
|
+
readonly w: 448;
|
|
96
|
+
readonly h: 512;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export type IconsType = keyof typeof ICONS;
|
|
100
|
+
declare module "@uxf/ui/icon/theme" {
|
|
101
|
+
interface IconsSet {
|
|
102
|
+
"arrow-left": true;
|
|
103
|
+
"arrow-right": true;
|
|
104
|
+
"calendar": true;
|
|
105
|
+
"camera": true;
|
|
106
|
+
"caretDown": true;
|
|
107
|
+
"clock": true;
|
|
108
|
+
"bars": true;
|
|
109
|
+
"check": true;
|
|
110
|
+
"chevronDown": true;
|
|
111
|
+
"chevronLeft": true;
|
|
112
|
+
"chevronsLeft": true;
|
|
113
|
+
"chevronRight": true;
|
|
114
|
+
"chevronsRight": true;
|
|
115
|
+
"chevronUp": true;
|
|
116
|
+
"cloud": true;
|
|
117
|
+
"copy": true;
|
|
118
|
+
"ellipsis-vertical": true;
|
|
119
|
+
"file": true;
|
|
120
|
+
"imageFile": true;
|
|
121
|
+
"triangle-exclamation": true;
|
|
122
|
+
"user": true;
|
|
123
|
+
"videoFile": true;
|
|
124
|
+
"xmark": true;
|
|
125
|
+
"xmarkLarge": true;
|
|
126
|
+
}
|
|
127
|
+
}
|
package/config/icons.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file is generated automatically, do not change anything manually in the contents of this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ICONS = void 0;
|
|
5
|
+
exports.ICONS = {
|
|
6
|
+
"arrow-left": { w: 448, h: 512 },
|
|
7
|
+
"arrow-right": { w: 448, h: 512 },
|
|
8
|
+
"calendar": { w: 448, h: 512 },
|
|
9
|
+
"camera": { w: 512, h: 512 },
|
|
10
|
+
"caretDown": { w: 320, h: 512 },
|
|
11
|
+
"clock": { w: 512, h: 512 },
|
|
12
|
+
"bars": { w: 448, h: 512 },
|
|
13
|
+
"check": { w: 512, h: 512 },
|
|
14
|
+
"chevronDown": { w: 512, h: 512 },
|
|
15
|
+
"chevronLeft": { w: 384, h: 512 },
|
|
16
|
+
"chevronsLeft": { w: 512, h: 512 },
|
|
17
|
+
"chevronRight": { w: 384, h: 512 },
|
|
18
|
+
"chevronsRight": { w: 512, h: 512 },
|
|
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
|
+
"triangle-exclamation": { w: 512, h: 512 },
|
|
26
|
+
"user": { w: 448, h: 512 },
|
|
27
|
+
"videoFile": { w: 384, h: 512 },
|
|
28
|
+
"xmark": { w: 384, h: 512 },
|
|
29
|
+
"xmarkLarge": { w: 448, h: 512 },
|
|
30
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ContentSchema } from "@uxf/ui/content/content-schema";
|
|
2
|
+
import { FC, ReactNode } from "react";
|
|
3
|
+
import { UseControllerProps } from "react-hook-form";
|
|
4
|
+
export type ContentType = keyof ContentSchema;
|
|
5
|
+
interface ContentFormProps<TYPE extends ContentType> extends UseControllerProps<ContentSchema[TYPE]> {
|
|
6
|
+
type: TYPE;
|
|
7
|
+
index: number;
|
|
8
|
+
onRemove: () => void;
|
|
9
|
+
TypeInputProps: any;
|
|
10
|
+
}
|
|
11
|
+
export type ContentFormComponent<TYPE extends ContentType> = FC<ContentFormProps<TYPE>> & {
|
|
12
|
+
getConfig: () => {
|
|
13
|
+
type: TYPE;
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
interface ContentRendererProps<TYPE extends ContentType> {
|
|
18
|
+
type: TYPE;
|
|
19
|
+
data: ContentSchema[TYPE];
|
|
20
|
+
index: number;
|
|
21
|
+
}
|
|
22
|
+
export type ContentRendererComponent<TYPE extends ContentType> = FC<ContentRendererProps<TYPE>> & {
|
|
23
|
+
getConfig: () => {
|
|
24
|
+
type: TYPE;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
package/content/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ColorSchemeOptions } from "../color-scheme/use-handle-color-scheme";
|
|
2
|
+
import { IconName } from "../icon/types";
|
|
3
|
+
export type UiContextType = {
|
|
4
|
+
colorScheme: ColorSchemeOptions;
|
|
5
|
+
domain: string;
|
|
6
|
+
icon: {
|
|
7
|
+
spriteFilePath: string;
|
|
8
|
+
iconsConfig: Record<IconName, {
|
|
9
|
+
w: number;
|
|
10
|
+
h: number;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
rasterImage: {
|
|
14
|
+
breakpoints: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const UiContext: import("react").Context<UiContextType | undefined>;
|
package/context/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("@uxf/ui/context/context"), exports);
|
|
18
|
+
__exportStar(require("@uxf/ui/context/provider"), exports);
|
|
19
|
+
__exportStar(require("@uxf/ui/context/use-component-context"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
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.UiContextProvider = void 0;
|
|
7
|
+
const dayjs_1 = require("dayjs");
|
|
8
|
+
const customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFormat"));
|
|
9
|
+
const localizedFormat_1 = __importDefault(require("dayjs/plugin/localizedFormat"));
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
const use_handle_color_scheme_1 = require("../color-scheme/use-handle-color-scheme");
|
|
12
|
+
const context_1 = require("./context");
|
|
13
|
+
(0, dayjs_1.extend)(localizedFormat_1.default);
|
|
14
|
+
(0, dayjs_1.extend)(customParseFormat_1.default);
|
|
15
|
+
const UiContextProvider = (props) => {
|
|
16
|
+
(0, use_handle_color_scheme_1.useHandleColorScheme)(props.value.colorScheme);
|
|
17
|
+
return react_1.default.createElement(context_1.UiContext.Provider, { value: props.value }, props.children);
|
|
18
|
+
};
|
|
19
|
+
exports.UiContextProvider = UiContextProvider;
|
|
20
|
+
exports.UiContextProvider.displayName = "UxfUiContextProvider";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useComponentContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const context_1 = require("./context");
|
|
6
|
+
const useComponentContext = (componentName) => {
|
|
7
|
+
const context = (0, react_1.useContext)(context_1.UiContext);
|
|
8
|
+
if (typeof context === "undefined") {
|
|
9
|
+
throw new Error(`If you want to use the "${componentName}" UI component, you have to wrap your code in the "UiContextProvider"`);
|
|
10
|
+
}
|
|
11
|
+
return context[componentName];
|
|
12
|
+
};
|
|
13
|
+
exports.useComponentContext = useComponentContext;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { components } from "../components";
|
|
3
|
+
type Components = typeof components;
|
|
4
|
+
interface CreateComponentPreviewPageProps {
|
|
5
|
+
componentName: keyof Components | null;
|
|
6
|
+
}
|
|
7
|
+
export declare function CreateComponentPreviewPage(props: CreateComponentPreviewPageProps): React.JSX.Element;
|
|
8
|
+
export declare function getServerSideProps(ctx: any): {
|
|
9
|
+
props: {
|
|
10
|
+
componentName: any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
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.CreateComponentPreviewPage = CreateComponentPreviewPage;
|
|
7
|
+
exports.getServerSideProps = getServerSideProps;
|
|
8
|
+
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
9
|
+
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
10
|
+
const react_1 = __importDefault(require("react"));
|
|
11
|
+
const components_1 = require("../components");
|
|
12
|
+
function ComponentPreview(props) {
|
|
13
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(props.stories).map(([key, Story]) => {
|
|
14
|
+
if (key === "default") {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
return react_1.default.createElement(Story, { key: key });
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
function CreateComponentPreviewPage(props) {
|
|
21
|
+
if ((0, is_nil_1.isNil)(props.componentName)) {
|
|
22
|
+
return (react_1.default.createElement("div", { style: { padding: 32 } }, Object.entries(components_1.components).map(([key, config]) => {
|
|
23
|
+
return (react_1.default.createElement("div", { key: key, style: { marginTop: 32, marginBottom: 32 } },
|
|
24
|
+
react_1.default.createElement("h2", null, config.title),
|
|
25
|
+
react_1.default.createElement("div", { style: { border: "2px dashed gray", padding: 32, borderRadius: 4 } },
|
|
26
|
+
react_1.default.createElement(ComponentPreview, { stories: config.stories }))));
|
|
27
|
+
})));
|
|
28
|
+
}
|
|
29
|
+
const componentConfig = components_1.components[props.componentName];
|
|
30
|
+
if ((0, is_nil_1.isNil)(componentConfig)) {
|
|
31
|
+
return react_1.default.createElement("div", null, "component not found");
|
|
32
|
+
}
|
|
33
|
+
return react_1.default.createElement(ComponentPreview, { stories: componentConfig.stories });
|
|
34
|
+
}
|
|
35
|
+
function getServerSideProps(ctx) {
|
|
36
|
+
var _a;
|
|
37
|
+
const [componentName] = (_a = ctx.query.slug) !== null && _a !== void 0 ? _a : empty_array_1.EMPTY_ARRAY;
|
|
38
|
+
return {
|
|
39
|
+
props: {
|
|
40
|
+
componentName: componentName || null,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../components"), exports);
|
|
18
|
+
__exportStar(require("./create-component-preview-page"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MonthType } from "@uxf/datepicker/utils/types";
|
|
2
|
+
import { CSSProperties, FC, PropsWithChildren, ReactNode } from "react";
|
|
3
|
+
import { CustomButtonTitles } from "./types";
|
|
4
|
+
export interface DatePickerContentProps {
|
|
5
|
+
bottomContent?: ReactNode;
|
|
6
|
+
onMonthChange?: (months: MonthType[]) => void;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
customButtonTitles?: CustomButtonTitles;
|
|
9
|
+
}
|
|
10
|
+
export declare const DatePickerContent: FC<PropsWithChildren<DatePickerContentProps>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.DatePickerContent = void 0;
|
|
27
|
+
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const date_picker_decade_1 = require("./date-picker-decade");
|
|
30
|
+
const date_picker_month_1 = require("./date-picker-month");
|
|
31
|
+
const date_picker_year_1 = require("./date-picker-year");
|
|
32
|
+
const DatePickerContent = (props) => {
|
|
33
|
+
// eslint-disable-next-line react/destructuring-assignment
|
|
34
|
+
const { goToDate, activeMonths } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
35
|
+
const onMonthChange = props.onMonthChange;
|
|
36
|
+
const [viewMode, setViewMode] = (0, react_1.useState)("month");
|
|
37
|
+
const onYearSelect = (0, react_1.useCallback)(() => setViewMode("decade"), [setViewMode]);
|
|
38
|
+
const onMonthSelect = (0, react_1.useCallback)((date) => {
|
|
39
|
+
const newActiveMonths = goToDate(date);
|
|
40
|
+
onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(newActiveMonths);
|
|
41
|
+
setViewMode("month");
|
|
42
|
+
}, [goToDate, setViewMode, onMonthChange]);
|
|
43
|
+
const onDecadeYearSelect = (0, react_1.useCallback)((date) => {
|
|
44
|
+
goToDate(date);
|
|
45
|
+
setViewMode("year");
|
|
46
|
+
}, [goToDate, setViewMode]);
|
|
47
|
+
const datePickerComponents = (0, react_1.useMemo)(() => ({
|
|
48
|
+
month: activeMonths.map((month) => (react_1.default.createElement(date_picker_month_1.DatePickerMonth, { customButtonTitles: props.customButtonTitles, key: `${month.year}-${month.month}`, onMonthChange: onMonthChange, setViewMode: setViewMode }))),
|
|
49
|
+
year: (react_1.default.createElement(date_picker_year_1.DatePickerYear, { customButtonTitles: props.customButtonTitles, onMonthSelect: (date) => onMonthSelect(date), onYearSelect: onYearSelect })),
|
|
50
|
+
decade: (react_1.default.createElement(date_picker_decade_1.DatePickerDecade, { customButtonTitles: props.customButtonTitles, onYearSelect: (date) => onDecadeYearSelect(date), setViewMode: setViewMode })),
|
|
51
|
+
}), [activeMonths, props.customButtonTitles, onYearSelect, onMonthChange, onMonthSelect, onDecadeYearSelect]);
|
|
52
|
+
return (react_1.default.createElement("div", { className: "uxf-date-picker", style: props.style },
|
|
53
|
+
props.children,
|
|
54
|
+
datePickerComponents[viewMode],
|
|
55
|
+
props.bottomContent && react_1.default.createElement("div", { className: "uxf-date-picker__bottom-content" }, props.bottomContent)));
|
|
56
|
+
};
|
|
57
|
+
exports.DatePickerContent = DatePickerContent;
|
|
58
|
+
exports.DatePickerContent.displayName = "UxfUiDatePickerContent";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
+
import { CustomButtonTitles, ViewModeType } from "./types";
|
|
3
|
+
interface DatePickerDecadeProps {
|
|
4
|
+
customButtonTitles?: CustomButtonTitles;
|
|
5
|
+
onYearSelect: (date: Date) => void;
|
|
6
|
+
setViewMode: Dispatch<SetStateAction<ViewModeType>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const DatePickerDecade: React.NamedExoticComponent<DatePickerDecadeProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.DatePickerDecade = void 0;
|
|
30
|
+
const translations_1 = require("@uxf/core-react/translations");
|
|
31
|
+
const classes_1 = require("@uxf/core/constants/classes");
|
|
32
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
33
|
+
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
34
|
+
const use_decade_1 = require("@uxf/datepicker/hooks/use-decade");
|
|
35
|
+
const use_month_1 = require("@uxf/datepicker/hooks/use-month");
|
|
36
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const calendar_1 = require("../calendar");
|
|
39
|
+
exports.DatePickerDecade = (0, react_1.memo)((props) => {
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
|
+
const t = (0, translations_1.useUxfTranslation)();
|
|
42
|
+
const { onYearSelect } = props;
|
|
43
|
+
const { canGoToYear, goToNextYear, goToPrevYear, activeMonths, firstDayOfWeek, selectedDate } = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
44
|
+
const currentYear = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.year) !== null && _b !== void 0 ? _b : new Date().getFullYear();
|
|
45
|
+
const currentMonth = (_d = (_c = activeMonths.at(0)) === null || _c === void 0 ? void 0 : _c.month) !== null && _d !== void 0 ? _d : new Date().getMonth();
|
|
46
|
+
const { years } = (0, use_decade_1.useDecade)({
|
|
47
|
+
year: currentYear,
|
|
48
|
+
});
|
|
49
|
+
const canGoToPrevDecade = canGoToYear((0, dayjs_1.default)(new Date(currentYear, 0)).subtract(5, "years").toDate());
|
|
50
|
+
const canGoToNextDecade = canGoToYear((0, dayjs_1.default)(new Date(currentYear, 0)).add(5, "years").toDate());
|
|
51
|
+
const handleGoToPrevDecadeClick = (0, react_1.useCallback)(() => {
|
|
52
|
+
if (canGoToPrevDecade) {
|
|
53
|
+
goToPrevYear(9);
|
|
54
|
+
}
|
|
55
|
+
}, [canGoToPrevDecade, goToPrevYear]);
|
|
56
|
+
const handleGoToNextDecadeClick = (0, react_1.useCallback)(() => {
|
|
57
|
+
if (canGoToNextDecade) {
|
|
58
|
+
goToNextYear(9);
|
|
59
|
+
}
|
|
60
|
+
}, [canGoToNextDecade, goToNextYear]);
|
|
61
|
+
const handleSelectYear = (0, react_1.useCallback)((date) => () => {
|
|
62
|
+
if (canGoToYear(date)) {
|
|
63
|
+
onYearSelect(date);
|
|
64
|
+
}
|
|
65
|
+
}, [canGoToYear, onYearSelect]);
|
|
66
|
+
const { monthLabel } = (0, use_month_1.useMonth)({
|
|
67
|
+
dayLabelFormat: (date) => (0, dayjs_1.default)(date).format("D"),
|
|
68
|
+
firstDayOfWeek,
|
|
69
|
+
month: currentMonth,
|
|
70
|
+
monthLabelFormat: (date) => (0, dayjs_1.default)(date).format("MMMM"),
|
|
71
|
+
year: currentYear,
|
|
72
|
+
});
|
|
73
|
+
const handleSetMonthViewMode = (0, react_1.useCallback)(() => props.setViewMode("year"), [props]);
|
|
74
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
75
|
+
react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
|
|
76
|
+
children: monthLabel,
|
|
77
|
+
onClick: handleSetMonthViewMode,
|
|
78
|
+
title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-picker:select-month"),
|
|
79
|
+
}, nextButtonProps: {
|
|
80
|
+
onClick: handleGoToNextDecadeClick,
|
|
81
|
+
title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextDecade) !== null && _h !== void 0 ? _h : t("uxf-ui-date-picker:next-decade"),
|
|
82
|
+
}, prevButtonProps: {
|
|
83
|
+
onClick: handleGoToPrevDecadeClick,
|
|
84
|
+
title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevDecade) !== null && _k !== void 0 ? _k : t("uxf-ui-date-picker:prev-decade"),
|
|
85
|
+
}, yearButtonProps: {
|
|
86
|
+
children: currentYear,
|
|
87
|
+
isDisabled: true,
|
|
88
|
+
} }),
|
|
89
|
+
react_1.default.createElement("div", { className: "uxf-calendar__decade" }, years.map((year) => (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, (0, dayjs_1.default)(year.date).year() === (0, dayjs_1.default)(selectedDate).year() && "uxf-calendar__cell--selected"), key: year.yearLabel, onClick: handleSelectYear(year.date), type: "button" }, year.yearLabel))))));
|
|
90
|
+
});
|
|
91
|
+
exports.DatePickerDecade.displayName = "UxfUiDatePickerDecade";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MonthType } from "@uxf/datepicker/utils/types";
|
|
2
|
+
import React, { Dispatch, SetStateAction } from "react";
|
|
3
|
+
import { CustomButtonTitles, ViewModeType } from "./types";
|
|
4
|
+
interface DatePickerMonthProps {
|
|
5
|
+
onMonthChange?: (months: MonthType[]) => void;
|
|
6
|
+
setViewMode: Dispatch<SetStateAction<ViewModeType>>;
|
|
7
|
+
customButtonTitles?: CustomButtonTitles;
|
|
8
|
+
}
|
|
9
|
+
export declare const DatePickerMonth: React.NamedExoticComponent<DatePickerMonthProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.DatePickerMonth = void 0;
|
|
30
|
+
const translations_1 = require("@uxf/core-react/translations");
|
|
31
|
+
const date_picker_context_1 = require("@uxf/datepicker/contexts/date-picker-context");
|
|
32
|
+
const use_month_1 = require("@uxf/datepicker/hooks/use-month");
|
|
33
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
34
|
+
const react_1 = __importStar(require("react"));
|
|
35
|
+
const calendar_1 = require("../calendar");
|
|
36
|
+
exports.DatePickerMonth = (0, react_1.memo)((props) => {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
38
|
+
const t = (0, translations_1.useUxfTranslation)();
|
|
39
|
+
const { setViewMode } = props;
|
|
40
|
+
const datePickerProps = (0, react_1.useContext)(date_picker_context_1.DatePickerContext);
|
|
41
|
+
const onMonthChange = props.onMonthChange;
|
|
42
|
+
const { activeMonths, canGoToNextMonth, canGoToPrevMonth, firstDayOfWeek, goToNextMonthsByOneMonth, goToPrevMonthsByOneMonth, } = datePickerProps;
|
|
43
|
+
const currentMonth = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.month) !== null && _b !== void 0 ? _b : new Date().getMonth();
|
|
44
|
+
const currentYear = (_d = (_c = activeMonths.at(0)) === null || _c === void 0 ? void 0 : _c.year) !== null && _d !== void 0 ? _d : new Date().getFullYear();
|
|
45
|
+
const { monthLabel } = (0, use_month_1.useMonth)({
|
|
46
|
+
dayLabelFormat: (date) => (0, dayjs_1.default)(date).format("D"),
|
|
47
|
+
firstDayOfWeek,
|
|
48
|
+
month: currentMonth,
|
|
49
|
+
monthLabelFormat: (date) => (0, dayjs_1.default)(date).format("MMMM"),
|
|
50
|
+
weekdayLabelFormat: (date) => (0, dayjs_1.default)(date).format("dd"),
|
|
51
|
+
year: currentYear,
|
|
52
|
+
});
|
|
53
|
+
const handleGoToPrevMonth = (0, react_1.useCallback)(() => {
|
|
54
|
+
const newActiveMonths = goToPrevMonthsByOneMonth();
|
|
55
|
+
onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(newActiveMonths);
|
|
56
|
+
}, [goToPrevMonthsByOneMonth, onMonthChange]);
|
|
57
|
+
const handleGoToNextMonth = (0, react_1.useCallback)(() => {
|
|
58
|
+
const newActiveMonths = goToNextMonthsByOneMonth();
|
|
59
|
+
onMonthChange === null || onMonthChange === void 0 ? void 0 : onMonthChange(newActiveMonths);
|
|
60
|
+
}, [goToNextMonthsByOneMonth, onMonthChange]);
|
|
61
|
+
const handleMonthClick = (0, react_1.useCallback)(() => {
|
|
62
|
+
setViewMode("year");
|
|
63
|
+
}, [setViewMode]);
|
|
64
|
+
const handleSetYearViewModeClick = (0, react_1.useCallback)(() => {
|
|
65
|
+
setViewMode("decade");
|
|
66
|
+
}, [setViewMode]);
|
|
67
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
68
|
+
react_1.default.createElement(calendar_1.CalendarNavigation, { monthButtonProps: {
|
|
69
|
+
children: monthLabel,
|
|
70
|
+
onClick: handleMonthClick,
|
|
71
|
+
title: (_f = (_e = props.customButtonTitles) === null || _e === void 0 ? void 0 : _e.selectMonth) !== null && _f !== void 0 ? _f : t("uxf-ui-date-picker:select-month"),
|
|
72
|
+
}, nextButtonProps: {
|
|
73
|
+
isDisabled: !canGoToNextMonth,
|
|
74
|
+
onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
|
|
75
|
+
title: (_h = (_g = props.customButtonTitles) === null || _g === void 0 ? void 0 : _g.nextMonth) !== null && _h !== void 0 ? _h : t("uxf-ui-date-picker:next-month"),
|
|
76
|
+
}, prevButtonProps: {
|
|
77
|
+
isDisabled: !canGoToPrevMonth,
|
|
78
|
+
onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
|
|
79
|
+
title: (_k = (_j = props.customButtonTitles) === null || _j === void 0 ? void 0 : _j.prevMonth) !== null && _k !== void 0 ? _k : t("uxf-ui-date-picker:prev-month"),
|
|
80
|
+
}, yearButtonProps: {
|
|
81
|
+
children: currentYear,
|
|
82
|
+
onClick: handleSetYearViewModeClick,
|
|
83
|
+
title: (_m = (_l = props.customButtonTitles) === null || _l === void 0 ? void 0 : _l.selectYear) !== null && _m !== void 0 ? _m : "Vybrat rok",
|
|
84
|
+
} }),
|
|
85
|
+
react_1.default.createElement(calendar_1.Calendar, { datePickerProps: datePickerProps })));
|
|
86
|
+
});
|
|
87
|
+
exports.DatePickerMonth.displayName = "UxfUiDatePickerMonth";
|