@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,75 @@
|
|
|
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.Default = Default;
|
|
30
|
+
exports.ComponentStructure = ComponentStructure;
|
|
31
|
+
const component_structure_analyzer_1 = __importDefault(require("@uxf/ui/utils/component-structure-analyzer"));
|
|
32
|
+
const react_1 = __importStar(require("react"));
|
|
33
|
+
const action_1 = require("../utils/action");
|
|
34
|
+
const multi_select_1 = require("./multi-select");
|
|
35
|
+
const options = [
|
|
36
|
+
{ id: "one", label: "Option red", color: "red" },
|
|
37
|
+
{ id: "two", label: "Option blue", color: "blue" },
|
|
38
|
+
{ id: "three", label: "Option green", color: "green" },
|
|
39
|
+
{ id: "four", label: "Option four" },
|
|
40
|
+
{ id: "five", label: "Option five disabled", disabled: true },
|
|
41
|
+
{ id: "six", label: "Option with diacritics (ěščřžýáíé)" },
|
|
42
|
+
{ id: "seven", label: "Option seven" },
|
|
43
|
+
{ id: "eight", label: "Option eight" },
|
|
44
|
+
{ id: "nine", label: "Option nine" },
|
|
45
|
+
{ id: "ten", label: "Option ten" },
|
|
46
|
+
{ id: "twelve", label: "Option twelve" },
|
|
47
|
+
{ id: "thirteen", label: "Option thirteen" },
|
|
48
|
+
];
|
|
49
|
+
function Default() {
|
|
50
|
+
const [value, setValue] = (0, react_1.useState)(null);
|
|
51
|
+
const onChange = (0, action_1.action)("onChange", (v) => {
|
|
52
|
+
// eslint-disable-next-line no-console
|
|
53
|
+
console.log("Select values: ", v);
|
|
54
|
+
setValue(v);
|
|
55
|
+
});
|
|
56
|
+
const component = (react_1.default.createElement("div", { className: "space-y-8" },
|
|
57
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { dropdownMaxHeight: 350, id: "multi-select-1", label: "MultiSelect", name: "multi-select", onChange: onChange, options: options, placeholder: "Vyberte pros\u00EDm jednu nebo v\u00EDce mo\u017Enost\u00ED", value: value }),
|
|
58
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { id: "multi-select-2", label: "MultiSelect with checkboxes", name: "multi-select", onChange: onChange, options: options, placeholder: "Vyberte...", value: value, withCheckboxes: true }),
|
|
59
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { helperText: "Start typing to see options...", id: "multi-select-3", label: "MultiSelect with helper text", name: "multi-select", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
60
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { helperText: "Error message", id: "multi-select-4", isInvalid: true, isRequired: true, label: "MultiSelect invalid", name: "multi-select-invalid", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
61
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { dropdownPlacement: "top", id: "multi-select-5", label: "MultiSelect with dropdown top", name: "multi-select", onChange: onChange, options: options, placeholder: "Vyberte...", value: value }),
|
|
62
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { id: "multi-select-6", label: "MultiSelect with renderOption", name: "multi-select", onChange: onChange, options: options, placeholder: "Vyberte...", renderOption: (option) => react_1.default.createElement(react_1.default.Fragment, null,
|
|
63
|
+
"Option: ",
|
|
64
|
+
option.label), value: value }),
|
|
65
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { id: "multi-select-disabled", isDisabled: true, label: "MultiSelect disabled", name: "multi-select-disabled", onChange: onChange, options: options, placeholder: "Vyberte...", renderOption: (option) => react_1.default.createElement(react_1.default.Fragment, null,
|
|
66
|
+
"Option: ",
|
|
67
|
+
option.label), value: value })));
|
|
68
|
+
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
69
|
+
react_1.default.createElement("div", { className: "space-y-2 p-20 lg:w-1/2" }, component)));
|
|
70
|
+
}
|
|
71
|
+
function ComponentStructure() {
|
|
72
|
+
const [value, onChange] = (0, react_1.useState)(null);
|
|
73
|
+
return (react_1.default.createElement(component_structure_analyzer_1.default, null,
|
|
74
|
+
react_1.default.createElement(multi_select_1.MultiSelect, { helperText: "Start typing to see options...", id: "multi-select-structure", label: "MultiSelect with helper text", name: "multi-select-structure", onChange: onChange, options: options, value: value })));
|
|
75
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"uxf-ui-multi-select": {
|
|
3
|
+
"all-options-selected": {
|
|
4
|
+
cs: string;
|
|
5
|
+
en: string;
|
|
6
|
+
sk: string;
|
|
7
|
+
de: string;
|
|
8
|
+
};
|
|
9
|
+
"no-options-message": {
|
|
10
|
+
cs: string;
|
|
11
|
+
en: string;
|
|
12
|
+
sk: string;
|
|
13
|
+
de: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
"uxf-ui-multi-select": {
|
|
5
|
+
"all-options-selected": {
|
|
6
|
+
cs: "Všechny možnosti jsou již vybrány",
|
|
7
|
+
en: "All options are already selected",
|
|
8
|
+
sk: "Všetky možnosti sú už vybrané",
|
|
9
|
+
de: "Alle Optionen sind bereits ausgewählt",
|
|
10
|
+
},
|
|
11
|
+
"no-options-message": {
|
|
12
|
+
cs: "Nabídka neosahuje žádné položky",
|
|
13
|
+
en: "No items found",
|
|
14
|
+
sk: "Ponuka neobsahuje žiadne položky",
|
|
15
|
+
de: "Keine Elemente gefunden",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Placement, Strategy } from "@floating-ui/react";
|
|
2
|
+
import { InputGroupSizes, InputGroupVariants } from "@uxf/ui/input/theme";
|
|
3
|
+
import { CSSProperties, ReactNode } from "react";
|
|
4
|
+
import { ChipColor } from "../chip";
|
|
5
|
+
import { IconsSet } from "../icon/theme";
|
|
6
|
+
import { FormControlProps } from "../types";
|
|
7
|
+
export type MultiSelectValueId = number | string;
|
|
8
|
+
export type MultiSelectOption<T = MultiSelectValueId> = {
|
|
9
|
+
color?: ChipColor;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
id: T;
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export interface MultiSelectProps<ValueId = MultiSelectValueId, Option = MultiSelectOption<ValueId>> extends FormControlProps<Option[] | null> {
|
|
15
|
+
allOptionsSelectedMessage?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
dropdownClassName?: string;
|
|
18
|
+
dropdownMatchesInputWidth?: boolean;
|
|
19
|
+
dropdownMaxHeight?: number;
|
|
20
|
+
dropdownPlacement?: Placement;
|
|
21
|
+
dropdownStrategy?: Strategy;
|
|
22
|
+
form?: string;
|
|
23
|
+
helperText?: ReactNode;
|
|
24
|
+
hiddenLabel?: boolean;
|
|
25
|
+
iconName?: keyof IconsSet;
|
|
26
|
+
id?: string;
|
|
27
|
+
inputArrow?: (open: boolean) => ReactNode;
|
|
28
|
+
keyExtractor?: (option: Option) => string | number;
|
|
29
|
+
label: ReactNode;
|
|
30
|
+
leftAddon?: ReactNode;
|
|
31
|
+
leftElement?: ReactNode;
|
|
32
|
+
noOptionsMessage?: string;
|
|
33
|
+
options: Option[];
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
renderOption?: (option: Option) => ReactNode;
|
|
36
|
+
rightAddon?: ReactNode;
|
|
37
|
+
rightElement?: ReactNode;
|
|
38
|
+
size?: keyof InputGroupSizes;
|
|
39
|
+
style?: CSSProperties;
|
|
40
|
+
variant?: keyof InputGroupVariants;
|
|
41
|
+
withCheckboxes?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export type MultiSelectTypeRef = HTMLDivElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/ui",
|
|
3
|
-
"version": "11.74.
|
|
3
|
+
"version": "11.74.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@floating-ui/react": "0.26.28",
|
|
25
25
|
"@headlessui/react": "1.7.19",
|
|
26
26
|
"@uxf/core": "11.72.3",
|
|
27
|
-
"@uxf/core-react": "11.74.
|
|
27
|
+
"@uxf/core-react": "11.74.1",
|
|
28
28
|
"@uxf/datepicker": "11.61.0",
|
|
29
29
|
"@uxf/styles": "11.72.3",
|
|
30
30
|
"color2k": "2.0.3",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pagination = void 0;
|
|
4
|
+
var pagination_1 = require("./pagination");
|
|
5
|
+
Object.defineProperty(exports, "Pagination", { enumerable: true, get: function () { return pagination_1.Pagination; } });
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PaginationSizes } from "@uxf/ui/pagination/theme";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
export interface PaginationProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
count: number;
|
|
6
|
+
onPageChange: (index: number) => void;
|
|
7
|
+
page: number;
|
|
8
|
+
showFirstButton?: boolean;
|
|
9
|
+
showLastButton?: boolean;
|
|
10
|
+
size?: keyof PaginationSizes;
|
|
11
|
+
}
|
|
12
|
+
export declare const Pagination: FC<PaginationProps>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Pagination = void 0;
|
|
8
|
+
const show_1 = require("@uxf/core-react/components/show");
|
|
9
|
+
const use_pagination_1 = require("@uxf/core-react/hooks/use-pagination");
|
|
10
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
11
|
+
const react_1 = __importDefault(require("react"));
|
|
12
|
+
const icon_1 = require("../icon");
|
|
13
|
+
const Pagination = (props) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const isCurrentPageFirst = props.page === 1;
|
|
16
|
+
const isCurrentPageLast = props.page === props.count;
|
|
17
|
+
const className = (0, cx_1.cx)("uxf-pagination", `uxf-pagination--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.className);
|
|
18
|
+
const pagination = (0, use_pagination_1.usePagination)({
|
|
19
|
+
count: props.count,
|
|
20
|
+
page: props.page,
|
|
21
|
+
showFirstButton: props.showFirstButton,
|
|
22
|
+
showLastButton: props.showLastButton,
|
|
23
|
+
});
|
|
24
|
+
const onClick = (item) => {
|
|
25
|
+
if (typeof item === "number") {
|
|
26
|
+
return props.onPageChange(item);
|
|
27
|
+
}
|
|
28
|
+
switch (item) {
|
|
29
|
+
case "first":
|
|
30
|
+
return props.onPageChange(1);
|
|
31
|
+
case "previous":
|
|
32
|
+
return props.onPageChange(props.page - 1);
|
|
33
|
+
case "next":
|
|
34
|
+
return props.onPageChange(props.page + 1);
|
|
35
|
+
case "last":
|
|
36
|
+
return props.onPageChange(props.count);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return (react_1.default.createElement("nav", { className: className }, pagination.map((item, index) => {
|
|
40
|
+
const isDisabled = ((item === "first" || item === "previous") && isCurrentPageFirst) ||
|
|
41
|
+
((item === "last" || item === "next") && isCurrentPageLast);
|
|
42
|
+
return (
|
|
43
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
44
|
+
react_1.default.createElement("a", { className: (0, cx_1.cx)("uxf-pagination__button", isDisabled && "is-disabled", (item === "start-ellipsis" || item === "end-ellipsis") && "is-ellipsis", item === props.page && "is-selected", index === 0 && "is-go-to-first", index === pagination.length - 1 && "is-go-to-last", item === "next" && "is-next", item === "previous" && "is-previous", typeof item === "number" && "is-number"), key: item, onClick: isDisabled ? undefined : () => onClick(item) },
|
|
45
|
+
react_1.default.createElement(show_1.Show, { when: item === "first" },
|
|
46
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "First"),
|
|
47
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronsLeft", size: 12 })),
|
|
48
|
+
react_1.default.createElement(show_1.Show, { when: item === "previous" },
|
|
49
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Previous"),
|
|
50
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronLeft", size: 12 })),
|
|
51
|
+
react_1.default.createElement(show_1.Show, { when: item === "start-ellipsis" || item === "end-ellipsis" }, "\u2026"),
|
|
52
|
+
react_1.default.createElement(show_1.Show, { when: typeof item === "number" }, item),
|
|
53
|
+
react_1.default.createElement(show_1.Show, { when: item === "next" },
|
|
54
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Next"),
|
|
55
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronRight", size: 12 })),
|
|
56
|
+
react_1.default.createElement(show_1.Show, { when: item === "last" },
|
|
57
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Last"),
|
|
58
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronsRight", size: 12 }))));
|
|
59
|
+
})));
|
|
60
|
+
};
|
|
61
|
+
exports.Pagination = Pagination;
|
|
62
|
+
exports.Pagination.displayName = "UxfUiPagination";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
+
const pagination_stories_1 = require("./pagination.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(pagination_stories_1.Default, null));
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Default = Default;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const action_1 = require("../utils/action");
|
|
29
|
+
const pagination_1 = require("./pagination");
|
|
30
|
+
function Default() {
|
|
31
|
+
const [page, setPage] = (0, react_1.useState)(1);
|
|
32
|
+
const onPageChange = (0, action_1.action)("onPageChange", setPage);
|
|
33
|
+
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
34
|
+
react_1.default.createElement("div", { className: "space-y-2 p-20 lg:w-1/2" },
|
|
35
|
+
react_1.default.createElement(pagination_1.Pagination, { count: 10, onPageChange: onPageChange, page: page, size: "xs" }),
|
|
36
|
+
react_1.default.createElement(pagination_1.Pagination, { count: 10, onPageChange: onPageChange, page: page, size: "sm" }),
|
|
37
|
+
react_1.default.createElement(pagination_1.Pagination, { count: 10, onPageChange: onPageChange, page: page, size: "default" }),
|
|
38
|
+
react_1.default.createElement(pagination_1.Pagination, { count: 10, onPageChange: onPageChange, page: page, size: "lg" }),
|
|
39
|
+
react_1.default.createElement(pagination_1.Pagination, { count: 10, onPageChange: onPageChange, page: page, size: "xl" }))));
|
|
40
|
+
}
|
package/paper/index.d.ts
ADDED
package/paper/index.js
ADDED
package/paper/paper.d.ts
ADDED
package/paper/paper.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
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.Paper = void 0;
|
|
27
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
exports.Paper = (0, react_1.forwardRef)((props, ref) => {
|
|
30
|
+
const paperClassName = (0, cx_1.cx)("uxf-paper", props.className);
|
|
31
|
+
return (react_1.default.createElement("div", { className: paperClassName, ref: ref }, props.children));
|
|
32
|
+
});
|
|
33
|
+
exports.Paper.displayName = "UxfUiPaper";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
+
const paper_stories_1 = require("./paper.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(paper_stories_1.Default, null));
|
|
@@ -0,0 +1,13 @@
|
|
|
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.Default = Default;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const paper_1 = require("./paper");
|
|
9
|
+
function Default() {
|
|
10
|
+
return (react_1.default.createElement("div", { className: "flex items-center justify-center bg-gray-100" },
|
|
11
|
+
react_1.default.createElement(paper_1.Paper, null,
|
|
12
|
+
react_1.default.createElement("div", { className: "flex items-center justify-center p-24" }, "Paper default"))));
|
|
13
|
+
}
|
package/radio/index.d.ts
ADDED
package/radio/index.js
ADDED
package/radio/radio.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RadioSize } from "@uxf/ui/radio/theme";
|
|
2
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
3
|
+
import { FormControlProps } from "../types";
|
|
4
|
+
export interface RadioProps<ValueType = string | number> extends Omit<FormControlProps<ValueType>, "onChange"> {
|
|
5
|
+
checked: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onChange?: (value: ValueType) => void;
|
|
8
|
+
renderContent?: (className: string, checked: boolean | undefined, value: ValueType) => ReactNode;
|
|
9
|
+
size?: RadioSize;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps<string | number> & React.RefAttributes<HTMLDivElement>>;
|
package/radio/radio.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Radio = void 0;
|
|
28
|
+
const use_clickable_props_1 = require("@uxf/core-react/clickable/use-clickable-props");
|
|
29
|
+
const classes_1 = require("@uxf/core/constants/classes");
|
|
30
|
+
const cx_1 = require("@uxf/core/utils/cx");
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
exports.Radio = (0, react_1.forwardRef)((props, ref) => {
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
const onChange = props.onChange;
|
|
35
|
+
const onClick = onChange ? () => onChange(props.value) : undefined;
|
|
36
|
+
const clickableProps = (0, use_clickable_props_1.useClickableProps)({
|
|
37
|
+
"aria-checked": props.checked,
|
|
38
|
+
"aria-disabled": props.isDisabled,
|
|
39
|
+
"aria-invalid": props.isInvalid,
|
|
40
|
+
"aria-readonly": props.isReadOnly,
|
|
41
|
+
"aria-required": props.isRequired,
|
|
42
|
+
className: (0, cx_1.cx)("uxf-radio", `uxf-radio--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isFocused && classes_1.CLASSES.IS_FOCUSED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.checked && classes_1.CLASSES.IS_SELECTED, props.className),
|
|
43
|
+
onBlur: props.onBlur,
|
|
44
|
+
onClick,
|
|
45
|
+
onFocus: props.onFocus,
|
|
46
|
+
role: "radio",
|
|
47
|
+
style: props.style,
|
|
48
|
+
tabIndex: props.isReadOnly ? -1 : undefined,
|
|
49
|
+
});
|
|
50
|
+
const innerClassName = "uxf-radio__inner";
|
|
51
|
+
return (react_1.default.createElement("span", { ...clickableProps, ref: ref }, (_c = (_b = props.renderContent) === null || _b === void 0 ? void 0 : _b.call(props, innerClassName, props.checked, props.value)) !== null && _c !== void 0 ? _c : react_1.default.createElement("span", { className: innerClassName })));
|
|
52
|
+
});
|
|
53
|
+
exports.Radio.displayName = "UxfUiRadio";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
+
const radio_stories_1 = require("./radio.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(radio_stories_1.Default, null));
|
|
@@ -0,0 +1,29 @@
|
|
|
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.Default = Default;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const index_1 = require("./index");
|
|
9
|
+
function Default() {
|
|
10
|
+
const radios = (react_1.default.createElement("div", { className: "dark:text-white" },
|
|
11
|
+
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Default"),
|
|
12
|
+
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
13
|
+
react_1.default.createElement(index_1.Radio, { checked: false, name: "radio-1", value: 1 }),
|
|
14
|
+
react_1.default.createElement(index_1.Radio, { checked: true, name: "radio-2", value: 2 })),
|
|
15
|
+
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Invalid"),
|
|
16
|
+
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
17
|
+
react_1.default.createElement(index_1.Radio, { checked: false, isInvalid: true, name: "radio-invalid-1", value: 1 }),
|
|
18
|
+
react_1.default.createElement(index_1.Radio, { checked: true, isInvalid: true, name: "radio-invalid-2", value: 2 })),
|
|
19
|
+
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "Disabled"),
|
|
20
|
+
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
21
|
+
react_1.default.createElement(index_1.Radio, { checked: false, isDisabled: true, name: "radio-disabled-1", value: 1 }),
|
|
22
|
+
react_1.default.createElement(index_1.Radio, { checked: true, isDisabled: true, name: "radio-disabled-2", value: 2 })),
|
|
23
|
+
react_1.default.createElement("div", { className: "mb-2 mt-4 font-semibold" }, "size lg"),
|
|
24
|
+
react_1.default.createElement("div", { className: "flex flex-row gap-4" },
|
|
25
|
+
react_1.default.createElement(index_1.Radio, { checked: false, name: "radio-size-lg-1", size: "lg", value: 1 }),
|
|
26
|
+
react_1.default.createElement(index_1.Radio, { checked: true, name: "radio-size-lg-2", size: "lg", value: 2 }))));
|
|
27
|
+
return (react_1.default.createElement("div", { className: "flex" },
|
|
28
|
+
react_1.default.createElement("div", { className: "p-20" }, radios)));
|
|
29
|
+
}
|
package/radio/theme.d.ts
ADDED
package/radio/theme.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RadioGroup = void 0;
|
|
4
|
+
var radio_group_1 = require("./radio-group");
|
|
5
|
+
Object.defineProperty(exports, "RadioGroup", { enumerable: true, get: function () { return radio_group_1.RadioGroup; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RadioSize } from "@uxf/ui/radio";
|
|
2
|
+
import { RadioGroupVariant } from "@uxf/ui/radio-group/theme";
|
|
3
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
4
|
+
import { FormControlProps } from "../types";
|
|
5
|
+
export type RadioGroupOptionValueId = string | number;
|
|
6
|
+
export interface RadioGroupOption {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
id: RadioGroupOptionValueId;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface RadioGroupProps extends FormControlProps<RadioGroupOptionValueId | null> {
|
|
12
|
+
className?: string;
|
|
13
|
+
helperText?: ReactNode;
|
|
14
|
+
forceColumn?: boolean;
|
|
15
|
+
hiddenLabel?: boolean;
|
|
16
|
+
id?: string;
|
|
17
|
+
label: string;
|
|
18
|
+
options: RadioGroupOption[];
|
|
19
|
+
radioSize?: RadioSize;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
variant?: RadioGroupVariant;
|
|
22
|
+
}
|
|
23
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLLabelElement>>;
|