@decisiv/ui-components 2.0.1-alpha.20 → 2.0.1-alpha.201
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/HelpMessage.d.ts +1 -1
- package/lib/atoms/InputField/HelpMessage.d.ts.map +1 -1
- package/lib/atoms/InputField/HelpMessage.js +2 -1
- 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 +8 -1
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +27 -9
- 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/index.d.ts +4 -0
- package/lib/atoms/OptionsList/Category/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/{Category.js → Category/index.js} +13 -21
- package/lib/atoms/OptionsList/Category/styles.d.ts +6 -0
- package/lib/atoms/OptionsList/Category/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Category/styles.js +36 -0
- package/lib/atoms/OptionsList/{Option.d.ts → Option/index.d.ts} +2 -2
- package/lib/atoms/OptionsList/Option/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/index.js +169 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts +17 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/styles.js +83 -0
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +16 -7
- package/lib/atoms/OptionsList/index.test.js +249 -156
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +3 -1
- package/lib/atoms/OptionsList/types.d.ts +23 -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/AvatarContainer.d.ts +1 -13
- package/lib/components/Avatar/AvatarContainer.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContainer.js +12 -13
- package/lib/components/Avatar/AvatarContent.d.ts +2 -2
- package/lib/components/Avatar/AvatarContent.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContent.js +24 -20
- package/lib/components/Avatar/index.d.ts.map +1 -1
- package/lib/components/Avatar/index.js +39 -5
- package/lib/components/Avatar/index.test.js +4 -0
- package/lib/components/Avatar/schema.d.ts.map +1 -1
- package/lib/components/Avatar/schema.js +3 -1
- package/lib/components/Avatar/types.d.ts +15 -2
- package/lib/components/Avatar/types.d.ts.map +1 -1
- package/lib/components/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 +3 -70
- package/lib/components/Badge/index.test.js +62 -8
- package/lib/components/Badge/schema.d.ts.map +1 -1
- package/lib/components/Badge/schema.js +2 -1
- package/lib/components/Badge/styles.d.ts +3 -0
- package/lib/components/Badge/styles.d.ts.map +1 -0
- package/lib/components/Badge/styles.js +96 -0
- package/lib/components/Badge/types.d.ts +3 -2
- 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 -6
- package/lib/components/Button/StyledButton.d.ts.map +1 -1
- package/lib/components/Button/StyledButton.js +39 -11
- package/lib/components/Button/index.d.ts.map +1 -1
- package/lib/components/Button/index.js +51 -12
- package/lib/components/Button/index.test.js +43 -8
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +4 -1
- package/lib/components/Button/types.d.ts +4 -1
- package/lib/components/Button/types.d.ts.map +1 -1
- package/lib/components/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/CheckboxGroup/index.d.ts +1 -1
- 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 +217 -85
- package/lib/components/Combobox/index.test.js +370 -147
- 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 +115 -0
- package/lib/components/Drawer/index.test.js +139 -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 +1 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +70 -22
- 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 +2 -1
- package/lib/components/DropdownList/types.d.ts +2 -0
- package/lib/components/DropdownList/types.d.ts.map +1 -1
- package/lib/components/Filter/ActionFilter/index.d.ts +5 -0
- package/lib/components/Filter/ActionFilter/index.d.ts.map +1 -0
- package/lib/components/Filter/ActionFilter/index.js +43 -0
- package/lib/components/Filter/IconWrapper/index.d.ts +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 +5 -0
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -0
- package/lib/components/Filter/SimplePrimary/index.js +46 -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 +66 -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 +38 -0
- package/lib/components/Filter/index.d.ts +6 -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 +70 -0
- package/lib/components/Filter/kind.d.ts +7 -0
- package/lib/components/Filter/kind.d.ts.map +1 -0
- package/lib/components/Filter/kind.js +43 -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 +37 -0
- package/lib/components/Filter/types.d.ts +31 -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 +53 -12
- package/lib/components/JumpTo/index.test.js +84 -0
- package/lib/components/JumpTo/schema.d.ts.map +1 -1
- package/lib/components/JumpTo/schema.js +2 -1
- package/lib/components/JumpTo/types.d.ts +1 -0
- package/lib/components/JumpTo/types.d.ts.map +1 -1
- package/lib/components/JumpTo/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 -1
- 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/types.js +5 -1
- package/lib/components/Modal/Manager.d.ts +6 -0
- package/lib/components/Modal/Manager.d.ts.map +1 -0
- package/lib/components/Modal/Manager.js +53 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts +11 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -0
- package/lib/components/Modal/ResponsiveModalWrapper.js +82 -0
- package/lib/components/Modal/components.d.ts +201 -3
- package/lib/components/Modal/components.d.ts.map +1 -1
- package/lib/components/Modal/components.js +16 -24
- package/lib/components/Modal/index.d.ts +8 -4
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +56 -95
- package/lib/components/Modal/index.test.js +26 -0
- package/lib/components/Modal/schema.d.ts.map +1 -1
- package/lib/components/Modal/schema.js +2 -1
- package/lib/components/Modal/types.d.ts +2 -1
- package/lib/components/Modal/types.d.ts.map +1 -1
- package/lib/components/Modal/types.js +5 -1
- package/lib/components/Modal/utils.d.ts +1 -1
- package/lib/components/Modal/utils.d.ts.map +1 -1
- package/lib/components/Modal/utils.js +7 -5
- package/lib/components/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/Arrow.d.ts +2 -2
- package/lib/components/Popover/index.d.ts.map +1 -1
- package/lib/components/Popover/index.js +9 -5
- 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 +4 -2
- 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 +176 -0
- package/lib/components/SearchInput/index.test.js +660 -0
- package/lib/components/SearchInput/schema.d.ts +3 -0
- package/lib/components/SearchInput/schema.d.ts.map +1 -0
- package/lib/components/SearchInput/schema.js +37 -0
- package/lib/components/SearchInput/styles.d.ts +1176 -0
- package/lib/components/SearchInput/styles.d.ts.map +1 -0
- package/lib/components/SearchInput/styles.js +97 -0
- package/lib/components/SearchInput/types.d.ts +38 -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 +26 -3
- 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 +5 -0
- package/lib/components/Select/types.d.ts +6 -3
- 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/StepTracker/index.d.ts +11 -0
- package/lib/components/StepTracker/index.d.ts.map +1 -0
- package/lib/components/StepTracker/index.js +56 -0
- package/lib/components/StepTracker/index.test.js +89 -0
- package/lib/components/StepTracker/schema.d.ts +3 -0
- package/lib/components/StepTracker/schema.d.ts.map +1 -0
- package/lib/components/StepTracker/schema.js +19 -0
- package/lib/components/StepTracker/styles.d.ts +605 -0
- package/lib/components/StepTracker/styles.d.ts.map +1 -0
- package/lib/components/StepTracker/styles.js +114 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +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 +4 -1
- package/lib/components/Tag/propTypes.d.ts.map +1 -1
- package/lib/components/Tag/propTypes.js +5 -2
- package/lib/components/Tag/schema.d.ts.map +1 -1
- package/lib/components/Tag/schema.js +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 +133 -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/TagInput/index.d.ts +10 -0
- package/lib/components/TagInput/index.d.ts.map +1 -0
- package/lib/components/TagInput/index.js +217 -0
- package/lib/components/TagInput/index.test.js +1001 -0
- package/lib/components/TagInput/schema.d.ts +3 -0
- package/lib/components/TagInput/schema.d.ts.map +1 -0
- package/lib/components/TagInput/schema.js +30 -0
- package/lib/components/TagInput/styles.d.ts +10 -0
- package/lib/components/TagInput/styles.d.ts.map +1 -0
- package/lib/components/TagInput/styles.js +52 -0
- package/lib/components/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/Wizard/index.d.ts +24 -0
- package/lib/components/Wizard/index.d.ts.map +1 -0
- package/lib/components/Wizard/index.js +146 -0
- package/lib/components/Wizard/index.test.js +591 -0
- package/lib/components/Wizard/schema.d.ts +3 -0
- package/lib/components/Wizard/schema.d.ts.map +1 -0
- package/lib/components/Wizard/schema.js +37 -0
- package/lib/components/Wizard/styles.d.ts +990 -0
- package/lib/components/Wizard/styles.d.ts.map +1 -0
- package/lib/components/Wizard/styles.js +79 -0
- package/lib/components/index.d.ts +11 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +182 -1
- package/lib/modifiers/palette.d.ts +36 -0
- package/lib/modifiers/palette.d.ts.map +1 -0
- package/lib/modifiers/palette.js +88 -0
- package/lib/modifiers/spacingSchema.d.ts.map +1 -1
- package/lib/modifiers/spacingSchema.js +29 -16
- package/lib/providers/ConfigProvider/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 +40 -0
- package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +40 -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 +351 -3
- 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/useDebounce.d.ts +2 -0
- package/lib/utils/useDebounce.d.ts.map +1 -0
- package/lib/utils/useDebounce.js +37 -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/atoms/OptionsList/Category.d.ts +0 -4
- package/lib/atoms/OptionsList/Category.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Option.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Option.js +0 -194
- 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
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
|
|
5
|
+
require("jest-styled-components");
|
|
6
|
+
|
|
5
7
|
var _react2 = require("@testing-library/react");
|
|
6
8
|
|
|
7
9
|
var _Home = _interopRequireDefault(require("@decisiv/iconix/lib/components/Home"));
|
|
@@ -17,6 +19,7 @@ describe('Tag', function () {
|
|
|
17
19
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
20
|
var variant = arguments.length > 1 ? arguments[1] : undefined;
|
|
19
21
|
return (0, _react2.render)(_react.default.createElement(_.default, _extends({
|
|
22
|
+
"data-testid": "tag",
|
|
20
23
|
text: "text"
|
|
21
24
|
}, props, {
|
|
22
25
|
variant: variant
|
|
@@ -83,12 +86,246 @@ describe('Tag', function () {
|
|
|
83
86
|
describe('Outline variant', function () {
|
|
84
87
|
TestVariant('outline');
|
|
85
88
|
});
|
|
89
|
+
describe('Size Props', function () {
|
|
90
|
+
describe('when the size is "small"', function () {
|
|
91
|
+
it('renders with a height of 1.25rem', function () {
|
|
92
|
+
var _render = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
93
|
+
"data-testid": "small-tag",
|
|
94
|
+
text: "text",
|
|
95
|
+
size: "small"
|
|
96
|
+
})),
|
|
97
|
+
getByTestId = _render.getByTestId;
|
|
98
|
+
|
|
99
|
+
expect(getByTestId('small-tag')).toHaveStyleRule('height', '1.25rem');
|
|
100
|
+
});
|
|
101
|
+
it('renders with a font-size of 0.75rem', function () {
|
|
102
|
+
var _render2 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
103
|
+
"data-testid": "small-tag",
|
|
104
|
+
text: "text",
|
|
105
|
+
size: "small"
|
|
106
|
+
})),
|
|
107
|
+
getByText = _render2.getByText;
|
|
108
|
+
|
|
109
|
+
expect(getByText(/text/i, {
|
|
110
|
+
selector: 'span'
|
|
111
|
+
})).toHaveStyleRule('font-size', '0.75rem');
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
describe('when the size is "medium"', function () {
|
|
115
|
+
it('renders with a height of 1.5625rem', function () {
|
|
116
|
+
var _render3 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
117
|
+
"data-testid": "medium-tag",
|
|
118
|
+
text: "text",
|
|
119
|
+
size: "medium"
|
|
120
|
+
})),
|
|
121
|
+
getByTestId = _render3.getByTestId;
|
|
122
|
+
|
|
123
|
+
expect(getByTestId('medium-tag')).toHaveStyleRule('height', '1.5625rem');
|
|
124
|
+
});
|
|
125
|
+
it('renders with a font-size of 0.875rem', function () {
|
|
126
|
+
var _render4 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
127
|
+
"data-testid": "small-tag",
|
|
128
|
+
text: "text",
|
|
129
|
+
size: "medium"
|
|
130
|
+
})),
|
|
131
|
+
getByText = _render4.getByText;
|
|
132
|
+
|
|
133
|
+
expect(getByText(/text/i, {
|
|
134
|
+
selector: 'span'
|
|
135
|
+
})).toHaveStyleRule('font-size', '0.875rem');
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
describe('Palette variants', function () {
|
|
140
|
+
describe('bright', function () {
|
|
141
|
+
it('renders correctly', function () {
|
|
142
|
+
var _render5 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
143
|
+
text: "text",
|
|
144
|
+
palette: "bright"
|
|
145
|
+
})),
|
|
146
|
+
container = _render5.container;
|
|
147
|
+
|
|
148
|
+
expect(container).toMatchSnapshot();
|
|
149
|
+
});
|
|
150
|
+
it('renders correctly with an Icon', function () {
|
|
151
|
+
var _render6 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
152
|
+
text: "text",
|
|
153
|
+
palette: "bright",
|
|
154
|
+
icon: _Home.default
|
|
155
|
+
})),
|
|
156
|
+
container = _render6.container;
|
|
157
|
+
|
|
158
|
+
expect(container).toMatchSnapshot();
|
|
159
|
+
});
|
|
160
|
+
it('renders correctly with different colors', function () {
|
|
161
|
+
var _render7 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
162
|
+
text: "text",
|
|
163
|
+
palette: "bright",
|
|
164
|
+
color: "information"
|
|
165
|
+
})),
|
|
166
|
+
container = _render7.container;
|
|
167
|
+
|
|
168
|
+
expect(container).toMatchSnapshot();
|
|
169
|
+
});
|
|
170
|
+
it('renders correctly with an action', function () {
|
|
171
|
+
var _render8 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
172
|
+
"data-testid": "action-tag",
|
|
173
|
+
text: "text",
|
|
174
|
+
palette: "bright",
|
|
175
|
+
action: jest.fn(),
|
|
176
|
+
actionAttributes: {
|
|
177
|
+
'aria-label': 'test'
|
|
178
|
+
},
|
|
179
|
+
actionIcon: _Home.default
|
|
180
|
+
})),
|
|
181
|
+
container = _render8.container,
|
|
182
|
+
getByTestId = _render8.getByTestId;
|
|
183
|
+
|
|
184
|
+
expect(getByTestId('action-tag')).toHaveStyleRule('cursor', 'pointer');
|
|
185
|
+
expect(container).toMatchSnapshot();
|
|
186
|
+
});
|
|
187
|
+
it('renders the action correctly with the danger intent', function () {
|
|
188
|
+
var _render9 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
189
|
+
text: "text",
|
|
190
|
+
palette: "bright",
|
|
191
|
+
action: jest.fn(),
|
|
192
|
+
actionAttributes: {
|
|
193
|
+
'aria-label': 'test'
|
|
194
|
+
},
|
|
195
|
+
actionIcon: _Home.default,
|
|
196
|
+
actionIntent: "danger"
|
|
197
|
+
})),
|
|
198
|
+
container = _render9.container;
|
|
199
|
+
|
|
200
|
+
expect(container).toMatchSnapshot();
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
describe('pastel', function () {
|
|
204
|
+
it('renders correctly', function () {
|
|
205
|
+
var _render10 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
206
|
+
text: "text",
|
|
207
|
+
palette: "pastel"
|
|
208
|
+
})),
|
|
209
|
+
container = _render10.container;
|
|
210
|
+
|
|
211
|
+
expect(container).toMatchSnapshot();
|
|
212
|
+
});
|
|
213
|
+
it('renders correctly with an Icon', function () {
|
|
214
|
+
var _render11 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
215
|
+
text: "text",
|
|
216
|
+
palette: "pastel",
|
|
217
|
+
icon: _Home.default
|
|
218
|
+
})),
|
|
219
|
+
container = _render11.container;
|
|
220
|
+
|
|
221
|
+
expect(container).toMatchSnapshot();
|
|
222
|
+
});
|
|
223
|
+
it('renders correctly with different colors', function () {
|
|
224
|
+
var _render12 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
225
|
+
text: "text",
|
|
226
|
+
palette: "pastel",
|
|
227
|
+
color: "information"
|
|
228
|
+
})),
|
|
229
|
+
container = _render12.container;
|
|
230
|
+
|
|
231
|
+
expect(container).toMatchSnapshot();
|
|
232
|
+
});
|
|
233
|
+
it('renders correctly with an action', function () {
|
|
234
|
+
var _render13 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
235
|
+
text: "text",
|
|
236
|
+
palette: "pastel",
|
|
237
|
+
action: jest.fn(),
|
|
238
|
+
actionAttributes: {
|
|
239
|
+
'aria-label': 'test'
|
|
240
|
+
},
|
|
241
|
+
actionIcon: _Home.default
|
|
242
|
+
})),
|
|
243
|
+
container = _render13.container;
|
|
244
|
+
|
|
245
|
+
expect(container).toMatchSnapshot();
|
|
246
|
+
});
|
|
247
|
+
it('renders the action correctly with the danger intent', function () {
|
|
248
|
+
var _render14 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
249
|
+
text: "text",
|
|
250
|
+
palette: "pastel",
|
|
251
|
+
action: jest.fn(),
|
|
252
|
+
actionAttributes: {
|
|
253
|
+
'aria-label': 'test'
|
|
254
|
+
},
|
|
255
|
+
actionIcon: _Home.default,
|
|
256
|
+
actionIntent: "danger"
|
|
257
|
+
})),
|
|
258
|
+
container = _render14.container;
|
|
259
|
+
|
|
260
|
+
expect(container).toMatchSnapshot();
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
describe('dark', function () {
|
|
264
|
+
it('renders correctly', function () {
|
|
265
|
+
var _render15 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
266
|
+
text: "text",
|
|
267
|
+
palette: "dark"
|
|
268
|
+
})),
|
|
269
|
+
container = _render15.container;
|
|
270
|
+
|
|
271
|
+
expect(container).toMatchSnapshot();
|
|
272
|
+
});
|
|
273
|
+
it('renders correctly with an Icon', function () {
|
|
274
|
+
var _render16 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
275
|
+
text: "text",
|
|
276
|
+
palette: "dark",
|
|
277
|
+
icon: _Home.default
|
|
278
|
+
})),
|
|
279
|
+
container = _render16.container;
|
|
280
|
+
|
|
281
|
+
expect(container).toMatchSnapshot();
|
|
282
|
+
});
|
|
283
|
+
it('renders correctly with different colors', function () {
|
|
284
|
+
var _render17 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
285
|
+
text: "text",
|
|
286
|
+
palette: "dark",
|
|
287
|
+
color: "information"
|
|
288
|
+
})),
|
|
289
|
+
container = _render17.container;
|
|
290
|
+
|
|
291
|
+
expect(container).toMatchSnapshot();
|
|
292
|
+
});
|
|
293
|
+
it('renders correctly with an action', function () {
|
|
294
|
+
var _render18 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
295
|
+
text: "text",
|
|
296
|
+
palette: "dark",
|
|
297
|
+
action: jest.fn(),
|
|
298
|
+
actionAttributes: {
|
|
299
|
+
'aria-label': 'test'
|
|
300
|
+
},
|
|
301
|
+
actionIcon: _Home.default
|
|
302
|
+
})),
|
|
303
|
+
container = _render18.container;
|
|
304
|
+
|
|
305
|
+
expect(container).toMatchSnapshot();
|
|
306
|
+
});
|
|
307
|
+
it('renders the action correctly with the danger intent', function () {
|
|
308
|
+
var _render19 = (0, _react2.render)(_react.default.createElement(_.default, {
|
|
309
|
+
text: "text",
|
|
310
|
+
palette: "dark",
|
|
311
|
+
action: jest.fn(),
|
|
312
|
+
actionAttributes: {
|
|
313
|
+
'aria-label': 'test'
|
|
314
|
+
},
|
|
315
|
+
actionIcon: _Home.default,
|
|
316
|
+
actionIntent: "danger"
|
|
317
|
+
})),
|
|
318
|
+
container = _render19.container;
|
|
319
|
+
|
|
320
|
+
expect(container).toMatchSnapshot();
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
});
|
|
86
324
|
describe('Common', function () {
|
|
87
325
|
it('does not render a provided action if there is not text', function () {
|
|
88
326
|
jest.spyOn(console, 'error').mockImplementation(function () {});
|
|
89
327
|
|
|
90
328
|
var _renderTag6 = renderTag({
|
|
91
|
-
icon: _Home.default,
|
|
92
329
|
text: undefined,
|
|
93
330
|
action: function action() {
|
|
94
331
|
return null;
|
|
@@ -100,7 +337,7 @@ describe('Tag', function () {
|
|
|
100
337
|
}, 'normal'),
|
|
101
338
|
container = _renderTag6.container;
|
|
102
339
|
|
|
103
|
-
expect(container.querySelectorAll('
|
|
340
|
+
expect(container.querySelectorAll('svg').length).toBe(0);
|
|
104
341
|
expect(console.error).toHaveBeenCalled(); // @ts-ignore
|
|
105
342
|
|
|
106
343
|
console.error.mockRestore();
|
|
@@ -7,8 +7,10 @@ export declare const propTypes: {
|
|
|
7
7
|
actionAttributes: any;
|
|
8
8
|
actionIntent: PropTypes.Requireable<string>;
|
|
9
9
|
actionRef: PropTypes.Requireable<any>;
|
|
10
|
-
color: PropTypes.Requireable<
|
|
10
|
+
color: PropTypes.Requireable<"danger" | "success" | "information" | "warning" | "berryCrisp" | "koolaidCake" | "cookieMonster" | "cottonCandy" | "fizzyLime" | "mamboMango" | "carrotCake" | "roseGummy" | "licoriceMousse">;
|
|
11
11
|
variant: PropTypes.Requireable<string>;
|
|
12
|
+
palette: PropTypes.Requireable<string>;
|
|
13
|
+
size: PropTypes.Requireable<string>;
|
|
12
14
|
};
|
|
13
15
|
export declare const defaultProps: {
|
|
14
16
|
action: undefined;
|
|
@@ -20,5 +22,6 @@ export declare const defaultProps: {
|
|
|
20
22
|
icon: undefined;
|
|
21
23
|
text: undefined;
|
|
22
24
|
variant: string;
|
|
25
|
+
palette: string;
|
|
23
26
|
};
|
|
24
27
|
//# sourceMappingURL=propTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/propTypes.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAYnC,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"propTypes.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/propTypes.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAYnC,eAAO,MAAM,SAAS;;;;;;;;;;;;CA4BrB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;CAWxB,CAAC"}
|
|
@@ -40,7 +40,9 @@ var propTypes = {
|
|
|
40
40
|
actionIntent: _propTypes.default.oneOf(['normal', 'danger']),
|
|
41
41
|
actionRef: _propTypes.default.any,
|
|
42
42
|
color: _propTypes.default.oneOf(_commonUIColors.commonUIColorKeys),
|
|
43
|
-
variant: _propTypes.default.oneOf(['normal', 'outline'])
|
|
43
|
+
variant: _propTypes.default.oneOf(['normal', 'outline']),
|
|
44
|
+
palette: _propTypes.default.oneOf(['pastel', 'bright', 'dark']),
|
|
45
|
+
size: _propTypes.default.oneOf(['small', 'medium'])
|
|
44
46
|
};
|
|
45
47
|
exports.propTypes = propTypes;
|
|
46
48
|
var defaultProps = {
|
|
@@ -52,6 +54,7 @@ var defaultProps = {
|
|
|
52
54
|
color: undefined,
|
|
53
55
|
icon: undefined,
|
|
54
56
|
text: undefined,
|
|
55
|
-
variant: 'normal'
|
|
57
|
+
variant: 'normal',
|
|
58
|
+
palette: 'bright'
|
|
56
59
|
};
|
|
57
60
|
exports.defaultProps = defaultProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/schema.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,MAAM,KAAmC,CAAC;AAkDhD,eAAe,MAAM,CAAC"}
|
|
@@ -16,7 +16,9 @@ var schema = (0, _reactDesc.describe)({
|
|
|
16
16
|
schema.propTypes = {
|
|
17
17
|
text: _reactDesc.PropTypes.string.description("The tag's text"),
|
|
18
18
|
icon: _reactDesc.PropTypes.element.description('Which `iconix` icon to render as the main icon'),
|
|
19
|
+
size: _reactDesc.PropTypes.oneOf(['small', 'medium']).description('The size to use for the Tag').defaultValue('small'),
|
|
19
20
|
color: _reactDesc.PropTypes.oneOf(_commonUIColors.commonUIColorKeys).description('The color to use as the tag background or SVG color when outlined').format('string (see notes below)').defaultValue('licoriceMousse'),
|
|
21
|
+
palette: _reactDesc.PropTypes.oneOf(['bright', 'pastel', 'dark']).description('What color variant to render').defaultValue('bright'),
|
|
20
22
|
variant: _reactDesc.PropTypes.oneOf(['normal', 'outline']).description('What tag variant to render').defaultValue('normal'),
|
|
21
23
|
action: _reactDesc.PropTypes.func.description('A function to callback when the action button is clicked'),
|
|
22
24
|
actionRef: _reactDesc.PropTypes.any.description('Provide a "React Ref" to get a reference to the action\'s DOM node'),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TagProps } from './types';
|
|
2
|
+
interface ContentProps extends Pick<TagProps, 'palette'> {
|
|
3
|
+
hasIcon: boolean;
|
|
4
|
+
isSingleChild: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare type ContainerProps = TagProps & {
|
|
7
|
+
isFocused: boolean;
|
|
8
|
+
isSingleChild: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const Content: import("styled-components").StyledComponent<"div", any, ContentProps, never>;
|
|
11
|
+
export declare const Container: import("styled-components").StyledComponent<"div", any, ContainerProps, never>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/styles.ts"],"names":[],"mappings":"AAeA,OAAO,EAAa,QAAQ,EAAoB,MAAM,SAAS,CAAC;AAahE,UAAU,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,aAAK,cAAc,GAAG,QAAQ,GAAG;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,CAAC;AAkBhF,eAAO,MAAM,OAAO,8EAkCnB,CAAC;AAqHF,eAAO,MAAM,SAAS,gFAqDrB,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Container = exports.Content = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
11
|
+
|
|
12
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
13
|
+
|
|
14
|
+
var _designTokens = _interopRequireWildcard(require("@decisiv/design-tokens"));
|
|
15
|
+
|
|
16
|
+
var _commonUIColors = require("../../utils/commonUIColors");
|
|
17
|
+
|
|
18
|
+
var _color = _interopRequireDefault(require("../../modifiers/color"));
|
|
19
|
+
|
|
20
|
+
var _palette = require("../../modifiers/palette");
|
|
21
|
+
|
|
22
|
+
var _focusRingWithColor = _interopRequireDefault(require("../../utils/focusRingWithColor"));
|
|
23
|
+
|
|
24
|
+
var _styleModifiers = require("../../utils/styleModifiers");
|
|
25
|
+
|
|
26
|
+
var _Action = _interopRequireWildcard(require("./Action"));
|
|
27
|
+
|
|
28
|
+
var _constants = require("./constants");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
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; } }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
var _designTokens$color = _designTokens.default.color,
|
|
41
|
+
interactionColors = _designTokens$color.interaction,
|
|
42
|
+
statusColors = _designTokens$color.status;
|
|
43
|
+
|
|
44
|
+
var getContentMaxWidth = function getContentMaxWidth(props) {
|
|
45
|
+
var isSingleChild = props.isSingleChild,
|
|
46
|
+
hasIcon = props.hasIcon;
|
|
47
|
+
var iconWidth = 12;
|
|
48
|
+
var actionBorder = 1;
|
|
49
|
+
var containerBorder = 2;
|
|
50
|
+
var baseWidth = _constants.MAX_CONTAINER_WIDTH - _constants.CONTAINER_X_PADDING - containerBorder;
|
|
51
|
+
var valuesToSubtract = [];
|
|
52
|
+
!isSingleChild && valuesToSubtract.push(_constants.ACTION_WIDTH, actionBorder);
|
|
53
|
+
hasIcon && valuesToSubtract.push(iconWidth, _constants.ICON_CONTENT_MARGIN);
|
|
54
|
+
return (0, _rem.default)(valuesToSubtract.reduce(function (r, v) {
|
|
55
|
+
return r - v;
|
|
56
|
+
}, baseWidth));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var Content = _styledComponents.default.div.withConfig({
|
|
60
|
+
displayName: "styles__Content",
|
|
61
|
+
componentId: "sc-1sm93ik-0"
|
|
62
|
+
})(["height:100%;color:inherit;align-items:center;border:0;display:flex;padding:0 ", ";border-right:1px solid ", ";", ";> svg{flex:1 0 auto;}* + *{margin-left:", ";}span{max-width:", ";}"], (0, _rem.default)(_constants.CONTAINER_X_PADDING), function (_ref) {
|
|
63
|
+
var _ref$palette = _ref.palette,
|
|
64
|
+
palette = _ref$palette === void 0 ? 'bright' : _ref$palette;
|
|
65
|
+
return (0, _toColorString.default)(_objectSpread({}, _designTokens.color.base.charcoal, {
|
|
66
|
+
alpha: _palette.BORDER_OPACITY[palette]
|
|
67
|
+
}));
|
|
68
|
+
}, function (_ref2) {
|
|
69
|
+
var isSingleChild = _ref2.isSingleChild;
|
|
70
|
+
return (0, _styledComponents.css)(["max-width:", ";border-width:", ";"], isSingleChild ? '100%' : "calc(100% - ".concat(_constants.ACTION_WIDTH, "px)"), isSingleChild ? '0' : '1px');
|
|
71
|
+
}, (0, _rem.default)(_constants.ICON_CONTENT_MARGIN), getContentMaxWidth);
|
|
72
|
+
|
|
73
|
+
exports.Content = Content;
|
|
74
|
+
|
|
75
|
+
var contentSVGColor = function contentSVGColor(_ref3) {
|
|
76
|
+
var variant = _ref3.variant,
|
|
77
|
+
colorProp = _ref3.color;
|
|
78
|
+
|
|
79
|
+
if (variant === 'outline' && colorProp && colorProp in _commonUIColors.commonUIColors) {
|
|
80
|
+
return (0, _styledComponents.css)(["", " svg{color:", ";}"], Content, (0, _toColorString.default)(_commonUIColors.commonUIColors[colorProp]));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return null;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var actionColors = {
|
|
87
|
+
normal: (0, _toColorString.default)(interactionColors.indianOcean),
|
|
88
|
+
danger: (0, _toColorString.default)(statusColors.danger.medium)
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var actionColor = function actionColor(_ref4) {
|
|
92
|
+
var actionIntent = _ref4.actionIntent;
|
|
93
|
+
return actionColors[actionIntent !== 'danger' ? 'normal' : 'danger'];
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var colorModifiers = function colorModifiers(props) {
|
|
97
|
+
var _props$palette = props.palette,
|
|
98
|
+
palette = _props$palette === void 0 ? 'bright' : _props$palette;
|
|
99
|
+
|
|
100
|
+
var borderColor = _objectSpread({}, _designTokens.color.base.charcoal, {
|
|
101
|
+
alpha: _palette.BORDER_OPACITY[palette]
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
return (0, _styledComponents.css)(["", " ", " ", ""], (0, _palette.withBorderedPalette)(props), (0, _styleModifiers.when)('variant', 'outline', (0, _styledComponents.css)(["", ""], (0, _color.default)(_objectSpread({}, _designTokens.color.base.snowWhite, {
|
|
105
|
+
fg: _designTokens.color.base.alaskanHusky
|
|
106
|
+
})))), (0, _styleModifiers.when)('isSingleChild', false, (0, _styledComponents.css)(["&:hover{box-shadow:inset 0 0 0 ", " ", ";", "{border-color:transparent;}}"], (0, _rem.default)(100), (0, _toColorString.default)(borderColor), Content)));
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var variantModifiers = function variantModifiers(props) {
|
|
110
|
+
var _props$variant = props.variant,
|
|
111
|
+
variant = _props$variant === void 0 ? 'normal' : _props$variant;
|
|
112
|
+
if (variant === 'normal') return undefined;
|
|
113
|
+
return (0, _styledComponents.css)(["border:1px solid ", ";", " &:focus{border:1px solid ", ";::before{", ";}}"], (0, _toColorString.default)(_designTokens.color.opacity.charcoal15), (0, _styleModifiers.when)('isSingleChild', false, (0, _styledComponents.css)(["&:hover{background-color:", ";}"], (0, _toColorString.default)(_objectSpread({}, _designTokens.color.base.charcoal, {
|
|
114
|
+
alpha: 0.07
|
|
115
|
+
})))), (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _focusRingWithColor.default)(_designTokens.color.interaction.pacificOcean40));
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var sizeModifiers = function sizeModifiers(props) {
|
|
119
|
+
var _props$size = props.size,
|
|
120
|
+
size = _props$size === void 0 ? 'small' : _props$size;
|
|
121
|
+
if (size === 'small') return undefined;
|
|
122
|
+
var mediumHeight = (0, _rem.default)(25);
|
|
123
|
+
var mediumRadius = (0, _rem.default)(15);
|
|
124
|
+
var mediumBorderRadius = "0 ".concat(mediumRadius, " ").concat(mediumRadius, " 0");
|
|
125
|
+
return (0, _styledComponents.css)(["height:", ";border-radius:", ";&:focus{::before{border-radius:", ";}}", "{padding-right:", ";}", ",", "{border-radius:", ";}"], mediumHeight, mediumRadius, mediumRadius, _Action.default, (0, _rem.default)(2), _Action.default, _Action.ActionContainer, mediumBorderRadius);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var Container = _styledComponents.default.div.withConfig({
|
|
129
|
+
displayName: "styles__Container",
|
|
130
|
+
componentId: "sc-1sm93ik-1"
|
|
131
|
+
})(["position:relative;font-family:", ";font-size:", ";font-weight:", ";align-items:center;justify-content:center;border-radius:", ";display:inline-flex;height:", ";max-width:100%;min-width:", ";background-color:transparent;padding:0;", " &:focus{border:1px solid ", ";&::before{position:absolute;top:0;left:0;width:100%;height:100%;content:'';border-radius:", ";", ";}}&:focus-visible{outline:none;}&:hover{", "{color:", ";}}", ";", ";", ";", ";"], _designTokens.typography.typeface.default, (0, _rem.default)(_designTokens.typography.size.alias.default), _designTokens.typography.weight.alias.default, (0, _rem.default)(10), (0, _rem.default)(20), (0, _rem.default)(26), (0, _styleModifiers.when)('isSingleChild', false, (0, _styledComponents.css)(["cursor:pointer;"])), (0, _toColorString.default)(_designTokens.color.base.blackSheep), (0, _rem.default)(10), (0, _focusRingWithColor.default)(_designTokens.color.opacity.charcoal40), _Action.default, actionColor, sizeModifiers, colorModifiers, variantModifiers, contentSVGColor);
|
|
132
|
+
|
|
133
|
+
exports.Container = Container;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import React, { Ref, RefAttributes,
|
|
1
|
+
import React, { Ref, RefAttributes, AriaAttributes, DOMAttributes } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
3
|
import { IconProps } from '@decisiv/iconix';
|
|
4
4
|
import { CommonUIColorKeys } from '../../utils/commonUIColors';
|
|
5
5
|
export declare type TagRef = HTMLDivElement;
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type TagActionRef = HTMLDivElement;
|
|
7
7
|
export declare type IconComponent = (props: IconProps) => JSX.Element;
|
|
8
|
-
declare type ActionHandler = (event: React.MouseEvent<
|
|
8
|
+
export declare type ActionHandler = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => unknown;
|
|
9
9
|
export declare type BaseProps = {
|
|
10
10
|
color?: CommonUIColorKeys;
|
|
11
|
+
size?: 'medium' | 'small';
|
|
12
|
+
palette?: 'pastel' | 'bright' | 'dark';
|
|
11
13
|
variant?: 'normal' | 'outline';
|
|
12
14
|
style?: CSSObject;
|
|
13
15
|
};
|
|
@@ -34,14 +36,11 @@ declare type ConditionalProps = Text & {
|
|
|
34
36
|
} | Icon & {
|
|
35
37
|
action?: never;
|
|
36
38
|
} | Text & Icon | Text & Action & ActionIcon | Text & Icon & Action & ActionIcon;
|
|
37
|
-
export declare type
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
export declare type ActionButtonExtraProps = {
|
|
41
|
-
actionRef?: Ref<TagActionButtonRef>;
|
|
39
|
+
export declare type ActionExtraProps = {
|
|
40
|
+
actionRef?: Ref<TagActionRef>;
|
|
42
41
|
actionIntent?: 'normal' | 'danger';
|
|
43
|
-
actionAttributes?:
|
|
42
|
+
actionAttributes?: AriaAttributes & DOMAttributes<HTMLDivElement>;
|
|
44
43
|
};
|
|
45
|
-
export declare type TagProps = RefAttributes<TagRef> & BaseProps & ContentProps & ConditionalProps &
|
|
44
|
+
export declare type TagProps = RefAttributes<TagRef> & BaseProps & ContentProps & ConditionalProps & ActionExtraProps;
|
|
46
45
|
export {};
|
|
47
46
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EACZ,GAAG,EACH,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,oBAAY,MAAM,GAAG,cAAc,CAAC;AACpC,oBAAY,YAAY,GAAG,cAAc,CAAC;AAC1C,oBAAY,aAAa,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,GAAG,CAAC,OAAO,CAAC;AAE9D,oBAAY,aAAa,GAAG,CAC1B,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,KAChD,OAAO,CAAC;AAEb,oBAAY,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvC,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,aAAK,YAAY,GAAG;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B,CAAC;AAEF,aAAK,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7B,aAAK,IAAI,GAAG;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AACpC,aAAK,MAAM,GAAG;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AACxC,aAAK,UAAU,GAAG;IAAE,UAAU,EAAE,aAAa,CAAA;CAAE,CAAC;AAEhD,aAAK,gBAAgB,GACjB,IAAI,GAAG;IAAE,MAAM,CAAC,EAAE,aAAa,CAAA;CAAE,GACjC,IAAI,GAAG;IAAE,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,GACzB,IAAI,GAAG,IAAI,GACX,IAAI,GAAG,MAAM,GAAG,UAAU,GAC1B,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtC,oBAAY,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IAC9B,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACnC,gBAAgB,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;CACnE,CAAC;AAEF,oBAAY,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,GAC1C,SAAS,GACT,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseInputFieldProps } from '../../atoms/InputField';
|
|
3
|
+
export interface TagInputProps extends Omit<BaseInputFieldProps, 'onChange' | 'children' | 'value' | 'hideLabel'> {
|
|
4
|
+
hiddenLabel?: boolean;
|
|
5
|
+
defaultTags?: string[];
|
|
6
|
+
tags?: string[];
|
|
7
|
+
onChange?: (value: string[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export default function TagInput({ defaultTags, tags, onChange, disabled, readOnly, label, hiddenLabel, ...props }: TagInputProps): JSX.Element;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagInput/index.tsx"],"names":[],"mappings":";AAeA,OAAmB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAMzE,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,mBAAmB,EACnB,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAChD;IACD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,WAAgB,EAChB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,GAAG,KAAK,EACT,EAAE,aAAa,eAqMf"}
|