@proprioo/salatim 18.5.0 → 19.1.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/CHANGELOG.md +21 -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 +2633 -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.js +34 -64
- 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 +1 -0
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.js +18 -46
- 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 +243 -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 +17 -15
- package/lib/ui/src/tag/Tag.js.map +1 -1
- package/lib/ui/src/tag/Tag.stories.js +30 -40
- package/lib/ui/src/tag/Tag.stories.js.map +1 -1
- package/lib/ui/src/tag/Tag.styles.d.ts +2 -1
- package/lib/ui/src/tag/Tag.styles.js +141 -37
- package/lib/ui/src/tag/Tag.styles.js.map +1 -1
- package/lib/ui/src/tag/Tag.test.js +41 -72
- 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/tag/interfaces.d.ts +2 -1
- package/lib/ui/src/tag/interfaces.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 +1 -0
- package/lib/utils/src/gmaps.js +11 -17
- package/lib/utils/src/gmaps.js.map +1 -1
- package/lib/utils/src/gmaps.test.js +22 -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.js +80 -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 +27 -27
- package/lib/utils/src/utils.stories.js.map +1 -1
- package/lib/utils/src/utils.styles.js +185 -55
- package/lib/utils/src/utils.styles.js.map +1 -1
- package/package.json +50 -56
|
@@ -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,29 +22,25 @@ 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
|
-
|
|
41
|
-
|
|
25
|
+
const react_1 = __importStar(require("react"));
|
|
26
|
+
const storybook_state_1 = require("@sambego/storybook-state");
|
|
27
|
+
const addon_actions_1 = require("@storybook/addon-actions");
|
|
28
|
+
const react_2 = require("@storybook/react");
|
|
29
|
+
const Radio_1 = __importDefault(require("./Radio"));
|
|
30
|
+
const radioState = new storybook_state_1.Store({
|
|
42
31
|
isChecked: false
|
|
43
32
|
});
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
const onChange = (0, addon_actions_1.action)('onChange');
|
|
34
|
+
const defaultProps = {
|
|
46
35
|
id: 'id',
|
|
47
36
|
label: 'Radio',
|
|
48
37
|
name: 'name',
|
|
49
38
|
value: '',
|
|
50
39
|
isChecked: false,
|
|
51
|
-
onChange
|
|
40
|
+
onChange
|
|
52
41
|
};
|
|
53
|
-
react_2.storiesOf('Radio', module).add('Radio',
|
|
54
|
-
react_1.default.createElement(Radio_1.default,
|
|
55
|
-
return radioState.set({ isChecked: !radioState.get('isChecked') });
|
|
56
|
-
} })),
|
|
42
|
+
(0, react_2.storiesOf)('Radio', module).add('Radio', () => (react_1.default.createElement(storybook_state_1.State, { store: radioState }, state => (react_1.default.createElement(react_1.Fragment, null,
|
|
43
|
+
react_1.default.createElement(Radio_1.default, Object.assign({}, defaultProps, { id: 'id1', isChecked: state.isChecked, value: '1', onChange: () => radioState.set({ isChecked: !radioState.get('isChecked') }) })),
|
|
57
44
|
react_1.default.createElement("br", null),
|
|
58
|
-
react_1.default.createElement(Radio_1.default,
|
|
59
|
-
return radioState.set({ isChecked: !radioState.get('isChecked') });
|
|
60
|
-
} })))); })); });
|
|
45
|
+
react_1.default.createElement(Radio_1.default, Object.assign({}, defaultProps, { id: 'id2', isChecked: state.isChecked, value: '2', onChange: () => radioState.set({ isChecked: !radioState.get('isChecked') }) })))))));
|
|
61
46
|
//# sourceMappingURL=Radio.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.stories.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.stories.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,8DAAwD;AACxD,4DAAkD;AAClD,4CAA6C;AAE7C,oDAA4C;AAE5C,MAAM,UAAU,GAAG,IAAI,uBAAK,CAAC;IAC3B,SAAS,EAAE,KAAK;CACjB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAG,IAAA,sBAAM,EAAC,UAAU,CAAC,CAAC;AAEpC,MAAM,YAAY,GAAe;IAC/B,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,KAAK;IAChB,QAAQ;CACT,CAAC;AAEF,IAAA,iBAAS,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAC5C,8BAAC,uBAAK,IAAC,KAAK,EAAE,UAAU,IACrB,KAAK,CAAC,EAAE,CAAC,CACR,8BAAC,gBAAQ;IACP,8BAAC,eAAK,oBACA,YAAY,IAChB,EAAE,EAAE,KAAK,EACT,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,GAAG,EAAE,CACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,IAE7D;IACF,yCAAM;IACN,8BAAC,eAAK,oBACA,YAAY,IAChB,EAAE,EAAE,KAAK,EACT,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,GAAG,EAAE,CACb,UAAU,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,IAE7D,CACO,CACZ,CACK,CACT,CAAC,CAAC"}
|
|
@@ -1,17 +1,81 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
4
|
};
|
|
9
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
6
|
exports.RadioLayout = exports.RadioLabelLayout = exports.Layout = void 0;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.Layout = styled_components_1.default.div
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
exports.Layout = styled_components_1.default.div `
|
|
10
|
+
position: relative;
|
|
11
|
+
`;
|
|
12
|
+
exports.RadioLabelLayout = styled_components_1.default.label `
|
|
13
|
+
${utils_1.ArchivoFont}
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
color: ${utils_1.colors.dark.base};
|
|
16
|
+
font-size: ${utils_1.fonts.small};
|
|
17
|
+
line-height: ${(0, utils_1.convertPxToRem)(18)};
|
|
18
|
+
|
|
19
|
+
::selection {
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
exports.RadioLayout = styled_components_1.default.input `
|
|
24
|
+
position: absolute;
|
|
25
|
+
opacity: 0;
|
|
26
|
+
|
|
27
|
+
+ ${exports.RadioLabelLayout} {
|
|
28
|
+
::before {
|
|
29
|
+
content: '';
|
|
30
|
+
position: relative;
|
|
31
|
+
border-radius: ${utils_1.radius.max};
|
|
32
|
+
background-color: white;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
border: ${(0, utils_1.convertPxToRem)(2)} solid ${utils_1.colors.dark.base20};
|
|
35
|
+
width: ${(0, utils_1.convertPxToRem)(24)};
|
|
36
|
+
height: ${(0, utils_1.convertPxToRem)(24)};
|
|
37
|
+
top: -${(0, utils_1.convertPxToRem)(2)};
|
|
38
|
+
margin-right: ${(0, utils_1.convertPxToRem)(8)};
|
|
39
|
+
vertical-align: top;
|
|
40
|
+
transition: all 250ms ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
::after {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
width: ${(0, utils_1.convertPxToRem)(12)};
|
|
47
|
+
height: ${(0, utils_1.convertPxToRem)(12)};
|
|
48
|
+
top: ${(0, utils_1.convertPxToRem)(4)};
|
|
49
|
+
left: ${(0, utils_1.convertPxToRem)(6)};
|
|
50
|
+
background-color: ${utils_1.colors.orange.base};
|
|
51
|
+
border-radius: ${utils_1.radius.max};
|
|
52
|
+
transform: scale(0);
|
|
53
|
+
transition: all 0.25s ease;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:not(:checked) {
|
|
59
|
+
+ ${exports.RadioLabelLayout} {
|
|
60
|
+
:hover {
|
|
61
|
+
::before {
|
|
62
|
+
border-color: ${utils_1.colors.orange.base};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:checked {
|
|
69
|
+
+ ${exports.RadioLabelLayout} {
|
|
70
|
+
::before {
|
|
71
|
+
border-color: ${utils_1.colors.orange.base20};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
::after {
|
|
75
|
+
transform: scale(1);
|
|
76
|
+
opacity: 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
17
81
|
//# sourceMappingURL=Radio.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.styles.ts"],"names":[],"mappings":";;;;;;AAAA,0EAAuC;AAEvC,0CAMwB;AAEX,QAAA,MAAM,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAE/B,CAAC;AAEW,QAAA,gBAAgB,GAAG,2BAAM,CAAC,KAAK,CAAA;IACxC,mBAAW;;WAEJ,cAAM,CAAC,IAAI,CAAC,IAAI;eACZ,aAAK,CAAC,KAAK;iBACT,IAAA,sBAAc,EAAC,EAAE,CAAC;;;;;CAKlC,CAAC;AAEW,QAAA,WAAW,GAAG,2BAAM,CAAC,KAAK,CAAA;;;;MAIjC,wBAAgB;;;;uBAIC,cAAM,CAAC,GAAG;;;gBAGjB,IAAA,sBAAc,EAAC,CAAC,CAAC,UAAU,cAAM,CAAC,IAAI,CAAC,MAAM;eAC9C,IAAA,sBAAc,EAAC,EAAE,CAAC;gBACjB,IAAA,sBAAc,EAAC,EAAE,CAAC;cACpB,IAAA,sBAAc,EAAC,CAAC,CAAC;sBACT,IAAA,sBAAc,EAAC,CAAC,CAAC;;;;;;;;eAQxB,IAAA,sBAAc,EAAC,EAAE,CAAC;gBACjB,IAAA,sBAAc,EAAC,EAAE,CAAC;aACrB,IAAA,sBAAc,EAAC,CAAC,CAAC;cAChB,IAAA,sBAAc,EAAC,CAAC,CAAC;0BACL,cAAM,CAAC,MAAM,CAAC,IAAI;uBACrB,cAAM,CAAC,GAAG;;;;;;;;QAQzB,wBAAgB;;;0BAGE,cAAM,CAAC,MAAM,CAAC,IAAI;;;;;;;QAOpC,wBAAgB;;wBAEA,cAAM,CAAC,MAAM,CAAC,MAAM;;;;;;;;;CAS3C,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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -19,43 +8,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
9
|
});
|
|
21
10
|
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
13
|
};
|
|
52
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
15
|
+
const react_1 = __importDefault(require("react"));
|
|
16
|
+
const react_2 = require("@testing-library/react");
|
|
17
|
+
const user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
18
|
+
const Radio_1 = __importDefault(require("./Radio"));
|
|
19
|
+
const mockChange = jest.fn();
|
|
20
|
+
const defaultProps = {
|
|
59
21
|
id: 'id',
|
|
60
22
|
label: 'Radio',
|
|
61
23
|
name: 'name',
|
|
@@ -63,26 +25,18 @@ var defaultProps = {
|
|
|
63
25
|
isChecked: false,
|
|
64
26
|
onChange: mockChange
|
|
65
27
|
};
|
|
66
|
-
describe('Radio component',
|
|
67
|
-
afterEach(
|
|
68
|
-
afterAll(
|
|
69
|
-
it('should render component',
|
|
70
|
-
react_2.render(react_1.default.createElement(Radio_1.default,
|
|
28
|
+
describe('Radio component', () => {
|
|
29
|
+
afterEach(() => jest.resetAllMocks());
|
|
30
|
+
afterAll(() => jest.clearAllMocks());
|
|
31
|
+
it('should render component', () => {
|
|
32
|
+
(0, react_2.render)(react_1.default.createElement(Radio_1.default, Object.assign({}, defaultProps)));
|
|
71
33
|
expect(react_2.screen.getByRole('radio')).toBeInTheDocument();
|
|
72
34
|
});
|
|
73
|
-
it('should trigger onChange component',
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
user_event_1.default.click(react_2.screen.getByRole('radio'));
|
|
80
|
-
return [4 /*yield*/, react_2.waitFor(function () { return expect(mockChange).toHaveBeenCalled(); })];
|
|
81
|
-
case 1:
|
|
82
|
-
_a.sent();
|
|
83
|
-
return [2 /*return*/];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}); });
|
|
35
|
+
it('should trigger onChange component', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
(0, react_2.render)(react_1.default.createElement(Radio_1.default, Object.assign({}, defaultProps)));
|
|
37
|
+
expect(react_2.screen.getByRole('radio')).toBeInTheDocument();
|
|
38
|
+
user_event_1.default.click(react_2.screen.getByRole('radio'));
|
|
39
|
+
yield (0, react_2.waitFor)(() => expect(mockChange).toHaveBeenCalled());
|
|
40
|
+
}));
|
|
87
41
|
});
|
|
88
42
|
//# sourceMappingURL=Radio.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Radio.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/radio/Radio.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,kDAAiE;AACjE,6EAAoD;AAEpD,oDAA4C;AAE5C,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAE7B,MAAM,YAAY,GAAe;IAC/B,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,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,OAAO,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAS,EAAE;QACjD,IAAA,cAAM,EAAC,8BAAC,eAAK,oBAAK,YAAY,EAAI,CAAC,CAAC;QAEpC,MAAM,CAAC,cAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAEtD,oBAAS,CAAC,KAAK,CAAC,cAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC7D,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
|
16
|
-
__assign = Object.assign || function(t) {
|
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
-
s = arguments[i];
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
return __assign.apply(this, arguments);
|
|
25
|
-
};
|
|
26
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
3
|
if (k2 === undefined) k2 = k;
|
|
28
4
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
@@ -44,23 +20,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
44
20
|
};
|
|
45
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
22
|
exports.Select = void 0;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_this.selectItem = _this.selectItem.bind(_this);
|
|
55
|
-
return _this;
|
|
23
|
+
const react_1 = __importStar(require("react"));
|
|
24
|
+
const Option_1 = __importStar(require("../option/Option"));
|
|
25
|
+
const Select_styles_1 = require("./Select.styles");
|
|
26
|
+
class Select extends react_1.PureComponent {
|
|
27
|
+
constructor(props) {
|
|
28
|
+
super(props);
|
|
29
|
+
this.selectItem = this.selectItem.bind(this);
|
|
56
30
|
}
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
selectItem(value) {
|
|
32
|
+
const { onClose, onSelect } = this.props;
|
|
59
33
|
onSelect(value);
|
|
60
34
|
onClose();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
}
|
|
36
|
+
componentDidUpdate() {
|
|
37
|
+
const { selectedOptionRef } = this.props;
|
|
64
38
|
if (selectedOptionRef.current && selectedOptionRef.current.scrollIntoView) {
|
|
65
39
|
selectedOptionRef.current.scrollIntoView({
|
|
66
40
|
behavior: 'smooth',
|
|
@@ -68,18 +42,16 @@ var Select = /** @class */ (function (_super) {
|
|
|
68
42
|
inline: 'end'
|
|
69
43
|
});
|
|
70
44
|
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var _a = this.props, options = _a.options, value = _a.value, isOpen = _a.isOpen, selectRef = _a.selectRef, selectedOptionRef = _a.selectedOptionRef, optionsMinWidth = _a.optionsMinWidth, optionsAlign = _a.optionsAlign;
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const { options, value, isOpen, selectRef, selectedOptionRef, optionsMinWidth, optionsAlign } = this.props;
|
|
75
48
|
return isOpen ? (react_1.default.createElement(Select_styles_1.Layout, { optionsMinWidth: optionsMinWidth, optionsAlign: optionsAlign, "data-test": "select-layout", ref: selectRef },
|
|
76
|
-
react_1.default.createElement(Select_styles_1.ItemContainer, null, options.map(
|
|
49
|
+
react_1.default.createElement(Select_styles_1.ItemContainer, null, options.map((option, i) => (react_1.default.createElement(Select_styles_1.ItemLayout, { key: i, ref: (0, Option_1.isOptionSelected)(option.value, value)
|
|
77
50
|
? selectedOptionRef
|
|
78
51
|
: undefined },
|
|
79
|
-
react_1.default.createElement(Option_1.default, { value: value, option: option, onSelect:
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}(react_1.PureComponent));
|
|
52
|
+
react_1.default.createElement(Option_1.default, { value: value, option: option, onSelect: () => this.selectItem(option) }))))))) : null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
83
55
|
exports.Select = Select;
|
|
84
|
-
exports.default = react_1.forwardRef(
|
|
56
|
+
exports.default = (0, react_1.forwardRef)((props, ref) => (react_1.default.createElement(Select, Object.assign({ ref: ref }, props))));
|
|
85
57
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoE;AAEpE,2DAAyE;AACzE,mDAKyB;AAczB,MAAa,MAAO,SAAQ,qBAA0B;IACpD,YAAY,KAAkB;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,UAAU,CAAC,KAAkB;QAC3B,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACzC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,kBAAkB;QAChB,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACzC,IAAI,iBAAiB,CAAC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,cAAc,EAAE;YACzE,iBAAiB,CAAC,OAAO,CAAC,cAAc,CAAC;gBACvC,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,KAAK;aACd,CAAC,CAAC;SACJ;IACH,CAAC;IAED,MAAM;QACJ,MAAM,EACJ,OAAO,EACP,KAAK,EACL,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,YAAY,EACb,GAAG,IAAI,CAAC,KAAK,CAAC;QACf,OAAO,MAAM,CAAC,CAAC,CAAC,CACd,8BAAC,sBAAM,IACL,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,YAAY,eAChB,eAAe,EACzB,GAAG,EAAE,SAAS;YAEd,8BAAC,6BAAa,QACX,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,8BAAC,0BAAU,IACT,GAAG,EAAE,CAAC,EACN,GAAG,EACD,IAAA,yBAAgB,EAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC;oBACnC,CAAC,CAAC,iBAAiB;oBACnB,CAAC,CAAC,SAAS;gBAGf,8BAAC,gBAAM,IACL,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,GACvC,CACS,CACd,CAAC,CACY,CACT,CACV,CAAC,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;CACF;AA7DD,wBA6DC;AAED,kBAAe,IAAA,kBAAU,EAAsB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAC7D,8BAAC,MAAM,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAChC,CAAC,CAAC"}
|
|
@@ -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,23 +20,47 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
20
|
};
|
|
25
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
22
|
exports.ItemLayout = exports.ItemContainer = exports.Layout = exports.OptionsAlignement = void 0;
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const styled_components_1 = __importStar(require("styled-components"));
|
|
24
|
+
const utils_1 = require("../../../utils");
|
|
29
25
|
var OptionsAlignement;
|
|
30
26
|
(function (OptionsAlignement) {
|
|
31
27
|
OptionsAlignement["LEFT"] = "left";
|
|
32
28
|
OptionsAlignement["RIGHT"] = "right";
|
|
33
29
|
})(OptionsAlignement = exports.OptionsAlignement || (exports.OptionsAlignement = {}));
|
|
34
|
-
exports.Layout = styled_components_1.default.div
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
exports.Layout = styled_components_1.default.div `
|
|
31
|
+
position: absolute;
|
|
32
|
+
width: 100%;
|
|
33
|
+
top: ${(0, utils_1.convertPxToRem)(60)};
|
|
34
|
+
background: white;
|
|
35
|
+
z-index: -1;
|
|
36
|
+
border-radius: ${utils_1.radius.biggest};
|
|
37
|
+
padding: ${(0, utils_1.convertPxToRem)(20)};
|
|
38
|
+
border: ${(0, utils_1.convertPxToRem)(1)} solid ${utils_1.colors.orange.base};
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
|
|
41
|
+
${({ optionsAlign }) => optionsAlign === OptionsAlignement.RIGHT &&
|
|
42
|
+
(0, styled_components_1.css) `
|
|
43
|
+
right: 0;
|
|
44
|
+
`}
|
|
45
|
+
|
|
46
|
+
${({ optionsMinWidth }) => optionsMinWidth &&
|
|
47
|
+
(0, styled_components_1.css) `
|
|
48
|
+
min-width: ${(0, utils_1.convertPxToRem)(optionsMinWidth)};
|
|
49
|
+
`}
|
|
50
|
+
`;
|
|
51
|
+
exports.ItemContainer = styled_components_1.default.div `
|
|
52
|
+
${utils_1.scrollbar};
|
|
53
|
+
overflow: auto;
|
|
54
|
+
height: 100%;
|
|
55
|
+
max-height: ${(0, utils_1.convertPxToRem)(100)};
|
|
56
|
+
`;
|
|
57
|
+
exports.ItemLayout = styled_components_1.default.div `
|
|
58
|
+
${utils_1.ArchivoFont};
|
|
59
|
+
font-size: ${utils_1.fonts.small};
|
|
60
|
+
margin: ${(0, utils_1.convertPxToRem)(2)} 0 0;
|
|
61
|
+
|
|
62
|
+
:first-child {
|
|
63
|
+
margin-top: 0;
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
46
66
|
//# sourceMappingURL=Select.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.styles.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAgD;AAEhD,0CAOwB;AAExB,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,oCAAe,CAAA;AACjB,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAOY,QAAA,MAAM,GAAG,2BAAM,CAAC,GAAG,CAAa;;;SAGpC,IAAA,sBAAc,EAAC,EAAE,CAAC;;;mBAGR,cAAM,CAAC,OAAO;aACpB,IAAA,sBAAc,EAAC,EAAE,CAAC;YACnB,IAAA,sBAAc,EAAC,CAAC,CAAC,UAAU,cAAM,CAAC,MAAM,CAAC,IAAI;;;IAGrD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CACrB,YAAY,KAAK,iBAAiB,CAAC,KAAK;IACxC,IAAA,uBAAG,EAAA;;KAEF;;IAED,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CACxB,eAAe;IACf,IAAA,uBAAG,EAAA;mBACY,IAAA,sBAAc,EAAC,eAAe,CAAC;KAC7C;CACJ,CAAC;AAEW,QAAA,aAAa,GAAG,2BAAM,CAAC,GAAG,CAAA;IACnC,iBAAS;;;gBAGG,IAAA,sBAAc,EAAC,GAAG,CAAC;CAClC,CAAC;AAEW,QAAA,UAAU,GAAG,2BAAM,CAAC,GAAG,CAAA;IAChC,mBAAW;eACA,aAAK,CAAC,KAAK;YACd,IAAA,sBAAc,EAAC,CAAC,CAAC;;;;;CAK5B,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]; } });
|
|
@@ -38,44 +27,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
38
27
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
39
28
|
});
|
|
40
29
|
};
|
|
41
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
42
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
43
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
45
|
-
function step(op) {
|
|
46
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
47
|
-
while (_) try {
|
|
48
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
49
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
50
|
-
switch (op[0]) {
|
|
51
|
-
case 0: case 1: t = op; break;
|
|
52
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
53
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
55
|
-
default:
|
|
56
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
57
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
58
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
59
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
60
|
-
if (t[2]) _.ops.pop();
|
|
61
|
-
_.trys.pop(); continue;
|
|
62
|
-
}
|
|
63
|
-
op = body.call(thisArg, _);
|
|
64
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
65
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
30
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
69
31
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
70
32
|
};
|
|
71
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
34
|
+
const react_1 = __importStar(require("react"));
|
|
35
|
+
const react_2 = require("@testing-library/react");
|
|
36
|
+
const user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
37
|
+
const Select_1 = require("./Select");
|
|
38
|
+
const mockOnClose = jest.fn();
|
|
39
|
+
const mockOnSelect = jest.fn();
|
|
40
|
+
const defaultProps = {
|
|
79
41
|
options: [
|
|
80
42
|
{
|
|
81
43
|
value: 'banana',
|
|
@@ -90,40 +52,32 @@ var defaultProps = {
|
|
|
90
52
|
isOpen: true,
|
|
91
53
|
onClose: mockOnClose,
|
|
92
54
|
onSelect: mockOnSelect,
|
|
93
|
-
selectRef: react_1.createRef(),
|
|
94
|
-
selectedOptionRef: react_1.createRef()
|
|
55
|
+
selectRef: (0, react_1.createRef)(),
|
|
56
|
+
selectedOptionRef: (0, react_1.createRef)()
|
|
95
57
|
};
|
|
96
|
-
describe('Select options component',
|
|
97
|
-
afterEach(
|
|
98
|
-
afterAll(
|
|
99
|
-
it('should render component',
|
|
100
|
-
react_2.render(react_1.default.createElement(Select_1.Select,
|
|
58
|
+
describe('Select options component', () => {
|
|
59
|
+
afterEach(() => jest.resetAllMocks());
|
|
60
|
+
afterAll(() => jest.clearAllMocks());
|
|
61
|
+
it('should render component', () => {
|
|
62
|
+
(0, react_2.render)(react_1.default.createElement(Select_1.Select, Object.assign({}, defaultProps)));
|
|
101
63
|
expect(react_2.screen.getByTestId('select-layout')).toBeInTheDocument();
|
|
102
64
|
});
|
|
103
|
-
it('should not render component',
|
|
104
|
-
|
|
105
|
-
react_2.render(react_1.default.createElement(Select_1.Select,
|
|
65
|
+
it('should not render component', () => {
|
|
66
|
+
const props = Object.assign(Object.assign({}, defaultProps), { isOpen: false });
|
|
67
|
+
(0, react_2.render)(react_1.default.createElement(Select_1.Select, Object.assign({}, props)));
|
|
106
68
|
expect(react_2.screen.queryByTestId('select-layout')).not.toBeInTheDocument();
|
|
107
69
|
});
|
|
108
|
-
it('should have 2 Option',
|
|
109
|
-
react_2.render(react_1.default.createElement(Select_1.Select,
|
|
70
|
+
it('should have 2 Option', () => {
|
|
71
|
+
(0, react_2.render)(react_1.default.createElement(Select_1.Select, Object.assign({}, defaultProps)));
|
|
110
72
|
expect(react_2.screen.getAllByTestId('option-layout')).toHaveLength(2);
|
|
111
73
|
});
|
|
112
|
-
it('should call onSelect and onClose function',
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return [4 /*yield*/, react_2.waitFor(function () {
|
|
119
|
-
expect(mockOnSelect).toHaveBeenCalled();
|
|
120
|
-
expect(mockOnClose).toHaveBeenCalled();
|
|
121
|
-
})];
|
|
122
|
-
case 1:
|
|
123
|
-
_a.sent();
|
|
124
|
-
return [2 /*return*/];
|
|
125
|
-
}
|
|
74
|
+
it('should call onSelect and onClose function', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
(0, react_2.render)(react_1.default.createElement(Select_1.Select, Object.assign({}, defaultProps)));
|
|
76
|
+
user_event_1.default.click(react_2.screen.getAllByTestId('option-layout')[0]);
|
|
77
|
+
yield (0, react_2.waitFor)(() => {
|
|
78
|
+
expect(mockOnSelect).toHaveBeenCalled();
|
|
79
|
+
expect(mockOnClose).toHaveBeenCalled();
|
|
126
80
|
});
|
|
127
|
-
})
|
|
81
|
+
}));
|
|
128
82
|
});
|
|
129
83
|
//# sourceMappingURL=Select.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.test.js","sourceRoot":"","sources":["../../../../packages/ui/src/select/Select.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAEzC,kDAAiE;AACjE,6EAAoD;AAEpD,qCAA+C;AAE/C,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAE/B,MAAM,YAAY,GAAgB;IAChC,OAAO,EAAE;QACP;YACE,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,QAAQ;SAChB;QACD;YACE,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,QAAQ;SAChB;KACF;IACD,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,IAAA,iBAAS,GAAkB;IACtC,iBAAiB,EAAE,IAAA,iBAAS,GAAkB;CAC/C,CAAC;AAEF,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,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,eAAM,oBAAK,YAAY,EAAI,CAAC,CAAC;QAErC,MAAM,CAAC,cAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,KAAK,mCACN,YAAY,KACf,MAAM,EAAE,KAAK,GACd,CAAC;QAEF,IAAA,cAAM,EAAC,8BAAC,eAAM,oBAAK,KAAK,EAAI,CAAC,CAAC;QAE9B,MAAM,CAAC,cAAM,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,IAAA,cAAM,EAAC,8BAAC,eAAM,oBAAK,YAAY,EAAI,CAAC,CAAC;QAErC,MAAM,CAAC,cAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAS,EAAE;QACzD,IAAA,cAAM,EAAC,8BAAC,eAAM,oBAAK,YAAY,EAAI,CAAC,CAAC;QAErC,oBAAS,CAAC,KAAK,CAAC,cAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,MAAM,IAAA,eAAO,EAAC,GAAG,EAAE;YACjB,MAAM,CAAC,YAAY,CAAC,CAAC,gBAAgB,EAAE,CAAC;YACxC,MAAM,CAAC,WAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|