@festo-ui/react 9.0.0-dev.711 → 9.0.0-dev.713
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/index.css +1 -0
- package/index.d.ts +65 -0
- package/index.js +60 -0
- package/lib/components/accordion/Accordion.d.ts +11 -0
- package/lib/components/accordion/Accordion.js +43 -0
- package/{dist → lib}/components/accordion/AccordionContext.d.ts +2 -2
- package/lib/components/accordion/AccordionContext.js +3 -0
- package/lib/components/accordion/accordion-header/AccordionHeader.d.ts +3 -0
- package/lib/components/accordion/accordion-header/AccordionHeader.js +17 -0
- package/lib/components/accordion/accordion-item/AccordionItem.d.ts +9 -0
- package/lib/components/accordion/accordion-item/AccordionItem.js +65 -0
- package/{dist → lib}/components/accordion/accordion-item/AccordionItemContext.d.ts +2 -2
- package/lib/components/accordion/accordion-item/AccordionItemContext.js +3 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +3 -0
- package/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +70 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +3 -0
- package/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +41 -0
- package/lib/components/bottom-sheet/BottomSheet.d.ts +11 -0
- package/lib/components/bottom-sheet/BottomSheet.js +93 -0
- package/lib/components/bottom-sheet/BottomSheet.stories.d.ts +9 -0
- package/lib/components/bottom-sheet/BottomSheet.stories.js +49 -0
- package/{dist → lib}/components/breadcrumb/Breadcrumb.d.ts +4 -3
- package/lib/components/breadcrumb/Breadcrumb.js +40 -0
- package/lib/components/buttons/button/Button.d.ts +12 -0
- package/lib/components/buttons/button/Button.js +49 -0
- package/lib/components/buttons/button/Button.stories.d.ts +13 -0
- package/lib/components/buttons/button/Button.stories.js +86 -0
- package/lib/components/card/Card.d.ts +3 -0
- package/lib/components/card/Card.js +13 -0
- package/lib/components/card/CardBody.d.ts +6 -0
- package/lib/components/card/CardBody.js +17 -0
- package/lib/components/card/CardHeader.d.ts +9 -0
- package/lib/components/card/CardHeader.js +29 -0
- package/lib/components/card/CardHeader.stories.helper.d.ts +3 -0
- package/lib/components/card/CardHeader.stories.helper.js +9 -0
- package/lib/components/card/CardNotification.d.ts +7 -0
- package/lib/components/card/CardNotification.js +25 -0
- package/lib/components/chips/chip/Chip.d.ts +17 -0
- package/lib/components/chips/chip/Chip.js +47 -0
- package/lib/components/chips/chip-container/ChipContainer.d.ts +6 -0
- package/lib/components/chips/chip-container/ChipContainer.js +17 -0
- package/{dist → lib}/components/icon-wrapper/IconWrapper.d.ts +1 -1
- package/lib/components/icon-wrapper/IconWrapper.js +17 -0
- package/lib/components/link-button/LinkButton.d.ts +9 -0
- package/lib/components/link-button/LinkButton.js +32 -0
- package/lib/components/loading-indicator/LoadingIndicator.d.ts +7 -0
- package/lib/components/loading-indicator/LoadingIndicator.js +39 -0
- package/lib/components/mobile-flyout/MobileFlyout.d.ts +12 -0
- package/lib/components/mobile-flyout/MobileFlyout.js +82 -0
- package/{dist → lib}/components/mobile-flyout/MobileFlyoutContext.d.ts +2 -2
- package/lib/components/mobile-flyout/MobileFlyoutContext.js +2 -0
- package/lib/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +17 -0
- package/lib/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +53 -0
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +8 -0
- package/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +46 -0
- package/lib/components/modals/AlertModal.d.ts +13 -0
- package/lib/components/modals/AlertModal.js +60 -0
- package/lib/components/modals/ConfirmModal.d.ts +12 -0
- package/lib/components/modals/ConfirmModal.js +52 -0
- package/lib/components/modals/CustomModal.d.ts +9 -0
- package/lib/components/modals/CustomModal.js +41 -0
- package/lib/components/modals/Modal.d.ts +9 -0
- package/lib/components/modals/Modal.js +34 -0
- package/lib/components/modals/ModalBase.d.ts +10 -0
- package/lib/components/modals/ModalBase.js +142 -0
- package/lib/components/modals/ModalFooter.d.ts +3 -0
- package/lib/components/modals/ModalFooter.js +18 -0
- package/{dist → lib}/components/modals/Prompt.d.ts +5 -4
- package/lib/components/modals/Prompt.js +64 -0
- package/{dist → lib}/components/modals/image-gallery/ImageGallery.d.ts +7 -6
- package/lib/components/modals/image-gallery/ImageGallery.helper.d.ts +3 -0
- package/lib/components/modals/image-gallery/ImageGallery.helper.js +11 -0
- package/lib/components/modals/image-gallery/ImageGallery.js +81 -0
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.d.ts +3 -0
- package/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +97 -0
- package/{dist → lib}/components/modals/image-gallery/ImageGalleryContent.d.ts +1 -1
- package/lib/components/modals/image-gallery/ImageGalleryContent.js +14 -0
- package/{dist → lib}/components/modals/image-gallery/ImageGalleryContext.d.ts +3 -3
- package/lib/components/modals/image-gallery/ImageGalleryContext.js +4 -0
- package/lib/components/modals/image-gallery/ImageGallerySwiper.d.ts +8 -0
- package/lib/components/modals/image-gallery/ImageGallerySwiper.js +32 -0
- package/lib/components/modals/image-gallery/ImageGalleryThumbsSwiper.d.ts +5 -0
- package/lib/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +25 -0
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +11 -0
- package/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +28 -0
- package/lib/components/modals/image-gallery/internal/BaseGallery.d.ts +17 -0
- package/lib/components/modals/image-gallery/internal/BaseGallery.js +65 -0
- package/{dist → lib}/components/modals/image-gallery/internal/CloseButton.d.ts +1 -1
- package/lib/components/modals/image-gallery/internal/CloseButton.js +17 -0
- package/lib/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +6 -0
- package/lib/components/modals/image-gallery/internal/ImageGalleryContainer.js +13 -0
- package/{dist → lib}/components/modals/image-gallery/internal/ImageGalleryPagination.d.ts +3 -2
- package/lib/components/modals/image-gallery/internal/ImageGalleryPagination.js +27 -0
- package/lib/components/modals/image-gallery/internal/ScaleButton.d.ts +5 -0
- package/lib/components/modals/image-gallery/internal/ScaleButton.js +19 -0
- package/lib/components/pagination/Pagination.d.ts +16 -0
- package/lib/components/pagination/Pagination.js +105 -0
- package/lib/components/popovers/legend/Legend.d.ts +11 -0
- package/lib/components/popovers/legend/Legend.js +24 -0
- package/{dist → lib}/components/popovers/popover/Popover.d.ts +6 -5
- package/lib/components/popovers/popover/Popover.js +123 -0
- package/lib/components/popovers/popover-menu/PopoverMenu.d.ts +9 -0
- package/lib/components/popovers/popover-menu/PopoverMenu.js +46 -0
- package/lib/components/popovers/popover-menu/PopoverMenuContext.d.ts +4 -0
- package/lib/components/popovers/popover-menu/PopoverMenuContext.js +5 -0
- package/{dist → lib}/components/popovers/popover-menu-item/PopoverMenuItem.d.ts +3 -2
- package/lib/components/popovers/popover-menu-item/PopoverMenuItem.js +41 -0
- package/lib/components/popovers/tooltip/Tooltip.d.ts +6 -0
- package/lib/components/popovers/tooltip/Tooltip.js +16 -0
- package/lib/components/progress/Progress.d.ts +8 -0
- package/lib/components/progress/Progress.js +32 -0
- package/lib/components/scroll-area/ScrollArea.d.ts +5 -0
- package/lib/components/scroll-area/ScrollArea.js +14 -0
- package/lib/components/search-input/ClearButton.d.ts +2 -0
- package/lib/components/search-input/ClearButton.js +10 -0
- package/lib/components/search-input/SearchInput.d.ts +15 -0
- package/lib/components/search-input/SearchInput.js +77 -0
- package/{dist → lib}/components/search-input/SearchSuggestion.d.ts +1 -1
- package/lib/components/search-input/SearchSuggestion.js +32 -0
- package/{dist → lib}/components/search-input/useSearchInput.d.ts +3 -3
- package/lib/components/search-input/useSearchInput.js +94 -0
- package/{dist → lib}/components/snackbar/Snackbar.d.ts +6 -5
- package/lib/components/snackbar/Snackbar.js +78 -0
- package/{dist → lib}/components/snackbar/SnackbarContext.d.ts +4 -3
- package/lib/components/snackbar/SnackbarContext.js +2 -0
- package/lib/components/snackbar/SnackbarProvider.d.ts +8 -0
- package/lib/components/snackbar/SnackbarProvider.js +65 -0
- package/lib/components/snackbar/useSnackbar.d.ts +3 -0
- package/lib/components/snackbar/useSnackbar.js +3 -0
- package/lib/components/stepper-horizontal/StepperHorizontal.d.ts +7 -0
- package/lib/components/stepper-horizontal/StepperHorizontal.js +60 -0
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +7 -0
- package/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +23 -0
- package/lib/components/stepper-vertical/StepperVertical.d.ts +7 -0
- package/lib/components/stepper-vertical/StepperVertical.js +37 -0
- package/lib/components/stepper-vertical/step-vertical/StepVertical.d.ts +12 -0
- package/lib/components/stepper-vertical/step-vertical/StepVertical.js +76 -0
- package/lib/components/tab/Tabs.d.ts +23 -0
- package/lib/components/tab/Tabs.js +229 -0
- package/lib/components/tab/interfaces.js +1 -0
- package/lib/components/tab/tab-pane/TabPane.d.ts +10 -0
- package/lib/components/tab/tab-pane/TabPane.js +23 -0
- package/{dist → lib}/components/tab/useTabScroll.d.ts +3 -4
- package/lib/components/tab/useTabScroll.js +233 -0
- package/lib/components/table-header-cell/TableHeaderCell.d.ts +6 -0
- package/lib/components/table-header-cell/TableHeaderCell.js +29 -0
- package/lib/forms/checkbox/Checkbox.d.ts +17 -0
- package/lib/forms/checkbox/Checkbox.js +86 -0
- package/{dist → lib}/forms/radio/RadioButton.d.ts +4 -3
- package/lib/forms/radio/RadioButton.js +85 -0
- package/lib/forms/radio/RadioGroup.d.ts +13 -0
- package/lib/forms/radio/RadioGroup.js +51 -0
- package/{dist → lib}/forms/radio/RadioGroupContext.d.ts +3 -3
- package/lib/forms/radio/RadioGroupContext.js +3 -0
- package/lib/forms/segment/Segment.d.ts +14 -0
- package/lib/forms/segment/Segment.js +76 -0
- package/{dist → lib}/forms/segment/segment-control/SegmentControl.d.ts +4 -3
- package/lib/forms/segment/segment-control/SegmentControl.js +59 -0
- package/{dist → lib}/forms/select/Select.d.ts +8 -8
- package/lib/forms/select/Select.js +108 -0
- package/lib/forms/select/internal/HiddenInput.d.ts +8 -0
- package/lib/forms/select/internal/HiddenInput.js +26 -0
- package/{dist → lib}/forms/select/internal/ListItem.d.ts +6 -6
- package/lib/forms/select/internal/ListItem.js +84 -0
- package/{dist → lib}/forms/select/internal/SelectButton.d.ts +2 -2
- package/lib/forms/select/internal/SelectButton.js +57 -0
- package/{dist → lib}/forms/select/internal/SelectButtonContent.d.ts +1 -1
- package/lib/forms/select/internal/SelectButtonContent.js +38 -0
- package/lib/forms/select/internal/SelectCheckbox.d.ts +4 -0
- package/lib/forms/select/internal/SelectCheckbox.js +19 -0
- package/{dist → lib}/forms/select/internal/SelectLabel.d.ts +1 -1
- package/lib/forms/select/internal/SelectLabel.js +16 -0
- package/{dist → lib}/forms/select/internal/SelectOptionsContainer.d.ts +6 -6
- package/lib/forms/select/internal/SelectOptionsContainer.js +102 -0
- package/{dist → lib}/forms/select/internal/SelectScrollContainer.d.ts +2 -2
- package/lib/forms/select/internal/SelectScrollContainer.js +21 -0
- package/lib/forms/select/internal/SelectWrapper.d.ts +6 -0
- package/lib/forms/select/internal/SelectWrapper.js +20 -0
- package/lib/forms/select/internal/index.d.ts +6 -0
- package/lib/forms/select/internal/index.js +6 -0
- package/{dist → lib}/forms/select/internal/utils.d.ts +3 -3
- package/lib/forms/select/internal/utils.js +36 -0
- package/{dist → lib}/forms/select/select-option/SelectOption.d.ts +5 -5
- package/lib/forms/select/select-option/SelectOption.js +17 -0
- package/lib/forms/select/utils.d.ts +2 -0
- package/lib/forms/select/utils.js +17 -0
- package/lib/forms/slider/Slider.d.ts +18 -0
- package/lib/forms/slider/Slider.js +100 -0
- package/lib/forms/switch/Switch.d.ts +13 -0
- package/lib/forms/switch/Switch.js +51 -0
- package/{dist → lib}/forms/text-area/TextArea.d.ts +5 -4
- package/lib/forms/text-area/TextArea.js +109 -0
- package/{dist → lib}/forms/text-input/TextInput.d.ts +3 -2
- package/lib/forms/text-input/TextInput.js +91 -0
- package/{dist → lib}/forms/time-picker/TimePicker.d.ts +6 -6
- package/lib/forms/time-picker/TimePicker.js +159 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +19 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +212 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +9 -0
- package/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +23 -0
- package/{dist/utils → lib/helper}/index.d.ts +1 -0
- package/lib/helper/index.js +7 -0
- package/lib/helper/setRef.d.ts +1 -0
- package/lib/helper/setRef.js +7 -0
- package/{dist/utils → lib/helper}/types.d.ts +4 -4
- package/lib/helper/types.js +1 -0
- package/{dist/utils → lib/helper}/useControlled.d.ts +2 -2
- package/lib/helper/useControlled.js +22 -0
- package/lib/helper/useForkRef.d.ts +2 -0
- package/lib/helper/useForkRef.js +18 -0
- package/lib/helper/useId.d.ts +1 -0
- package/lib/helper/useId.js +22 -0
- package/lib/helper/useOnClickOutside.d.ts +2 -0
- package/lib/helper/useOnClickOutside.js +18 -0
- package/node/index.js +439 -0
- package/node/lib/components/accordion/Accordion.js +50 -0
- package/node/lib/components/accordion/AccordionContext.js +9 -0
- package/node/lib/components/accordion/accordion-header/AccordionHeader.js +24 -0
- package/node/lib/components/accordion/accordion-item/AccordionItem.js +72 -0
- package/node/lib/components/accordion/accordion-item/AccordionItemContext.js +9 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +77 -0
- package/node/lib/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +48 -0
- package/node/lib/components/bottom-sheet/BottomSheet.js +101 -0
- package/node/lib/components/bottom-sheet/BottomSheet.stories.js +56 -0
- package/node/lib/components/breadcrumb/Breadcrumb.js +47 -0
- package/node/lib/components/buttons/button/Button.js +56 -0
- package/node/lib/components/buttons/button/Button.stories.js +93 -0
- package/node/lib/components/card/Card.js +20 -0
- package/node/lib/components/card/CardBody.js +24 -0
- package/node/lib/components/card/CardHeader.js +36 -0
- package/node/lib/components/card/CardHeader.stories.helper.js +17 -0
- package/node/lib/components/card/CardNotification.js +32 -0
- package/node/lib/components/chips/chip/Chip.js +54 -0
- package/node/lib/components/chips/chip-container/ChipContainer.js +24 -0
- package/node/lib/components/icon-wrapper/IconWrapper.js +23 -0
- package/node/lib/components/link-button/LinkButton.js +39 -0
- package/node/lib/components/loading-indicator/LoadingIndicator.js +46 -0
- package/node/lib/components/mobile-flyout/MobileFlyout.js +89 -0
- package/node/lib/components/mobile-flyout/MobileFlyoutContext.js +8 -0
- package/node/lib/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +61 -0
- package/node/lib/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +53 -0
- package/node/lib/components/modals/AlertModal.js +67 -0
- package/node/lib/components/modals/ConfirmModal.js +59 -0
- package/node/lib/components/modals/CustomModal.js +48 -0
- package/node/lib/components/modals/Modal.js +43 -0
- package/node/lib/components/modals/ModalBase.js +149 -0
- package/node/lib/components/modals/ModalFooter.js +25 -0
- package/node/lib/components/modals/Prompt.js +73 -0
- package/node/lib/components/modals/image-gallery/ImageGallery.helper.js +18 -0
- package/node/lib/components/modals/image-gallery/ImageGallery.js +88 -0
- package/node/lib/components/modals/image-gallery/ImageGallery.stories.helper.js +123 -0
- package/node/lib/components/modals/image-gallery/ImageGalleryContent.js +20 -0
- package/node/lib/components/modals/image-gallery/ImageGalleryContext.js +10 -0
- package/node/lib/components/modals/image-gallery/ImageGallerySwiper.js +39 -0
- package/node/lib/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +33 -0
- package/node/lib/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +35 -0
- package/node/lib/components/modals/image-gallery/internal/BaseGallery.js +72 -0
- package/node/lib/components/modals/image-gallery/internal/CloseButton.js +24 -0
- package/node/lib/components/modals/image-gallery/internal/ImageGalleryContainer.js +19 -0
- package/node/lib/components/modals/image-gallery/internal/ImageGalleryPagination.js +33 -0
- package/node/lib/components/modals/image-gallery/internal/ScaleButton.js +25 -0
- package/node/lib/components/pagination/Pagination.js +114 -0
- package/node/lib/components/popovers/legend/Legend.js +31 -0
- package/node/lib/components/popovers/popover/Popover.js +132 -0
- package/node/lib/components/popovers/popover-menu/PopoverMenu.js +53 -0
- package/node/lib/components/popovers/popover-menu/PopoverMenuContext.js +11 -0
- package/node/lib/components/popovers/popover-menu-item/PopoverMenuItem.js +48 -0
- package/node/lib/components/popovers/tooltip/Tooltip.js +23 -0
- package/node/lib/components/progress/Progress.js +39 -0
- package/node/lib/components/scroll-area/ScrollArea.js +21 -0
- package/node/lib/components/search-input/ClearButton.js +16 -0
- package/node/lib/components/search-input/SearchInput.js +84 -0
- package/node/lib/components/search-input/SearchSuggestion.js +39 -0
- package/node/lib/components/search-input/useSearchInput.js +101 -0
- package/node/lib/components/snackbar/Snackbar.js +85 -0
- package/node/lib/components/snackbar/SnackbarContext.js +9 -0
- package/node/lib/components/snackbar/SnackbarProvider.js +73 -0
- package/node/lib/components/snackbar/useSnackbar.js +11 -0
- package/node/lib/components/stepper-horizontal/StepperHorizontal.js +69 -0
- package/node/lib/components/stepper-horizontal/step-horizontal/StepHorizontal.js +30 -0
- package/node/lib/components/stepper-vertical/StepperVertical.js +46 -0
- package/node/lib/components/stepper-vertical/step-vertical/StepVertical.js +83 -0
- package/node/lib/components/tab/Tabs.js +240 -0
- package/node/lib/components/tab/interfaces.js +5 -0
- package/node/lib/components/tab/tab-pane/TabPane.js +30 -0
- package/node/lib/components/tab/useTabScroll.js +238 -0
- package/node/lib/components/table-header-cell/TableHeaderCell.js +36 -0
- package/node/lib/forms/checkbox/Checkbox.js +93 -0
- package/node/lib/forms/radio/RadioButton.js +92 -0
- package/node/lib/forms/radio/RadioGroup.js +58 -0
- package/node/lib/forms/radio/RadioGroupContext.js +9 -0
- package/node/lib/forms/segment/Segment.js +83 -0
- package/node/lib/forms/segment/segment-control/SegmentControl.js +68 -0
- package/node/lib/forms/select/Select.js +115 -0
- package/node/lib/forms/select/internal/HiddenInput.js +32 -0
- package/node/lib/forms/select/internal/ListItem.js +93 -0
- package/node/lib/forms/select/internal/SelectButton.js +64 -0
- package/node/lib/forms/select/internal/SelectButtonContent.js +44 -0
- package/node/lib/forms/select/internal/SelectCheckbox.js +26 -0
- package/node/lib/forms/select/internal/SelectLabel.js +23 -0
- package/node/lib/forms/select/internal/SelectOptionsContainer.js +109 -0
- package/node/lib/forms/select/internal/SelectScrollContainer.js +28 -0
- package/node/lib/forms/select/internal/SelectWrapper.js +27 -0
- package/node/lib/forms/select/internal/index.js +48 -0
- package/node/lib/forms/select/internal/utils.js +43 -0
- package/node/lib/forms/select/select-option/SelectOption.js +23 -0
- package/node/lib/forms/select/utils.js +23 -0
- package/node/lib/forms/slider/Slider.js +109 -0
- package/node/lib/forms/switch/Switch.js +58 -0
- package/node/lib/forms/text-area/TextArea.js +118 -0
- package/node/lib/forms/text-input/TextInput.js +98 -0
- package/node/lib/forms/time-picker/TimePicker.js +166 -0
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +219 -0
- package/node/lib/forms/time-picker/time-picker-dropdown/TimePickerInput.js +29 -0
- package/node/lib/helper/index.js +14 -0
- package/node/lib/helper/setRef.js +13 -0
- package/node/lib/helper/types.js +5 -0
- package/node/lib/helper/useControlled.js +28 -0
- package/node/lib/helper/useForkRef.js +26 -0
- package/node/lib/helper/useId.js +28 -0
- package/node/lib/helper/useOnClickOutside.js +24 -0
- package/package.json +21 -64
- package/simplebar.min.css +1 -0
- package/README.md +0 -23
- package/dist/components/accordion/Accordion.css +0 -4
- package/dist/components/accordion/Accordion.d.ts +0 -10
- package/dist/components/accordion/Accordion.js +0 -41
- package/dist/components/accordion/AccordionContext.js +0 -3
- package/dist/components/accordion/accordion-header/AccordionHeader.css +0 -11
- package/dist/components/accordion/accordion-header/AccordionHeader.d.ts +0 -2
- package/dist/components/accordion/accordion-header/AccordionHeader.js +0 -11
- package/dist/components/accordion/accordion-item/AccordionItem.css +0 -64
- package/dist/components/accordion/accordion-item/AccordionItem.d.ts +0 -8
- package/dist/components/accordion/accordion-item/AccordionItem.js +0 -60
- package/dist/components/accordion/accordion-item/AccordionItemContext.js +0 -3
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.css +0 -76
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.d.ts +0 -2
- package/dist/components/accordion/accordion-item/accordion-item-body/AccordionItemBody.js +0 -61
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.css +0 -11
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.d.ts +0 -2
- package/dist/components/accordion/accordion-item/accordion-item-header/AccordionItemHeader.js +0 -20
- package/dist/components/bottom-sheet/BottomSheet.css +0 -18
- package/dist/components/bottom-sheet/BottomSheet.d.ts +0 -12
- package/dist/components/bottom-sheet/BottomSheet.js +0 -101
- package/dist/components/breadcrumb/Breadcrumb.js +0 -32
- package/dist/components/button/Button.d.ts +0 -11
- package/dist/components/button/Button.js +0 -36
- package/dist/components/card/Card.d.ts +0 -4
- package/dist/components/card/Card.js +0 -9
- package/dist/components/card/CardBody.d.ts +0 -5
- package/dist/components/card/CardBody.js +0 -15
- package/dist/components/card/CardHeader.d.ts +0 -8
- package/dist/components/card/CardHeader.js +0 -31
- package/dist/components/card/CardHeader.stories.helper.js +0 -7
- package/dist/components/card/CardNotification.d.ts +0 -6
- package/dist/components/card/CardNotification.js +0 -26
- package/dist/components/chips/chip/Chip.d.ts +0 -17
- package/dist/components/chips/chip/Chip.js +0 -38
- package/dist/components/chips/chip-container/ChipContainer.d.ts +0 -5
- package/dist/components/chips/chip-container/ChipContainer.js +0 -12
- package/dist/components/icon-wrapper/IconWrapper.js +0 -13
- package/dist/components/link-button/LinkButton.d.ts +0 -8
- package/dist/components/link-button/LinkButton.js +0 -26
- package/dist/components/loading-indicator/LoadingIndicator.d.ts +0 -5
- package/dist/components/loading-indicator/LoadingIndicator.js +0 -41
- package/dist/components/mobile-flyout/MobileFlyout.d.ts +0 -11
- package/dist/components/mobile-flyout/MobileFlyout.js +0 -88
- package/dist/components/mobile-flyout/MobileFlyoutContext.js +0 -3
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.d.ts +0 -17
- package/dist/components/mobile-flyout/mobile-flyout-item/MobileFlyoutItem.js +0 -36
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.css +0 -5
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.d.ts +0 -8
- package/dist/components/mobile-flyout/mobile-flyout-page/MobileFlyoutPage.js +0 -35
- package/dist/components/modals/AlertModal.d.ts +0 -12
- package/dist/components/modals/AlertModal.js +0 -53
- package/dist/components/modals/ConfirmModal.d.ts +0 -11
- package/dist/components/modals/ConfirmModal.js +0 -46
- package/dist/components/modals/CustomModal.d.ts +0 -8
- package/dist/components/modals/CustomModal.js +0 -38
- package/dist/components/modals/Modal.css +0 -39
- package/dist/components/modals/Modal.d.ts +0 -8
- package/dist/components/modals/Modal.js +0 -31
- package/dist/components/modals/ModalBase.d.ts +0 -9
- package/dist/components/modals/ModalBase.js +0 -124
- package/dist/components/modals/ModalFooter.d.ts +0 -2
- package/dist/components/modals/ModalFooter.js +0 -12
- package/dist/components/modals/Prompt.js +0 -58
- package/dist/components/modals/image-gallery/ImageGallery.css +0 -790
- package/dist/components/modals/image-gallery/ImageGallery.helper.d.ts +0 -2
- package/dist/components/modals/image-gallery/ImageGallery.helper.js +0 -13
- package/dist/components/modals/image-gallery/ImageGallery.js +0 -75
- package/dist/components/modals/image-gallery/ImageGallery.stories.helper.js +0 -112
- package/dist/components/modals/image-gallery/ImageGalleryContent.js +0 -15
- package/dist/components/modals/image-gallery/ImageGalleryContext.js +0 -4
- package/dist/components/modals/image-gallery/ImageGallerySwiper.d.ts +0 -8
- package/dist/components/modals/image-gallery/ImageGallerySwiper.js +0 -29
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.d.ts +0 -5
- package/dist/components/modals/image-gallery/ImageGalleryThumbsSwiper.js +0 -23
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.css +0 -10
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.d.ts +0 -11
- package/dist/components/modals/image-gallery/image-gallery-item/ImageGalleryItem.js +0 -24
- package/dist/components/modals/image-gallery/internal/BaseGallery.d.ts +0 -17
- package/dist/components/modals/image-gallery/internal/BaseGallery.js +0 -50
- package/dist/components/modals/image-gallery/internal/CloseButton.js +0 -14
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.d.ts +0 -5
- package/dist/components/modals/image-gallery/internal/ImageGalleryContainer.js +0 -8
- package/dist/components/modals/image-gallery/internal/ImageGalleryPagination.js +0 -29
- package/dist/components/modals/image-gallery/internal/ScaleButton.d.ts +0 -4
- package/dist/components/modals/image-gallery/internal/ScaleButton.js +0 -17
- package/dist/components/pagination/Pagination.css +0 -10
- package/dist/components/pagination/Pagination.d.ts +0 -15
- package/dist/components/pagination/Pagination.js +0 -100
- package/dist/components/popovers/legend/Legend.css +0 -21
- package/dist/components/popovers/legend/Legend.d.ts +0 -11
- package/dist/components/popovers/legend/Legend.js +0 -24
- package/dist/components/popovers/popover/Popover.css +0 -56
- package/dist/components/popovers/popover/Popover.js +0 -107
- package/dist/components/popovers/popover-menu/PopoverMenu.css +0 -20
- package/dist/components/popovers/popover-menu/PopoverMenu.d.ts +0 -8
- package/dist/components/popovers/popover-menu/PopoverMenu.js +0 -37
- package/dist/components/popovers/popover-menu/PopoverMenuContext.d.ts +0 -3
- package/dist/components/popovers/popover-menu/PopoverMenuContext.js +0 -5
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.css +0 -35
- package/dist/components/popovers/popover-menu-item/PopoverMenuItem.js +0 -30
- package/dist/components/popovers/tooltip/Tooltip.d.ts +0 -5
- package/dist/components/popovers/tooltip/Tooltip.js +0 -12
- package/dist/components/progress/Progress.d.ts +0 -7
- package/dist/components/progress/Progress.js +0 -26
- package/dist/components/scroll-area/ScrollArea.d.ts +0 -4
- package/dist/components/scroll-area/ScrollArea.js +0 -10
- package/dist/components/scroll-area/ScrollArea.stories.css +0 -9
- package/dist/components/search-input/ClearButton.d.ts +0 -2
- package/dist/components/search-input/ClearButton.js +0 -10
- package/dist/components/search-input/SearchInput.css +0 -13
- package/dist/components/search-input/SearchInput.d.ts +0 -14
- package/dist/components/search-input/SearchInput.js +0 -61
- package/dist/components/search-input/SearchSuggestion.js +0 -21
- package/dist/components/search-input/useSearchInput.js +0 -85
- package/dist/components/snackbar/Snackbar.css +0 -55
- package/dist/components/snackbar/Snackbar.js +0 -78
- package/dist/components/snackbar/SnackbarContext.js +0 -3
- package/dist/components/snackbar/SnackbarProvider.d.ts +0 -8
- package/dist/components/snackbar/SnackbarProvider.js +0 -66
- package/dist/components/snackbar/useSnackbar.d.ts +0 -2
- package/dist/components/snackbar/useSnackbar.js +0 -4
- package/dist/components/stepper-horizontal/StepperHorizontal.css +0 -6
- package/dist/components/stepper-horizontal/StepperHorizontal.d.ts +0 -7
- package/dist/components/stepper-horizontal/StepperHorizontal.js +0 -48
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.css +0 -24
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.d.ts +0 -6
- package/dist/components/stepper-horizontal/step-horizontal/StepHorizontal.js +0 -16
- package/dist/components/stepper-vertical/StepperVertical.d.ts +0 -6
- package/dist/components/stepper-vertical/StepperVertical.js +0 -26
- package/dist/components/stepper-vertical/step-vertical/StepVertical.css +0 -10
- package/dist/components/stepper-vertical/step-vertical/StepVertical.d.ts +0 -11
- package/dist/components/stepper-vertical/step-vertical/StepVertical.js +0 -58
- package/dist/components/tab/Tabs.css +0 -285
- package/dist/components/tab/Tabs.d.ts +0 -23
- package/dist/components/tab/Tabs.js +0 -194
- package/dist/components/tab/interfaces.js +0 -0
- package/dist/components/tab/tab-pane/TabPane.css +0 -8
- package/dist/components/tab/tab-pane/TabPane.d.ts +0 -9
- package/dist/components/tab/tab-pane/TabPane.js +0 -18
- package/dist/components/tab/useTabScroll.js +0 -151
- package/dist/components/table-header-cell/TableHeaderCell.d.ts +0 -5
- package/dist/components/table-header-cell/TableHeaderCell.js +0 -21
- package/dist/forms/checkbox/Checkbox.css +0 -134
- package/dist/forms/checkbox/Checkbox.d.ts +0 -15
- package/dist/forms/checkbox/Checkbox.js +0 -80
- package/dist/forms/radio/RadioButton.js +0 -61
- package/dist/forms/radio/RadioGroup.d.ts +0 -12
- package/dist/forms/radio/RadioGroup.js +0 -50
- package/dist/forms/radio/RadioGroupContext.js +0 -3
- package/dist/forms/segment/Segment.d.ts +0 -13
- package/dist/forms/segment/Segment.js +0 -59
- package/dist/forms/segment/segment-control/SegmentControl.js +0 -57
- package/dist/forms/select/Select.css +0 -160
- package/dist/forms/select/Select.js +0 -95
- package/dist/forms/select/internal/HiddenInput.d.ts +0 -8
- package/dist/forms/select/internal/HiddenInput.js +0 -15
- package/dist/forms/select/internal/ListItem.js +0 -69
- package/dist/forms/select/internal/SelectButton.js +0 -49
- package/dist/forms/select/internal/SelectButtonContent.js +0 -31
- package/dist/forms/select/internal/SelectCheckbox.d.ts +0 -4
- package/dist/forms/select/internal/SelectCheckbox.js +0 -13
- package/dist/forms/select/internal/SelectLabel.js +0 -12
- package/dist/forms/select/internal/SelectOptionsContainer.js +0 -103
- package/dist/forms/select/internal/SelectScrollContainer.js +0 -15
- package/dist/forms/select/internal/SelectWrapper.d.ts +0 -6
- package/dist/forms/select/internal/SelectWrapper.js +0 -12
- package/dist/forms/select/internal/index.d.ts +0 -6
- package/dist/forms/select/internal/index.js +0 -7
- package/dist/forms/select/internal/utils.js +0 -30
- package/dist/forms/select/select-option/SelectOption.js +0 -12
- package/dist/forms/select/utils.d.ts +0 -2
- package/dist/forms/select/utils.js +0 -12
- package/dist/forms/slider/Slider.css +0 -50
- package/dist/forms/slider/Slider.d.ts +0 -17
- package/dist/forms/slider/Slider.js +0 -93
- package/dist/forms/switch/Switch.d.ts +0 -12
- package/dist/forms/switch/Switch.js +0 -42
- package/dist/forms/text-area/TextArea.css +0 -14
- package/dist/forms/text-area/TextArea.js +0 -99
- package/dist/forms/text-input/TextInput.js +0 -74
- package/dist/forms/time-picker/TimePicker.css +0 -10
- package/dist/forms/time-picker/TimePicker.js +0 -140
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.css +0 -4
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.d.ts +0 -19
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerDropdown.js +0 -202
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.d.ts +0 -9
- package/dist/forms/time-picker/time-picker-dropdown/TimePickerInput.js +0 -14
- package/dist/index.d.ts +0 -63
- package/dist/index.js +0 -60
- package/dist/utils/index.js +0 -7
- package/dist/utils/setRef.d.ts +0 -1
- package/dist/utils/setRef.js +0 -5
- package/dist/utils/types.js +0 -0
- package/dist/utils/useControlled.js +0 -20
- package/dist/utils/useForkRef.d.ts +0 -2
- package/dist/utils/useForkRef.js +0 -15
- package/dist/utils/useId.d.ts +0 -1
- package/dist/utils/useId.js +0 -20
- package/dist/utils/useOnClickOutside.d.ts +0 -2
- package/dist/utils/useOnClickOutside.js +0 -20
- /package/{dist → lib}/components/tab/interfaces.d.ts +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React, { forwardRef, isValidElement, useEffect, useRef, useState } from "react";
|
|
3
|
+
import useForkRef from "../../helper/useForkRef.js";
|
|
4
|
+
import useTabScroll from "./useTabScroll.js";
|
|
5
|
+
import IconWrapper from "../icon-wrapper/IconWrapper.js"; // legacy: recommended for desktop only applications
|
|
6
|
+
// responsive: desktop, tablet, mobile with scrollable tabs
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
let nextId = 0;
|
|
9
|
+
const Tabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
|
+
let {
|
|
11
|
+
config,
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
onChange,
|
|
15
|
+
viewType = "responsive",
|
|
16
|
+
showDivider = false,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
19
|
+
const [useCompactDensity, setCompactDensity] = useState(true);
|
|
20
|
+
const componentId = useRef(`tabs-${++nextId}`);
|
|
21
|
+
const elRef = useRef(null);
|
|
22
|
+
const combinedRef = useForkRef(ref, elRef);
|
|
23
|
+
const scrollContent = useRef(null);
|
|
24
|
+
const scrollArea = useRef(null);
|
|
25
|
+
const observer = useRef(null);
|
|
26
|
+
let activeId = "";
|
|
27
|
+
React.Children.forEach(children, (element, i) => {
|
|
28
|
+
if (/*#__PURE__*/React.isValidElement(element)) {
|
|
29
|
+
if (activeId === "") {
|
|
30
|
+
activeId = `${componentId.current}-tab-panel-${i}`;
|
|
31
|
+
} else if (element.props.active) {
|
|
32
|
+
activeId = `${componentId.current}-tab-panel-${i}`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const [currentId, setId] = useState(activeId);
|
|
37
|
+
const innerChildren = React.Children.map(children, (element, i) => {
|
|
38
|
+
if (/*#__PURE__*/isValidElement(element)) {
|
|
39
|
+
const newId = `${componentId.current}-tab-panel-${i}`;
|
|
40
|
+
return /*#__PURE__*/React.cloneElement(element, {
|
|
41
|
+
isVisible: newId === currentId,
|
|
42
|
+
active: newId === currentId,
|
|
43
|
+
id: newId,
|
|
44
|
+
tabId: `${componentId.current}-tab-${i}`,
|
|
45
|
+
...element.props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
49
|
+
});
|
|
50
|
+
const [handleTabScroll, classes, style] = useTabScroll(innerChildren?.length ?? 0, componentId.current, {
|
|
51
|
+
elRef,
|
|
52
|
+
scrollContent,
|
|
53
|
+
scrollArea
|
|
54
|
+
});
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const {
|
|
57
|
+
current
|
|
58
|
+
} = scrollArea;
|
|
59
|
+
if (current) {
|
|
60
|
+
const initialWidth = current.offsetWidth;
|
|
61
|
+
if (initialWidth > 768) {
|
|
62
|
+
setCompactDensity(false);
|
|
63
|
+
}
|
|
64
|
+
observer.current = new ResizeObserver(() => {
|
|
65
|
+
const width = current.offsetWidth;
|
|
66
|
+
if (width > 768 && useCompactDensity) {
|
|
67
|
+
setCompactDensity(false);
|
|
68
|
+
} else if (width <= 768 && !useCompactDensity) {
|
|
69
|
+
setCompactDensity(true);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
if (current) {
|
|
73
|
+
observer.current.observe(current);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return () => {
|
|
77
|
+
if (current && observer && observer.current) {
|
|
78
|
+
observer.current.unobserve(current);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}, [useCompactDensity]);
|
|
82
|
+
const showTabPane = id => {
|
|
83
|
+
if (id === undefined || id === null) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (onChange) {
|
|
87
|
+
onChange({
|
|
88
|
+
previous: currentId,
|
|
89
|
+
current: id
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
setId(id);
|
|
93
|
+
};
|
|
94
|
+
function handleClick(e, index, id) {
|
|
95
|
+
handleTabScroll(e, index);
|
|
96
|
+
if (id !== undefined) {
|
|
97
|
+
showTabPane(id);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return (
|
|
101
|
+
/*#__PURE__*/
|
|
102
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
103
|
+
_jsx(_Fragment, {
|
|
104
|
+
children: viewType === "legacy" ? /*#__PURE__*/_jsxs("div", {
|
|
105
|
+
className: classNames("fwe-legacy-tabs", className),
|
|
106
|
+
children: [/*#__PURE__*/_jsx("ul", {
|
|
107
|
+
role: "tablist",
|
|
108
|
+
className: classNames("fwe-legacy-tab-bar", {
|
|
109
|
+
"fwe-legacy-tab-bar-full-width": config?.tabBar?.fullWidth
|
|
110
|
+
}, {
|
|
111
|
+
"fwe-legacy-tab-items-equal-width": config?.tabItems?.appearance === "equal"
|
|
112
|
+
}, {
|
|
113
|
+
"fwe-legacy-tab-items-fill": config?.tabItems?.appearance === "fill"
|
|
114
|
+
}),
|
|
115
|
+
children: innerChildren && innerChildren.map((child, i) => {
|
|
116
|
+
const {
|
|
117
|
+
active,
|
|
118
|
+
icon,
|
|
119
|
+
name,
|
|
120
|
+
id,
|
|
121
|
+
tabId
|
|
122
|
+
} = child.props;
|
|
123
|
+
return (
|
|
124
|
+
/*#__PURE__*/
|
|
125
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
126
|
+
_jsx("li", {
|
|
127
|
+
className: classNames("fwe-legacy-tab-item", {
|
|
128
|
+
"fwe-active": active
|
|
129
|
+
}),
|
|
130
|
+
onClick: () => showTabPane(id),
|
|
131
|
+
children: icon ?
|
|
132
|
+
/*#__PURE__*/
|
|
133
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
134
|
+
_jsxs("a", {
|
|
135
|
+
id: tabId,
|
|
136
|
+
className: classNames("fwe-legacy-tab-link", {
|
|
137
|
+
"fwe-can-swap-icon": innerChildren.length === 2 && i === 1
|
|
138
|
+
}),
|
|
139
|
+
role: "tab",
|
|
140
|
+
"aria-controls": id,
|
|
141
|
+
"aria-selected": active,
|
|
142
|
+
children: [/*#__PURE__*/_jsx(IconWrapper, {
|
|
143
|
+
icon: icon
|
|
144
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
145
|
+
children: name
|
|
146
|
+
})]
|
|
147
|
+
}) :
|
|
148
|
+
/*#__PURE__*/
|
|
149
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
|
150
|
+
_jsx("a", {
|
|
151
|
+
id: tabId,
|
|
152
|
+
className: "fwe-legacy-tab-link",
|
|
153
|
+
role: "tab",
|
|
154
|
+
"aria-controls": id,
|
|
155
|
+
"aria-selected": active,
|
|
156
|
+
children: name
|
|
157
|
+
})
|
|
158
|
+
}, tabId)
|
|
159
|
+
);
|
|
160
|
+
})
|
|
161
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
162
|
+
className: "fwe-legacy-tab-panel-content",
|
|
163
|
+
children: innerChildren
|
|
164
|
+
})]
|
|
165
|
+
}) : /*#__PURE__*/_jsxs("div", {
|
|
166
|
+
className: "fr-tab-bar",
|
|
167
|
+
role: "tablist",
|
|
168
|
+
ref: combinedRef,
|
|
169
|
+
...props,
|
|
170
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
171
|
+
className: classNames("fr-tab-scroller", classes),
|
|
172
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
173
|
+
className: classNames("fr-tab-scroller-scroll-area fr-tab-scroller-scroll-area--scroll", {
|
|
174
|
+
"fr-tab-scroller-scroll-area--compact": useCompactDensity
|
|
175
|
+
}),
|
|
176
|
+
ref: scrollArea,
|
|
177
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
178
|
+
className: classNames("fr-tab-scroller-scroll-content", {
|
|
179
|
+
"fr-tab-scroller-scroll-content--with-divider": showDivider
|
|
180
|
+
}),
|
|
181
|
+
ref: scrollContent,
|
|
182
|
+
style: style,
|
|
183
|
+
children: [innerChildren && innerChildren.map((child, i) => {
|
|
184
|
+
const {
|
|
185
|
+
active,
|
|
186
|
+
name,
|
|
187
|
+
id,
|
|
188
|
+
tabId
|
|
189
|
+
} = child.props;
|
|
190
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
191
|
+
type: "button",
|
|
192
|
+
role: "tab",
|
|
193
|
+
className: classNames("fr-tab", {
|
|
194
|
+
"fr-tab--active": active
|
|
195
|
+
}),
|
|
196
|
+
id: tabId,
|
|
197
|
+
"aria-controls": id,
|
|
198
|
+
"aria-selected": active,
|
|
199
|
+
tabIndex: i === 0 ? 0 : 1,
|
|
200
|
+
onClick: e => handleClick(e, i, id),
|
|
201
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
202
|
+
className: "fr-tab-content",
|
|
203
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
204
|
+
className: "fr-tab-text-label",
|
|
205
|
+
children: name
|
|
206
|
+
})
|
|
207
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
208
|
+
className: classNames("fr-tab-indicator", {
|
|
209
|
+
"fr-tab-indicator--active": active
|
|
210
|
+
}),
|
|
211
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
212
|
+
className: "fr-tab-indicator-content fr-tab-indicator-content--underline"
|
|
213
|
+
})
|
|
214
|
+
})]
|
|
215
|
+
}, tabId);
|
|
216
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
217
|
+
className: "fr-tab-scroller-divider-line"
|
|
218
|
+
})]
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
222
|
+
className: "fr-tab-panel-content",
|
|
223
|
+
children: innerChildren
|
|
224
|
+
})]
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
);
|
|
228
|
+
});
|
|
229
|
+
export default Tabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ClassNamePropsWithChildren } from "../../../helper/types";
|
|
2
|
+
import { Tab } from "../interfaces";
|
|
3
|
+
import "./TabPane.scss";
|
|
4
|
+
export interface TabPaneProps extends ClassNamePropsWithChildren, Tab {
|
|
5
|
+
id?: string;
|
|
6
|
+
isVisible?: boolean;
|
|
7
|
+
tabId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function TabPane({ isVisible, children, className, tabId, id }: TabPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default TabPane;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
function TabPane(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
isVisible = false,
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
tabId,
|
|
9
|
+
id
|
|
10
|
+
} = _ref;
|
|
11
|
+
const tabPaneClasses = classNames({
|
|
12
|
+
"fr-show": isVisible
|
|
13
|
+
}, {
|
|
14
|
+
"fr-hide": !isVisible
|
|
15
|
+
}, className);
|
|
16
|
+
return /*#__PURE__*/_jsx("div", {
|
|
17
|
+
id: id,
|
|
18
|
+
"aria-labelledby": tabId,
|
|
19
|
+
className: tabPaneClasses,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export default TabPane;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type CSSProperties } from 'react';
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
3
2
|
export interface TabDimensions {
|
|
4
3
|
rootLeft: number;
|
|
5
4
|
rootRight: number;
|
|
@@ -21,5 +20,5 @@ interface Refs {
|
|
|
21
20
|
scrollArea: React.MutableRefObject<HTMLDivElement | null>;
|
|
22
21
|
}
|
|
23
22
|
type TypeUseTabScroll = (tabLength: number, componentId: string, refs: Refs) => [TypeHandleTabScroll, string, CSSProperties];
|
|
24
|
-
|
|
25
|
-
export
|
|
23
|
+
declare const useTabScroll: TypeUseTabScroll;
|
|
24
|
+
export default useTabScroll;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
|
|
3
|
+
// provides details about the left and right edges of the tab element and the tab content element
|
|
4
|
+
// these values are used to determine the visual position of the tab with respect of its parent container
|
|
5
|
+
|
|
6
|
+
const useTabScroll = (tabLength, componentId, refs) => {
|
|
7
|
+
const {
|
|
8
|
+
elRef,
|
|
9
|
+
scrollContent,
|
|
10
|
+
scrollArea
|
|
11
|
+
} = refs;
|
|
12
|
+
const [style, setStyle] = useState({});
|
|
13
|
+
const [classes, setClasses] = useState("");
|
|
14
|
+
function getScrollContentStyleValue(propName) {
|
|
15
|
+
return scrollContent.current ? window.getComputedStyle(scrollContent.current).getPropertyValue(propName) : "";
|
|
16
|
+
}
|
|
17
|
+
function calculateCurrentTranslateX() {
|
|
18
|
+
const transformValue = getScrollContentStyleValue("transform");
|
|
19
|
+
if (transformValue === "none") {
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// the transform value is in form of 'matrix(a, b, c, d, tx, ty)'
|
|
24
|
+
// get all the parenthesized values
|
|
25
|
+
const match = /\((.+?)\)/.exec(transformValue);
|
|
26
|
+
if (!match) {
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
const matrixParams = match[1];
|
|
30
|
+
// we need value of tx -> translateX
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
32
|
+
const [a, b, c, d, tx, ty] = matrixParams.split(",");
|
|
33
|
+
return parseFloat(tx);
|
|
34
|
+
}
|
|
35
|
+
function getScrollPosition() {
|
|
36
|
+
const currentTranslateX = calculateCurrentTranslateX();
|
|
37
|
+
const scrollLeft = scrollArea.current?.scrollLeft ?? 0;
|
|
38
|
+
return scrollLeft - currentTranslateX;
|
|
39
|
+
}
|
|
40
|
+
function calculateScrollEdges() {
|
|
41
|
+
const scrollContentWidth = scrollContent.current?.offsetWidth ?? 0;
|
|
42
|
+
const scrollAreaWidth = scrollArea.current?.offsetWidth ?? 0;
|
|
43
|
+
return {
|
|
44
|
+
left: 0,
|
|
45
|
+
right: scrollContentWidth - scrollAreaWidth
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function clampScrollValue(scrollX) {
|
|
49
|
+
const edges = calculateScrollEdges();
|
|
50
|
+
return Math.min(Math.max(edges.left, scrollX), edges.right);
|
|
51
|
+
}
|
|
52
|
+
function getIncrementScrollOperation(scrollX) {
|
|
53
|
+
const currentScrollX = getScrollPosition();
|
|
54
|
+
const targetScrollX = scrollX + currentScrollX;
|
|
55
|
+
const safeScrollX = clampScrollValue(targetScrollX);
|
|
56
|
+
const scrollDelta = safeScrollX - currentScrollX;
|
|
57
|
+
return {
|
|
58
|
+
finalScrollPosition: safeScrollX,
|
|
59
|
+
scrollDelta
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function getAnimatingScrollPosition() {
|
|
63
|
+
const currentTranslateX = calculateCurrentTranslateX();
|
|
64
|
+
const scrollLeft = scrollArea.current?.scrollLeft ?? 0;
|
|
65
|
+
return scrollLeft - currentTranslateX;
|
|
66
|
+
}
|
|
67
|
+
function stopScrollAnimation() {
|
|
68
|
+
const currentScrollPosition = getAnimatingScrollPosition();
|
|
69
|
+
setClasses("");
|
|
70
|
+
setStyle({
|
|
71
|
+
transform: "translateX(0px)"
|
|
72
|
+
});
|
|
73
|
+
if (scrollArea.current) {
|
|
74
|
+
scrollArea.current.scrollLeft = currentScrollPosition;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function animate(animation) {
|
|
78
|
+
// no animation needed
|
|
79
|
+
if (animation.scrollDelta === 0) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
stopScrollAnimation();
|
|
83
|
+
|
|
84
|
+
// this animation uses the flip approach
|
|
85
|
+
// https://aerotwist.com/blog/flip-your-animations/
|
|
86
|
+
// https://css-tricks.com/animating-layouts-with-the-flip-technique/
|
|
87
|
+
if (scrollArea.current) {
|
|
88
|
+
scrollArea.current.scrollLeft = animation.finalScrollPosition;
|
|
89
|
+
}
|
|
90
|
+
setStyle({
|
|
91
|
+
transform: `translateX(${animation.scrollDelta}px)`
|
|
92
|
+
});
|
|
93
|
+
// force repaint
|
|
94
|
+
if (scrollArea.current) {
|
|
95
|
+
scrollArea.current.getBoundingClientRect();
|
|
96
|
+
}
|
|
97
|
+
requestAnimationFrame(() => {
|
|
98
|
+
setClasses("fr-tab-scroller--animating");
|
|
99
|
+
setStyle({
|
|
100
|
+
transform: "none"
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function incrementScroll(scrollXIncrement) {
|
|
105
|
+
// no scroll needed
|
|
106
|
+
if (scrollXIncrement === 0) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const scrollOperation = getIncrementScrollOperation(scrollXIncrement);
|
|
110
|
+
animate(scrollOperation);
|
|
111
|
+
}
|
|
112
|
+
function computeDimensions(tab) {
|
|
113
|
+
const rootWidth = tab.offsetWidth;
|
|
114
|
+
const rootLeft = tab.offsetLeft;
|
|
115
|
+
const tabContent = tab.querySelector(".fr-tab-content");
|
|
116
|
+
const contentWidth = tabContent?.offsetWidth ?? 0;
|
|
117
|
+
const contentLeft = tabContent?.offsetLeft ?? 0;
|
|
118
|
+
return {
|
|
119
|
+
contentLeft: rootLeft + contentLeft,
|
|
120
|
+
contentRight: rootLeft + contentLeft + contentWidth,
|
|
121
|
+
rootLeft,
|
|
122
|
+
rootRight: rootLeft + rootWidth
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function calculateScrollIncrement(index, nextIndex, scrollPosition, barWidth) {
|
|
126
|
+
const nextTab = elRef.current?.querySelector(`#${componentId}-tab-${nextIndex}`);
|
|
127
|
+
if (nextTab === null || nextTab === undefined) {
|
|
128
|
+
return 0;
|
|
129
|
+
}
|
|
130
|
+
const nextTabDimensions = computeDimensions(nextTab);
|
|
131
|
+
const relativeContentLeft = nextTabDimensions.contentLeft - scrollPosition - barWidth;
|
|
132
|
+
const relativeContentRight = nextTabDimensions.contentRight - scrollPosition;
|
|
133
|
+
const leftIncrement = relativeContentRight - 48;
|
|
134
|
+
const rightIncrement = relativeContentLeft + 48;
|
|
135
|
+
if (nextIndex < index) {
|
|
136
|
+
return Math.min(leftIncrement, 0);
|
|
137
|
+
}
|
|
138
|
+
return Math.max(rightIncrement, 0);
|
|
139
|
+
}
|
|
140
|
+
function findAdjacentTabIndexClosestToEdge(index, tabDimensions, scrollPosition, barWidth) {
|
|
141
|
+
/**
|
|
142
|
+
* tabs are laid out in the tab scroller like this:
|
|
143
|
+
*
|
|
144
|
+
* scroll position
|
|
145
|
+
* +---+
|
|
146
|
+
* | | bar width
|
|
147
|
+
* | +-----------------------------------+
|
|
148
|
+
* | | |
|
|
149
|
+
* | v v
|
|
150
|
+
* | +-----------------------------------+
|
|
151
|
+
* v | tab scroller |
|
|
152
|
+
* +------------+--------------+-------------------+
|
|
153
|
+
* | tab | tab | tab |
|
|
154
|
+
* +------------+--------------+-------------------+
|
|
155
|
+
* | |
|
|
156
|
+
* +-----------------------------------+
|
|
157
|
+
*
|
|
158
|
+
* to determine the next adjacent index, we look at the tab root left and
|
|
159
|
+
* tab root right, both relative to the scroll position. if the tab root
|
|
160
|
+
* left is less than 0, then we know it's out of view to the left. if the
|
|
161
|
+
* tab root right minus the bar width is greater than 0, we know the tab is
|
|
162
|
+
* out of view to the right. from there, we either increment or decrement
|
|
163
|
+
* the index.
|
|
164
|
+
*/
|
|
165
|
+
const relativeRootLeft = tabDimensions.rootLeft - scrollPosition;
|
|
166
|
+
const relativeRootRight = tabDimensions.rootRight - scrollPosition - barWidth;
|
|
167
|
+
const relativeRootDelta = relativeRootLeft + relativeRootRight;
|
|
168
|
+
const leftEdgeIsCloser = relativeRootLeft < 0 || relativeRootDelta < 0;
|
|
169
|
+
const rightEdgeIsCloser = relativeRootRight > 0 || relativeRootDelta > 0;
|
|
170
|
+
if (leftEdgeIsCloser) {
|
|
171
|
+
return index - 1;
|
|
172
|
+
}
|
|
173
|
+
if (rightEdgeIsCloser) {
|
|
174
|
+
return index + 1;
|
|
175
|
+
}
|
|
176
|
+
return -1;
|
|
177
|
+
}
|
|
178
|
+
function indexIsInRange(index) {
|
|
179
|
+
return index >= 0 && index < tabLength;
|
|
180
|
+
}
|
|
181
|
+
function scrollIntoView(index, tab) {
|
|
182
|
+
const scrollPosition = getScrollPosition();
|
|
183
|
+
const barWidth = scrollArea.current?.offsetWidth ?? 0;
|
|
184
|
+
const tabDimensions = computeDimensions(tab);
|
|
185
|
+
const nextIndex = findAdjacentTabIndexClosestToEdge(index, tabDimensions, scrollPosition, barWidth);
|
|
186
|
+
if (!indexIsInRange(nextIndex)) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const scrollIncrement = calculateScrollIncrement(index, nextIndex, scrollPosition, barWidth);
|
|
190
|
+
incrementScroll(scrollIncrement);
|
|
191
|
+
}
|
|
192
|
+
function scrollTo(scrollX) {
|
|
193
|
+
const currentScrollX = getScrollPosition();
|
|
194
|
+
const safeScrollX = clampScrollValue(scrollX);
|
|
195
|
+
const scrollDelta = safeScrollX - currentScrollX;
|
|
196
|
+
animate({
|
|
197
|
+
finalScrollPosition: safeScrollX,
|
|
198
|
+
scrollDelta
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function handleTabScroll(e, index) {
|
|
202
|
+
const scrollContentWidth = scrollContent.current?.offsetWidth ?? 0;
|
|
203
|
+
const scrollAreaWidth = scrollArea.current?.offsetWidth ?? 0;
|
|
204
|
+
|
|
205
|
+
// check if no scroll is needed
|
|
206
|
+
if (scrollAreaWidth > scrollContentWidth) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// check index
|
|
211
|
+
if (!indexIsInRange(index)) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// always scroll to 0 if scrolling to the first tab
|
|
216
|
+
if (index === 0) {
|
|
217
|
+
scrollTo(0);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// always scroll to the max value if scrolling to the last tab
|
|
222
|
+
if (index === tabLength - 1 && scrollContent.current) {
|
|
223
|
+
scrollTo(scrollContent.current.offsetWidth);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (e.currentTarget instanceof HTMLElement) {
|
|
227
|
+
const currentTab = e.currentTarget;
|
|
228
|
+
scrollIntoView(index, currentTab);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return [handleTabScroll, classes, style];
|
|
232
|
+
};
|
|
233
|
+
export default useTabScroll;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface TableHeaderCellProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
2
|
+
active?: boolean;
|
|
3
|
+
ascending: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const TableHeaderCell: (props: TableHeaderCellProps & import("react").RefAttributes<HTMLTableCellElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
6
|
+
export default TableHeaderCell;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const TableHeaderCell = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5
|
+
let {
|
|
6
|
+
active,
|
|
7
|
+
ascending,
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
} = _ref;
|
|
11
|
+
function handleClick(event) {
|
|
12
|
+
if (props.onClick) {
|
|
13
|
+
props.onClick(event);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return /*#__PURE__*/_jsx("th", {
|
|
17
|
+
...props,
|
|
18
|
+
className: classNames("fwe-table-order", {
|
|
19
|
+
"fwe-active": active
|
|
20
|
+
}, {
|
|
21
|
+
"fwe-table-order-ascending": active && ascending
|
|
22
|
+
}, {
|
|
23
|
+
"fwe-table-order-descending": active && !ascending
|
|
24
|
+
}, className),
|
|
25
|
+
onClick: handleClick,
|
|
26
|
+
ref: ref
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export default TableHeaderCell;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./Checkbox.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
4
|
+
id?: string;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onChange?: (value: boolean, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
name?: string;
|
|
9
|
+
large?: boolean;
|
|
10
|
+
valid?: boolean;
|
|
11
|
+
labelPosition?: "before" | "after" | "below";
|
|
12
|
+
required?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
indeterminate?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare function Checkbox({ id, checked: checkedProp, defaultChecked, onChange, name, large, valid, labelPosition, required, disabled, indeterminate, children, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default Checkbox;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import useControlled from "../../helper/useControlled.js";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
function Checkbox(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
id,
|
|
8
|
+
checked: checkedProp,
|
|
9
|
+
defaultChecked,
|
|
10
|
+
onChange,
|
|
11
|
+
name,
|
|
12
|
+
large = false,
|
|
13
|
+
valid = true,
|
|
14
|
+
labelPosition = "after",
|
|
15
|
+
required,
|
|
16
|
+
disabled = false,
|
|
17
|
+
indeterminate = false,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
} = _ref;
|
|
22
|
+
const [isChecked, setChecked] = useControlled({
|
|
23
|
+
controlled: checkedProp,
|
|
24
|
+
default: defaultChecked
|
|
25
|
+
});
|
|
26
|
+
const handleChange = e => {
|
|
27
|
+
const newChecked = !isChecked;
|
|
28
|
+
setChecked(newChecked);
|
|
29
|
+
onChange?.(newChecked, e);
|
|
30
|
+
};
|
|
31
|
+
const containerClasses = classNames("fwe-checkbox-container", {
|
|
32
|
+
"fr-checkbox-large": large
|
|
33
|
+
}, {
|
|
34
|
+
"fr-checkbox-invalid": !valid || required
|
|
35
|
+
}, {
|
|
36
|
+
"fwe-disabled": disabled
|
|
37
|
+
}, {
|
|
38
|
+
"fwe-checked": isChecked
|
|
39
|
+
}, {
|
|
40
|
+
"fwe-label-below": labelPosition === "below"
|
|
41
|
+
}, {
|
|
42
|
+
"fwe-label-before": labelPosition === "before"
|
|
43
|
+
}, {
|
|
44
|
+
"fr-checkbox-indeterminate": indeterminate
|
|
45
|
+
}, className);
|
|
46
|
+
return /*#__PURE__*/_jsxs("label", {
|
|
47
|
+
className: containerClasses,
|
|
48
|
+
htmlFor: id,
|
|
49
|
+
children: [/*#__PURE__*/_jsx("input", {
|
|
50
|
+
name: name,
|
|
51
|
+
type: "checkbox",
|
|
52
|
+
id: id,
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
required: required,
|
|
55
|
+
onChange: e => handleChange(e),
|
|
56
|
+
...props,
|
|
57
|
+
checked: isChecked
|
|
58
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
59
|
+
className: "fwe-checkbox-indicator-container",
|
|
60
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
61
|
+
className: "fwe-checkbox-indicator-background"
|
|
62
|
+
}), !indeterminate && isChecked && (large ? /*#__PURE__*/_jsx("svg", {
|
|
63
|
+
width: "24px",
|
|
64
|
+
height: "24px",
|
|
65
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
66
|
+
d: "M17.5 7L10 14.5 7.501 12l-1.5 1.501L10 17.5l9-9z",
|
|
67
|
+
fill: "#fff"
|
|
68
|
+
})
|
|
69
|
+
}) : /*#__PURE__*/_jsx("svg", {
|
|
70
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
71
|
+
width: "16",
|
|
72
|
+
height: "16",
|
|
73
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
74
|
+
d: "M6 12L3 9l1.25-1.25L6 9.5l5.75-5.75L13 5l-7 7z",
|
|
75
|
+
fill: "#fff"
|
|
76
|
+
})
|
|
77
|
+
})), indeterminate && /*#__PURE__*/_jsx("div", {
|
|
78
|
+
className: "fwe-indeterminate-indicator"
|
|
79
|
+
})]
|
|
80
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
81
|
+
className: "fwe-checkbox-title",
|
|
82
|
+
children: children
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export default Checkbox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ClassNamePropsWithChildren } from "../../helper/types";
|
|
2
2
|
export interface RadioProps extends ClassNamePropsWithChildren {
|
|
3
3
|
id?: string;
|
|
4
4
|
defaultChecked?: boolean;
|
|
@@ -6,9 +6,10 @@ export interface RadioProps extends ClassNamePropsWithChildren {
|
|
|
6
6
|
onChange?: (value: string) => void;
|
|
7
7
|
name?: string;
|
|
8
8
|
value?: string;
|
|
9
|
-
labelPosition?:
|
|
9
|
+
labelPosition?: "before" | "after" | "below";
|
|
10
10
|
large?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
declare function Radio(props: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Radio;
|