@decisiv/ui-components 2.0.1-alpha.97 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/atoms/BooleanInput/elements.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/elements.js +8 -3
- package/lib/atoms/BooleanInput/index.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/index.js +8 -4
- package/lib/atoms/BooleanInput/types.d.ts +2 -0
- package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.js +38 -5
- package/lib/atoms/Calendar/index.test.js +5 -5
- package/lib/atoms/Calendar/types.d.ts +1 -1
- package/lib/atoms/Calendar/types.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.d.ts +2 -1
- package/lib/atoms/InputField/Containers.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.js +3 -1
- package/lib/atoms/InputField/HelpMessage.d.ts +1 -1
- package/lib/atoms/InputField/HelpMessage.d.ts.map +1 -1
- package/lib/atoms/InputField/HelpMessage.js +23 -7
- package/lib/atoms/InputField/index.d.ts +6 -1
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +21 -4
- package/lib/atoms/InputField/index.test.js +53 -0
- package/lib/atoms/InputField/schema.js +2 -2
- package/lib/atoms/InputField/styles.d.ts +7 -0
- package/lib/atoms/InputField/styles.d.ts.map +1 -0
- package/lib/atoms/InputField/styles.js +31 -0
- package/lib/atoms/OptionsList/Category/index.d.ts +4 -0
- package/lib/atoms/OptionsList/Category/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Category/index.js +85 -0
- package/lib/atoms/OptionsList/Category/styles.d.ts +5 -0
- package/lib/atoms/OptionsList/Category/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Category/styles.js +35 -0
- package/lib/atoms/OptionsList/{Option.d.ts → Option/index.d.ts} +2 -2
- package/lib/atoms/OptionsList/Option/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/index.js +182 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts +17 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/styles.js +86 -0
- package/lib/atoms/OptionsList/context.d.ts +1 -0
- package/lib/atoms/OptionsList/context.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.d.ts +1 -44
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +259 -40
- package/lib/atoms/OptionsList/index.test.js +329 -186
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +7 -1
- package/lib/atoms/OptionsList/styles.d.ts +45 -0
- package/lib/atoms/OptionsList/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/styles.js +29 -0
- package/lib/atoms/OptionsList/types.d.ts +50 -1
- package/lib/atoms/OptionsList/types.d.ts.map +1 -1
- package/lib/atoms/OptionsList/utils.d.ts +2 -1
- package/lib/atoms/OptionsList/utils.d.ts.map +1 -1
- package/lib/atoms/OptionsList/utils.js +49 -2
- package/lib/components/Alert/Container.d.ts +201 -0
- package/lib/components/Alert/Container.d.ts.map +1 -0
- package/lib/components/Alert/Container.js +26 -0
- package/lib/components/Alert/StyledButton.d.ts +5 -0
- package/lib/components/Alert/StyledButton.d.ts.map +1 -0
- package/lib/components/Alert/StyledButton.js +23 -0
- package/lib/components/Alert/index.d.ts +27 -0
- package/lib/components/Alert/index.d.ts.map +1 -0
- package/lib/components/Alert/index.js +112 -0
- package/lib/components/Alert/index.test.js +79 -0
- package/lib/components/Alert/intents.d.ts +13 -0
- package/lib/components/Alert/intents.d.ts.map +1 -0
- package/lib/components/Alert/intents.js +72 -0
- package/lib/components/{Tabs/schema.tab.d.ts → Alert/schema.d.ts} +1 -1
- package/lib/components/Alert/schema.d.ts.map +1 -0
- package/lib/components/Alert/schema.js +25 -0
- package/lib/components/Alert/types.d.ts +36 -0
- package/lib/components/Alert/types.d.ts.map +1 -0
- package/lib/components/Alert/types.js +32 -0
- package/lib/components/Avatar/AvatarContainer.d.ts +1 -13
- package/lib/components/Avatar/AvatarContainer.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContainer.js +12 -13
- package/lib/components/Avatar/AvatarContent.d.ts +2 -2
- package/lib/components/Avatar/AvatarContent.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContent.js +24 -20
- package/lib/components/Avatar/index.d.ts.map +1 -1
- package/lib/components/Avatar/index.js +42 -5
- package/lib/components/Avatar/index.test.js +4 -0
- package/lib/components/Avatar/schema.d.ts.map +1 -1
- package/lib/components/Avatar/schema.js +3 -1
- package/lib/components/Avatar/types.d.ts +15 -2
- package/lib/components/Avatar/types.d.ts.map +1 -1
- package/lib/components/Badge/index.d.ts.map +1 -1
- package/lib/components/Badge/index.js +2 -58
- package/lib/components/Badge/index.test.js +15 -4
- package/lib/components/Badge/schema.d.ts.map +1 -1
- package/lib/components/Badge/schema.js +1 -0
- package/lib/components/Badge/styles.d.ts +3 -0
- package/lib/components/Badge/styles.d.ts.map +1 -0
- package/lib/components/Badge/styles.js +97 -0
- package/lib/components/Badge/types.d.ts +3 -1
- package/lib/components/Badge/types.d.ts.map +1 -1
- package/lib/components/Badge/types.js +2 -1
- package/lib/components/Button/StyledButton.d.ts +3 -6
- package/lib/components/Button/StyledButton.d.ts.map +1 -1
- package/lib/components/Button/StyledButton.js +39 -11
- package/lib/components/Button/index.d.ts.map +1 -1
- package/lib/components/Button/index.js +51 -12
- package/lib/components/Button/index.test.js +43 -8
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +4 -1
- package/lib/components/Button/types.d.ts +4 -1
- package/lib/components/Button/types.d.ts.map +1 -1
- package/lib/components/Combobox/Target.d.ts.map +1 -1
- package/lib/components/Combobox/Target.js +10 -0
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +111 -59
- package/lib/components/Combobox/index.test.js +110 -25
- package/lib/components/Combobox/schema.d.ts.map +1 -1
- package/lib/components/Combobox/schema.js +7 -1
- package/lib/components/Combobox/types.d.ts +7 -2
- package/lib/components/Combobox/types.d.ts.map +1 -1
- package/lib/components/Drawer/index.d.ts +22 -0
- package/lib/components/Drawer/index.d.ts.map +1 -0
- package/lib/components/Drawer/index.js +122 -0
- package/lib/components/Drawer/index.test.js +164 -0
- package/lib/components/Drawer/schema.d.ts +3 -0
- package/lib/components/Drawer/schema.d.ts.map +1 -0
- package/lib/components/Drawer/schema.js +32 -0
- package/lib/components/Drawer/styles.d.ts +11 -0
- package/lib/components/Drawer/styles.d.ts.map +1 -0
- package/lib/components/Drawer/styles.js +79 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +10 -3
- package/lib/components/DropdownList/index.test.js +38 -25
- package/lib/components/DropdownList/schema.js +1 -1
- package/lib/components/Filter/ActionFilter/index.d.ts +5 -0
- package/lib/components/Filter/ActionFilter/index.d.ts.map +1 -0
- package/lib/components/Filter/ActionFilter/index.js +43 -0
- package/lib/components/Filter/IconWrapper/index.d.ts +2 -2
- package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -1
- package/lib/components/Filter/SimplePrimary/index.d.ts +2 -28
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -1
- package/lib/components/Filter/SimplePrimary/index.js +9 -21
- package/lib/components/Filter/StyledFilter.d.ts +2 -2
- package/lib/components/Filter/StyledFilter.d.ts.map +1 -1
- package/lib/components/Filter/StyledFilter.js +28 -1
- package/lib/components/Filter/StyledLabel/index.d.ts +3 -3
- package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -1
- package/lib/components/Filter/StyledLabel/index.js +14 -6
- package/lib/components/Filter/index.d.ts +4 -25
- package/lib/components/Filter/index.d.ts.map +1 -1
- package/lib/components/Filter/index.js +41 -29
- package/lib/components/Filter/index.test.js +33 -4
- package/lib/components/Filter/kind.d.ts +4 -3
- package/lib/components/Filter/kind.d.ts.map +1 -1
- package/lib/components/Filter/kind.js +20 -22
- package/lib/components/Filter/schema.d.ts.map +1 -1
- package/lib/components/Filter/schema.js +8 -3
- package/lib/components/Filter/types.d.ts +21 -7
- package/lib/components/Filter/types.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.js +50 -9
- package/lib/components/JumpTo/index.test.js +84 -0
- package/lib/components/JumpTo/schema.d.ts.map +1 -1
- package/lib/components/JumpTo/schema.js +2 -1
- package/lib/components/JumpTo/types.d.ts +1 -0
- package/lib/components/JumpTo/types.d.ts.map +1 -1
- package/lib/components/JumpTo/utils.d.ts.map +1 -1
- package/lib/components/JumpTo/utils.js +3 -7
- package/lib/components/LeftNav/Item/NavExpandedItem/index.js +7 -2
- package/lib/components/LeftNav/index.test.js +35 -19
- package/lib/components/LeftNav/schema.d.ts.map +1 -1
- package/lib/components/LeftNav/schema.js +3 -1
- package/lib/components/LeftNav/types.d.ts +1 -0
- package/lib/components/LeftNav/types.d.ts.map +1 -1
- package/lib/components/Link/DisabledLink.d.ts +7 -0
- package/lib/components/Link/DisabledLink.d.ts.map +1 -0
- package/lib/components/Link/DisabledLink.js +46 -0
- package/lib/components/Link/Link.d.ts +4 -0
- package/lib/components/Link/Link.d.ts.map +1 -0
- package/lib/components/Link/Link.js +67 -0
- package/lib/components/Link/index.d.ts +4 -23
- package/lib/components/Link/index.d.ts.map +1 -1
- package/lib/components/Link/index.js +19 -157
- package/lib/components/Link/index.test.js +62 -49
- package/lib/components/Link/schema.d.ts.map +1 -1
- package/lib/components/Link/schema.js +1 -0
- package/lib/components/Link/styles.d.ts +20 -0
- package/lib/components/Link/styles.d.ts.map +1 -0
- package/lib/components/Link/styles.js +131 -0
- package/lib/components/Link/types.d.ts +28 -0
- package/lib/components/Link/types.d.ts.map +1 -0
- package/lib/components/List/BaseCell/index.d.ts +6 -0
- package/lib/components/List/BaseCell/index.d.ts.map +1 -0
- package/lib/components/List/BaseCell/index.js +17 -0
- package/lib/components/List/BaseCell/index.test.js +33 -0
- package/lib/components/List/BaseCell/styles.d.ts +198 -0
- package/lib/components/List/BaseCell/styles.d.ts.map +1 -0
- package/lib/components/List/BaseCell/styles.js +26 -0
- package/lib/components/List/ContentContainer/index.d.ts +21 -0
- package/lib/components/List/ContentContainer/index.d.ts.map +1 -0
- package/lib/components/List/ContentContainer/index.js +82 -0
- package/lib/components/List/ContentContainer/index.test.js +102 -0
- package/lib/components/List/DefaultCell/index.d.ts +6 -0
- package/lib/components/List/DefaultCell/index.d.ts.map +1 -0
- package/lib/components/List/DefaultCell/index.js +26 -0
- package/lib/components/List/EditableCell/index.d.ts +13 -0
- package/lib/components/List/EditableCell/index.d.ts.map +1 -0
- package/lib/components/List/EditableCell/index.js +47 -0
- package/lib/components/List/EditableCell/styles.d.ts +204 -0
- package/lib/components/List/EditableCell/styles.d.ts.map +1 -0
- package/lib/components/List/EditableCell/styles.js +47 -0
- package/lib/components/List/LabelContainer/index.d.ts +9 -0
- package/lib/components/List/LabelContainer/index.d.ts.map +1 -0
- package/lib/components/List/LabelContainer/index.js +38 -0
- package/lib/components/List/LabelContainer/index.test.js +105 -0
- package/lib/components/List/LabelContainer/styles.d.ts +4 -0
- package/lib/components/List/LabelContainer/styles.d.ts.map +1 -0
- package/lib/components/List/LabelContainer/styles.js +28 -0
- package/lib/components/List/ListItem/index.d.ts +8 -0
- package/lib/components/List/ListItem/index.d.ts.map +1 -0
- package/lib/components/List/ListItem/index.js +43 -0
- package/lib/components/List/ListItem/index.test.js +76 -0
- package/lib/components/List/ListItem/schema.d.ts +4 -0
- package/lib/components/List/ListItem/schema.d.ts.map +1 -0
- package/lib/components/List/ListItem/schema.js +30 -0
- package/lib/components/List/ListItem/styles.d.ts +2 -0
- package/lib/components/List/ListItem/styles.d.ts.map +1 -0
- package/lib/components/List/ListItem/styles.js +23 -0
- package/lib/components/List/constants.d.ts +19 -0
- package/lib/components/List/constants.d.ts.map +1 -0
- package/lib/components/List/constants.js +28 -0
- package/lib/components/List/index.d.ts +15 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +67 -0
- package/lib/components/List/index.test.js +64 -0
- package/lib/components/List/schema.d.ts +4 -0
- package/lib/components/List/schema.d.ts.map +1 -0
- package/lib/components/List/schema.js +26 -0
- package/lib/components/List/styles.d.ts +198 -0
- package/lib/components/List/styles.d.ts.map +1 -0
- package/lib/components/List/styles.js +34 -0
- package/lib/components/List/types.d.ts +15 -0
- package/lib/components/List/types.d.ts.map +1 -0
- package/lib/components/List/types.js +5 -0
- package/lib/components/Loading/Loading.d.ts +12 -0
- package/lib/components/Loading/Loading.d.ts.map +1 -0
- package/lib/components/Loading/Loading.js +70 -0
- package/lib/components/Loading/index.d.ts +4 -0
- package/lib/components/Loading/index.d.ts.map +1 -0
- package/lib/components/Loading/index.js +33 -0
- package/lib/components/Loading/index.test.js +55 -0
- package/lib/components/Loading/schema.d.ts +4 -0
- package/lib/components/Loading/schema.d.ts.map +1 -0
- package/lib/components/Loading/schema.js +31 -0
- package/lib/components/Loading/styles.d.ts +211 -0
- package/lib/components/Loading/styles.d.ts.map +1 -0
- package/lib/components/Loading/styles.js +77 -0
- package/lib/components/Loading/types.d.ts +10 -0
- package/lib/components/Loading/types.d.ts.map +1 -0
- package/lib/components/Loading/types.js +5 -0
- package/lib/components/Modal/Manager.d.ts +6 -0
- package/lib/components/Modal/Manager.d.ts.map +1 -0
- package/lib/components/Modal/Manager.js +53 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts +11 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -0
- package/lib/components/Modal/ResponsiveModalWrapper.js +82 -0
- package/lib/components/Modal/components.d.ts +199 -1
- package/lib/components/Modal/components.d.ts.map +1 -1
- package/lib/components/Modal/components.js +16 -24
- package/lib/components/Modal/index.d.ts +8 -4
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +63 -95
- package/lib/components/Modal/index.test.js +99 -0
- package/lib/components/Modal/schema.d.ts.map +1 -1
- package/lib/components/Modal/schema.js +2 -1
- package/lib/components/Modal/types.d.ts +2 -1
- package/lib/components/Modal/types.d.ts.map +1 -1
- package/lib/components/Modal/utils.d.ts +1 -1
- package/lib/components/Modal/utils.d.ts.map +1 -1
- package/lib/components/Modal/utils.js +7 -5
- package/lib/components/Pagination/Pages.d.ts +1 -7
- package/lib/components/Pagination/Pages.d.ts.map +1 -1
- package/lib/components/Pagination/Pages.js +17 -0
- package/lib/components/Pagination/Pagination.d.ts +13 -14
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +20 -5
- package/lib/components/Pagination/Pagination.test.js +14 -0
- package/lib/components/Pagination/paginate.d.ts +1 -1
- package/lib/components/Pagination/paginate.d.ts.map +1 -1
- package/lib/components/Pagination/paginate.js +4 -0
- package/lib/components/Pagination/paginate.test.js +38 -17
- package/lib/components/Pagination/schema.d.ts.map +1 -1
- package/lib/components/Pagination/schema.js +3 -1
- package/lib/components/Pagination/types.d.ts +24 -1
- package/lib/components/Pagination/types.d.ts.map +1 -1
- package/lib/components/PasswordField/IconWrapper.d.ts +198 -0
- package/lib/components/PasswordField/IconWrapper.d.ts.map +1 -0
- package/lib/components/PasswordField/IconWrapper.js +32 -0
- package/lib/components/PasswordField/Input.d.ts +6 -0
- package/lib/components/PasswordField/Input.d.ts.map +1 -0
- package/lib/components/PasswordField/Input.js +28 -0
- package/lib/components/PasswordField/ShowPasswordButton.d.ts +8 -0
- package/lib/components/PasswordField/ShowPasswordButton.d.ts.map +1 -0
- package/lib/components/PasswordField/ShowPasswordButton.js +48 -0
- package/lib/components/PasswordField/index.d.ts +14 -0
- package/lib/components/PasswordField/index.d.ts.map +1 -0
- package/lib/components/PasswordField/index.js +113 -0
- package/lib/components/PasswordField/index.test.js +217 -0
- package/lib/components/PasswordField/schema.d.ts +3 -0
- package/lib/components/PasswordField/schema.d.ts.map +1 -0
- package/lib/components/PasswordField/schema.js +27 -0
- package/lib/components/Popover/Arrow.d.ts +2 -2
- package/lib/components/Popover/index.d.ts.map +1 -1
- package/lib/components/Popover/index.js +25 -10
- package/lib/components/Popover/schema.d.ts.map +1 -1
- package/lib/components/Popover/schema.js +28 -20
- package/lib/components/Popover/types.d.ts +6 -2
- package/lib/components/Popover/types.d.ts.map +1 -1
- package/lib/components/SearchInput/index.d.ts +11 -0
- package/lib/components/SearchInput/index.d.ts.map +1 -0
- package/lib/components/SearchInput/index.js +179 -0
- package/lib/components/SearchInput/index.test.js +660 -0
- package/lib/components/SearchInput/schema.d.ts +3 -0
- package/lib/components/SearchInput/schema.d.ts.map +1 -0
- package/lib/components/SearchInput/schema.js +38 -0
- package/lib/components/SearchInput/styles.d.ts +1176 -0
- package/lib/components/SearchInput/styles.d.ts.map +1 -0
- package/lib/components/SearchInput/styles.js +97 -0
- package/lib/components/SearchInput/types.d.ts +39 -0
- package/lib/components/SearchInput/types.d.ts.map +1 -0
- package/lib/components/SearchInput/types.js +5 -0
- package/lib/components/Select/Target.d.ts.map +1 -1
- package/lib/components/Select/Target.js +5 -1
- package/lib/components/Select/index.d.ts.map +1 -1
- package/lib/components/Select/index.js +7 -3
- package/lib/components/Select/index.test.js +43 -19
- package/lib/components/Select/schema.d.ts.map +1 -1
- package/lib/components/Select/schema.js +2 -0
- package/lib/components/Select/types.d.ts +2 -0
- package/lib/components/Select/types.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.js +5 -1
- package/lib/components/SelectDate/index.d.ts.map +1 -1
- package/lib/components/SelectDate/index.js +7 -3
- package/lib/components/SelectDate/schema.d.ts.map +1 -1
- package/lib/components/SelectDate/schema.js +1 -0
- package/lib/components/SelectDate/types.d.ts +1 -0
- package/lib/components/SelectDate/types.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.js +6 -2
- package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
- package/lib/components/SelectDateRange/schema.js +1 -0
- package/lib/components/StepTracker/index.d.ts +11 -0
- package/lib/components/StepTracker/index.d.ts.map +1 -0
- package/lib/components/StepTracker/index.js +56 -0
- package/lib/components/StepTracker/index.test.js +89 -0
- package/lib/components/StepTracker/schema.d.ts +3 -0
- package/lib/components/StepTracker/schema.d.ts.map +1 -0
- package/lib/components/StepTracker/schema.js +19 -0
- package/lib/components/StepTracker/styles.d.ts +605 -0
- package/lib/components/StepTracker/styles.d.ts.map +1 -0
- package/lib/components/StepTracker/styles.js +114 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +2 -5
- package/lib/components/Table/Container.d.ts.map +1 -1
- package/lib/components/Table/Container.js +6 -1
- package/lib/components/Table/Grip.d.ts +6 -2
- package/lib/components/Table/Grip.d.ts.map +1 -1
- package/lib/components/Table/Grip.js +9 -3
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Tabs/Tab/index.d.ts +13 -0
- package/lib/components/Tabs/Tab/index.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/index.js +94 -0
- package/lib/components/Tabs/Tab/schema.d.ts +3 -0
- package/lib/components/Tabs/Tab/schema.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/styles.d.ts +7 -0
- package/lib/components/Tabs/Tab/styles.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/styles.js +37 -0
- package/lib/components/Tabs/context.d.ts +2 -2
- package/lib/components/Tabs/context.d.ts.map +1 -1
- package/lib/components/Tabs/context.js +1 -1
- package/lib/components/Tabs/index.d.ts +17 -6
- package/lib/components/Tabs/index.d.ts.map +1 -1
- package/lib/components/Tabs/index.js +104 -163
- package/lib/components/Tabs/index.test.js +54 -2
- package/lib/components/Tabs/styles.d.ts +4 -0
- package/lib/components/Tabs/styles.d.ts.map +1 -0
- package/lib/components/Tabs/styles.js +35 -0
- package/lib/components/Tag/Action.d.ts +4 -0
- package/lib/components/Tag/Action.d.ts.map +1 -0
- package/lib/components/Tag/Action.js +39 -0
- package/lib/components/Tag/constants.d.ts +2 -2
- package/lib/components/Tag/constants.d.ts.map +1 -1
- package/lib/components/Tag/constants.js +4 -4
- package/lib/components/Tag/index.d.ts +1 -3
- package/lib/components/Tag/index.d.ts.map +1 -1
- package/lib/components/Tag/index.js +40 -97
- package/lib/components/Tag/index.test.js +239 -2
- package/lib/components/Tag/propTypes.d.ts +4 -1
- package/lib/components/Tag/propTypes.d.ts.map +1 -1
- package/lib/components/Tag/propTypes.js +5 -2
- package/lib/components/Tag/schema.d.ts.map +1 -1
- package/lib/components/Tag/schema.js +3 -1
- package/lib/components/Tag/styles.d.ts +13 -0
- package/lib/components/Tag/styles.d.ts.map +1 -0
- package/lib/components/Tag/styles.js +133 -0
- package/lib/components/Tag/types.d.ts +11 -12
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/lib/components/TagInput/index.d.ts +5 -0
- package/lib/components/TagInput/index.d.ts.map +1 -0
- package/lib/components/TagInput/index.js +363 -0
- package/lib/components/TagInput/index.test.js +1143 -0
- package/lib/components/TagInput/schema.d.ts +3 -0
- package/lib/components/TagInput/schema.d.ts.map +1 -0
- package/lib/components/TagInput/schema.js +36 -0
- package/lib/components/TagInput/styles.d.ts +10 -0
- package/lib/components/TagInput/styles.d.ts.map +1 -0
- package/lib/components/TagInput/styles.js +52 -0
- package/lib/components/TagInput/types.d.ts +21 -0
- package/lib/components/TagInput/types.d.ts.map +1 -0
- package/lib/components/TagInput/types.js +5 -0
- package/lib/components/Toggle/Fieldset.d.ts.map +1 -1
- package/lib/components/Toggle/Fieldset.js +20 -11
- package/lib/components/Toggle/Option.d.ts.map +1 -1
- package/lib/components/Toggle/Option.js +1 -1
- package/lib/components/Toggle/Slider.d.ts +1 -3
- package/lib/components/Toggle/Slider.d.ts.map +1 -1
- package/lib/components/Toggle/Slider.js +29 -24
- package/lib/components/Toggle/index.d.ts.map +1 -1
- package/lib/components/Toggle/index.js +2 -1
- package/lib/components/Toggle/propTypes.js +1 -1
- package/lib/components/Toggle/schema.js +1 -1
- package/lib/components/Toggle/types.d.ts +3 -2
- package/lib/components/Toggle/types.d.ts.map +1 -1
- package/lib/components/ToggleView/ToggleView.d.ts +5 -0
- package/lib/components/ToggleView/ToggleView.d.ts.map +1 -0
- package/lib/components/ToggleView/ToggleView.js +80 -0
- package/lib/components/ToggleView/index.d.ts +4 -0
- package/lib/components/ToggleView/index.d.ts.map +1 -0
- package/lib/components/ToggleView/index.js +33 -0
- package/lib/components/ToggleView/index.test.js +61 -0
- package/lib/components/ToggleView/schema.d.ts +3 -0
- package/lib/components/ToggleView/schema.d.ts.map +1 -0
- package/lib/components/ToggleView/schema.js +24 -0
- package/lib/components/ToggleView/styles.d.ts +6 -0
- package/lib/components/ToggleView/styles.d.ts.map +1 -0
- package/lib/components/ToggleView/styles.js +23 -0
- package/lib/components/ToggleView/types.d.ts +23 -0
- package/lib/components/ToggleView/types.d.ts.map +1 -0
- package/lib/components/ToggleView/types.js +12 -0
- package/lib/components/Tooltip/index.d.ts.map +1 -1
- package/lib/components/Tooltip/index.js +3 -13
- package/lib/components/Tooltip/schema.d.ts +3 -0
- package/lib/components/Tooltip/schema.d.ts.map +1 -0
- package/lib/components/Tooltip/schema.js +29 -0
- package/lib/components/TopNav/Menu/index.d.ts +1 -1
- package/lib/components/TopNav/index.d.ts +1 -1
- package/lib/components/Typography/withColors.d.ts +1 -1
- package/lib/components/Typography/withColors.d.ts.map +1 -1
- package/lib/components/Typography/withColors.js +1 -1
- package/lib/components/Wizard/index.d.ts +33 -0
- package/lib/components/Wizard/index.d.ts.map +1 -0
- package/lib/components/Wizard/index.js +161 -0
- package/lib/components/Wizard/index.test.js +940 -0
- package/lib/components/Wizard/schema.d.ts +3 -0
- package/lib/components/Wizard/schema.d.ts.map +1 -0
- package/lib/components/Wizard/schema.js +42 -0
- package/lib/components/Wizard/styles.d.ts +990 -0
- package/lib/components/Wizard/styles.d.ts.map +1 -0
- package/lib/components/Wizard/styles.js +79 -0
- package/lib/components/index.d.ts +11 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +196 -1
- package/lib/modifiers/palette.d.ts +36 -0
- package/lib/modifiers/palette.d.ts.map +1 -0
- package/lib/modifiers/palette.js +88 -0
- package/lib/modifiers/spacingSchema.d.ts.map +1 -1
- package/lib/modifiers/spacingSchema.js +29 -16
- package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts +2 -1
- package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts +45 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +46 -2
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +5 -0
- package/lib/utils/commonUIColors.d.ts +351 -3
- package/lib/utils/commonUIColors.d.ts.map +1 -1
- package/lib/utils/commonUIColors.js +6 -2
- package/lib/utils/useDebounce.d.ts +2 -0
- package/lib/utils/useDebounce.d.ts.map +1 -0
- package/lib/utils/useDebounce.js +37 -0
- package/lib/utils/useStackingContext.d.ts +12 -0
- package/lib/utils/useStackingContext.d.ts.map +1 -0
- package/lib/utils/useStackingContext.js +46 -0
- package/package.json +26 -13
- package/CHANGELOG.md +0 -796
- package/lib/atoms/OptionsList/Category.d.ts +0 -4
- package/lib/atoms/OptionsList/Category.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Category.js +0 -53
- package/lib/atoms/OptionsList/Option.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Option.js +0 -197
- package/lib/components/Tabs/Tab.d.ts +0 -5
- package/lib/components/Tabs/Tab.d.ts.map +0 -1
- package/lib/components/Tabs/Tab.js +0 -109
- package/lib/components/Tabs/schema.tab.d.ts.map +0 -1
- package/lib/components/Tabs/types.d.ts +0 -27
- package/lib/components/Tabs/types.d.ts.map +0 -1
- package/lib/components/Tag/ActionButton.d.ts +0 -5
- package/lib/components/Tag/ActionButton.d.ts.map +0 -1
- package/lib/components/Tag/ActionButton.js +0 -56
- /package/lib/components/{Tabs → Link}/types.js +0 -0
- /package/lib/components/Tabs/{schema.tab.js → Tab/schema.js} +0 -0
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("jest-styled-components");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _ConfigProvider = require("../../providers/ConfigProvider");
|
|
10
|
+
|
|
11
|
+
var _ = _interopRequireDefault(require("."));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
16
|
+
|
|
17
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
18
|
+
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }
|
|
20
|
+
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
22
|
+
|
|
23
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
+
|
|
25
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
|
+
|
|
27
|
+
// Prevent warnings about missing document methods (createRange, etc.)
|
|
28
|
+
jest.mock('popper.js', function () {
|
|
29
|
+
var _class, _temp;
|
|
30
|
+
|
|
31
|
+
var PopperJS = jest.requireActual('popper.js');
|
|
32
|
+
return _temp = _class = function _class() {
|
|
33
|
+
_classCallCheck(this, _class);
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
destroy: function destroy() {},
|
|
37
|
+
scheduleUpdate: function scheduleUpdate() {}
|
|
38
|
+
};
|
|
39
|
+
}, _defineProperty(_class, "placements", PopperJS.placements), _temp;
|
|
40
|
+
});
|
|
41
|
+
beforeAll(function () {
|
|
42
|
+
var root = document.createElement('div');
|
|
43
|
+
root.setAttribute('id', 'popovers-root');
|
|
44
|
+
document.body.appendChild(root);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
var wrapper = function wrapper(_ref) {
|
|
48
|
+
var children = _ref.children;
|
|
49
|
+
return _react.default.createElement(_ConfigProvider.ConfigProvider, null, children);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var render = function render(ui, options) {
|
|
53
|
+
return (0, _react2.render)(ui, _objectSpread({}, options, {
|
|
54
|
+
wrapper: wrapper
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var onChangeMock = jest.fn();
|
|
59
|
+
var onSearchMock = jest.fn();
|
|
60
|
+
describe('Search input', function () {
|
|
61
|
+
afterEach(jest.clearAllMocks);
|
|
62
|
+
it('renders the search input with the TIMES icon HIDDEN when its blank', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
63
|
+
var container, searchContainer;
|
|
64
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
65
|
+
while (1) {
|
|
66
|
+
switch (_context.prev = _context.next) {
|
|
67
|
+
case 0:
|
|
68
|
+
container = render(_react.default.createElement(_.default, {
|
|
69
|
+
value: "",
|
|
70
|
+
onChange: onChangeMock
|
|
71
|
+
}));
|
|
72
|
+
_context.next = 3;
|
|
73
|
+
return container.findByTestId('search-container');
|
|
74
|
+
|
|
75
|
+
case 3:
|
|
76
|
+
searchContainer = _context.sent;
|
|
77
|
+
expect((0, _react2.within)(searchContainer).getByLabelText('Clear search')).not.toBeVisible();
|
|
78
|
+
|
|
79
|
+
case 5:
|
|
80
|
+
case "end":
|
|
81
|
+
return _context.stop();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
})));
|
|
86
|
+
it('renders the search input with the TIMES icon VISIBLE when its blank', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
87
|
+
var container, searchContainer;
|
|
88
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
89
|
+
while (1) {
|
|
90
|
+
switch (_context2.prev = _context2.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
container = render(_react.default.createElement(_.default, {
|
|
93
|
+
value: "Some value",
|
|
94
|
+
onChange: onChangeMock
|
|
95
|
+
}));
|
|
96
|
+
_context2.next = 3;
|
|
97
|
+
return container.findByTestId('search-container');
|
|
98
|
+
|
|
99
|
+
case 3:
|
|
100
|
+
searchContainer = _context2.sent;
|
|
101
|
+
expect((0, _react2.within)(searchContainer).getByLabelText('Clear search')).toBeVisible();
|
|
102
|
+
|
|
103
|
+
case 5:
|
|
104
|
+
case "end":
|
|
105
|
+
return _context2.stop();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, _callee2);
|
|
109
|
+
})));
|
|
110
|
+
it('renders SEARCH icon for MEDIUM sized search input', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
111
|
+
var container;
|
|
112
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
113
|
+
while (1) {
|
|
114
|
+
switch (_context3.prev = _context3.next) {
|
|
115
|
+
case 0:
|
|
116
|
+
container = render(_react.default.createElement(_.default, {
|
|
117
|
+
value: "",
|
|
118
|
+
onChange: onChangeMock,
|
|
119
|
+
size: "medium"
|
|
120
|
+
}));
|
|
121
|
+
_context3.t0 = expect;
|
|
122
|
+
_context3.next = 4;
|
|
123
|
+
return container.findByTestId('search-icon');
|
|
124
|
+
|
|
125
|
+
case 4:
|
|
126
|
+
_context3.t1 = _context3.sent;
|
|
127
|
+
(0, _context3.t0)(_context3.t1).toBeInTheDocument();
|
|
128
|
+
|
|
129
|
+
case 6:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context3.stop();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, _callee3);
|
|
135
|
+
})));
|
|
136
|
+
it('renders search button with the text SEARCH for MEDIUM sized search input', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
137
|
+
var container;
|
|
138
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
139
|
+
while (1) {
|
|
140
|
+
switch (_context4.prev = _context4.next) {
|
|
141
|
+
case 0:
|
|
142
|
+
container = render(_react.default.createElement(_.default, {
|
|
143
|
+
value: "",
|
|
144
|
+
onChange: onChangeMock,
|
|
145
|
+
size: "medium"
|
|
146
|
+
}));
|
|
147
|
+
_context4.t0 = expect;
|
|
148
|
+
_context4.next = 4;
|
|
149
|
+
return container.findByRole('button');
|
|
150
|
+
|
|
151
|
+
case 4:
|
|
152
|
+
_context4.t1 = _context4.sent;
|
|
153
|
+
(0, _context4.t0)(_context4.t1).toHaveTextContent('Search');
|
|
154
|
+
|
|
155
|
+
case 6:
|
|
156
|
+
case "end":
|
|
157
|
+
return _context4.stop();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, _callee4);
|
|
161
|
+
})));
|
|
162
|
+
it('does not render the SEARCH icon for SMALL sized search input', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
163
|
+
var container;
|
|
164
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
165
|
+
while (1) {
|
|
166
|
+
switch (_context5.prev = _context5.next) {
|
|
167
|
+
case 0:
|
|
168
|
+
container = render(_react.default.createElement(_.default, {
|
|
169
|
+
value: "",
|
|
170
|
+
onChange: onChangeMock,
|
|
171
|
+
size: "small"
|
|
172
|
+
}));
|
|
173
|
+
expect(container.queryByTestId('search-icon')).not.toBeInTheDocument();
|
|
174
|
+
|
|
175
|
+
case 2:
|
|
176
|
+
case "end":
|
|
177
|
+
return _context5.stop();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}, _callee5);
|
|
181
|
+
})));
|
|
182
|
+
it('renders search button with the icon SEARCH for SMALL sized search input', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
183
|
+
var container, button;
|
|
184
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
185
|
+
while (1) {
|
|
186
|
+
switch (_context6.prev = _context6.next) {
|
|
187
|
+
case 0:
|
|
188
|
+
container = render(_react.default.createElement(_.default, {
|
|
189
|
+
value: "",
|
|
190
|
+
onChange: onChangeMock,
|
|
191
|
+
size: "small"
|
|
192
|
+
}));
|
|
193
|
+
button = container.getByRole('button');
|
|
194
|
+
expect(button.querySelector('svg')).toBeInTheDocument();
|
|
195
|
+
|
|
196
|
+
case 3:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context6.stop();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, _callee6);
|
|
202
|
+
})));
|
|
203
|
+
it('renders the search input with the TIMES icon HIDDEN when its disabled', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
204
|
+
var container, searchContainer;
|
|
205
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
206
|
+
while (1) {
|
|
207
|
+
switch (_context7.prev = _context7.next) {
|
|
208
|
+
case 0:
|
|
209
|
+
container = render(_react.default.createElement(_.default, {
|
|
210
|
+
value: "some value",
|
|
211
|
+
onChange: onChangeMock,
|
|
212
|
+
disabled: true
|
|
213
|
+
}));
|
|
214
|
+
_context7.next = 3;
|
|
215
|
+
return container.findByTestId('search-container');
|
|
216
|
+
|
|
217
|
+
case 3:
|
|
218
|
+
searchContainer = _context7.sent;
|
|
219
|
+
expect((0, _react2.within)(searchContainer).queryByLabelText('Clear search')).not.toBeInTheDocument();
|
|
220
|
+
|
|
221
|
+
case 5:
|
|
222
|
+
case "end":
|
|
223
|
+
return _context7.stop();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}, _callee7);
|
|
227
|
+
})));
|
|
228
|
+
it('calls onChange when a change is triggered', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
229
|
+
var container, searchInput;
|
|
230
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
231
|
+
while (1) {
|
|
232
|
+
switch (_context8.prev = _context8.next) {
|
|
233
|
+
case 0:
|
|
234
|
+
container = render(_react.default.createElement(_.default, {
|
|
235
|
+
value: "",
|
|
236
|
+
onChange: onChangeMock,
|
|
237
|
+
disabled: true
|
|
238
|
+
}));
|
|
239
|
+
_context8.next = 3;
|
|
240
|
+
return container.findByTestId('search-container');
|
|
241
|
+
|
|
242
|
+
case 3:
|
|
243
|
+
_context8.next = 5;
|
|
244
|
+
return _context8.sent.querySelector('input');
|
|
245
|
+
|
|
246
|
+
case 5:
|
|
247
|
+
searchInput = _context8.sent;
|
|
248
|
+
_context8.next = 8;
|
|
249
|
+
return _react2.fireEvent.change(searchInput, {
|
|
250
|
+
target: {
|
|
251
|
+
value: 'some value'
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
case 8:
|
|
256
|
+
expect(onChangeMock).toHaveBeenCalled();
|
|
257
|
+
|
|
258
|
+
case 9:
|
|
259
|
+
case "end":
|
|
260
|
+
return _context8.stop();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}, _callee8);
|
|
264
|
+
})));
|
|
265
|
+
it('calls onChange with a blank value when clear button is clicked', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
266
|
+
var container, searchContainer;
|
|
267
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
268
|
+
while (1) {
|
|
269
|
+
switch (_context9.prev = _context9.next) {
|
|
270
|
+
case 0:
|
|
271
|
+
container = render(_react.default.createElement(_.default, {
|
|
272
|
+
value: "Some value",
|
|
273
|
+
onChange: onChangeMock
|
|
274
|
+
}));
|
|
275
|
+
_context9.next = 3;
|
|
276
|
+
return container.findByTestId('search-container');
|
|
277
|
+
|
|
278
|
+
case 3:
|
|
279
|
+
searchContainer = _context9.sent;
|
|
280
|
+
_context9.next = 6;
|
|
281
|
+
return _react2.fireEvent.click((0, _react2.within)(searchContainer).getByLabelText('Clear search'));
|
|
282
|
+
|
|
283
|
+
case 6:
|
|
284
|
+
expect(onChangeMock).toHaveBeenCalledWith({
|
|
285
|
+
target: {
|
|
286
|
+
value: ''
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
case 7:
|
|
291
|
+
case "end":
|
|
292
|
+
return _context9.stop();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}, _callee9);
|
|
296
|
+
})));
|
|
297
|
+
it('calls onSearch when search button is clicked', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
298
|
+
var container;
|
|
299
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
300
|
+
while (1) {
|
|
301
|
+
switch (_context10.prev = _context10.next) {
|
|
302
|
+
case 0:
|
|
303
|
+
container = render(_react.default.createElement(_.default, {
|
|
304
|
+
value: "Searched value",
|
|
305
|
+
onChange: onChangeMock,
|
|
306
|
+
onSearch: onSearchMock,
|
|
307
|
+
size: "medium"
|
|
308
|
+
}));
|
|
309
|
+
_context10.t0 = _react2.fireEvent;
|
|
310
|
+
_context10.next = 4;
|
|
311
|
+
return container.findByRole('button');
|
|
312
|
+
|
|
313
|
+
case 4:
|
|
314
|
+
_context10.t1 = _context10.sent;
|
|
315
|
+
|
|
316
|
+
_context10.t0.click.call(_context10.t0, _context10.t1);
|
|
317
|
+
|
|
318
|
+
expect(onSearchMock).toHaveBeenCalledWith('Searched value');
|
|
319
|
+
|
|
320
|
+
case 7:
|
|
321
|
+
case "end":
|
|
322
|
+
return _context10.stop();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}, _callee10);
|
|
326
|
+
})));
|
|
327
|
+
it('calls onSearch when enter is pressed', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
328
|
+
var container, searchInput;
|
|
329
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
330
|
+
while (1) {
|
|
331
|
+
switch (_context11.prev = _context11.next) {
|
|
332
|
+
case 0:
|
|
333
|
+
container = render(_react.default.createElement(_.default, {
|
|
334
|
+
value: "Searched value",
|
|
335
|
+
onChange: onChangeMock,
|
|
336
|
+
onSearch: onSearchMock,
|
|
337
|
+
size: "medium"
|
|
338
|
+
}));
|
|
339
|
+
_context11.next = 3;
|
|
340
|
+
return container.findByTestId('search-container');
|
|
341
|
+
|
|
342
|
+
case 3:
|
|
343
|
+
_context11.next = 5;
|
|
344
|
+
return _context11.sent.querySelector('input');
|
|
345
|
+
|
|
346
|
+
case 5:
|
|
347
|
+
searchInput = _context11.sent;
|
|
348
|
+
|
|
349
|
+
_react2.fireEvent.keyPress(searchInput, {
|
|
350
|
+
code: 'Enter',
|
|
351
|
+
key: 'Enter',
|
|
352
|
+
charCode: 13
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
expect(onSearchMock).toHaveBeenCalledWith('Searched value');
|
|
356
|
+
|
|
357
|
+
case 8:
|
|
358
|
+
case "end":
|
|
359
|
+
return _context11.stop();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}, _callee11);
|
|
363
|
+
})));
|
|
364
|
+
it('renders only the search button as disabled when searchDisabled', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
365
|
+
var container, input, button;
|
|
366
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
367
|
+
while (1) {
|
|
368
|
+
switch (_context12.prev = _context12.next) {
|
|
369
|
+
case 0:
|
|
370
|
+
container = render(_react.default.createElement(_.default, {
|
|
371
|
+
value: "some value",
|
|
372
|
+
searchDisabled: true
|
|
373
|
+
}));
|
|
374
|
+
input = container.getByRole('textbox');
|
|
375
|
+
button = container.getByRole('button');
|
|
376
|
+
expect(button).toBeDisabled();
|
|
377
|
+
expect(input).toBeEnabled();
|
|
378
|
+
|
|
379
|
+
case 5:
|
|
380
|
+
case "end":
|
|
381
|
+
return _context12.stop();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}, _callee12);
|
|
385
|
+
})));
|
|
386
|
+
it('does not calls search callback when searchDisabled', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
387
|
+
var container, searchInput;
|
|
388
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
389
|
+
while (1) {
|
|
390
|
+
switch (_context13.prev = _context13.next) {
|
|
391
|
+
case 0:
|
|
392
|
+
container = render(_react.default.createElement(_.default, {
|
|
393
|
+
searchDisabled: true,
|
|
394
|
+
value: "Searched value",
|
|
395
|
+
onChange: onChangeMock,
|
|
396
|
+
onSearch: onSearchMock,
|
|
397
|
+
size: "medium"
|
|
398
|
+
}));
|
|
399
|
+
_context13.next = 3;
|
|
400
|
+
return container.findByTestId('search-container');
|
|
401
|
+
|
|
402
|
+
case 3:
|
|
403
|
+
_context13.next = 5;
|
|
404
|
+
return _context13.sent.querySelector('input');
|
|
405
|
+
|
|
406
|
+
case 5:
|
|
407
|
+
searchInput = _context13.sent;
|
|
408
|
+
|
|
409
|
+
_react2.fireEvent.keyPress(searchInput, {
|
|
410
|
+
code: 'Enter',
|
|
411
|
+
key: 'Enter',
|
|
412
|
+
charCode: 13
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
expect(onSearchMock).not.toHaveBeenCalled();
|
|
416
|
+
|
|
417
|
+
case 8:
|
|
418
|
+
case "end":
|
|
419
|
+
return _context13.stop();
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}, _callee13);
|
|
423
|
+
})));
|
|
424
|
+
describe('when using the searchOn `change`', function () {
|
|
425
|
+
var searchOn = 'change';
|
|
426
|
+
it('renders the search icon when size is "small"', function () {
|
|
427
|
+
var container = render(_react.default.createElement(_.default, {
|
|
428
|
+
searchOn: "change",
|
|
429
|
+
value: "",
|
|
430
|
+
onChange: onChangeMock,
|
|
431
|
+
size: "small"
|
|
432
|
+
}));
|
|
433
|
+
expect(container.getByTestId('search-icon')).toBeInTheDocument();
|
|
434
|
+
});
|
|
435
|
+
it('renders the search icon when size is "medium"', function () {
|
|
436
|
+
var container = render(_react.default.createElement(_.default, {
|
|
437
|
+
searchOn: "change",
|
|
438
|
+
value: "",
|
|
439
|
+
onChange: onChangeMock,
|
|
440
|
+
size: "medium"
|
|
441
|
+
}));
|
|
442
|
+
expect(container.getByTestId('search-icon')).toBeInTheDocument();
|
|
443
|
+
});
|
|
444
|
+
it('does not render the submit search button', function () {
|
|
445
|
+
var _render = render(_react.default.createElement(_.default, {
|
|
446
|
+
value: "search value",
|
|
447
|
+
searchOn: searchOn,
|
|
448
|
+
onChange: onChangeMock,
|
|
449
|
+
onSearch: onSearchMock
|
|
450
|
+
})),
|
|
451
|
+
queryByRole = _render.queryByRole;
|
|
452
|
+
|
|
453
|
+
expect(queryByRole('button')).not.toBeInTheDocument();
|
|
454
|
+
});
|
|
455
|
+
it('triggers the onSearch function when changing the value of the component', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
456
|
+
var container, searchInput;
|
|
457
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
458
|
+
while (1) {
|
|
459
|
+
switch (_context14.prev = _context14.next) {
|
|
460
|
+
case 0:
|
|
461
|
+
container = render(_react.default.createElement(_.default, {
|
|
462
|
+
searchOn: searchOn,
|
|
463
|
+
value: "Searched value",
|
|
464
|
+
onChange: onChangeMock,
|
|
465
|
+
onSearch: onSearchMock
|
|
466
|
+
}));
|
|
467
|
+
_context14.next = 3;
|
|
468
|
+
return container.findByTestId('search-container');
|
|
469
|
+
|
|
470
|
+
case 3:
|
|
471
|
+
_context14.next = 5;
|
|
472
|
+
return _context14.sent.querySelector('input');
|
|
473
|
+
|
|
474
|
+
case 5:
|
|
475
|
+
searchInput = _context14.sent;
|
|
476
|
+
|
|
477
|
+
_react2.fireEvent.change(searchInput, {
|
|
478
|
+
target: {
|
|
479
|
+
value: 'some value'
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
expect(onChangeMock).toHaveBeenCalled();
|
|
484
|
+
|
|
485
|
+
case 8:
|
|
486
|
+
case "end":
|
|
487
|
+
return _context14.stop();
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}, _callee14);
|
|
491
|
+
})));
|
|
492
|
+
});
|
|
493
|
+
describe('searchBy selector', function () {
|
|
494
|
+
var searchByOptions = [{
|
|
495
|
+
id: 'Value 1',
|
|
496
|
+
label: 'Value 1'
|
|
497
|
+
}, {
|
|
498
|
+
id: 'Value 2',
|
|
499
|
+
label: 'Value 2'
|
|
500
|
+
}, {
|
|
501
|
+
id: 'Value 3',
|
|
502
|
+
label: 'Value 3'
|
|
503
|
+
}];
|
|
504
|
+
it('renders list of options', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
505
|
+
var _render2, getByLabelText, getByText;
|
|
506
|
+
|
|
507
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
508
|
+
while (1) {
|
|
509
|
+
switch (_context15.prev = _context15.next) {
|
|
510
|
+
case 0:
|
|
511
|
+
_render2 = render(_react.default.createElement(_.default, {
|
|
512
|
+
searchByOptions: searchByOptions,
|
|
513
|
+
searchByLabel: "Search By",
|
|
514
|
+
searchByName: "search-by",
|
|
515
|
+
value: "Searched value",
|
|
516
|
+
onChange: onChangeMock,
|
|
517
|
+
onSearch: onSearchMock
|
|
518
|
+
})), getByLabelText = _render2.getByLabelText, getByText = _render2.getByText;
|
|
519
|
+
expect(getByLabelText('Search By')).toBeInTheDocument();
|
|
520
|
+
|
|
521
|
+
_react2.fireEvent.click(getByLabelText('Search By'));
|
|
522
|
+
|
|
523
|
+
searchByOptions.forEach(function (_ref17) {
|
|
524
|
+
var label = _ref17.label;
|
|
525
|
+
expect(getByText(label)).toBeInTheDocument();
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
case 4:
|
|
529
|
+
case "end":
|
|
530
|
+
return _context15.stop();
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}, _callee15);
|
|
534
|
+
})));
|
|
535
|
+
it('calls searchBy callback', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
536
|
+
var mockedFn, _render3, getByLabelText, getByText;
|
|
537
|
+
|
|
538
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
539
|
+
while (1) {
|
|
540
|
+
switch (_context16.prev = _context16.next) {
|
|
541
|
+
case 0:
|
|
542
|
+
mockedFn = jest.fn();
|
|
543
|
+
_render3 = render(_react.default.createElement(_.default, {
|
|
544
|
+
searchByOptions: searchByOptions,
|
|
545
|
+
searchByLabel: "Search By",
|
|
546
|
+
searchByName: "search-by",
|
|
547
|
+
onSearchByChange: mockedFn,
|
|
548
|
+
value: "Searched value",
|
|
549
|
+
onChange: onChangeMock,
|
|
550
|
+
onSearch: onSearchMock
|
|
551
|
+
})), getByLabelText = _render3.getByLabelText, getByText = _render3.getByText;
|
|
552
|
+
expect(getByLabelText('Search By')).toBeInTheDocument();
|
|
553
|
+
|
|
554
|
+
_react2.fireEvent.click(getByLabelText('Search By'));
|
|
555
|
+
|
|
556
|
+
searchByOptions.forEach(function (_ref19) {
|
|
557
|
+
var label = _ref19.label;
|
|
558
|
+
expect(getByText(label)).toBeInTheDocument();
|
|
559
|
+
});
|
|
560
|
+
|
|
561
|
+
_react2.fireEvent.click(getByText(searchByOptions[0].label));
|
|
562
|
+
|
|
563
|
+
expect(mockedFn).toHaveBeenCalledWith(searchByOptions[0].label);
|
|
564
|
+
|
|
565
|
+
case 7:
|
|
566
|
+
case "end":
|
|
567
|
+
return _context16.stop();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}, _callee16);
|
|
571
|
+
})));
|
|
572
|
+
describe('small', function () {
|
|
573
|
+
it('does not renders label', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
574
|
+
var _render4, queryByText;
|
|
575
|
+
|
|
576
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
577
|
+
while (1) {
|
|
578
|
+
switch (_context17.prev = _context17.next) {
|
|
579
|
+
case 0:
|
|
580
|
+
_render4 = render(_react.default.createElement(_.default, {
|
|
581
|
+
searchByOptions: searchByOptions,
|
|
582
|
+
searchByLabel: "Search By",
|
|
583
|
+
searchByName: "search-by",
|
|
584
|
+
value: "Searched value",
|
|
585
|
+
onChange: onChangeMock,
|
|
586
|
+
onSearch: onSearchMock,
|
|
587
|
+
size: "small"
|
|
588
|
+
})), queryByText = _render4.queryByText;
|
|
589
|
+
expect(queryByText('Search By')).not.toBeVisible();
|
|
590
|
+
|
|
591
|
+
case 2:
|
|
592
|
+
case "end":
|
|
593
|
+
return _context17.stop();
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}, _callee17);
|
|
597
|
+
})));
|
|
598
|
+
});
|
|
599
|
+
describe('warning message', function () {
|
|
600
|
+
it('renders warning message', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
601
|
+
var _render5, getByLabelText, getByText;
|
|
602
|
+
|
|
603
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
604
|
+
while (1) {
|
|
605
|
+
switch (_context18.prev = _context18.next) {
|
|
606
|
+
case 0:
|
|
607
|
+
_render5 = render(_react.default.createElement(_.default, {
|
|
608
|
+
searchByOptions: searchByOptions,
|
|
609
|
+
searchByLabel: "Search By",
|
|
610
|
+
searchByName: "search-by",
|
|
611
|
+
value: "Searched value",
|
|
612
|
+
onChange: onChangeMock,
|
|
613
|
+
onSearch: onSearchMock,
|
|
614
|
+
warningMessage: "warning message"
|
|
615
|
+
})), getByLabelText = _render5.getByLabelText, getByText = _render5.getByText;
|
|
616
|
+
expect(getByLabelText('Search By')).toBeInTheDocument();
|
|
617
|
+
expect(getByText('warning message')).toBeInTheDocument();
|
|
618
|
+
|
|
619
|
+
case 3:
|
|
620
|
+
case "end":
|
|
621
|
+
return _context18.stop();
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}, _callee18);
|
|
625
|
+
})));
|
|
626
|
+
});
|
|
627
|
+
describe('help message', function () {
|
|
628
|
+
it('renders warning message', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
|
|
629
|
+
var _render6, getByLabelText, getByText;
|
|
630
|
+
|
|
631
|
+
return regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
632
|
+
while (1) {
|
|
633
|
+
switch (_context19.prev = _context19.next) {
|
|
634
|
+
case 0:
|
|
635
|
+
_render6 = render(_react.default.createElement(_.default, {
|
|
636
|
+
searchByOptions: searchByOptions,
|
|
637
|
+
searchByLabel: "Search By",
|
|
638
|
+
searchByName: "search-by",
|
|
639
|
+
value: "Searched value",
|
|
640
|
+
onChange: onChangeMock,
|
|
641
|
+
onSearch: onSearchMock,
|
|
642
|
+
warningMessage: "warning message",
|
|
643
|
+
helpMessage: "help message",
|
|
644
|
+
searchByDefaultValue: "Value 1",
|
|
645
|
+
searchByWidth: "100px"
|
|
646
|
+
})), getByLabelText = _render6.getByLabelText, getByText = _render6.getByText;
|
|
647
|
+
expect(getByLabelText('Search By')).toBeInTheDocument();
|
|
648
|
+
expect(getByText('warning message')).toBeInTheDocument();
|
|
649
|
+
expect(getByText('help message')).toBeInTheDocument();
|
|
650
|
+
|
|
651
|
+
case 4:
|
|
652
|
+
case "end":
|
|
653
|
+
return _context19.stop();
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}, _callee19);
|
|
657
|
+
})));
|
|
658
|
+
});
|
|
659
|
+
});
|
|
660
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/SearchInput/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAA2C,CAAC;AAgFxD,eAAe,MAAM,CAAC"}
|