@sproutsocial/racine 12.24.0 → 13.1.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/CHANGELOG.md +65 -0
- package/__flow__/Avatar/index.flow.js +16 -0
- package/__flow__/Avatar/index.js +33 -77
- package/__flow__/Badge/constants.js +9 -15
- package/__flow__/Badge/index.flow.js +17 -0
- package/__flow__/Badge/index.js +12 -53
- package/__flow__/Badge/styles.js +17 -27
- package/__flow__/Banner/index.flow.js +9 -0
- package/__flow__/Banner/index.js +16 -42
- package/__flow__/Banner/styles.js +8 -14
- package/__flow__/Box/index.flow.js +7 -0
- package/__flow__/Box/index.js +7 -9
- package/__flow__/Box/styles.js +9 -25
- package/__flow__/Breadcrumb/index.flow.js +15 -0
- package/__flow__/Breadcrumb/index.js +35 -60
- package/__flow__/Breadcrumb/styles.js +11 -14
- package/__flow__/Button/index.flow.js +26 -0
- package/__flow__/Button/index.js +9 -75
- package/__flow__/Button/styles.js +27 -47
- package/__flow__/Card/index.flow.js +19 -0
- package/__flow__/Card/index.js +8 -37
- package/__flow__/Card/styles.js +8 -11
- package/__flow__/CharacterCounter/index.flow.js +10 -0
- package/__flow__/CharacterCounter/index.js +13 -15
- package/__flow__/CharacterCounter/styles.js +9 -17
- package/__flow__/ChartLegend/index.flow.js +14 -0
- package/__flow__/ChartLegend/index.js +16 -31
- package/__flow__/ChartLegend/styles.js +10 -18
- package/__flow__/Checkbox/index.flow.js +22 -0
- package/__flow__/Checkbox/index.js +16 -93
- package/__flow__/Checkbox/styles.js +48 -101
- package/__flow__/Collapsible/index.flow.js +11 -0
- package/__flow__/Collapsible/index.js +45 -72
- package/__flow__/Collapsible/styles.js +11 -12
- package/__flow__/DatePicker/DateRangePicker.flow.js +15 -0
- package/__flow__/DatePicker/DateRangePicker.js +17 -32
- package/__flow__/DatePicker/SingleDatePicker.flow.js +12 -0
- package/__flow__/DatePicker/SingleDatePicker.js +17 -26
- package/__flow__/DatePicker/StatefulDateRangePicker.js +19 -33
- package/__flow__/DatePicker/StatefulSingleDatePicker.js +10 -16
- package/__flow__/DatePicker/common.flow.js +20 -0
- package/__flow__/DatePicker/common.js +19 -41
- package/__flow__/DatePicker/index.js +3 -4
- package/__flow__/DatePicker/styles.js +87 -72
- package/__flow__/Drawer/SlideTransition.js +22 -14
- package/__flow__/Drawer/index.flow.js +38 -0
- package/__flow__/Drawer/index.js +72 -184
- package/__flow__/Drawer/styles.js +9 -13
- package/__flow__/EmptyState/index.flow.js +15 -0
- package/__flow__/EmptyState/index.js +18 -46
- package/__flow__/EnumIconNames.js +1 -1
- package/__flow__/EnumIllustrationNames.js +1 -1
- package/__flow__/EnumLogoNames.js +1 -1
- package/__flow__/Fieldset/index.flow.js +10 -0
- package/__flow__/Fieldset/index.js +23 -54
- package/__flow__/Fieldset/styles.js +6 -12
- package/__flow__/FormField/index.flow.js +28 -0
- package/__flow__/FormField/index.js +28 -72
- package/__flow__/Icon/deprecatedIcons.js +4 -3
- package/__flow__/Icon/index.flow.js +34 -0
- package/__flow__/Icon/index.js +21 -80
- package/__flow__/Icon/styles.js +9 -15
- package/__flow__/IconViewBoxes.js +378 -1
- package/__flow__/IllustrationViewBoxes.js +121 -1
- package/__flow__/Image/index.flow.js +15 -0
- package/__flow__/Image/index.js +24 -52
- package/__flow__/Image/styles.js +6 -11
- package/__flow__/Indicator/index.flow.js +6 -0
- package/__flow__/Indicator/index.js +16 -20
- package/__flow__/Indicator/styles.js +9 -12
- package/__flow__/Input/index.flow.js +60 -0
- package/__flow__/Input/index.js +50 -188
- package/__flow__/Input/styles.js +49 -70
- package/__flow__/KeyboardKey/index.flow.js +7 -0
- package/__flow__/KeyboardKey/index.js +14 -14
- package/__flow__/KeyboardKey/styles.js +10 -13
- package/__flow__/Label/index.flow.js +14 -0
- package/__flow__/Label/index.js +12 -30
- package/__flow__/Link/constants.js +4 -7
- package/__flow__/Link/index.flow.js +18 -0
- package/__flow__/Link/index.js +11 -44
- package/__flow__/Link/styles.js +15 -22
- package/__flow__/Listbox/index.flow.js +20 -0
- package/__flow__/Listbox/index.js +51 -70
- package/__flow__/Loader/index.flow.js +12 -0
- package/__flow__/Loader/index.js +19 -26
- package/__flow__/Loader/styles.js +13 -28
- package/__flow__/LoaderButton/index.flow.js +7 -0
- package/__flow__/LoaderButton/index.js +19 -47
- package/__flow__/LogoViewBoxes.js +94 -1
- package/__flow__/Menu/constants.js +3 -4
- package/__flow__/Menu/descendants.js +140 -240
- package/__flow__/Menu/hooks.js +86 -115
- package/__flow__/Menu/index.flow.js +23 -31
- package/__flow__/Menu/index.js +146 -340
- package/__flow__/Menu/names.js +1 -4947
- package/__flow__/Menu/styles.js +31 -51
- package/__flow__/Message/constants.js +9 -0
- package/__flow__/Message/index.flow.js +17 -0
- package/__flow__/Message/index.js +69 -115
- package/__flow__/Message/styles.js +62 -76
- package/__flow__/Modal/index.flow.js +46 -0
- package/__flow__/Modal/index.js +55 -129
- package/__flow__/Modal/styles.js +39 -62
- package/__flow__/Numeral/constants.js +3 -3
- package/__flow__/Numeral/index.flow.js +19 -0
- package/__flow__/Numeral/index.js +53 -71
- package/__flow__/Numeral/styles.js +4 -7
- package/__flow__/Numeral/tests/testNumeral.js +22 -30
- package/__flow__/OverflowList/index.flow.js +6 -8
- package/__flow__/OverflowList/index.js +52 -89
- package/__flow__/OverflowList/styles.js +8 -18
- package/__flow__/PartnerLogo/TypePartnerNames.js +1 -38
- package/__flow__/PartnerLogo/index.flow.js +19 -0
- package/__flow__/PartnerLogo/index.js +18 -37
- package/__flow__/PartnerLogo/styles.js +8 -12
- package/__flow__/Popout/index.flow.js +89 -0
- package/__flow__/Popout/index.js +114 -274
- package/__flow__/Popout/styles.js +4 -6
- package/__flow__/Portal/index.flow.js +10 -0
- package/__flow__/Portal/index.js +18 -25
- package/__flow__/Radio/index.flow.js +19 -0
- package/__flow__/Radio/index.js +10 -42
- package/__flow__/Radio/styles.js +27 -43
- package/__flow__/SegmentedControl/index.flow.js +20 -0
- package/__flow__/SegmentedControl/index.js +24 -73
- package/__flow__/SegmentedControl/styles.js +26 -36
- package/__flow__/Select/index.flow.js +25 -0
- package/__flow__/Select/index.js +14 -55
- package/__flow__/Select/styles.js +53 -62
- package/__flow__/Skeleton/index.js +6 -10
- package/__flow__/SpotIllustration/illustrationNames.js +1 -121
- package/__flow__/SpotIllustration/index.flow.js +9 -0
- package/__flow__/SpotIllustration/index.js +24 -41
- package/__flow__/Stack/index.flow.js +24 -0
- package/__flow__/Stack/index.js +57 -81
- package/__flow__/Switch/index.flow.js +16 -0
- package/__flow__/Switch/index.js +21 -34
- package/__flow__/Switch/styles.js +28 -34
- package/__flow__/Table/index.flow.js +30 -0
- package/__flow__/Table/index.js +44 -85
- package/__flow__/Table/styles.js +5 -8
- package/__flow__/TableCell/index.flow.js +19 -0
- package/__flow__/TableCell/index.js +18 -31
- package/__flow__/TableCell/styles.js +11 -12
- package/__flow__/TableHeaderCell/constants.js +6 -0
- package/__flow__/TableHeaderCell/index.flow.js +24 -0
- package/__flow__/TableHeaderCell/index.js +32 -59
- package/__flow__/TableHeaderCell/styles.js +10 -16
- package/__flow__/TableRowAccordion/index.flow.js +13 -0
- package/__flow__/TableRowAccordion/index.js +26 -44
- package/__flow__/TableRowAccordion/styles.js +9 -17
- package/__flow__/Tabs/index.flow.js +20 -0
- package/__flow__/Tabs/index.js +48 -78
- package/__flow__/Tabs/styles.js +21 -40
- package/__flow__/Text/index.flow.js +13 -0
- package/__flow__/Text/index.js +38 -65
- package/__flow__/Text/styles.js +8 -15
- package/__flow__/Textarea/index.flow.js +48 -0
- package/__flow__/Textarea/index.js +12 -96
- package/__flow__/Textarea/styles.js +27 -46
- package/__flow__/ThemeProvider/index.js +5 -11
- package/__flow__/Toast/index.flow.js +20 -0
- package/__flow__/Toast/index.js +45 -99
- package/__flow__/Toast/styles.js +14 -20
- package/__flow__/ToggleHint/index.flow.js +13 -0
- package/__flow__/ToggleHint/index.js +17 -31
- package/__flow__/ToggleHint/styles.js +10 -18
- package/__flow__/Token/index.flow.js +15 -0
- package/__flow__/Token/index.js +15 -44
- package/__flow__/Token/styles.js +25 -22
- package/__flow__/TokenInput/index.flow.js +67 -2
- package/__flow__/TokenInput/index.js +108 -221
- package/__flow__/TokenInput/styles.js +36 -54
- package/__flow__/TokenInput/util.js +6 -11
- package/__flow__/Tooltip/index.flow.js +22 -0
- package/__flow__/Tooltip/index.js +38 -126
- package/__flow__/Tooltip/styles.js +6 -8
- package/__flow__/VisuallyHidden/index.js +4 -6
- package/__flow__/dataviz/index.js +6 -9
- package/__flow__/index.js +152 -76
- package/__flow__/systemProps/background.js +4 -15
- package/__flow__/systemProps/border.js +4 -35
- package/__flow__/systemProps/color.js +5 -15
- package/__flow__/systemProps/custom.js +7 -14
- package/__flow__/systemProps/flexbox.js +4 -21
- package/__flow__/systemProps/grid.js +4 -22
- package/__flow__/systemProps/index.js +14 -15
- package/__flow__/systemProps/layout.js +4 -22
- package/__flow__/systemProps/position.js +4 -16
- package/__flow__/systemProps/shadow.js +4 -9
- package/__flow__/systemProps/space.js +4 -25
- package/__flow__/systemProps/systemProps.js +15 -40
- package/__flow__/systemProps/tests/types.flow.js +2 -6
- package/__flow__/systemProps/types.flow.js +6 -14
- package/__flow__/systemProps/typography.js +5 -18
- package/__flow__/systemProps/variant.js +8 -12
- package/__flow__/themes/dark/dataviz-palette.js +4 -26
- package/__flow__/themes/dark/decorative-palettes.js +12 -23
- package/__flow__/themes/dark/theme.js +60 -74
- package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.js +65 -70
- package/__flow__/themes/extendedThemes/sproutTheme/index.js +2 -2
- package/__flow__/themes/extendedThemes/sproutTheme/light/theme.js +65 -70
- package/__flow__/themes/light/dataviz-palette.js +4 -26
- package/__flow__/themes/light/decorative-palettes.js +12 -23
- package/__flow__/themes/light/literal-colors.js +13 -15
- package/__flow__/themes/light/theme.js +71 -107
- package/__flow__/types/styled-components.flow.js +1 -1
- package/__flow__/types/system-props.flow.js +5 -25
- package/__flow__/types/theme.colors.flow.js +32 -46
- package/__flow__/types/theme.flow.js +7 -25
- package/__flow__/utils/a11yTest.js +2 -3
- package/__flow__/utils/chartColors.js +6 -71
- package/__flow__/utils/constants.js +1 -1
- package/__flow__/utils/dataQaLabelQueries.js +14 -37
- package/__flow__/utils/hooks.js +77 -114
- package/__flow__/utils/index.js +6 -12
- package/__flow__/utils/innerText.js +3 -15
- package/__flow__/utils/mixins.js +5 -14
- package/__flow__/utils/react-testing-library.js +15 -42
- package/__flow__/utils/responsiveProps/index.js +6 -19
- package/__flow__/utils/system-props.js +11 -77
- package/__flow__/utils/useInteractiveColor.js +4 -7
- package/commonjs/{Stack/TypeSpaceLiterals.js → Avatar/index.flow.js} +0 -0
- package/commonjs/Avatar/index.js +31 -28
- package/commonjs/Badge/index.flow.js +6 -0
- package/commonjs/Badge/index.js +1 -1
- package/commonjs/Badge/styles.js +1 -1
- package/commonjs/Banner/index.flow.js +6 -0
- package/commonjs/Banner/index.js +15 -17
- package/commonjs/Box/index.flow.js +8 -0
- package/commonjs/Breadcrumb/index.flow.js +8 -0
- package/commonjs/Breadcrumb/index.js +21 -19
- package/commonjs/Button/index.flow.js +6 -0
- package/commonjs/Button/index.js +1 -7
- package/commonjs/Button/styles.js +1 -1
- package/commonjs/Card/index.flow.js +7 -0
- package/commonjs/Card/styles.js +1 -1
- package/commonjs/CharacterCounter/index.flow.js +1 -0
- package/commonjs/ChartLegend/index.flow.js +1 -0
- package/commonjs/ChartLegend/index.js +10 -6
- package/commonjs/Checkbox/index.flow.js +1 -0
- package/commonjs/Checkbox/index.js +27 -24
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Collapsible/index.flow.js +6 -0
- package/commonjs/Collapsible/index.js +1 -1
- package/commonjs/DatePicker/DateRangePicker.flow.js +1 -0
- package/commonjs/DatePicker/SingleDatePicker.flow.js +1 -0
- package/commonjs/DatePicker/StatefulDateRangePicker.js +10 -7
- package/commonjs/DatePicker/StatefulSingleDatePicker.js +7 -4
- package/commonjs/DatePicker/common.flow.js +1 -0
- package/commonjs/DatePicker/common.js +1 -1
- package/commonjs/DatePicker/styles.js +1 -1
- package/commonjs/Drawer/index.flow.js +6 -0
- package/commonjs/Drawer/index.js +24 -20
- package/commonjs/EmptyState/index.flow.js +6 -0
- package/commonjs/EmptyState/index.js +1 -1
- package/commonjs/Fieldset/index.flow.js +6 -0
- package/commonjs/FormField/index.flow.js +9 -0
- package/commonjs/FormField/index.js +1 -1
- package/commonjs/Icon/deprecatedIcons.js +2 -2
- package/commonjs/Icon/index.flow.js +4 -0
- package/commonjs/Icon/index.js +19 -15
- package/commonjs/Icon/styles.js +1 -1
- package/commonjs/IconViewBoxes.js +3 -0
- package/commonjs/Image/index.flow.js +1 -0
- package/commonjs/Image/index.js +18 -14
- package/commonjs/Indicator/index.flow.js +1 -0
- package/commonjs/Indicator/index.js +12 -9
- package/commonjs/Indicator/styles.js +1 -1
- package/commonjs/Input/index.flow.js +6 -0
- package/commonjs/Input/index.js +52 -49
- package/commonjs/Input/styles.js +1 -1
- package/commonjs/KeyboardKey/index.flow.js +1 -0
- package/commonjs/Label/index.flow.js +8 -0
- package/commonjs/Label/index.js +9 -6
- package/commonjs/Link/index.flow.js +6 -0
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/index.flow.js +9 -0
- package/commonjs/Listbox/index.js +2 -2
- package/commonjs/Loader/index.flow.js +1 -0
- package/commonjs/Loader/index.js +13 -9
- package/commonjs/Loader/styles.js +2 -2
- package/commonjs/LoaderButton/index.flow.js +1 -0
- package/commonjs/LoaderButton/index.js +2 -6
- package/commonjs/LogoViewBoxes.js +4 -0
- package/commonjs/Menu/index.js +28 -29
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/Message/constants.js +15 -0
- package/commonjs/Message/index.flow.js +7 -0
- package/commonjs/Message/index.js +12 -17
- package/commonjs/Message/styles.js +14 -14
- package/commonjs/Modal/index.flow.js +8 -0
- package/commonjs/Modal/index.js +31 -29
- package/commonjs/Modal/styles.js +9 -6
- package/commonjs/Numeral/index.flow.js +1 -0
- package/commonjs/Numeral/index.js +9 -10
- package/commonjs/Numeral/tests/testNumeral.js +12 -14
- package/commonjs/OverflowList/index.js +2 -2
- package/commonjs/OverflowList/styles.js +1 -1
- package/commonjs/PartnerLogo/index.flow.js +1 -0
- package/commonjs/PartnerLogo/index.js +18 -15
- package/commonjs/PartnerLogo/styles.js +1 -1
- package/commonjs/Popout/index.flow.js +6 -0
- package/commonjs/Popout/index.js +25 -23
- package/commonjs/Portal/index.flow.js +6 -0
- package/commonjs/Radio/index.flow.js +1 -0
- package/commonjs/Radio/styles.js +2 -2
- package/commonjs/SegmentedControl/index.flow.js +6 -0
- package/commonjs/SegmentedControl/index.js +21 -19
- package/commonjs/SegmentedControl/styles.js +1 -1
- package/commonjs/Select/index.flow.js +6 -0
- package/commonjs/Select/index.js +1 -1
- package/commonjs/Select/styles.js +1 -1
- package/commonjs/Skeleton/index.js +1 -1
- package/commonjs/SpotIllustration/illustrationNames.js +1 -1
- package/commonjs/SpotIllustration/index.flow.js +1 -0
- package/commonjs/SpotIllustration/index.js +1 -1
- package/commonjs/Stack/index.flow.js +6 -0
- package/commonjs/Stack/index.js +1 -1
- package/commonjs/Switch/index.flow.js +1 -0
- package/commonjs/Switch/index.js +19 -15
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/index.flow.js +6 -0
- package/commonjs/TableCell/index.flow.js +6 -0
- package/commonjs/TableHeaderCell/constants.js +12 -0
- package/commonjs/TableHeaderCell/index.flow.js +3 -0
- package/commonjs/TableHeaderCell/index.js +17 -9
- package/commonjs/TableRowAccordion/index.flow.js +6 -0
- package/commonjs/TableRowAccordion/index.js +1 -1
- package/commonjs/Tabs/index.flow.js +6 -0
- package/commonjs/Tabs/index.js +1 -2
- package/commonjs/Text/index.flow.js +6 -0
- package/commonjs/Text/index.js +1 -1
- package/commonjs/Textarea/index.flow.js +6 -0
- package/commonjs/Textarea/index.js +42 -38
- package/commonjs/Textarea/styles.js +1 -1
- package/commonjs/Toast/index.flow.js +6 -0
- package/commonjs/Toast/index.js +2 -2
- package/commonjs/Toast/styles.js +2 -1
- package/commonjs/ToggleHint/index.flow.js +1 -0
- package/commonjs/ToggleHint/index.js +8 -5
- package/commonjs/ToggleHint/styles.js +1 -1
- package/commonjs/Token/index.flow.js +6 -0
- package/commonjs/Token/index.js +28 -24
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/index.flow.js +6 -1
- package/commonjs/TokenInput/index.js +42 -39
- package/commonjs/TokenInput/styles.js +1 -1
- package/commonjs/Tooltip/index.flow.js +6 -0
- package/commonjs/Tooltip/index.js +19 -15
- package/commonjs/VisuallyHidden/index.js +1 -1
- package/commonjs/dataviz/index.js +1 -1
- package/commonjs/index.js +113 -97
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/theme.js +4 -9
- package/commonjs/utils/hooks.js +2 -2
- package/commonjs/utils/mixins.js +1 -1
- package/commonjs/utils/react-testing-library.js +9 -12
- package/dist/icon.svg +1 -1
- package/dist/iconList.js +1 -1
- package/dist/logo.svg +1 -1
- package/dist/logoList.js +1 -1
- package/lib/{Stack/TypeSpaceLiterals.js → Avatar/index.flow.js} +0 -0
- package/lib/Avatar/index.js +31 -28
- package/lib/Badge/index.flow.js +2 -0
- package/lib/Badge/index.js +1 -1
- package/lib/Badge/styles.js +1 -1
- package/lib/Banner/index.flow.js +2 -0
- package/lib/Banner/index.js +15 -23
- package/lib/Box/index.flow.js +3 -0
- package/lib/Breadcrumb/index.flow.js +3 -0
- package/lib/Breadcrumb/index.js +22 -21
- package/lib/Button/index.flow.js +2 -0
- package/lib/Button/index.js +1 -13
- package/lib/Button/styles.js +1 -1
- package/lib/Card/index.flow.js +3 -0
- package/lib/Card/styles.js +1 -1
- package/lib/CharacterCounter/index.flow.js +0 -0
- package/lib/ChartLegend/index.flow.js +0 -0
- package/lib/ChartLegend/index.js +10 -6
- package/lib/Checkbox/index.flow.js +0 -0
- package/lib/Checkbox/index.js +27 -24
- package/lib/Checkbox/styles.js +1 -1
- package/lib/Collapsible/index.flow.js +2 -0
- package/lib/Collapsible/index.js +1 -1
- package/lib/DatePicker/DateRangePicker.flow.js +0 -0
- package/lib/DatePicker/SingleDatePicker.flow.js +0 -0
- package/lib/DatePicker/StatefulDateRangePicker.js +10 -7
- package/lib/DatePicker/StatefulSingleDatePicker.js +7 -4
- package/lib/DatePicker/common.flow.js +0 -0
- package/lib/DatePicker/common.js +1 -1
- package/lib/DatePicker/styles.js +2 -1
- package/lib/Drawer/index.flow.js +2 -0
- package/lib/Drawer/index.js +24 -21
- package/lib/EmptyState/index.flow.js +2 -0
- package/lib/EmptyState/index.js +1 -1
- package/lib/Fieldset/index.flow.js +2 -0
- package/lib/FormField/index.flow.js +4 -0
- package/lib/FormField/index.js +1 -3
- package/lib/Icon/deprecatedIcons.js +3 -2
- package/lib/Icon/index.flow.js +3 -0
- package/lib/Icon/index.js +19 -15
- package/lib/Icon/styles.js +1 -1
- package/lib/IconViewBoxes.js +3 -0
- package/lib/Image/index.flow.js +0 -0
- package/lib/Image/index.js +18 -14
- package/lib/Indicator/index.flow.js +0 -0
- package/lib/Indicator/index.js +12 -9
- package/lib/Indicator/styles.js +1 -1
- package/lib/Input/index.flow.js +2 -0
- package/lib/Input/index.js +52 -49
- package/lib/Input/styles.js +1 -1
- package/lib/KeyboardKey/index.flow.js +0 -0
- package/lib/Label/index.flow.js +3 -0
- package/lib/Label/index.js +9 -6
- package/lib/Link/index.flow.js +2 -0
- package/lib/Link/styles.js +1 -1
- package/lib/Listbox/index.flow.js +4 -0
- package/lib/Listbox/index.js +2 -2
- package/lib/Loader/index.flow.js +0 -0
- package/lib/Loader/index.js +13 -9
- package/lib/Loader/styles.js +2 -2
- package/lib/LoaderButton/index.flow.js +0 -0
- package/lib/LoaderButton/index.js +3 -8
- package/lib/LogoViewBoxes.js +4 -0
- package/lib/Menu/index.js +29 -30
- package/lib/Menu/styles.js +1 -1
- package/lib/Message/constants.js +9 -0
- package/lib/Message/index.flow.js +3 -0
- package/lib/Message/index.js +5 -10
- package/lib/Message/styles.js +2 -2
- package/lib/Modal/index.flow.js +3 -0
- package/lib/Modal/index.js +31 -29
- package/lib/Modal/styles.js +9 -6
- package/lib/Numeral/constants.js +1 -0
- package/lib/Numeral/index.flow.js +0 -0
- package/lib/Numeral/index.js +2 -3
- package/lib/Numeral/tests/testNumeral.js +11 -13
- package/lib/OverflowList/index.js +1 -1
- package/lib/OverflowList/styles.js +1 -1
- package/lib/PartnerLogo/index.flow.js +0 -0
- package/lib/PartnerLogo/index.js +18 -15
- package/lib/PartnerLogo/styles.js +1 -1
- package/lib/Popout/index.flow.js +2 -0
- package/lib/Popout/index.js +25 -24
- package/lib/Portal/index.flow.js +2 -0
- package/lib/Radio/index.flow.js +0 -0
- package/lib/Radio/styles.js +2 -2
- package/lib/SegmentedControl/index.flow.js +2 -0
- package/lib/SegmentedControl/index.js +21 -19
- package/lib/SegmentedControl/styles.js +1 -1
- package/lib/Select/index.flow.js +2 -0
- package/lib/Select/index.js +1 -1
- package/lib/Select/styles.js +1 -1
- package/lib/Skeleton/index.js +1 -1
- package/lib/SpotIllustration/illustrationNames.js +1 -1
- package/lib/SpotIllustration/index.flow.js +0 -0
- package/lib/SpotIllustration/index.js +1 -1
- package/lib/Stack/index.flow.js +2 -0
- package/lib/Stack/index.js +1 -1
- package/lib/Switch/index.flow.js +0 -0
- package/lib/Switch/index.js +19 -15
- package/lib/Switch/styles.js +1 -1
- package/lib/Table/index.flow.js +2 -0
- package/lib/TableCell/index.flow.js +2 -0
- package/lib/TableHeaderCell/constants.js +6 -0
- package/lib/TableHeaderCell/index.flow.js +3 -0
- package/lib/TableHeaderCell/index.js +7 -5
- package/lib/TableRowAccordion/index.flow.js +2 -0
- package/lib/TableRowAccordion/index.js +1 -1
- package/lib/Tabs/index.flow.js +2 -0
- package/lib/Tabs/index.js +1 -2
- package/lib/Text/index.flow.js +2 -0
- package/lib/Text/index.js +1 -1
- package/lib/Textarea/index.flow.js +2 -0
- package/lib/Textarea/index.js +42 -38
- package/lib/Textarea/styles.js +1 -1
- package/lib/Toast/index.flow.js +2 -0
- package/lib/Toast/index.js +2 -2
- package/lib/Toast/styles.js +2 -3
- package/lib/ToggleHint/index.flow.js +0 -0
- package/lib/ToggleHint/index.js +8 -5
- package/lib/ToggleHint/styles.js +1 -1
- package/lib/Token/index.flow.js +2 -0
- package/lib/Token/index.js +28 -24
- package/lib/Token/styles.js +1 -1
- package/lib/TokenInput/index.flow.js +2 -0
- package/lib/TokenInput/index.js +41 -39
- package/lib/TokenInput/styles.js +1 -1
- package/lib/Tooltip/index.flow.js +2 -0
- package/lib/Tooltip/index.js +19 -15
- package/lib/VisuallyHidden/index.js +1 -1
- package/lib/dataviz/index.js +1 -1
- package/lib/index.js +74 -47
- package/lib/themes/dark/theme.js +4 -2
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +3 -0
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +3 -0
- package/lib/themes/light/theme.js +4 -10
- package/lib/utils/hooks.js +1 -1
- package/lib/utils/mixins.js +1 -1
- package/lib/utils/react-testing-library.js +8 -6
- package/package.json +14 -6
- package/__flow__/Avatar/__tests__/features.test.js +0 -98
- package/__flow__/Avatar/index.stories.js +0 -62
- package/__flow__/Badge/index.stories.js +0 -49
- package/__flow__/Badge/index.test.js +0 -67
- package/__flow__/Banner/index.stories.js +0 -108
- package/__flow__/Banner/index.test.js +0 -68
- package/__flow__/Box/index.stories.js +0 -135
- package/__flow__/Box/index.test.js +0 -12
- package/__flow__/Breadcrumb/index.stories.js +0 -76
- package/__flow__/Breadcrumb/index.test.js +0 -62
- package/__flow__/Button/index.stories.js +0 -153
- package/__flow__/Card/index.stories.js +0 -67
- package/__flow__/CharacterCounter/index.stories.js +0 -42
- package/__flow__/CharacterCounter/index.test.js +0 -24
- package/__flow__/ChartLegend/index.stories.js +0 -66
- package/__flow__/ChartLegend/index.test.js +0 -55
- package/__flow__/Checkbox/index.stories.js +0 -137
- package/__flow__/Checkbox/index.test.js +0 -91
- package/__flow__/Collapsible/index.stories.js +0 -182
- package/__flow__/Collapsible/index.test.js +0 -68
- package/__flow__/DatePicker/DateRangePicker.stories.js +0 -101
- package/__flow__/DatePicker/DateRangePicker.test.js +0 -123
- package/__flow__/DatePicker/SingleDatePicker.stories.js +0 -64
- package/__flow__/DatePicker/SingleDatePicker.test.js +0 -89
- package/__flow__/Drawer/index.stories.js +0 -336
- package/__flow__/Drawer/index.test.js +0 -158
- package/__flow__/EmptyState/index.stories.js +0 -108
- package/__flow__/EmptyState/index.test.js +0 -124
- package/__flow__/Fieldset/index.stories.js +0 -135
- package/__flow__/Fieldset/index.test.js +0 -34
- package/__flow__/FormField/index.stories.js +0 -116
- package/__flow__/FormField/index.test.js +0 -71
- package/__flow__/Icon/index.stories.js +0 -175
- package/__flow__/Icon/index.test.js +0 -25
- package/__flow__/Image/index.stories.js +0 -30
- package/__flow__/Image/index.test.js +0 -86
- package/__flow__/Indicator/index.stories.js +0 -16
- package/__flow__/Indicator/index.test.js +0 -11
- package/__flow__/Input/index.stories.js +0 -216
- package/__flow__/Input/index.test.js +0 -405
- package/__flow__/KeyboardKey/index.stories.js +0 -25
- package/__flow__/KeyboardKey/index.test.js +0 -12
- package/__flow__/Label/index.stories.js +0 -15
- package/__flow__/Label/index.test.js +0 -16
- package/__flow__/Link/index.stories.js +0 -115
- package/__flow__/Link/index.test.js +0 -110
- package/__flow__/Listbox/index.stories.js +0 -238
- package/__flow__/Listbox/index.test.js +0 -291
- package/__flow__/Loader/index.stories.js +0 -40
- package/__flow__/Loader/index.test.js +0 -26
- package/__flow__/LoaderButton/index.stories.js +0 -84
- package/__flow__/LoaderButton/index.test.js +0 -35
- package/__flow__/Menu/__snapshots__/index.test.js.snap +0 -115
- package/__flow__/Menu/index.stories.js +0 -261
- package/__flow__/Menu/index.test.js +0 -103
- package/__flow__/Message/index.stories.js +0 -73
- package/__flow__/Message/index.test.js +0 -12
- package/__flow__/Modal/index.stories.js +0 -409
- package/__flow__/Modal/index.test.js +0 -129
- package/__flow__/Numeral/index.stories.js +0 -183
- package/__flow__/Numeral/tests/A11y.test.js +0 -12
- package/__flow__/Numeral/tests/abbreviate.test.js +0 -72
- package/__flow__/Numeral/tests/currency.test.js +0 -40
- package/__flow__/Numeral/tests/defaults.test.js +0 -33
- package/__flow__/Numeral/tests/invalid.test.js +0 -12
- package/__flow__/Numeral/tests/locale.test.js +0 -83
- package/__flow__/Numeral/tests/precision.test.js +0 -126
- package/__flow__/Numeral/tests/zero.test.js +0 -11
- package/__flow__/OverflowList/index.stories.js +0 -69
- package/__flow__/OverflowList/index.test.js +0 -79
- package/__flow__/PartnerLogo/index.stories.js +0 -124
- package/__flow__/PartnerLogo/partnerLogos/bigcommerce-dark.svg +0 -5
- package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup-dark.svg +0 -14
- package/__flow__/PartnerLogo/partnerLogos/bigcommerce-lockup.svg +0 -14
- package/__flow__/PartnerLogo/partnerLogos/bigcommerce.svg +0 -5
- package/__flow__/PartnerLogo/partnerLogos/bitly-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/bitly.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/canva-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/canva.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/dropbox-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/dropbox-lockup-dark.svg +0 -7
- package/__flow__/PartnerLogo/partnerLogos/dropbox-lockup.svg +0 -7
- package/__flow__/PartnerLogo/partnerLogos/dropbox-wordmark-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/dropbox-wordmark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/dropbox.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/facebook-audience-network-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/facebook-audience-network.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/facebook-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/facebook-groups-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/facebook-groups.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/facebook-shops-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/facebook-shops.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/facebook.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/feedly-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/feedly.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/glassdoor-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/glassdoor.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-analytics-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-analytics.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-business-messages-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-business-messages.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-drive-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-drive.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-my-business-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/google-my-business.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/hubspot-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/hubspot.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/instagram-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/instagram.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/linkedin-audience-network-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/linkedin-audience-network.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/linkedin-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/linkedin.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/marketo-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/marketo.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/messenger-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/messenger.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/microsoft-dynamics-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/microsoft-dynamics.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/pinterest-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/pinterest.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/reddit-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/reddit.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/salesforce-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/salesforce.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/shopify-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/shopify.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/slack-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/slack.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial-dark.svg +0 -7
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup-dark.svg +0 -19
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial-lockup.svg +0 -19
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark-dark.svg +0 -14
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial-wordmark.svg +0 -14
- package/__flow__/PartnerLogo/partnerLogos/sproutsocial.svg +0 -7
- package/__flow__/PartnerLogo/partnerLogos/tiktok-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/tiktok.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/tripadvisor-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/tripadvisor.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/tumblr-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/tumblr.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/twitter-audience-network-dark.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/twitter-audience-network.svg +0 -3
- package/__flow__/PartnerLogo/partnerLogos/twitter-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/twitter.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/whatsapp-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/whatsapp.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/woocommerce-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/woocommerce.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/yelp-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/yelp.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/youtube-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/youtube.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/zendesk-dark.svg +0 -1
- package/__flow__/PartnerLogo/partnerLogos/zendesk-lockup-dark.svg +0 -28
- package/__flow__/PartnerLogo/partnerLogos/zendesk-lockup.svg +0 -28
- package/__flow__/PartnerLogo/partnerLogos/zendesk-wordmark-dark.svg +0 -9
- package/__flow__/PartnerLogo/partnerLogos/zendesk-wordmark.svg +0 -9
- package/__flow__/PartnerLogo/partnerLogos/zendesk.svg +0 -1
- package/__flow__/Popout/__snapshots__/index.test.js.snap +0 -121
- package/__flow__/Popout/index.stories.js +0 -471
- package/__flow__/Popout/index.test.js +0 -179
- package/__flow__/Portal/index.stories.js +0 -42
- package/__flow__/Radio/index.stories.js +0 -75
- package/__flow__/Radio/index.test.js +0 -47
- package/__flow__/SegmentedControl/index.stories.js +0 -44
- package/__flow__/SegmentedControl/index.test.js +0 -74
- package/__flow__/Select/index.stories.js +0 -42
- package/__flow__/Select/index.test.js +0 -44
- package/__flow__/Skeleton/index.stories.js +0 -31
- package/__flow__/SpotIllustration/index.stories.js +0 -135
- package/__flow__/SpotIllustration/spotIllustrations/abacus.svg +0 -21
- package/__flow__/SpotIllustration/spotIllustrations/analytics-offering.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/asset-cards.svg +0 -16
- package/__flow__/SpotIllustration/spotIllustrations/astronaut.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/binoculars.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/brand-keyword.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/browser-doc.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/business.svg +0 -23
- package/__flow__/SpotIllustration/spotIllustrations/calendar-event.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/calendar-reporting.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/cat-error.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/cat-no-access.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/cat.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/checkbox-alert.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/coffee-cup.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/competitors.svg +0 -29
- package/__flow__/SpotIllustration/spotIllustrations/compose-window.svg +0 -21
- package/__flow__/SpotIllustration/spotIllustrations/compose.svg +0 -5
- package/__flow__/SpotIllustration/spotIllustrations/computer-error.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/connect.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/contact.svg +0 -87
- package/__flow__/SpotIllustration/spotIllustrations/conversation.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/custom-branding.svg +0 -7
- package/__flow__/SpotIllustration/spotIllustrations/customer-service.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/dashboard.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/exclamation-mark.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/face-happy.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/find-bookmark.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/flask.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/general-topic.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/global-features.svg +0 -17
- package/__flow__/SpotIllustration/spotIllustrations/global-trend.svg +0 -5
- package/__flow__/SpotIllustration/spotIllustrations/grow-large.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/grow.svg +0 -5
- package/__flow__/SpotIllustration/spotIllustrations/hands-raised.svg +0 -8
- package/__flow__/SpotIllustration/spotIllustrations/headset.svg +0 -8
- package/__flow__/SpotIllustration/spotIllustrations/heartbeat-connection.svg +0 -14
- package/__flow__/SpotIllustration/spotIllustrations/instagram-links.svg +0 -28
- package/__flow__/SpotIllustration/spotIllustrations/invoice.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/jewel.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/keyword-tracking.svg +0 -26
- package/__flow__/SpotIllustration/spotIllustrations/lightbulb-alt.svg +0 -5
- package/__flow__/SpotIllustration/spotIllustrations/lightbulb.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/like-conversation.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/link-broken.svg +0 -18
- package/__flow__/SpotIllustration/spotIllustrations/link-messages.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/link-sections.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/link-upload.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/listening-pendo.svg +0 -14
- package/__flow__/SpotIllustration/spotIllustrations/listening-sentiment.svg +0 -27
- package/__flow__/SpotIllustration/spotIllustrations/listening-topic-templates.svg +0 -26
- package/__flow__/SpotIllustration/spotIllustrations/listening-tour.svg +0 -18
- package/__flow__/SpotIllustration/spotIllustrations/listening.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/loading.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/mailbox-empty.svg +0 -18
- package/__flow__/SpotIllustration/spotIllustrations/mailbox-full.svg +0 -8
- package/__flow__/SpotIllustration/spotIllustrations/megaphone.svg +0 -7
- package/__flow__/SpotIllustration/spotIllustrations/message.svg +0 -6
- package/__flow__/SpotIllustration/spotIllustrations/molecule.svg +0 -14
- package/__flow__/SpotIllustration/spotIllustrations/network-data.svg +0 -25
- package/__flow__/SpotIllustration/spotIllustrations/no-messages-found.svg +0 -20
- package/__flow__/SpotIllustration/spotIllustrations/no-notifications.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/note.svg +0 -6
- package/__flow__/SpotIllustration/spotIllustrations/notification.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/notifications-onboarding.svg +0 -23
- package/__flow__/SpotIllustration/spotIllustrations/organize-message.svg +0 -64
- package/__flow__/SpotIllustration/spotIllustrations/outbox-queue.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/outbox-reviews.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/pdf.svg +0 -5
- package/__flow__/SpotIllustration/spotIllustrations/planning.svg +0 -28
- package/__flow__/SpotIllustration/spotIllustrations/podium.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/pointer.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/publish-assets.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/publish-links.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/publishing.svg +0 -29
- package/__flow__/SpotIllustration/spotIllustrations/puzzle-piece.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/question-mark.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/reporting-folder.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/reporting.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/review-location.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/review.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/robot-assembly.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/robot-error.svg +0 -19
- package/__flow__/SpotIllustration/spotIllustrations/robot-happy.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/rocket.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/schedule-date.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/schedule-messages.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/search-keywords.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/search-success.svg +0 -8
- package/__flow__/SpotIllustration/spotIllustrations/search-trends.svg +0 -23
- package/__flow__/SpotIllustration/spotIllustrations/search.svg +0 -86
- package/__flow__/SpotIllustration/spotIllustrations/security.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/sentiment.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/shopping-bag.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/spark-line.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/stamp.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/storefront.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/success.svg +0 -9
- package/__flow__/SpotIllustration/spotIllustrations/tag-message.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/tag.svg +0 -6
- package/__flow__/SpotIllustration/spotIllustrations/team-roles.svg +0 -17
- package/__flow__/SpotIllustration/spotIllustrations/team.svg +0 -16
- package/__flow__/SpotIllustration/spotIllustrations/telescope.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/tha-mel.svg +0 -15
- package/__flow__/SpotIllustration/spotIllustrations/thumbs-up.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/toggle-switch.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/toolset-strength.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/tracking-time.svg +0 -6
- package/__flow__/SpotIllustration/spotIllustrations/twitter-messages.svg +0 -11
- package/__flow__/SpotIllustration/spotIllustrations/twitter-profiles.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/under-construction.svg +0 -12
- package/__flow__/SpotIllustration/spotIllustrations/unsubscribe.svg +0 -10
- package/__flow__/SpotIllustration/spotIllustrations/upward-trend.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/user-task.svg +0 -58
- package/__flow__/SpotIllustration/spotIllustrations/view-connections.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/vip-list.svg +0 -13
- package/__flow__/SpotIllustration/spotIllustrations/warning.svg +0 -4
- package/__flow__/SpotIllustration/spotIllustrations/wifi.svg +0 -6
- package/__flow__/SpotIllustration/spotIllustrations/workflow-steps.svg +0 -28
- package/__flow__/Stack/TypeSpaceLiterals.js +0 -13
- package/__flow__/Stack/index.stories.js +0 -91
- package/__flow__/Stack/index.test.js +0 -22
- package/__flow__/Switch/index.stories.js +0 -42
- package/__flow__/Switch/index.test.js +0 -44
- package/__flow__/Table/index.stories.js +0 -293
- package/__flow__/Table/index.test.js +0 -91
- package/__flow__/TableCell/index.stories.js +0 -33
- package/__flow__/TableCell/index.test.js +0 -20
- package/__flow__/TableHeaderCell/index.stories.js +0 -54
- package/__flow__/TableHeaderCell/index.test.js +0 -28
- package/__flow__/TableRowAccordion/index.stories.js +0 -129
- package/__flow__/TableRowAccordion/index.test.js +0 -82
- package/__flow__/Tabs/index.stories.js +0 -84
- package/__flow__/Tabs/index.test.js +0 -242
- package/__flow__/Text/index.stories.js +0 -132
- package/__flow__/Text/index.test.js +0 -49
- package/__flow__/Textarea/index.stories.js +0 -90
- package/__flow__/Textarea/index.test.js +0 -86
- package/__flow__/Toast/index.stories.js +0 -118
- package/__flow__/ToggleHint/index.test.js +0 -16
- package/__flow__/Token/index.stories.js +0 -89
- package/__flow__/Token/index.test.js +0 -75
- package/__flow__/TokenInput/index.stories.js +0 -242
- package/__flow__/TokenInput/tests/default/clicking.test.js +0 -38
- package/__flow__/TokenInput/tests/default/deleting.test.js +0 -101
- package/__flow__/TokenInput/tests/default/focusing.test.js +0 -39
- package/__flow__/TokenInput/tests/default/inputting.test.js +0 -57
- package/__flow__/TokenInput/tests/default/pasting.test.js +0 -216
- package/__flow__/TokenInput/tests/default/rendering.test.js +0 -140
- package/__flow__/Tooltip/index.stories.js +0 -175
- package/__flow__/Tooltip/index.test.js +0 -182
- package/__flow__/building-stories.stories.mdx +0 -121
- package/__flow__/code-guidelines.mdx +0 -244
- package/__flow__/dataviz/dataviz.stories.js +0 -13
- package/__flow__/overview.stories.js +0 -60
- package/__flow__/setupTests.js +0 -22
- package/__flow__/systemProps/tests/__snapshots__/background.test.js.snap +0 -96
- package/__flow__/systemProps/tests/__snapshots__/border.test.js.snap +0 -469
- package/__flow__/systemProps/tests/__snapshots__/color.test.js.snap +0 -55
- package/__flow__/systemProps/tests/__snapshots__/custom.test.js.snap +0 -36
- package/__flow__/systemProps/tests/__snapshots__/flexbox.test.js.snap +0 -239
- package/__flow__/systemProps/tests/__snapshots__/grid.test.js.snap +0 -166
- package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +0 -204
- package/__flow__/systemProps/tests/__snapshots__/position.test.js.snap +0 -115
- package/__flow__/systemProps/tests/__snapshots__/shadow.test.js.snap +0 -25
- package/__flow__/systemProps/tests/__snapshots__/space.test.js.snap +0 -39
- package/__flow__/systemProps/tests/__snapshots__/typography.test.js.snap +0 -166
- package/__flow__/systemProps/tests/__snapshots__/variant.test.js.snap +0 -17
- package/__flow__/systemProps/tests/background.test.js +0 -90
- package/__flow__/systemProps/tests/border.test.js +0 -299
- package/__flow__/systemProps/tests/color.test.js +0 -49
- package/__flow__/systemProps/tests/custom.test.js +0 -38
- package/__flow__/systemProps/tests/flexbox.test.js +0 -150
- package/__flow__/systemProps/tests/grid.test.js +0 -123
- package/__flow__/systemProps/tests/layout.test.js +0 -126
- package/__flow__/systemProps/tests/position.test.js +0 -78
- package/__flow__/systemProps/tests/shadow.test.js +0 -30
- package/__flow__/systemProps/tests/space.test.js +0 -32
- package/__flow__/systemProps/tests/typography.test.js +0 -93
- package/__flow__/systemProps/tests/variant.test.js +0 -25
- package/__flow__/themes/extendedThemes/README.md +0 -6
- package/__flow__/themes/utils/_themed.scss +0 -119
- package/__flow__/utils/responsiveProps/index.test.js +0 -31
- package/__flow__/writing-good-stories.stories.mdx +0 -3
package/lib/index.js
CHANGED
|
@@ -1,67 +1,94 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
/* Asset types */
|
|
4
|
+
|
|
5
|
+
/* Theme and related types */
|
|
3
6
|
export * from "./systemProps";
|
|
4
|
-
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
5
|
-
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
6
|
-
export { useInteractiveColor } from "./utils/useInteractiveColor";
|
|
7
7
|
export { default as theme } from "./themes/light/theme";
|
|
8
8
|
export { default as darkTheme } from "./themes/dark/theme";
|
|
9
9
|
export { sproutLightTheme, sproutDarkTheme } from "./themes/extendedThemes/sproutTheme";
|
|
10
|
-
export { default as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
10
|
+
export { default as ThemeProvider } from "./ThemeProvider";
|
|
11
|
+
|
|
12
|
+
/* Utilities and related types */
|
|
13
|
+
export { useSelect, useMultiselect, useTextContent } from "./utils/hooks";
|
|
14
|
+
export { visuallyHidden, focusRing, disabled } from "./utils/mixins";
|
|
15
|
+
export { useInteractiveColor } from "./utils/useInteractiveColor";
|
|
16
|
+
|
|
17
|
+
/* Components */
|
|
18
|
+
export { default as Avatar } from "./Avatar";
|
|
14
19
|
export { default as Badge } from "./Badge";
|
|
15
|
-
export { default as
|
|
20
|
+
export { default as Banner } from "./Banner";
|
|
21
|
+
export { default as Box } from "./Box";
|
|
22
|
+
export { default as Breadcrumb } from "./Breadcrumb";
|
|
23
|
+
export { default as Button } from "./Button";
|
|
16
24
|
export { default as Card } from "./Card";
|
|
17
25
|
export { default as CharacterCounter } from "./CharacterCounter";
|
|
26
|
+
export { default as ChartLegend } from "./ChartLegend";
|
|
18
27
|
export { default as Checkbox } from "./Checkbox";
|
|
19
|
-
export { default as
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
28
|
+
export { default as Collapsible } from "./Collapsible";
|
|
29
|
+
/* should Stateful date pickers be exported? */
|
|
30
|
+
export { DateRangePicker, SingleDatePicker } from "./DatePicker";
|
|
31
|
+
export { default as Drawer } from "./Drawer";
|
|
32
|
+
export { default as EmptyState } from "./EmptyState";
|
|
33
|
+
export { default as Fieldset } from "./Fieldset";
|
|
34
|
+
export { default as FormField } from "./FormField";
|
|
35
|
+
export { default as Icon } from "./Icon";
|
|
24
36
|
export { default as Image } from "./Image";
|
|
37
|
+
export { default as Indicator } from "./Indicator";
|
|
38
|
+
export { default as Input } from "./Input";
|
|
25
39
|
export { default as KeyboardKey } from "./KeyboardKey";
|
|
26
|
-
export { default as ChartLegend } from "./ChartLegend";
|
|
27
|
-
export { default as Table } from "./Table";
|
|
28
|
-
export { default as TableCell } from "./TableCell";
|
|
29
|
-
export { default as TableHeaderCell } from "./TableHeaderCell";
|
|
30
|
-
export { default as TableRowAccordion } from "./TableRowAccordion";
|
|
31
|
-
export { default as Box } from "./Box";
|
|
32
40
|
export { default as Label } from "./Label";
|
|
33
|
-
export { default as Input } from "./Input";
|
|
34
|
-
export { default as Select } from "./Select";
|
|
35
|
-
export { default as Button } from "./Button";
|
|
36
41
|
export { default as Link } from "./Link";
|
|
37
|
-
export { default as
|
|
38
|
-
export { default as
|
|
39
|
-
export { default as TokenInput } from "./TokenInput";
|
|
40
|
-
export { default as Tabs } from "./Tabs";
|
|
41
|
-
export { default as Modal } from "./Modal";
|
|
42
|
-
export { default as Popout } from "./Popout";
|
|
43
|
-
export { default as ThemeProvider } from "./ThemeProvider";
|
|
44
|
-
export { default as Tooltip } from "./Tooltip";
|
|
45
|
-
export { default as Drawer } from "./Drawer";
|
|
42
|
+
export { default as Listbox, ListboxButton } from "./Listbox";
|
|
43
|
+
export { default as Loader } from "./Loader";
|
|
46
44
|
export { default as LoaderButton } from "./LoaderButton";
|
|
47
|
-
export { default as Numeral } from "./Numeral";
|
|
48
|
-
export { default as Collapsible } from "./Collapsible";
|
|
49
|
-
export { default as SegmentedControl } from "./SegmentedControl";
|
|
50
|
-
export { default as EmptyState } from "./EmptyState";
|
|
51
|
-
export { default as FormField } from "./FormField";
|
|
52
|
-
export { default as Fieldset } from "./Fieldset";
|
|
53
|
-
export { default as Message } from "./Message";
|
|
54
|
-
export { default as Stack } from "./Stack";
|
|
55
|
-
export { default as Avatar } from "./Avatar";
|
|
56
|
-
export { default as Breadcrumb } from "./Breadcrumb";
|
|
57
|
-
export { default as Skeleton } from "./Skeleton";
|
|
58
|
-
export { default as ToastContainer, toast } from "./Toast";
|
|
59
45
|
export { default as Menu, MenuButton } from "./Menu";
|
|
60
46
|
export { MenuButtonContext } from "./Menu/hooks";
|
|
61
47
|
export { MenuItemContainer } from "./Menu/styles";
|
|
62
|
-
export { default as
|
|
48
|
+
export { default as Message } from "./Message";
|
|
49
|
+
export { default as Modal } from "./Modal";
|
|
50
|
+
export { default as Numeral } from "./Numeral";
|
|
63
51
|
export { default as OverflowList } from "./OverflowList";
|
|
64
|
-
export { SingleDatePicker, DateRangePicker } from "./DatePicker";
|
|
65
|
-
export { VisuallyHidden } from "./VisuallyHidden";
|
|
66
52
|
export { default as PartnerLogo } from "./PartnerLogo";
|
|
67
|
-
export { default as
|
|
53
|
+
export { default as Popout } from "./Popout";
|
|
54
|
+
/* Should Portal be exported?
|
|
55
|
+
export {default as Portal} from './Portal';
|
|
56
|
+
export type {TypePortalProps} from './Portal/index.flow';
|
|
57
|
+
*/
|
|
58
|
+
export { default as Radio } from "./Radio";
|
|
59
|
+
export { default as SegmentedControl } from "./SegmentedControl";
|
|
60
|
+
export { default as Select } from "./Select";
|
|
61
|
+
export { default as Skeleton } from "./Skeleton";
|
|
62
|
+
export { default as SpotIllustration } from "./SpotIllustration";
|
|
63
|
+
export { default as Stack } from "./Stack";
|
|
64
|
+
export { default as Switch } from "./Switch";
|
|
65
|
+
export { default as Table } from "./Table";
|
|
66
|
+
export { default as TableCell } from "./TableCell";
|
|
67
|
+
export { default as TableHeaderCell } from "./TableHeaderCell";
|
|
68
|
+
export { default as TableRowAccordion } from "./TableRowAccordion";
|
|
69
|
+
export { default as Tabs } from "./Tabs";
|
|
70
|
+
export { default as Text } from "./Text";
|
|
71
|
+
export { default as Textarea } from "./Textarea";
|
|
72
|
+
export { default as ToastContainer, toast } from "./Toast";
|
|
73
|
+
export { default as ToggleHint } from "./ToggleHint";
|
|
74
|
+
export { default as Token } from "./Token";
|
|
75
|
+
export { default as TokenInput } from "./TokenInput";
|
|
76
|
+
export { default as Tooltip } from "./Tooltip";
|
|
77
|
+
export { VisuallyHidden } from "./VisuallyHidden";
|
|
78
|
+
|
|
79
|
+
/* Components types */
|
|
80
|
+
|
|
81
|
+
/* Deprecated exports */
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use badgeColor instead
|
|
84
|
+
*/
|
|
85
|
+
export { legacyBadgeColors } from "./Badge/constants";
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Alert has been renamed to Banner
|
|
88
|
+
*/
|
|
89
|
+
export { default as Alert } from "./Banner";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Should this be exported? @deprecated?
|
|
93
|
+
*/
|
|
94
|
+
export { DataVizRotation } from "./dataviz";
|
package/lib/themes/dark/theme.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
3
|
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; }
|
|
4
|
-
|
|
4
|
+
/* eslint-disable no-restricted-imports */
|
|
5
|
+
import { transparentize } from 'polished';
|
|
5
6
|
import COLORS from '@sproutsocial/seeds-color';
|
|
6
7
|
import DEPTH from '@sproutsocial/seeds-depth';
|
|
8
|
+
// json-to-scss is not working with the alias right now
|
|
9
|
+
//import {theme as lightTheme} from '@src';
|
|
7
10
|
import lightTheme from "../light/theme";
|
|
8
11
|
import { datavizPalette } from "./dataviz-palette";
|
|
9
12
|
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from "./decorative-palettes";
|
|
10
|
-
import { transparentize } from 'polished';
|
|
11
13
|
var MODE = 'dark';
|
|
12
14
|
export var shadows = {
|
|
13
15
|
low: "".concat(DEPTH.ELEVATION_LEVEL_100, " ").concat(COLORS.COLOR_NEUTRAL_1100, "FF"),
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
3
|
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; }
|
|
4
|
+
/* eslint-disable no-restricted-imports */
|
|
4
5
|
import { transparentize } from 'polished';
|
|
6
|
+
// json-to-scss is not working with the alias right now
|
|
7
|
+
//import {darkTheme as baseDarkTheme, type TypeSproutTheme} from '@src';
|
|
5
8
|
import baseDarkTheme from "../../../dark/theme";
|
|
6
9
|
export var navigation = {
|
|
7
10
|
main: {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
3
|
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; }
|
|
4
|
+
/* eslint-disable no-restricted-imports */
|
|
4
5
|
import { transparentize } from 'polished';
|
|
6
|
+
// json-to-scss is not working with the alias right now
|
|
7
|
+
//import {theme as baseLightTheme, type TypeSproutTheme} from '@src';
|
|
5
8
|
import baseLightTheme from "../../../light/theme";
|
|
6
9
|
export var navigation = {
|
|
7
10
|
main: {
|
|
@@ -2,17 +2,17 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
2
2
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3
3
|
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; }
|
|
4
4
|
|
|
5
|
+
import { transparentize } from 'polished';
|
|
5
6
|
import COLORS from '@sproutsocial/seeds-color';
|
|
6
|
-
import literalColors from "./literal-colors";
|
|
7
|
-
import { datavizPalette } from "./dataviz-palette";
|
|
8
|
-
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from "./decorative-palettes";
|
|
9
7
|
import NETWORKCOLORS from '@sproutsocial/seeds-networkcolor';
|
|
10
8
|
import TYPOGRAPHY from '@sproutsocial/seeds-typography';
|
|
11
9
|
import SPACE from '@sproutsocial/seeds-space';
|
|
12
10
|
import DEPTH from '@sproutsocial/seeds-depth';
|
|
13
11
|
import MOTION from '@sproutsocial/seeds-motion';
|
|
14
12
|
import BORDER from '@sproutsocial/seeds-border';
|
|
15
|
-
import
|
|
13
|
+
import literalColors from "./literal-colors";
|
|
14
|
+
import { datavizPalette } from "./dataviz-palette";
|
|
15
|
+
import { green, blue, purple, yellow, orange, red, neutral, magenta, pink, aqua, teal } from "./decorative-palettes";
|
|
16
16
|
export var breakpoints = ['900px', '1200px', '1500px', '1800px'];
|
|
17
17
|
var MODE = 'light';
|
|
18
18
|
|
|
@@ -284,12 +284,6 @@ export var fontWeights = {
|
|
|
284
284
|
bold: TYPOGRAPHY.TYPOGRAPHY_WEIGHT_BOLD,
|
|
285
285
|
extrabold: TYPOGRAPHY.TYPOGRAPHY_WEIGHT_EXTRA_BOLD
|
|
286
286
|
};
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* @deprecated
|
|
290
|
-
* Import from `Stack/TypeSpaceLiterals` instead.
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
287
|
export var space = {
|
|
294
288
|
'0': SPACE.SPACE_SIZE_0,
|
|
295
289
|
'100': SPACE.SPACE_SIZE_100,
|
package/lib/utils/hooks.js
CHANGED
|
@@ -10,7 +10,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
10
10
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
import { useState, useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
|
|
13
|
-
import { canUseDOM } from "
|
|
13
|
+
import { canUseDOM } from "./";
|
|
14
14
|
export function useTextContent(initial) {
|
|
15
15
|
var _useState = useState(initial),
|
|
16
16
|
_useState2 = _slicedToArray(_useState, 2),
|
package/lib/utils/mixins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
import { transparentize } from 'polished';
|
|
2
3
|
import { css } from 'styled-components';
|
|
3
4
|
import theme from "../themes/light/theme";
|
|
4
|
-
import { transparentize } from 'polished';
|
|
5
5
|
export var svgToDataURL = function svgToDataURL(svgStr) {
|
|
6
6
|
var encoded = encodeURIComponent(svgStr).replace(/'/g, '%27').replace(/"/g, '%22');
|
|
7
7
|
var header = 'data:image/svg+xml,';
|
|
@@ -6,14 +6,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
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; }
|
|
8
8
|
import * as React from 'react';
|
|
9
|
-
import { act, cleanup, createEvent, fireEvent, queries, render, screen, wait, waitFor, waitForElement, waitForElementToBeRemoved, within } from '@testing-library/react';
|
|
9
|
+
import { act, cleanup, createEvent, fireEvent, queries, render, screen as defaultScreen, wait, waitFor, waitForElement, waitForElementToBeRemoved, within } from '@testing-library/react';
|
|
10
10
|
import userEvent from '@testing-library/user-event';
|
|
11
|
+
import ThemeProvider from "../ThemeProvider";
|
|
11
12
|
import { a11yCheck } from "./a11yTest";
|
|
12
13
|
import { dataQaLabelQueries } from "./dataQaLabelQueries";
|
|
13
|
-
import ThemeProvider from "../ThemeProvider";
|
|
14
14
|
var sproutQueries = _objectSpread(_objectSpread({}, queries), dataQaLabelQueries);
|
|
15
15
|
var customRender = function customRender(node, options) {
|
|
16
|
-
var
|
|
16
|
+
var utils = render(node, _objectSpread(_objectSpread({}, options), {}, {
|
|
17
17
|
queries: sproutQueries,
|
|
18
18
|
wrapper: ThemeProvider
|
|
19
19
|
}));
|
|
@@ -24,7 +24,7 @@ var customRender = function customRender(node, options) {
|
|
|
24
24
|
switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
26
|
_context.next = 2;
|
|
27
|
-
return a11yCheck(
|
|
27
|
+
return a11yCheck(utils.container);
|
|
28
28
|
case 2:
|
|
29
29
|
case "end":
|
|
30
30
|
return _context.stop();
|
|
@@ -36,11 +36,13 @@ var customRender = function customRender(node, options) {
|
|
|
36
36
|
return _ref.apply(this, arguments);
|
|
37
37
|
};
|
|
38
38
|
}();
|
|
39
|
-
return _objectSpread(_objectSpread({},
|
|
39
|
+
return _objectSpread(_objectSpread({}, utils), {}, {
|
|
40
40
|
runA11yCheck: runA11yCheck
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
43
|
var customWithin = function customWithin(element) {
|
|
44
44
|
return within(element, sproutQueries);
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
var boundQueries = within(document.body, sproutQueries);
|
|
47
|
+
var customScreen = _objectSpread(_objectSpread({}, defaultScreen), boundQueries);
|
|
48
|
+
export { act, cleanup, createEvent, customRender as render, customWithin as within, fireEvent, customScreen as screen, userEvent, wait, waitFor, waitForElement, waitForElementToBeRemoved };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/racine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"__flow__",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"watch-app": "BABEL_ENV=es node ./bin/buildApp.js --watch",
|
|
31
31
|
"start-package-only": "npm-run-all install-deps clean -p build-icons watch-package",
|
|
32
32
|
"start": "npm-run-all install-deps clean -p build-icons watch-package watch-app",
|
|
33
|
-
"build": "npm-run-all clean
|
|
33
|
+
"build": "npm-run-all -s clean build-icons build-package build-app",
|
|
34
34
|
"flow": "yarn run build-icons && flow check --max-warnings 0",
|
|
35
35
|
"lint-js": "eslint --max-warnings=0 --fix .",
|
|
36
36
|
"lint-css": "stylelint 'src/**/*.js'",
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
"jest": "jest",
|
|
39
39
|
"jest:watch": "jest --watch",
|
|
40
40
|
"test": "npm-run-all flow lint-js lint-css lint-icons jest",
|
|
41
|
+
"backstop-test": "yarn backstop test --config='backstop.config.js' --docker",
|
|
42
|
+
"backstop-reference": "yarn backstop reference --config='backstop.config.js' --docker",
|
|
43
|
+
"backstop-approve": "yarn backstop approve --config='backstop.config.js' --docker",
|
|
41
44
|
"new": "node ./bin/scaffold.js",
|
|
42
45
|
"playground": "node ./bin/scaffold-playground.js && yarn start",
|
|
43
46
|
"release": "yarn test && yarn changeset publish",
|
|
@@ -65,7 +68,7 @@
|
|
|
65
68
|
"classnames": "^2.2.6",
|
|
66
69
|
"lodash.curry": "^4.1.1",
|
|
67
70
|
"lodash.uniqueid": "^4.0.1",
|
|
68
|
-
"lru-memoize": "
|
|
71
|
+
"lru-memoize": "~1.0.2",
|
|
69
72
|
"mutationobserver-shim": "^0.3.7",
|
|
70
73
|
"polished": "^3.4.1",
|
|
71
74
|
"raw-loader": "^3.0.0",
|
|
@@ -83,6 +86,8 @@
|
|
|
83
86
|
"@babel/cli": "^7.5.5",
|
|
84
87
|
"@babel/core": "^7.20.2",
|
|
85
88
|
"@babel/eslint-parser": "^7.19.1",
|
|
89
|
+
"@babel/plugin-syntax-flow": "^7.18.6",
|
|
90
|
+
"@babel/plugin-syntax-jsx": "^7.18.6",
|
|
86
91
|
"@babel/preset-env": "^7.20.2",
|
|
87
92
|
"@babel/preset-flow": "^7.0.0",
|
|
88
93
|
"@babel/preset-react": "^7.0.0",
|
|
@@ -93,7 +98,7 @@
|
|
|
93
98
|
"@sproutsocial/seeds-color": "^1.5.3",
|
|
94
99
|
"@sproutsocial/seeds-depth": "^3.0.0",
|
|
95
100
|
"@sproutsocial/seeds-motion": "^1.2.0",
|
|
96
|
-
"@sproutsocial/seeds-networkcolor": "^2.
|
|
101
|
+
"@sproutsocial/seeds-networkcolor": "^2.11.0",
|
|
97
102
|
"@sproutsocial/seeds-space": "^0.4.7",
|
|
98
103
|
"@sproutsocial/seeds-typography": "^3.0.1",
|
|
99
104
|
"@storybook/addon-a11y": "^6.4.19",
|
|
@@ -118,6 +123,7 @@
|
|
|
118
123
|
"babel-plugin-polished": "^1.1.0",
|
|
119
124
|
"babel-plugin-styled-components": "^2.0.7",
|
|
120
125
|
"babel-polyfill": "^6.26.0",
|
|
126
|
+
"backstopjs": "^6.1.4",
|
|
121
127
|
"chalk": "^2.3.2",
|
|
122
128
|
"csstype": "^2.6.9",
|
|
123
129
|
"eslint": "7.27.0",
|
|
@@ -129,11 +135,13 @@
|
|
|
129
135
|
"eslint-plugin-flowtype": "^5.7.2",
|
|
130
136
|
"eslint-plugin-import": "^2.26.0",
|
|
131
137
|
"eslint-plugin-jest": "^27.1.5",
|
|
138
|
+
"eslint-plugin-jest-dom": "^4.0.3",
|
|
132
139
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
|
133
140
|
"eslint-plugin-prettier": "^3.1.4",
|
|
134
141
|
"eslint-plugin-react": "^7.31.10",
|
|
135
142
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
136
|
-
"
|
|
143
|
+
"eslint-plugin-testing-library": "^5.9.1",
|
|
144
|
+
"flow-bin": "0.131.0",
|
|
137
145
|
"glob": "^7.1.6",
|
|
138
146
|
"husky": "^0.14.3",
|
|
139
147
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -142,7 +150,7 @@
|
|
|
142
150
|
"jest": "27.x.x",
|
|
143
151
|
"jest-axe": "6.0.0",
|
|
144
152
|
"jest-styled-components": "7.0.0-beta.1",
|
|
145
|
-
"jscodeshift": "^0.
|
|
153
|
+
"jscodeshift": "^0.14.0",
|
|
146
154
|
"json-to-scss": "^1.6.2",
|
|
147
155
|
"lint-staged": "^13.0.3",
|
|
148
156
|
"moment": "^2.29.4",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import {render, screen} from '../../utils/react-testing-library';
|
|
4
|
-
import Avatar from '../index';
|
|
5
|
-
|
|
6
|
-
// This top level describe should be used to describe the component and what we are testing
|
|
7
|
-
describe('Avatar/features', () => {
|
|
8
|
-
// Each describe should describe an intentional feature of the component
|
|
9
|
-
|
|
10
|
-
describe('When an image is provided', () => {
|
|
11
|
-
// Each test should describe the expected behavior of the feature and its fallbacks
|
|
12
|
-
it('should render an image correctly', () => {
|
|
13
|
-
const imgSrc = 'https://github.com/kentcdodds.png';
|
|
14
|
-
render(<Avatar name="John Doe" src={imgSrc} />);
|
|
15
|
-
const image = screen.getByAltText('John Doe');
|
|
16
|
-
expect(image).toHaveAttribute('src', imgSrc);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should not render initials', () => {
|
|
20
|
-
const imgSrc = 'https://github.com/kentcdodds.png';
|
|
21
|
-
render(<Avatar name="John Doe" src={imgSrc} />);
|
|
22
|
-
const initials = screen.queryByText('JD');
|
|
23
|
-
expect(initials).not.toBeInTheDocument();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('should render initials when image fails to load', async () => {
|
|
27
|
-
render(<Avatar name="John Doe" src="" />);
|
|
28
|
-
// TODO: figure out a better way to mock image failures...
|
|
29
|
-
const image = await screen.queryByRole('img');
|
|
30
|
-
const initials = await screen.getByText('JD');
|
|
31
|
-
expect(image).not.toBeInTheDocument();
|
|
32
|
-
expect(initials).toBeInTheDocument();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should render as circle by default', () => {
|
|
36
|
-
render(<Avatar name="John Doe" />);
|
|
37
|
-
const avatar = screen.getByTitle('John Doe');
|
|
38
|
-
expect(avatar).toHaveStyleRule('border-radius', '50%');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should render as a leaf when appearance="leaf" ', () => {
|
|
42
|
-
render(<Avatar name="John Doe" appearance="leaf" />);
|
|
43
|
-
const avatar = screen.getByTitle('John Doe');
|
|
44
|
-
expect(avatar).toHaveStyleRule('border-radius', '40% 0 40% 0');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('should render 40px by default', () => {
|
|
48
|
-
render(<Avatar name="John Doe" />);
|
|
49
|
-
const avatar = screen.getByTitle('John Doe');
|
|
50
|
-
expect(avatar).toHaveStyleRule('width', '40px');
|
|
51
|
-
expect(avatar).toHaveStyleRule('height', '40px');
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
describe('When no image is provided', () => {
|
|
56
|
-
it('should render initials correctly', () => {
|
|
57
|
-
render(<Avatar name="John Doe" />);
|
|
58
|
-
const initials = screen.getByText('JD');
|
|
59
|
-
expect(initials).toBeInTheDocument();
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('should render single initial if only 1 name given', () => {
|
|
63
|
-
render(<Avatar name="John" />);
|
|
64
|
-
const singleInitial = screen.getByText('J');
|
|
65
|
-
expect(singleInitial).toBeInTheDocument();
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('should display first 2 initials if >3 names are provided', () => {
|
|
69
|
-
render(<Avatar name="John Doe Smith" />);
|
|
70
|
-
const initials = screen.getByText('JD');
|
|
71
|
-
expect(initials).toBeInTheDocument();
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('should render a "?" as a fallback if no name is provided', () => {
|
|
75
|
-
render(<Avatar />);
|
|
76
|
-
const fallback = screen.getByText('?');
|
|
77
|
-
const initials = screen.queryByText('JD');
|
|
78
|
-
expect(fallback).toBeInTheDocument();
|
|
79
|
-
expect(initials).not.toBeInTheDocument();
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
describe('When a user wants to customize Avatar', () => {
|
|
84
|
-
it('should be able to the size of Avatar', () => {
|
|
85
|
-
render(<Avatar name="John Doe" size="100px" />);
|
|
86
|
-
const avatar = screen.getByTitle('John Doe');
|
|
87
|
-
expect(avatar).toHaveStyleRule('width', '100px');
|
|
88
|
-
expect(avatar).toHaveStyleRule('height', '100px');
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// Should we even test stuff like this? What's the best way for us to test intentional overrides we provide that are not a default behavior?
|
|
92
|
-
it('should render different color background when type prop is used', () => {
|
|
93
|
-
render(<Avatar name="John Doe" type="blue" />);
|
|
94
|
-
const avatar = screen.getByTitle('John Doe');
|
|
95
|
-
expect(avatar).toHaveStyleRule('background', `#c7e4f9`);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Avatar from './index';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Components/Avatar',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const defaultStory = () => <Avatar name="Joe Smith" />;
|
|
10
|
-
|
|
11
|
-
defaultStory.story = {
|
|
12
|
-
name: 'Default',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const customColors = () => (
|
|
16
|
-
<Avatar name="Joe Smith" bg="purple.500" color="red.200" />
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
customColors.story = {
|
|
20
|
-
name: 'Override colors',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const withVariants = () => (
|
|
24
|
-
<div display="inline-block">
|
|
25
|
-
<Avatar mt={5} name="Kent C. Dodds" type="neutral" variant="dark" />
|
|
26
|
-
<Avatar mt={5} name="Kent C. Dodds" type="neutral" variant="light" />
|
|
27
|
-
<Avatar mt={5} name="Kent C. Dodds" type="green" variant="dark" />
|
|
28
|
-
<Avatar mt={5} name="Kent C. Dodds" type="green" variant="light" />
|
|
29
|
-
<Avatar mt={5} name="Kent C. Dodds" type="purple" variant="dark" />
|
|
30
|
-
<Avatar mt={5} name="Kent C. Dodds" type="purple" variant="light" />
|
|
31
|
-
<Avatar mt={5} name="Kent C. Dodds" type="red" variant="light" />
|
|
32
|
-
<Avatar mt={5} name="Kent C. Dodds" type="red" variant="dark" />
|
|
33
|
-
<Avatar mt={5} name="Kent C. Dodds" type="yellow" variant="light" />
|
|
34
|
-
<Avatar mt={5} name="Kent C. Dodds" type="yellow" variant="dark" />
|
|
35
|
-
<Avatar mt={5} name="Kent C. Dodds" type="blue" variant="light" />
|
|
36
|
-
<Avatar mt={5} name="Kent C. Dodds" type="blue" variant="dark" />
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
withVariants.story = {
|
|
41
|
-
name: 'With color types',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const withImage = () => (
|
|
45
|
-
<Avatar name="Kent C. Dodds" src="https://github.com/kentcdodds.png" />
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
withImage.story = {
|
|
49
|
-
name: 'With image',
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const Leaf = () => (
|
|
53
|
-
<Avatar
|
|
54
|
-
name="Kent C. Dodds"
|
|
55
|
-
src="https://github.com/kentcdodds.png"
|
|
56
|
-
appearance="leaf"
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
Leaf.story = {
|
|
61
|
-
name: 'Leaf appearance',
|
|
62
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Badge from './index';
|
|
4
|
-
import Box from '../Box';
|
|
5
|
-
import Numeral from '../Numeral';
|
|
6
|
-
import Text from '../Text';
|
|
7
|
-
import Stack from '../Stack';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Components/Badge',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const permutations = () => (
|
|
14
|
-
<Stack space={450}>
|
|
15
|
-
<Box display="flex" alignItems="center">
|
|
16
|
-
<Badge badgeColor="green">Badge</Badge>
|
|
17
|
-
<Badge>Badge</Badge>
|
|
18
|
-
<Badge badgeColor="purple">Badge</Badge>
|
|
19
|
-
<Badge badgeColor="yellow">Badge</Badge>
|
|
20
|
-
<Badge badgeColor="orange">Badge</Badge>
|
|
21
|
-
<Badge badgeColor="red">Badge</Badge>
|
|
22
|
-
<Badge badgeColor="neutral" iconName="atom">
|
|
23
|
-
Badge
|
|
24
|
-
</Badge>
|
|
25
|
-
<Badge
|
|
26
|
-
size="small"
|
|
27
|
-
type="default"
|
|
28
|
-
bg="chartreuse"
|
|
29
|
-
color="crimson"
|
|
30
|
-
p={500}
|
|
31
|
-
>
|
|
32
|
-
Radical overrides!
|
|
33
|
-
</Badge>
|
|
34
|
-
</Box>
|
|
35
|
-
<Box display="flex" alignItems="center">
|
|
36
|
-
<Badge size="large" type="secondary" iconName="sparkles">
|
|
37
|
-
Supports legacy types
|
|
38
|
-
</Badge>
|
|
39
|
-
<Badge size="large">
|
|
40
|
-
<Numeral fontWeight="bold" number={1569241} />
|
|
41
|
-
<Text ml={200}>and children!</Text>
|
|
42
|
-
</Badge>
|
|
43
|
-
</Box>
|
|
44
|
-
</Stack>
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
permutations.story = {
|
|
48
|
-
name: 'Permutations',
|
|
49
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import Badge from './';
|
|
4
|
-
import {render} from '../utils/react-testing-library';
|
|
5
|
-
import 'jest-styled-components';
|
|
6
|
-
|
|
7
|
-
describe('Badge...', () => {
|
|
8
|
-
it('...should render with default props', () => {
|
|
9
|
-
const {getByText} = render(<Badge>Test</Badge>);
|
|
10
|
-
expect(getByText('Test')).toBeTruthy();
|
|
11
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule(
|
|
12
|
-
'padding',
|
|
13
|
-
'0px 4px'
|
|
14
|
-
);
|
|
15
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule(
|
|
16
|
-
'background',
|
|
17
|
-
'#dcf2ff'
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('...should render with correct size styling', () => {
|
|
22
|
-
const {getByText} = render(<Badge size="large">Test</Badge>);
|
|
23
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule('padding', '8px');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('...should render with legacy type', () => {
|
|
27
|
-
const {getByText} = render(<Badge type="secondary">Test</Badge>);
|
|
28
|
-
expect(getByText('Test')).toBeTruthy();
|
|
29
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule(
|
|
30
|
-
'color',
|
|
31
|
-
'#364141'
|
|
32
|
-
);
|
|
33
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule(
|
|
34
|
-
'background',
|
|
35
|
-
'#fdefcd'
|
|
36
|
-
);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('...should render with a badge color', () => {
|
|
40
|
-
const {getByText} = render(<Badge badgeColor="purple">Test</Badge>);
|
|
41
|
-
expect(getByText('Test')).toBeTruthy();
|
|
42
|
-
expect(getByText('Test').closest('span')).toHaveStyleRule(
|
|
43
|
-
'background',
|
|
44
|
-
'#eaeaf9'
|
|
45
|
-
);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
it('...should render with an icon', () => {
|
|
49
|
-
const {container} = render(<Badge iconName="sparkles">Test</Badge>);
|
|
50
|
-
expect(container.querySelector('svg')).toBeTruthy();
|
|
51
|
-
});
|
|
52
|
-
it('should render with suggestion type', () => {
|
|
53
|
-
const {getByText, getByDataQaLabel} = render(
|
|
54
|
-
<Badge text="Test" type="suggestion" />
|
|
55
|
-
);
|
|
56
|
-
expect(getByText('Test')).toBeTruthy();
|
|
57
|
-
expect(getByDataQaLabel({'badge-type': 'suggestion'})).toBeTruthy();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it('...should render with tooltip class', () => {
|
|
61
|
-
const {getByText, getByDataQaLabel} = render(
|
|
62
|
-
<Badge tip="test tip">Test</Badge>
|
|
63
|
-
);
|
|
64
|
-
expect(getByText('Test')).toBeTruthy();
|
|
65
|
-
expect(getByDataQaLabel({'badge-tip': 'test tip'})).toBeTruthy();
|
|
66
|
-
});
|
|
67
|
-
});
|