@smart-react-components/ui 2.1.8 → 2.2.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/Alert/AlertIcon.d.ts +1 -1
- package/Alert/AlertIcon.js +3 -6
- package/Alert/AlertIcon.test.d.ts +1 -0
- package/Alert/AlertIcon.test.js +24 -0
- package/Alert/index.js +7 -12
- package/Alert/index.test.d.ts +1 -0
- package/Alert/index.test.js +21 -0
- package/Badge/BadgeIcon.d.ts +1 -1
- package/Badge/BadgeIcon.js +3 -3
- package/Badge/BadgeIcon.test.d.ts +1 -0
- package/Badge/BadgeIcon.test.js +27 -0
- package/Badge/BadgeList.d.ts +1 -1
- package/Badge/BadgeList.js +14 -20
- package/Badge/BadgeList.test.d.ts +1 -0
- package/Badge/BadgeList.test.js +19 -0
- package/Badge/index.js +6 -11
- package/Badge/index.test.d.ts +1 -0
- package/Badge/index.test.js +21 -0
- package/Breadcrumb/BreadcrumbItem.js +6 -5
- package/Breadcrumb/BreadcrumbItem.test.d.ts +1 -0
- package/Breadcrumb/BreadcrumbItem.test.js +27 -0
- package/Breadcrumb/BreadcrumbLink.js +7 -9
- package/Breadcrumb/BreadcrumbLink.test.d.ts +1 -0
- package/Breadcrumb/BreadcrumbLink.test.js +30 -0
- package/Breadcrumb/BreadcrumbList.d.ts +1 -1
- package/Breadcrumb/BreadcrumbList.js +12 -20
- package/Breadcrumb/BreadcrumbList.test.d.ts +1 -0
- package/Breadcrumb/BreadcrumbList.test.js +19 -0
- package/Button/ButtonAddon.js +4 -6
- package/Button/ButtonGroup.js +1 -4
- package/Button/ButtonGroup.test.d.ts +1 -0
- package/Button/ButtonGroup.test.js +19 -0
- package/Button/ButtonLink.js +6 -11
- package/Button/ButtonLink.test.d.ts +1 -0
- package/Button/ButtonLink.test.js +17 -0
- package/Button/ButtonList.d.ts +1 -1
- package/Button/ButtonList.js +31 -29
- package/Button/ButtonList.test.d.ts +1 -0
- package/Button/ButtonList.test.js +19 -0
- package/Button/ButtonLoading.d.ts +1 -1
- package/Button/ButtonLoading.js +8 -6
- package/Button/ButtonLoading.test.d.ts +1 -0
- package/Button/ButtonLoading.test.js +30 -0
- package/Button/ButtonSelect.d.ts +1 -1
- package/Button/ButtonSelect.js +19 -15
- package/Button/ButtonSelect.test.d.ts +1 -0
- package/Button/ButtonSelect.test.js +24 -0
- package/Button/index.js +22 -21
- package/Button/index.test.d.ts +1 -0
- package/Button/index.test.js +24 -0
- package/Checkbox/CheckboxAll.d.ts +1 -1
- package/Checkbox/CheckboxAll.js +8 -15
- package/Checkbox/CheckboxGroup.d.ts +2 -2
- package/Checkbox/CheckboxGroup.js +15 -4
- package/Checkbox/CheckboxGroup.test.d.ts +1 -0
- package/Checkbox/CheckboxGroup.test.js +19 -0
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +8 -15
- package/Checkbox/index.test.d.ts +1 -0
- package/Checkbox/index.test.js +62 -0
- package/ColorPicker/index.d.ts +2 -2
- package/ColorPicker/index.js +13 -23
- package/ColorPicker/index.test.d.ts +1 -0
- package/ColorPicker/index.test.js +15 -0
- package/DatePicker/index.js +12 -18
- package/Dropdown/DropdownCategory.d.ts +1 -1
- package/Dropdown/DropdownCategory.js +14 -14
- package/Dropdown/DropdownItem.js +8 -6
- package/Dropdown/DropdownItem.test.d.ts +1 -0
- package/Dropdown/DropdownItem.test.js +74 -0
- package/Dropdown/DropdownList.d.ts +1 -1
- package/Dropdown/DropdownList.js +4 -11
- package/Dropdown/DropdownList.test.d.ts +1 -0
- package/Dropdown/DropdownList.test.js +21 -0
- package/Dropdown/index.js +20 -9
- package/Dropdown/index.test.d.ts +1 -0
- package/Dropdown/index.test.js +24 -0
- package/FixedBox/index.d.ts +1 -1
- package/FixedBox/index.js +1 -1
- package/FixedBox/index.test.d.ts +1 -0
- package/FixedBox/index.test.js +33 -0
- package/Grid/Column.d.ts +19 -1
- package/Grid/Column.test.d.ts +1 -0
- package/Grid/Column.test.js +23 -0
- package/Grid/Container.d.ts +19 -1
- package/Grid/Container.test.d.ts +1 -0
- package/Grid/Container.test.js +19 -0
- package/Grid/Row.d.ts +19 -1
- package/Grid/Row.test.d.ts +1 -0
- package/Grid/Row.test.js +15 -0
- package/Input/InputAddon.js +4 -4
- package/Input/InputAddon.test.d.ts +1 -0
- package/Input/InputAddon.test.js +30 -0
- package/Input/InputColorPicker.js +41 -33
- package/Input/InputColorPicker.test.d.ts +1 -0
- package/Input/InputColorPicker.test.js +18 -0
- package/Input/InputDatePicker.js +25 -24
- package/Input/InputFile.d.ts +1 -1
- package/Input/InputFile.js +16 -25
- package/Input/InputFile.test.d.ts +1 -0
- package/Input/InputFile.test.js +27 -0
- package/Input/InputNumber.d.ts +1 -1
- package/Input/InputNumber.js +41 -21
- package/Input/InputNumber.test.d.ts +1 -0
- package/Input/InputNumber.test.js +15 -0
- package/Input/index.d.ts +1 -1
- package/Input/index.js +38 -21
- package/Input/index.test.d.ts +1 -0
- package/Input/index.test.js +38 -0
- package/Loading/index.js +1 -5
- package/Loading/index.test.d.ts +1 -0
- package/Loading/index.test.js +15 -0
- package/Modal/ModalBody.d.ts +10 -1
- package/Modal/ModalFooter.d.ts +10 -1
- package/Modal/ModalHeader.d.ts +10 -1
- package/Modal/ModalHeader.js +1 -2
- package/Modal/ModalTitle.d.ts +10 -1
- package/Modal/index.js +4 -15
- package/Modal/index.test.d.ts +1 -0
- package/Modal/index.test.js +39 -0
- package/Overlay/index.d.ts +1 -1
- package/Overlay/index.js +20 -16
- package/Overlay/index.test.d.ts +1 -0
- package/Overlay/index.test.js +16 -0
- package/Pagination/PaginationItem.js +5 -4
- package/Pagination/PaginationItem.test.d.ts +1 -0
- package/Pagination/PaginationItem.test.js +27 -0
- package/Pagination/PaginationLink.js +6 -8
- package/Pagination/PaginationLink.test.d.ts +1 -0
- package/Pagination/PaginationLink.test.js +30 -0
- package/Pagination/PaginationList.d.ts +1 -1
- package/Pagination/PaginationList.js +12 -20
- package/Pagination/PaginationList.test.d.ts +1 -0
- package/Pagination/PaginationList.test.js +19 -0
- package/PopUp/Alert.js +3 -12
- package/PopUp/Alert.test.d.ts +1 -0
- package/PopUp/Alert.test.js +23 -0
- package/PopUp/Confirm.js +3 -12
- package/PopUp/Confirm.test.d.ts +1 -0
- package/PopUp/Confirm.test.js +31 -0
- package/PopUp/Prompt.js +3 -12
- package/PopUp/Prompt.test.d.ts +1 -0
- package/PopUp/Prompt.test.js +33 -0
- package/Popover/index.d.ts +1 -1
- package/Popover/index.js +17 -7
- package/Popover/index.test.d.ts +1 -0
- package/Popover/index.test.js +34 -0
- package/ProgressBar/index.js +18 -8
- package/ProgressBar/index.test.d.ts +1 -0
- package/ProgressBar/index.test.js +23 -0
- package/README.md +0 -4
- package/Radio/RadioGroup.d.ts +2 -2
- package/Radio/RadioGroup.js +14 -4
- package/Radio/RadioGroup.test.d.ts +1 -0
- package/Radio/RadioGroup.test.js +19 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +7 -13
- package/Radio/index.test.d.ts +1 -0
- package/Radio/index.test.js +48 -0
- package/Select/Option.js +14 -11
- package/Select/Option.test.d.ts +1 -0
- package/Select/Option.test.js +72 -0
- package/Select/OptionGroup.d.ts +1 -1
- package/Select/OptionGroup.js +21 -17
- package/Select/SelectBox.js +40 -43
- package/Select/SelectBox.test.d.ts +1 -0
- package/Select/SelectBox.test.js +24 -0
- package/Select/SelectSearchBox.d.ts +1 -1
- package/Select/SelectSearchBox.js +28 -19
- package/Select/index.d.ts +1 -1
- package/Select/index.js +25 -25
- package/Select/index.test.d.ts +1 -0
- package/Select/index.test.js +21 -0
- package/Switch/SwitchGroup.d.ts +1 -1
- package/Switch/SwitchGroup.test.d.ts +1 -0
- package/Switch/SwitchGroup.test.js +19 -0
- package/Switch/index.d.ts +1 -1
- package/Switch/index.js +4 -4
- package/Switch/index.test.d.ts +1 -0
- package/Switch/index.test.js +15 -0
- package/Table/TableContainer.d.ts +1 -1
- package/Table/TableContainer.js +5 -13
- package/Table/Td.d.ts +20 -1
- package/Table/Td.js +3 -1
- package/Table/Th.d.ts +19 -1
- package/Table/Tr.d.ts +10 -1
- package/Table/Tr.js +22 -25
- package/Table/Tr.test.d.ts +1 -0
- package/Table/Tr.test.js +23 -0
- package/Table/index.d.ts +1 -1
- package/Table/index.js +2 -11
- package/Textarea/index.js +10 -11
- package/Textarea/index.test.d.ts +1 -0
- package/Textarea/index.test.js +15 -0
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.test.d.ts +1 -0
- package/Tooltip/index.test.js +33 -0
- package/WaveEffect/index.d.ts +1 -1
- package/WaveEffect/index.test.d.ts +1 -0
- package/WaveEffect/index.test.js +29 -0
- package/components/Alert/AlertContent.d.ts +5 -3
- package/components/Alert/AlertElement.d.ts +23 -1
- package/components/Alert/AlertElement.js +26 -27
- package/components/Alert/AlertElement.test.d.ts +1 -0
- package/components/Alert/AlertElement.test.js +67 -0
- package/components/Alert/AlertIconElement.d.ts +23 -1
- package/components/Alert/AlertIconElement.js +20 -23
- package/components/Alert/AlertIconElement.test.d.ts +1 -0
- package/components/Alert/AlertIconElement.test.js +46 -0
- package/components/Badge/BadgeContent.d.ts +5 -3
- package/components/Badge/BadgeElement.d.ts +23 -1
- package/components/Badge/BadgeElement.js +80 -83
- package/components/Badge/BadgeElement.test.d.ts +1 -0
- package/components/Badge/BadgeElement.test.js +76 -0
- package/components/Badge/BadgeIconElement.d.ts +19 -1
- package/components/Badge/BadgeIconElement.js +46 -49
- package/components/Badge/BadgeIconElement.test.d.ts +1 -0
- package/components/Badge/BadgeIconElement.test.js +43 -0
- package/components/Badge/BadgeListElement.d.ts +23 -1
- package/components/Badge/BadgeListElement.js +1 -1
- package/components/Badge/BadgeListElement.test.d.ts +1 -0
- package/components/Badge/BadgeListElement.test.js +15 -0
- package/components/Breadcrumb/BreadcrumbItemElement.d.ts +10 -1
- package/components/Breadcrumb/BreadcrumbItemElement.js +49 -52
- package/components/Breadcrumb/BreadcrumbItemElement.test.d.ts +1 -0
- package/components/Breadcrumb/BreadcrumbItemElement.test.js +47 -0
- package/components/Breadcrumb/BreadcrumbListElement.d.ts +10 -1
- package/components/Breadcrumb/BreadcrumbListElement.js +8 -11
- package/components/Breadcrumb/BreadcrumbListElement.test.d.ts +1 -0
- package/components/Breadcrumb/BreadcrumbListElement.test.js +32 -0
- package/components/Button/ButtonAddonElement.d.ts +23 -1
- package/components/Button/ButtonAddonElement.js +39 -43
- package/components/Button/ButtonAddonElement.test.d.ts +1 -0
- package/components/Button/ButtonAddonElement.test.js +62 -0
- package/components/Button/ButtonContent.d.ts +5 -3
- package/components/Button/ButtonElement.d.ts +23 -1
- package/components/Button/ButtonElement.js +95 -99
- package/components/Button/ButtonElement.test.d.ts +1 -0
- package/components/Button/ButtonElement.test.js +101 -0
- package/components/Button/ButtonGroupElement.d.ts +26 -1
- package/components/Button/ButtonGroupElement.test.d.ts +1 -0
- package/components/Button/ButtonGroupElement.test.js +32 -0
- package/components/Button/ButtonListElement.d.ts +23 -1
- package/components/Button/ButtonListElement.test.d.ts +1 -0
- package/components/Button/ButtonListElement.test.js +32 -0
- package/components/Button/ButtonLoadingElement.d.ts +10 -1
- package/components/Button/ButtonLoadingElement.test.d.ts +1 -0
- package/components/Button/ButtonLoadingElement.test.js +19 -0
- package/components/Checkbox/CheckboxElement.d.ts +24 -1
- package/components/Checkbox/CheckboxElement.js +22 -33
- package/components/Checkbox/CheckboxElement.test.d.ts +1 -0
- package/components/Checkbox/CheckboxElement.test.js +38 -0
- package/components/ColorPicker/ButtonsSection/index.js +1 -1
- package/components/ColorPicker/ColorPickerElement.d.ts +23 -1
- package/components/ColorPicker/ColorPickerElement.js +4 -7
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.d.ts +10 -1
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.js +6 -9
- package/components/ColorPicker/ConsoleSection/index.js +10 -11
- package/components/ColorPicker/PaletteSection/PaletteItemElement.d.ts +23 -1
- package/components/ColorPicker/PaletteSection/PaletteItemElement.js +6 -9
- package/components/ColorPicker/PaletteSection/PaletteList.js +11 -11
- package/components/ColorPicker/PaletteSection/PaletteListContainerElement.d.ts +10 -1
- package/components/ColorPicker/PaletteSection/index.js +3 -2
- package/components/ColorPicker/PickerSection/DraggerElement.d.ts +10 -1
- package/components/ColorPicker/PickerSection/DraggerElement.js +6 -9
- package/components/ColorPicker/PickerSection/MajorDraggerElement.d.ts +38 -1
- package/components/ColorPicker/PickerSection/MajorDraggerElement.js +4 -7
- package/components/ColorPicker/PickerSection/MajorPicker.js +11 -11
- package/components/ColorPicker/PickerSection/MajorPickerElement.d.ts +39 -2
- package/components/ColorPicker/PickerSection/MajorPickerElement.js +1 -1
- package/components/ColorPicker/PickerSection/MinorDraggerElement.d.ts +38 -1
- package/components/ColorPicker/PickerSection/MinorPicker.js +7 -7
- package/components/ColorPicker/PickerSection/MinorPickerElement.d.ts +38 -1
- package/components/ColorPicker/PickerSection/OpacityPicker.js +11 -10
- package/components/ColorPicker/PickerSection/OpacityPickerElement.d.ts +39 -2
- package/components/ColorPicker/PickerSection/PickerElement.d.ts +10 -1
- package/components/ColorPicker/PickerSection/index.d.ts +2 -2
- package/components/ColorPicker/PickerSection/index.js +3 -3
- package/components/DatePicker/DatePicker/DatePickerHeader.js +1 -1
- package/components/DatePicker/DatePicker/DatePickerHeaderElement.d.ts +23 -1
- package/components/DatePicker/DatePicker/DatePickerHeaderElement.js +3 -6
- package/components/DatePicker/DatePicker/DatePickerItemElement.d.ts +23 -1
- package/components/DatePicker/DatePicker/DatePickerItemElement.js +14 -17
- package/components/DatePicker/DatePicker/DatePickerListElement.d.ts +10 -1
- package/components/DatePicker/DatePicker/DatePickerWeekItemElement.d.ts +23 -1
- package/components/DatePicker/DatePicker/DatePickerWeekItemElement.js +14 -17
- package/components/DatePicker/DatePicker/DatePickerWeekListElement.d.ts +10 -1
- package/components/DatePicker/DatePicker/MonthPicker.js +1 -1
- package/components/DatePicker/DatePicker/WeekPicker.js +2 -2
- package/components/DatePicker/DatePicker/YearPicker.js +1 -1
- package/components/DatePicker/DatePicker/index.js +5 -5
- package/components/DatePicker/DatePickerElement.d.ts +26 -1
- package/components/DatePicker/DatePickerHeader.js +1 -1
- package/components/DatePicker/DatePickerHeaderElement.d.ts +23 -1
- package/components/DatePicker/DatePickerHeaderElement.js +10 -13
- package/components/DatePicker/TimePicker/TimePickerArrowItem.js +5 -5
- package/components/DatePicker/TimePicker/TimePickerElement.d.ts +23 -1
- package/components/DatePicker/TimePicker/TimePickerElement.js +17 -20
- package/components/DatePicker/TimePicker/index.js +1 -1
- package/components/Dropdown/DropdownItemElement.d.ts +10 -1
- package/components/Dropdown/DropdownItemElement.js +30 -33
- package/components/Dropdown/DropdownItemElement.test.d.ts +1 -0
- package/components/Dropdown/DropdownItemElement.test.js +70 -0
- package/components/Dropdown/DropdownListElement.d.ts +23 -3
- package/components/Dropdown/DropdownListElement.js +11 -14
- package/components/Dropdown/DropdownListElement.test.d.ts +1 -0
- package/components/Dropdown/DropdownListElement.test.js +40 -0
- package/components/FixedBox/FixedBoxElement.d.ts +10 -1
- package/components/FixedBox/FixedBoxElement.test.d.ts +1 -0
- package/components/FixedBox/FixedBoxElement.test.js +23 -0
- package/components/FixedBox/OverlayElement.d.ts +17 -1
- package/components/FixedBox/OverlayElement.test.d.ts +1 -0
- package/components/FixedBox/OverlayElement.test.js +19 -0
- package/components/Form/FormBlockLabel.d.ts +23 -1
- package/components/Form/FormBlockLabel.js +8 -11
- package/components/Form/FormBlockLabel.test.d.ts +1 -0
- package/components/Form/FormBlockLabel.test.js +37 -0
- package/components/Form/FormGroup.d.ts +10 -1
- package/components/Form/FormInlineLabel.d.ts +23 -1
- package/components/Form/FormInlineLabel.js +6 -9
- package/components/Form/FormInlineLabel.test.d.ts +1 -0
- package/components/Form/FormInlineLabel.test.js +44 -0
- package/components/Form/HiddenInput.d.ts +3 -1
- package/components/Input/InputAddonElement.d.ts +23 -1
- package/components/Input/InputAddonElement.js +60 -60
- package/components/Input/InputAddonElement.test.d.ts +1 -0
- package/components/Input/InputAddonElement.test.js +67 -0
- package/components/Input/InputElement.d.ts +23 -1
- package/components/Input/InputElement.js +54 -58
- package/components/Input/InputElement.test.d.ts +1 -0
- package/components/Input/InputElement.test.js +74 -0
- package/components/Input/InputFileTemplate.d.ts +1 -1
- package/components/Input/InputFileTemplate.js +1 -1
- package/components/Input/InputFileTemplate.test.d.ts +1 -0
- package/components/Input/InputFileTemplate.test.js +54 -0
- package/components/Input/InputNumberTemplate.js +2 -2
- package/components/Input/InputNumberTemplate.test.d.ts +1 -0
- package/components/Input/InputNumberTemplate.test.js +43 -0
- package/components/Input/InputNumberTemplateElement.d.ts +23 -1
- package/components/Input/InputPlaceholder.d.ts +24 -1
- package/components/Input/InputPlaceholder.js +3 -1
- package/components/Input/InputWrapper.d.ts +10 -1
- package/components/Input/InputWrapper.js +18 -21
- package/components/Loading/LoadingElement.d.ts +24 -1
- package/components/Loading/LoadingElement.test.d.ts +1 -0
- package/components/Loading/LoadingElement.test.js +15 -0
- package/components/Modal/ModalElement.d.ts +23 -1
- package/components/Modal/ModalElement.test.d.ts +1 -0
- package/components/Modal/ModalElement.test.js +42 -0
- package/components/Modal/OverlayElement.d.ts +17 -1
- package/components/Modal/OverlayElement.test.d.ts +1 -0
- package/components/Modal/OverlayElement.test.js +40 -0
- package/components/Overlay/OverlayElement.d.ts +10 -1
- package/components/Overlay/OverlayElement.test.d.ts +1 -0
- package/components/Overlay/OverlayElement.test.js +27 -0
- package/components/Pagination/PaginationItemElement.d.ts +10 -1
- package/components/Pagination/PaginationItemElement.js +80 -83
- package/components/Pagination/PaginationItemElement.test.d.ts +1 -0
- package/components/Pagination/PaginationItemElement.test.js +51 -0
- package/components/Pagination/PaginationListElement.d.ts +10 -1
- package/components/Pagination/PaginationListElement.test.d.ts +1 -0
- package/components/Pagination/PaginationListElement.test.js +15 -0
- package/components/Popover/PopoverArrow.d.ts +6 -4
- package/components/Popover/PopoverElement.d.ts +29 -5
- package/components/Popover/PopoverElement.js +21 -24
- package/components/Popover/PopoverElement.test.d.ts +1 -0
- package/components/Popover/PopoverElement.test.js +77 -0
- package/components/ProgressBar/ProgressBarElement.d.ts +16 -3
- package/components/ProgressBar/ProgressBarElement.js +19 -22
- package/components/ProgressBar/ProgressBarElement.test.d.ts +1 -0
- package/components/ProgressBar/ProgressBarElement.test.js +75 -0
- package/components/Radio/RadioElement.d.ts +24 -1
- package/components/Radio/RadioElement.js +14 -23
- package/components/Radio/RadioElement.test.d.ts +1 -0
- package/components/Radio/RadioElement.test.js +37 -0
- package/components/Select/SelectElement.d.ts +56 -1
- package/components/Select/SelectElement.js +2 -2
- package/components/Select/SelectElement.test.d.ts +1 -0
- package/components/Select/SelectElement.test.js +32 -0
- package/components/Switch/SwitchElement.d.ts +25 -1
- package/components/Switch/SwitchElement.js +20 -26
- package/components/Switch/SwitchElement.test.d.ts +1 -0
- package/components/Switch/SwitchElement.test.js +37 -0
- package/components/Table/TableContainerElement.d.ts +10 -1
- package/components/Table/TableElement.d.ts +23 -1
- package/components/Table/TableElement.js +60 -63
- package/components/Tooltip/TooltipElement.d.ts +23 -3
- package/components/Tooltip/TooltipElement.js +15 -18
- package/components/Tooltip/TooltipElement.test.d.ts +1 -0
- package/components/Tooltip/TooltipElement.test.js +42 -0
- package/components/WaveEffect/WaveEffectElement.d.ts +10 -1
- package/components/WaveEffect/WaveEffectElement.test.d.ts +1 -0
- package/components/WaveEffect/WaveEffectElement.test.js +25 -0
- package/constants/date-picker.js +4 -4
- package/context/ColorPickerProps.d.ts +0 -1
- package/hooks/useAddons.d.ts +2 -2
- package/hooks/useAddons.js +6 -2
- package/hooks/useAddons.test.d.ts +1 -0
- package/hooks/useAddons.test.js +35 -0
- package/hooks/useFixedBoxMethods.d.ts +0 -1
- package/hooks/useFixedBoxMethods.js +3 -12
- package/hooks/useInputMethods.js +1 -1
- package/hooks/useInputMethods.test.d.ts +1 -0
- package/hooks/useInputMethods.test.js +94 -0
- package/hooks/useSelectBoxHover.d.ts +1 -1
- package/hooks/useSelectBoxItemList.d.ts +1 -1
- package/hooks/useSelectSearch.d.ts +1 -1
- package/icons/Add.d.ts +20 -5
- package/icons/ArrowDown.d.ts +20 -5
- package/icons/ArrowLeft.d.ts +20 -5
- package/icons/ArrowMultipleDown.d.ts +20 -5
- package/icons/ArrowRight.d.ts +20 -5
- package/icons/Cancel.d.ts +20 -5
- package/icons/CaretDown.d.ts +20 -5
- package/icons/CaretUp.d.ts +20 -5
- package/icons/Close.d.ts +20 -5
- package/icons/Date.d.ts +20 -5
- package/icons/Eraser.d.ts +20 -5
- package/icons/Palette.d.ts +20 -5
- package/icons/Save.d.ts +20 -5
- package/icons/Time.d.ts +20 -5
- package/package.json +25 -26
- package/types/button.d.ts +1 -1
- package/types/button.js +1 -1
- package/types/color-picker.d.ts +4 -4
- package/types/color-picker.js +1 -1
- package/types/form.d.ts +1 -1
- package/types/global.d.d.ts +5 -0
- package/types/global.d.js +1 -0
- package/types/index.d.ts +1 -1
- package/types/index.js +4 -4
- package/types/wave-effect.d.ts +1 -1
- package/util/color-picker.d.ts +4 -4
- package/util/color-picker.js +3 -3
- package/util/color-picker.test.d.ts +1 -0
- package/util/color-picker.test.js +38 -0
- package/util/css.test.d.ts +1 -0
- package/util/css.test.js +12 -0
- package/util/dom.test.d.ts +1 -0
- package/util/dom.test.js +8 -0
- package/util/fixed-box.js +12 -7
- package/util/form.test.d.ts +1 -0
- package/util/form.test.js +14 -0
- package/util/popover.js +4 -1
- package/util/props.js +11 -2
- package/util/props.test.d.ts +1 -0
- package/util/props.test.js +30 -0
- package/util/radio.test.d.ts +1 -0
- package/util/radio.test.js +10 -0
- package/util/wave-effect.test.d.ts +1 -0
- package/util/wave-effect.test.js +14 -0
|
@@ -4,22 +4,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
|
|
7
|
-
const Svg_1 = __importDefault(require("@smart-react-components/core/Element/Svg"));
|
|
8
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
8
|
const types_1 = require("../../types");
|
|
10
9
|
const css_1 = require("../../util/css");
|
|
11
10
|
const props_1 = require("../../util/props");
|
|
12
|
-
exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ className = '', isSeparated }) => (
|
|
11
|
+
exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ className = '', isSeparated }) => ({
|
|
12
|
+
...(isSeparated && { as: 'label' }),
|
|
13
|
+
className: `src-input-addon ${className}`,
|
|
14
|
+
getInputSize: (v, t) => `
|
|
13
15
|
font-size: ${t.$.size.form.blockLabel[v].fontSize};
|
|
14
16
|
padding: ${(0, css_1.toCSSValue)(t.$.size.input[v].padding.x)(v => v / 2)};
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
svg {
|
|
17
19
|
height: ${t.$.size.icon[v]};
|
|
18
20
|
width: ${t.$.size.icon[v]};
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return `
|
|
22
|
+
`,
|
|
23
|
+
}))(({ theme, addonPosition, cursorKey, hasBorder, isClickable, isDisabled, isFocused, isOutline, isReadOnly, isSeparated, isSoft, palette, shape }) => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _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; var _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105; return `
|
|
23
24
|
align-items: center;
|
|
24
25
|
box-sizing: border-box;
|
|
25
26
|
display: inline-flex;
|
|
@@ -30,104 +31,103 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ class
|
|
|
30
31
|
transition-property: background, border, color, fill;
|
|
31
32
|
|
|
32
33
|
${isSeparated
|
|
33
|
-
|
|
34
|
+
? `
|
|
34
35
|
border-bottom-${types_1.OrderPosition[addonPosition].toLowerCase()}-radius: ${theme.$.radius.input[shape]};
|
|
35
36
|
border-top-${types_1.OrderPosition[addonPosition].toLowerCase()}-radius: ${theme.$.radius.input[shape]};
|
|
36
37
|
|
|
37
38
|
${hasBorder
|
|
38
|
-
|
|
39
|
+
? `
|
|
39
40
|
border: solid 1px;
|
|
40
41
|
border-${types_1.OrderPosition[(0, props_1.getReverseOrderPosition)(addonPosition)].toLowerCase()}: 0;
|
|
41
42
|
`
|
|
42
|
-
: ''}
|
|
43
|
-
`
|
|
44
43
|
: ''}
|
|
44
|
+
`
|
|
45
|
+
: ''}
|
|
45
46
|
|
|
46
47
|
${!isOutline
|
|
47
|
-
|
|
48
|
+
? `
|
|
48
49
|
${!isSoft
|
|
49
|
-
|
|
50
|
+
? `
|
|
50
51
|
|
|
51
52
|
${!isFocused
|
|
52
|
-
|
|
53
|
-
background: ${(
|
|
54
|
-
border-color: ${(
|
|
55
|
-
color: ${(
|
|
53
|
+
? `
|
|
54
|
+
background: ${(_78 = (_b = (_a = theme.$.palette[palette].input) === null || _a === void 0 ? void 0 : _a.addon) === null || _b === void 0 ? void 0 : _b.background) !== null && _78 !== void 0 ? _78 : theme.$.palette[palette].main};
|
|
55
|
+
border-color: ${(_79 = (_d = (_c = theme.$.palette[palette].input) === null || _c === void 0 ? void 0 : _c.addon) === null || _d === void 0 ? void 0 : _d.border) !== null && _79 !== void 0 ? _79 : theme.$.palette[palette].dark};
|
|
56
|
+
color: ${(_80 = (_f = (_e = theme.$.palette[palette].input) === null || _e === void 0 ? void 0 : _e.addon) === null || _f === void 0 ? void 0 : _f.font) !== null && _80 !== void 0 ? _80 : theme.$.palette[palette].font};
|
|
56
57
|
`
|
|
57
|
-
|
|
58
|
-
background: ${(
|
|
59
|
-
border-color: ${(
|
|
60
|
-
color: ${(
|
|
58
|
+
: `
|
|
59
|
+
background: ${(_81 = (_j = (_h = (_g = theme.$.palette[palette].input) === null || _g === void 0 ? void 0 : _g.focused) === null || _h === void 0 ? void 0 : _h.addon) === null || _j === void 0 ? void 0 : _j.background) !== null && _81 !== void 0 ? _81 : theme.$.palette[palette].dynamicer};
|
|
60
|
+
border-color: ${(_82 = (_m = (_l = (_k = theme.$.palette[palette].input) === null || _k === void 0 ? void 0 : _k.focused) === null || _l === void 0 ? void 0 : _l.addon) === null || _m === void 0 ? void 0 : _m.border) !== null && _82 !== void 0 ? _82 : theme.$.palette[palette].dynamicest};
|
|
61
|
+
color: ${(_83 = (_q = (_p = (_o = theme.$.palette[palette].input) === null || _o === void 0 ? void 0 : _o.focused) === null || _p === void 0 ? void 0 : _p.addon) === null || _q === void 0 ? void 0 : _q.font) !== null && _83 !== void 0 ? _83 : theme.$.palette[palette].font};
|
|
61
62
|
`}
|
|
62
63
|
`
|
|
63
|
-
|
|
64
|
+
: `
|
|
64
65
|
${!isFocused
|
|
65
|
-
|
|
66
|
-
background: ${(
|
|
67
|
-
border-color: ${(
|
|
68
|
-
color: ${(
|
|
66
|
+
? `
|
|
67
|
+
background: ${(_84 = (_t = (_s = (_r = theme.$.palette[palette].input) === null || _r === void 0 ? void 0 : _r.soft) === null || _s === void 0 ? void 0 : _s.addon) === null || _t === void 0 ? void 0 : _t.background) !== null && _84 !== void 0 ? _84 : theme.$.palette[palette].soft};
|
|
68
|
+
border-color: ${(_85 = (_w = (_v = (_u = theme.$.palette[palette].input) === null || _u === void 0 ? void 0 : _u.soft) === null || _v === void 0 ? void 0 : _v.addon) === null || _w === void 0 ? void 0 : _w.border) !== null && _85 !== void 0 ? _85 : theme.$.palette[palette].softDynamic};
|
|
69
|
+
color: ${(_86 = (_z = (_y = (_x = theme.$.palette[palette].input) === null || _x === void 0 ? void 0 : _x.soft) === null || _y === void 0 ? void 0 : _y.addon) === null || _z === void 0 ? void 0 : _z.font) !== null && _86 !== void 0 ? _86 : theme.$.palette[palette].softFont};
|
|
69
70
|
`
|
|
70
|
-
|
|
71
|
-
background: ${(
|
|
72
|
-
border-color: ${(
|
|
73
|
-
color: ${(
|
|
71
|
+
: `
|
|
72
|
+
background: ${(_87 = (_3 = (_2 = (_1 = (_0 = theme.$.palette[palette].input) === null || _0 === void 0 ? void 0 : _0.soft) === null || _1 === void 0 ? void 0 : _1.focused) === null || _2 === void 0 ? void 0 : _2.addon) === null || _3 === void 0 ? void 0 : _3.background) !== null && _87 !== void 0 ? _87 : theme.$.palette[palette].softDynamicer};
|
|
73
|
+
border-color: ${(_88 = (_7 = (_6 = (_5 = (_4 = theme.$.palette[palette].input) === null || _4 === void 0 ? void 0 : _4.soft) === null || _5 === void 0 ? void 0 : _5.focused) === null || _6 === void 0 ? void 0 : _6.addon) === null || _7 === void 0 ? void 0 : _7.border) !== null && _88 !== void 0 ? _88 : theme.$.palette[palette].softDynamicest};
|
|
74
|
+
color: ${(_89 = (_11 = (_10 = (_9 = (_8 = theme.$.palette[palette].input) === null || _8 === void 0 ? void 0 : _8.soft) === null || _9 === void 0 ? void 0 : _9.focused) === null || _10 === void 0 ? void 0 : _10.addon) === null || _11 === void 0 ? void 0 : _11.font) !== null && _89 !== void 0 ? _89 : theme.$.palette[palette].softFont};
|
|
74
75
|
`}
|
|
75
76
|
`}
|
|
76
77
|
`
|
|
77
|
-
|
|
78
|
+
: `
|
|
78
79
|
${!isSoft
|
|
79
|
-
|
|
80
|
+
? `
|
|
80
81
|
${!isFocused
|
|
81
|
-
|
|
82
|
-
background: ${(
|
|
83
|
-
border-color ${(
|
|
84
|
-
color: ${(
|
|
82
|
+
? `
|
|
83
|
+
background: ${(_90 = (_14 = (_13 = (_12 = theme.$.palette[palette].input) === null || _12 === void 0 ? void 0 : _12.outline) === null || _13 === void 0 ? void 0 : _13.addon) === null || _14 === void 0 ? void 0 : _14.background) !== null && _90 !== void 0 ? _90 : theme.$.color.dynamic.background};
|
|
84
|
+
border-color ${(_91 = (_17 = (_16 = (_15 = theme.$.palette[palette].input) === null || _15 === void 0 ? void 0 : _15.outline) === null || _16 === void 0 ? void 0 : _16.addon) === null || _17 === void 0 ? void 0 : _17.border) !== null && _91 !== void 0 ? _91 : theme.$.color.dynamic.accent};
|
|
85
|
+
color: ${(_92 = (_20 = (_19 = (_18 = theme.$.palette[palette].input) === null || _18 === void 0 ? void 0 : _18.outline) === null || _19 === void 0 ? void 0 : _19.addon) === null || _20 === void 0 ? void 0 : _20.font) !== null && _92 !== void 0 ? _92 : theme.$.color.dynamic.font};
|
|
85
86
|
`
|
|
86
|
-
|
|
87
|
-
background: ${(
|
|
88
|
-
border-color ${(
|
|
89
|
-
color: ${(
|
|
87
|
+
: `
|
|
88
|
+
background: ${(_93 = (_24 = (_23 = (_22 = (_21 = theme.$.palette[palette].input) === null || _21 === void 0 ? void 0 : _21.outline) === null || _22 === void 0 ? void 0 : _22.focused) === null || _23 === void 0 ? void 0 : _23.addon) === null || _24 === void 0 ? void 0 : _24.background) !== null && _93 !== void 0 ? _93 : theme.$.color.dynamic.background};
|
|
89
|
+
border-color ${(_94 = (_28 = (_27 = (_26 = (_25 = theme.$.palette[palette].input) === null || _25 === void 0 ? void 0 : _25.outline) === null || _26 === void 0 ? void 0 : _26.focused) === null || _27 === void 0 ? void 0 : _27.addon) === null || _28 === void 0 ? void 0 : _28.border) !== null && _94 !== void 0 ? _94 : theme.$.palette[palette].main};
|
|
90
|
+
color: ${(_95 = (_32 = (_31 = (_30 = (_29 = theme.$.palette[palette].input) === null || _29 === void 0 ? void 0 : _29.outline) === null || _30 === void 0 ? void 0 : _30.focused) === null || _31 === void 0 ? void 0 : _31.addon) === null || _32 === void 0 ? void 0 : _32.font) !== null && _95 !== void 0 ? _95 : theme.$.color.dynamic.font};
|
|
90
91
|
`}
|
|
91
92
|
`
|
|
92
|
-
|
|
93
|
+
: `
|
|
93
94
|
${!isFocused
|
|
94
|
-
|
|
95
|
-
background: ${(
|
|
96
|
-
border-color ${(
|
|
97
|
-
color: ${(
|
|
95
|
+
? `
|
|
96
|
+
background: ${(_96 = (_36 = (_35 = (_34 = (_33 = theme.$.palette[palette].input) === null || _33 === void 0 ? void 0 : _33.soft) === null || _34 === void 0 ? void 0 : _34.outline) === null || _35 === void 0 ? void 0 : _35.addon) === null || _36 === void 0 ? void 0 : _36.background) !== null && _96 !== void 0 ? _96 : theme.$.color.dynamic.background};
|
|
97
|
+
border-color ${(_97 = (_40 = (_39 = (_38 = (_37 = theme.$.palette[palette].input) === null || _37 === void 0 ? void 0 : _37.soft) === null || _38 === void 0 ? void 0 : _38.outline) === null || _39 === void 0 ? void 0 : _39.addon) === null || _40 === void 0 ? void 0 : _40.border) !== null && _97 !== void 0 ? _97 : theme.$.color.dynamic.accent};
|
|
98
|
+
color: ${(_98 = (_44 = (_43 = (_42 = (_41 = theme.$.palette[palette].input) === null || _41 === void 0 ? void 0 : _41.soft) === null || _42 === void 0 ? void 0 : _42.outline) === null || _43 === void 0 ? void 0 : _43.addon) === null || _44 === void 0 ? void 0 : _44.font) !== null && _98 !== void 0 ? _98 : theme.$.color.dynamic.font};
|
|
98
99
|
`
|
|
99
|
-
|
|
100
|
-
background: ${(
|
|
101
|
-
border-color ${(
|
|
102
|
-
color: ${(
|
|
100
|
+
: `
|
|
101
|
+
background: ${(_99 = (_49 = (_48 = (_47 = (_46 = (_45 = theme.$.palette[palette].input) === null || _45 === void 0 ? void 0 : _45.soft) === null || _46 === void 0 ? void 0 : _46.outline) === null || _47 === void 0 ? void 0 : _47.focused) === null || _48 === void 0 ? void 0 : _48.addon) === null || _49 === void 0 ? void 0 : _49.background) !== null && _99 !== void 0 ? _99 : theme.$.color.dynamic.background};
|
|
102
|
+
border-color ${(_100 = (_54 = (_53 = (_52 = (_51 = (_50 = theme.$.palette[palette].input) === null || _50 === void 0 ? void 0 : _50.soft) === null || _51 === void 0 ? void 0 : _51.outline) === null || _52 === void 0 ? void 0 : _52.focused) === null || _53 === void 0 ? void 0 : _53.addon) === null || _54 === void 0 ? void 0 : _54.border) !== null && _100 !== void 0 ? _100 : theme.$.palette[palette].main};
|
|
103
|
+
color: ${(_101 = (_59 = (_58 = (_57 = (_56 = (_55 = theme.$.palette[palette].input) === null || _55 === void 0 ? void 0 : _55.soft) === null || _56 === void 0 ? void 0 : _56.outline) === null || _57 === void 0 ? void 0 : _57.focused) === null || _58 === void 0 ? void 0 : _58.addon) === null || _59 === void 0 ? void 0 : _59.font) !== null && _101 !== void 0 ? _101 : theme.$.color.dynamic.font};
|
|
103
104
|
`}
|
|
104
105
|
`}
|
|
105
106
|
`}
|
|
106
107
|
|
|
107
108
|
${(!isSeparated && isDisabled)
|
|
108
|
-
|
|
109
|
+
? `
|
|
109
110
|
opacity: ${theme.$.opacity.formDisabled};
|
|
110
111
|
pointer-events: none;
|
|
111
112
|
|
|
112
113
|
${isOutline
|
|
113
|
-
|
|
114
|
-
background: ${!isSoft ? ((
|
|
115
|
-
color: ${!isSoft ? ((
|
|
114
|
+
? `
|
|
115
|
+
background: ${!isSoft ? ((_102 = (_63 = (_62 = (_61 = (_60 = theme.$.palette[palette].input) === null || _60 === void 0 ? void 0 : _60.outline) === null || _61 === void 0 ? void 0 : _61.disabled) === null || _62 === void 0 ? void 0 : _62.addon) === null || _63 === void 0 ? void 0 : _63.background) !== null && _102 !== void 0 ? _102 : theme.$.color.dynamic.accent) : ((_103 = (_68 = (_67 = (_66 = (_65 = (_64 = theme.$.palette[palette].input) === null || _64 === void 0 ? void 0 : _64.soft) === null || _65 === void 0 ? void 0 : _65.outline) === null || _66 === void 0 ? void 0 : _66.disabled) === null || _67 === void 0 ? void 0 : _67.addon) === null || _68 === void 0 ? void 0 : _68.background) !== null && _103 !== void 0 ? _103 : theme.$.color.dynamic.accent)};
|
|
116
|
+
color: ${!isSoft ? ((_104 = (_72 = (_71 = (_70 = (_69 = theme.$.palette[palette].input) === null || _69 === void 0 ? void 0 : _69.outline) === null || _70 === void 0 ? void 0 : _70.disabled) === null || _71 === void 0 ? void 0 : _71.addon) === null || _72 === void 0 ? void 0 : _72.font) !== null && _104 !== void 0 ? _104 : theme.$.color.dynamic.gray) : ((_105 = (_77 = (_76 = (_75 = (_74 = (_73 = theme.$.palette[palette].input) === null || _73 === void 0 ? void 0 : _73.soft) === null || _74 === void 0 ? void 0 : _74.outline) === null || _75 === void 0 ? void 0 : _75.disabled) === null || _76 === void 0 ? void 0 : _76.addon) === null || _77 === void 0 ? void 0 : _77.font) !== null && _105 !== void 0 ? _105 : theme.$.color.dynamic.gray)};
|
|
116
117
|
`
|
|
117
|
-
: ''}
|
|
118
|
-
`
|
|
119
118
|
: ''}
|
|
119
|
+
`
|
|
120
|
+
: ''}
|
|
120
121
|
|
|
121
122
|
${(isSeparated && isClickable)
|
|
122
|
-
|
|
123
|
+
? `
|
|
123
124
|
cursor: ${theme.$.cursor.inputAddonClickable};
|
|
124
125
|
`
|
|
125
|
-
|
|
126
|
+
: ''}
|
|
126
127
|
|
|
127
128
|
${(!isSeparated && !isReadOnly && !isDisabled && cursorKey)
|
|
128
|
-
|
|
129
|
+
? `
|
|
129
130
|
cursor: ${theme.$.cursor[cursorKey]};
|
|
130
131
|
`
|
|
131
|
-
|
|
132
|
-
`;
|
|
133
|
-
});
|
|
132
|
+
: ''}
|
|
133
|
+
`; });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const test_1 = require("@smart-react-components/core/test");
|
|
7
|
+
const react_1 = require("@testing-library/react");
|
|
8
|
+
const react_2 = __importDefault(require("react"));
|
|
9
|
+
const types_1 = require("../../types");
|
|
10
|
+
const InputAddonElement_1 = __importDefault(require("./InputAddonElement"));
|
|
11
|
+
describe('<InputAddonElement />', () => {
|
|
12
|
+
let props;
|
|
13
|
+
beforeAll(() => {
|
|
14
|
+
props = {
|
|
15
|
+
addonPosition: types_1.OrderPosition.LEFT,
|
|
16
|
+
hasBorder: true,
|
|
17
|
+
inputSize: 'medium',
|
|
18
|
+
isDisabled: false,
|
|
19
|
+
isFocused: false,
|
|
20
|
+
isOutline: true,
|
|
21
|
+
isSeparated: false,
|
|
22
|
+
isSoft: false,
|
|
23
|
+
palette: 'primary',
|
|
24
|
+
shape: 'rectangle',
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
it('should render component', () => {
|
|
28
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props })));
|
|
29
|
+
expect(asFragment()).toMatchSnapshot();
|
|
30
|
+
});
|
|
31
|
+
it('should render component focused', () => {
|
|
32
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isFocused: true })));
|
|
33
|
+
expect(asFragment()).toMatchSnapshot();
|
|
34
|
+
});
|
|
35
|
+
it('should render component disabled', () => {
|
|
36
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isDisabled: true })));
|
|
37
|
+
expect(asFragment()).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
it('should render component not outline', () => {
|
|
40
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isOutline: false })));
|
|
41
|
+
expect(asFragment()).toMatchSnapshot();
|
|
42
|
+
});
|
|
43
|
+
it('should render component with soft colors', () => {
|
|
44
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isOutline: false, isSoft: true })));
|
|
45
|
+
expect(asFragment()).toMatchSnapshot();
|
|
46
|
+
});
|
|
47
|
+
it('should resize component responsively', () => {
|
|
48
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, inputSize: "small", inputSizeMd: "medium", inputSizeLg: "large" })));
|
|
49
|
+
expect(asFragment()).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
it('should render component at right', () => {
|
|
52
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, addonPosition: types_1.OrderPosition.RIGHT })));
|
|
53
|
+
expect(asFragment()).toMatchSnapshot();
|
|
54
|
+
});
|
|
55
|
+
it('should be focused', () => {
|
|
56
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isFocused: true })));
|
|
57
|
+
expect(asFragment()).toMatchSnapshot();
|
|
58
|
+
});
|
|
59
|
+
it('should be disabled', () => {
|
|
60
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isDisabled: true })));
|
|
61
|
+
expect(asFragment()).toMatchSnapshot();
|
|
62
|
+
});
|
|
63
|
+
it('should be separated', () => {
|
|
64
|
+
const { asFragment } = (0, react_1.render)((0, test_1.wrapTheme)(react_2.default.createElement(InputAddonElement_1.default, { ...props, isSeparated: true })));
|
|
65
|
+
expect(asFragment()).toMatchSnapshot();
|
|
66
|
+
});
|
|
67
|
+
});
|