@proprioo/salatim 18.6.2 → 19.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/lib/date/src/DayPicker.js +3 -14
- package/lib/date/src/DayPicker.js.map +1 -1
- package/lib/date/src/datePicker/DatePicker.js +18 -51
- package/lib/date/src/datePicker/DatePicker.js.map +1 -1
- package/lib/date/src/datePicker/DatePicker.styles.js +25 -8
- package/lib/date/src/datePicker/DatePicker.styles.js.map +1 -1
- package/lib/date/src/datePicker/DatePicker.test.js +22 -71
- package/lib/date/src/datePicker/DatePicker.test.js.map +1 -1
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.js +22 -36
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.js.map +1 -1
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.stories.js +25 -36
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.stories.js.map +1 -1
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.test.js +55 -132
- package/lib/date/src/datePickerWrapper/DatePickerWrapper.test.js.map +1 -1
- package/lib/date/src/datePickerWrapper/DatepickerWrapper.styles.js +5 -10
- package/lib/date/src/datePickerWrapper/DatepickerWrapper.styles.js.map +1 -1
- package/lib/date/src/singleMonth/SingleMonth.js +9 -12
- package/lib/date/src/singleMonth/SingleMonth.js.map +1 -1
- package/lib/date/src/singleMonth/SingleMonth.stories.js +21 -32
- package/lib/date/src/singleMonth/SingleMonth.stories.js.map +1 -1
- package/lib/date/src/singleMonth/SingleMonth.styles.js +54 -9
- package/lib/date/src/singleMonth/SingleMonth.styles.js.map +1 -1
- package/lib/date/src/singleMonth/SingleMonth.test.js +18 -67
- package/lib/date/src/singleMonth/SingleMonth.test.js.map +1 -1
- package/lib/energy/src/Energy.js +17 -18
- package/lib/energy/src/Energy.js.map +1 -1
- package/lib/energy/src/Energy.stories.js +9 -20
- package/lib/energy/src/Energy.stories.js.map +1 -1
- package/lib/energy/src/Energy.styles.js +161 -45
- package/lib/energy/src/Energy.styles.js.map +1 -1
- package/lib/energy/src/Energy.test.js +13 -24
- package/lib/energy/src/Energy.test.js.map +1 -1
- package/lib/energy/src/Energy.utils.js +24 -29
- package/lib/energy/src/Energy.utils.js.map +1 -1
- package/lib/energy/src/Energy.utils.test.js +51 -51
- package/lib/energy/src/Energy.utils.test.js.map +1 -1
- package/lib/forms/src/userForm/UserForm.js +17 -37
- package/lib/forms/src/userForm/UserForm.js.map +1 -1
- package/lib/forms/src/userForm/UserForm.schema.d.ts +9 -9
- package/lib/forms/src/userForm/UserForm.schema.js +6 -6
- package/lib/forms/src/userForm/UserForm.schema.js.map +1 -1
- package/lib/forms/src/userForm/UserForm.stories.js +15 -15
- package/lib/forms/src/userForm/UserForm.stories.js.map +1 -1
- package/lib/forms/src/userForm/UserForm.styles.js +9 -10
- package/lib/forms/src/userForm/UserForm.styles.js.map +1 -1
- package/lib/forms/src/userForm/UserForm.test.js +56 -130
- package/lib/forms/src/userForm/UserForm.test.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +3 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useDebounce/useDebounce.js +6 -6
- package/lib/hooks/useDebounce/useDebounce.js.map +1 -1
- package/lib/hooks/useDebounce/useDebounce.test.js +12 -12
- package/lib/hooks/useDebounce/useDebounce.test.js.map +1 -1
- package/lib/hooks/useEmailSuggestion/useEmailSuggestion.js +11 -12
- package/lib/hooks/useEmailSuggestion/useEmailSuggestion.js.map +1 -1
- package/lib/hooks/useEmailSuggestion/useEmailSuggestion.test.js +16 -55
- package/lib/hooks/useEmailSuggestion/useEmailSuggestion.test.js.map +1 -1
- package/lib/hooks/useOnClickOutside/useOnClickOutside.d.ts +2 -0
- package/lib/hooks/useOnClickOutside/useOnClickOutside.js +30 -0
- package/lib/hooks/useOnClickOutside/useOnClickOutside.js.map +1 -0
- package/lib/index.js +2636 -4
- package/lib/index.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.js +11 -12
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.stories.js +9 -9
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.stories.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.styles.js +17 -13
- package/lib/phone/src/phoneAndFlag/PhoneAndFlag.styles.js.map +1 -1
- package/lib/phone/src/phoneAndFlag/PhoneAndFlags.test.js +14 -14
- package/lib/phone/src/phoneAndFlag/PhoneAndFlags.test.js.map +1 -1
- package/lib/phone/src/phoneInput/Phone.js +8 -9
- package/lib/phone/src/phoneInput/Phone.js.map +1 -1
- package/lib/phone/src/phoneInput/Phone.stories.js +26 -37
- package/lib/phone/src/phoneInput/Phone.stories.js.map +1 -1
- package/lib/phone/src/phoneInput/Phone.styles.js +60 -13
- package/lib/phone/src/phoneInput/Phone.styles.js.map +1 -1
- package/lib/phone/src/phoneInput/Phone.test.js +57 -131
- package/lib/phone/src/phoneInput/Phone.test.js.map +1 -1
- package/lib/phone/src/phoneInput/PhoneInput.js +5 -8
- package/lib/phone/src/phoneInput/PhoneInput.js.map +1 -1
- package/lib/phone/src/phoneInput/constant.d.ts +3 -2
- package/lib/phone/src/phoneInput/constant.js.map +1 -1
- package/lib/phone/src/utils.d.ts +2 -1
- package/lib/phone/src/utils.js +6 -6
- package/lib/phone/src/utils.js.map +1 -1
- package/lib/phone/src/utils.test.js +6 -6
- package/lib/phone/src/utils.test.js.map +1 -1
- package/lib/setupTests.js +22 -46
- package/lib/setupTests.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.js +3 -6
- package/lib/ui/src/accordion/Accordion.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.stories.js +38 -51
- package/lib/ui/src/accordion/Accordion.stories.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.styles.js +81 -33
- package/lib/ui/src/accordion/Accordion.styles.js.map +1 -1
- package/lib/ui/src/accordion/Accordion.test.js +73 -129
- package/lib/ui/src/accordion/Accordion.test.js.map +1 -1
- package/lib/ui/src/accordion/AccordionContextConsumer.js +3 -6
- package/lib/ui/src/accordion/AccordionContextConsumer.js.map +1 -1
- package/lib/ui/src/accordion/AccordionContextProvider.js +19 -37
- package/lib/ui/src/accordion/AccordionContextProvider.js.map +1 -1
- package/lib/ui/src/accordion/AccordionHeader.js +8 -14
- package/lib/ui/src/accordion/AccordionHeader.js.map +1 -1
- package/lib/ui/src/accordion/AccordionItem.js +7 -13
- package/lib/ui/src/accordion/AccordionItem.js.map +1 -1
- package/lib/ui/src/accordion/AccordionPanel.js +4 -10
- package/lib/ui/src/accordion/AccordionPanel.js.map +1 -1
- package/lib/ui/src/accordion/AccordionStore.js +14 -36
- package/lib/ui/src/accordion/AccordionStore.js.map +1 -1
- package/lib/ui/src/accordion/ItemContextConsumer.js +3 -6
- package/lib/ui/src/accordion/ItemContextConsumer.js.map +1 -1
- package/lib/ui/src/accordion/ItemContextProvider.js +10 -22
- package/lib/ui/src/accordion/ItemContextProvider.js.map +1 -1
- package/lib/ui/src/agentBanner/AgentBanner.js +13 -16
- package/lib/ui/src/agentBanner/AgentBanner.js.map +1 -1
- package/lib/ui/src/agentBanner/AgentBanner.stories.js +8 -8
- package/lib/ui/src/agentBanner/AgentBanner.stories.js.map +1 -1
- package/lib/ui/src/agentBanner/AgentBanner.styles.js +61 -18
- package/lib/ui/src/agentBanner/AgentBanner.styles.js.map +1 -1
- package/lib/ui/src/agentBanner/AgentBanner.test.js +13 -24
- package/lib/ui/src/agentBanner/AgentBanner.test.js.map +1 -1
- package/lib/ui/src/agentCard/AgentCard.js +19 -22
- package/lib/ui/src/agentCard/AgentCard.js.map +1 -1
- package/lib/ui/src/agentCard/AgentCard.stories.js +9 -9
- package/lib/ui/src/agentCard/AgentCard.stories.js.map +1 -1
- package/lib/ui/src/agentCard/AgentCard.styles.js +83 -16
- package/lib/ui/src/agentCard/AgentCard.styles.js.map +1 -1
- package/lib/ui/src/agentCard/AgentCard.test.js +21 -32
- package/lib/ui/src/agentCard/AgentCard.test.js.map +1 -1
- package/lib/ui/src/autocomplete/Autocomplete.js +16 -33
- package/lib/ui/src/autocomplete/Autocomplete.js.map +1 -1
- package/lib/ui/src/autocomplete/Autocomplete.stories.js +30 -41
- package/lib/ui/src/autocomplete/Autocomplete.stories.js.map +1 -1
- package/lib/ui/src/autocomplete/Autocomplete.test.js +67 -167
- package/lib/ui/src/autocomplete/Autocomplete.test.js.map +1 -1
- package/lib/ui/src/background/Background.styles.js +40 -17
- package/lib/ui/src/background/Background.styles.js.map +1 -1
- package/lib/ui/src/block/Block.js +5 -8
- package/lib/ui/src/block/Block.js.map +1 -1
- package/lib/ui/src/block/Block.stories.js +10 -10
- package/lib/ui/src/block/Block.stories.js.map +1 -1
- package/lib/ui/src/block/Block.styles.js +59 -24
- package/lib/ui/src/block/Block.styles.js.map +1 -1
- package/lib/ui/src/block/Block.test.js +11 -11
- package/lib/ui/src/block/Block.test.js.map +1 -1
- package/lib/ui/src/blockIcon/BlockIcon.js +5 -6
- package/lib/ui/src/blockIcon/BlockIcon.js.map +1 -1
- package/lib/ui/src/blockIcon/BlockIcon.stories.js +15 -15
- package/lib/ui/src/blockIcon/BlockIcon.stories.js.map +1 -1
- package/lib/ui/src/blockIcon/BlockIcon.styles.js +53 -14
- package/lib/ui/src/blockIcon/BlockIcon.styles.js.map +1 -1
- package/lib/ui/src/blockIcon/BlockIcon.test.js +21 -67
- package/lib/ui/src/blockIcon/BlockIcon.test.js.map +1 -1
- package/lib/ui/src/burger/Burger.js +6 -9
- package/lib/ui/src/burger/Burger.js.map +1 -1
- package/lib/ui/src/burger/Burger.stories.js +14 -27
- package/lib/ui/src/burger/Burger.stories.js.map +1 -1
- package/lib/ui/src/burger/Burger.styles.js +88 -23
- package/lib/ui/src/burger/Burger.styles.js.map +1 -1
- package/lib/ui/src/burger/Burger.test.js +18 -64
- package/lib/ui/src/burger/Burger.test.js.map +1 -1
- package/lib/ui/src/button/Button.js +6 -17
- package/lib/ui/src/button/Button.js.map +1 -1
- package/lib/ui/src/button/Button.stories.js +34 -45
- package/lib/ui/src/button/Button.stories.js.map +1 -1
- package/lib/ui/src/button/Button.styles.d.ts +4 -2
- package/lib/ui/src/button/Button.styles.js +416 -107
- package/lib/ui/src/button/Button.styles.js.map +1 -1
- package/lib/ui/src/button/Button.test.js +38 -84
- package/lib/ui/src/button/Button.test.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadio.js +7 -8
- package/lib/ui/src/buttonRadioGroup/ButtonRadio.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadio.styles.js +78 -21
- package/lib/ui/src/buttonRadioGroup/ButtonRadio.styles.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.js +4 -7
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.stories.js +8 -11
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.stories.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.styles.js +16 -9
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.styles.js.map +1 -1
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.test.js +18 -68
- package/lib/ui/src/buttonRadioGroup/ButtonRadioGroup.test.js.map +1 -1
- package/lib/ui/src/card/Card.js +18 -19
- package/lib/ui/src/card/Card.js.map +1 -1
- package/lib/ui/src/card/Card.stories.js +21 -32
- package/lib/ui/src/card/Card.stories.js.map +1 -1
- package/lib/ui/src/card/Card.styles.js +81 -33
- package/lib/ui/src/card/Card.styles.js.map +1 -1
- package/lib/ui/src/card/Card.test.js +63 -141
- package/lib/ui/src/card/Card.test.js.map +1 -1
- package/lib/ui/src/card/icons/Dropdown.d.ts +0 -1
- package/lib/ui/src/card/icons/Dropdown.js +3 -3
- package/lib/ui/src/card/icons/Dropdown.js.map +1 -1
- package/lib/ui/src/card/icons/Dropup.d.ts +0 -1
- package/lib/ui/src/card/icons/Dropup.js +3 -3
- package/lib/ui/src/card/icons/Dropup.js.map +1 -1
- package/lib/ui/src/checkbox/Checkbox.d.ts +1 -0
- package/lib/ui/src/checkbox/Checkbox.js +9 -9
- package/lib/ui/src/checkbox/Checkbox.js.map +1 -1
- package/lib/ui/src/checkbox/Checkbox.stories.js +66 -48
- package/lib/ui/src/checkbox/Checkbox.stories.js.map +1 -1
- package/lib/ui/src/checkbox/Checkbox.styles.d.ts +5 -2
- package/lib/ui/src/checkbox/Checkbox.styles.js +149 -18
- package/lib/ui/src/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/ui/src/checkbox/Checkbox.test.js +27 -62
- package/lib/ui/src/checkbox/Checkbox.test.js.map +1 -1
- package/lib/ui/src/dateInput/DateInput.js +20 -33
- package/lib/ui/src/dateInput/DateInput.js.map +1 -1
- package/lib/ui/src/dateInput/DateInput.stories.js +15 -26
- package/lib/ui/src/dateInput/DateInput.stories.js.map +1 -1
- package/lib/ui/src/dateInput/DateInput.test.js +51 -139
- package/lib/ui/src/dateInput/DateInput.test.js.map +1 -1
- package/lib/ui/src/emailInput/EmailInput.d.ts +0 -1
- package/lib/ui/src/emailInput/EmailInput.js +20 -31
- package/lib/ui/src/emailInput/EmailInput.js.map +1 -1
- package/lib/ui/src/emailInput/EmailInput.stories.js +15 -26
- package/lib/ui/src/emailInput/EmailInput.stories.js.map +1 -1
- package/lib/ui/src/emailInput/EmailInput.styles.js +32 -9
- package/lib/ui/src/emailInput/EmailInput.styles.js.map +1 -1
- package/lib/ui/src/emailInput/EmailInput.test.js +71 -149
- package/lib/ui/src/emailInput/EmailInput.test.js.map +1 -1
- package/lib/ui/src/fieldset/Fieldset.js +8 -11
- package/lib/ui/src/fieldset/Fieldset.js.map +1 -1
- package/lib/ui/src/fieldset/Fieldset.stories.js +7 -7
- package/lib/ui/src/fieldset/Fieldset.stories.js.map +1 -1
- package/lib/ui/src/fieldset/Fieldset.styles.js +34 -18
- package/lib/ui/src/fieldset/Fieldset.styles.js.map +1 -1
- package/lib/ui/src/fieldset/Fieldset.test.js +6 -6
- package/lib/ui/src/fieldset/Fieldset.test.js.map +1 -1
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.d.ts +4 -13
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.js +33 -73
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.js.map +1 -1
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.stories.js +26 -26
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.stories.js.map +1 -1
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.d.ts +5 -7
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.js +23 -66
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.js.map +1 -1
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.stories.js +16 -18
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.stories.js.map +1 -1
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.js +11 -25
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.js.map +1 -1
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.test.js +15 -26
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.test.js.map +1 -1
- package/lib/ui/src/icons/Alert.d.ts +0 -1
- package/lib/ui/src/icons/Alert.js +3 -3
- package/lib/ui/src/icons/Alert.js.map +1 -1
- package/lib/ui/src/icons/Arrow.d.ts +0 -1
- package/lib/ui/src/icons/Arrow.js +3 -3
- package/lib/ui/src/icons/Arrow.js.map +1 -1
- package/lib/ui/src/icons/Certificate.js +3 -6
- package/lib/ui/src/icons/Certificate.js.map +1 -1
- package/lib/ui/src/icons/CheckGreen.d.ts +0 -1
- package/lib/ui/src/icons/CheckGreen.js +3 -3
- package/lib/ui/src/icons/CheckGreen.js.map +1 -1
- package/lib/ui/src/icons/ChevronRight.js +3 -6
- package/lib/ui/src/icons/ChevronRight.js.map +1 -1
- package/lib/ui/src/icons/Close.js +3 -6
- package/lib/ui/src/icons/Close.js.map +1 -1
- package/lib/ui/src/icons/CloseBox.d.ts +0 -1
- package/lib/ui/src/icons/CloseBox.js +3 -3
- package/lib/ui/src/icons/CloseBox.js.map +1 -1
- package/lib/ui/src/icons/DropDown.d.ts +0 -1
- package/lib/ui/src/icons/DropDown.js +3 -3
- package/lib/ui/src/icons/DropDown.js.map +1 -1
- package/lib/ui/src/icons/EmoticonCool.js +3 -6
- package/lib/ui/src/icons/EmoticonCool.js.map +1 -1
- package/lib/ui/src/icons/Help.js +3 -6
- package/lib/ui/src/icons/Help.js.map +1 -1
- package/lib/ui/src/icons/Less.js +3 -6
- package/lib/ui/src/icons/Less.js.map +1 -1
- package/lib/ui/src/icons/Plus.js +3 -6
- package/lib/ui/src/icons/Plus.js.map +1 -1
- package/lib/ui/src/icons/Tick.d.ts +0 -1
- package/lib/ui/src/icons/Tick.js +3 -3
- package/lib/ui/src/icons/Tick.js.map +1 -1
- package/lib/ui/src/icons/TrustPilot.d.ts +0 -1
- package/lib/ui/src/icons/TrustPilot.js +3 -3
- package/lib/ui/src/icons/TrustPilot.js.map +1 -1
- package/lib/ui/src/icons/index.d.ts +0 -1
- package/lib/ui/src/icons/index.js +11 -11
- package/lib/ui/src/icons/index.js.map +1 -1
- package/lib/ui/src/input/Input.js +5 -18
- package/lib/ui/src/input/Input.js.map +1 -1
- package/lib/ui/src/input/Input.stories.js +35 -46
- package/lib/ui/src/input/Input.stories.js.map +1 -1
- package/lib/ui/src/input/Input.styles.js +37 -9
- package/lib/ui/src/input/Input.styles.js.map +1 -1
- package/lib/ui/src/input/Input.test.js +17 -28
- package/lib/ui/src/input/Input.test.js.map +1 -1
- package/lib/ui/src/inputBase/InputBase.js +31 -43
- package/lib/ui/src/inputBase/InputBase.js.map +1 -1
- package/lib/ui/src/inputBase/InputBase.styles.js +238 -67
- package/lib/ui/src/inputBase/InputBase.styles.js.map +1 -1
- package/lib/ui/src/inputBase/InputBase.test.js +36 -98
- package/lib/ui/src/inputBase/InputBase.test.js.map +1 -1
- package/lib/ui/src/inputLoader/InputLoader.d.ts +0 -1
- package/lib/ui/src/inputLoader/InputLoader.js +4 -4
- package/lib/ui/src/inputLoader/InputLoader.js.map +1 -1
- package/lib/ui/src/inputLoader/InputLoader.styles.js +20 -10
- package/lib/ui/src/inputLoader/InputLoader.styles.js.map +1 -1
- package/lib/ui/src/inputLoading/InputLoading.js +3 -3
- package/lib/ui/src/inputLoading/InputLoading.js.map +1 -1
- package/lib/ui/src/inputLoading/InputLoading.stories.js +4 -4
- package/lib/ui/src/inputLoading/InputLoading.stories.js.map +1 -1
- package/lib/ui/src/inputLoading/InputLoading.styles.js +10 -8
- package/lib/ui/src/inputLoading/InputLoading.styles.js.map +1 -1
- package/lib/ui/src/inputLoading/InputLoading.test.js +6 -6
- package/lib/ui/src/inputLoading/InputLoading.test.js.map +1 -1
- package/lib/ui/src/loader/Loader.js +8 -11
- package/lib/ui/src/loader/Loader.js.map +1 -1
- package/lib/ui/src/loader/Loader.stories.js +9 -9
- package/lib/ui/src/loader/Loader.stories.js.map +1 -1
- package/lib/ui/src/loader/Loader.styles.js +56 -23
- package/lib/ui/src/loader/Loader.styles.js.map +1 -1
- package/lib/ui/src/loader/Loader.test.js +6 -6
- package/lib/ui/src/loader/Loader.test.js.map +1 -1
- package/lib/ui/src/logo/Logo.d.ts +0 -1
- package/lib/ui/src/logo/Logo.js +3 -3
- package/lib/ui/src/logo/Logo.js.map +1 -1
- package/lib/ui/src/logo/Logo.stories.js +11 -22
- package/lib/ui/src/logo/Logo.stories.js.map +1 -1
- package/lib/ui/src/mockForm/MockForm.js +5 -8
- package/lib/ui/src/mockForm/MockForm.js.map +1 -1
- package/lib/ui/src/mockForm/MockForm.test.js +6 -6
- package/lib/ui/src/mockForm/MockForm.test.js.map +1 -1
- package/lib/ui/src/modal/Modal.js +43 -49
- package/lib/ui/src/modal/Modal.js.map +1 -1
- package/lib/ui/src/modal/Modal.reducer.js +12 -24
- package/lib/ui/src/modal/Modal.reducer.js.map +1 -1
- package/lib/ui/src/modal/Modal.stories.js +25 -27
- package/lib/ui/src/modal/Modal.stories.js.map +1 -1
- package/lib/ui/src/modal/Modal.styles.d.ts +3 -1
- package/lib/ui/src/modal/Modal.styles.js +165 -32
- package/lib/ui/src/modal/Modal.styles.js.map +1 -1
- package/lib/ui/src/modal/Modal.test.js +34 -71
- package/lib/ui/src/modal/Modal.test.js.map +1 -1
- package/lib/ui/src/nativeSelect/NativeSelect.js +5 -11
- package/lib/ui/src/nativeSelect/NativeSelect.js.map +1 -1
- package/lib/ui/src/nativeSelect/NativeSelect.styles.js +9 -7
- package/lib/ui/src/nativeSelect/NativeSelect.styles.js.map +1 -1
- package/lib/ui/src/nativeSelect/NativeSelect.test.js +7 -18
- package/lib/ui/src/nativeSelect/NativeSelect.test.js.map +1 -1
- package/lib/ui/src/numberInput/NumberInput.js +19 -30
- package/lib/ui/src/numberInput/NumberInput.js.map +1 -1
- package/lib/ui/src/numberInput/NumberInput.stories.js +19 -30
- package/lib/ui/src/numberInput/NumberInput.stories.js.map +1 -1
- package/lib/ui/src/numberInput/NumberInput.test.js +107 -254
- package/lib/ui/src/numberInput/NumberInput.test.js.map +1 -1
- package/lib/ui/src/numberInput/NumberInput.utils.js +10 -10
- package/lib/ui/src/numberInput/NumberInput.utils.js.map +1 -1
- package/lib/ui/src/numberInput/NumberInput.utils.test.js +30 -30
- package/lib/ui/src/numberInput/NumberInput.utils.test.js.map +1 -1
- package/lib/ui/src/option/Option.js +8 -11
- package/lib/ui/src/option/Option.js.map +1 -1
- package/lib/ui/src/option/Option.styles.js +59 -19
- package/lib/ui/src/option/Option.styles.js.map +1 -1
- package/lib/ui/src/option/Option.test.js +29 -71
- package/lib/ui/src/option/Option.test.js.map +1 -1
- package/lib/ui/src/panel/Panel.js +4 -7
- package/lib/ui/src/panel/Panel.js.map +1 -1
- package/lib/ui/src/panel/Panel.stories.js +9 -9
- package/lib/ui/src/panel/Panel.stories.js.map +1 -1
- package/lib/ui/src/panel/Panel.styles.js +25 -19
- package/lib/ui/src/panel/Panel.styles.js.map +1 -1
- package/lib/ui/src/panel/PanelColors.js +1 -1
- package/lib/ui/src/panel/PanelColors.js.map +1 -1
- package/lib/ui/src/radio/Radio.js +6 -7
- package/lib/ui/src/radio/Radio.js.map +1 -1
- package/lib/ui/src/radio/Radio.stories.js +12 -27
- package/lib/ui/src/radio/Radio.stories.js.map +1 -1
- package/lib/ui/src/radio/Radio.styles.js +74 -10
- package/lib/ui/src/radio/Radio.styles.js.map +1 -1
- package/lib/ui/src/radio/Radio.test.js +17 -63
- package/lib/ui/src/radio/Radio.test.js.map +1 -1
- package/lib/ui/src/select/Select.js +20 -48
- package/lib/ui/src/select/Select.js.map +1 -1
- package/lib/ui/src/select/Select.styles.js +38 -18
- package/lib/ui/src/select/Select.styles.js.map +1 -1
- package/lib/ui/src/select/Select.test.js +26 -72
- package/lib/ui/src/select/Select.test.js.map +1 -1
- package/lib/ui/src/selectWrapper/SelectWrapper.js +33 -50
- package/lib/ui/src/selectWrapper/SelectWrapper.js.map +1 -1
- package/lib/ui/src/selectWrapper/SelectWrapper.stories.js +64 -82
- package/lib/ui/src/selectWrapper/SelectWrapper.stories.js.map +1 -1
- package/lib/ui/src/selectWrapper/SelectWrapper.styles.js +71 -37
- package/lib/ui/src/selectWrapper/SelectWrapper.styles.js.map +1 -1
- package/lib/ui/src/selectWrapper/SelectWrapper.test.js +53 -107
- package/lib/ui/src/selectWrapper/SelectWrapper.test.js.map +1 -1
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.js +6 -7
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.js.map +1 -1
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.stories.js +7 -18
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.stories.js.map +1 -1
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.test.js +29 -67
- package/lib/ui/src/showMoreTextToggle/ShowMoreTextToggle.test.js.map +1 -1
- package/lib/ui/src/showMoreTextToggle/showMoreTextToggle.styles.js +22 -21
- package/lib/ui/src/showMoreTextToggle/showMoreTextToggle.styles.js.map +1 -1
- package/lib/ui/src/subtitle/Subtitle.js +5 -8
- package/lib/ui/src/subtitle/Subtitle.js.map +1 -1
- package/lib/ui/src/subtitle/Subtitle.stories.js +9 -20
- package/lib/ui/src/subtitle/Subtitle.stories.js.map +1 -1
- package/lib/ui/src/subtitle/Subtitle.styles.js +15 -16
- package/lib/ui/src/subtitle/Subtitle.styles.js.map +1 -1
- package/lib/ui/src/subtitle/Subtitle.test.js +9 -20
- package/lib/ui/src/subtitle/Subtitle.test.js.map +1 -1
- package/lib/ui/src/tag/Tag.js +12 -12
- package/lib/ui/src/tag/Tag.js.map +1 -1
- package/lib/ui/src/tag/Tag.stories.js +29 -40
- package/lib/ui/src/tag/Tag.stories.js.map +1 -1
- package/lib/ui/src/tag/Tag.styles.js +140 -41
- package/lib/ui/src/tag/Tag.styles.js.map +1 -1
- package/lib/ui/src/tag/Tag.test.js +31 -80
- package/lib/ui/src/tag/Tag.test.js.map +1 -1
- package/lib/ui/src/tag/TagColors.js +1 -1
- package/lib/ui/src/tag/TagColors.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.js +50 -77
- package/lib/ui/src/textarea/Textarea.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.stories.js +42 -62
- package/lib/ui/src/textarea/Textarea.stories.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.styles.d.ts +1 -1
- package/lib/ui/src/textarea/Textarea.styles.js +57 -32
- package/lib/ui/src/textarea/Textarea.styles.js.map +1 -1
- package/lib/ui/src/textarea/Textarea.test.js +17 -63
- package/lib/ui/src/textarea/Textarea.test.js.map +1 -1
- package/lib/ui/src/title/H1.js +6 -9
- package/lib/ui/src/title/H1.js.map +1 -1
- package/lib/ui/src/title/H1.styles.d.ts +2 -1
- package/lib/ui/src/title/H1.styles.js +7 -9
- package/lib/ui/src/title/H1.styles.js.map +1 -1
- package/lib/ui/src/title/H1.test.js +6 -6
- package/lib/ui/src/title/H1.test.js.map +1 -1
- package/lib/ui/src/title/H2.js +6 -9
- package/lib/ui/src/title/H2.js.map +1 -1
- package/lib/ui/src/title/H2.styles.d.ts +2 -1
- package/lib/ui/src/title/H2.styles.js +7 -9
- package/lib/ui/src/title/H2.styles.js.map +1 -1
- package/lib/ui/src/title/H2.test.js +6 -6
- package/lib/ui/src/title/H2.test.js.map +1 -1
- package/lib/ui/src/title/H3.js +7 -21
- package/lib/ui/src/title/H3.js.map +1 -1
- package/lib/ui/src/title/H3.styles.d.ts +2 -1
- package/lib/ui/src/title/H3.styles.js +7 -9
- package/lib/ui/src/title/H3.styles.js.map +1 -1
- package/lib/ui/src/title/H3.test.js +6 -6
- package/lib/ui/src/title/H3.test.js.map +1 -1
- package/lib/ui/src/title/H4.js +6 -9
- package/lib/ui/src/title/H4.js.map +1 -1
- package/lib/ui/src/title/H4.styles.d.ts +2 -1
- package/lib/ui/src/title/H4.styles.js +7 -9
- package/lib/ui/src/title/H4.styles.js.map +1 -1
- package/lib/ui/src/title/H4.test.js +6 -6
- package/lib/ui/src/title/H4.test.js.map +1 -1
- package/lib/ui/src/title/H5.js +6 -9
- package/lib/ui/src/title/H5.js.map +1 -1
- package/lib/ui/src/title/H5.styles.d.ts +2 -1
- package/lib/ui/src/title/H5.styles.js +7 -9
- package/lib/ui/src/title/H5.styles.js.map +1 -1
- package/lib/ui/src/title/H5.test.js +6 -6
- package/lib/ui/src/title/H5.test.js.map +1 -1
- package/lib/ui/src/title/H6.js +7 -21
- package/lib/ui/src/title/H6.js.map +1 -1
- package/lib/ui/src/title/H6.styles.d.ts +2 -1
- package/lib/ui/src/title/H6.styles.js +7 -9
- package/lib/ui/src/title/H6.styles.js.map +1 -1
- package/lib/ui/src/title/H6.test.js +6 -6
- package/lib/ui/src/title/H6.test.js.map +1 -1
- package/lib/ui/src/title/Title.js +2 -2
- package/lib/ui/src/title/Title.js.map +1 -1
- package/lib/ui/src/title/Title.stories.js +18 -18
- package/lib/ui/src/title/Title.stories.js.map +1 -1
- package/lib/ui/src/title/Title.styles.js +89 -22
- package/lib/ui/src/title/Title.styles.js.map +1 -1
- package/lib/ui/src/toggle/Toggle.js +8 -11
- package/lib/ui/src/toggle/Toggle.js.map +1 -1
- package/lib/ui/src/toggle/Toggle.stories.js +20 -31
- package/lib/ui/src/toggle/Toggle.stories.js.map +1 -1
- package/lib/ui/src/toggle/Toggle.styles.js +87 -13
- package/lib/ui/src/toggle/Toggle.styles.js.map +1 -1
- package/lib/ui/src/toggle/Toggle.test.js +23 -68
- package/lib/ui/src/toggle/Toggle.test.js.map +1 -1
- package/lib/ui/src/tooltip/Tooltip.js +20 -32
- package/lib/ui/src/tooltip/Tooltip.js.map +1 -1
- package/lib/ui/src/tooltip/Tooltip.stories.js +26 -37
- package/lib/ui/src/tooltip/Tooltip.stories.js.map +1 -1
- package/lib/ui/src/tooltip/Tooltip.styles.js +56 -9
- package/lib/ui/src/tooltip/Tooltip.styles.js.map +1 -1
- package/lib/ui/src/tooltip/Tooltip.test.js +22 -71
- package/lib/ui/src/tooltip/Tooltip.test.js.map +1 -1
- package/lib/utils/src/actions.js +2 -2
- package/lib/utils/src/actions.js.map +1 -1
- package/lib/utils/src/colors.js +23 -25
- package/lib/utils/src/colors.js.map +1 -1
- package/lib/utils/src/colors.test.js +7 -7
- package/lib/utils/src/colors.test.js.map +1 -1
- package/lib/utils/src/container.js +21 -9
- package/lib/utils/src/container.js.map +1 -1
- package/lib/utils/src/fonts.js +18 -19
- package/lib/utils/src/fonts.js.map +1 -1
- package/lib/utils/src/gmaps.d.ts +11 -0
- package/lib/utils/src/gmaps.js +30 -18
- package/lib/utils/src/gmaps.js.map +1 -1
- package/lib/utils/src/gmaps.test.js +70 -42
- package/lib/utils/src/gmaps.test.js.map +1 -1
- package/lib/utils/src/line.js +7 -8
- package/lib/utils/src/line.js.map +1 -1
- package/lib/utils/src/paragraphs.d.ts +2 -0
- package/lib/utils/src/paragraphs.js +92 -31
- package/lib/utils/src/paragraphs.js.map +1 -1
- package/lib/utils/src/radius.js +6 -6
- package/lib/utils/src/radius.js.map +1 -1
- package/lib/utils/src/responsive.js +13 -22
- package/lib/utils/src/responsive.js.map +1 -1
- package/lib/utils/src/row.js +37 -9
- package/lib/utils/src/row.js.map +1 -1
- package/lib/utils/src/scrollbars.js +32 -9
- package/lib/utils/src/scrollbars.js.map +1 -1
- package/lib/utils/src/shadows.js +6 -6
- package/lib/utils/src/shadows.js.map +1 -1
- package/lib/utils/src/spacing.js +1 -1
- package/lib/utils/src/spacing.js.map +1 -1
- package/lib/utils/src/spacing.test.js +10 -10
- package/lib/utils/src/spacing.test.js.map +1 -1
- package/lib/utils/src/test-utils.d.ts +1 -1
- package/lib/utils/src/test-utils.js +21 -69
- package/lib/utils/src/test-utils.js.map +1 -1
- package/lib/utils/src/utils.stories.js +29 -27
- package/lib/utils/src/utils.stories.js.map +1 -1
- package/lib/utils/src/utils.styles.d.ts +2 -0
- package/lib/utils/src/utils.styles.js +192 -56
- package/lib/utils/src/utils.styles.js.map +1 -1
- package/package.json +50 -56
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
3
|
if (k2 === undefined) k2 = k;
|
|
8
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -24,9 +20,41 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
20
|
};
|
|
25
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
22
|
exports.InputLayout = exports.BaseLayout = void 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.BaseLayout =
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
24
|
+
const utils_1 = require("../../../utils");
|
|
25
|
+
exports.BaseLayout = (0, styled_components_1.css) `
|
|
26
|
+
${utils_1.ArchivoFont};
|
|
27
|
+
display: block;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
border: 0;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
background: none;
|
|
38
|
+
padding: 0 ${(0, utils_1.convertPxToRem)(28)};
|
|
39
|
+
font-size: ${utils_1.fonts.small};
|
|
40
|
+
caret-color: ${utils_1.colors.blue.base};
|
|
41
|
+
line-height: ${(0, utils_1.convertPxToRem)(48)};
|
|
42
|
+
min-height: ${(0, utils_1.convertPxToRem)(48)};
|
|
43
|
+
`;
|
|
44
|
+
exports.InputLayout = styled_components_1.default.input `
|
|
45
|
+
${exports.BaseLayout} :not(:disabled) {
|
|
46
|
+
:focus,
|
|
47
|
+
:active {
|
|
48
|
+
outline: none;
|
|
49
|
+
box-shadow: ${utils_1.shadows.level1};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:-webkit-autofill,
|
|
54
|
+
:-webkit-autofill:hover,
|
|
55
|
+
:-webkit-autofill:focus,
|
|
56
|
+
:-webkit-autofill:active {
|
|
57
|
+
box-shadow: 0 0 0 ${(0, utils_1.convertPxToRem)(40)} white inset;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
32
60
|
//# sourceMappingURL=Input.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/input/Input.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/input/Input.styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAgD;AAEhD,0CAMwB;AAEX,QAAA,UAAU,GAAG,IAAA,uBAAG,EAAA;IACzB,mBAAW;;;;;;;;;;;;eAYA,IAAA,sBAAc,EAAC,EAAE,CAAC;eAClB,aAAK,CAAC,KAAK;iBACT,cAAM,CAAC,IAAI,CAAC,IAAI;iBAChB,IAAA,sBAAc,EAAC,EAAE,CAAC;gBACnB,IAAA,sBAAc,EAAC,EAAE,CAAC;CACjC,CAAC;AAEW,QAAA,WAAW,GAAG,2BAAM,CAAC,KAAK,CAAA;IACnC,kBAAU;;;;oBAIM,eAAO,CAAC,MAAM;;;;;;;;wBAQV,IAAA,sBAAc,EAAC,EAAE,CAAC;;CAEzC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -33,11 +22,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
23
|
};
|
|
35
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
const react_1 = __importDefault(require("react"));
|
|
26
|
+
const react_2 = require("@testing-library/react");
|
|
27
|
+
const Input_1 = __importStar(require("./Input"));
|
|
28
|
+
const mockHandleFunction = jest.fn();
|
|
29
|
+
const defaultProps = {
|
|
41
30
|
id: 'id',
|
|
42
31
|
type: Input_1.InputType.TEXT,
|
|
43
32
|
disabled: false,
|
|
@@ -47,22 +36,22 @@ var defaultProps = {
|
|
|
47
36
|
handleFocus: mockHandleFunction,
|
|
48
37
|
handleBlur: mockHandleFunction
|
|
49
38
|
};
|
|
50
|
-
|
|
51
|
-
describe('Input component',
|
|
52
|
-
afterEach(
|
|
53
|
-
afterAll(
|
|
54
|
-
it('should render component',
|
|
55
|
-
react_2.render(react_1.default.createElement(Input_1.default,
|
|
39
|
+
const mockComponent = () => react_1.default.createElement("div", { "data-test": "fc-component" });
|
|
40
|
+
describe('Input component', () => {
|
|
41
|
+
afterEach(() => jest.resetAllMocks());
|
|
42
|
+
afterAll(() => jest.clearAllMocks());
|
|
43
|
+
it('should render component', () => {
|
|
44
|
+
(0, react_2.render)(react_1.default.createElement(Input_1.default, Object.assign({}, defaultProps)));
|
|
56
45
|
expect(react_2.screen.getByRole('textbox')).toBeInTheDocument();
|
|
57
46
|
});
|
|
58
|
-
it('should have right value',
|
|
59
|
-
|
|
60
|
-
react_2.render(react_1.default.createElement(Input_1.default,
|
|
47
|
+
it('should have right value', () => {
|
|
48
|
+
const props = Object.assign(Object.assign({}, defaultProps), { value: "Ici c'est Paris" });
|
|
49
|
+
(0, react_2.render)(react_1.default.createElement(Input_1.default, Object.assign({}, props)));
|
|
61
50
|
expect(react_2.screen.getByRole('textbox')).toHaveAttribute('value', "Ici c'est Paris");
|
|
62
51
|
});
|
|
63
|
-
it('should render inputElement',
|
|
64
|
-
|
|
65
|
-
react_2.render(react_1.default.createElement(Input_1.default,
|
|
52
|
+
it('should render inputElement', () => {
|
|
53
|
+
const props = Object.assign(Object.assign({}, defaultProps), { inputElement: mockComponent });
|
|
54
|
+
(0, react_2.render)(react_1.default.createElement(Input_1.default, Object.assign({}, props)));
|
|
66
55
|
expect(react_2.screen.getByTestId('fc-component')).toBeInTheDocument();
|
|
67
56
|
});
|
|
68
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/input/Input.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/input/Input.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAkC;AAElC,kDAAwD;AAExD,iDAAuD;AAEvD,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAErC,MAAM,YAAY,GAAe;IAC/B,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,iBAAS,CAAC,IAAI;IACpB,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,kBAAkB;CAC/B,CAAC;AAEF,MAAM,aAAa,GAAmB,GAAG,EAAE,CAAC,oDAAe,cAAc,GAAG,CAAC;AAE7E,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,SAAS,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IACtC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAErC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,IAAA,cAAM,EAAC,8BAAC,eAAK,oBAAK,YAAY,EAAI,CAAC,CAAC;QAEpC,MAAM,CAAC,cAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,KAAK,mCACN,YAAY,KACf,KAAK,EAAE,iBAAiB,GACzB,CAAC;QAEF,IAAA,cAAM,EAAC,8BAAC,eAAK,oBAAK,KAAK,EAAI,CAAC,CAAC;QAE7B,MAAM,CAAC,cAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CACjD,OAAO,EACP,iBAAiB,CAClB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACpC,MAAM,KAAK,mCACN,YAAY,KACf,YAAY,EAAE,aAAa,GAC5B,CAAC;QAEF,IAAA,cAAM,EAAC,8BAAC,eAAK,oBAAK,KAAK,EAAI,CAAC,CAAC;QAE7B,MAAM,CAAC,cAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -34,32 +23,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
34
23
|
};
|
|
35
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
25
|
exports.ZINDEX_OPEN = void 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
const react_1 = __importStar(require("react"));
|
|
27
|
+
const react_id_generator_1 = __importDefault(require("react-id-generator"));
|
|
28
|
+
const hokkaido_1 = require("@proprioo/hokkaido");
|
|
29
|
+
const Alert_1 = __importDefault(require("../icons/Alert"));
|
|
30
|
+
const Input_1 = __importStar(require("../input/Input"));
|
|
31
|
+
const InputBase_styles_1 = require("./InputBase.styles");
|
|
43
32
|
exports.ZINDEX_OPEN = 10;
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var eventValue = event.target.value;
|
|
33
|
+
const InputBase = ({ disabled, id, inputElement, displayField, error, label, type = Input_1.InputType.TEXT, field, gmap, zIndex, name, dataTest, required, min, max, onBlur, onChange, onFocus, suffix, value, selectOnFocus, outline, focused: initialFocused = false, phoneWithFlags = false }) => {
|
|
34
|
+
var _a;
|
|
35
|
+
const inputRef = (0, react_1.useRef)(null);
|
|
36
|
+
const htmlId = (0, react_1.useMemo)(() => id || `input-${(0, react_id_generator_1.default)()}`, []);
|
|
37
|
+
const [focused, setFocused] = (0, react_1.useState)(initialFocused);
|
|
38
|
+
const handleOnChange = (event) => {
|
|
39
|
+
const { target: { value: eventValue } } = event;
|
|
52
40
|
if (!disabled && onChange) {
|
|
53
41
|
onChange(eventValue);
|
|
54
42
|
}
|
|
55
43
|
};
|
|
56
|
-
|
|
44
|
+
const handleBlur = () => {
|
|
57
45
|
setFocused(false);
|
|
58
46
|
if (onBlur) {
|
|
59
47
|
onBlur();
|
|
60
48
|
}
|
|
61
49
|
};
|
|
62
|
-
|
|
50
|
+
const handleFocus = () => {
|
|
63
51
|
setFocused(true);
|
|
64
52
|
if (selectOnFocus && inputRef.current) {
|
|
65
53
|
inputRef.current.select();
|
|
@@ -68,21 +56,21 @@ var InputBase = function (_a) {
|
|
|
68
56
|
onFocus();
|
|
69
57
|
}
|
|
70
58
|
};
|
|
71
|
-
|
|
72
|
-
? hokkaido_1.isNotEmpty(value || '')
|
|
73
|
-
: hokkaido_1.isNotEmpty(((
|
|
74
|
-
|
|
75
|
-
field
|
|
76
|
-
focused
|
|
77
|
-
type
|
|
78
|
-
required
|
|
79
|
-
handleFocus
|
|
80
|
-
handleOnChange
|
|
81
|
-
name
|
|
82
|
-
max
|
|
83
|
-
suffix
|
|
84
|
-
phoneWithFlags
|
|
85
|
-
react_1.useEffect(
|
|
59
|
+
const notched = value !== undefined
|
|
60
|
+
? (0, hokkaido_1.isNotEmpty)(value || '')
|
|
61
|
+
: (0, hokkaido_1.isNotEmpty)(((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) || '');
|
|
62
|
+
const inputProps = Object.assign(Object.assign({ disabled,
|
|
63
|
+
field,
|
|
64
|
+
focused,
|
|
65
|
+
type }, (value !== undefined && { value })), { dataTest,
|
|
66
|
+
required, id: htmlId, handleBlur,
|
|
67
|
+
handleFocus,
|
|
68
|
+
handleOnChange,
|
|
69
|
+
name, gmap: Object.assign(Object.assign({}, gmap), { onBlur: (0, hokkaido_1.compose)(gmap && gmap.onBlur, handleBlur) }), min,
|
|
70
|
+
max,
|
|
71
|
+
suffix,
|
|
72
|
+
phoneWithFlags });
|
|
73
|
+
(0, react_1.useEffect)(() => {
|
|
86
74
|
setFocused(initialFocused);
|
|
87
75
|
}, [initialFocused]);
|
|
88
76
|
return (react_1.default.createElement(InputBase_styles_1.Layout, { disabled: disabled, error: error, focused: focused, notched: notched, zIndex: zIndex, outline: outline, phoneWithFlags: phoneWithFlags },
|
|
@@ -95,7 +83,7 @@ var InputBase = function (_a) {
|
|
|
95
83
|
} })),
|
|
96
84
|
displayField ? (react_1.default.createElement(react_1.Fragment, null, displayField)) : (react_1.default.createElement(react_1.Fragment, null,
|
|
97
85
|
suffix && react_1.default.createElement(InputBase_styles_1.Suffix, { "data-test": "input-suffix" }, suffix),
|
|
98
|
-
react_1.default.createElement(Input_1.default,
|
|
86
|
+
react_1.default.createElement(Input_1.default, Object.assign({ ref: inputRef }, Object.assign(Object.assign({}, inputProps), { inputElement })))))),
|
|
99
87
|
field && react_1.default.createElement(react_1.Fragment, null, field),
|
|
100
88
|
error && react_1.default.createElement(Alert_1.default, null))));
|
|
101
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBase.js","sourceRoot":"","sources":["../../../../packages/ui/src/inputBase/InputBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputBase.js","sourceRoot":"","sources":["../../../../packages/ui/src/inputBase/InputBase.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
3
|
if (k2 === undefined) k2 = k;
|
|
8
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -24,67 +20,242 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
20
|
};
|
|
25
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
22
|
exports.Layout = exports.InsideLayout = exports.Suffix = exports.LabelLayout = exports.LegendLayout = exports.FieldSetLayout = void 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports.FieldSetLayout = styled_components_1.default.fieldset
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
exports.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
23
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
24
|
+
const utils_1 = require("../../../utils");
|
|
25
|
+
const Input_styles_1 = require("../input/Input.styles");
|
|
26
|
+
const InputBaseEnum_1 = require("./InputBaseEnum");
|
|
27
|
+
exports.FieldSetLayout = styled_components_1.default.fieldset `
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 0;
|
|
35
|
+
border: ${(0, utils_1.convertPxToRem)(1)} solid ${utils_1.colors.grey.base80};
|
|
36
|
+
border-radius: ${utils_1.radius.biggest};
|
|
37
|
+
z-index: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
`;
|
|
40
|
+
exports.LegendLayout = styled_components_1.default.legend `
|
|
41
|
+
${utils_1.paragraphs.caption};
|
|
42
|
+
${utils_1.ArchivoFont};
|
|
43
|
+
padding: 0;
|
|
44
|
+
text-align: left;
|
|
45
|
+
transition: width 0ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
46
|
+
height: ${(0, utils_1.convertPxToRem)(2)};
|
|
47
|
+
width: auto;
|
|
48
|
+
visibility: hidden;
|
|
49
|
+
max-width: 0.01px;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
margin: 0 0 0 ${(0, utils_1.convertPxToRem)(20)};
|
|
52
|
+
|
|
53
|
+
> span {
|
|
54
|
+
display: inline-block;
|
|
55
|
+
padding: 0 ${(0, utils_1.convertPxToRem)(8)};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
${({ isVisible }) => isVisible &&
|
|
59
|
+
(0, styled_components_1.css) `
|
|
60
|
+
max-width: ${(0, utils_1.convertPxToRem)(1000)};
|
|
61
|
+
`}
|
|
62
|
+
`;
|
|
63
|
+
exports.LabelLayout = styled_components_1.default.label `
|
|
64
|
+
${utils_1.ArchivoFont};
|
|
65
|
+
${utils_1.paragraphs.caption};
|
|
66
|
+
position: absolute;
|
|
67
|
+
z-index: 1;
|
|
68
|
+
top: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: ${({ suffixLength }) => Boolean(suffixLength)
|
|
71
|
+
? (0, utils_1.convertPxToRem)(52 + suffixLength * 12)
|
|
72
|
+
: (0, utils_1.convertPxToRem)(32)};
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
text-overflow: ellipsis;
|
|
76
|
+
color: ${utils_1.colors.dark.base80};
|
|
77
|
+
transform: translate(${(0, utils_1.convertPxToRem)(28)}, ${(0, utils_1.convertPxToRem)(16)}) scale(1.1);
|
|
78
|
+
transform-origin: top left;
|
|
79
|
+
transition: color 200ms cubic-bezier(0, 0, 0.2, 1) 0ms,
|
|
80
|
+
transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
line-height: ${(0, utils_1.convertPxToRem)(18)};
|
|
83
|
+
backface-visibility: hidden;
|
|
84
|
+
font-smoothing: subpixel-antialiased;
|
|
85
|
+
display: block;
|
|
86
|
+
max-width: calc(100% - ${(0, utils_1.convertPxToRem)(48)});
|
|
87
|
+
`;
|
|
88
|
+
exports.Suffix = styled_components_1.default.div `
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: ${(0, utils_1.convertPxToRem)(4)};
|
|
91
|
+
top: ${(0, utils_1.convertPxToRem)(4)};
|
|
92
|
+
bottom: ${(0, utils_1.convertPxToRem)(4)};
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
padding: 0 ${(0, utils_1.convertPxToRem)(16)} 0 ${(0, utils_1.convertPxToRem)(4)};
|
|
96
|
+
color: ${utils_1.colors.grey.base80};
|
|
97
|
+
|
|
98
|
+
& + ${Input_styles_1.InputLayout} {
|
|
99
|
+
padding-right: ${(0, utils_1.convertPxToRem)(48)};
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
exports.InsideLayout = styled_components_1.default.div `
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 0;
|
|
105
|
+
left: 0;
|
|
106
|
+
right: 0;
|
|
107
|
+
bottom: 0;
|
|
108
|
+
z-index: 0;
|
|
109
|
+
|
|
110
|
+
> svg {
|
|
111
|
+
position: absolute;
|
|
112
|
+
top: 50%;
|
|
113
|
+
left: ${(0, utils_1.convertPxToRem)(12)};
|
|
114
|
+
width: ${(0, utils_1.convertPxToRem)(32)};
|
|
115
|
+
height: ${(0, utils_1.convertPxToRem)(32)};
|
|
116
|
+
content: '';
|
|
117
|
+
transform: translateY(-50%);
|
|
118
|
+
background: white;
|
|
119
|
+
border-radius: ${utils_1.radius.rounded};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
${({ disabled }) => disabled &&
|
|
123
|
+
(0, styled_components_1.css) `
|
|
124
|
+
> svg {
|
|
125
|
+
background: ${utils_1.colors.dark.base10};
|
|
126
|
+
}
|
|
127
|
+
`}
|
|
128
|
+
`;
|
|
129
|
+
exports.Layout = styled_components_1.default.div `
|
|
130
|
+
position: relative;
|
|
131
|
+
z-index: ${props => props.zIndex || 0};
|
|
132
|
+
min-height: ${(0, utils_1.convertPxToRem)(50)};
|
|
133
|
+
|
|
134
|
+
${({ phoneWithFlags }) => phoneWithFlags &&
|
|
135
|
+
(0, styled_components_1.css) `
|
|
136
|
+
${exports.LabelLayout} {
|
|
137
|
+
transform: translate(${(0, utils_1.convertPxToRem)(60)}, ${(0, utils_1.convertPxToRem)(18)});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
${exports.InsideLayout} {
|
|
141
|
+
> svg {
|
|
142
|
+
left: initial;
|
|
143
|
+
right: ${(0, utils_1.convertPxToRem)(12)};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`}
|
|
147
|
+
|
|
148
|
+
${({ outline }) => outline === InputBaseEnum_1.InputColors.GREEN
|
|
149
|
+
? (0, styled_components_1.css) `
|
|
150
|
+
color: ${utils_1.colors.green.base};
|
|
151
|
+
`
|
|
152
|
+
: outline === InputBaseEnum_1.InputColors.BLUE
|
|
153
|
+
? (0, styled_components_1.css) `
|
|
154
|
+
color: ${utils_1.colors.blue.base60};
|
|
155
|
+
`
|
|
156
|
+
: outline === InputBaseEnum_1.InputColors.PINK
|
|
157
|
+
? (0, styled_components_1.css) `
|
|
158
|
+
color: ${utils_1.colors.pink.base};
|
|
159
|
+
`
|
|
160
|
+
: outline === InputBaseEnum_1.InputColors.ORANGE &&
|
|
161
|
+
(0, styled_components_1.css) `
|
|
162
|
+
color: ${utils_1.colors.orange.base};
|
|
163
|
+
`}
|
|
164
|
+
|
|
165
|
+
${({ focused, error, disabled }) => error &&
|
|
166
|
+
(0, styled_components_1.css) `
|
|
167
|
+
color: ${utils_1.colors.red.base};
|
|
168
|
+
|
|
169
|
+
${Input_styles_1.InputLayout} {
|
|
170
|
+
color: ${utils_1.colors.red.base};
|
|
171
|
+
padding: 0 ${(0, utils_1.convertPxToRem)(56)} 0 ${(0, utils_1.convertPxToRem)(48)};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
${exports.FieldSetLayout} {
|
|
175
|
+
${!disabled && `border-color: ${utils_1.colors.red.base};`}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
${exports.Suffix} {
|
|
179
|
+
color: ${utils_1.colors.red.base};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
${exports.LabelLayout} {
|
|
183
|
+
color: ${utils_1.colors.red.base};
|
|
184
|
+
transform: translate(${(0, utils_1.convertPxToRem)(48)}, ${(0, utils_1.convertPxToRem)(16)});
|
|
185
|
+
|
|
186
|
+
${!focused &&
|
|
187
|
+
(0, styled_components_1.css) `
|
|
188
|
+
transform: translate(${(0, utils_1.convertPxToRem)(48)}, ${(0, utils_1.convertPxToRem)(16)}, 0);
|
|
189
|
+
`}
|
|
190
|
+
}
|
|
191
|
+
`}
|
|
192
|
+
|
|
193
|
+
${({ phoneWithFlags, error }) => phoneWithFlags &&
|
|
194
|
+
error &&
|
|
195
|
+
(0, styled_components_1.css) `
|
|
196
|
+
${exports.LabelLayout} {
|
|
197
|
+
transform: translate(${(0, utils_1.convertPxToRem)(60)}, ${(0, utils_1.convertPxToRem)(18)});
|
|
198
|
+
}
|
|
199
|
+
`}
|
|
200
|
+
|
|
201
|
+
${({ focused, notched, error }) => (focused || notched) &&
|
|
202
|
+
(0, styled_components_1.css) `
|
|
203
|
+
${exports.FieldSetLayout} {
|
|
204
|
+
${!error &&
|
|
205
|
+
(0, styled_components_1.css) `
|
|
206
|
+
border-color: ${utils_1.colors.orange.base};
|
|
207
|
+
`};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
${exports.LabelLayout} {
|
|
211
|
+
overflow: initial;
|
|
212
|
+
text-overflow: ellipsis;
|
|
213
|
+
transform: translate(${(0, utils_1.convertPxToRem)(29)}, -${(0, utils_1.convertPxToRem)(6)});
|
|
214
|
+
}
|
|
215
|
+
`}
|
|
216
|
+
|
|
217
|
+
${({ outline, focused, notched }) => outline &&
|
|
218
|
+
(0, styled_components_1.css) `
|
|
219
|
+
${exports.FieldSetLayout} {
|
|
220
|
+
border-width: ${(0, utils_1.convertPxToRem)(2)};
|
|
221
|
+
border-color: currentColor;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
${!focused &&
|
|
225
|
+
!notched &&
|
|
226
|
+
(0, styled_components_1.css) `
|
|
227
|
+
${exports.LabelLayout} {
|
|
228
|
+
color: currentColor;
|
|
229
|
+
}
|
|
230
|
+
`}
|
|
231
|
+
`}
|
|
232
|
+
|
|
233
|
+
${({ disabled, error }) => disabled &&
|
|
234
|
+
(0, styled_components_1.css) `
|
|
235
|
+
${exports.FieldSetLayout} {
|
|
236
|
+
background: ${utils_1.colors.dark.base10};
|
|
237
|
+
|
|
238
|
+
${error
|
|
239
|
+
? (0, styled_components_1.css) `
|
|
240
|
+
border-color: ${utils_1.colors.orange.base};
|
|
241
|
+
`
|
|
242
|
+
: (0, styled_components_1.css) `
|
|
243
|
+
border-color: ${utils_1.colors.grey.base80};
|
|
244
|
+
`}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
${exports.LabelLayout} {
|
|
248
|
+
color: ${utils_1.colors.grey.base60};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.react-phone-number-input__input,
|
|
252
|
+
${Input_styles_1.InputLayout}, ${exports.Suffix} {
|
|
253
|
+
color: ${utils_1.colors.grey.base60};
|
|
254
|
+
-webkit-text-fill-color: ${utils_1.colors.grey.base60};
|
|
255
|
+
cursor: not-allowed;
|
|
256
|
+
opacity: 1;
|
|
257
|
+
}
|
|
258
|
+
`}
|
|
259
|
+
}
|
|
260
|
+
`;
|
|
90
261
|
//# sourceMappingURL=InputBase.styles.js.map
|