@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
|
@@ -3,48 +3,45 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.linkColorStyles = linkColorStyles;
|
|
7
6
|
Object.defineProperty(exports, "makeLinkSchemaPropTypes", {
|
|
8
7
|
enumerable: true,
|
|
9
8
|
get: function get() {
|
|
10
9
|
return _schema.makeLinkSchemaPropTypes;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "LinkProps", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _types.LinkProps;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "linkColorStyles", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _styles.linkColorStyles;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
13
24
|
exports.default = void 0;
|
|
14
25
|
|
|
15
26
|
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
16
27
|
|
|
17
|
-
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
18
|
-
|
|
19
|
-
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
20
|
-
|
|
21
28
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
29
|
|
|
23
|
-
var _react =
|
|
24
|
-
|
|
25
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
26
|
-
|
|
27
|
-
var _styledTheming = _interopRequireDefault(require("styled-theming"));
|
|
28
|
-
|
|
29
|
-
var _designTokens = _interopRequireDefault(require("@decisiv/design-tokens"));
|
|
30
|
+
var _react = require("react");
|
|
30
31
|
|
|
31
32
|
var _propTypes2 = require("@decisiv/prop-types");
|
|
32
33
|
|
|
33
|
-
var _ConfigProvider = require("../../providers/ConfigProvider");
|
|
34
|
-
|
|
35
|
-
var _focusRingWithColor = _interopRequireDefault(require("../../utils/focusRingWithColor"));
|
|
36
|
-
|
|
37
34
|
var _schema = _interopRequireWildcard(require("./schema"));
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
var _Link = _interopRequireDefault(require("./Link"));
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
var _types = require("./types");
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
var _styles = require("./styles");
|
|
44
41
|
|
|
45
|
-
function
|
|
42
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
46
43
|
|
|
47
|
-
function
|
|
44
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
48
45
|
|
|
49
46
|
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; }
|
|
50
47
|
|
|
@@ -52,142 +49,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
52
49
|
|
|
53
50
|
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; }
|
|
54
51
|
|
|
55
|
-
var
|
|
56
|
-
base = _designTokens$color.base,
|
|
57
|
-
interaction = _designTokens$color.interaction,
|
|
58
|
-
opacity = _designTokens$color.opacity,
|
|
59
|
-
fontSizes = _designTokens.default.typography.size.alias;
|
|
60
|
-
/*
|
|
61
|
-
Notes about changing SVG fill color inside visited links:
|
|
62
|
-
|
|
63
|
-
1: Changing the color of an node that contains SVG with nodes set to have
|
|
64
|
-
fill="currentColor" does not work on Safari for :visited links (it does
|
|
65
|
-
work on Chrome and Firefox). To work around that, we instead change the
|
|
66
|
-
fill color of those SVG nodes to the be the same color as the visited link.
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
function linkColorStyles(normalColor, visitedColor, hoverColor, focusColors) {
|
|
70
|
-
var focusStyles = focusColors ? (0, _styledComponents.css)(["&:focus{border-color:", ";", "}"], (0, _toColorString.default)(focusColors.border), (0, _focusRingWithColor.default)((0, _toColorString.default)(focusColors.shadow))) : (0, _styledComponents.css)(["&:focus{border-color:transparent;box-shadow:none;}"]);
|
|
71
|
-
var normalColorString = (0, _toColorString.default)(normalColor);
|
|
72
|
-
var visitedColorString = (0, _toColorString.default)(visitedColor);
|
|
73
|
-
var hoverColorString = (0, _toColorString.default)(hoverColor);
|
|
74
|
-
return (0, _styledComponents.css)(["&:link{color:", ";}", " &:visited,&:visited svg [fill='currentColor']{color:", ";fill:", ";}&:hover,&:hover svg [fill='currentColor']{color:", ";fill:", ";}"], normalColorString, focusStyles, visitedColorString, visitedColorString, hoverColorString, hoverColorString);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
var modeStateColors = {
|
|
78
|
-
light: {
|
|
79
|
-
normal: interaction.pacificOcean,
|
|
80
|
-
visited: interaction.redWine,
|
|
81
|
-
hover: interaction.indianOcean,
|
|
82
|
-
focus: {
|
|
83
|
-
border: interaction.pacificOcean,
|
|
84
|
-
shadow: interaction.pacificOcean40
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
dark: {
|
|
88
|
-
normal: interaction.arcticOcean,
|
|
89
|
-
visited: interaction.roseWine,
|
|
90
|
-
hover: interaction.atlanticOcean,
|
|
91
|
-
focus: {
|
|
92
|
-
border: interaction.arcticOcean,
|
|
93
|
-
shadow: interaction.arcticOcean40
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
var modeColorStyles = function modeColorStyles(mode) {
|
|
99
|
-
var modeColors = modeStateColors[mode];
|
|
100
|
-
return linkColorStyles(modeColors.normal, modeColors.visited, modeColors.hover, modeColors.focus);
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
var invertedColorStyles = function invertedColorStyles() {
|
|
104
|
-
return linkColorStyles(base.snowWhite, _objectSpread({}, base.charcoal, {
|
|
105
|
-
alpha: 0.6
|
|
106
|
-
}), _objectSpread({}, base.snowWhite, {
|
|
107
|
-
alpha: 0.7
|
|
108
|
-
}), {
|
|
109
|
-
border: base.blackSheep,
|
|
110
|
-
shadow: opacity.charcoal40
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
var color = _styledTheming.default.variants(_ConfigProvider.themeKeys.mode, 'variant', {
|
|
115
|
-
normal: {
|
|
116
|
-
light: modeColorStyles('light'),
|
|
117
|
-
dark: modeColorStyles('dark')
|
|
118
|
-
},
|
|
119
|
-
inverted: {
|
|
120
|
-
light: invertedColorStyles(),
|
|
121
|
-
dark: invertedColorStyles()
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
var fontSize = function fontSize(p) {
|
|
126
|
-
var size = (0, _rem.default)(fontSizes[p.size === 'small' ? 'paragraph2' : 'default']);
|
|
127
|
-
return (0, _styledComponents.css)(["font-size:", ";"], size);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
var iconMarginProp = {
|
|
131
|
-
left: 'margin-right',
|
|
132
|
-
right: 'margin-left'
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
var iconMargin = function iconMargin(props) {
|
|
136
|
-
if (props.withText) {
|
|
137
|
-
return "".concat(iconMarginProp[props.position], ": ").concat((0, _rem.default)(5));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return '';
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
var IconContainer = _styledComponents.default.span.withConfig({
|
|
144
|
-
displayName: "Link__IconContainer",
|
|
145
|
-
componentId: "xqzqjb-0"
|
|
146
|
-
})(["line-height:0;", ";"], iconMargin);
|
|
147
|
-
|
|
148
|
-
var linkStyles = (0, _styledComponents.css)(["cursor:pointer;background-color:transparent;align-items:baseline;border:1px solid transparent;border-radius:2px;display:inline-flex;text-decoration:underline;transition:none;", ";", ";&:hover{text-decoration:underline;}", "{align-self:center;}"], fontSize, color, IconContainer);
|
|
149
|
-
|
|
150
|
-
var Link = function Link(props, ref) {
|
|
151
|
-
var _useConfig = (0, _ConfigProvider.useConfig)(),
|
|
152
|
-
linkRenderer = _useConfig.linkRenderer;
|
|
153
|
-
/* istanbul ignore next: iconPosition and size default values */
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var text = props.text,
|
|
157
|
-
icon = props.icon,
|
|
158
|
-
_props$iconPosition = props.iconPosition,
|
|
159
|
-
iconPosition = _props$iconPosition === void 0 ? 'left' : _props$iconPosition,
|
|
160
|
-
_props$size = props.size,
|
|
161
|
-
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
162
|
-
rest = _objectWithoutProperties(props, ["text", "icon", "iconPosition", "size"]);
|
|
163
|
-
|
|
164
|
-
var StyledLink = (0, _react.useMemo)(function () {
|
|
165
|
-
return (0, _styledComponents.default)(linkRenderer).withConfig({
|
|
166
|
-
displayName: "Link",
|
|
167
|
-
componentId: "xqzqjb-1"
|
|
168
|
-
})(["", ";"], linkStyles);
|
|
169
|
-
}, [linkRenderer]);
|
|
170
|
-
var LinkIcon = (0, _react.useMemo)(function () {
|
|
171
|
-
if (!icon) {
|
|
172
|
-
return null;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var Icon = icon;
|
|
176
|
-
return _react.default.createElement(IconContainer, {
|
|
177
|
-
"aria-hidden": true,
|
|
178
|
-
position: iconPosition,
|
|
179
|
-
withText: !!text
|
|
180
|
-
}, _react.default.createElement(Icon, {
|
|
181
|
-
size: size
|
|
182
|
-
}));
|
|
183
|
-
}, [icon, iconPosition, size, text]);
|
|
184
|
-
return _react.default.createElement(StyledLink, _extends({}, rest, {
|
|
185
|
-
ref: ref,
|
|
186
|
-
size: size
|
|
187
|
-
}), !!icon && iconPosition === 'left' && LinkIcon, text, !!icon && iconPosition === 'right' && LinkIcon);
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
var LinkWithRef = (0, _react.forwardRef)(Link); // @ts-ignore
|
|
52
|
+
var LinkWithRef = (0, _react.forwardRef)(_Link.default); // @ts-ignore
|
|
191
53
|
|
|
192
54
|
LinkWithRef.propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
193
55
|
'aria-label': (0, _propTypes2.requireIf)(_propTypes.default.string, function (_ref) {
|
|
@@ -13,62 +13,75 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
14
|
|
|
15
15
|
describe('Link', function () {
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, props)));
|
|
22
|
-
};
|
|
16
|
+
function testLinkVariations(baseLinkProps) {
|
|
17
|
+
var renderLink = function renderLink() {
|
|
18
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
|
+
return (0, _react2.render)(_react.default.createElement(_.default, _extends({}, baseLinkProps, props)));
|
|
20
|
+
};
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
it('renders correctly', function () {
|
|
23
|
+
var _renderLink = renderLink(),
|
|
24
|
+
container = _renderLink.container;
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
expect(container).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
it('renders correctly with an Icon', function () {
|
|
29
|
+
var _renderLink2 = renderLink({
|
|
30
|
+
icon: _Home.default
|
|
31
|
+
}),
|
|
32
|
+
container = _renderLink2.container;
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
it('correctly renders the Icon on each side', function () {
|
|
39
|
-
var left = renderLink({
|
|
40
|
-
icon: _Home.default,
|
|
41
|
-
iconPosition: 'left'
|
|
34
|
+
expect(container).toMatchSnapshot();
|
|
42
35
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
it('correctly renders the Icon on each side', function () {
|
|
37
|
+
var left = renderLink({
|
|
38
|
+
icon: _Home.default,
|
|
39
|
+
iconPosition: 'left'
|
|
40
|
+
});
|
|
41
|
+
var right = renderLink({
|
|
42
|
+
icon: _Home.default,
|
|
43
|
+
iconPosition: 'right'
|
|
44
|
+
});
|
|
45
|
+
expect(left.container).toMatchSnapshot();
|
|
46
|
+
expect(right.container).toMatchSnapshot();
|
|
46
47
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
size: 'small'
|
|
53
|
-
}),
|
|
54
|
-
container = _renderLink3.container;
|
|
48
|
+
it('correctly renders the small size', function () {
|
|
49
|
+
var _renderLink3 = renderLink({
|
|
50
|
+
size: 'small'
|
|
51
|
+
}),
|
|
52
|
+
container = _renderLink3.container;
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
expect(container).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
it('correctly renders the inverted variant', function () {
|
|
57
|
+
var _renderLink4 = renderLink({
|
|
58
|
+
variant: 'inverted'
|
|
59
|
+
}),
|
|
60
|
+
container = _renderLink4.container;
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
expect(container).toMatchSnapshot();
|
|
63
|
+
});
|
|
64
|
+
it('correctly renders with text as HTML', function () {
|
|
65
|
+
var _renderLink5 = renderLink({
|
|
66
|
+
text: _react.default.createElement("span", null, "link with", _react.default.createElement("strong", null, "HTML"))
|
|
67
|
+
}),
|
|
68
|
+
container = _renderLink5.container;
|
|
69
|
+
|
|
70
|
+
expect(container).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
describe('when enabled', function () {
|
|
75
|
+
testLinkVariations({
|
|
76
|
+
to: '/somewhere',
|
|
77
|
+
text: 'when enabled'
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('when disabled', function () {
|
|
81
|
+
testLinkVariations({
|
|
82
|
+
to: '/elsewhere',
|
|
83
|
+
text: 'when disabled',
|
|
84
|
+
disabled: true
|
|
85
|
+
});
|
|
73
86
|
});
|
|
74
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Link/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Link/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,cA0BlC,CAAC;AAEH,QAAA,MAAM,MAAM,KAAoC,CAAC;AAIjD,eAAe,MAAM,CAAC"}
|
|
@@ -10,6 +10,7 @@ var _reactDesc = require("react-desc");
|
|
|
10
10
|
// @ts-ignore no module typings
|
|
11
11
|
var makeLinkSchemaPropTypes = function makeLinkSchemaPropTypes() {
|
|
12
12
|
return {
|
|
13
|
+
disabled: _reactDesc.PropTypes.bool.description('Disables the link if true.').defaultValue('false'),
|
|
13
14
|
to: _reactDesc.PropTypes.string.description('Where to navigate when the link is clicked.').isRequired,
|
|
14
15
|
text: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.string, _reactDesc.PropTypes.node]).description("The link's inline text content. Required if no icon is provided."),
|
|
15
16
|
size: _reactDesc.PropTypes.oneOf(['small', 'medium']).description("The size in which to render the link's text and icon").defaultValue('medium'),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FlattenSimpleInterpolation, SimpleInterpolation } from 'styled-components';
|
|
2
|
+
import { Color } from './types';
|
|
3
|
+
export declare function linkColorStyles(normalColor: Color, visitedColor: Color, hoverColor: Color, focusColors?: {
|
|
4
|
+
border: Color;
|
|
5
|
+
shadow: Color;
|
|
6
|
+
}): FlattenSimpleInterpolation;
|
|
7
|
+
export declare const fontSize: (p: {
|
|
8
|
+
size?: "small" | "medium" | undefined;
|
|
9
|
+
}) => SimpleInterpolation;
|
|
10
|
+
export declare const IconContainer: import("styled-components").StyledComponent<"span", any, {
|
|
11
|
+
position: import("../Button").IconPosition;
|
|
12
|
+
withText: boolean;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const sharedLinkStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
15
|
+
size?: "small" | "medium" | undefined;
|
|
16
|
+
}, any>>;
|
|
17
|
+
export declare const linkStyles: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
|
|
18
|
+
size?: "small" | "medium" | undefined;
|
|
19
|
+
}, any>>;
|
|
20
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Link/styles.ts"],"names":[],"mappings":"AAEA,OAAe,EAEb,0BAA0B,EAC1B,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,KAAK,EAA0B,MAAM,SAAS,CAAC;AAiBxD,wBAAgB,eAAe,CAC7B,WAAW,EAAE,KAAK,EAClB,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE,KAAK,EACjB,WAAW,CAAC,EAAE;IAAE,MAAM,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,KAAK,CAAA;CAAE,GAC7C,0BAA0B,CAsC5B;AAuDD,eAAO,MAAM,QAAQ;;yBAMpB,CAAC;AAcF,eAAO,MAAM,aAAa;;;SAGzB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;QAkB5B,CAAC;AAEF,eAAO,MAAM,UAAU;;QAItB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.linkColorStyles = linkColorStyles;
|
|
7
|
+
exports.linkStyles = exports.sharedLinkStyles = exports.IconContainer = exports.fontSize = void 0;
|
|
8
|
+
|
|
9
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
10
|
+
|
|
11
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
12
|
+
|
|
13
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
14
|
+
|
|
15
|
+
var _styledTheming = _interopRequireDefault(require("styled-theming"));
|
|
16
|
+
|
|
17
|
+
var _designTokens = _interopRequireDefault(require("@decisiv/design-tokens"));
|
|
18
|
+
|
|
19
|
+
var _ConfigProvider = require("../../providers/ConfigProvider");
|
|
20
|
+
|
|
21
|
+
var _focusRingWithColor = _interopRequireDefault(require("../../utils/focusRingWithColor"));
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
24
|
+
|
|
25
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
|
+
|
|
27
|
+
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; }
|
|
28
|
+
|
|
29
|
+
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; }
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
var _designTokens$color = _designTokens.default.color,
|
|
34
|
+
base = _designTokens$color.base,
|
|
35
|
+
interaction = _designTokens$color.interaction,
|
|
36
|
+
opacity = _designTokens$color.opacity,
|
|
37
|
+
fontSizes = _designTokens.default.typography.size.alias;
|
|
38
|
+
/*
|
|
39
|
+
Notes about changing SVG fill color inside visited links:
|
|
40
|
+
|
|
41
|
+
1: Changing the color of a node that contains SVG with nodes set to have
|
|
42
|
+
fill="currentColor" does not work on Safari for :visited links (it does
|
|
43
|
+
work on Chrome and Firefox). To work around that, we instead change the
|
|
44
|
+
fill color of those SVG nodes to be the same color as the visited link.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
function linkColorStyles(normalColor, visitedColor, hoverColor, focusColors) {
|
|
48
|
+
var focusStyles = focusColors ? (0, _styledComponents.css)(["&:focus{border-color:", ";", "}"], (0, _toColorString.default)(focusColors.border), (0, _focusRingWithColor.default)((0, _toColorString.default)(focusColors.shadow))) : (0, _styledComponents.css)(["&:focus{border-color:transparent;box-shadow:none;}"]);
|
|
49
|
+
var normalColorString = (0, _toColorString.default)(normalColor);
|
|
50
|
+
var visitedColorString = (0, _toColorString.default)(visitedColor);
|
|
51
|
+
var hoverColorString = (0, _toColorString.default)(hoverColor);
|
|
52
|
+
return (0, _styledComponents.css)(["&:link{color:", ";}", " &:visited,&:visited svg [fill='currentColor']{color:", ";fill:", ";}&:hover,&:hover svg [fill='currentColor']{color:", ";fill:", ";}"], normalColorString, focusStyles, visitedColorString, visitedColorString, hoverColorString, hoverColorString);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var modeStateColors = {
|
|
56
|
+
light: {
|
|
57
|
+
normal: interaction.pacificOcean,
|
|
58
|
+
visited: interaction.redWine,
|
|
59
|
+
hover: interaction.indianOcean,
|
|
60
|
+
focus: {
|
|
61
|
+
border: interaction.pacificOcean,
|
|
62
|
+
shadow: interaction.pacificOcean40
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
dark: {
|
|
66
|
+
normal: interaction.arcticOcean,
|
|
67
|
+
visited: interaction.roseWine,
|
|
68
|
+
hover: interaction.atlanticOcean,
|
|
69
|
+
focus: {
|
|
70
|
+
border: interaction.arcticOcean,
|
|
71
|
+
shadow: interaction.arcticOcean40
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var modeColorStyles = function modeColorStyles(mode) {
|
|
77
|
+
var modeColors = modeStateColors[mode];
|
|
78
|
+
return linkColorStyles(modeColors.normal, modeColors.visited, modeColors.hover, modeColors.focus);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var invertedColorStyles = function invertedColorStyles() {
|
|
82
|
+
return linkColorStyles(base.snowWhite, _objectSpread({}, base.charcoal, {
|
|
83
|
+
alpha: 0.6
|
|
84
|
+
}), _objectSpread({}, base.snowWhite, {
|
|
85
|
+
alpha: 0.7
|
|
86
|
+
}), {
|
|
87
|
+
border: base.blackSheep,
|
|
88
|
+
shadow: opacity.charcoal40
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
var color = _styledTheming.default.variants(_ConfigProvider.themeKeys.mode, 'variant', {
|
|
93
|
+
normal: {
|
|
94
|
+
light: modeColorStyles('light'),
|
|
95
|
+
dark: modeColorStyles('dark')
|
|
96
|
+
},
|
|
97
|
+
inverted: {
|
|
98
|
+
light: invertedColorStyles(),
|
|
99
|
+
dark: invertedColorStyles()
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
var fontSize = function fontSize(p) {
|
|
104
|
+
var size = (0, _rem.default)(fontSizes[p.size === 'small' ? 'paragraph2' : 'default']);
|
|
105
|
+
return (0, _styledComponents.css)(["font-size:", ";"], size);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
exports.fontSize = fontSize;
|
|
109
|
+
var iconMarginProp = {
|
|
110
|
+
left: 'margin-right',
|
|
111
|
+
right: 'margin-left'
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var iconMargin = function iconMargin(props) {
|
|
115
|
+
if (props.withText) {
|
|
116
|
+
return "".concat(iconMarginProp[props.position], ": ").concat((0, _rem.default)(5));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return '';
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var IconContainer = _styledComponents.default.span.withConfig({
|
|
123
|
+
displayName: "styles__IconContainer",
|
|
124
|
+
componentId: "sc-7854xa-0"
|
|
125
|
+
})(["line-height:0;", ";"], iconMargin);
|
|
126
|
+
|
|
127
|
+
exports.IconContainer = IconContainer;
|
|
128
|
+
var sharedLinkStyles = (0, _styledComponents.css)(["background-color:transparent;align-items:baseline;border:1px solid transparent;border-radius:2px;display:inline-flex;text-decoration:underline;transition:none;&:hover{text-decoration:underline;}", ";", "{align-self:center;}"], fontSize, IconContainer);
|
|
129
|
+
exports.sharedLinkStyles = sharedLinkStyles;
|
|
130
|
+
var linkStyles = (0, _styledComponents.css)(["cursor:pointer;", ";", ";"], color, sharedLinkStyles);
|
|
131
|
+
exports.linkStyles = linkStyles;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode, Ref } from 'react';
|
|
2
|
+
import { StyledComponent } from 'styled-components';
|
|
3
|
+
import { RgbaColor, RgbColor } from 'polished/lib/types/color';
|
|
4
|
+
import { IconProps } from '@decisiv/iconix';
|
|
5
|
+
import { LinkRenderer, LinkRendererRef } from '../../providers/ConfigProvider';
|
|
6
|
+
export declare type LinkRef = LinkRendererRef;
|
|
7
|
+
export declare type LinkSize = 'medium' | 'small';
|
|
8
|
+
export declare type IconPosition = 'left' | 'right';
|
|
9
|
+
export declare type LinkVariant = 'normal' | 'inverted';
|
|
10
|
+
export declare type Color = RgbColor | RgbaColor;
|
|
11
|
+
export declare type IconComponent = (props: IconProps) => JSX.Element;
|
|
12
|
+
export interface LinkProps extends ComponentPropsWithRef<'a'> {
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
icon?: IconComponent;
|
|
15
|
+
iconPosition?: IconPosition;
|
|
16
|
+
size?: LinkSize;
|
|
17
|
+
text?: string | ReactNode;
|
|
18
|
+
to: string;
|
|
19
|
+
variant?: LinkVariant;
|
|
20
|
+
}
|
|
21
|
+
interface RendererProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
ref?: Ref<LinkRef>;
|
|
24
|
+
size?: LinkSize;
|
|
25
|
+
}
|
|
26
|
+
export declare type StyledLinkRenderer = StyledComponent<LinkRenderer, {}, RendererProps>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Link/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAE/E,oBAAY,OAAO,GAAG,eAAe,CAAC;AACtC,oBAAY,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1C,oBAAY,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5C,oBAAY,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhD,oBAAY,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzC,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,SAAU,SAAQ,qBAAqB,CAAC,GAAG,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,oBAAY,kBAAkB,GAAG,eAAe,CAC9C,YAAY,EACZ,EAAE,EACF,aAAa,CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/List/BaseCell/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,aAAa,eAE3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = BaseCell;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function BaseCell(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
return _react.default.createElement(_styles.Container, null, children);
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
var _ = _interopRequireDefault(require("."));
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
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); } }
|
|
12
|
+
|
|
13
|
+
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); }); }; }
|
|
14
|
+
|
|
15
|
+
describe('BaseCell', function () {
|
|
16
|
+
it('renders component children', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
17
|
+
var _render, getByText;
|
|
18
|
+
|
|
19
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
20
|
+
while (1) {
|
|
21
|
+
switch (_context.prev = _context.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
_render = (0, _react2.render)(_react.default.createElement(_.default, null, _react.default.createElement("div", null, "Test"))), getByText = _render.getByText;
|
|
24
|
+
expect(getByText('Test')).toBeInTheDocument();
|
|
25
|
+
|
|
26
|
+
case 2:
|
|
27
|
+
case "end":
|
|
28
|
+
return _context.stop();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, _callee);
|
|
32
|
+
})));
|
|
33
|
+
});
|