@decisiv/ui-components 2.0.1-alpha.99 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/atoms/Calendar/index.d.ts.map +1 -1
- package/lib/atoms/Calendar/index.js +38 -5
- package/lib/atoms/Calendar/index.test.js +5 -5
- package/lib/atoms/Calendar/types.d.ts +1 -1
- package/lib/atoms/Calendar/types.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.d.ts +2 -1
- package/lib/atoms/InputField/Containers.d.ts.map +1 -1
- package/lib/atoms/InputField/Containers.js +3 -1
- package/lib/atoms/InputField/HelpMessage.d.ts +1 -1
- package/lib/atoms/InputField/HelpMessage.d.ts.map +1 -1
- package/lib/atoms/InputField/HelpMessage.js +23 -7
- package/lib/atoms/InputField/index.d.ts +6 -1
- package/lib/atoms/InputField/index.d.ts.map +1 -1
- package/lib/atoms/InputField/index.js +21 -4
- package/lib/atoms/InputField/index.test.js +53 -0
- package/lib/atoms/InputField/schema.js +2 -2
- package/lib/atoms/InputField/styles.d.ts +7 -0
- package/lib/atoms/InputField/styles.d.ts.map +1 -0
- package/lib/atoms/InputField/styles.js +31 -0
- package/lib/atoms/OptionsList/Category/index.d.ts +4 -0
- package/lib/atoms/OptionsList/Category/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Category/index.js +85 -0
- package/lib/atoms/OptionsList/Category/styles.d.ts +5 -0
- package/lib/atoms/OptionsList/Category/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Category/styles.js +35 -0
- package/lib/atoms/OptionsList/{Option.d.ts → Option/index.d.ts} +2 -2
- package/lib/atoms/OptionsList/Option/index.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/index.js +182 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts +17 -0
- package/lib/atoms/OptionsList/Option/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/Option/styles.js +86 -0
- package/lib/atoms/OptionsList/context.d.ts +1 -0
- package/lib/atoms/OptionsList/context.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.d.ts +1 -44
- package/lib/atoms/OptionsList/index.d.ts.map +1 -1
- package/lib/atoms/OptionsList/index.js +259 -40
- package/lib/atoms/OptionsList/index.test.js +329 -186
- package/lib/atoms/OptionsList/schema.d.ts.map +1 -1
- package/lib/atoms/OptionsList/schema.js +7 -1
- package/lib/atoms/OptionsList/styles.d.ts +45 -0
- package/lib/atoms/OptionsList/styles.d.ts.map +1 -0
- package/lib/atoms/OptionsList/styles.js +29 -0
- package/lib/atoms/OptionsList/types.d.ts +50 -1
- package/lib/atoms/OptionsList/types.d.ts.map +1 -1
- package/lib/atoms/OptionsList/utils.d.ts +2 -1
- package/lib/atoms/OptionsList/utils.d.ts.map +1 -1
- package/lib/atoms/OptionsList/utils.js +49 -2
- package/lib/components/Alert/Container.d.ts +201 -0
- package/lib/components/Alert/Container.d.ts.map +1 -0
- package/lib/components/Alert/Container.js +26 -0
- package/lib/components/Alert/StyledButton.d.ts +5 -0
- package/lib/components/Alert/StyledButton.d.ts.map +1 -0
- package/lib/components/Alert/StyledButton.js +23 -0
- package/lib/components/Alert/index.d.ts +27 -0
- package/lib/components/Alert/index.d.ts.map +1 -0
- package/lib/components/Alert/index.js +112 -0
- package/lib/components/Alert/index.test.js +79 -0
- package/lib/components/Alert/intents.d.ts +13 -0
- package/lib/components/Alert/intents.d.ts.map +1 -0
- package/lib/components/Alert/intents.js +72 -0
- package/lib/components/{Tabs/schema.tab.d.ts → Alert/schema.d.ts} +1 -1
- package/lib/components/Alert/schema.d.ts.map +1 -0
- package/lib/components/Alert/schema.js +25 -0
- package/lib/components/Alert/types.d.ts +36 -0
- package/lib/components/Alert/types.d.ts.map +1 -0
- package/lib/components/Alert/types.js +32 -0
- package/lib/components/Avatar/AvatarContainer.d.ts +1 -13
- package/lib/components/Avatar/AvatarContainer.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContainer.js +12 -13
- package/lib/components/Avatar/AvatarContent.d.ts +2 -2
- package/lib/components/Avatar/AvatarContent.d.ts.map +1 -1
- package/lib/components/Avatar/AvatarContent.js +24 -20
- package/lib/components/Avatar/index.d.ts.map +1 -1
- package/lib/components/Avatar/index.js +42 -5
- package/lib/components/Avatar/index.test.js +4 -0
- package/lib/components/Avatar/schema.d.ts.map +1 -1
- package/lib/components/Avatar/schema.js +3 -1
- package/lib/components/Avatar/types.d.ts +15 -2
- package/lib/components/Avatar/types.d.ts.map +1 -1
- package/lib/components/Badge/index.d.ts.map +1 -1
- package/lib/components/Badge/index.js +2 -58
- package/lib/components/Badge/index.test.js +15 -4
- package/lib/components/Badge/schema.d.ts.map +1 -1
- package/lib/components/Badge/schema.js +1 -0
- package/lib/components/Badge/styles.d.ts +3 -0
- package/lib/components/Badge/styles.d.ts.map +1 -0
- package/lib/components/Badge/styles.js +97 -0
- package/lib/components/Badge/types.d.ts +3 -1
- package/lib/components/Badge/types.d.ts.map +1 -1
- package/lib/components/Badge/types.js +2 -1
- package/lib/components/Button/StyledButton.d.ts +3 -6
- package/lib/components/Button/StyledButton.d.ts.map +1 -1
- package/lib/components/Button/StyledButton.js +39 -11
- package/lib/components/Button/index.d.ts.map +1 -1
- package/lib/components/Button/index.js +51 -12
- package/lib/components/Button/index.test.js +43 -8
- package/lib/components/Button/schema.d.ts.map +1 -1
- package/lib/components/Button/schema.js +4 -1
- package/lib/components/Button/types.d.ts +4 -1
- package/lib/components/Button/types.d.ts.map +1 -1
- package/lib/components/Combobox/Target.d.ts.map +1 -1
- package/lib/components/Combobox/Target.js +10 -0
- package/lib/components/Combobox/index.d.ts.map +1 -1
- package/lib/components/Combobox/index.js +111 -59
- package/lib/components/Combobox/index.test.js +110 -25
- package/lib/components/Combobox/schema.d.ts.map +1 -1
- package/lib/components/Combobox/schema.js +7 -1
- package/lib/components/Combobox/types.d.ts +7 -2
- package/lib/components/Combobox/types.d.ts.map +1 -1
- package/lib/components/Drawer/index.d.ts +22 -0
- package/lib/components/Drawer/index.d.ts.map +1 -0
- package/lib/components/Drawer/index.js +122 -0
- package/lib/components/Drawer/index.test.js +164 -0
- package/lib/components/Drawer/schema.d.ts +3 -0
- package/lib/components/Drawer/schema.d.ts.map +1 -0
- package/lib/components/Drawer/schema.js +32 -0
- package/lib/components/Drawer/styles.d.ts +11 -0
- package/lib/components/Drawer/styles.d.ts.map +1 -0
- package/lib/components/Drawer/styles.js +79 -0
- package/lib/components/DropdownList/index.d.ts.map +1 -1
- package/lib/components/DropdownList/index.js +10 -3
- package/lib/components/DropdownList/index.test.js +38 -25
- package/lib/components/DropdownList/schema.js +1 -1
- package/lib/components/Filter/ActionFilter/index.d.ts +5 -0
- package/lib/components/Filter/ActionFilter/index.d.ts.map +1 -0
- package/lib/components/Filter/ActionFilter/index.js +43 -0
- package/lib/components/Filter/IconWrapper/index.d.ts +2 -2
- package/lib/components/Filter/IconWrapper/index.d.ts.map +1 -1
- package/lib/components/Filter/SimplePrimary/index.d.ts +2 -28
- package/lib/components/Filter/SimplePrimary/index.d.ts.map +1 -1
- package/lib/components/Filter/SimplePrimary/index.js +9 -21
- package/lib/components/Filter/StyledFilter.d.ts +2 -2
- package/lib/components/Filter/StyledFilter.d.ts.map +1 -1
- package/lib/components/Filter/StyledFilter.js +28 -1
- package/lib/components/Filter/StyledLabel/index.d.ts +3 -3
- package/lib/components/Filter/StyledLabel/index.d.ts.map +1 -1
- package/lib/components/Filter/StyledLabel/index.js +14 -6
- package/lib/components/Filter/index.d.ts +4 -25
- package/lib/components/Filter/index.d.ts.map +1 -1
- package/lib/components/Filter/index.js +41 -29
- package/lib/components/Filter/index.test.js +33 -4
- package/lib/components/Filter/kind.d.ts +4 -3
- package/lib/components/Filter/kind.d.ts.map +1 -1
- package/lib/components/Filter/kind.js +20 -22
- package/lib/components/Filter/schema.d.ts.map +1 -1
- package/lib/components/Filter/schema.js +8 -3
- package/lib/components/Filter/types.d.ts +21 -7
- package/lib/components/Filter/types.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.d.ts.map +1 -1
- package/lib/components/JumpTo/JumpToMenu.js +50 -9
- package/lib/components/JumpTo/index.test.js +84 -0
- package/lib/components/JumpTo/schema.d.ts.map +1 -1
- package/lib/components/JumpTo/schema.js +2 -1
- package/lib/components/JumpTo/types.d.ts +1 -0
- package/lib/components/JumpTo/types.d.ts.map +1 -1
- package/lib/components/JumpTo/utils.d.ts.map +1 -1
- package/lib/components/JumpTo/utils.js +3 -7
- package/lib/components/LeftNav/Item/NavExpandedItem/index.js +7 -2
- package/lib/components/LeftNav/index.test.js +35 -19
- package/lib/components/LeftNav/schema.d.ts.map +1 -1
- package/lib/components/LeftNav/schema.js +3 -1
- package/lib/components/LeftNav/types.d.ts +1 -0
- package/lib/components/LeftNav/types.d.ts.map +1 -1
- package/lib/components/Link/DisabledLink.d.ts +7 -0
- package/lib/components/Link/DisabledLink.d.ts.map +1 -0
- package/lib/components/Link/DisabledLink.js +46 -0
- package/lib/components/Link/Link.d.ts +4 -0
- package/lib/components/Link/Link.d.ts.map +1 -0
- package/lib/components/Link/Link.js +67 -0
- package/lib/components/Link/index.d.ts +4 -23
- package/lib/components/Link/index.d.ts.map +1 -1
- package/lib/components/Link/index.js +19 -157
- package/lib/components/Link/index.test.js +62 -49
- package/lib/components/Link/schema.d.ts.map +1 -1
- package/lib/components/Link/schema.js +1 -0
- package/lib/components/Link/styles.d.ts +20 -0
- package/lib/components/Link/styles.d.ts.map +1 -0
- package/lib/components/Link/styles.js +131 -0
- package/lib/components/Link/types.d.ts +28 -0
- package/lib/components/Link/types.d.ts.map +1 -0
- package/lib/components/List/BaseCell/index.d.ts +6 -0
- package/lib/components/List/BaseCell/index.d.ts.map +1 -0
- package/lib/components/List/BaseCell/index.js +17 -0
- package/lib/components/List/BaseCell/index.test.js +33 -0
- package/lib/components/List/BaseCell/styles.d.ts +198 -0
- package/lib/components/List/BaseCell/styles.d.ts.map +1 -0
- package/lib/components/List/BaseCell/styles.js +26 -0
- package/lib/components/List/ContentContainer/index.d.ts +21 -0
- package/lib/components/List/ContentContainer/index.d.ts.map +1 -0
- package/lib/components/List/ContentContainer/index.js +82 -0
- package/lib/components/List/ContentContainer/index.test.js +102 -0
- package/lib/components/List/DefaultCell/index.d.ts +6 -0
- package/lib/components/List/DefaultCell/index.d.ts.map +1 -0
- package/lib/components/List/DefaultCell/index.js +26 -0
- package/lib/components/List/EditableCell/index.d.ts +13 -0
- package/lib/components/List/EditableCell/index.d.ts.map +1 -0
- package/lib/components/List/EditableCell/index.js +47 -0
- package/lib/components/List/EditableCell/styles.d.ts +204 -0
- package/lib/components/List/EditableCell/styles.d.ts.map +1 -0
- package/lib/components/List/EditableCell/styles.js +47 -0
- package/lib/components/List/LabelContainer/index.d.ts +9 -0
- package/lib/components/List/LabelContainer/index.d.ts.map +1 -0
- package/lib/components/List/LabelContainer/index.js +38 -0
- package/lib/components/List/LabelContainer/index.test.js +105 -0
- package/lib/components/List/LabelContainer/styles.d.ts +4 -0
- package/lib/components/List/LabelContainer/styles.d.ts.map +1 -0
- package/lib/components/List/LabelContainer/styles.js +28 -0
- package/lib/components/List/ListItem/index.d.ts +8 -0
- package/lib/components/List/ListItem/index.d.ts.map +1 -0
- package/lib/components/List/ListItem/index.js +43 -0
- package/lib/components/List/ListItem/index.test.js +76 -0
- package/lib/components/List/ListItem/schema.d.ts +4 -0
- package/lib/components/List/ListItem/schema.d.ts.map +1 -0
- package/lib/components/List/ListItem/schema.js +30 -0
- package/lib/components/List/ListItem/styles.d.ts +2 -0
- package/lib/components/List/ListItem/styles.d.ts.map +1 -0
- package/lib/components/List/ListItem/styles.js +23 -0
- package/lib/components/List/constants.d.ts +19 -0
- package/lib/components/List/constants.d.ts.map +1 -0
- package/lib/components/List/constants.js +28 -0
- package/lib/components/List/index.d.ts +15 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +67 -0
- package/lib/components/List/index.test.js +64 -0
- package/lib/components/List/schema.d.ts +4 -0
- package/lib/components/List/schema.d.ts.map +1 -0
- package/lib/components/List/schema.js +26 -0
- package/lib/components/List/styles.d.ts +198 -0
- package/lib/components/List/styles.d.ts.map +1 -0
- package/lib/components/List/styles.js +34 -0
- package/lib/components/List/types.d.ts +15 -0
- package/lib/components/List/types.d.ts.map +1 -0
- package/lib/components/List/types.js +5 -0
- package/lib/components/Loading/Loading.d.ts +12 -0
- package/lib/components/Loading/Loading.d.ts.map +1 -0
- package/lib/components/Loading/Loading.js +70 -0
- package/lib/components/Loading/index.d.ts +4 -0
- package/lib/components/Loading/index.d.ts.map +1 -0
- package/lib/components/Loading/index.js +33 -0
- package/lib/components/Loading/index.test.js +55 -0
- package/lib/components/Loading/schema.d.ts +4 -0
- package/lib/components/Loading/schema.d.ts.map +1 -0
- package/lib/components/Loading/schema.js +31 -0
- package/lib/components/Loading/styles.d.ts +211 -0
- package/lib/components/Loading/styles.d.ts.map +1 -0
- package/lib/components/Loading/styles.js +77 -0
- package/lib/components/Loading/types.d.ts +10 -0
- package/lib/components/Loading/types.d.ts.map +1 -0
- package/lib/components/Loading/types.js +5 -0
- package/lib/components/Modal/Manager.d.ts +6 -0
- package/lib/components/Modal/Manager.d.ts.map +1 -0
- package/lib/components/Modal/Manager.js +53 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts +11 -0
- package/lib/components/Modal/ResponsiveModalWrapper.d.ts.map +1 -0
- package/lib/components/Modal/ResponsiveModalWrapper.js +82 -0
- package/lib/components/Modal/components.d.ts +199 -1
- package/lib/components/Modal/components.d.ts.map +1 -1
- package/lib/components/Modal/components.js +16 -24
- package/lib/components/Modal/index.d.ts +8 -4
- package/lib/components/Modal/index.d.ts.map +1 -1
- package/lib/components/Modal/index.js +63 -95
- package/lib/components/Modal/index.test.js +99 -0
- package/lib/components/Modal/schema.d.ts.map +1 -1
- package/lib/components/Modal/schema.js +2 -1
- package/lib/components/Modal/types.d.ts +2 -1
- package/lib/components/Modal/types.d.ts.map +1 -1
- package/lib/components/Modal/utils.d.ts +1 -1
- package/lib/components/Modal/utils.d.ts.map +1 -1
- package/lib/components/Modal/utils.js +7 -5
- package/lib/components/Pagination/Pages.d.ts +1 -7
- package/lib/components/Pagination/Pages.d.ts.map +1 -1
- package/lib/components/Pagination/Pages.js +17 -0
- package/lib/components/Pagination/Pagination.d.ts +13 -14
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +20 -5
- package/lib/components/Pagination/Pagination.test.js +14 -0
- package/lib/components/Pagination/paginate.d.ts +1 -1
- package/lib/components/Pagination/paginate.d.ts.map +1 -1
- package/lib/components/Pagination/paginate.js +4 -0
- package/lib/components/Pagination/paginate.test.js +38 -17
- package/lib/components/Pagination/schema.d.ts.map +1 -1
- package/lib/components/Pagination/schema.js +3 -1
- package/lib/components/Pagination/types.d.ts +24 -1
- package/lib/components/Pagination/types.d.ts.map +1 -1
- package/lib/components/PasswordField/IconWrapper.d.ts +198 -0
- package/lib/components/PasswordField/IconWrapper.d.ts.map +1 -0
- package/lib/components/PasswordField/IconWrapper.js +32 -0
- package/lib/components/PasswordField/Input.d.ts +6 -0
- package/lib/components/PasswordField/Input.d.ts.map +1 -0
- package/lib/components/PasswordField/Input.js +28 -0
- package/lib/components/PasswordField/ShowPasswordButton.d.ts +8 -0
- package/lib/components/PasswordField/ShowPasswordButton.d.ts.map +1 -0
- package/lib/components/PasswordField/ShowPasswordButton.js +48 -0
- package/lib/components/PasswordField/index.d.ts +14 -0
- package/lib/components/PasswordField/index.d.ts.map +1 -0
- package/lib/components/PasswordField/index.js +113 -0
- package/lib/components/PasswordField/index.test.js +217 -0
- package/lib/components/PasswordField/schema.d.ts +3 -0
- package/lib/components/PasswordField/schema.d.ts.map +1 -0
- package/lib/components/PasswordField/schema.js +27 -0
- package/lib/components/Popover/Arrow.d.ts +2 -2
- package/lib/components/Popover/index.d.ts.map +1 -1
- package/lib/components/Popover/index.js +25 -10
- package/lib/components/Popover/schema.d.ts.map +1 -1
- package/lib/components/Popover/schema.js +28 -20
- package/lib/components/Popover/types.d.ts +6 -2
- package/lib/components/Popover/types.d.ts.map +1 -1
- package/lib/components/SearchInput/index.d.ts +11 -0
- package/lib/components/SearchInput/index.d.ts.map +1 -0
- package/lib/components/SearchInput/index.js +179 -0
- package/lib/components/SearchInput/index.test.js +660 -0
- package/lib/components/SearchInput/schema.d.ts +3 -0
- package/lib/components/SearchInput/schema.d.ts.map +1 -0
- package/lib/components/SearchInput/schema.js +38 -0
- package/lib/components/SearchInput/styles.d.ts +1176 -0
- package/lib/components/SearchInput/styles.d.ts.map +1 -0
- package/lib/components/SearchInput/styles.js +97 -0
- package/lib/components/SearchInput/types.d.ts +39 -0
- package/lib/components/SearchInput/types.d.ts.map +1 -0
- package/lib/components/SearchInput/types.js +5 -0
- package/lib/components/Select/Target.d.ts.map +1 -1
- package/lib/components/Select/Target.js +5 -1
- package/lib/components/Select/index.d.ts.map +1 -1
- package/lib/components/Select/index.js +7 -3
- package/lib/components/Select/index.test.js +43 -19
- package/lib/components/Select/schema.d.ts.map +1 -1
- package/lib/components/Select/schema.js +2 -0
- package/lib/components/Select/types.d.ts +2 -0
- package/lib/components/Select/types.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.d.ts.map +1 -1
- package/lib/components/SelectDate/Target.js +5 -1
- package/lib/components/SelectDate/index.d.ts.map +1 -1
- package/lib/components/SelectDate/index.js +7 -3
- package/lib/components/SelectDate/schema.d.ts.map +1 -1
- package/lib/components/SelectDate/schema.js +1 -0
- package/lib/components/SelectDate/types.d.ts +1 -0
- package/lib/components/SelectDate/types.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.d.ts.map +1 -1
- package/lib/components/SelectDateRange/index.js +6 -2
- package/lib/components/SelectDateRange/schema.d.ts.map +1 -1
- package/lib/components/SelectDateRange/schema.js +1 -0
- package/lib/components/StepTracker/index.d.ts +11 -0
- package/lib/components/StepTracker/index.d.ts.map +1 -0
- package/lib/components/StepTracker/index.js +56 -0
- package/lib/components/StepTracker/index.test.js +89 -0
- package/lib/components/StepTracker/schema.d.ts +3 -0
- package/lib/components/StepTracker/schema.d.ts.map +1 -0
- package/lib/components/StepTracker/schema.js +19 -0
- package/lib/components/StepTracker/styles.d.ts +605 -0
- package/lib/components/StepTracker/styles.d.ts.map +1 -0
- package/lib/components/StepTracker/styles.js +114 -0
- package/lib/components/Table/Body.d.ts.map +1 -1
- package/lib/components/Table/Body.js +2 -5
- package/lib/components/Table/Container.d.ts.map +1 -1
- package/lib/components/Table/Container.js +6 -1
- package/lib/components/Table/Grip.d.ts +6 -2
- package/lib/components/Table/Grip.d.ts.map +1 -1
- package/lib/components/Table/Grip.js +9 -3
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Tabs/Tab/index.d.ts +13 -0
- package/lib/components/Tabs/Tab/index.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/index.js +94 -0
- package/lib/components/Tabs/Tab/schema.d.ts +3 -0
- package/lib/components/Tabs/Tab/schema.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/styles.d.ts +7 -0
- package/lib/components/Tabs/Tab/styles.d.ts.map +1 -0
- package/lib/components/Tabs/Tab/styles.js +37 -0
- package/lib/components/Tabs/context.d.ts +2 -2
- package/lib/components/Tabs/context.d.ts.map +1 -1
- package/lib/components/Tabs/context.js +1 -1
- package/lib/components/Tabs/index.d.ts +17 -6
- package/lib/components/Tabs/index.d.ts.map +1 -1
- package/lib/components/Tabs/index.js +104 -163
- package/lib/components/Tabs/index.test.js +54 -2
- package/lib/components/Tabs/styles.d.ts +4 -0
- package/lib/components/Tabs/styles.d.ts.map +1 -0
- package/lib/components/Tabs/styles.js +35 -0
- package/lib/components/Tag/Action.d.ts +4 -0
- package/lib/components/Tag/Action.d.ts.map +1 -0
- package/lib/components/Tag/Action.js +39 -0
- package/lib/components/Tag/constants.d.ts +2 -2
- package/lib/components/Tag/constants.d.ts.map +1 -1
- package/lib/components/Tag/constants.js +4 -4
- package/lib/components/Tag/index.d.ts +1 -3
- package/lib/components/Tag/index.d.ts.map +1 -1
- package/lib/components/Tag/index.js +40 -97
- package/lib/components/Tag/index.test.js +239 -2
- package/lib/components/Tag/propTypes.d.ts +4 -1
- package/lib/components/Tag/propTypes.d.ts.map +1 -1
- package/lib/components/Tag/propTypes.js +5 -2
- package/lib/components/Tag/schema.d.ts.map +1 -1
- package/lib/components/Tag/schema.js +3 -1
- package/lib/components/Tag/styles.d.ts +13 -0
- package/lib/components/Tag/styles.d.ts.map +1 -0
- package/lib/components/Tag/styles.js +133 -0
- package/lib/components/Tag/types.d.ts +11 -12
- package/lib/components/Tag/types.d.ts.map +1 -1
- package/lib/components/TagInput/index.d.ts +5 -0
- package/lib/components/TagInput/index.d.ts.map +1 -0
- package/lib/components/TagInput/index.js +363 -0
- package/lib/components/TagInput/index.test.js +1143 -0
- package/lib/components/TagInput/schema.d.ts +3 -0
- package/lib/components/TagInput/schema.d.ts.map +1 -0
- package/lib/components/TagInput/schema.js +36 -0
- package/lib/components/TagInput/styles.d.ts +10 -0
- package/lib/components/TagInput/styles.d.ts.map +1 -0
- package/lib/components/TagInput/styles.js +52 -0
- package/lib/components/TagInput/types.d.ts +21 -0
- package/lib/components/TagInput/types.d.ts.map +1 -0
- package/lib/components/TagInput/types.js +5 -0
- package/lib/components/Toggle/Fieldset.d.ts.map +1 -1
- package/lib/components/Toggle/Fieldset.js +20 -11
- package/lib/components/Toggle/Option.d.ts.map +1 -1
- package/lib/components/Toggle/Option.js +1 -1
- package/lib/components/Toggle/Slider.d.ts +1 -3
- package/lib/components/Toggle/Slider.d.ts.map +1 -1
- package/lib/components/Toggle/Slider.js +29 -24
- package/lib/components/Toggle/index.d.ts.map +1 -1
- package/lib/components/Toggle/index.js +2 -1
- package/lib/components/Toggle/propTypes.js +1 -1
- package/lib/components/Toggle/schema.js +1 -1
- package/lib/components/Toggle/types.d.ts +3 -2
- package/lib/components/Toggle/types.d.ts.map +1 -1
- package/lib/components/ToggleView/ToggleView.d.ts +5 -0
- package/lib/components/ToggleView/ToggleView.d.ts.map +1 -0
- package/lib/components/ToggleView/ToggleView.js +80 -0
- package/lib/components/ToggleView/index.d.ts +4 -0
- package/lib/components/ToggleView/index.d.ts.map +1 -0
- package/lib/components/ToggleView/index.js +33 -0
- package/lib/components/ToggleView/index.test.js +61 -0
- package/lib/components/ToggleView/schema.d.ts +3 -0
- package/lib/components/ToggleView/schema.d.ts.map +1 -0
- package/lib/components/ToggleView/schema.js +24 -0
- package/lib/components/ToggleView/styles.d.ts +6 -0
- package/lib/components/ToggleView/styles.d.ts.map +1 -0
- package/lib/components/ToggleView/styles.js +23 -0
- package/lib/components/ToggleView/types.d.ts +23 -0
- package/lib/components/ToggleView/types.d.ts.map +1 -0
- package/lib/components/ToggleView/types.js +12 -0
- package/lib/components/Tooltip/index.d.ts.map +1 -1
- package/lib/components/Tooltip/index.js +3 -13
- package/lib/components/Tooltip/schema.d.ts +3 -0
- package/lib/components/Tooltip/schema.d.ts.map +1 -0
- package/lib/components/Tooltip/schema.js +29 -0
- package/lib/components/TopNav/Menu/index.d.ts +1 -1
- package/lib/components/TopNav/index.d.ts +1 -1
- package/lib/components/Typography/withColors.d.ts +1 -1
- package/lib/components/Typography/withColors.d.ts.map +1 -1
- package/lib/components/Typography/withColors.js +1 -1
- package/lib/components/Wizard/index.d.ts +33 -0
- package/lib/components/Wizard/index.d.ts.map +1 -0
- package/lib/components/Wizard/index.js +161 -0
- package/lib/components/Wizard/index.test.js +940 -0
- package/lib/components/Wizard/schema.d.ts +3 -0
- package/lib/components/Wizard/schema.d.ts.map +1 -0
- package/lib/components/Wizard/schema.js +42 -0
- package/lib/components/Wizard/styles.d.ts +990 -0
- package/lib/components/Wizard/styles.d.ts.map +1 -0
- package/lib/components/Wizard/styles.js +79 -0
- package/lib/components/index.d.ts +11 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +196 -1
- package/lib/modifiers/palette.d.ts +36 -0
- package/lib/modifiers/palette.d.ts.map +1 -0
- package/lib/modifiers/palette.js +88 -0
- package/lib/modifiers/spacingSchema.d.ts.map +1 -1
- package/lib/modifiers/spacingSchema.js +29 -16
- package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts +2 -1
- package/lib/providers/ConfigProvider/utils/linkRenderer.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts +45 -1
- package/lib/providers/ConfigProvider/utils/translations.d.ts.map +1 -1
- package/lib/providers/ConfigProvider/utils/translations.js +46 -2
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +5 -0
- package/lib/utils/commonUIColors.d.ts +351 -3
- package/lib/utils/commonUIColors.d.ts.map +1 -1
- package/lib/utils/commonUIColors.js +6 -2
- package/lib/utils/useDebounce.d.ts +2 -0
- package/lib/utils/useDebounce.d.ts.map +1 -0
- package/lib/utils/useDebounce.js +37 -0
- package/lib/utils/useStackingContext.d.ts +12 -0
- package/lib/utils/useStackingContext.d.ts.map +1 -0
- package/lib/utils/useStackingContext.js +46 -0
- package/package.json +26 -13
- package/CHANGELOG.md +0 -796
- package/lib/atoms/OptionsList/Category.d.ts +0 -4
- package/lib/atoms/OptionsList/Category.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Category.js +0 -53
- package/lib/atoms/OptionsList/Option.d.ts.map +0 -1
- package/lib/atoms/OptionsList/Option.js +0 -197
- package/lib/components/Tabs/Tab.d.ts +0 -5
- package/lib/components/Tabs/Tab.d.ts.map +0 -1
- package/lib/components/Tabs/Tab.js +0 -109
- package/lib/components/Tabs/schema.tab.d.ts.map +0 -1
- package/lib/components/Tabs/types.d.ts +0 -27
- package/lib/components/Tabs/types.d.ts.map +0 -1
- package/lib/components/Tag/ActionButton.d.ts +0 -5
- package/lib/components/Tag/ActionButton.d.ts.map +0 -1
- package/lib/components/Tag/ActionButton.js +0 -56
- /package/lib/components/{Tabs → Link}/types.js +0 -0
- /package/lib/components/Tabs/{schema.tab.js → Tab/schema.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/Calendar/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/Calendar/index.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,cAAc,EAAgB,cAAc,EAAE,MAAM,SAAS,CAAC;AAIvE,UAAU,iBAAiB;IACzB,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IACnC,eAAe,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,MAAM,CAAC;CACpD;AAED,wBAAgB,gBAAgB,IAAI,iBAAiB,CA0BpD;AA0DD,iBAAS,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAqLpD;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -12,12 +12,16 @@ var _range = _interopRequireDefault(require("lodash/range"));
|
|
|
12
12
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
|
|
15
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
16
|
+
|
|
15
17
|
var _ArrowLeft = _interopRequireDefault(require("@decisiv/iconix/lib/components/ArrowLeft"));
|
|
16
18
|
|
|
17
19
|
var _ArrowRight = _interopRequireDefault(require("@decisiv/iconix/lib/components/ArrowRight"));
|
|
18
20
|
|
|
19
21
|
var _Button = _interopRequireDefault(require("../../components/Button"));
|
|
20
22
|
|
|
23
|
+
var _Tooltip = _interopRequireDefault(require("../../components/Tooltip"));
|
|
24
|
+
|
|
21
25
|
var _Flex = _interopRequireDefault(require("../../components/Flex"));
|
|
22
26
|
|
|
23
27
|
var _Grid = _interopRequireDefault(require("../../components/Grid"));
|
|
@@ -117,9 +121,14 @@ function getSelectedRangeModifier(currentDisplayDate, selectedDates) {
|
|
|
117
121
|
return undefined;
|
|
118
122
|
}
|
|
119
123
|
|
|
124
|
+
var LabelWrapper = (0, _styledComponents.default)(_Typography.P).withConfig({
|
|
125
|
+
displayName: "Calendar__LabelWrapper",
|
|
126
|
+
componentId: "sc-13y7p8y-0"
|
|
127
|
+
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
|
|
128
|
+
|
|
120
129
|
function Calendar(props) {
|
|
121
130
|
var focusOnRender = props.focusOnRender,
|
|
122
|
-
|
|
131
|
+
width = props.width,
|
|
123
132
|
selected = props.selected,
|
|
124
133
|
viewMonth = props.viewMonth;
|
|
125
134
|
|
|
@@ -137,6 +146,8 @@ function Calendar(props) {
|
|
|
137
146
|
|
|
138
147
|
var translate = (0, _useTranslations.default)();
|
|
139
148
|
|
|
149
|
+
var labelRef = _react.default.useRef(null);
|
|
150
|
+
|
|
140
151
|
var firstRender = _react.default.useRef(true);
|
|
141
152
|
|
|
142
153
|
var firstTabbableElementRef = _react.default.useRef(null);
|
|
@@ -147,6 +158,11 @@ function Calendar(props) {
|
|
|
147
158
|
var isCurrentMonth = today.getMonth() + 1 === displayedMonth;
|
|
148
159
|
var isCurrentYear = today.getFullYear() === displayedYear;
|
|
149
160
|
|
|
161
|
+
var _useState = (0, _react.useState)(false),
|
|
162
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
163
|
+
showTooltip = _useState2[0],
|
|
164
|
+
setShowTooltip = _useState2[1];
|
|
165
|
+
|
|
150
166
|
_react.default.useEffect(function () {
|
|
151
167
|
if (focusOnRender && firstRender) {
|
|
152
168
|
firstRender.current = false; // @ts-ignore
|
|
@@ -155,13 +171,30 @@ function Calendar(props) {
|
|
|
155
171
|
}
|
|
156
172
|
}, [focusOnRender]);
|
|
157
173
|
|
|
174
|
+
_react.default.useLayoutEffect(function () {
|
|
175
|
+
var elem = labelRef.current;
|
|
176
|
+
|
|
177
|
+
if (elem && elem.clientWidth < elem.scrollWidth) {
|
|
178
|
+
setShowTooltip(true);
|
|
179
|
+
} else {
|
|
180
|
+
setShowTooltip(false);
|
|
181
|
+
}
|
|
182
|
+
}, [label]);
|
|
183
|
+
|
|
158
184
|
return _react.default.createElement(_Grid.default.Container, {
|
|
159
185
|
paddingY: 1
|
|
160
186
|
}, _react.default.createElement(_Grid.default.Row, {
|
|
161
187
|
alignment: "middle",
|
|
162
|
-
minWidth:
|
|
188
|
+
minWidth: "300px",
|
|
189
|
+
width: width,
|
|
163
190
|
paddingBottom: 1
|
|
164
|
-
}, _react.default.createElement(_Grid.default.Column,
|
|
191
|
+
}, _react.default.createElement(_Grid.default.Column, {
|
|
192
|
+
maxWidth: "calc(100% - 112px)"
|
|
193
|
+
}, _react.default.createElement(LabelWrapper, {
|
|
194
|
+
ref: labelRef
|
|
195
|
+
}, label), showTooltip && _react.default.createElement(_Tooltip.default, {
|
|
196
|
+
target: labelRef
|
|
197
|
+
}, label)), _react.default.createElement(_Flex.default, {
|
|
165
198
|
paddingRight: 1
|
|
166
199
|
}, _react.default.createElement(_Button.default, {
|
|
167
200
|
"aria-label": "",
|
|
@@ -191,7 +224,7 @@ function Calendar(props) {
|
|
|
191
224
|
}, _react.default.createElement(_DateGrid.default, null, _react.default.createElement("table", null, _react.default.createElement("thead", null, _react.default.createElement("tr", null, (0, _range.default)(0, 7).map(function (dayOfWeekIndex) {
|
|
192
225
|
return _react.default.createElement("th", {
|
|
193
226
|
key: "".concat(label, "-day-of-week-header-idx-").concat(dayOfWeekIndex)
|
|
194
|
-
}, _react.default.createElement(
|
|
227
|
+
}, _react.default.createElement(LabelWrapper, {
|
|
195
228
|
as: "span",
|
|
196
229
|
size: "small",
|
|
197
230
|
shade: 1
|
|
@@ -222,7 +255,7 @@ function Calendar(props) {
|
|
|
222
255
|
disabled: isDisabled,
|
|
223
256
|
"aria-disabled": isDisabled,
|
|
224
257
|
type: "button"
|
|
225
|
-
}, _react.default.createElement(
|
|
258
|
+
}, _react.default.createElement(LabelWrapper, {
|
|
226
259
|
as: "span",
|
|
227
260
|
color: "inherit"
|
|
228
261
|
}, day.date))));
|
|
@@ -72,9 +72,9 @@ describe('Calendar', function () {
|
|
|
72
72
|
})),
|
|
73
73
|
queryByText = _render2.queryByText;
|
|
74
74
|
|
|
75
|
-
expect(queryByText('
|
|
75
|
+
expect(queryByText('Today')).toBeInTheDocument();
|
|
76
76
|
|
|
77
|
-
_react2.fireEvent.click(queryByText('
|
|
77
|
+
_react2.fireEvent.click(queryByText('Today'));
|
|
78
78
|
|
|
79
79
|
var today = new Date();
|
|
80
80
|
expect(queryByText("".concat(months[today.getMonth()], " ").concat(today.getFullYear()))).toBeInTheDocument();
|
|
@@ -83,7 +83,7 @@ describe('Calendar', function () {
|
|
|
83
83
|
var _render3 = render(_react.default.createElement(_.default, null)),
|
|
84
84
|
queryByText = _render3.queryByText;
|
|
85
85
|
|
|
86
|
-
expect(queryByText('
|
|
86
|
+
expect(queryByText('Today').closest('button')).toHaveAttribute('disabled');
|
|
87
87
|
});
|
|
88
88
|
it('renders the "go to today" button as enabled if its not in the current month', function () {
|
|
89
89
|
var _render4 = render(_react.default.createElement(_.default, {
|
|
@@ -94,7 +94,7 @@ describe('Calendar', function () {
|
|
|
94
94
|
})),
|
|
95
95
|
queryByText = _render4.queryByText;
|
|
96
96
|
|
|
97
|
-
expect(queryByText('
|
|
97
|
+
expect(queryByText('Today').closest('button')).not.toHaveAttribute('disabled');
|
|
98
98
|
});
|
|
99
99
|
it('renders the "go to today" button as enabled if its in the current month of a different year', function () {
|
|
100
100
|
var today = new Date();
|
|
@@ -107,7 +107,7 @@ describe('Calendar', function () {
|
|
|
107
107
|
})),
|
|
108
108
|
queryByText = _render5.queryByText;
|
|
109
109
|
|
|
110
|
-
expect(queryByText('
|
|
110
|
+
expect(queryByText('Today').closest('button')).not.toHaveAttribute('disabled');
|
|
111
111
|
});
|
|
112
112
|
it('renders a button to view the previous month', function () {
|
|
113
113
|
var _rtlRender = (0, _react2.render)(_react.default.createElement(_ArrowLeft.default, null)),
|
|
@@ -90,7 +90,7 @@ interface TBaseCalendarProps {
|
|
|
90
90
|
focusOnRender?: boolean;
|
|
91
91
|
onChange?: (date?: Date | TSelectedDates) => void;
|
|
92
92
|
onClick?: MouseEventHandler;
|
|
93
|
-
|
|
93
|
+
width?: string;
|
|
94
94
|
viewMonth?: Date | TDisplayMonth;
|
|
95
95
|
disabledDateRules?: TDisabledDateRule[];
|
|
96
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atoms/Calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM9D,oBAAY,MAAM,GAAG,MAAM,CAAC;AAM5B,oBAAY,KAAK,GACb,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,CAAC,GACD,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,GACF,EAAE,CAAC;AAMP,oBAAY,iBAAiB,GACzB,iBAAiB,GACjB,mBAAmB,GACnB,YAAY,GACZ,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CA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AuB,GACvB,yBAAyB,GACzB,mBAAmB,GACnB,wBAAwB,CAAC;AAE7B,UAAU,kBAAkB;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,cAAc,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC;IACjC,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,UAAU,0BAA2B,SAAQ,kBAAkB;IAC7D,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,UAAU,yBAA0B,SAAQ,kBAAkB;IAC5D,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,oBAAY,cAAc,GACtB,0BAA0B,GAC1B,yBAAyB,CAAC"}
|
|
@@ -598,7 +598,8 @@ export declare const IconContainer: import("styled-components").StyledComponent<
|
|
|
598
598
|
alignItems: string;
|
|
599
599
|
justifyContent: string;
|
|
600
600
|
} & {
|
|
601
|
-
hiddenLabel
|
|
601
|
+
hiddenLabel?: boolean | undefined;
|
|
602
|
+
rightPlacement?: boolean | undefined;
|
|
602
603
|
}, "alignItems" | "justifyContent">;
|
|
603
604
|
export declare const InputInnerContainer: import("styled-components").StyledComponent<"div", any, Partial<{
|
|
604
605
|
readonly alignContent?: string | import("../../utils/dynamicModifiers").DynamicResponsiveModifiersProp<string, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Containers.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/Containers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAuBzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4B/B,CAAC"}
|
|
@@ -11,6 +11,8 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
11
11
|
|
|
12
12
|
var _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
|
|
13
13
|
|
|
14
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
15
|
+
|
|
14
16
|
var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
|
|
15
17
|
|
|
16
18
|
var _dynamicModifiers = require("../../utils/dynamicModifiers");
|
|
@@ -51,7 +53,7 @@ var IconContainer = (0, _styledComponents.default)(_Flex.default).attrs({
|
|
|
51
53
|
}).withConfig({
|
|
52
54
|
displayName: "Containers__IconContainer",
|
|
53
55
|
componentId: "me30fz-2"
|
|
54
|
-
})(["color:", ";margin:16px 0 6px 15px;", ""], (0, _toColorString.default)(_color.default.base.alaskanHusky), (0, _styleModifiers.when)('hiddenLabel', (0, _styledComponents.css)(["margin:8px 0 8px 10px;"])));
|
|
56
|
+
})(["color:", ";margin:16px 0 6px 15px;", " ", ""], (0, _toColorString.default)(_color.default.base.alaskanHusky), (0, _styleModifiers.when)('rightPlacement', (0, _styledComponents.css)(["margin:0;align-items:center;margin-right:", ";margin-left:", ";"], (0, _rem.default)(_spacing.default.base * 0.8), (0, _rem.default)(_spacing.default.base * 0.8))), (0, _styleModifiers.when)('hiddenLabel', (0, _styledComponents.css)(["margin:8px 0 8px 10px;"])));
|
|
55
57
|
exports.IconContainer = IconContainer;
|
|
56
58
|
var InputInnerContainer = (0, _styledComponents.default)(_Flex.default).attrs({
|
|
57
59
|
flex: 1,
|
|
@@ -4,7 +4,7 @@ export interface HelpMessageProps {
|
|
|
4
4
|
helpMessage?: string;
|
|
5
5
|
maxLength?: number;
|
|
6
6
|
showCharacterCount?: boolean;
|
|
7
|
-
contentLength
|
|
7
|
+
contentLength?: number;
|
|
8
8
|
}
|
|
9
9
|
declare function HelpMessage(props: HelpMessageProps): JSX.Element | null;
|
|
10
10
|
declare namespace HelpMessage {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpMessage.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/HelpMessage.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AASnC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"HelpMessage.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/HelpMessage.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AASnC,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA6ChE;kBA7CQ,WAAW;;;;;;;;;;;;;;AA8DpB,eAAe,WAAW,CAAC"}
|
|
@@ -28,16 +28,32 @@ function HelpMessage(props) {
|
|
|
28
28
|
var helpMessage = props.helpMessage,
|
|
29
29
|
maxLength = props.maxLength,
|
|
30
30
|
showCharacterCount = props.showCharacterCount,
|
|
31
|
-
contentLength = props.contentLength
|
|
31
|
+
_props$contentLength = props.contentLength,
|
|
32
|
+
contentLength = _props$contentLength === void 0 ? 0 : _props$contentLength;
|
|
32
33
|
var translate = (0, _useTranslations.default)();
|
|
33
|
-
var showCount = Boolean(maxLength && showCharacterCount);
|
|
34
|
+
var showCount = Boolean(maxLength && showCharacterCount);
|
|
35
|
+
var countSurpassed = maxLength && contentLength > maxLength;
|
|
36
|
+
|
|
37
|
+
var countMessage = _react.default.useMemo(function () {
|
|
38
|
+
if (!showCount) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (countSurpassed) {
|
|
43
|
+
return translate(undefined, 'textArea.countMessageOver', {
|
|
44
|
+
surplus: _react.default.createElement(RemainingCount, null, contentLength - maxLength),
|
|
45
|
+
max: "".concat(maxLength)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return translate(undefined, 'textArea.countMessage', {
|
|
50
|
+
remaining: _react.default.createElement(RemainingCount, null, maxLength - contentLength),
|
|
51
|
+
max: "".concat(maxLength)
|
|
52
|
+
});
|
|
53
|
+
}, [contentLength, countSurpassed, maxLength, showCount, translate]);
|
|
34
54
|
|
|
35
|
-
var countMessage = showCount && translate(undefined, 'textArea.countMessage', {
|
|
36
|
-
remaining: _react.default.createElement(RemainingCount, null, maxLength - contentLength),
|
|
37
|
-
max: "".concat(maxLength)
|
|
38
|
-
});
|
|
39
55
|
return helpMessage || showCount ? _react.default.createElement(_Message.default, {
|
|
40
|
-
intent:
|
|
56
|
+
intent: countSurpassed ? 'warning' : 'help'
|
|
41
57
|
}, helpMessage, helpMessage && showCount && _react.default.createElement("br", null), countMessage) : null;
|
|
42
58
|
}
|
|
43
59
|
|
|
@@ -23,6 +23,7 @@ export interface BaseInputFieldProps {
|
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
helpMessage?: string;
|
|
25
25
|
icon?: (props: IconProps) => JSX.Element;
|
|
26
|
+
secondaryElement?: JSX.Element;
|
|
26
27
|
id?: string;
|
|
27
28
|
inputContainerRef?: Ref<HTMLDivElement>;
|
|
28
29
|
label: string;
|
|
@@ -41,10 +42,14 @@ export interface BaseInputFieldProps {
|
|
|
41
42
|
showCharacterCount?: boolean;
|
|
42
43
|
hideLabel?: boolean;
|
|
43
44
|
style?: React.CSSProperties;
|
|
44
|
-
value
|
|
45
|
+
value?: string;
|
|
45
46
|
warningMessage?: string;
|
|
47
|
+
withWarningIntent?: boolean;
|
|
46
48
|
isTextArea?: boolean;
|
|
47
49
|
multiple?: boolean;
|
|
50
|
+
showContainerCount?: boolean;
|
|
51
|
+
containerMaxCount?: number;
|
|
52
|
+
containerCount?: number;
|
|
48
53
|
}
|
|
49
54
|
declare const InputFieldWithRef: RefForwardingComponent<Ref<any>, BaseInputFieldProps>;
|
|
50
55
|
export default InputFieldWithRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,GAAG,EACH,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,aAAa,EAEb,GAAG,EACH,sBAAsB,EAIvB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAqB5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,iBAAi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AkB,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA8LD,QAAA,MAAM,iBAAiB,EAAE,sBAAsB,CAC7C,GAAG,CAAC,GAAG,CAAC,EACR,mBAAmB,CACK,CAAC;AAQ3B,eAAe,iBAAiB,CAAC"}
|
|
@@ -33,6 +33,8 @@ var _RequiredIcon = _interopRequireDefault(require("../RequiredIcon"));
|
|
|
33
33
|
|
|
34
34
|
var _HelpMessage = _interopRequireDefault(require("./HelpMessage"));
|
|
35
35
|
|
|
36
|
+
var _styles = require("./styles");
|
|
37
|
+
|
|
36
38
|
var _schema = _interopRequireDefault(require("./schema"));
|
|
37
39
|
|
|
38
40
|
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; } }
|
|
@@ -66,6 +68,7 @@ function InputField(props, targetRef) {
|
|
|
66
68
|
hideLabel = _props$hideLabel === void 0 ? false : _props$hideLabel,
|
|
67
69
|
helpMessage = props.helpMessage,
|
|
68
70
|
IconComponent = props.icon,
|
|
71
|
+
secondaryElement = props.secondaryElement,
|
|
69
72
|
id = props.id,
|
|
70
73
|
inputContainerRef = props.inputContainerRef,
|
|
71
74
|
label = props.label,
|
|
@@ -84,11 +87,15 @@ function InputField(props, targetRef) {
|
|
|
84
87
|
style = props.style,
|
|
85
88
|
value = props.value,
|
|
86
89
|
warningMessage = props.warningMessage,
|
|
90
|
+
withWarningIntent = props.withWarningIntent,
|
|
87
91
|
_props$isTextArea = props.isTextArea,
|
|
88
92
|
isTextArea = _props$isTextArea === void 0 ? false : _props$isTextArea,
|
|
89
93
|
_props$multiple = props.multiple,
|
|
90
94
|
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
91
|
-
|
|
95
|
+
showContainerCount = props.showContainerCount,
|
|
96
|
+
containerCount = props.containerCount,
|
|
97
|
+
containerMaxCount = props.containerMaxCount,
|
|
98
|
+
rest = _objectWithoutProperties(props, ["children", "cursor", "disabled", "hideLabel", "helpMessage", "icon", "secondaryElement", "id", "inputContainerRef", "label", "labelId", "maxLength", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "overflow", "readOnly", "required", "requiredMessage", "showCharacterCount", "style", "value", "warningMessage", "withWarningIntent", "isTextArea", "multiple", "showContainerCount", "containerCount", "containerMaxCount"]);
|
|
92
99
|
|
|
93
100
|
var fallbackTargetRef = (0, _react.useRef)(null);
|
|
94
101
|
var finalTargetRef = targetRef || fallbackTargetRef;
|
|
@@ -148,10 +155,16 @@ function InputField(props, targetRef) {
|
|
|
148
155
|
}
|
|
149
156
|
};
|
|
150
157
|
|
|
158
|
+
(0, _react.useEffect)(function () {
|
|
159
|
+
if (value) {
|
|
160
|
+
setContentLength(value.length || 0);
|
|
161
|
+
}
|
|
162
|
+
}, [value]);
|
|
151
163
|
var targetId = (0, _useUniqueId.default)(id, 'input-field-target-');
|
|
152
164
|
var labelId = labelIdProp || "".concat(targetId, "-label");
|
|
153
165
|
var translate = (0, _useTranslations.default)();
|
|
154
166
|
var requiredMessage = translate(requiredMessageProp, 'textField.requiredMessage');
|
|
167
|
+
var isCountOverflow = !!maxLength && contentLength > maxLength;
|
|
155
168
|
return _react.default.createElement(_Containers.InputFieldContainer, {
|
|
156
169
|
overflow: overflow,
|
|
157
170
|
style: style
|
|
@@ -159,7 +172,7 @@ function InputField(props, targetRef) {
|
|
|
159
172
|
cursor: cursor,
|
|
160
173
|
hiddenLabel: hideLabel,
|
|
161
174
|
disabled: disabled,
|
|
162
|
-
hasWarning: !!warningMessage,
|
|
175
|
+
hasWarning: !!warningMessage || withWarningIntent || isCountOverflow,
|
|
163
176
|
isFocused: isFocused,
|
|
164
177
|
readOnly: readOnly,
|
|
165
178
|
ref: inputContainerRef,
|
|
@@ -186,7 +199,9 @@ function InputField(props, targetRef) {
|
|
|
186
199
|
target: _react.default.createElement(_RequiredIcon.default, {
|
|
187
200
|
"aria-label": requiredMessage
|
|
188
201
|
})
|
|
189
|
-
}, requiredMessage)
|
|
202
|
+
}, requiredMessage), showContainerCount && containerMaxCount !== undefined && _react.default.createElement(_styles.ContentCounter, {
|
|
203
|
+
surpassed: (containerCount || 0) > containerMaxCount
|
|
204
|
+
}, "".concat(containerCount || 0, "/").concat(containerMaxCount)))), children(_objectSpread({}, rest, {
|
|
190
205
|
'aria-labelledby': labelId,
|
|
191
206
|
disabled: disabled,
|
|
192
207
|
id: targetId,
|
|
@@ -199,7 +214,9 @@ function InputField(props, targetRef) {
|
|
|
199
214
|
ref: finalTargetRef,
|
|
200
215
|
required: required,
|
|
201
216
|
value: value
|
|
202
|
-
})))
|
|
217
|
+
}))), secondaryElement && _react.default.createElement(_Containers.IconContainer, {
|
|
218
|
+
rightPlacement: true
|
|
219
|
+
}, secondaryElement)), warningMessage && _react.default.createElement(_Message.default, {
|
|
203
220
|
intent: "warning"
|
|
204
221
|
}, warningMessage), _react.default.createElement(_HelpMessage.default, {
|
|
205
222
|
contentLength: contentLength,
|
|
@@ -87,5 +87,58 @@ describe('InputField', function () {
|
|
|
87
87
|
|
|
88
88
|
expect(getByText(textFinder("You have 100 characters left (100 max)."))).toBeTruthy();
|
|
89
89
|
});
|
|
90
|
+
it('updates content length when value changes', function () {
|
|
91
|
+
var label = 'label';
|
|
92
|
+
var initialValue = 'Initial text';
|
|
93
|
+
|
|
94
|
+
var _render2 = render(_react.default.createElement(_.default, {
|
|
95
|
+
label: label,
|
|
96
|
+
value: initialValue,
|
|
97
|
+
showCharacterCount: true,
|
|
98
|
+
maxLength: 100
|
|
99
|
+
}, function (p) {
|
|
100
|
+
return _react.default.createElement(Dummy, p);
|
|
101
|
+
})),
|
|
102
|
+
getByText = _render2.getByText,
|
|
103
|
+
rerender = _render2.rerender;
|
|
104
|
+
|
|
105
|
+
expect(getByText(textFinder("You have ".concat(100 - initialValue.length, " characters left (100 max).")))).toBeTruthy();
|
|
106
|
+
rerender(_react.default.createElement(_.default, {
|
|
107
|
+
label: label,
|
|
108
|
+
value: "".concat(initialValue, "abc"),
|
|
109
|
+
showCharacterCount: true,
|
|
110
|
+
maxLength: 100
|
|
111
|
+
}, function (p) {
|
|
112
|
+
return _react.default.createElement(Dummy, p);
|
|
113
|
+
}));
|
|
114
|
+
expect(getByText(textFinder("You have ".concat(100 - (initialValue.length + 3), " characters left (100 max).")))).toBeTruthy();
|
|
115
|
+
});
|
|
116
|
+
it('shows overflow message when values is larger than maxLength', function () {
|
|
117
|
+
var label = 'label';
|
|
118
|
+
var initialValue = 'Initial text';
|
|
119
|
+
|
|
120
|
+
var _render3 = render(_react.default.createElement(_.default, {
|
|
121
|
+
label: label,
|
|
122
|
+
value: initialValue,
|
|
123
|
+
showCharacterCount: true,
|
|
124
|
+
maxLength: 15
|
|
125
|
+
}, function (p) {
|
|
126
|
+
return _react.default.createElement(Dummy, p);
|
|
127
|
+
})),
|
|
128
|
+
getByText = _render3.getByText,
|
|
129
|
+
rerender = _render3.rerender;
|
|
130
|
+
|
|
131
|
+
expect(getByText(textFinder("You have ".concat(15 - initialValue.length, " characters left (15 max).")))).toBeTruthy();
|
|
132
|
+
var newValue = "".concat(initialValue, " with some additional text");
|
|
133
|
+
rerender(_react.default.createElement(_.default, {
|
|
134
|
+
label: label,
|
|
135
|
+
value: newValue,
|
|
136
|
+
showCharacterCount: true,
|
|
137
|
+
maxLength: 15
|
|
138
|
+
}, function (p) {
|
|
139
|
+
return _react.default.createElement(Dummy, p);
|
|
140
|
+
}));
|
|
141
|
+
expect(getByText(textFinder("You are ".concat(newValue.length - 15, " characters over the limit (15 max).")))).toBeTruthy();
|
|
142
|
+
});
|
|
90
143
|
});
|
|
91
144
|
});
|
|
@@ -20,9 +20,9 @@ schema.makePropTypes = function () {
|
|
|
20
20
|
icon: _reactDesc.PropTypes.element.description('An icon to be rendered on the left side of the input.'),
|
|
21
21
|
id: _reactDesc.PropTypes.string.description('A unique ID for the input.'),
|
|
22
22
|
inputContainerRef: _reactDesc.PropTypes.oneOfType([// Either a function
|
|
23
|
-
_reactDesc.PropTypes.func, // Or the instance of a DOM native element (
|
|
23
|
+
_reactDesc.PropTypes.func, // Or the instance of a DOM native element (current will be an instance of HTMLDivElement)
|
|
24
24
|
_reactDesc.PropTypes.shape({
|
|
25
|
-
current: _reactDesc.PropTypes.
|
|
25
|
+
current: _reactDesc.PropTypes.any
|
|
26
26
|
})]).description('A reference to the container component for the input field.'),
|
|
27
27
|
label: _reactDesc.PropTypes.string.description('A label for the input field.').isRequired,
|
|
28
28
|
labelId: _reactDesc.PropTypes.string.description("A unique ID for the input's label. This will be used in some ARIA attributes as well."),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
interface SpanProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
surpassed?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const ContentCounter: import("styled-components").StyledComponent<"span", any, SpanProps, never>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AASvC,UAAU,SAAU,SAAQ,cAAc,CAAC,eAAe,CAAC;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAGD,eAAO,MAAM,cAAc,4EAS1B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ContentCounter = 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 _color = _interopRequireDefault(require("@decisiv/design-tokens/lib/color"));
|
|
15
|
+
|
|
16
|
+
var _spacing = _interopRequireDefault(require("@decisiv/design-tokens/lib/spacing"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
23
|
+
var ContentCounter = _styledComponents.default.span.withConfig({
|
|
24
|
+
displayName: "styles__ContentCounter",
|
|
25
|
+
componentId: "sc-1mkcosa-0"
|
|
26
|
+
})(["position:absolute;right:", ";", ""], (0, _rem.default)(_spacing.default.base), function (_ref) {
|
|
27
|
+
var surpassed = _ref.surpassed;
|
|
28
|
+
return surpassed && (0, _styledComponents.css)(["color:", ";"], (0, _toColorString.default)(_color.default.status.danger.medium));
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
exports.ContentCounter = ContentCounter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/atoms/OptionsList/Category/index.tsx"],"names":[],"mappings":";AAUA,QAAA,MAAM,QAAQ,+HA4Eb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 _reactBeautifulDnd = require("react-beautiful-dnd");
|
|
11
|
+
|
|
12
|
+
var _ConfigProvider = require("../../../providers/ConfigProvider");
|
|
13
|
+
|
|
14
|
+
var _Option = _interopRequireDefault(require("../Option"));
|
|
15
|
+
|
|
16
|
+
var _utils = require("../utils");
|
|
17
|
+
|
|
18
|
+
var _styles = require("./styles");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
var Category = function Category(_ref) {
|
|
25
|
+
var borderRadius = _ref.borderRadius,
|
|
26
|
+
label = _ref.label,
|
|
27
|
+
items = _ref.items,
|
|
28
|
+
_ref$indexOffset = _ref.indexOffset,
|
|
29
|
+
indexOffset = _ref$indexOffset === void 0 ? 0 : _ref$indexOffset,
|
|
30
|
+
showCheckbox = _ref.showCheckbox,
|
|
31
|
+
isDragEnabled = _ref.isDragEnabled,
|
|
32
|
+
size = _ref.size;
|
|
33
|
+
|
|
34
|
+
var _useConfig = (0, _ConfigProvider.useConfig)(),
|
|
35
|
+
createPortal = _useConfig.createPortal; // Render a draggable item, using a portal if it's being dragged
|
|
36
|
+
// to avoid issues with parent containers having transform: *.
|
|
37
|
+
// See; https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/reparenting.md
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var renderDraggable = function renderDraggable(item, index) {
|
|
41
|
+
var id = (0, _utils.getId)(item);
|
|
42
|
+
return _react.default.createElement(_reactBeautifulDnd.Draggable, {
|
|
43
|
+
key: id,
|
|
44
|
+
draggableId: id,
|
|
45
|
+
index: index,
|
|
46
|
+
isDragDisabled: !isDragEnabled
|
|
47
|
+
}, function (provided, snapshot) {
|
|
48
|
+
var draggableElement = _react.default.createElement(_Option.default, _extends({}, item, {
|
|
49
|
+
id: id,
|
|
50
|
+
borderRadius: borderRadius,
|
|
51
|
+
showCheckbox: showCheckbox,
|
|
52
|
+
size: size,
|
|
53
|
+
providerRef: provided.innerRef,
|
|
54
|
+
isDragEnabled: isDragEnabled,
|
|
55
|
+
draggableProps: provided.draggableProps,
|
|
56
|
+
dragHandleProps: provided.dragHandleProps
|
|
57
|
+
}));
|
|
58
|
+
|
|
59
|
+
if (snapshot.isDragging) {
|
|
60
|
+
return createPortal(draggableElement);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return draggableElement;
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_reactBeautifulDnd.Draggable, {
|
|
68
|
+
key: "category-".concat(label),
|
|
69
|
+
draggableId: "category-".concat(label),
|
|
70
|
+
index: indexOffset,
|
|
71
|
+
isDragDisabled: true
|
|
72
|
+
}, function (provided) {
|
|
73
|
+
return _react.default.createElement(_styles.StyledCategory, _extends({
|
|
74
|
+
size: size,
|
|
75
|
+
ref: provided.innerRef
|
|
76
|
+
}, provided.draggableProps, provided.dragHandleProps, {
|
|
77
|
+
role: "option"
|
|
78
|
+
}), label);
|
|
79
|
+
}), items.map(function (subItem, index) {
|
|
80
|
+
return renderDraggable(subItem, indexOffset + index + 1);
|
|
81
|
+
}));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var _default = Category;
|
|
85
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/atoms/OptionsList/Category/styles.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAmB/C,eAAO,MAAM,cAAc;;yCAY1B,CAAC"}
|