@decisiv/ui-components 2.0.1-alpha.99 → 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/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,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Alert;
|
|
7
|
+
Object.defineProperty(exports, "AlertProps", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _types.AlertProps;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
17
|
+
|
|
18
|
+
var _Times = _interopRequireDefault(require("@decisiv/iconix/lib/components/Times"));
|
|
19
|
+
|
|
20
|
+
var _useTranslations = _interopRequireDefault(require("../../utils/useTranslations"));
|
|
21
|
+
|
|
22
|
+
var _StyledButton = _interopRequireDefault(require("./StyledButton"));
|
|
23
|
+
|
|
24
|
+
var _Container = _interopRequireDefault(require("./Container"));
|
|
25
|
+
|
|
26
|
+
var _Flex = _interopRequireDefault(require("../Flex"));
|
|
27
|
+
|
|
28
|
+
var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
29
|
+
|
|
30
|
+
var _Typography = require("../Typography");
|
|
31
|
+
|
|
32
|
+
var _intents = _interopRequireDefault(require("./intents"));
|
|
33
|
+
|
|
34
|
+
var _types = require("./types");
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
+
|
|
38
|
+
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; } }
|
|
39
|
+
|
|
40
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
41
|
+
|
|
42
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function Alert(_ref) {
|
|
49
|
+
var ariaLabel = _ref['aria-label'],
|
|
50
|
+
children = _ref.children,
|
|
51
|
+
description = _ref.description,
|
|
52
|
+
dismissable = _ref.dismissable,
|
|
53
|
+
icon = _ref.icon,
|
|
54
|
+
_ref$intent = _ref.intent,
|
|
55
|
+
intent = _ref$intent === void 0 ? 'information' : _ref$intent,
|
|
56
|
+
onDismissClick = _ref.onDismissClick,
|
|
57
|
+
title = _ref.title,
|
|
58
|
+
tooltipText = _ref.tooltipText;
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(true),
|
|
61
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
+
open = _useState2[0],
|
|
63
|
+
setOpen = _useState2[1];
|
|
64
|
+
|
|
65
|
+
var translate = (0, _useTranslations.default)();
|
|
66
|
+
var borderColor = (0, _toColorString.default)(_intents.default[intent].borderColor);
|
|
67
|
+
var Icon = icon || _intents.default[intent].icon;
|
|
68
|
+
|
|
69
|
+
var handleClick = function handleClick() {
|
|
70
|
+
setOpen(false);
|
|
71
|
+
if (onDismissClick) onDismissClick();
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
if (!open) {
|
|
75
|
+
return _react.default.createElement(_react.default.Fragment, null);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return _react.default.createElement(_Container.default, {
|
|
79
|
+
flex: 1,
|
|
80
|
+
paddingLeft: 1.5,
|
|
81
|
+
paddingRight: 1.6,
|
|
82
|
+
paddingTop: 1.3,
|
|
83
|
+
paddingBottom: 1.1,
|
|
84
|
+
intent: intent
|
|
85
|
+
}, _react.default.createElement(Icon, {
|
|
86
|
+
color: borderColor
|
|
87
|
+
}), _react.default.createElement(_Flex.default, {
|
|
88
|
+
flexDirection: "column",
|
|
89
|
+
marginLeft: 1,
|
|
90
|
+
flex: 1
|
|
91
|
+
}, _react.default.createElement(_Flex.default, {
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
flex: 1
|
|
94
|
+
}, _react.default.createElement(_Typography.P, {
|
|
95
|
+
weight: "semibold",
|
|
96
|
+
marginRight: 1
|
|
97
|
+
}, title), dismissable && _react.default.createElement(_Tooltip.default, {
|
|
98
|
+
placement: "auto",
|
|
99
|
+
target: // eslint-disable-next-line react/jsx-wrap-multilines
|
|
100
|
+
_react.default.createElement(_StyledButton.default, {
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
icon: _Times.default,
|
|
103
|
+
onClick: handleClick,
|
|
104
|
+
"aria-label": translate(ariaLabel, 'alert.closeAlert')
|
|
105
|
+
})
|
|
106
|
+
}, translate(tooltipText, 'alert.close'))), _react.default.createElement(_Typography.P, {
|
|
107
|
+
size: "small"
|
|
108
|
+
}, children || description)));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Alert.propTypes = _types.propTypes;
|
|
112
|
+
Alert.defaultProps = _types.defaultProps;
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
describe('Alert', function () {
|
|
12
|
+
it('renders Title', function () {
|
|
13
|
+
var _render = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
14
|
+
title: "Alert Title"
|
|
15
|
+
})),
|
|
16
|
+
getByText = _render.getByText;
|
|
17
|
+
|
|
18
|
+
expect(getByText(/alert title/i)).toBeInTheDocument();
|
|
19
|
+
});
|
|
20
|
+
describe('when has description', function () {
|
|
21
|
+
it('renders description', function () {
|
|
22
|
+
var _render2 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
23
|
+
title: "Alert Title",
|
|
24
|
+
description: "Alert Description"
|
|
25
|
+
})),
|
|
26
|
+
getByText = _render2.getByText;
|
|
27
|
+
|
|
28
|
+
expect(getByText(/alert description/i)).toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
it('renders children as description', function () {
|
|
31
|
+
var _render3 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
32
|
+
title: "Alert Title"
|
|
33
|
+
}, "Alert Description")),
|
|
34
|
+
getByText = _render3.getByText;
|
|
35
|
+
|
|
36
|
+
expect(getByText(/alert description/i)).toBeInTheDocument();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe('when it is dismissable', function () {
|
|
40
|
+
it('renders close button', function () {
|
|
41
|
+
var _render4 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
42
|
+
title: "Alert Title",
|
|
43
|
+
dismissable: true,
|
|
44
|
+
"aria-label": "Close Alert"
|
|
45
|
+
})),
|
|
46
|
+
getByLabelText = _render4.getByLabelText;
|
|
47
|
+
|
|
48
|
+
expect(getByLabelText(/close alert/i)).toBeInTheDocument();
|
|
49
|
+
});
|
|
50
|
+
it('closes alert when clicking on dismiss button', function () {
|
|
51
|
+
var _render5 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
52
|
+
title: "Alert Title",
|
|
53
|
+
dismissable: true,
|
|
54
|
+
"aria-label": "Close Alert"
|
|
55
|
+
})),
|
|
56
|
+
getByLabelText = _render5.getByLabelText,
|
|
57
|
+
queryByText = _render5.queryByText;
|
|
58
|
+
|
|
59
|
+
_react2.fireEvent.click(getByLabelText(/close alert/i));
|
|
60
|
+
|
|
61
|
+
expect(queryByText(/alert title/i)).not.toBeInTheDocument();
|
|
62
|
+
});
|
|
63
|
+
it('triggers onDismissClick when clicking on dismiss button', function () {
|
|
64
|
+
var onDismissClick = jest.fn();
|
|
65
|
+
|
|
66
|
+
var _render6 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
67
|
+
title: "Alert Title",
|
|
68
|
+
dismissable: true,
|
|
69
|
+
"aria-label": "Close Alert",
|
|
70
|
+
onDismissClick: onDismissClick
|
|
71
|
+
})),
|
|
72
|
+
getByLabelText = _render6.getByLabelText;
|
|
73
|
+
|
|
74
|
+
_react2.fireEvent.click(getByLabelText(/close alert/i));
|
|
75
|
+
|
|
76
|
+
expect(onDismissClick).toHaveBeenCalled();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import theme from 'styled-theming';
|
|
2
|
+
import { Color } from '@decisiv/design-tokens/lib/color';
|
|
3
|
+
import InfoCircle from '@decisiv/iconix/lib/components/InfoCircle';
|
|
4
|
+
interface IntentRecord {
|
|
5
|
+
color: Color;
|
|
6
|
+
borderColor: Color;
|
|
7
|
+
icon: typeof InfoCircle;
|
|
8
|
+
}
|
|
9
|
+
declare type IntentType = Record<string, IntentRecord>;
|
|
10
|
+
declare const intents: IntentType;
|
|
11
|
+
export declare const intentStyle: theme.VariantSet;
|
|
12
|
+
export default intents;
|
|
13
|
+
//# sourceMappingURL=intents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/intents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAGnC,OAAc,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAKhE,OAAO,UAAU,MAAM,2CAA2C,CAAC;AAKnE,UAAU,YAAY;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,KAAK,CAAC;IACnB,IAAI,EAAE,OAAO,UAAU,CAAC;CACzB;AAED,aAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAE/C,QAAA,MAAM,OAAO,EAAE,UAqBd,CAAC;AAEF,eAAO,MAAM,WAAW,kBAyCtB,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.intentStyle = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledTheming = _interopRequireDefault(require("styled-theming"));
|
|
9
|
+
|
|
10
|
+
var _styledComponents = require("styled-components");
|
|
11
|
+
|
|
12
|
+
var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
|
|
13
|
+
|
|
14
|
+
var _CheckCircle = _interopRequireDefault(require("@decisiv/iconix/lib/components/CheckCircle"));
|
|
15
|
+
|
|
16
|
+
var _ExclamationCircle = _interopRequireDefault(require("@decisiv/iconix/lib/components/ExclamationCircle"));
|
|
17
|
+
|
|
18
|
+
var _ExclamationTriangle = _interopRequireDefault(require("@decisiv/iconix/lib/components/ExclamationTriangle"));
|
|
19
|
+
|
|
20
|
+
var _InfoCircle = _interopRequireDefault(require("@decisiv/iconix/lib/components/InfoCircle"));
|
|
21
|
+
|
|
22
|
+
var _polished = require("polished");
|
|
23
|
+
|
|
24
|
+
var _ConfigProvider = require("../../providers/ConfigProvider");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
var intents = {
|
|
29
|
+
information: {
|
|
30
|
+
color: _color.default.status.information.light,
|
|
31
|
+
borderColor: _color.default.status.information.medium,
|
|
32
|
+
icon: _InfoCircle.default
|
|
33
|
+
},
|
|
34
|
+
success: {
|
|
35
|
+
color: _color.default.status.success.light,
|
|
36
|
+
borderColor: _color.default.status.success.medium,
|
|
37
|
+
icon: _CheckCircle.default
|
|
38
|
+
},
|
|
39
|
+
warning: {
|
|
40
|
+
color: _color.default.status.warning.light,
|
|
41
|
+
borderColor: _color.default.status.warning.medium,
|
|
42
|
+
icon: _ExclamationCircle.default
|
|
43
|
+
},
|
|
44
|
+
danger: {
|
|
45
|
+
color: _color.default.status.danger.light,
|
|
46
|
+
borderColor: _color.default.status.danger.medium,
|
|
47
|
+
icon: _ExclamationTriangle.default
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var intentStyle = _styledTheming.default.variants(_ConfigProvider.themeKeys.mode, 'intent', {
|
|
52
|
+
information: {
|
|
53
|
+
light: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.information.color), (0, _polished.toColorString)(intents.information.borderColor)),
|
|
54
|
+
dark: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.information.color), (0, _polished.toColorString)(intents.information.borderColor))
|
|
55
|
+
},
|
|
56
|
+
success: {
|
|
57
|
+
light: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.success.color), (0, _polished.toColorString)(intents.success.borderColor)),
|
|
58
|
+
dark: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.success.color), (0, _polished.toColorString)(intents.success.borderColor))
|
|
59
|
+
},
|
|
60
|
+
warning: {
|
|
61
|
+
light: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.warning.color), (0, _polished.toColorString)(intents.warning.borderColor)),
|
|
62
|
+
dark: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.warning.color), (0, _polished.toColorString)(intents.warning.borderColor))
|
|
63
|
+
},
|
|
64
|
+
danger: {
|
|
65
|
+
light: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.danger.color), (0, _polished.toColorString)(intents.danger.borderColor)),
|
|
66
|
+
dark: (0, _styledComponents.css)(["background-color:", ";border-left-color:", ";"], (0, _polished.toColorString)(intents.danger.color), (0, _polished.toColorString)(intents.danger.borderColor))
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
exports.intentStyle = intentStyle;
|
|
71
|
+
var _default = intents;
|
|
72
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAqC,CAAC;AAyBlD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _reactDesc = require("react-desc");
|
|
9
|
+
|
|
10
|
+
// @ts-ignore no module typings
|
|
11
|
+
var schema = (0, _reactDesc.describe)({
|
|
12
|
+
displayName: 'Alert'
|
|
13
|
+
});
|
|
14
|
+
schema.propTypes = {
|
|
15
|
+
'aria-label': _reactDesc.PropTypes.string.description('Descriptive text for accessibility purposes'),
|
|
16
|
+
description: _reactDesc.PropTypes.string.description('Text to show as description'),
|
|
17
|
+
dismissable: _reactDesc.PropTypes.bool.description('Sets if the alert is dismissable').defaultValue('false'),
|
|
18
|
+
icon: _reactDesc.PropTypes.element.description('Must be an icon component from `@decisiv/iconix`'),
|
|
19
|
+
intent: _reactDesc.PropTypes.oneOf(['information', 'success', 'warning', 'danger']).description('Shortcuts to the most common combinations of icon and color.').defaultValue('information'),
|
|
20
|
+
title: _reactDesc.PropTypes.string.description('Text to show as title').isRequired,
|
|
21
|
+
onDismissClick: _reactDesc.PropTypes.func.description('A callback when dismissing the alert').defaultValue('undefined'),
|
|
22
|
+
tooltipText: _reactDesc.PropTypes.string.description('The text for dismiss tooltip').defaultValue('Close')
|
|
23
|
+
};
|
|
24
|
+
var _default = schema;
|
|
25
|
+
exports.default = _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { IconProps } from '@decisiv/iconix';
|
|
4
|
+
import intents from './intents';
|
|
5
|
+
export declare type IconComponent = (props: IconProps) => JSX.Element;
|
|
6
|
+
export interface AlertProps {
|
|
7
|
+
'aria-label'?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
description?: string;
|
|
10
|
+
dismissable?: boolean;
|
|
11
|
+
icon?: IconComponent;
|
|
12
|
+
intent?: keyof typeof intents;
|
|
13
|
+
onDismissClick?: () => void;
|
|
14
|
+
title: string;
|
|
15
|
+
tooltipText?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const propTypes: {
|
|
18
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
19
|
+
description: PropTypes.Requireable<string>;
|
|
20
|
+
dismissable: PropTypes.Requireable<boolean>;
|
|
21
|
+
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
22
|
+
intent: PropTypes.Requireable<string>;
|
|
23
|
+
title: PropTypes.Validator<string>;
|
|
24
|
+
onDismissClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
tooltipText: PropTypes.Requireable<string>;
|
|
26
|
+
};
|
|
27
|
+
export declare const defaultProps: {
|
|
28
|
+
'aria-label': undefined;
|
|
29
|
+
description: undefined;
|
|
30
|
+
dismissable: boolean;
|
|
31
|
+
icon: undefined;
|
|
32
|
+
intent: string;
|
|
33
|
+
onDismissClick: undefined;
|
|
34
|
+
tooltipText: undefined;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Alert/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultProps = exports.propTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var propTypes = {
|
|
13
|
+
'aria-label': _propTypes.default.string,
|
|
14
|
+
description: _propTypes.default.string,
|
|
15
|
+
dismissable: _propTypes.default.bool,
|
|
16
|
+
icon: _propTypes.default.element,
|
|
17
|
+
intent: _propTypes.default.oneOf(['information', 'success', 'warning', 'danger']),
|
|
18
|
+
title: _propTypes.default.string.isRequired,
|
|
19
|
+
onDismissClick: _propTypes.default.func,
|
|
20
|
+
tooltipText: _propTypes.default.string
|
|
21
|
+
};
|
|
22
|
+
exports.propTypes = propTypes;
|
|
23
|
+
var defaultProps = {
|
|
24
|
+
'aria-label': undefined,
|
|
25
|
+
description: undefined,
|
|
26
|
+
dismissable: false,
|
|
27
|
+
icon: undefined,
|
|
28
|
+
intent: 'information',
|
|
29
|
+
onDismissClick: undefined,
|
|
30
|
+
tooltipText: undefined
|
|
31
|
+
};
|
|
32
|
+
exports.defaultProps = defaultProps;
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const kindModifiers: {
|
|
3
|
-
readonly primary: () => CSS;
|
|
4
|
-
readonly secondary: () => CSS;
|
|
5
|
-
};
|
|
6
|
-
declare const sizeModifiers: {
|
|
7
|
-
readonly medium: () => CSS;
|
|
8
|
-
readonly large: () => CSS;
|
|
9
|
-
};
|
|
10
|
-
interface AvatarContainerProps {
|
|
11
|
-
kind?: keyof typeof kindModifiers;
|
|
12
|
-
size?: keyof typeof sizeModifiers;
|
|
13
|
-
}
|
|
1
|
+
import { AvatarContainerProps } from './types';
|
|
14
2
|
declare const AvatarContainer: import("styled-components").StyledComponent<"div", any, AvatarContainerProps, never>;
|
|
15
3
|
export default AvatarContainer;
|
|
16
4
|
//# sourceMappingURL=AvatarContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarContainer.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/AvatarContainer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AvatarContainer.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/AvatarContainer.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAoC/C,QAAA,MAAM,eAAe,sFAkBpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -17,25 +17,18 @@ var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"))
|
|
|
17
17
|
|
|
18
18
|
var _typography = _interopRequireDefault(require("@decisiv/design-tokens/lib/typography"));
|
|
19
19
|
|
|
20
|
+
var _palette = require("../../modifiers/palette");
|
|
21
|
+
|
|
20
22
|
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; } }
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
var status = _color.default.status
|
|
25
|
-
visualInterest = _color.default.visualInterest;
|
|
26
|
-
var kindModifiers = {
|
|
27
|
-
primary: function primary() {
|
|
28
|
-
return (0, _styledComponents.css)(["background-color:", ";"], (0, _toColorString.default)(status.information.medium));
|
|
29
|
-
},
|
|
30
|
-
secondary: function secondary() {
|
|
31
|
-
return (0, _styledComponents.css)(["background-color:", ";"], (0, _toColorString.default)(visualInterest.licoriceMousse.medium));
|
|
32
|
-
}
|
|
33
|
-
};
|
|
26
|
+
var status = _color.default.status;
|
|
34
27
|
|
|
35
28
|
var makeSizeModifiers = function makeSizeModifiers(_ref) {
|
|
36
29
|
var size = _ref.size,
|
|
37
30
|
typeScale = _ref.typeScale;
|
|
38
|
-
return (0, _styledComponents.css)(["font-size:", ";height:", ";min-height:", ";width:", ";min-width:", ";"], (0, _rem.default)(_typography.default.size.scale[typeScale]), (0, _rem.default)(size), (0, _rem.default)(size), (0, _rem.default)(size), (0, _rem.default)(size));
|
|
31
|
+
return (0, _styledComponents.css)(["font-weight:", ";font-size:", ";height:", ";min-height:", ";width:", ";min-width:", ";"], _typography.default.weight.alias.regular, (0, _rem.default)(_typography.default.size.scale[typeScale]), (0, _rem.default)(size), (0, _rem.default)(size), (0, _rem.default)(size), (0, _rem.default)(size));
|
|
39
32
|
};
|
|
40
33
|
|
|
41
34
|
var sizeModifiers = {
|
|
@@ -48,15 +41,21 @@ var sizeModifiers = {
|
|
|
48
41
|
large: function large() {
|
|
49
42
|
return makeSizeModifiers({
|
|
50
43
|
size: 60,
|
|
51
|
-
typeScale:
|
|
44
|
+
typeScale: 3
|
|
52
45
|
});
|
|
53
46
|
}
|
|
54
47
|
};
|
|
55
48
|
|
|
49
|
+
var withGravatarModifiers = function withGravatarModifiers(props) {
|
|
50
|
+
var shouldUseGravatar = props.shouldUseGravatar;
|
|
51
|
+
if (!shouldUseGravatar) return null;
|
|
52
|
+
return (0, _styledComponents.css)(["color:transparent;background-color:transparent;border:none;"]);
|
|
53
|
+
};
|
|
54
|
+
|
|
56
55
|
var AvatarContainer = _styledComponents.default.div.withConfig({
|
|
57
56
|
displayName: "AvatarContainer",
|
|
58
57
|
componentId: "sc-16avffw-0"
|
|
59
|
-
})(["position:relative;align-items:center;background-color:", ";border-radius:50%;display:inline-flex;height:", ";justify-content:center;width:", ";> span[role='img']{line-height:0;}", ";", ";"], (0, _toColorString.default)(status.information.medium), (0, _rem.default)(36), (0, _rem.default)(36), (0, _styledComponentsModifiers.applyStyleModifiers)(
|
|
58
|
+
})(["position:relative;align-items:center;background-color:", ";border-radius:50%;display:inline-flex;height:", ";justify-content:center;width:", ";> span[role='img']{line-height:0;}", ";", ";", ""], (0, _toColorString.default)(status.information.medium), (0, _rem.default)(36), (0, _rem.default)(36), (0, _styledComponentsModifiers.applyStyleModifiers)(sizeModifiers, 'size'), _palette.withBorderedPalette, withGravatarModifiers);
|
|
60
59
|
|
|
61
60
|
var _default = AvatarContainer;
|
|
62
61
|
exports.default = _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare function AvatarContent(props:
|
|
2
|
+
import { AvatarContentProps } from './types';
|
|
3
|
+
declare function AvatarContent(props: AvatarContentProps): JSX.Element;
|
|
4
4
|
export default AvatarContent;
|
|
5
5
|
//# sourceMappingURL=AvatarContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarContent.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/AvatarContent.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AvatarContent.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/AvatarContent.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA8B7C,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAkB7D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -5,61 +5,65 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
11
|
|
|
14
|
-
var
|
|
12
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
13
|
+
|
|
14
|
+
var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
|
|
15
15
|
|
|
16
16
|
var _Typography = require("../Typography");
|
|
17
17
|
|
|
18
18
|
var _useAvatarIcon = _interopRequireDefault(require("./hooks/useAvatarIcon"));
|
|
19
19
|
|
|
20
|
-
var _useGravatar3 = _interopRequireDefault(require("./hooks/useGravatar"));
|
|
21
|
-
|
|
22
20
|
var _useInitials = _interopRequireDefault(require("./hooks/useInitials"));
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
var _palette = require("../../modifiers/palette");
|
|
25
23
|
|
|
26
|
-
function
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
25
|
|
|
28
|
-
function
|
|
26
|
+
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; }
|
|
29
27
|
|
|
30
|
-
function
|
|
28
|
+
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; }
|
|
31
29
|
|
|
32
|
-
function
|
|
30
|
+
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; }
|
|
33
31
|
|
|
34
32
|
var GravatarImg = _styledComponents.default.img.withConfig({
|
|
35
33
|
displayName: "AvatarContent__GravatarImg",
|
|
36
34
|
componentId: "sc-1jejgqy-0"
|
|
37
35
|
})(["border-radius:50%;width:100%;"]);
|
|
38
36
|
|
|
37
|
+
var borderColor = _objectSpread({}, _color.default.base.charcoal, {
|
|
38
|
+
alpha: _palette.BORDER_OPACITY.pastel
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var GravatarShadow = _styledComponents.default.div.withConfig({
|
|
42
|
+
displayName: "AvatarContent__GravatarShadow",
|
|
43
|
+
componentId: "sc-1jejgqy-1"
|
|
44
|
+
})(["position:absolute;width:100%;height:100%;box-shadow:inset 0 0 0 1px ", ";border-radius:50%;top:0;left:0;"], (0, _toColorString.default)(borderColor));
|
|
45
|
+
|
|
39
46
|
var Initials = (0, _styledComponents.default)(_Typography.P).attrs({
|
|
40
47
|
as: 'span'
|
|
41
48
|
}).withConfig({
|
|
42
49
|
displayName: "AvatarContent__Initials",
|
|
43
|
-
componentId: "sc-1jejgqy-
|
|
44
|
-
})(["
|
|
50
|
+
componentId: "sc-1jejgqy-2"
|
|
51
|
+
})(["font-size:inherit;text-transform:uppercase;font-weight:inherit;"]);
|
|
45
52
|
|
|
46
53
|
var AvatarIcon = _styledComponents.default.div.withConfig({
|
|
47
54
|
displayName: "AvatarContent__AvatarIcon",
|
|
48
|
-
componentId: "sc-1jejgqy-
|
|
49
|
-
})(["
|
|
55
|
+
componentId: "sc-1jejgqy-3"
|
|
56
|
+
})([""]);
|
|
50
57
|
|
|
51
58
|
function AvatarContent(props) {
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
gravatarProps = _useGravatar2[0],
|
|
55
|
-
shouldUseGravatar = _useGravatar2[1];
|
|
56
|
-
|
|
59
|
+
var gravatarProps = props.gravatarProps,
|
|
60
|
+
shouldUseGravatar = props.shouldUseGravatar;
|
|
57
61
|
var initials = (0, _useInitials.default)(props);
|
|
58
62
|
var avatarIconProps = (0, _useAvatarIcon.default)(props);
|
|
59
63
|
|
|
60
64
|
switch (true) {
|
|
61
65
|
case shouldUseGravatar:
|
|
62
|
-
return _react.default.createElement(GravatarImg, gravatarProps);
|
|
66
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(GravatarImg, gravatarProps), _react.default.createElement(GravatarShadow, null));
|
|
63
67
|
|
|
64
68
|
case !!initials.length:
|
|
65
69
|
return _react.default.createElement(Initials, null, initials);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAAA,OAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEZ,sBAAsB,EAGvB,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKjD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;AA6DlC,QAAA,MAAM,aAAa,EAAE,sBAAsB,CACzC,SAAS,EACT,WAAW,CACS,CAAC;AAcvB,eAAe,aAAa,CAAC"}
|