@kubit-ui-web/react-components 1.7.0 → 1.8.0
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/dist/cjs/components/accordion/accordion.styled.js +1 -0
- package/dist/cjs/components/accordion/accordion.styled.js.map +1 -1
- package/dist/cjs/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/cjs/components/calendar/selector/monthSelector/monthSelector.js.map +1 -1
- package/dist/cjs/components/calendar/selector/yearSelector/yearSelector.js +1 -1
- package/dist/cjs/components/calendar/selector/yearSelector/yearSelector.js.map +1 -1
- package/dist/cjs/components/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarousel.js.map +1 -1
- package/dist/cjs/components/checkbox/checkboxStandAlone.js +1 -1
- package/dist/cjs/components/checkbox/checkboxStandAlone.js.map +1 -1
- package/dist/cjs/components/drawer/drawerStandAlone.js +1 -1
- package/dist/cjs/components/drawer/drawerStandAlone.js.map +1 -1
- package/dist/cjs/components/footer/components/footerSection.js +22 -0
- package/dist/cjs/components/footer/components/footerSection.js.map +1 -0
- package/dist/cjs/components/footer/components/index.js +1 -1
- package/dist/cjs/components/footer/footer.styled.js +63 -19
- package/dist/cjs/components/footer/footer.styled.js.map +1 -1
- package/dist/cjs/components/footer/footerStandAlone.js +49 -36
- package/dist/cjs/components/footer/footerStandAlone.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/input/components/label.js +1 -1
- package/dist/cjs/components/input/components/label.js.map +1 -1
- package/dist/cjs/components/input/components/title.js +3 -3
- package/dist/cjs/components/input/components/title.js.map +1 -1
- package/dist/cjs/components/input/input.styled.js +10 -1
- package/dist/cjs/components/input/input.styled.js.map +1 -1
- package/dist/cjs/components/input/inputStandAlone.js +2 -6
- package/dist/cjs/components/input/inputStandAlone.js.map +1 -1
- package/dist/cjs/components/input/inputUnControlled.js +5 -3
- package/dist/cjs/components/input/inputUnControlled.js.map +1 -1
- package/dist/cjs/components/input/types/input.js +2 -0
- package/dist/cjs/components/input/types/input.js.map +1 -1
- package/dist/cjs/components/input/utils/extraStyles.utils.js +4 -4
- package/dist/cjs/components/input/utils/extraStyles.utils.js.map +1 -1
- package/dist/cjs/components/inputCounter/inputCounter.js +5 -3
- package/dist/cjs/components/inputCounter/inputCounter.js.map +1 -1
- package/dist/cjs/components/inputCurrency/inputCurrency.js +5 -3
- package/dist/cjs/components/inputCurrency/inputCurrency.js.map +1 -1
- package/dist/cjs/components/inputCurrency/inputCurrencyStandAlone.js +5 -1
- package/dist/cjs/components/inputCurrency/inputCurrencyStandAlone.js.map +1 -1
- package/dist/cjs/components/inputDate/hooks/useInputDate.js +6 -10
- package/dist/cjs/components/inputDate/hooks/useInputDate.js.map +1 -1
- package/dist/cjs/components/inputDate/inputDateStandAlone.js +1 -1
- package/dist/cjs/components/inputDate/inputDateStandAlone.js.map +1 -1
- package/dist/cjs/components/inputDate/utils/index.js +1 -3
- package/dist/cjs/components/inputDate/utils/index.js.map +1 -1
- package/dist/cjs/components/inputDate/utils/verifyFormat.js +15 -12
- package/dist/cjs/components/inputDate/utils/verifyFormat.js.map +1 -1
- package/dist/cjs/components/inputDate/utils/verifyYear.js +2 -1
- package/dist/cjs/components/inputDate/utils/verifyYear.js.map +1 -1
- package/dist/cjs/components/inputDigitSequence/components/index.js +20 -0
- package/dist/cjs/components/inputDigitSequence/components/index.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigit.js +24 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigit.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigitSequenceHelpText.js +14 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigitSequenceHelpText.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigitSquenceTooltip.js +17 -0
- package/dist/cjs/components/inputDigitSequence/components/inputDigitSquenceTooltip.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/hooks/index.js +18 -0
- package/dist/cjs/components/inputDigitSequence/hooks/index.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/hooks/useAnimation.js +100 -0
- package/dist/cjs/components/inputDigitSequence/hooks/useAnimation.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/index.js +21 -0
- package/dist/cjs/components/inputDigitSequence/index.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequence.styled.js +156 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequence.styled.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceControlled.js +117 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceControlled.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceStandAlone.js +45 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceStandAlone.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceUncontrolled.js +10 -0
- package/dist/cjs/components/inputDigitSequence/inputDigitSequenceUncontrolled.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/types/index.js +20 -0
- package/dist/cjs/components/inputDigitSequence/types/index.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/types/inputDigitSequence.js +3 -0
- package/dist/cjs/components/inputDigitSequence/types/inputDigitSequence.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/types/inputDigitSequenceTheme.js +3 -0
- package/dist/cjs/components/inputDigitSequence/types/inputDigitSequenceTheme.js.map +1 -0
- package/dist/cjs/components/inputDigitSequence/types/state.js +10 -0
- package/dist/cjs/components/inputDigitSequence/types/state.js.map +1 -0
- package/dist/cjs/components/inputDropdown/hooks/useInputDropdown.js +4 -1
- package/dist/cjs/components/inputDropdown/hooks/useInputDropdown.js.map +1 -1
- package/dist/cjs/components/inputPassword/inputPassword.js +5 -3
- package/dist/cjs/components/inputPassword/inputPassword.js.map +1 -1
- package/dist/cjs/components/inputPhone/inputPhone.js +5 -3
- package/dist/cjs/components/inputPhone/inputPhone.js.map +1 -1
- package/dist/cjs/components/inputPhone/inputPhoneStandAlone.js +5 -1
- package/dist/cjs/components/inputPhone/inputPhoneStandAlone.js.map +1 -1
- package/dist/cjs/components/inputSearch/hooks/useInputSearch.js +9 -1
- package/dist/cjs/components/inputSearch/hooks/useInputSearch.js.map +1 -1
- package/dist/cjs/components/inputSearch/inputSearch.js +3 -2
- package/dist/cjs/components/inputSearch/inputSearch.js.map +1 -1
- package/dist/cjs/components/mediaButton/mediaButtonStandAlone.js +2 -2
- package/dist/cjs/components/mediaButton/mediaButtonStandAlone.js.map +1 -1
- package/dist/cjs/components/message/index.js +1 -1
- package/dist/cjs/components/message/index.js.map +1 -1
- package/dist/cjs/components/message/message.styled.js +4 -1
- package/dist/cjs/components/message/message.styled.js.map +1 -1
- package/dist/cjs/components/message/messageStandAlone.js +1 -1
- package/dist/cjs/components/message/messageStandAlone.js.map +1 -1
- package/dist/cjs/components/modal/modalControlled.js +1 -2
- package/dist/cjs/components/modal/modalControlled.js.map +1 -1
- package/dist/cjs/components/navigationCard/fragments/navigationCardInfo.js +4 -2
- package/dist/cjs/components/navigationCard/fragments/navigationCardInfo.js.map +1 -1
- package/dist/cjs/components/navigationCard/navigationCard.js.map +1 -1
- package/dist/cjs/components/navigationCard/navigationCardStandAlone.js +8 -2
- package/dist/cjs/components/navigationCard/navigationCardStandAlone.js.map +1 -1
- package/dist/cjs/components/oliveMenu/oliveMenu.js +24 -8
- package/dist/cjs/components/oliveMenu/oliveMenu.js.map +1 -1
- package/dist/cjs/components/oliveMenu/oliveMenu.styled.js +3 -0
- package/dist/cjs/components/oliveMenu/oliveMenu.styled.js.map +1 -1
- package/dist/cjs/components/oliveMenu/oliveMenuStandAlone.js +10 -3
- package/dist/cjs/components/oliveMenu/oliveMenuStandAlone.js.map +1 -1
- package/dist/cjs/components/option/optionStandAlone.js +1 -1
- package/dist/cjs/components/option/optionStandAlone.js.map +1 -1
- package/dist/cjs/components/pillSelector/pillSelectorStandAlone.js +8 -6
- package/dist/cjs/components/pillSelector/pillSelectorStandAlone.js.map +1 -1
- package/dist/cjs/components/popover/popoverStandAlone.js +3 -1
- package/dist/cjs/components/popover/popoverStandAlone.js.map +1 -1
- package/dist/cjs/components/radioButtonGroup/components/radioButton/radioButton.styled.js.map +1 -1
- package/dist/cjs/components/radioButtonGroup/components/radioButton/radioButtonStandAlone.js +1 -1
- package/dist/cjs/components/radioButtonGroup/components/radioButton/radioButtonStandAlone.js.map +1 -1
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +3 -10
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js.map +1 -1
- package/dist/cjs/components/slider/slider.js +41 -10
- package/dist/cjs/components/slider/slider.js.map +1 -1
- package/dist/cjs/components/slider/sliderStandAlone.js +2 -2
- package/dist/cjs/components/slider/sliderStandAlone.js.map +1 -1
- package/dist/cjs/components/slider/utils/accessibility.utils.js +29 -29
- package/dist/cjs/components/slider/utils/accessibility.utils.js.map +1 -1
- package/dist/cjs/components/slider/utils/slider.utils.js +121 -38
- package/dist/cjs/components/slider/utils/slider.utils.js.map +1 -1
- package/dist/cjs/components/snackbar/snackbarUnControlled.js +18 -4
- package/dist/cjs/components/snackbar/snackbarUnControlled.js.map +1 -1
- package/dist/cjs/components/table/hooks/useContent.js +2 -2
- package/dist/cjs/components/table/hooks/useContent.js.map +1 -1
- package/dist/cjs/components/tabs/tabs.styled.js +13 -0
- package/dist/cjs/components/tabs/tabs.styled.js.map +1 -1
- package/dist/cjs/components/tabs/tabsStandAlone.js +17 -4
- package/dist/cjs/components/tabs/tabsStandAlone.js.map +1 -1
- package/dist/cjs/components/tabs/types/state.js +3 -0
- package/dist/cjs/components/tabs/types/state.js.map +1 -1
- package/dist/cjs/components/tagV2/tagStandAlone.js +1 -1
- package/dist/cjs/components/tagV2/tagStandAlone.js.map +1 -1
- package/dist/cjs/components/toggle/components/toggleThreePosition.js +3 -3
- package/dist/cjs/components/toggle/components/toggleThreePosition.js.map +1 -1
- package/dist/cjs/components/toggle/components/toggleTwoPositions.js +1 -1
- package/dist/cjs/components/toggle/components/toggleTwoPositions.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/toggleWithLabel.styled.js +61 -6
- package/dist/cjs/components/toggleWithLabel/toggleWithLabel.styled.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelControlled.js +8 -1
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelControlled.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelStandAlone.js +3 -2
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelStandAlone.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelUncontrolled.js +5 -2
- package/dist/cjs/components/toggleWithLabel/toggleWithLabelUncontrolled.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/types/index.js +3 -15
- package/dist/cjs/components/toggleWithLabel/types/index.js.map +1 -1
- package/dist/cjs/components/toggleWithLabel/types/toggleWithLabel.js +7 -0
- package/dist/cjs/components/toggleWithLabel/types/toggleWithLabel.js.map +1 -1
- package/dist/cjs/components/tooltip/positioning/utils/detectOverflow.js.map +1 -1
- package/dist/cjs/designSystem/kubit/components/footer/styles.js +1 -0
- package/dist/cjs/designSystem/kubit/components/footer/styles.js.map +1 -1
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/index.js +19 -0
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/index.js.map +1 -0
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/styles.js +109 -0
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/styles.js.map +1 -0
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/variants.js +8 -0
- package/dist/cjs/designSystem/kubit/components/inputDigitSequence/variants.js.map +1 -0
- package/dist/cjs/designSystem/kubit/components/oliveMenu/styles.js +5 -0
- package/dist/cjs/designSystem/kubit/components/oliveMenu/styles.js.map +1 -1
- package/dist/cjs/designSystem/kubit/components/styles.js +1 -0
- package/dist/cjs/designSystem/kubit/components/styles.js.map +1 -1
- package/dist/cjs/designSystem/kubit/components/variants.js +1 -0
- package/dist/cjs/designSystem/kubit/components/variants.js.map +1 -1
- package/dist/cjs/designSystem/kubit/fonts/Digit_Password_Large_Square.ttf +0 -0
- package/dist/cjs/designSystem/kubit/fonts/Digit_Password_Small_Square.ttf +0 -0
- package/dist/cjs/designSystem/kubit/foundations/typography.js +2 -0
- package/dist/cjs/designSystem/kubit/foundations/typography.js.map +1 -1
- package/dist/cjs/designSystem/kubit/globalStyles/font.css +12 -0
- package/dist/cjs/designSystem/kubit/globalStyles/fonts.js +14 -0
- package/dist/cjs/designSystem/kubit/globalStyles/fonts.js.map +1 -1
- package/dist/cjs/hooks/index.js +3 -1
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useElementBoundingClientRect/useElementBoundingClientRect.js +57 -0
- package/dist/cjs/hooks/useElementBoundingClientRect/useElementBoundingClientRect.js.map +1 -0
- package/dist/cjs/hooks/useInput/useInput.js +10 -0
- package/dist/cjs/hooks/useInput/useInput.js.map +1 -1
- package/dist/cjs/hooks/useZoomEffect/useZoomEffect.js +4 -7
- package/dist/cjs/hooks/useZoomEffect/useZoomEffect.js.map +1 -1
- package/dist/cjs/styles/mixins/input.mixin.js +4 -4
- package/dist/cjs/styles/mixins/input.mixin.js.map +1 -1
- package/dist/cjs/utils/date/date.js +3 -2
- package/dist/cjs/utils/date/date.js.map +1 -1
- package/dist/cjs/utils/date/formatDate.js +67 -0
- package/dist/cjs/utils/date/formatDate.js.map +1 -0
- package/dist/cjs/utils/date/index.js +2 -1
- package/dist/cjs/utils/date/index.js.map +1 -1
- package/dist/cjs/utils/date/transformDate.js +3 -12
- package/dist/cjs/utils/date/transformDate.js.map +1 -1
- package/dist/cjs/utils/date/validateDate.js +8 -0
- package/dist/cjs/utils/date/validateDate.js.map +1 -0
- package/dist/cjs/utils/focusHandlers/focusHandlers.js +34 -1
- package/dist/cjs/utils/focusHandlers/focusHandlers.js.map +1 -1
- package/dist/esm/components/accordion/accordion.styled.js +2 -1
- package/dist/esm/components/accordion/accordion.styled.js.map +1 -1
- package/dist/esm/components/accordion/types/accordionTheme.d.ts +1 -1
- package/dist/esm/components/calendar/selector/monthSelector/monthSelector.js +1 -1
- package/dist/esm/components/calendar/selector/monthSelector/monthSelector.js.map +1 -1
- package/dist/esm/components/calendar/selector/yearSelector/yearSelector.js +1 -1
- package/dist/esm/components/calendar/selector/yearSelector/yearSelector.js.map +1 -1
- package/dist/esm/components/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarousel.js.map +1 -1
- package/dist/esm/components/checkbox/checkboxStandAlone.js +1 -1
- package/dist/esm/components/checkbox/checkboxStandAlone.js.map +1 -1
- package/dist/esm/components/checkbox/types/checkbox.d.ts +2 -1
- package/dist/esm/components/drawer/drawerStandAlone.js +1 -1
- package/dist/esm/components/drawer/drawerStandAlone.js.map +1 -1
- package/dist/esm/components/drawer/types/drawer.d.ts +3 -0
- package/dist/esm/components/footer/components/footerSection.d.ts +11 -0
- package/dist/esm/components/footer/components/footerSection.js +18 -0
- package/dist/esm/components/footer/components/footerSection.js.map +1 -0
- package/dist/esm/components/footer/components/index.d.ts +1 -1
- package/dist/esm/components/footer/components/index.js +1 -1
- package/dist/esm/components/footer/footer.styled.d.ts +7 -8
- package/dist/esm/components/footer/footer.styled.js +40 -16
- package/dist/esm/components/footer/footer.styled.js.map +1 -1
- package/dist/esm/components/footer/footerStandAlone.js +52 -39
- package/dist/esm/components/footer/footerStandAlone.js.map +1 -1
- package/dist/esm/components/footer/types/footer.d.ts +17 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/input/components/label.js +3 -3
- package/dist/esm/components/input/components/label.js.map +1 -1
- package/dist/esm/components/input/components/title.js +5 -5
- package/dist/esm/components/input/components/title.js.map +1 -1
- package/dist/esm/components/input/input.styled.d.ts +7 -0
- package/dist/esm/components/input/input.styled.js +9 -0
- package/dist/esm/components/input/input.styled.js.map +1 -1
- package/dist/esm/components/input/inputStandAlone.d.ts +1 -0
- package/dist/esm/components/input/inputStandAlone.js +2 -6
- package/dist/esm/components/input/inputStandAlone.js.map +1 -1
- package/dist/esm/components/input/inputUnControlled.js +5 -3
- package/dist/esm/components/input/inputUnControlled.js.map +1 -1
- package/dist/esm/components/input/types/input.d.ts +7 -2
- package/dist/esm/components/input/types/input.js +2 -0
- package/dist/esm/components/input/types/input.js.map +1 -1
- package/dist/esm/components/input/types/inputTheme.d.ts +2 -0
- package/dist/esm/components/input/utils/extraStyles.utils.d.ts +1 -1
- package/dist/esm/components/input/utils/extraStyles.utils.js +4 -4
- package/dist/esm/components/input/utils/extraStyles.utils.js.map +1 -1
- package/dist/esm/components/inputCounter/inputCounter.js +5 -3
- package/dist/esm/components/inputCounter/inputCounter.js.map +1 -1
- package/dist/esm/components/inputCurrency/inputCurrency.js +5 -3
- package/dist/esm/components/inputCurrency/inputCurrency.js.map +1 -1
- package/dist/esm/components/inputCurrency/inputCurrencyStandAlone.js +5 -1
- package/dist/esm/components/inputCurrency/inputCurrencyStandAlone.js.map +1 -1
- package/dist/esm/components/inputDate/hooks/useInputDate.d.ts +1 -1
- package/dist/esm/components/inputDate/hooks/useInputDate.js +7 -11
- package/dist/esm/components/inputDate/hooks/useInputDate.js.map +1 -1
- package/dist/esm/components/inputDate/inputDateStandAlone.js +1 -1
- package/dist/esm/components/inputDate/inputDateStandAlone.js.map +1 -1
- package/dist/esm/components/inputDate/utils/index.d.ts +0 -1
- package/dist/esm/components/inputDate/utils/index.js +0 -1
- package/dist/esm/components/inputDate/utils/index.js.map +1 -1
- package/dist/esm/components/inputDate/utils/verifyFormat.js +15 -12
- package/dist/esm/components/inputDate/utils/verifyFormat.js.map +1 -1
- package/dist/esm/components/inputDate/utils/verifyYear.d.ts +1 -1
- package/dist/esm/components/inputDate/utils/verifyYear.js +2 -1
- package/dist/esm/components/inputDate/utils/verifyYear.js.map +1 -1
- package/dist/esm/components/inputDigitSequence/components/index.d.ts +3 -0
- package/dist/esm/components/inputDigitSequence/components/index.js +4 -0
- package/dist/esm/components/inputDigitSequence/components/index.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigit.d.ts +21 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigit.js +20 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigit.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSequenceHelpText.d.ts +8 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSequenceHelpText.js +10 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSequenceHelpText.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSquenceTooltip.d.ts +9 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSquenceTooltip.js +13 -0
- package/dist/esm/components/inputDigitSequence/components/inputDigitSquenceTooltip.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/hooks/index.d.ts +1 -0
- package/dist/esm/components/inputDigitSequence/hooks/index.js +2 -0
- package/dist/esm/components/inputDigitSequence/hooks/index.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/hooks/useAnimation.d.ts +11 -0
- package/dist/esm/components/inputDigitSequence/hooks/useAnimation.js +96 -0
- package/dist/esm/components/inputDigitSequence/hooks/useAnimation.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/index.d.ts +2 -0
- package/dist/esm/components/inputDigitSequence/index.js +3 -0
- package/dist/esm/components/inputDigitSequence/index.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequence.styled.d.ts +39 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequence.styled.js +130 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequence.styled.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceControlled.d.ts +2 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceControlled.js +91 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceControlled.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceStandAlone.d.ts +3 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceStandAlone.js +19 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceStandAlone.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceUncontrolled.d.ts +2 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceUncontrolled.js +6 -0
- package/dist/esm/components/inputDigitSequence/inputDigitSequenceUncontrolled.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/types/index.d.ts +3 -0
- package/dist/esm/components/inputDigitSequence/types/index.js +4 -0
- package/dist/esm/components/inputDigitSequence/types/index.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequence.d.ts +63 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequence.js +2 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequence.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequenceTheme.d.ts +33 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequenceTheme.js +2 -0
- package/dist/esm/components/inputDigitSequence/types/inputDigitSequenceTheme.js.map +1 -0
- package/dist/esm/components/inputDigitSequence/types/state.d.ts +5 -0
- package/dist/esm/components/inputDigitSequence/types/state.js +7 -0
- package/dist/esm/components/inputDigitSequence/types/state.js.map +1 -0
- package/dist/esm/components/inputDropdown/hooks/useInputDropdown.d.ts +4 -1
- package/dist/esm/components/inputDropdown/hooks/useInputDropdown.js +4 -1
- package/dist/esm/components/inputDropdown/hooks/useInputDropdown.js.map +1 -1
- package/dist/esm/components/inputPassword/inputPassword.js +5 -3
- package/dist/esm/components/inputPassword/inputPassword.js.map +1 -1
- package/dist/esm/components/inputPhone/inputPhone.js +5 -3
- package/dist/esm/components/inputPhone/inputPhone.js.map +1 -1
- package/dist/esm/components/inputPhone/inputPhoneStandAlone.js +5 -1
- package/dist/esm/components/inputPhone/inputPhoneStandAlone.js.map +1 -1
- package/dist/esm/components/inputSearch/hooks/useInputSearch.d.ts +6 -1
- package/dist/esm/components/inputSearch/hooks/useInputSearch.js +9 -1
- package/dist/esm/components/inputSearch/hooks/useInputSearch.js.map +1 -1
- package/dist/esm/components/inputSearch/inputSearch.js +3 -2
- package/dist/esm/components/inputSearch/inputSearch.js.map +1 -1
- package/dist/esm/components/inputSearch/types/inputSearch.d.ts +1 -2
- package/dist/esm/components/mediaButton/mediaButtonStandAlone.js +2 -2
- package/dist/esm/components/mediaButton/mediaButtonStandAlone.js.map +1 -1
- package/dist/esm/components/message/index.d.ts +1 -1
- package/dist/esm/components/message/index.js +1 -1
- package/dist/esm/components/message/index.js.map +1 -1
- package/dist/esm/components/message/message.styled.d.ts +3 -0
- package/dist/esm/components/message/message.styled.js +3 -0
- package/dist/esm/components/message/message.styled.js.map +1 -1
- package/dist/esm/components/message/messageStandAlone.js +3 -3
- package/dist/esm/components/message/messageStandAlone.js.map +1 -1
- package/dist/esm/components/message/types/messageTheme.d.ts +1 -0
- package/dist/esm/components/modal/modalControlled.js +1 -2
- package/dist/esm/components/modal/modalControlled.js.map +1 -1
- package/dist/esm/components/navigationCard/fragments/navigationCardInfo.d.ts +1 -0
- package/dist/esm/components/navigationCard/fragments/navigationCardInfo.js +4 -2
- package/dist/esm/components/navigationCard/fragments/navigationCardInfo.js.map +1 -1
- package/dist/esm/components/navigationCard/navigationCard.d.ts +2 -2
- package/dist/esm/components/navigationCard/navigationCard.js.map +1 -1
- package/dist/esm/components/navigationCard/navigationCardStandAlone.d.ts +1 -1
- package/dist/esm/components/navigationCard/navigationCardStandAlone.js +9 -3
- package/dist/esm/components/navigationCard/navigationCardStandAlone.js.map +1 -1
- package/dist/esm/components/navigationCard/types/navigationCard.d.ts +5 -1
- package/dist/esm/components/oliveMenu/oliveMenu.js +24 -8
- package/dist/esm/components/oliveMenu/oliveMenu.js.map +1 -1
- package/dist/esm/components/oliveMenu/oliveMenu.styled.js +3 -0
- package/dist/esm/components/oliveMenu/oliveMenu.styled.js.map +1 -1
- package/dist/esm/components/oliveMenu/oliveMenuStandAlone.js +13 -6
- package/dist/esm/components/oliveMenu/oliveMenuStandAlone.js.map +1 -1
- package/dist/esm/components/oliveMenu/types/oliveMenu.d.ts +5 -3
- package/dist/esm/components/oliveMenu/types/oliveMenuTheme.d.ts +1 -0
- package/dist/esm/components/option/optionStandAlone.js +1 -1
- package/dist/esm/components/option/optionStandAlone.js.map +1 -1
- package/dist/esm/components/pillSelector/pillSelectorStandAlone.js +3 -1
- package/dist/esm/components/pillSelector/pillSelectorStandAlone.js.map +1 -1
- package/dist/esm/components/pillSelector/types/pillSelector.d.ts +2 -1
- package/dist/esm/components/popover/popoverStandAlone.js +3 -1
- package/dist/esm/components/popover/popoverStandAlone.js.map +1 -1
- package/dist/esm/components/popover/types/popover.d.ts +1 -0
- package/dist/esm/components/radioButtonGroup/components/radioButton/radioButton.styled.d.ts +19 -17
- package/dist/esm/components/radioButtonGroup/components/radioButton/radioButton.styled.js +1 -1
- package/dist/esm/components/radioButtonGroup/components/radioButton/radioButton.styled.js.map +1 -1
- package/dist/esm/components/radioButtonGroup/components/radioButton/radioButtonStandAlone.js +1 -1
- package/dist/esm/components/radioButtonGroup/components/radioButton/radioButtonStandAlone.js.map +1 -1
- package/dist/esm/components/radioButtonGroup/components/radioButton/types/radioButton.d.ts +14 -12
- package/dist/esm/components/radioButtonGroup/components/radioButton/types/radioButtonTheme.d.ts +4 -3
- package/dist/esm/components/slider/components/sliderScaleStandAlone.d.ts +2 -6
- package/dist/esm/components/slider/components/sliderScaleStandAlone.js +3 -10
- package/dist/esm/components/slider/components/sliderScaleStandAlone.js.map +1 -1
- package/dist/esm/components/slider/slider.js +41 -10
- package/dist/esm/components/slider/slider.js.map +1 -1
- package/dist/esm/components/slider/sliderStandAlone.js +2 -2
- package/dist/esm/components/slider/sliderStandAlone.js.map +1 -1
- package/dist/esm/components/slider/types/slider.d.ts +3 -3
- package/dist/esm/components/slider/utils/accessibility.utils.d.ts +23 -3
- package/dist/esm/components/slider/utils/accessibility.utils.js +29 -29
- package/dist/esm/components/slider/utils/accessibility.utils.js.map +1 -1
- package/dist/esm/components/slider/utils/slider.utils.d.ts +87 -9
- package/dist/esm/components/slider/utils/slider.utils.js +118 -37
- package/dist/esm/components/slider/utils/slider.utils.js.map +1 -1
- package/dist/esm/components/snackbar/snackbarUnControlled.js +18 -4
- package/dist/esm/components/snackbar/snackbarUnControlled.js.map +1 -1
- package/dist/esm/components/summaryDetails/types/summaryDetails.d.ts +1 -1
- package/dist/esm/components/table/hooks/useContent.js +2 -2
- package/dist/esm/components/table/hooks/useContent.js.map +1 -1
- package/dist/esm/components/tabs/tabs.styled.d.ts +3 -1
- package/dist/esm/components/tabs/tabs.styled.js +13 -0
- package/dist/esm/components/tabs/tabs.styled.js.map +1 -1
- package/dist/esm/components/tabs/tabsStandAlone.js +17 -4
- package/dist/esm/components/tabs/tabsStandAlone.js.map +1 -1
- package/dist/esm/components/tabs/types/state.d.ts +4 -1
- package/dist/esm/components/tabs/types/state.js +3 -0
- package/dist/esm/components/tabs/types/state.js.map +1 -1
- package/dist/esm/components/tabs/types/tabs.d.ts +2 -0
- package/dist/esm/components/tagV2/tagStandAlone.js +1 -1
- package/dist/esm/components/tagV2/tagStandAlone.js.map +1 -1
- package/dist/esm/components/tagV2/types/tag.d.ts +1 -0
- package/dist/esm/components/toggle/components/toggleThreePosition.js +3 -3
- package/dist/esm/components/toggle/components/toggleThreePosition.js.map +1 -1
- package/dist/esm/components/toggle/components/toggleTwoPositions.js +1 -1
- package/dist/esm/components/toggle/components/toggleTwoPositions.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabel.styled.d.ts +4 -2
- package/dist/esm/components/toggleWithLabel/toggleWithLabel.styled.js +39 -4
- package/dist/esm/components/toggleWithLabel/toggleWithLabel.styled.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabelControlled.js +8 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabelControlled.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabelStandAlone.js +3 -2
- package/dist/esm/components/toggleWithLabel/toggleWithLabelStandAlone.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabelUncontrolled.d.ts +1 -1
- package/dist/esm/components/toggleWithLabel/toggleWithLabelUncontrolled.js +5 -2
- package/dist/esm/components/toggleWithLabel/toggleWithLabelUncontrolled.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/types/index.d.ts +2 -1
- package/dist/esm/components/toggleWithLabel/types/index.js +1 -1
- package/dist/esm/components/toggleWithLabel/types/index.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/types/toggleWithLabel.d.ts +14 -2
- package/dist/esm/components/toggleWithLabel/types/toggleWithLabel.js +6 -1
- package/dist/esm/components/toggleWithLabel/types/toggleWithLabel.js.map +1 -1
- package/dist/esm/components/toggleWithLabel/types/toggleWithLabelTheme.d.ts +5 -3
- package/dist/esm/components/tooltip/positioning/utils/detectOverflow.js.map +1 -1
- package/dist/esm/designSystem/kubit/components/footer/styles.js +1 -0
- package/dist/esm/designSystem/kubit/components/footer/styles.js.map +1 -1
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/index.d.ts +2 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/index.js +3 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/index.js.map +1 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/styles.d.ts +3 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/styles.js +106 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/styles.js.map +1 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/variants.d.ts +3 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/variants.js +5 -0
- package/dist/esm/designSystem/kubit/components/inputDigitSequence/variants.js.map +1 -0
- package/dist/esm/designSystem/kubit/components/oliveMenu/styles.js +5 -0
- package/dist/esm/designSystem/kubit/components/oliveMenu/styles.js.map +1 -1
- package/dist/esm/designSystem/kubit/components/styles.d.ts +1 -0
- package/dist/esm/designSystem/kubit/components/styles.js +1 -0
- package/dist/esm/designSystem/kubit/components/styles.js.map +1 -1
- package/dist/esm/designSystem/kubit/components/variants.d.ts +1 -0
- package/dist/esm/designSystem/kubit/components/variants.js +1 -0
- package/dist/esm/designSystem/kubit/components/variants.js.map +1 -1
- package/dist/esm/designSystem/kubit/fonts/Digit_Password_Large_Square.ttf +0 -0
- package/dist/esm/designSystem/kubit/fonts/Digit_Password_Small_Square.ttf +0 -0
- package/dist/esm/designSystem/kubit/foundations/typography.d.ts +2 -0
- package/dist/esm/designSystem/kubit/foundations/typography.js +2 -0
- package/dist/esm/designSystem/kubit/foundations/typography.js.map +1 -1
- package/dist/esm/designSystem/kubit/globalStyles/font.css +12 -0
- package/dist/esm/designSystem/kubit/globalStyles/fonts.js +14 -0
- package/dist/esm/designSystem/kubit/globalStyles/fonts.js.map +1 -1
- package/dist/esm/designSystem/kubit/index.d.ts +4 -0
- package/dist/esm/designSystem/variants.d.ts +1 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useElementBoundingClientRect/useElementBoundingClientRect.d.ts +18 -0
- package/dist/esm/hooks/useElementBoundingClientRect/useElementBoundingClientRect.js +30 -0
- package/dist/esm/hooks/useElementBoundingClientRect/useElementBoundingClientRect.js.map +1 -0
- package/dist/esm/hooks/useInput/types/inputHook.d.ts +3 -0
- package/dist/esm/hooks/useInput/useInput.js +10 -0
- package/dist/esm/hooks/useInput/useInput.js.map +1 -1
- package/dist/esm/hooks/useZoomEffect/useZoomEffect.js +4 -7
- package/dist/esm/hooks/useZoomEffect/useZoomEffect.js.map +1 -1
- package/dist/esm/styles/mixins/input.mixin.d.ts +1 -1
- package/dist/esm/styles/mixins/input.mixin.js +4 -4
- package/dist/esm/styles/mixins/input.mixin.js.map +1 -1
- package/dist/esm/utils/date/date.js +3 -2
- package/dist/esm/utils/date/date.js.map +1 -1
- package/dist/esm/utils/date/formatDate.d.ts +3 -0
- package/dist/esm/utils/date/formatDate.js +62 -0
- package/dist/esm/utils/date/formatDate.js.map +1 -0
- package/dist/esm/utils/date/index.d.ts +2 -1
- package/dist/esm/utils/date/index.js +2 -1
- package/dist/esm/utils/date/index.js.map +1 -1
- package/dist/esm/utils/date/transformDate.js +3 -12
- package/dist/esm/utils/date/transformDate.js.map +1 -1
- package/dist/esm/utils/date/validateDate.d.ts +1 -0
- package/dist/esm/utils/date/validateDate.js +4 -0
- package/dist/esm/utils/date/validateDate.js.map +1 -0
- package/dist/esm/utils/focusHandlers/focusHandlers.d.ts +24 -0
- package/dist/esm/utils/focusHandlers/focusHandlers.js +31 -0
- package/dist/esm/utils/focusHandlers/focusHandlers.js.map +1 -1
- package/package.json +33 -33
- package/dist/cjs/components/footer/components/footerContent.js +0 -15
- package/dist/cjs/components/footer/components/footerContent.js.map +0 -1
- package/dist/esm/components/footer/components/footerContent.d.ts +0 -13
- package/dist/esm/components/footer/components/footerContent.js +0 -11
- package/dist/esm/components/footer/components/footerContent.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
type UseAnimationParamsType = {
|
|
3
|
+
animated: boolean;
|
|
4
|
+
};
|
|
5
|
+
type UseAnimationResponseType = {
|
|
6
|
+
boxesAnimationDone: boolean;
|
|
7
|
+
labelAnimationDone: boolean;
|
|
8
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const useAnimation: (props: UseAnimationParamsType) => UseAnimationResponseType;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
export const useAnimation = (props) => {
|
|
3
|
+
const [boxesAnimationDone, setBoxesAnimationDone] = useState(false);
|
|
4
|
+
const [labelAnimationDone, setLabelAnimationDone] = useState(false);
|
|
5
|
+
const moveBoxesToTheirPosition = useCallback(() => {
|
|
6
|
+
const rootElement = innerRef.current;
|
|
7
|
+
// Do no continue if the root element is not present
|
|
8
|
+
if (!rootElement) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
// Retrieve original input container
|
|
12
|
+
const inputContainer = rootElement.querySelector('[data-id="input-container"]');
|
|
13
|
+
// Retrieve animated input container
|
|
14
|
+
const inputContainerAnimated = rootElement.querySelector('[data-id="input-container-animated"]');
|
|
15
|
+
// Do not continue if the animated input container is not present
|
|
16
|
+
if (!inputContainerAnimated?.children) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// Do not continue if the original input container child has no width
|
|
20
|
+
const innerElementWidth = inputContainerAnimated?.firstElementChild?.clientWidth;
|
|
21
|
+
if (!innerElementWidth) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// For each animated container child
|
|
25
|
+
// * Fix the width
|
|
26
|
+
// * Initialise position as absolute
|
|
27
|
+
// * Set transition
|
|
28
|
+
for (let i = 0; i < inputContainerAnimated.childNodes.length; i++) {
|
|
29
|
+
const inputContainer = inputContainerAnimated.childNodes[i];
|
|
30
|
+
if (inputContainer.style) {
|
|
31
|
+
inputContainer.style.width = `${innerElementWidth}px`;
|
|
32
|
+
inputContainer.style.position = 'absolute';
|
|
33
|
+
inputContainer.style.left = '0px';
|
|
34
|
+
inputContainer.style.top = '0px';
|
|
35
|
+
inputContainer.style.transition = 'left 250ms ease-in';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// There is a diff between the left of the first element in the original container and the left of the first element in the animated container
|
|
39
|
+
const elementsGap = inputContainer?.firstElementChild?.getBoundingClientRect().left ?? 0;
|
|
40
|
+
// For each animated container child set the left as its respective in the original container
|
|
41
|
+
for (let i = 0; i < inputContainerAnimated.childNodes.length; i++) {
|
|
42
|
+
const originalElement = inputContainer?.childNodes[i];
|
|
43
|
+
if (!originalElement) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
// Original element left
|
|
47
|
+
const originalElementLeft = originalElement.getBoundingClientRect().left;
|
|
48
|
+
const element = inputContainerAnimated.childNodes[i];
|
|
49
|
+
if (element.style) {
|
|
50
|
+
element.style.left = `${originalElementLeft - elementsGap}px`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
const moveBoxesFinished = useRef(false);
|
|
55
|
+
const handleFinishMovingBoxes = useCallback(() => {
|
|
56
|
+
if (moveBoxesFinished.current) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
moveBoxesFinished.current = true;
|
|
60
|
+
setBoxesAnimationDone(true);
|
|
61
|
+
}, []);
|
|
62
|
+
const increaseLabelHeightFinished = useRef(false);
|
|
63
|
+
const handleFinishIncreasingLabelHeight = useCallback(() => {
|
|
64
|
+
if (increaseLabelHeightFinished.current) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
increaseLabelHeightFinished.current = true;
|
|
68
|
+
setLabelAnimationDone(true);
|
|
69
|
+
}, []);
|
|
70
|
+
const innerRef = useRef(null);
|
|
71
|
+
const initialiseRef = useCallback((node) => {
|
|
72
|
+
if (!props.animated) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (innerRef.current) {
|
|
76
|
+
// remove event listeners
|
|
77
|
+
const inputContainerAnimated = innerRef.current.querySelector('[data-id="input-container-animated"]')?.firstElementChild;
|
|
78
|
+
inputContainerAnimated?.removeEventListener('transitionend', handleFinishMovingBoxes);
|
|
79
|
+
inputContainerAnimated?.removeEventListener('animationend', handleFinishIncreasingLabelHeight);
|
|
80
|
+
}
|
|
81
|
+
innerRef.current = node;
|
|
82
|
+
if (innerRef.current) {
|
|
83
|
+
// add event listeners
|
|
84
|
+
const inputContainerAnimated = innerRef.current.querySelector('[data-id="input-container-animated"]');
|
|
85
|
+
inputContainerAnimated?.addEventListener('transitionend', handleFinishMovingBoxes);
|
|
86
|
+
inputContainerAnimated?.addEventListener('animationend', handleFinishIncreasingLabelHeight);
|
|
87
|
+
moveBoxesToTheirPosition();
|
|
88
|
+
}
|
|
89
|
+
}, []);
|
|
90
|
+
return {
|
|
91
|
+
boxesAnimationDone,
|
|
92
|
+
labelAnimationDone,
|
|
93
|
+
ref: initialiseRef,
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=useAnimation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimation.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/hooks/useAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAY3D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAA6B,EAA4B,EAAE;IACtF,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpE,MAAM,wBAAwB,GAAG,WAAW,CAAC,GAAG,EAAE;QAChD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC;QACrC,oDAAoD;QACpD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,oCAAoC;QACpC,MAAM,cAAc,GAAG,WAAW,CAAC,aAAa,CAAC,6BAA6B,CAAC,CAAC;QAChF,oCAAoC;QACpC,MAAM,sBAAsB,GAAG,WAAW,CAAC,aAAa,CACtD,sCAAsC,CACvC,CAAC;QACF,iEAA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AAC;YAErB,sBAAsB,EAAE,mBAAmB,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC;YACtF,sBAAsB,EAAE,mBAAmB,CACzC,cAAc,EACd,iCAAiC,CAClC,CAAC;QACJ,CAAC;QACD,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrB,sBAAsB;YACtB,MAAM,sBAAsB,GAAG,QAAQ,CAAC,OAAO,CAAC,aAAa,CAC3D,sCAAsC,CACvC,CAAC;YACF,sBAAsB,EAAE,gBAAgB,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC;YACnF,sBAAsB,EAAE,gBAAgB,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;YAC5F,wBAAwB,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,kBAAkB;QAClB,kBAAkB;QAClB,GAAG,EAAE,aAAa;KACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/inputDigitSequence/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,IAAI,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACxG,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InputDigitSequenceStyles } from './types';
|
|
2
|
+
export declare const ParentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
styles?: InputDigitSequenceStyles;
|
|
4
|
+
}>> & string;
|
|
5
|
+
export declare const TitleTooltipContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
|
+
styles?: InputDigitSequenceStyles;
|
|
7
|
+
}>> & string;
|
|
8
|
+
export declare const AnimationInputsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
9
|
+
styles?: InputDigitSequenceStyles;
|
|
10
|
+
}>> & string;
|
|
11
|
+
export declare const InputDigitsContainerAnimated: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
12
|
+
styles?: InputDigitSequenceStyles;
|
|
13
|
+
animated: boolean;
|
|
14
|
+
boxesAnimationDone: boolean;
|
|
15
|
+
}>> & string;
|
|
16
|
+
export declare const InputDigitsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
|
+
styles?: InputDigitSequenceStyles;
|
|
18
|
+
animated: boolean;
|
|
19
|
+
boxesAnimationDone: boolean;
|
|
20
|
+
labelAnimationDone: boolean;
|
|
21
|
+
}>> & string;
|
|
22
|
+
export declare const InputDigitAndNumberContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
23
|
+
styles?: InputDigitSequenceStyles;
|
|
24
|
+
animated: boolean;
|
|
25
|
+
boxesAnimationDone: boolean;
|
|
26
|
+
}>> & string;
|
|
27
|
+
export declare const InputDigitStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
28
|
+
styles?: InputDigitSequenceStyles;
|
|
29
|
+
error?: boolean;
|
|
30
|
+
}>> & string;
|
|
31
|
+
export declare const IconAndErrorTextContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
32
|
+
styles?: InputDigitSequenceStyles;
|
|
33
|
+
}>> & string;
|
|
34
|
+
export declare const HelpTextContainerStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
35
|
+
styles?: InputDigitSequenceStyles;
|
|
36
|
+
}>> & string;
|
|
37
|
+
export declare const ButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
38
|
+
styles?: InputDigitSequenceStyles;
|
|
39
|
+
}>> & string;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
2
|
+
import { inputFocusWidthMixin } from '../../styles/mixins';
|
|
3
|
+
import { getStyles, getTypographyStyles } from '../../utils';
|
|
4
|
+
export const ParentContainer = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
${({ styles }) => getStyles(styles?.rootContainer)};
|
|
8
|
+
`;
|
|
9
|
+
export const TitleTooltipContainer = styled.div `
|
|
10
|
+
${({ styles }) => getStyles(styles?.titleTooltipContainer)};
|
|
11
|
+
`;
|
|
12
|
+
export const AnimationInputsContainer = styled.div `
|
|
13
|
+
${({ styles }) => getStyles(styles?.animationInputsContainer)};
|
|
14
|
+
`;
|
|
15
|
+
const increaseLabelHeight = (props) => keyframes `
|
|
16
|
+
0% {
|
|
17
|
+
height: 0rem;
|
|
18
|
+
}
|
|
19
|
+
100% {
|
|
20
|
+
height: ${props.height};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export const InputDigitsContainerAnimated = styled.div `
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: end;
|
|
26
|
+
${({ styles }) => getStyles(styles?.inputDigitsContainer)};
|
|
27
|
+
${({ animated }) => animated &&
|
|
28
|
+
css `
|
|
29
|
+
p,
|
|
30
|
+
label {
|
|
31
|
+
height: 0rem;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
`};
|
|
35
|
+
${({ boxesAnimationDone, styles }) => boxesAnimationDone &&
|
|
36
|
+
css `
|
|
37
|
+
p,
|
|
38
|
+
label {
|
|
39
|
+
animation: ${increaseLabelHeight({ height: styles?.inputNumber?.line_height })} 250ms
|
|
40
|
+
forwards;
|
|
41
|
+
}
|
|
42
|
+
`};
|
|
43
|
+
`;
|
|
44
|
+
export const InputDigitsContainer = styled.div `
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: end;
|
|
47
|
+
${({ styles }) => getStyles(styles?.inputDigitsContainer)};
|
|
48
|
+
${({ animated }) => animated &&
|
|
49
|
+
css `
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
p,
|
|
52
|
+
label {
|
|
53
|
+
height: 0rem;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
`};
|
|
57
|
+
${({ boxesAnimationDone, styles }) => boxesAnimationDone &&
|
|
58
|
+
css `
|
|
59
|
+
p,
|
|
60
|
+
label {
|
|
61
|
+
animation: ${increaseLabelHeight({ height: styles?.inputNumber?.line_height })} 250ms
|
|
62
|
+
forwards;
|
|
63
|
+
}
|
|
64
|
+
`};
|
|
65
|
+
|
|
66
|
+
${({ labelAnimationDone }) => labelAnimationDone &&
|
|
67
|
+
css `
|
|
68
|
+
visibility: visible;
|
|
69
|
+
`};
|
|
70
|
+
`;
|
|
71
|
+
const increaseGap = (props) => keyframes `
|
|
72
|
+
0% {
|
|
73
|
+
row-gap: 0rem;
|
|
74
|
+
gap: 0rem;
|
|
75
|
+
}
|
|
76
|
+
100% {
|
|
77
|
+
gap: ${props.gap};
|
|
78
|
+
row-gap: ${props.row_gap};
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
export const InputDigitAndNumberContainer = styled.div `
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
height: 100%;
|
|
85
|
+
align-items: center;
|
|
86
|
+
${({ styles }) => getStyles(styles?.inputDigitAndNumberContainer)};
|
|
87
|
+
${({ animated }) => animated &&
|
|
88
|
+
css `
|
|
89
|
+
row-gap: 0rem;
|
|
90
|
+
gap: 0rem;
|
|
91
|
+
`};
|
|
92
|
+
${({ boxesAnimationDone, styles }) => boxesAnimationDone &&
|
|
93
|
+
css `
|
|
94
|
+
animation: ${increaseGap({
|
|
95
|
+
row_gap: styles?.inputDigitAndNumberContainer?.row_gap,
|
|
96
|
+
gap: styles?.inputDigitAndNumberContainer?.gap,
|
|
97
|
+
})}
|
|
98
|
+
250ms forwards;
|
|
99
|
+
`};
|
|
100
|
+
`;
|
|
101
|
+
export const InputDigitStyled = styled.input `
|
|
102
|
+
text-align: center;
|
|
103
|
+
border-style: solid;
|
|
104
|
+
${({ styles }) => getTypographyStyles(styles?.inputDigitText)};
|
|
105
|
+
${({ styles }) => getStyles(styles?.inputDigitContainer)};
|
|
106
|
+
|
|
107
|
+
${({ styles, error }) => error && getStyles(styles?.inputDigitContainerError)};
|
|
108
|
+
|
|
109
|
+
:focus {
|
|
110
|
+
${({ styles }) => getStyles(styles?.inputDigitContainerfocus)};
|
|
111
|
+
}
|
|
112
|
+
&:focus-visible {
|
|
113
|
+
${inputFocusWidthMixin}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[type='password'] {
|
|
117
|
+
${({ styles }) => getTypographyStyles(styles?.inputDigitTextTypePassword)}
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
export const IconAndErrorTextContainer = styled.div `
|
|
121
|
+
display: flex;
|
|
122
|
+
${({ styles }) => getStyles(styles?.errorContainer)};
|
|
123
|
+
`;
|
|
124
|
+
export const HelpTextContainerStyled = styled.div `
|
|
125
|
+
${({ styles }) => getStyles(styles?.helpTextContainer)};
|
|
126
|
+
`;
|
|
127
|
+
export const ButtonContainer = styled.div `
|
|
128
|
+
${({ styles }) => getStyles(styles?.actionButtonContainer)};
|
|
129
|
+
`;
|
|
130
|
+
//# sourceMappingURL=inputDigitSequence.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequence.styled.js","sourceRoot":"","sources":["../../../../src/components/inputDigitSequence/inputDigitSequence.styled.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAIzD,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAEvC;;;IAGE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAE7C;IACE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,qBAAqB,CAAC;CAC3D,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAEhD;IACE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,wBAAwB,CAAC;CAC9D,CAAC;AAMF,MAAM,mBAAmB,GAAG,CAAC,KAA8B,EAAE,EAAE,CAC7D,SAAS,CAAA;;;;;cAKG,KAAK,CAAC,MAAM;;CAEzB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,C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,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,qBAAqB,CAAC;CAC3D,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useId } from '../../hooks/useId/useId';
|
|
4
|
+
import { useStyles } from '../../hooks/useStyles/useStyles';
|
|
5
|
+
import { ErrorBoundary, FallbackComponent } from '../../provider/errorBoundary';
|
|
6
|
+
import { InputDropdownStandAlone } from '../inputDropdown/inputDropdownStandAlone';
|
|
7
|
+
import { useAnimation } from './hooks';
|
|
8
|
+
import { InputDigitSequenceStandAlone } from './inputDigitSequenceStandAlone';
|
|
9
|
+
import { InputDigitSequenceStateType, } from './types';
|
|
10
|
+
//constants
|
|
11
|
+
const INPUT_DIGIT_SEQUENCE_STYLES = 'INPUT_DIGIT_SEQUENCE_STYLES';
|
|
12
|
+
const NUMBER_REGEX = /^[0-9]*$/;
|
|
13
|
+
const ON_CHANGE_VALUE_VISIBLE_TIMEOUT = 500;
|
|
14
|
+
const InputDigitSequenceControlledComponet = ({ variant, inputsArray, disabled = false, showDigitAfterWrite = true, showDigitTimeMiliseconds = ON_CHANGE_VALUE_VISIBLE_TIMEOUT, animated = false, ctv, ...props }) => {
|
|
15
|
+
const styles = useStyles(INPUT_DIGIT_SEQUENCE_STYLES, variant, ctv);
|
|
16
|
+
const digitId = useId('digit');
|
|
17
|
+
const [showPassword, setShowPassword] = React.useState(false);
|
|
18
|
+
const [inputDigits, setInputDigits] = React.useState(inputsArray.map((input, index) => {
|
|
19
|
+
return {
|
|
20
|
+
index: index,
|
|
21
|
+
value: input.value ?? '',
|
|
22
|
+
blockedBySystem: input.blockedBySystem,
|
|
23
|
+
['aria-label']: input['aria-label'],
|
|
24
|
+
};
|
|
25
|
+
}));
|
|
26
|
+
const { ref, boxesAnimationDone, labelAnimationDone } = useAnimation({
|
|
27
|
+
animated,
|
|
28
|
+
});
|
|
29
|
+
const getNextInput = (index) => {
|
|
30
|
+
//we need to find the next input not BloquedBySystem
|
|
31
|
+
//we get a new array from the actual index + 1
|
|
32
|
+
const slicedInputDigits = inputDigits.slice(index + 1);
|
|
33
|
+
//we get the first element with isBloquedBySystem=false
|
|
34
|
+
const nextInputNotDisabled = slicedInputDigits.find(input => !input.blockedBySystem);
|
|
35
|
+
if (nextInputNotDisabled) {
|
|
36
|
+
const inputElement = document.getElementById(`${digitId}-${nextInputNotDisabled.index}`);
|
|
37
|
+
inputElement?.focus();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const [passwordIndex, setPasswordIndex] = React.useState();
|
|
41
|
+
const displayDigitTimeOut = React.useRef(null);
|
|
42
|
+
// When unmount, delete displayDigitTimeOut
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
return () => {
|
|
45
|
+
if (displayDigitTimeOut.current) {
|
|
46
|
+
clearTimeout(displayDigitTimeOut.current);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}, []);
|
|
50
|
+
const showDigit = (index) => {
|
|
51
|
+
if (!showDigitAfterWrite) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// Set visible the current index showDigitTimeMiliseconds (or change)
|
|
55
|
+
if (displayDigitTimeOut.current) {
|
|
56
|
+
clearTimeout(displayDigitTimeOut.current);
|
|
57
|
+
}
|
|
58
|
+
setPasswordIndex(index);
|
|
59
|
+
displayDigitTimeOut.current = setTimeout(() => {
|
|
60
|
+
setPasswordIndex(undefined);
|
|
61
|
+
}, showDigitTimeMiliseconds);
|
|
62
|
+
};
|
|
63
|
+
const handleInputChange = (index) => {
|
|
64
|
+
return event => {
|
|
65
|
+
const { value } = event.target;
|
|
66
|
+
//we only allow number values
|
|
67
|
+
if (NUMBER_REGEX.test(value)) {
|
|
68
|
+
showDigit(index);
|
|
69
|
+
const newDigits = [...inputDigits];
|
|
70
|
+
newDigits[index].value = value;
|
|
71
|
+
setInputDigits(newDigits);
|
|
72
|
+
//when the user writes a new digit, we send the new array in case they want to check something
|
|
73
|
+
props.onInputChange?.(newDigits, event);
|
|
74
|
+
if (value !== '') {
|
|
75
|
+
getNextInput(index);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
const handleClickActionButton = event => {
|
|
81
|
+
setShowPassword(prevValue => !prevValue);
|
|
82
|
+
props.actionButton?.onClick?.(event);
|
|
83
|
+
};
|
|
84
|
+
const state = !disabled
|
|
85
|
+
? InputDigitSequenceStateType.DEFAULT
|
|
86
|
+
: InputDigitSequenceStateType.DISABLED;
|
|
87
|
+
return (_jsx(InputDigitSequenceStandAlone, { ...props, ref: ref, animated: animated, boxesAnimationDone: boxesAnimationDone, digitId: digitId, disabled: disabled, inputDigits: inputDigits, labelAnimationDone: labelAnimationDone, passwordIndex: passwordIndex, showPassword: showPassword, state: state, styles: styles, onActionButtonClick: handleClickActionButton, onInputChange: handleInputChange }));
|
|
88
|
+
};
|
|
89
|
+
const InputDigitSequenceBoundary = (props) => (_jsx(ErrorBoundary, { fallBackComponent: _jsx(FallbackComponent, { children: _jsx(InputDropdownStandAlone, { ...props }) }), children: _jsx(InputDigitSequenceControlledComponet, { ...props }) }));
|
|
90
|
+
export const InputDigitSequenceControlled = InputDigitSequenceBoundary;
|
|
91
|
+
//# sourceMappingURL=inputDigitSequenceControlled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequenceControlled.js","sourceRoot":"","sources":["../../../../src/components/inputDigitSequence/inputDigitSequenceControlled.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG5E,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,EAAE,kBAAkB,EACtC,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,uBAAuB,EAC5C,aAAa,EAAE,iBAAiB,GAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,KAAoC,EAAe,EAAE,CAAC,CACxF,KAAC,aAAa,IACZ,iBAAiB,EACf,KAAC,iBAAiB,cAChB,KAAC,uBAAuB,OAAM,KAA6C,GAAI,GAC7D,YAGtB,KAAC,oCAAoC,OAAK,KAAK,GAAI,GACrC,CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Button, IconPositionType } from '../../components/button';
|
|
4
|
+
import { ElementOrIcon } from '../../components/elementOrIcon';
|
|
5
|
+
import { Text, TextComponentType } from '../../components/text';
|
|
6
|
+
import { AriaLiveOptionType } from '../../types';
|
|
7
|
+
import { InputDigit, InputDigitSequenceHelpText, InputDigitSequenceTooltip } from './components';
|
|
8
|
+
import { AnimationInputsContainer, ButtonContainer, IconAndErrorTextContainer, InputDigitsContainer, InputDigitsContainerAnimated, ParentContainer, TitleTooltipContainer, } from './inputDigitSequence.styled';
|
|
9
|
+
const InputDigitSequenceStandAloneComponent = ({ error = false, inputMode = 'numeric', dataTestId = 'inputDigitSequence', ...props }, ref) => {
|
|
10
|
+
const stateStyles = props.styles?.[props.state];
|
|
11
|
+
return (_jsxs(ParentContainer, { ref: ref, "data-testid": dataTestId, styles: stateStyles, children: [_jsxs(TitleTooltipContainer, { styles: stateStyles, children: [_jsx(Text, { component: TextComponentType.PARAGRAPH, customTypography: stateStyles?.title, ...props.title, children: props.title?.content }), _jsx(InputDigitSequenceTooltip, { stateStyles: stateStyles, tooltip: props.tooltip, tooltipIcon: props.tooltipIcon })] }), _jsxs(AnimationInputsContainer, { styles: stateStyles, children: [props.animated && !props.labelAnimationDone && (_jsx(InputDigitsContainerAnimated, { animated: props.animated, "aria-hidden": true, boxesAnimationDone: props.boxesAnimationDone, "data-id": "input-container-animated", styles: stateStyles, children: props.inputDigits.map((_, index) => {
|
|
12
|
+
return (_jsx(InputDigit, { animated: props.animated, ariaHidden: true, boxesAnimationDone: props.boxesAnimationDone, disabled: true, label: index + 1, state: props.state, styles: props.styles, tabIndex: -1 }, index));
|
|
13
|
+
}) })), _jsx(InputDigitsContainer, { animated: props.animated, boxesAnimationDone: props.boxesAnimationDone, "data-id": "input-container", labelAnimationDone: props.labelAnimationDone, styles: stateStyles, children: props.inputDigits.map((inputDigit, index) => {
|
|
14
|
+
return (_jsx(InputDigit, { animated: props.animated, boxesAnimationDone: props.boxesAnimationDone, disabled: props.disabled, error: error, inputDigit: inputDigit, inputId: `${props.digitId}-${index}`, inputMode: inputMode, label: index + 1, showPassword: props.showPassword || props.passwordIndex === index, state: props.state, styles: props.styles, onChange: props.onInputChange(index) }, index));
|
|
15
|
+
}) })] }), _jsx(IconAndErrorTextContainer, { "aria-live": AriaLiveOptionType.POLITE, styles: stateStyles, children: error && !!props.errorText && (_jsxs(_Fragment, { children: [_jsx(ElementOrIcon, { customIconStyles: stateStyles?.errorIcon, ...props.errorIcon }), _jsx(Text, { component: TextComponentType.PARAGRAPH, customTypography: stateStyles?.errorText, ...props.errorText, children: props.errorText.content })] })) }), _jsx(InputDigitSequenceHelpText, { dataTestId: `${dataTestId}HelpText`, helpText: props.helpText, styles: stateStyles }), props.actionButton?.content &&
|
|
16
|
+
(stateStyles?.actionButtonSize || props.actionButton?.size) && (_jsx(ButtonContainer, { styles: stateStyles, children: _jsx(Button, { disabled: props.disabled, iconPosition: IconPositionType.LEFT, size: stateStyles?.actionButtonSize, ...props.actionButton, onClick: props.onActionButtonClick, children: props.actionButton?.content }) }))] }));
|
|
17
|
+
};
|
|
18
|
+
export const InputDigitSequenceStandAlone = React.forwardRef(InputDigitSequenceStandAloneComponent);
|
|
19
|
+
//# sourceMappingURL=inputDigitSequenceStandAlone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequenceStandAlone.js","sourceRoot":"","sources":["../../../../src/components/inputDigitSequence/inputDigitSequenceStandAlone.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,oBAAoB,EACpB,4BAA4B,EAC5B,eAAe,EACf,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AAGrC,MAAM,qCAAqC,GAAG,CAC5C,EACE,KAAK,GAAG,KAAK,EACb,SAAS,GAAG,SAAS,EACrB,UAAU,GAAG,oBAAoB,EACjC,GAAG,KAAK,EACsB,EAChC,GAAuC,EAC1B,EAAE;IACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACL,MAAC,eAAe,IAAC,GAAG,EAAE,GAAG,iBAAe,UAAU,EAAE,MAAM,EAAE,WAAW,aACrE,MAAC,qBAAqB,IAAC,MAAM,EAAE,WAAW,aACxC,KAAC,IAAI,IACH,SAAS,EAAE,iBAAiB,CAAC,SAAS,EACtC,gBAAgB,EA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,EAAE,KAAK,CAAC,QAAQ,EACxB,YAAY,EAAE,gBAAgB,CAAC,IAAI,EACnC,IAAI,EAAE,WAAW,EAAE,gBAAgB,KAC/B,KAAK,CAAC,YAAY,EACtB,OAAO,EAAE,KAAK,CAAC,mBAAmB,YAEjC,KAAK,CAAC,YAAY,EAAE,OAAO,GACrB,GACO,CACnB,IACa,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,CAAC,UAAU,CAAC,qCAAqC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InputDigitSequenceControlled } from './inputDigitSequenceControlled';
|
|
3
|
+
export const InputDigitSequenceUncontrolled = ({ ...props }) => {
|
|
4
|
+
return _jsx(InputDigitSequenceControlled, { ...props });
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=inputDigitSequenceUncontrolled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequenceUncontrolled.js","sourceRoot":"","sources":["../../../../src/components/inputDigitSequence/inputDigitSequenceUncontrolled.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAG9E,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC7C,GAAG,KAAK,EACwB,EAAe,EAAE;IACjD,OAAO,KAAC,4BAA4B,OAAK,KAAK,GAAI,CAAC;AACrD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { IButton } from '../../../components/button';
|
|
2
|
+
import { IElementOrIcon } from '../../../components/elementOrIcon';
|
|
3
|
+
import { IText } from '../../../components/text';
|
|
4
|
+
import { ITooltipUnControlled } from '../../../components/tooltip/types';
|
|
5
|
+
import { CustomTokenTypes, InputModeType } from '../../../types';
|
|
6
|
+
import { InputDigitSequenceStateStyles } from './inputDigitSequenceTheme';
|
|
7
|
+
import { InputDigitSequenceStateType } from './state';
|
|
8
|
+
export type InputDigitSequenceTooltipType = Omit<ITooltipUnControlled, 'children' | 'variant'> & {
|
|
9
|
+
variant?: string;
|
|
10
|
+
};
|
|
11
|
+
export type InputDigitSequenceTextType = Omit<IText<string>, 'children'> & {
|
|
12
|
+
content?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export type InputDigiSequenceButtonType = Omit<IButton, 'children' | 'size'> & {
|
|
15
|
+
content: string;
|
|
16
|
+
size?: string;
|
|
17
|
+
};
|
|
18
|
+
export type InputsArrayType = {
|
|
19
|
+
blockedBySystem: boolean;
|
|
20
|
+
['aria-label']?: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
};
|
|
23
|
+
export type UseStateInputDigitsType = {
|
|
24
|
+
index: number;
|
|
25
|
+
value: string;
|
|
26
|
+
blockedBySystem: boolean;
|
|
27
|
+
['aria-label']?: string;
|
|
28
|
+
};
|
|
29
|
+
export interface IInputDigitSequenceStandAlone {
|
|
30
|
+
styles?: InputDigitSequenceStateStyles;
|
|
31
|
+
state: InputDigitSequenceStateType;
|
|
32
|
+
inputDigits: UseStateInputDigitsType[];
|
|
33
|
+
title?: InputDigitSequenceTextType;
|
|
34
|
+
tooltipIcon?: IElementOrIcon;
|
|
35
|
+
tooltip?: InputDigitSequenceTooltipType;
|
|
36
|
+
actionButton?: InputDigiSequenceButtonType;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
error?: boolean;
|
|
39
|
+
errorText?: InputDigitSequenceTextType;
|
|
40
|
+
helpText?: InputDigitSequenceTextType;
|
|
41
|
+
errorIcon?: IElementOrIcon;
|
|
42
|
+
showPassword: boolean;
|
|
43
|
+
passwordIndex?: number;
|
|
44
|
+
digitId: string;
|
|
45
|
+
onInputChange: (index: number) => React.ChangeEventHandler<HTMLInputElement>;
|
|
46
|
+
onActionButtonClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
47
|
+
inputMode?: InputModeType;
|
|
48
|
+
animated: boolean;
|
|
49
|
+
boxesAnimationDone: boolean;
|
|
50
|
+
labelAnimationDone: boolean;
|
|
51
|
+
dataTestId?: string;
|
|
52
|
+
}
|
|
53
|
+
type propsToOmit = 'styles' | 'state' | 'inputDigits' | 'getNextInput' | 'onInputChange' | 'onActionButtonClick' | 'showPassword' | 'passwordIndex' | 'digitId' | 'animated' | 'boxesAnimationDone' | 'labelAnimationDone';
|
|
54
|
+
export interface IInputDigitSequenceControlled extends Omit<IInputDigitSequenceStandAlone, propsToOmit>, Omit<CustomTokenTypes<InputDigitSequenceStateStyles>, 'cts' | 'extraCt'> {
|
|
55
|
+
variant: string;
|
|
56
|
+
animated?: boolean;
|
|
57
|
+
inputsArray: InputsArrayType[];
|
|
58
|
+
showDigitAfterWrite?: boolean;
|
|
59
|
+
showDigitTimeMiliseconds?: number;
|
|
60
|
+
onInputChange?: (value: UseStateInputDigitsType[], event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
61
|
+
}
|
|
62
|
+
export type IInputDigitSequenceUncontrolled = IInputDigitSequenceControlled;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequence.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/types/inputDigitSequence.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CommonStyleType, IconGenericType, IconTypes, TypographyTypes } from '../../../types';
|
|
2
|
+
import { InputDigitSequenceStateType } from './state';
|
|
3
|
+
export type InputDigitSequenceStyles = {
|
|
4
|
+
rootContainer?: CommonStyleType;
|
|
5
|
+
titleTooltipContainer?: CommonStyleType;
|
|
6
|
+
title?: TypographyTypes;
|
|
7
|
+
tooltipIcon?: IconTypes;
|
|
8
|
+
tooltip?: {
|
|
9
|
+
variant?: string;
|
|
10
|
+
};
|
|
11
|
+
animationInputsContainer?: CommonStyleType;
|
|
12
|
+
inputDigitsContainer?: CommonStyleType;
|
|
13
|
+
inputDigitAndNumberContainer?: CommonStyleType;
|
|
14
|
+
inputDigitContainer?: CommonStyleType;
|
|
15
|
+
inputDigitContainerError?: CommonStyleType;
|
|
16
|
+
inputDigitContainerfocus?: CommonStyleType;
|
|
17
|
+
inputDigitText?: TypographyTypes;
|
|
18
|
+
inputDigitTextTypePassword?: TypographyTypes;
|
|
19
|
+
inputNumber?: TypographyTypes;
|
|
20
|
+
errorContainer?: CommonStyleType;
|
|
21
|
+
errorText?: TypographyTypes;
|
|
22
|
+
errorIcon?: IconGenericType;
|
|
23
|
+
helpTextContainer?: CommonStyleType;
|
|
24
|
+
helpText?: TypographyTypes;
|
|
25
|
+
actionButtonContainer?: CommonStyleType;
|
|
26
|
+
actionButtonSize?: string;
|
|
27
|
+
};
|
|
28
|
+
export type InputDigitSequenceStateStyles = {
|
|
29
|
+
[state in InputDigitSequenceStateType]?: InputDigitSequenceStyles;
|
|
30
|
+
};
|
|
31
|
+
export type InputDigitSequenceStylesType<P extends string | number | symbol> = {
|
|
32
|
+
[key in P]: InputDigitSequenceStateStyles;
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDigitSequenceTheme.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/types/inputDigitSequenceTheme.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var InputDigitSequenceStateType;
|
|
2
|
+
(function (InputDigitSequenceStateType) {
|
|
3
|
+
InputDigitSequenceStateType["DEFAULT"] = "DEFAULT";
|
|
4
|
+
InputDigitSequenceStateType["DISABLED"] = "DISABLED";
|
|
5
|
+
InputDigitSequenceStateType["BLOCKED_BY_SYSTEM"] = "BLOCKED_BY_SYSTEM";
|
|
6
|
+
})(InputDigitSequenceStateType || (InputDigitSequenceStateType = {}));
|
|
7
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/components/inputDigitSequence/types/state.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,kDAAmB,CAAA;IACnB,oDAAqB,CAAA;IACrB,sEAAuC,CAAA;AACzC,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC"}
|