@decisiv/ui-components 2.0.1-alpha.16 → 2.0.1-alpha.160
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/BaseButton/index.d.ts.map +1 -1
- package/lib/atoms/BaseButton/index.js +1 -1
- 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 +26 -5
- package/lib/atoms/BooleanInput/index.test.js +17 -6
- package/lib/atoms/BooleanInput/types.d.ts +4 -0
- package/lib/atoms/BooleanInput/types.d.ts.map +1 -1
- package/lib/atoms/BooleanInput/types.js +5 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.js +2 -1
- package/lib/atoms/Calendar/hooks/useCalendar/index.test.js +5 -6
- package/lib/atoms/Calendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.js +46 -6
- package/lib/atoms/Calendar/index.test.js +68 -38
- package/lib/atoms/Calendar/types.d.ts +1 -1
- package/lib/atoms/Calendar/types.d.ts.map +1 -1
- package/lib/atoms/Calendar/types.js +5 -1
- package/lib/atoms/InputField/Containers.d.ts +12 -6
- package/lib/atoms/InputField/Containers.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.js +8 -6
- package/lib/atoms/InputField/InputLabel.d.ts +1 -0
- package/lib/atoms/InputField/InputLabel.d.ts.map +1 -1
- package/lib/atoms/InputField/InputLabel.js +2 -1
- package/lib/atoms/InputField/index.d.ts +6 -0
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +25 -8
- package/lib/atoms/InputField/index.test.js +91 -0
- package/lib/atoms/InputField/schema.d.ts.map +1 -1
- package/lib/atoms/InputField/schema.js +3 -2
- package/lib/atoms/OptionsList/Category.d.ts +1 -1
- package/lib/atoms/OptionsList/Category.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Category.js +4 -2
- package/lib/atoms/OptionsList/Footer.d.ts +8 -0
- package/lib/atoms/OptionsList/Footer.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Footer.js +72 -0
- package/lib/atoms/OptionsList/Option.d.ts.map +1 -1
- package/lib/atoms/OptionsList/Option.js +24 -9
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +44 -17
- package/lib/atoms/OptionsList/index.test.js +127 -17
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +5 -0
- package/lib/atoms/OptionsList/types.d.ts +15 -0
- package/lib/atoms/OptionsList/types.d.ts.map +1 -1
- package/lib/atoms/OptionsList/types.js +5 -1
- package/lib/atoms/RequiredIcon.d.ts +9 -0
- package/lib/atoms/RequiredIcon.d.ts.map +1 -0
- package/lib/atoms/{InputField/RequiredIcon.js → RequiredIcon.js} +7 -3
- package/lib/components/Accordion/types.js +5 -1
- package/lib/components/Accordion/useAccordion/types.js +5 -1
- 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/Alert/schema.d.ts +3 -0
- 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/types.js +5 -1
- package/lib/components/Badge/constants.d.ts +2 -0
- package/lib/components/Badge/constants.d.ts.map +1 -0
- package/lib/components/Badge/constants.js +29 -0
- package/lib/components/Badge/index.d.ts.map +1 -1
- package/lib/components/Badge/index.js +12 -23
- package/lib/components/Badge/index.test.js +51 -8
- package/lib/components/Badge/schema.js +1 -1
- package/lib/components/Badge/types.d.ts +1 -1
- package/lib/components/Badge/types.d.ts.map +1 -1
- package/lib/components/Badge/types.js +7 -3
- package/lib/components/Breadcrumbs/types.js +5 -1
- package/lib/components/Button/StyledButton.d.ts +3 -2
- package/lib/components/Button/StyledButton.d.ts.map +1 -1
- package/lib/components/Button/StyledButton.js +21 -7
- package/lib/components/Button/index.d.ts.map +1 -1
- package/lib/components/Button/index.js +19 -9
- package/lib/components/Button/index.test.js +24 -8
- package/lib/components/Button/schema.d.ts +6 -1
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +11 -5
- package/lib/components/Button/types.d.ts +2 -1
- package/lib/components/Button/types.d.ts.map +1 -1
- package/lib/components/Button/types.js +5 -1
- package/lib/components/Checkbox/index.d.ts.map +1 -1
- package/lib/components/Checkbox/index.js +3 -1
- package/lib/components/Checkbox/schema.d.ts.map +1 -1
- package/lib/components/Checkbox/schema.js +2 -0
- package/lib/components/Combobox/Target.d.ts.map +1 -1
- package/lib/components/Combobox/Target.js +51 -14
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +196 -66
- package/lib/components/Combobox/index.test.js +369 -146
- package/lib/components/Combobox/schema.d.ts.map +1 -1
- package/lib/components/Combobox/schema.js +10 -2
- package/lib/components/Combobox/types.d.ts +12 -3
- package/lib/components/Combobox/types.d.ts.map +1 -1
- package/lib/components/Combobox/types.js +5 -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 +105 -0
- package/lib/components/Drawer/index.test.js +122 -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 +4 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +76 -11
- package/lib/components/DropdownList/propTypes.d.ts +4 -0
- package/lib/components/DropdownList/propTypes.d.ts.map +1 -0
- package/lib/components/DropdownList/propTypes.js +42 -0
- package/lib/components/DropdownList/schema.d.ts.map +1 -1
- package/lib/components/DropdownList/schema.js +6 -1
- package/lib/components/DropdownList/types.d.ts +4 -1
- package/lib/components/DropdownList/types.d.ts.map +1 -1
- package/lib/components/Filter/IconWrapper/index.d.ts +197 -0
- package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -0
- package/lib/components/Filter/IconWrapper/index.js +35 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts +31 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
- package/lib/components/Filter/SimplePrimary/index.js +58 -0
- package/lib/components/Filter/SimplePrimary/index.test.js +34 -0
- package/lib/components/Filter/StyledFilter.d.ts +4 -0
- package/lib/components/Filter/StyledFilter.d.ts.map +1 -0
- package/lib/components/Filter/StyledFilter.js +41 -0
- package/lib/components/Filter/StyledLabel/index.d.ts +8 -0
- package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -0
- package/lib/components/Filter/StyledLabel/index.js +30 -0
- package/lib/components/Filter/index.d.ts +5 -0
- package/lib/components/Filter/index.d.ts.map +1 -0
- package/lib/components/Filter/index.js +107 -0
- package/lib/components/Filter/index.test.js +60 -0
- package/lib/components/Filter/kind.d.ts +6 -0
- package/lib/components/Filter/kind.d.ts.map +1 -0
- package/lib/components/Filter/kind.js +45 -0
- package/lib/components/Filter/schema.d.ts +9 -0
- package/lib/components/Filter/schema.d.ts.map +1 -0
- package/lib/components/Filter/schema.js +33 -0
- package/lib/components/Filter/types.d.ts +18 -0
- package/lib/components/Filter/types.d.ts.map +1 -0
- package/lib/components/Filter/types.js +5 -0
- package/lib/components/JumpTo/JumpToMenu.d.ts +2 -2
- package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.js +3 -3
- package/lib/components/JumpTo/types.js +5 -1
- package/lib/components/JumpTo/utils.d.ts.map +1 -1
- package/lib/components/JumpTo/utils.js +3 -7
- package/lib/components/LeftNav/Item/ClickArea.js +1 -1
- package/lib/components/LeftNav/Item/ItemWrapper.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/ItemWrapper.js +3 -3
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts +7 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.d.ts.map +1 -0
- package/lib/components/LeftNav/Item/MenuItemWrapper.js +20 -0
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavCollapsedXItem/index.js +7 -5
- package/lib/components/LeftNav/Item/NavExpandedItem/index.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/NavExpandedItem/index.js +24 -13
- package/lib/components/LeftNav/Item/types.d.ts +1 -1
- package/lib/components/LeftNav/Item/types.d.ts.map +1 -1
- package/lib/components/LeftNav/Item/types.js +5 -1
- package/lib/components/LeftNav/index.test.js +13 -3
- package/lib/components/LeftNav/schema.d.ts.map +1 -1
- package/lib/components/LeftNav/schema.js +2 -0
- package/lib/components/LeftNav/types.d.ts +1 -0
- package/lib/components/LeftNav/types.d.ts.map +1 -1
- package/lib/components/LeftNav/types.js +5 -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 +20 -158
- package/lib/components/Link/index.test.js +63 -42
- package/lib/components/Link/schema.d.ts.map +1 -1
- package/lib/components/Link/schema.js +2 -1
- 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/Link/types.js +5 -0
- package/lib/components/Menu/index.d.ts.map +1 -1
- package/lib/components/Menu/index.js +3 -1
- package/lib/components/Menu/types.d.ts +2 -0
- package/lib/components/Menu/types.d.ts.map +1 -1
- package/lib/components/Menu/types.js +5 -1
- package/lib/components/Modal/components.d.ts +2 -2
- package/lib/components/Modal/types.js +5 -1
- package/lib/components/Notifications/Notification/components.d.ts +3 -3
- package/lib/components/Notifications/Notification/components.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/components.js +12 -6
- package/lib/components/Notifications/Notification/index.d.ts +3 -6
- package/lib/components/Notifications/Notification/index.d.ts.map +1 -1
- package/lib/components/Notifications/Notification/index.js +19 -12
- package/lib/components/Notifications/Notification/index.test.js +38 -19
- package/lib/components/Notifications/NotificationsPanel/index.d.ts +2 -1
- package/lib/components/Notifications/NotificationsPanel/index.d.ts.map +1 -1
- package/lib/components/Notifications/NotificationsPanel/index.js +44 -21
- package/lib/components/Notifications/NotificationsPanel/schema.js +1 -1
- package/lib/components/Notifications/Notifier.test.js +79 -10
- package/lib/components/Notifications/constants.d.ts +2 -0
- package/lib/components/Notifications/constants.d.ts.map +1 -0
- package/lib/components/Notifications/constants.js +16 -0
- package/lib/components/Notifications/schema.d.ts.map +1 -1
- package/lib/components/Notifications/schema.js +2 -1
- package/lib/components/Notifications/useNotifications.d.ts +1 -0
- package/lib/components/Notifications/useNotifications.d.ts.map +1 -1
- package/lib/components/Notifications/useNotifications.test.js +7 -4
- package/lib/components/Pagination/Pagination.d.ts +1 -1
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +1 -0
- package/lib/components/Pagination/Pagination.test.js +9 -0
- package/lib/components/Pagination/types.js +5 -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/index.d.ts.map +1 -1
- package/lib/components/Popover/index.js +6 -3
- package/lib/components/Popover/schema.d.ts.map +1 -1
- package/lib/components/Popover/schema.js +27 -20
- package/lib/components/Popover/types.d.ts +1 -0
- package/lib/components/Popover/types.d.ts.map +1 -1
- package/lib/components/Popover/utils.d.ts +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 +190 -0
- package/lib/components/SearchInput/index.test.js +417 -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 +24 -0
- package/lib/components/SearchInput/types.d.ts +28 -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 +6 -2
- package/lib/components/Select/index.d.ts.map +1 -1
- package/lib/components/Select/index.js +44 -4
- package/lib/components/Select/index.test.js +106 -23
- package/lib/components/Select/schema.d.ts.map +1 -1
- package/lib/components/Select/schema.js +9 -0
- package/lib/components/Select/types.d.ts +6 -1
- package/lib/components/Select/types.d.ts.map +1 -1
- package/lib/components/Select/types.js +5 -1
- package/lib/components/SelectDate/Target.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.js +6 -2
- package/lib/components/SelectDate/index.d.ts.map +1 -1
- package/lib/components/SelectDate/index.js +32 -3
- package/lib/components/SelectDate/index.test.js +108 -51
- package/lib/components/SelectDate/schema.d.ts.map +1 -1
- package/lib/components/SelectDate/schema.js +3 -0
- package/lib/components/SelectDate/types.d.ts +3 -0
- package/lib/components/SelectDate/types.d.ts.map +1 -1
- package/lib/components/SelectDate/types.js +5 -1
- package/lib/components/SelectDateRange/index.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.js +31 -2
- package/lib/components/SelectDateRange/index.test.js +115 -58
- package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
- package/lib/components/SelectDateRange/schema.js +3 -0
- package/lib/components/SelectDateRange/types.js +5 -1
- package/lib/components/SelectMenu/index.d.ts +5 -0
- package/lib/components/SelectMenu/index.d.ts.map +1 -1
- package/lib/components/SelectMenu/index.js +27 -3
- package/lib/components/SelectMenu/schema.d.ts.map +1 -1
- package/lib/components/SelectMenu/schema.js +4 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +28 -17
- package/lib/components/Table/Container.d.ts.map +1 -1
- package/lib/components/Table/Container.js +6 -1
- package/lib/components/Table/DataRow.d.ts.map +1 -1
- package/lib/components/Table/DataRow.js +26 -18
- package/lib/components/Table/Head.d.ts +1 -1
- package/lib/components/Table/Head.d.ts.map +1 -1
- package/lib/components/Table/Head.js +10 -5
- package/lib/components/Table/HeaderCell/index.d.ts.map +1 -1
- package/lib/components/Table/HeaderCell/index.js +19 -6
- package/lib/components/Table/HeaderCell/types.d.ts +6 -1
- package/lib/components/Table/HeaderCell/types.d.ts.map +1 -1
- package/lib/components/Table/HeaderCell/types.js +5 -1
- package/lib/components/Table/Provider.d.ts +5 -5
- package/lib/components/Table/Provider.d.ts.map +1 -1
- package/lib/components/Table/Provider.js +10 -11
- package/lib/components/Table/index.d.ts.map +1 -1
- package/lib/components/Table/index.js +110 -20
- package/lib/components/Table/index.test.js +80 -33
- package/lib/components/Table/schema.columns.d.ts.map +1 -1
- package/lib/components/Table/schema.columns.js +6 -4
- package/lib/components/Table/schema.d.ts.map +1 -1
- package/lib/components/Table/schema.js +7 -6
- package/lib/components/Table/types.d.ts +19 -4
- package/lib/components/Table/types.d.ts.map +1 -1
- package/lib/components/Table/utils.d.ts +2 -8
- package/lib/components/Table/utils.d.ts.map +1 -1
- package/lib/components/Table/utils.js +21 -20
- package/lib/components/Tabs/types.js +5 -1
- 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 +3 -0
- 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 +2 -0
- 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 +167 -0
- package/lib/components/Tag/types.d.ts +9 -10
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/lib/components/Tag/types.js +5 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +1 -1
- package/lib/components/TextArea/index.js +1 -0
- package/lib/components/TextArea/index.test.js +5 -0
- package/lib/components/TextField/Input.js +1 -1
- package/lib/components/TextField/index.test.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 +6 -1
- package/lib/components/Toggle/index.test.js +39 -10
- 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/Toggle/types.js +5 -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/index.d.ts +6 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +68 -0
- package/lib/modifiers/spacingSchema.d.ts.map +1 -1
- package/lib/modifiers/spacingSchema.js +29 -16
- package/lib/providers/ConfigProvider/index.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/index.js +5 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts +1 -1
- package/lib/providers/ConfigProvider/utils/context.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/normalizer.js +1 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts +24 -0
- package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +24 -0
- package/lib/providers/NotificationsProvider/index.d.ts +6 -5
- package/lib/providers/NotificationsProvider/index.d.ts.map +1 -1
- package/lib/providers/NotificationsProvider/index.js +47 -28
- package/lib/providers/NotificationsProvider/types.d.ts +4 -1
- package/lib/providers/NotificationsProvider/types.d.ts.map +1 -1
- package/lib/utils/commonUIColors.d.ts +349 -1
- package/lib/utils/commonUIColors.d.ts.map +1 -1
- package/lib/utils/commonUIColors.js +6 -2
- package/lib/utils/joinClassnames.d.ts +3 -0
- package/lib/utils/joinClassnames.d.ts.map +1 -0
- package/lib/utils/joinClassnames.js +26 -0
- package/lib/utils/useFirstMount.d.ts +2 -0
- package/lib/utils/useFirstMount.d.ts.map +1 -0
- package/lib/utils/useFirstMount.js +19 -0
- package/lib/utils/useUpdateEffect.d.ts +4 -0
- package/lib/utils/useUpdateEffect.d.ts.map +1 -0
- package/lib/utils/useUpdateEffect.js +28 -0
- package/package.json +2 -2
- package/CHANGELOG.md +0 -796
- package/lib/atoms/InputField/RequiredIcon.d.ts +0 -4
- package/lib/atoms/InputField/RequiredIcon.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
|
@@ -13,54 +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
|
-
|
|
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
|
+
}
|
|
73
|
+
|
|
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
|
+
});
|
|
65
86
|
});
|
|
66
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,8 +10,9 @@ 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
|
-
text: _reactDesc.PropTypes.string.description("The link's text."),
|
|
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'),
|
|
16
17
|
icon: _reactDesc.PropTypes.element.description('Which `iconix` icon to render.'),
|
|
17
18
|
iconPosition: _reactDesc.PropTypes.oneOf(['left', 'right']).description('In which side of the text the icon should be rendered.').defaultValue('left'),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FlattenSimpleInterpolation, SimpleInterpolation } from 'styled-components';
|
|
2
|
+
import { Color, IconPosition } 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: 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,EAAE,YAAY,EAAY,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,MAAM,OAAO,CAAC;AAMf,OAAO,EAAqB,KAAK,EAAE,MAAM,SAAS,CAAC;AAOnD,cAAc,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,MAAM,OAAO,CAAC;AAMf,OAAO,EAAqB,KAAK,EAAE,MAAM,SAAS,CAAC;AAOnD,cAAc,SAAS,CAAC;AAgHxB,QAAA,MAAM,WAAW,gFAAmB,CAAC;AAsBrC,eAAe,WAAW,CAAC"}
|
|
@@ -64,7 +64,8 @@ var Menu = function Menu(props, _ref) {
|
|
|
64
64
|
var _props$items = props.items,
|
|
65
65
|
items = _props$items === void 0 ? [] : _props$items,
|
|
66
66
|
onSelectItem = props.onSelectItem,
|
|
67
|
-
allowTab = props.allowTab
|
|
67
|
+
allowTab = props.allowTab,
|
|
68
|
+
actions = props.actions;
|
|
68
69
|
|
|
69
70
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
70
71
|
return items.reduce(function (acc, value) {
|
|
@@ -118,6 +119,7 @@ var Menu = function Menu(props, _ref) {
|
|
|
118
119
|
}
|
|
119
120
|
}, [allowTab]);
|
|
120
121
|
return _react.default.createElement(StyledMenu, {
|
|
122
|
+
actions: actions,
|
|
121
123
|
items: optionsListItems,
|
|
122
124
|
selectable: false,
|
|
123
125
|
multiple: false,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IconProps } from '@decisiv/iconix';
|
|
3
|
+
import { FooterActions } from '../../atoms/OptionsList/types';
|
|
3
4
|
export declare type MenuRef = HTMLUListElement;
|
|
4
5
|
export declare type MenuItemRef = HTMLDivElement | HTMLAnchorElement;
|
|
5
6
|
export declare type InputMethod = 'mouse' | 'keyboard' | undefined;
|
|
@@ -8,6 +9,7 @@ export interface Props {
|
|
|
8
9
|
items: MenuItem[];
|
|
9
10
|
onSelectItem?: (item: MenuItem) => void;
|
|
10
11
|
allowTab?: boolean;
|
|
12
|
+
actions?: FooterActions;
|
|
11
13
|
}
|
|
12
14
|
export interface MenuItem {
|
|
13
15
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,oBAAY,OAAO,GAAG,gBAAgB,CAAC;AACvC,oBAAY,WAAW,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAC7D,oBAAY,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,oBAAY,OAAO,GAAG,gBAAgB,CAAC;AACvC,oBAAY,WAAW,GAAG,cAAc,GAAG,iBAAiB,CAAC;AAC7D,oBAAY,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAE3D,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,oBAAY,aAAa,GAAG,QAAQ,GAAG;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,aAAa,GAAG;IAC9C,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC"}
|
|
@@ -46,7 +46,7 @@ export declare const Content: import("styled-components").StyledComponent<"div",
|
|
|
46
46
|
readonly LG: "LG";
|
|
47
47
|
readonly XL: "XL";
|
|
48
48
|
}> | undefined;
|
|
49
|
-
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "
|
|
49
|
+
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
|
|
50
50
|
readonly XS: "XS";
|
|
51
51
|
readonly SM: "SM";
|
|
52
52
|
readonly MD: "MD";
|
|
@@ -241,7 +241,7 @@ export declare const Footer: import("styled-components").StyledComponent<"div",
|
|
|
241
241
|
readonly LG: "LG";
|
|
242
242
|
readonly XL: "XL";
|
|
243
243
|
}> | undefined;
|
|
244
|
-
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "
|
|
244
|
+
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
|
|
245
245
|
readonly XS: "XS";
|
|
246
246
|
readonly SM: "SM";
|
|
247
247
|
readonly MD: "MD";
|
|
@@ -102,9 +102,9 @@ export declare const NotificationCard: import("styled-components").StyledCompone
|
|
|
102
102
|
}> & {
|
|
103
103
|
borderColor: string;
|
|
104
104
|
}, never>;
|
|
105
|
-
export declare const IconColumn: import("styled-components").StyledComponent<"div", any,
|
|
106
|
-
|
|
107
|
-
},
|
|
105
|
+
export declare const IconColumn: import("styled-components").StyledComponent<"div", any, {
|
|
106
|
+
right?: boolean | undefined;
|
|
107
|
+
}, never>;
|
|
108
108
|
export declare const CloseButton: import("styled-components").StyledComponent<import("react").RefForwardingComponent<HTMLButtonElement, ButtonProps>, any, ButtonProps, never>;
|
|
109
109
|
export declare const ActionButtonContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
110
110
|
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/Notification/components.ts"],"names":[],"mappings":";AAWA,OAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/Notification/components.ts"],"names":[],"mappings":";AAWA,OAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAInD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAa5B,CAAC;AAEF,eAAO,MAAM,UAAU;;SAOtB,CAAC;AAEF,eAAO,MAAM,WAAW,8IAEvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,oEAGjC,CAAC"}
|
|
@@ -15,7 +15,7 @@ var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"))
|
|
|
15
15
|
|
|
16
16
|
var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _utils = require("../../../utils");
|
|
19
19
|
|
|
20
20
|
var _skyPlane = _interopRequireDefault(require("../../../utils/skyPlane"));
|
|
21
21
|
|
|
@@ -23,6 +23,8 @@ var _Grid = _interopRequireDefault(require("../../Grid"));
|
|
|
23
23
|
|
|
24
24
|
var _Button = _interopRequireDefault(require("../../Button"));
|
|
25
25
|
|
|
26
|
+
var _constants = require("../constants");
|
|
27
|
+
|
|
26
28
|
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; } }
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -30,17 +32,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
30
32
|
var NotificationCard = (0, _styledComponents.default)(_Grid.default.Container).withConfig({
|
|
31
33
|
displayName: "components__NotificationCard",
|
|
32
34
|
componentId: "ds1zkc-0"
|
|
33
|
-
})(["background-color:", ";box-shadow:", ";border-radius:2px;width:", ";", ";"], (0, _toColorString.default)(_color.default.base.snowWhite), (0, _skyPlane.default)(2),
|
|
35
|
+
})(["background-color:", ";box-shadow:", ";border-radius:2px;width:", ";", ";"], (0, _toColorString.default)(_color.default.base.snowWhite), (0, _skyPlane.default)(2), _constants.NOTIFICATION_CARD_WIDTH, (0, _utils.applyDynamicModifiers)('borderColor', function (_ref) {
|
|
34
36
|
var borderColor = _ref.borderColor;
|
|
35
37
|
return (0, _styledComponents.css)(["border-left:2px solid ", ";"], borderColor);
|
|
36
38
|
}));
|
|
37
39
|
exports.NotificationCard = NotificationCard;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}).withConfig({
|
|
40
|
+
|
|
41
|
+
var IconColumn = _styledComponents.default.div.withConfig({
|
|
41
42
|
displayName: "components__IconColumn",
|
|
42
43
|
componentId: "ds1zkc-1"
|
|
43
|
-
})(["
|
|
44
|
+
})(["padding-left:", ";", ""], (0, _rem.default)(_spacing.default.base), function (_ref2) {
|
|
45
|
+
var _ref2$right = _ref2.right,
|
|
46
|
+
right = _ref2$right === void 0 ? false : _ref2$right;
|
|
47
|
+
return right && (0, _styledComponents.css)(["padding-right:", ";"], (0, _rem.default)(_spacing.default.base));
|
|
48
|
+
});
|
|
49
|
+
|
|
44
50
|
exports.IconColumn = IconColumn;
|
|
45
51
|
var CloseButton = (0, _styledComponents.default)(_Button.default).withConfig({
|
|
46
52
|
displayName: "components__CloseButton",
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import { TNotificationProps } from '../../../providers/NotificationsProvider/types';
|
|
3
4
|
declare function Notification(props: TNotificationProps): JSX.Element;
|
|
4
5
|
declare namespace Notification {
|
|
5
|
-
var propTypes:
|
|
6
|
-
var defaultProps:
|
|
7
|
-
actions: undefined;
|
|
8
|
-
children: null;
|
|
9
|
-
icon: undefined;
|
|
10
|
-
};
|
|
6
|
+
var propTypes: PropTypes.ValidationMap<TNotificationProps>;
|
|
7
|
+
var defaultProps: Partial<TNotificationProps>;
|
|
11
8
|
var displayName: string;
|
|
12
9
|
}
|
|
13
10
|
export default Notification;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/Notification/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Notifications/Notification/index.tsx"],"names":[],"mappings":";AAGA,OAAO,SAA4B,MAAM,YAAY,CAAC;AAMtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAwBpF,iBAAS,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAuG5D;kBAvGQ,YAAY;;;;;AA8HrB,eAAe,YAAY,CAAC"}
|
|
@@ -72,6 +72,8 @@ function Notification(props) {
|
|
|
72
72
|
_props$intent = props.intent,
|
|
73
73
|
intent = _props$intent === void 0 ? _constants.intentNames.information : _props$intent,
|
|
74
74
|
onClose = props.onClose,
|
|
75
|
+
onFocus = props.onFocus,
|
|
76
|
+
onHover = props.onHover,
|
|
75
77
|
title = props.title;
|
|
76
78
|
var translate = (0, _useTranslations.default)();
|
|
77
79
|
|
|
@@ -91,13 +93,15 @@ function Notification(props) {
|
|
|
91
93
|
id: id,
|
|
92
94
|
borderColor: accentColor,
|
|
93
95
|
margin: 0,
|
|
94
|
-
padding: 1.5
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}, Icon), _react.default.createElement(_Grid.default.Column, null, _react.default.createElement(_Grid.default.Row, null, _react.default.createElement(_Grid.default.Column, null, _react.default.createElement(_Typography.P, {
|
|
96
|
+
padding: 1.5,
|
|
97
|
+
onFocus: onFocus,
|
|
98
|
+
onMouseOver: onHover
|
|
99
|
+
}, _react.default.createElement(_Grid.default.Row, null, _react.default.createElement(_components.IconColumn, null, Icon), _react.default.createElement(_Grid.default.Column, null, _react.default.createElement(_Grid.default.Row, null, _react.default.createElement(_Grid.default.Column, null, _react.default.createElement(_Typography.P, {
|
|
98
100
|
shade: 0,
|
|
99
101
|
weight: "semibold"
|
|
100
|
-
}, title)), _react.default.createElement(_components.IconColumn,
|
|
102
|
+
}, title)), onClose && _react.default.createElement(_components.IconColumn, {
|
|
103
|
+
right: true
|
|
104
|
+
}, _react.default.createElement(_Tooltip.default, {
|
|
101
105
|
target: // eslint-disable-next-line react/jsx-wrap-multilines
|
|
102
106
|
_react.default.createElement(_components.CloseButton, {
|
|
103
107
|
"aria-label": translate(closeHint, 'notification.closeHint'),
|
|
@@ -120,21 +124,24 @@ function Notification(props) {
|
|
|
120
124
|
key: action.text
|
|
121
125
|
}, _react.default.createElement(_Button.default, _extends({}, (0, _omit.default)(action, ['kind', 'size', 'variant']), actionProps[index])));
|
|
122
126
|
}))))));
|
|
123
|
-
}
|
|
127
|
+
}
|
|
124
128
|
|
|
125
|
-
|
|
126
|
-
Notification.propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
129
|
+
var propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
127
130
|
actions: _proptypeValidators.actionsValidator,
|
|
128
|
-
children: _propTypes.default.
|
|
131
|
+
children: _propTypes.default.node,
|
|
129
132
|
icon: _propTypes.default.elementType,
|
|
130
133
|
id: _propTypes.default.string.isRequired,
|
|
131
|
-
onClose: _propTypes.default.func
|
|
134
|
+
onClose: _propTypes.default.func
|
|
132
135
|
});
|
|
133
|
-
|
|
136
|
+
|
|
137
|
+
var defaultProps = {
|
|
134
138
|
actions: undefined,
|
|
135
139
|
children: null,
|
|
136
|
-
icon: undefined
|
|
140
|
+
icon: undefined,
|
|
141
|
+
onClose: undefined
|
|
137
142
|
};
|
|
143
|
+
Notification.propTypes = propTypes;
|
|
144
|
+
Notification.defaultProps = defaultProps;
|
|
138
145
|
Notification.displayName = 'Notification';
|
|
139
146
|
var _default = Notification;
|
|
140
147
|
exports.default = _default;
|