@decisiv/ui-components 2.0.1-alpha.17 → 2.0.1-alpha.173
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/{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/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 +52 -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/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/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 +41 -22
- 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/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 +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/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/index.d.ts +8 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +126 -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/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/Tabs/types.js +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/{schema.tab.js → Tab/schema.js} +0 -0
|
@@ -29,10 +29,12 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
29
29
|
|
|
30
30
|
var _composeReactRefs = _interopRequireDefault(require("@seznam/compose-react-refs"));
|
|
31
31
|
|
|
32
|
-
var _canUseDOM = _interopRequireDefault(require("../../utils/canUseDOM"));
|
|
33
|
-
|
|
34
32
|
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
35
33
|
|
|
34
|
+
var _Grid = _interopRequireDefault(require("../Grid"));
|
|
35
|
+
|
|
36
|
+
var _propTypes2 = require("./propTypes");
|
|
37
|
+
|
|
36
38
|
var _schema = _interopRequireDefault(require("./schema"));
|
|
37
39
|
|
|
38
40
|
var _types = require("../../atoms/OptionsList/types");
|
|
@@ -41,6 +43,8 @@ var _OptionsList = _interopRequireWildcard(require("../../atoms/OptionsList"));
|
|
|
41
43
|
|
|
42
44
|
var _types2 = _interopRequireWildcard(require("./types"));
|
|
43
45
|
|
|
46
|
+
var _canUseDOM = _interopRequireDefault(require("../../utils/canUseDOM"));
|
|
47
|
+
|
|
44
48
|
var _focusWithoutScrolling = _interopRequireDefault(require("../../utils/focusWithoutScrolling"));
|
|
45
49
|
|
|
46
50
|
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; } }
|
|
@@ -68,10 +72,12 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
68
72
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
69
73
|
|
|
70
74
|
function DropdownList(props) {
|
|
71
|
-
var
|
|
75
|
+
var actions = props.actions,
|
|
76
|
+
borderRadius = props.borderRadius,
|
|
72
77
|
containerSelector = props.containerSelector,
|
|
73
78
|
defaultSelectedIds = props.defaultSelectedIds,
|
|
74
79
|
defaultVisible = props.defaultVisible,
|
|
80
|
+
defaultFooter = props.defaultFooter,
|
|
75
81
|
_props$focusOnShowing = props.focusOnShowing,
|
|
76
82
|
focusOnShowing = _props$focusOnShowing === void 0 ? true : _props$focusOnShowing,
|
|
77
83
|
listRef = props.listRef,
|
|
@@ -89,7 +95,7 @@ function DropdownList(props) {
|
|
|
89
95
|
maxHeight = props.maxHeight,
|
|
90
96
|
maxWidth = props.maxWidth,
|
|
91
97
|
minWidth = props.minWidth,
|
|
92
|
-
rest = _objectWithoutProperties(props, ["borderRadius", "containerSelector", "defaultSelectedIds", "defaultVisible", "focusOnShowing", "listRef", "onChange", "onHide", "onShow", "placement", "selectedIds", "showArrow", "target", "visible", "zIndex", "PanelComponent", "maxHeight", "maxWidth", "minWidth"]); // Use a ref callback to get more control over re-rendering when a ref is stored.
|
|
98
|
+
rest = _objectWithoutProperties(props, ["actions", "borderRadius", "containerSelector", "defaultSelectedIds", "defaultVisible", "defaultFooter", "focusOnShowing", "listRef", "onChange", "onHide", "onShow", "placement", "selectedIds", "showArrow", "target", "visible", "zIndex", "PanelComponent", "maxHeight", "maxWidth", "minWidth"]); // Use a ref callback to get more control over re-rendering when a ref is stored.
|
|
93
99
|
// Specifically, the scroll to selected item on first render of dropdown requires this.
|
|
94
100
|
|
|
95
101
|
|
|
@@ -104,8 +110,18 @@ function DropdownList(props) {
|
|
|
104
110
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
105
111
|
showing = _useState4[0],
|
|
106
112
|
setShowing = _useState4[1];
|
|
113
|
+
|
|
114
|
+
var _useState5 = (0, _react.useState)(selectedIdsProp),
|
|
115
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
116
|
+
selected = _useState6[0],
|
|
117
|
+
setSelected = _useState6[1];
|
|
118
|
+
|
|
119
|
+
var _useState7 = (0, _react.useState)(selectedIdsProp),
|
|
120
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
121
|
+
saved = _useState8[0],
|
|
122
|
+
setSaved = _useState8[1];
|
|
107
123
|
/**
|
|
108
|
-
* If the visible prop changes, it should always override any locally maintained current value.
|
|
124
|
+
* If the visible or selected prop changes, it should always override any locally maintained current value.
|
|
109
125
|
* This allows the component to be controlled.
|
|
110
126
|
*/
|
|
111
127
|
|
|
@@ -114,16 +130,22 @@ function DropdownList(props) {
|
|
|
114
130
|
if (typeof visible === 'boolean' && visible !== showing) {
|
|
115
131
|
setShowing(visible);
|
|
116
132
|
}
|
|
117
|
-
|
|
133
|
+
|
|
134
|
+
if (typeof selectedIdsProp !== 'undefined' && selectedIdsProp !== selected) {
|
|
135
|
+
setSelected(selectedIdsProp);
|
|
136
|
+
}
|
|
137
|
+
}, [visible, showing, selectedIdsProp, selected]);
|
|
118
138
|
var handleOnHide = (0, _react.useCallback)(function (event) {
|
|
119
139
|
setShowing(false);
|
|
140
|
+
setSelected([]);
|
|
120
141
|
onHide && onHide(event);
|
|
121
142
|
popRef && popRef.current && popRef.current.targetNode && popRef.current.targetNode.focus();
|
|
122
143
|
}, [onHide]);
|
|
123
144
|
var handleOnShow = (0, _react.useCallback)(function (event) {
|
|
145
|
+
setSelected(saved);
|
|
124
146
|
setShowing(true);
|
|
125
147
|
onShow && onShow(event);
|
|
126
|
-
}, [onShow]);
|
|
148
|
+
}, [onShow, setSelected, saved]);
|
|
127
149
|
(0, _react.useEffect)(function () {
|
|
128
150
|
if (containerRef && focusOnShowing && showing) {
|
|
129
151
|
(0, _focusWithoutScrolling.default)(containerRef);
|
|
@@ -136,13 +158,49 @@ function DropdownList(props) {
|
|
|
136
158
|
|
|
137
159
|
var handleOnChange = (0, _react.useCallback)(function (selection) {
|
|
138
160
|
onChange && onChange(Array.isArray(selection) ? selection : [selection]);
|
|
139
|
-
|
|
161
|
+
defaultFooter && setSelected(selection) && setSaved(selection);
|
|
162
|
+
}, [onChange, setSelected, setSaved, defaultFooter]);
|
|
163
|
+
var handleOnApply = (0, _react.useCallback)(function () {
|
|
164
|
+
setSaved(selected);
|
|
165
|
+
popRef && popRef.current && popRef.current.hide();
|
|
166
|
+
}, [setSaved, selected]);
|
|
167
|
+
|
|
168
|
+
var handleOnCancel = function handleOnCancel() {
|
|
169
|
+
popRef && popRef.current && popRef.current.hide();
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
var handleOnClear = function handleOnClear() {
|
|
173
|
+
setSaved([]);
|
|
174
|
+
setSelected([]);
|
|
175
|
+
};
|
|
176
|
+
|
|
140
177
|
var onKeyDown = (0, _react.useCallback)(function (event) {
|
|
141
178
|
if (event.key === 'Tab') {
|
|
142
179
|
event.preventDefault();
|
|
143
180
|
event.stopPropagation();
|
|
144
181
|
}
|
|
145
182
|
}, []);
|
|
183
|
+
var defaultActions = {
|
|
184
|
+
left: [{
|
|
185
|
+
id: '1',
|
|
186
|
+
text: 'apply',
|
|
187
|
+
onClick: handleOnApply
|
|
188
|
+
}, {
|
|
189
|
+
id: '2',
|
|
190
|
+
text: 'cancel',
|
|
191
|
+
kind: 'secondary',
|
|
192
|
+
onClick: handleOnCancel
|
|
193
|
+
}],
|
|
194
|
+
right: [{
|
|
195
|
+
id: '3',
|
|
196
|
+
text: 'clear',
|
|
197
|
+
variant: 'ghost',
|
|
198
|
+
kind: 'secondary',
|
|
199
|
+
intent: 'danger',
|
|
200
|
+
onClick: handleOnClear
|
|
201
|
+
}]
|
|
202
|
+
};
|
|
203
|
+
var footerActions = defaultFooter ? actions || defaultActions : actions;
|
|
146
204
|
return _react.default.createElement(_Popover.default, {
|
|
147
205
|
borderRadius: borderRadius,
|
|
148
206
|
containerSelector: containerSelector,
|
|
@@ -160,20 +218,23 @@ function DropdownList(props) {
|
|
|
160
218
|
maxHeight: maxHeight,
|
|
161
219
|
maxWidth: maxWidth,
|
|
162
220
|
minWidth: minWidth
|
|
163
|
-
}, _react.default.createElement(PanelComponent, null)) : _react.default.createElement(_OptionsList.default, _extends({
|
|
221
|
+
}, _react.default.createElement(PanelComponent, null)) : _react.default.createElement(_Grid.default.Container, null, _react.default.createElement(_Grid.default.Row, null, _react.default.createElement(_OptionsList.default, _extends({
|
|
222
|
+
actions: footerActions,
|
|
164
223
|
defaultSelected: defaultSelectedIds,
|
|
165
|
-
selected:
|
|
224
|
+
selected: selected,
|
|
166
225
|
onChange: handleOnChange,
|
|
167
226
|
ref: listRef ? (0, _composeReactRefs.default)(listRef, setContainerRefFunc) : setContainerRefFunc,
|
|
168
227
|
onKeyDown: onKeyDown,
|
|
169
228
|
maxHeight: maxHeight,
|
|
170
229
|
maxWidth: maxWidth,
|
|
171
230
|
minWidth: minWidth
|
|
172
|
-
}, rest)));
|
|
231
|
+
}, rest)))));
|
|
173
232
|
}
|
|
174
233
|
|
|
175
234
|
DropdownList.displayName = 'DropdownList';
|
|
176
235
|
DropdownList.propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
236
|
+
actions: _propTypes2.footerValidator,
|
|
237
|
+
defaultFooter: _propTypes2.footerValidator,
|
|
177
238
|
target: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.element, _propTypes.default.shape({
|
|
178
239
|
current: _propTypes.default.instanceOf(
|
|
179
240
|
/* istanbul ignore next didn't test a non DOM env */
|
|
@@ -181,5 +242,9 @@ DropdownList.propTypes = _objectSpread({}, _schema.default.propTypes, {
|
|
|
181
242
|
_canUseDOM.default ? Element : function Element() {})
|
|
182
243
|
})]).isRequired
|
|
183
244
|
});
|
|
245
|
+
DropdownList.defaultProps = {
|
|
246
|
+
actions: undefined,
|
|
247
|
+
defaultFooter: false
|
|
248
|
+
};
|
|
184
249
|
var _default = DropdownList;
|
|
185
250
|
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propTypes.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/propTypes.ts"],"names":[],"mappings":"AAGA,OAAO,iBAAiB,MAAM,SAAS,CAAC;AAExC,iBAAS,eAAe,CACtB,KAAK,EAAE,iBAAiB,EACxB,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,aAAa,EAAE,cAAc,GAC5B,KAAK,GAAG,IAAI,CAgDd;AAGD,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.footerValidator = footerValidator;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _Button = require("../Button");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
function footerValidator(props, propName, componentName) {
|
|
17
|
+
var defaultFooter = props.defaultFooter,
|
|
18
|
+
actions = props.actions;
|
|
19
|
+
|
|
20
|
+
if (!!defaultFooter && !!actions) {
|
|
21
|
+
return new Error("Both `defaultFooter` and `actions` are supplied to `".concat(componentName, "`. `defaultFooter` will not be used"));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (defaultFooter) {
|
|
25
|
+
_propTypes.default.checkPropTypes(_defineProperty({}, propName, _propTypes.default.bool), props, propName, componentName);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (actions) {
|
|
29
|
+
_propTypes.default.checkPropTypes(_defineProperty({}, propName, _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
30
|
+
id: _propTypes.default.string.isRequired
|
|
31
|
+
}))), _propTypes.default.shape({
|
|
32
|
+
left: _propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
33
|
+
id: _propTypes.default.string.isRequired
|
|
34
|
+
}))),
|
|
35
|
+
right: _propTypes.default.arrayOf(_propTypes.default.shape((0, _Button.makeButtonSchemaPropTypes)({
|
|
36
|
+
id: _propTypes.default.string.isRequired
|
|
37
|
+
})))
|
|
38
|
+
})])), props, propName, componentName);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return null;
|
|
42
|
+
} // eslint-disable-next-line import/prefer-default-export
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAA4C,CAAC;AA4GzD,eAAe,MAAM,CAAC"}
|
|
@@ -26,6 +26,7 @@ schema.propTypes = _objectSpread({}, (0, _omit.default)(_schema.default.makeProp
|
|
|
26
26
|
containerSelector: _reactDesc.PropTypes.string.description('A CSS selector to the element where the popovers should be rendered in, or "parent" to render the popover in-place.').defaultValue('body'),
|
|
27
27
|
defaultSelectedIds: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.string, _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.string)]).description('These IDs will appear as selected the first time the user opens the dropdown.'),
|
|
28
28
|
defaultVisible: _reactDesc.PropTypes.bool.description('Controls if the dropdown list should be opened by default.'),
|
|
29
|
+
defaultFooter: _reactDesc.PropTypes.bool.description('Controls if the dropdown list uses the OptionsList footer with default actions').defaultValue('false'),
|
|
29
30
|
items: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.shape({
|
|
30
31
|
decoration: _reactDesc.PropTypes.shape({
|
|
31
32
|
type: _reactDesc.PropTypes.oneOf(['Avatar', 'Badge'])
|
|
@@ -36,7 +37,7 @@ schema.propTypes = _objectSpread({}, (0, _omit.default)(_schema.default.makeProp
|
|
|
36
37
|
value: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.number, _reactDesc.PropTypes.string]).description('The value for an option in the dropdown list.')
|
|
37
38
|
})).description('The array of item data that will be rendered').isRequired,
|
|
38
39
|
listRef: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.func, _reactDesc.PropTypes.shape({
|
|
39
|
-
current: _reactDesc.PropTypes.
|
|
40
|
+
current: _reactDesc.PropTypes.any
|
|
40
41
|
})]).description('A ref for the list container.'),
|
|
41
42
|
name: _reactDesc.PropTypes.string.description("The input's name, to identify the input in the data in a form.").isRequired,
|
|
42
43
|
onChange: _reactDesc.PropTypes.func.description('Change event handler, called with an array of the selected item IDs.'),
|
|
@@ -49,6 +50,10 @@ schema.propTypes = _objectSpread({}, (0, _omit.default)(_schema.default.makeProp
|
|
|
49
50
|
placement: _reactDesc.PropTypes.string.description('The preferred side of the target the popover should attach to. See notes on Popover.').defaultValue('bottom-start'),
|
|
50
51
|
visible: _reactDesc.PropTypes.bool.description('Used when component is controlled. Controls the display status of the dropdown.'),
|
|
51
52
|
renderOptionLabel: _reactDesc.PropTypes.func.description('Function to customize render of option labels, called with the item value'),
|
|
53
|
+
actions: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object), _reactDesc.PropTypes.shape({
|
|
54
|
+
left: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object),
|
|
55
|
+
right: _reactDesc.PropTypes.arrayOf(_reactDesc.PropTypes.object)
|
|
56
|
+
})]).description('A collection of objects, each containing a subset of props valid for a Button component. Check the notes on the OptionsList.'),
|
|
52
57
|
zIndex: _reactDesc.PropTypes.number.description('Sets the z-index style property of the options list'),
|
|
53
58
|
PanelComponent: _reactDesc.PropTypes.any.description('A React component that, if provided, is rendered in place of the items. Useful for loading/ no matches type messages and similar.')
|
|
54
59
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Ref, ComponentType } from 'react';
|
|
2
2
|
import { PopoverProps, Target as PopoverTarget } from '../Popover';
|
|
3
|
-
import { OptionsListProps, ItemOption, Category } from '../../atoms/OptionsList/types';
|
|
3
|
+
import { FooterActions, OptionsListProps, ItemOption, Category } from '../../atoms/OptionsList/types';
|
|
4
4
|
export declare type DropdownListItem = ItemOption | Category;
|
|
5
5
|
export default interface Props extends Omit<OptionsListProps, 'defaultSelected' | 'items' | 'name' | 'onChange' | 'onKeyDown' | 'selected' | 'selectable' | 'tabIndex'> {
|
|
6
6
|
containerSelector?: string;
|
|
7
7
|
defaultSelectedIds?: string | string[];
|
|
8
8
|
defaultVisible?: boolean;
|
|
9
|
+
defaultFooter?: boolean;
|
|
9
10
|
focusOnShowing?: boolean;
|
|
10
11
|
items: DropdownListItem[];
|
|
11
12
|
listRef?: Ref<HTMLUListElement>;
|
|
@@ -15,8 +16,10 @@ export default interface Props extends Omit<OptionsListProps, 'defaultSelected'
|
|
|
15
16
|
onShow?: (event?: Event) => void;
|
|
16
17
|
placement?: PopoverProps['placement'];
|
|
17
18
|
selectedIds?: string | string[];
|
|
19
|
+
showCheckbox?: boolean;
|
|
18
20
|
showArrow?: boolean;
|
|
19
21
|
target: PopoverTarget;
|
|
22
|
+
actions?: FooterActions;
|
|
20
23
|
visible?: boolean;
|
|
21
24
|
zIndex?: PopoverProps['zIndex'];
|
|
22
25
|
PanelComponent?: ComponentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACT,MAAM,+BAA+B,CAAC;AAEvC,oBAAY,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAErD,MAAM,CAAC,OAAO,WAAW,KACvB,SAAQ,IAAI,CACV,gBAAgB,EACd,iBAAiB,GACjB,OAAO,GACP,MAAM,GACN,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,UAAU,CACb;IACD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownList/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACT,MAAM,+BAA+B,CAAC;AAEvC,oBAAY,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAErD,MAAM,CAAC,OAAO,WAAW,KACvB,SAAQ,IAAI,CACV,gBAAgB,EACd,iBAAiB,GACjB,OAAO,GACP,MAAM,GACN,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,UAAU,CACb;IACD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterProps } from '../types';
|
|
3
|
+
declare const IconWrapper: import("styled-components").StyledComponent<"div", any, Partial<{
|
|
4
|
+
readonly alignContent?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
5
|
+
readonly XS: "XS";
|
|
6
|
+
readonly SM: "SM";
|
|
7
|
+
readonly MD: "MD";
|
|
8
|
+
readonly LG: "LG";
|
|
9
|
+
readonly XL: "XL";
|
|
10
|
+
}> | undefined;
|
|
11
|
+
readonly alignItems?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
12
|
+
readonly XS: "XS";
|
|
13
|
+
readonly SM: "SM";
|
|
14
|
+
readonly MD: "MD";
|
|
15
|
+
readonly LG: "LG";
|
|
16
|
+
readonly XL: "XL";
|
|
17
|
+
}> | undefined;
|
|
18
|
+
readonly alignSelf?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
19
|
+
readonly XS: "XS";
|
|
20
|
+
readonly SM: "SM";
|
|
21
|
+
readonly MD: "MD";
|
|
22
|
+
readonly LG: "LG";
|
|
23
|
+
readonly XL: "XL";
|
|
24
|
+
}> | undefined;
|
|
25
|
+
readonly flex?: string | number | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("react").ReactText, {
|
|
26
|
+
readonly XS: "XS";
|
|
27
|
+
readonly SM: "SM";
|
|
28
|
+
readonly MD: "MD";
|
|
29
|
+
readonly LG: "LG";
|
|
30
|
+
readonly XL: "XL";
|
|
31
|
+
}> | undefined;
|
|
32
|
+
readonly flexBasis?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
33
|
+
readonly XS: "XS";
|
|
34
|
+
readonly SM: "SM";
|
|
35
|
+
readonly MD: "MD";
|
|
36
|
+
readonly LG: "LG";
|
|
37
|
+
readonly XL: "XL";
|
|
38
|
+
}> | undefined;
|
|
39
|
+
readonly flexDirection?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexDirectionProperty, {
|
|
40
|
+
readonly XS: "XS";
|
|
41
|
+
readonly SM: "SM";
|
|
42
|
+
readonly MD: "MD";
|
|
43
|
+
readonly LG: "LG";
|
|
44
|
+
readonly XL: "XL";
|
|
45
|
+
}> | undefined;
|
|
46
|
+
readonly flexGrow?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
47
|
+
readonly XS: "XS";
|
|
48
|
+
readonly SM: "SM";
|
|
49
|
+
readonly MD: "MD";
|
|
50
|
+
readonly LG: "LG";
|
|
51
|
+
readonly XL: "XL";
|
|
52
|
+
}> | undefined;
|
|
53
|
+
readonly flexShrink?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
54
|
+
readonly XS: "XS";
|
|
55
|
+
readonly SM: "SM";
|
|
56
|
+
readonly MD: "MD";
|
|
57
|
+
readonly LG: "LG";
|
|
58
|
+
readonly XL: "XL";
|
|
59
|
+
}> | undefined;
|
|
60
|
+
readonly flexWrap?: "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | "nowrap" | "wrap" | "wrap-reverse" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").FlexWrapProperty, {
|
|
61
|
+
readonly XS: "XS";
|
|
62
|
+
readonly SM: "SM";
|
|
63
|
+
readonly MD: "MD";
|
|
64
|
+
readonly LG: "LG";
|
|
65
|
+
readonly XL: "XL";
|
|
66
|
+
}> | undefined;
|
|
67
|
+
readonly justifyContent?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
68
|
+
readonly XS: "XS";
|
|
69
|
+
readonly SM: "SM";
|
|
70
|
+
readonly MD: "MD";
|
|
71
|
+
readonly LG: "LG";
|
|
72
|
+
readonly XL: "XL";
|
|
73
|
+
}> | undefined;
|
|
74
|
+
readonly justifyItems?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
75
|
+
readonly XS: "XS";
|
|
76
|
+
readonly SM: "SM";
|
|
77
|
+
readonly MD: "MD";
|
|
78
|
+
readonly LG: "LG";
|
|
79
|
+
readonly XL: "XL";
|
|
80
|
+
}> | undefined;
|
|
81
|
+
readonly justifySelf?: string | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
82
|
+
readonly XS: "XS";
|
|
83
|
+
readonly SM: "SM";
|
|
84
|
+
readonly MD: "MD";
|
|
85
|
+
readonly LG: "LG";
|
|
86
|
+
readonly XL: "XL";
|
|
87
|
+
}> | undefined;
|
|
88
|
+
readonly order?: number | "-moz-initial" | "inherit" | "initial" | "revert" | "unset" | import("../../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<import("csstype").GlobalsNumber, {
|
|
89
|
+
readonly XS: "XS";
|
|
90
|
+
readonly SM: "SM";
|
|
91
|
+
readonly MD: "MD";
|
|
92
|
+
readonly LG: "LG";
|
|
93
|
+
readonly XL: "XL";
|
|
94
|
+
}> | undefined;
|
|
95
|
+
readonly size?: "XS" | "SM" | "MD" | "LG" | "XL" | undefined;
|
|
96
|
+
}> & Partial<{
|
|
97
|
+
readonly margin: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
98
|
+
readonly XS: "XS";
|
|
99
|
+
readonly SM: "SM";
|
|
100
|
+
readonly MD: "MD";
|
|
101
|
+
readonly LG: "LG";
|
|
102
|
+
readonly XL: "XL";
|
|
103
|
+
}>;
|
|
104
|
+
readonly marginBottom: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
105
|
+
readonly XS: "XS";
|
|
106
|
+
readonly SM: "SM";
|
|
107
|
+
readonly MD: "MD";
|
|
108
|
+
readonly LG: "LG";
|
|
109
|
+
readonly XL: "XL";
|
|
110
|
+
}>;
|
|
111
|
+
readonly marginLeft: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
112
|
+
readonly XS: "XS";
|
|
113
|
+
readonly SM: "SM";
|
|
114
|
+
readonly MD: "MD";
|
|
115
|
+
readonly LG: "LG";
|
|
116
|
+
readonly XL: "XL";
|
|
117
|
+
}>;
|
|
118
|
+
readonly marginRight: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
119
|
+
readonly XS: "XS";
|
|
120
|
+
readonly SM: "SM";
|
|
121
|
+
readonly MD: "MD";
|
|
122
|
+
readonly LG: "LG";
|
|
123
|
+
readonly XL: "XL";
|
|
124
|
+
}>;
|
|
125
|
+
readonly marginTop: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
126
|
+
readonly XS: "XS";
|
|
127
|
+
readonly SM: "SM";
|
|
128
|
+
readonly MD: "MD";
|
|
129
|
+
readonly LG: "LG";
|
|
130
|
+
readonly XL: "XL";
|
|
131
|
+
}>;
|
|
132
|
+
readonly marginX: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
133
|
+
readonly XS: "XS";
|
|
134
|
+
readonly SM: "SM";
|
|
135
|
+
readonly MD: "MD";
|
|
136
|
+
readonly LG: "LG";
|
|
137
|
+
readonly XL: "XL";
|
|
138
|
+
}>;
|
|
139
|
+
readonly marginY: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
140
|
+
readonly XS: "XS";
|
|
141
|
+
readonly SM: "SM";
|
|
142
|
+
readonly MD: "MD";
|
|
143
|
+
readonly LG: "LG";
|
|
144
|
+
readonly XL: "XL";
|
|
145
|
+
}>;
|
|
146
|
+
readonly padding: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
147
|
+
readonly XS: "XS";
|
|
148
|
+
readonly SM: "SM";
|
|
149
|
+
readonly MD: "MD";
|
|
150
|
+
readonly LG: "LG";
|
|
151
|
+
readonly XL: "XL";
|
|
152
|
+
}>;
|
|
153
|
+
readonly paddingBottom: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
154
|
+
readonly XS: "XS";
|
|
155
|
+
readonly SM: "SM";
|
|
156
|
+
readonly MD: "MD";
|
|
157
|
+
readonly LG: "LG";
|
|
158
|
+
readonly XL: "XL";
|
|
159
|
+
}>;
|
|
160
|
+
readonly paddingLeft: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
161
|
+
readonly XS: "XS";
|
|
162
|
+
readonly SM: "SM";
|
|
163
|
+
readonly MD: "MD";
|
|
164
|
+
readonly LG: "LG";
|
|
165
|
+
readonly XL: "XL";
|
|
166
|
+
}>;
|
|
167
|
+
readonly paddingRight: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
168
|
+
readonly XS: "XS";
|
|
169
|
+
readonly SM: "SM";
|
|
170
|
+
readonly MD: "MD";
|
|
171
|
+
readonly LG: "LG";
|
|
172
|
+
readonly XL: "XL";
|
|
173
|
+
}>;
|
|
174
|
+
readonly paddingTop: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
175
|
+
readonly XS: "XS";
|
|
176
|
+
readonly SM: "SM";
|
|
177
|
+
readonly MD: "MD";
|
|
178
|
+
readonly LG: "LG";
|
|
179
|
+
readonly XL: "XL";
|
|
180
|
+
}>;
|
|
181
|
+
readonly paddingX: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
182
|
+
readonly XS: "XS";
|
|
183
|
+
readonly SM: "SM";
|
|
184
|
+
readonly MD: "MD";
|
|
185
|
+
readonly LG: "LG";
|
|
186
|
+
readonly XL: "XL";
|
|
187
|
+
}>;
|
|
188
|
+
readonly paddingY: import("../../../utils/dynamicModifiers").DynamicModifiersProp<number, {
|
|
189
|
+
readonly XS: "XS";
|
|
190
|
+
readonly SM: "SM";
|
|
191
|
+
readonly MD: "MD";
|
|
192
|
+
readonly LG: "LG";
|
|
193
|
+
readonly XL: "XL";
|
|
194
|
+
}>;
|
|
195
|
+
}> & Pick<FilterProps, "badgeColor">, never>;
|
|
196
|
+
export default IconWrapper;
|
|
197
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/IconWrapper/index.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAgBvC,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAOhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
11
|
+
|
|
12
|
+
var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
|
|
13
|
+
|
|
14
|
+
var _Flex = _interopRequireDefault(require("../../Flex"));
|
|
15
|
+
|
|
16
|
+
var _color = _interopRequireDefault(require("../../../modifiers/color"));
|
|
17
|
+
|
|
18
|
+
var _utils = require("../../../utils");
|
|
19
|
+
|
|
20
|
+
var _commonUIColors = require("../../../utils/commonUIColors");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
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; } }
|
|
25
|
+
|
|
26
|
+
var colorModifiers = (0, _utils.applyDynamicModifiers)('badgeColor', function (_ref) {
|
|
27
|
+
var badgeColor = _ref.badgeColor;
|
|
28
|
+
return (0, _styledComponents.css)(["", ";"], badgeColor && badgeColor in _commonUIColors.commonUIColors && (0, _color.default)(_commonUIColors.commonUIColors[badgeColor]));
|
|
29
|
+
});
|
|
30
|
+
var IconWrapper = (0, _styledComponents.default)(_Flex.default).withConfig({
|
|
31
|
+
displayName: "IconWrapper",
|
|
32
|
+
componentId: "sc-1e8ws53-0"
|
|
33
|
+
})(["width:", ";height:", ";padding:", ";border-radius:2px;", ";", ";"], (0, _rem.default)(_spacing.default.base * 2), (0, _rem.default)(_spacing.default.base * 2), (0, _rem.default)(_spacing.default.base * 0.4), (0, _color.default)(_commonUIColors.commonUIColors.information), colorModifiers);
|
|
34
|
+
var _default = IconWrapper;
|
|
35
|
+
exports.default = _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { IconProps } from '@decisiv/iconix';
|
|
4
|
+
import { CommonUIColorKeys } from '../../../utils/commonUIColors';
|
|
5
|
+
declare type IconComponent = (props: IconProps) => JSX.Element;
|
|
6
|
+
interface Props {
|
|
7
|
+
'aria-label': string;
|
|
8
|
+
active: boolean;
|
|
9
|
+
text: string;
|
|
10
|
+
count: number;
|
|
11
|
+
badgeIcon?: IconComponent;
|
|
12
|
+
badgeColor?: CommonUIColorKeys;
|
|
13
|
+
}
|
|
14
|
+
declare const FilterSimplePrimary: {
|
|
15
|
+
({ "aria-label": ariaLabel, active, text, badgeIcon: Icon, badgeColor, count, }: Props): JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
active: PropTypes.Requireable<boolean>;
|
|
18
|
+
count: PropTypes.Requireable<number>;
|
|
19
|
+
text: PropTypes.Validator<string>;
|
|
20
|
+
badgeColor: PropTypes.Requireable<string>;
|
|
21
|
+
badgeIcon: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
22
|
+
};
|
|
23
|
+
defaultProps: {
|
|
24
|
+
active: null;
|
|
25
|
+
count: undefined;
|
|
26
|
+
badgeColor: string;
|
|
27
|
+
badgeIcon: null;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default FilterSimplePrimary;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Filter/SimplePrimary/index.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,aAAK,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAEvD,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;CAsBxB,CAAC;AAiBF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
13
|
+
|
|
14
|
+
var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
|
|
15
|
+
|
|
16
|
+
var _IconWrapper = _interopRequireDefault(require("../IconWrapper"));
|
|
17
|
+
|
|
18
|
+
var _StyledLabel = _interopRequireDefault(require("../StyledLabel"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
var FilterSimplePrimary = function FilterSimplePrimary(_ref) {
|
|
23
|
+
var ariaLabel = _ref['aria-label'],
|
|
24
|
+
active = _ref.active,
|
|
25
|
+
text = _ref.text,
|
|
26
|
+
Icon = _ref.badgeIcon,
|
|
27
|
+
_ref$badgeColor = _ref.badgeColor,
|
|
28
|
+
badgeColor = _ref$badgeColor === void 0 ? 'information' : _ref$badgeColor,
|
|
29
|
+
count = _ref.count;
|
|
30
|
+
var buttonText = isNaN(count) ? text : "".concat(count, " ").concat(text);
|
|
31
|
+
return _react.default.createElement(_react.default.Fragment, null, Icon && _react.default.createElement(_IconWrapper.default, {
|
|
32
|
+
badgeColor: badgeColor
|
|
33
|
+
}, _react.default.createElement(Icon, {
|
|
34
|
+
size: "small",
|
|
35
|
+
role: "img",
|
|
36
|
+
"aria-label": ariaLabel
|
|
37
|
+
})), _react.default.createElement(_StyledLabel.default, {
|
|
38
|
+
active: active,
|
|
39
|
+
hasBadge: !!Icon,
|
|
40
|
+
marginLeft: 1
|
|
41
|
+
}, buttonText));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
FilterSimplePrimary.propTypes = {
|
|
45
|
+
active: _propTypes.default.bool,
|
|
46
|
+
count: _propTypes.default.number,
|
|
47
|
+
text: _propTypes.default.string.isRequired,
|
|
48
|
+
badgeColor: _propTypes.default.string,
|
|
49
|
+
badgeIcon: _propTypes.default.elementType
|
|
50
|
+
};
|
|
51
|
+
FilterSimplePrimary.defaultProps = {
|
|
52
|
+
active: null,
|
|
53
|
+
count: undefined,
|
|
54
|
+
badgeColor: "".concat((0, _toColorString.default)(_color.default.status.information.medium)),
|
|
55
|
+
badgeIcon: null
|
|
56
|
+
};
|
|
57
|
+
var _default = FilterSimplePrimary;
|
|
58
|
+
exports.default = _default;
|