@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
|
@@ -29,7 +29,7 @@ var _Containers = require("./Containers");
|
|
|
29
29
|
|
|
30
30
|
var _InputLabel = _interopRequireDefault(require("./InputLabel"));
|
|
31
31
|
|
|
32
|
-
var _RequiredIcon = _interopRequireDefault(require("
|
|
32
|
+
var _RequiredIcon = _interopRequireDefault(require("../RequiredIcon"));
|
|
33
33
|
|
|
34
34
|
var _HelpMessage = _interopRequireDefault(require("./HelpMessage"));
|
|
35
35
|
|
|
@@ -62,8 +62,11 @@ function InputField(props, targetRef) {
|
|
|
62
62
|
_props$cursor = props.cursor,
|
|
63
63
|
cursor = _props$cursor === void 0 ? 'text' : _props$cursor,
|
|
64
64
|
disabled = props.disabled,
|
|
65
|
+
_props$hideLabel = props.hideLabel,
|
|
66
|
+
hideLabel = _props$hideLabel === void 0 ? false : _props$hideLabel,
|
|
65
67
|
helpMessage = props.helpMessage,
|
|
66
68
|
IconComponent = props.icon,
|
|
69
|
+
secondaryElement = props.secondaryElement,
|
|
67
70
|
id = props.id,
|
|
68
71
|
inputContainerRef = props.inputContainerRef,
|
|
69
72
|
label = props.label,
|
|
@@ -82,7 +85,12 @@ function InputField(props, targetRef) {
|
|
|
82
85
|
style = props.style,
|
|
83
86
|
value = props.value,
|
|
84
87
|
warningMessage = props.warningMessage,
|
|
85
|
-
|
|
88
|
+
withWarningIntent = props.withWarningIntent,
|
|
89
|
+
_props$isTextArea = props.isTextArea,
|
|
90
|
+
isTextArea = _props$isTextArea === void 0 ? false : _props$isTextArea,
|
|
91
|
+
_props$multiple = props.multiple,
|
|
92
|
+
multiple = _props$multiple === void 0 ? false : _props$multiple,
|
|
93
|
+
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"]);
|
|
86
94
|
|
|
87
95
|
var fallbackTargetRef = (0, _react.useRef)(null);
|
|
88
96
|
var finalTargetRef = targetRef || fallbackTargetRef;
|
|
@@ -132,8 +140,9 @@ function InputField(props, targetRef) {
|
|
|
132
140
|
};
|
|
133
141
|
|
|
134
142
|
var onChangeHandler = function onChangeHandler(event) {
|
|
135
|
-
if (event && event.target
|
|
136
|
-
|
|
143
|
+
if (event && event.target) {
|
|
144
|
+
var targetValue = event.target.value;
|
|
145
|
+
setContentLength(targetValue ? targetValue.length : 0);
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
if (onChange) {
|
|
@@ -150,18 +159,25 @@ function InputField(props, targetRef) {
|
|
|
150
159
|
style: style
|
|
151
160
|
}, _react.default.createElement(_Containers.InputContainer, {
|
|
152
161
|
cursor: cursor,
|
|
162
|
+
hiddenLabel: hideLabel,
|
|
153
163
|
disabled: disabled,
|
|
154
|
-
hasWarning: !!warningMessage,
|
|
164
|
+
hasWarning: !!warningMessage || withWarningIntent,
|
|
155
165
|
isFocused: isFocused,
|
|
156
166
|
readOnly: readOnly,
|
|
157
167
|
ref: inputContainerRef,
|
|
158
168
|
onClick: onInputContainerClickHandler,
|
|
159
|
-
onKeyDown: onKeyDown
|
|
160
|
-
|
|
161
|
-
|
|
169
|
+
onKeyDown: onKeyDown,
|
|
170
|
+
isTextArea: isTextArea,
|
|
171
|
+
multiple: multiple
|
|
172
|
+
}, IconComponent && _react.default.createElement(_Containers.IconContainer, {
|
|
173
|
+
hiddenLabel: hideLabel
|
|
174
|
+
}, _react.default.createElement(IconComponent, null)), _react.default.createElement(_Containers.InputInnerContainer, {
|
|
175
|
+
hasIcon: !!IconComponent,
|
|
176
|
+
hiddenLabel: hideLabel
|
|
162
177
|
}, _react.default.createElement(_InputLabel.default, {
|
|
163
178
|
disabled: disabled,
|
|
164
179
|
htmlFor: targetId,
|
|
180
|
+
hidden: hideLabel,
|
|
165
181
|
id: labelId,
|
|
166
182
|
readOnly: readOnly,
|
|
167
183
|
onClick: function onClick(event) {
|
|
@@ -185,7 +201,9 @@ function InputField(props, targetRef) {
|
|
|
185
201
|
ref: finalTargetRef,
|
|
186
202
|
required: required,
|
|
187
203
|
value: value
|
|
188
|
-
})))
|
|
204
|
+
}))), secondaryElement && _react.default.createElement(_Containers.IconContainer, {
|
|
205
|
+
rightPlacement: true
|
|
206
|
+
}, secondaryElement)), warningMessage && _react.default.createElement(_Message.default, {
|
|
189
207
|
intent: "warning"
|
|
190
208
|
}, warningMessage), _react.default.createElement(_HelpMessage.default, {
|
|
191
209
|
contentLength: contentLength,
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@testing-library/react");
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require("."));
|
|
10
|
+
|
|
11
|
+
var _providers = require("../../providers");
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
21
|
+
describe('InputField', function () {
|
|
22
|
+
var wrapper = function wrapper(_ref) {
|
|
23
|
+
var children = _ref.children;
|
|
24
|
+
return _react.default.createElement(_providers.ConfigProvider, null, children);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var render = function render(ui, options) {
|
|
28
|
+
return (0, _react2.render)(ui, _objectSpread({}, options, {
|
|
29
|
+
wrapper: wrapper
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var Dummy = _styledComponents.default.textarea.attrs({
|
|
34
|
+
'data-testid': 'test-textarea'
|
|
35
|
+
}).withConfig({
|
|
36
|
+
displayName: "indextest__Dummy",
|
|
37
|
+
componentId: "i3buhi-0"
|
|
38
|
+
})([""]);
|
|
39
|
+
|
|
40
|
+
var textFinder = function textFinder(text) {
|
|
41
|
+
return function (content, node) {
|
|
42
|
+
var hasText = function hasText(n) {
|
|
43
|
+
return n.textContent === text;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var nodeHasText = hasText(node);
|
|
47
|
+
var childrenDontHaveText = Array.from(node.children).every(function (child) {
|
|
48
|
+
return !hasText(child);
|
|
49
|
+
});
|
|
50
|
+
return nodeHasText && childrenDontHaveText;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
describe('character counter', function () {
|
|
55
|
+
it('updates as text is entered', function () {
|
|
56
|
+
var label = 'label';
|
|
57
|
+
var initialValue = 'Initial text';
|
|
58
|
+
|
|
59
|
+
var _render = render(_react.default.createElement(_.default, {
|
|
60
|
+
label: label,
|
|
61
|
+
value: initialValue,
|
|
62
|
+
showCharacterCount: true,
|
|
63
|
+
maxLength: 100
|
|
64
|
+
}, function (p) {
|
|
65
|
+
return _react.default.createElement(Dummy, p);
|
|
66
|
+
})),
|
|
67
|
+
getByText = _render.getByText,
|
|
68
|
+
getByTestId = _render.getByTestId;
|
|
69
|
+
|
|
70
|
+
expect(getByText(textFinder("You have ".concat(100 - initialValue.length, " characters left (100 max).")))).toBeTruthy();
|
|
71
|
+
var textarea = getByTestId('test-textarea');
|
|
72
|
+
var newValue = "".concat(initialValue, " with some additional text");
|
|
73
|
+
|
|
74
|
+
_react2.fireEvent.change(textarea, {
|
|
75
|
+
target: {
|
|
76
|
+
value: newValue
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(getByText(textFinder("You have ".concat(100 - newValue.length, " characters left (100 max).")))).toBeTruthy();
|
|
81
|
+
|
|
82
|
+
_react2.fireEvent.change(textarea, {
|
|
83
|
+
target: {
|
|
84
|
+
value: ''
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
expect(getByText(textFinder("You have 100 characters left (100 max)."))).toBeTruthy();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/atoms/InputField/schema.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,KAAqC,CAAC;AAsElD,eAAe,MAAM,CAAC"}
|
|
@@ -16,12 +16,13 @@ schema.makePropTypes = function () {
|
|
|
16
16
|
return {
|
|
17
17
|
disabled: _reactDesc.PropTypes.bool.description('Sets the input state to disabled if true.'),
|
|
18
18
|
helpMessage: _reactDesc.PropTypes.string.description("A short message to help clarify the input's purpose to the user."),
|
|
19
|
+
hideLabel: _reactDesc.PropTypes.bool.description("Visually hides the label, but leaves it available for screen readers. Use this only if you are sure the input doesn't need a visual label").defaultValue('false'),
|
|
19
20
|
icon: _reactDesc.PropTypes.element.description('An icon to be rendered on the left side of the input.'),
|
|
20
21
|
id: _reactDesc.PropTypes.string.description('A unique ID for the input.'),
|
|
21
22
|
inputContainerRef: _reactDesc.PropTypes.oneOfType([// Either a function
|
|
22
|
-
_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)
|
|
23
24
|
_reactDesc.PropTypes.shape({
|
|
24
|
-
current: _reactDesc.PropTypes.
|
|
25
|
+
current: _reactDesc.PropTypes.any
|
|
25
26
|
})]).description('A reference to the container component for the input field.'),
|
|
26
27
|
label: _reactDesc.PropTypes.string.description('A label for the input field.').isRequired,
|
|
27
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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/atoms/OptionsList/Category/index.tsx"],"names":[],"mappings":";AAOA,QAAA,MAAM,QAAQ,mGA2Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -5,44 +5,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
10
|
+
var _Option = _interopRequireDefault(require("../Option"));
|
|
15
11
|
|
|
16
|
-
var
|
|
12
|
+
var _utils = require("../utils");
|
|
17
13
|
|
|
18
|
-
var
|
|
14
|
+
var _styles = require("./styles");
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
17
|
|
|
22
18
|
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; } }
|
|
23
19
|
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
20
|
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); }
|
|
27
21
|
|
|
28
|
-
var StyledCategory = _styledComponents.default.li.attrs({
|
|
29
|
-
role: 'option',
|
|
30
|
-
'aria-disabled': true
|
|
31
|
-
}).withConfig({
|
|
32
|
-
displayName: "Category__StyledCategory",
|
|
33
|
-
componentId: "sc-1kvf2r-0"
|
|
34
|
-
})(["color:", ";font-size:", ";cursor:default;line-height:1.4;text-align:left;padding:", ";"], (0, _toColorString.default)(_designTokens.color.base.alaskanHusky), (0, _rem.default)(_designTokens.typography.size.alias.paragraph2), "".concat((0, _rem.default)(8), " ").concat((0, _rem.default)(30), " ").concat((0, _rem.default)(7), " ").concat((0, _rem.default)(10)));
|
|
35
|
-
|
|
36
22
|
var Category = function Category(_ref) {
|
|
37
23
|
var borderRadius = _ref.borderRadius,
|
|
38
24
|
label = _ref.label,
|
|
39
|
-
items = _ref.items
|
|
40
|
-
|
|
25
|
+
items = _ref.items,
|
|
26
|
+
showCheckbox = _ref.showCheckbox,
|
|
27
|
+
size = _ref.size;
|
|
28
|
+
return _react.default.createElement(_react.Fragment, null, _react.default.createElement(_styles.StyledCategory, {
|
|
29
|
+
size: size
|
|
30
|
+
}, label), items.map(function (subItem) {
|
|
41
31
|
var id = (0, _utils.getId)(subItem);
|
|
42
32
|
return _react.default.createElement(_Option.default, _extends({}, subItem, {
|
|
43
33
|
key: id,
|
|
44
34
|
id: id,
|
|
45
|
-
borderRadius: borderRadius
|
|
35
|
+
borderRadius: borderRadius,
|
|
36
|
+
showCheckbox: showCheckbox,
|
|
37
|
+
size: size
|
|
46
38
|
}));
|
|
47
39
|
}));
|
|
48
40
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StyledCategoryProps } from '../types';
|
|
2
|
+
export declare const StyledCategory: import("styled-components").StyledComponent<"li", any, {
|
|
3
|
+
role: "option";
|
|
4
|
+
'aria-disabled': true;
|
|
5
|
+
} & StyledCategoryProps, "role" | "aria-disabled">;
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -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;;;kDAa1B,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledCategory = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
11
|
+
|
|
12
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
13
|
+
|
|
14
|
+
var _designTokens = require("@decisiv/design-tokens");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
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; } }
|
|
19
|
+
|
|
20
|
+
/* eslint-disable import/prefer-default-export */
|
|
21
|
+
var withCategorySizeModifiers = function withCategorySizeModifiers(props) {
|
|
22
|
+
var _props$size = props.size,
|
|
23
|
+
size = _props$size === void 0 ? 'small' : _props$size;
|
|
24
|
+
if (size === 'medium') return (0, _styledComponents.css)(["font-size:", ";padding:", ";"], (0, _rem.default)(_designTokens.typography.size.alias.paragraph), "".concat((0, _rem.default)(15), " ").concat((0, _rem.default)(30), " ").concat((0, _rem.default)(10), " ").concat((0, _rem.default)(10)));
|
|
25
|
+
return (0, _styledComponents.css)(["font-size:", ";padding:", ";"], (0, _rem.default)(_designTokens.typography.size.alias.paragraph2), "".concat((0, _rem.default)(15), " ").concat((0, _rem.default)(30), " ").concat((0, _rem.default)(7), " ").concat((0, _rem.default)(10)));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var StyledCategory = _styledComponents.default.li.attrs({
|
|
29
|
+
role: 'option',
|
|
30
|
+
'aria-disabled': true
|
|
31
|
+
}).withConfig({
|
|
32
|
+
displayName: "styles__StyledCategory",
|
|
33
|
+
componentId: "sc-17ahmuu-0"
|
|
34
|
+
})(["color:", ";cursor:default;text-transform:uppercase;line-height:1.4;text-align:left;border-top:", " solid ", ";font-weight:", ";", ""], (0, _toColorString.default)(_designTokens.color.base.charcoal), (0, _rem.default)(1), (0, _toColorString.default)(_designTokens.color.base.quarterMoon), _designTokens.typography.weight.alias.semibold, withCategorySizeModifiers);
|
|
35
|
+
|
|
36
|
+
exports.StyledCategory = StyledCategory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { OptionProps } from '
|
|
2
|
+
import { OptionProps } from '../types';
|
|
3
3
|
declare function Option(props: OptionProps): JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Option>;
|
|
5
5
|
export default _default;
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/atoms/OptionsList/Option/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,WAAW,EAKZ,MAAM,UAAU,CAAC;AA4DlB,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAwH/C;;AAED,wBAAkC"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _get = _interopRequireDefault(require("lodash/get"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _context = require("../context");
|
|
13
|
+
|
|
14
|
+
var _Checkbox = _interopRequireDefault(require("../../../components/Checkbox"));
|
|
15
|
+
|
|
16
|
+
var _Avatar = _interopRequireDefault(require("../../../components/Avatar"));
|
|
17
|
+
|
|
18
|
+
var _Badge = _interopRequireDefault(require("../../../components/Badge"));
|
|
19
|
+
|
|
20
|
+
var _utils = require("../utils");
|
|
21
|
+
|
|
22
|
+
var _styles = require("./styles");
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
+
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
|
|
34
|
+
var sizeMapping = {
|
|
35
|
+
small: 'small',
|
|
36
|
+
medium: undefined
|
|
37
|
+
}; // This is used below to silence a React warning about
|
|
38
|
+
// having a controlled input without a change handler.
|
|
39
|
+
|
|
40
|
+
var noop = process.env.NODE_ENV === 'production' ? undefined : function () {};
|
|
41
|
+
|
|
42
|
+
function isDecoration(decoration) {
|
|
43
|
+
var type = (0, _get.default)(decoration, 'type');
|
|
44
|
+
return type !== undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function DecorationComponent(props) {
|
|
48
|
+
var disabled = props.disabled,
|
|
49
|
+
rest = _objectWithoutProperties(props, ["disabled"]);
|
|
50
|
+
|
|
51
|
+
switch (props.type) {
|
|
52
|
+
case 'Avatar':
|
|
53
|
+
return _react.default.createElement(_Avatar.default, rest);
|
|
54
|
+
|
|
55
|
+
case 'Badge':
|
|
56
|
+
return _react.default.createElement(_Badge.default, _extends({}, rest, {
|
|
57
|
+
variant: "square",
|
|
58
|
+
color: disabled ? 'licoriceMousse' : props.color
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
case 'Icon':
|
|
62
|
+
{
|
|
63
|
+
var Icon = props.icon;
|
|
64
|
+
return _react.default.createElement(Icon, null);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
default:
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
} // We always render the checkbox/radio inputs so that regular form
|
|
71
|
+
// submission (i.e. one not handled programmatically) still works.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
function Option(props) {
|
|
75
|
+
var id = props.id,
|
|
76
|
+
label = props.label,
|
|
77
|
+
decoration = props.decoration,
|
|
78
|
+
disabled = props.disabled,
|
|
79
|
+
borderRadius = props.borderRadius,
|
|
80
|
+
labelDetails = props.labelDetails,
|
|
81
|
+
_props$showCheckbox = props.showCheckbox,
|
|
82
|
+
showCheckbox = _props$showCheckbox === void 0 ? true : _props$showCheckbox,
|
|
83
|
+
_props$size = props.size,
|
|
84
|
+
size = _props$size === void 0 ? 'small' : _props$size;
|
|
85
|
+
var decorationType = (0, _get.default)(decoration, 'type');
|
|
86
|
+
|
|
87
|
+
var _useOptionsList = (0, _context.useOptionsList)(),
|
|
88
|
+
toggleItemSelection = _useOptionsList.toggleItemSelection,
|
|
89
|
+
selectedIds = _useOptionsList.selectedIds,
|
|
90
|
+
name = _useOptionsList.name,
|
|
91
|
+
multiple = _useOptionsList.multiple,
|
|
92
|
+
renderOptionLabel = _useOptionsList.renderOptionLabel,
|
|
93
|
+
activeId = _useOptionsList.activeId,
|
|
94
|
+
setInputMethod = _useOptionsList.setInputMethod,
|
|
95
|
+
updateActiveId = _useOptionsList.updateActiveId,
|
|
96
|
+
inputMethod = _useOptionsList.inputMethod,
|
|
97
|
+
selectable = _useOptionsList.selectable,
|
|
98
|
+
itemRole = _useOptionsList.itemRole;
|
|
99
|
+
|
|
100
|
+
var checked = selectedIds.includes(id);
|
|
101
|
+
var commonProps = {
|
|
102
|
+
name: name,
|
|
103
|
+
checked: checked,
|
|
104
|
+
onChange: noop,
|
|
105
|
+
tabIndex: -1
|
|
106
|
+
};
|
|
107
|
+
var handleMouseEnter = (0, _react.useCallback)(function () {
|
|
108
|
+
setInputMethod('mouse');
|
|
109
|
+
updateActiveId(disabled ? '' : id);
|
|
110
|
+
}, [setInputMethod, updateActiveId, disabled, id]);
|
|
111
|
+
var handleClick = (0, _react.useCallback)(function () {
|
|
112
|
+
if (!disabled) toggleItemSelection(id);
|
|
113
|
+
}, [toggleItemSelection, id, disabled]);
|
|
114
|
+
var LabelWrapper = (0, _react.useMemo)(function () {
|
|
115
|
+
return function (_ref) {
|
|
116
|
+
var children = _ref.children;
|
|
117
|
+
return selectable ? _react.default.createElement("label", {
|
|
118
|
+
className: "label"
|
|
119
|
+
}, children) : _react.default.createElement("div", {
|
|
120
|
+
className: "label"
|
|
121
|
+
}, children);
|
|
122
|
+
};
|
|
123
|
+
}, [selectable]);
|
|
124
|
+
return _react.default.createElement(_styles.Container, {
|
|
125
|
+
"aria-disabled": !!disabled,
|
|
126
|
+
"aria-selected": checked,
|
|
127
|
+
borderRadius: borderRadius,
|
|
128
|
+
"data-id": id,
|
|
129
|
+
key: id,
|
|
130
|
+
onClick: handleClick,
|
|
131
|
+
multiple: !!multiple,
|
|
132
|
+
isActive: activeId === id,
|
|
133
|
+
tabIndex: -1,
|
|
134
|
+
onMouseEnter: handleMouseEnter,
|
|
135
|
+
inputMethod: inputMethod,
|
|
136
|
+
role: itemRole,
|
|
137
|
+
size: size
|
|
138
|
+
}, (0, _utils.isLink)(props) ? _react.default.createElement(_styles.StyledLink, {
|
|
139
|
+
tabIndex: -1,
|
|
140
|
+
to: props.linkTo,
|
|
141
|
+
text: label,
|
|
142
|
+
icon: isDecoration(decoration) && decoration.type === 'Icon' ? decoration.icon : undefined,
|
|
143
|
+
disabled: !!disabled
|
|
144
|
+
}) : _react.default.createElement(LabelWrapper, null, selectable && (multiple && !!showCheckbox ? _react.default.createElement(_Checkbox.default, _extends({}, commonProps, {
|
|
145
|
+
disabled: !!disabled,
|
|
146
|
+
size: sizeMapping[size],
|
|
147
|
+
value: props.value
|
|
148
|
+
})) : _react.default.createElement("input", _extends({}, commonProps, {
|
|
149
|
+
type: "radio",
|
|
150
|
+
hidden: true,
|
|
151
|
+
value: props.value
|
|
152
|
+
}))), isDecoration(decoration) && _react.default.createElement(_styles.DecorationComponentContainer, {
|
|
153
|
+
disabled: !!disabled && decorationType !== 'Icon'
|
|
154
|
+
}, _react.default.createElement(DecorationComponent, decoration)), renderOptionLabel ? renderOptionLabel({
|
|
155
|
+
id: id,
|
|
156
|
+
label: label,
|
|
157
|
+
labelDetails: labelDetails,
|
|
158
|
+
value: props.value,
|
|
159
|
+
disabled: disabled,
|
|
160
|
+
meta: props.meta
|
|
161
|
+
}) : _react.default.createElement(_styles.StyleLabelWrapper, null, _react.default.createElement(_styles.StyledLabel, null, label), labelDetails && _react.default.createElement(_styles.StyledLabelDetails, {
|
|
162
|
+
id: "optionLabelDetails",
|
|
163
|
+
size: sizeMapping[size]
|
|
164
|
+
}, labelDetails))));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
var _default = _react.default.memo(Option);
|
|
168
|
+
|
|
169
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyledLinkProps, ContainerProps } from '../types';
|
|
3
|
+
export declare const StyledLink: import("styled-components").StyledComponent<import("react").RefForwardingComponent<HTMLAnchorElement, import("../../../components/Link").LinkProps>, any, StyledLinkProps, never>;
|
|
4
|
+
export declare const Container: import("styled-components").StyledComponent<"li", any, ContainerProps, never>;
|
|
5
|
+
export declare const StyleLabelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const DecorationComponentContainer: import("styled-components").StyledComponent<"div", any, {
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
}, never>;
|
|
9
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<"p", any, import("../../../components/Typography").PProps & {
|
|
10
|
+
as: string;
|
|
11
|
+
color: "inherit";
|
|
12
|
+
}, "color" | "as">;
|
|
13
|
+
export declare const StyledLabelDetails: import("styled-components").StyledComponent<"p", any, import("../../../components/Typography").PProps & {
|
|
14
|
+
as: string;
|
|
15
|
+
shade: number;
|
|
16
|
+
}, "as" | "shade">;
|
|
17
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/atoms/OptionsList/Option/styles.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK3D,eAAO,MAAM,UAAU,mLAgBtB,CAAC;AAuBF,eAAO,MAAM,SAAS,+EA6GrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,oEAI7B,CAAC;AAEF,eAAO,MAAM,4BAA4B;;SAUxC,CAAC;AAEF,eAAO,MAAM,WAAW;;;kBAEvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;kBAG3B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledLabelDetails = exports.StyledLabel = exports.DecorationComponentContainer = exports.StyleLabelWrapper = exports.Container = exports.StyledLink = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _rem = _interopRequireDefault(require("polished/lib/helpers/rem"));
|
|
11
|
+
|
|
12
|
+
var _toColorString = _interopRequireDefault(require("polished/lib/color/toColorString"));
|
|
13
|
+
|
|
14
|
+
var _designTokens = require("@decisiv/design-tokens");
|
|
15
|
+
|
|
16
|
+
var _Link = _interopRequireWildcard(require("../../../components/Link"));
|
|
17
|
+
|
|
18
|
+
var _Typography = require("../../../components/Typography");
|
|
19
|
+
|
|
20
|
+
var _styleModifiers = require("../../../utils/styleModifiers");
|
|
21
|
+
|
|
22
|
+
var _focusRingWithColor = _interopRequireDefault(require("../../../utils/focusRingWithColor"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
27
|
+
|
|
28
|
+
var enabledFGColor = _designTokens.color.interaction.pacificOcean;
|
|
29
|
+
var disabledFGColor = _designTokens.color.opacity.charcoal40;
|
|
30
|
+
var StyledLink = (0, _styledComponents.default)(_Link.default).withConfig({
|
|
31
|
+
displayName: "styles__StyledLink",
|
|
32
|
+
componentId: "sc-1vr9h8x-0"
|
|
33
|
+
})(["&&,&&:hover:not(:active),&&:focus:not(:active){text-decoration:none;", ";", ";}"], (0, _Link.linkColorStyles)(enabledFGColor, enabledFGColor, enabledFGColor), (0, _styleModifiers.when)('disabled', (0, _styledComponents.css)(["", ";cursor:not-allowed;"], (0, _Link.linkColorStyles)(disabledFGColor, disabledFGColor, disabledFGColor))));
|
|
34
|
+
exports.StyledLink = StyledLink;
|
|
35
|
+
|
|
36
|
+
var withSizeModifiers = function withSizeModifiers(props) {
|
|
37
|
+
var _props$size = props.size,
|
|
38
|
+
size = _props$size === void 0 ? 'small' : _props$size;
|
|
39
|
+
if (size === 'medium') return (0, _styledComponents.css)(["font-size:", ";padding:", ";"], (0, _rem.default)(_designTokens.typography.size.alias.header4), "".concat((0, _rem.default)(10), " ").concat((0, _rem.default)(30), " ").concat((0, _rem.default)(10), " ").concat((0, _rem.default)(10)));
|
|
40
|
+
return (0, _styledComponents.css)(["font-size:", ";padding:", ";"], (0, _rem.default)(_designTokens.typography.size.alias.paragraph), "".concat((0, _rem.default)(5), " ").concat((0, _rem.default)(30), " ").concat((0, _rem.default)(5), " ").concat((0, _rem.default)(10)));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function getBorderRadius(_ref) {
|
|
44
|
+
var borderRadius = _ref.borderRadius;
|
|
45
|
+
return borderRadius || '2px';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var Container = _styledComponents.default.li.withConfig({
|
|
49
|
+
displayName: "styles__Container",
|
|
50
|
+
componentId: "sc-1vr9h8x-1"
|
|
51
|
+
})(["text-align:left;&:focus{outline:none;}> .label,> ", "{align-items:center;border:1px solid transparent;color:", ";display:flex;pointer-events:none;width:100%;white-space:nowrap;", " > *{margin-right:", ";}}> ", "{pointer-events:auto;background-color:transparent;text-decoration:none;}&:first-child > .label,&:first-child > ", "{border-top-left-radius:", ";border-top-right-radius:", ";}&:last-child > .label,&:last-child > ", "{border-bottom-left-radius:", ";border-bottom-right-radius:", ";}&:hover:not([aria-disabled='true']):not([aria-selected='true']) > .label,&:hover:not([aria-disabled='true']):not([aria-selected='true']) > ", "{color:", ";text-decoration:none;.label > *{border-color:", ";}}&[aria-selected='true'] > .label{background:", ";color:", ";}&[aria-selected='true'] > .label > div > #optionLabelDetails{background:", ";color:", ";}", ";", " &[aria-disabled='true']{cursor:not-allowed;", "{pointer-events:none;}}&[aria-disabled='true'] > .label,&[aria-disabled='true'] > ", "{background:", ";color:", ";}"], StyledLink, (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), withSizeModifiers, (0, _rem.default)(10), StyledLink, StyledLink, getBorderRadius, getBorderRadius, StyledLink, getBorderRadius, getBorderRadius, StyledLink, (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _toColorString.default)(_designTokens.color.interaction.indianOcean), (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _styleModifiers.when)('isActive', (0, _styledComponents.css)(["color:", ";background:", ";.label > *{border-color:", ";}"], (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean15), (0, _toColorString.default)(_designTokens.color.interaction.indianOcean))), (0, _styleModifiers.when)([['isActive'], ['inputMethod', 'keyboard']], (0, _styledComponents.css)(["background:none;> .label,> ", "{border-color:", ";", "}&[aria-selected='true'] > .label,&[aria-selected='true'] > ", "{color:", ";", "}"], StyledLink, (0, _toColorString.default)(_designTokens.color.interaction.pacificOcean), (0, _focusRingWithColor.default)(_designTokens.color.interaction.pacificOcean40), StyledLink, (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _focusRingWithColor.default)(_designTokens.color.opacity.fullMoon50))), StyledLink, StyledLink, (0, _toColorString.default)(_designTokens.color.base.snowWhite), (0, _toColorString.default)(_designTokens.color.opacity.charcoal40));
|
|
52
|
+
|
|
53
|
+
exports.Container = Container;
|
|
54
|
+
|
|
55
|
+
var StyleLabelWrapper = _styledComponents.default.div.withConfig({
|
|
56
|
+
displayName: "styles__StyleLabelWrapper",
|
|
57
|
+
componentId: "sc-1vr9h8x-2"
|
|
58
|
+
})(["display:flex;flex:1;flex-direction:column;"]);
|
|
59
|
+
|
|
60
|
+
exports.StyleLabelWrapper = StyleLabelWrapper;
|
|
61
|
+
|
|
62
|
+
var DecorationComponentContainer = _styledComponents.default.div.withConfig({
|
|
63
|
+
displayName: "styles__DecorationComponentContainer",
|
|
64
|
+
componentId: "sc-1vr9h8x-3"
|
|
65
|
+
})(["", ";"], (0, _styleModifiers.when)('disabled', (0, _styledComponents.css)(["opacity:0.3;img{opacity:0.3;}"])));
|
|
66
|
+
|
|
67
|
+
exports.DecorationComponentContainer = DecorationComponentContainer;
|
|
68
|
+
var StyledLabel = (0, _styledComponents.default)(_Typography.P).attrs({
|
|
69
|
+
as: 'span',
|
|
70
|
+
color: 'inherit'
|
|
71
|
+
}).withConfig({
|
|
72
|
+
displayName: "styles__StyledLabel",
|
|
73
|
+
componentId: "sc-1vr9h8x-4"
|
|
74
|
+
})(["font-size:inherit;"]);
|
|
75
|
+
exports.StyledLabel = StyledLabel;
|
|
76
|
+
var StyledLabelDetails = (0, _styledComponents.default)(_Typography.P).attrs({
|
|
77
|
+
as: 'span',
|
|
78
|
+
shade: 1
|
|
79
|
+
}).withConfig({
|
|
80
|
+
displayName: "styles__StyledLabelDetails",
|
|
81
|
+
componentId: "sc-1vr9h8x-5"
|
|
82
|
+
})([""]);
|
|
83
|
+
exports.StyledLabelDetails = StyledLabelDetails;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAcf,OAAO,EAGL,gBAAgB,EAIjB,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAmCrB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atoms/OptionsList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAcf,OAAO,EAGL,gBAAgB,EAIjB,MAAM,SAAS,CAAC;AAwBjB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAmCrB,CAAC;AA+SF,QAAA,MAAM,2BAA2B,2FAA0B,CAAC;AAmC5D,eAAe,2BAA2B,CAAC"}
|