@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
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import Box from
|
|
4
|
-
import Text from
|
|
5
|
-
import {ChildContainer} from
|
|
6
|
-
|
|
7
|
-
type TypeProps = {
|
|
8
|
-
/** Label text to display above the fieldset */
|
|
9
|
-
label: React.Node,
|
|
10
|
-
helperText?: React.Node,
|
|
11
|
-
layout?: 'vertical' | 'horizontal',
|
|
12
|
-
children: React.Node,
|
|
13
|
-
};
|
|
3
|
+
import Box from "../Box";
|
|
4
|
+
import Text from "../Text";
|
|
5
|
+
import { ChildContainer } from "./styles";
|
|
6
|
+
import type { TypeFieldsetProps } from "./index.flow";
|
|
14
7
|
|
|
15
8
|
/**
|
|
16
9
|
* Fieldset Component
|
|
@@ -21,53 +14,29 @@ const Fieldset = ({
|
|
|
21
14
|
helperText,
|
|
22
15
|
children,
|
|
23
16
|
...rest
|
|
24
|
-
}:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{typeof label === 'string' ?
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)}
|
|
32
|
-
{typeof helperText === 'string' ? (
|
|
33
|
-
<Fieldset.HelperText>{helperText}</Fieldset.HelperText>
|
|
34
|
-
) : (
|
|
35
|
-
helperText
|
|
36
|
-
)}
|
|
37
|
-
<Box
|
|
38
|
-
display="flex"
|
|
39
|
-
flexDirection={layout === 'vertical' ? 'column' : 'row'}
|
|
40
|
-
>
|
|
41
|
-
{React.Children.map(children, (child) => (
|
|
42
|
-
<ChildContainer layout={layout}>{child}</ChildContainer>
|
|
43
|
-
))}
|
|
17
|
+
}: TypeFieldsetProps) =>
|
|
18
|
+
// $FlowIssue - upgrade v0.112.0
|
|
19
|
+
<Box as="fieldset" border="none" p={0} data-qa-fieldset="" {...rest}>
|
|
20
|
+
{typeof label === 'string' ? <Fieldset.Legend>{label}</Fieldset.Legend> : label}
|
|
21
|
+
{typeof helperText === 'string' ? <Fieldset.HelperText>{helperText}</Fieldset.HelperText> : helperText}
|
|
22
|
+
<Box display="flex" flexDirection={layout === 'vertical' ? 'column' : 'row'}>
|
|
23
|
+
{React.Children.map(children, child => <ChildContainer layout={layout}>{child}</ChildContainer>)}
|
|
44
24
|
</Box>
|
|
45
|
-
</Box
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
as="legend"
|
|
51
|
-
fontSize={300}
|
|
52
|
-
fontWeight="semibold"
|
|
53
|
-
color="text.body"
|
|
54
|
-
mb={300}
|
|
55
|
-
{...rest}
|
|
56
|
-
>
|
|
25
|
+
</Box>;
|
|
26
|
+
const FieldsetLegend = ({
|
|
27
|
+
children,
|
|
28
|
+
...rest
|
|
29
|
+
}) => <Text as="legend" fontSize={300} fontWeight="semibold" color="text.body" mb={300} {...rest}>
|
|
57
30
|
{children}
|
|
58
|
-
</Text
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
31
|
+
</Text>;
|
|
32
|
+
const FieldsetHelperText = ({
|
|
33
|
+
children,
|
|
34
|
+
...rest
|
|
35
|
+
}) => <Text as="p" fontSize={200} mb={300} {...rest}>
|
|
63
36
|
{children}
|
|
64
|
-
</Text
|
|
65
|
-
);
|
|
66
|
-
|
|
37
|
+
</Text>;
|
|
67
38
|
Fieldset.Legend = FieldsetLegend;
|
|
68
39
|
Fieldset.HelperText = FieldsetHelperText;
|
|
69
|
-
|
|
70
40
|
Fieldset.Legend.displayName = 'Fieldset.Legend';
|
|
71
41
|
Fieldset.HelperText.displayName = 'Fieldset.HelperText';
|
|
72
|
-
|
|
73
|
-
export default Fieldset;
|
|
42
|
+
export default Fieldset;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
//@flow
|
|
2
|
-
import styled, {css} from 'styled-components';
|
|
3
|
-
import Box from
|
|
4
|
-
|
|
5
|
-
import type {TypeTheme} from '../types/theme.flow';
|
|
6
|
-
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import Box from "../Box";
|
|
4
|
+
import type { TypeTheme } from "../types/theme.flow";
|
|
7
5
|
export const ChildContainer = styled<typeof Box, TypeTheme, any>(Box)`
|
|
8
|
-
${
|
|
9
|
-
props.layout === 'vertical' &&
|
|
10
|
-
css`
|
|
6
|
+
${props => props.layout === 'vertical' && css`
|
|
11
7
|
margin-top: ${props.theme.space[300]};
|
|
12
8
|
|
|
13
9
|
&:first-child {
|
|
@@ -15,13 +11,11 @@ export const ChildContainer = styled<typeof Box, TypeTheme, any>(Box)`
|
|
|
15
11
|
}
|
|
16
12
|
`}
|
|
17
13
|
|
|
18
|
-
${
|
|
19
|
-
props.layout === 'horizontal' &&
|
|
20
|
-
css`
|
|
14
|
+
${props => props.layout === 'horizontal' && css`
|
|
21
15
|
margin-left: ${props.theme.space[300]};
|
|
22
16
|
|
|
23
17
|
&:first-child {
|
|
24
18
|
margin-left: 0;
|
|
25
19
|
}
|
|
26
20
|
`}
|
|
27
|
-
`;
|
|
21
|
+
`;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'no babel-plugin-flow-react-proptypes';
|
|
2
|
+
|
|
3
|
+
// @flow
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import Box from "../Box";
|
|
6
|
+
export type TypeFormFieldProps = {
|
|
7
|
+
...React.ElementConfig<typeof Box>,
|
|
8
|
+
/** A function that receives props that need to be spread onto the child element */
|
|
9
|
+
children: (options: {
|
|
10
|
+
id: string,
|
|
11
|
+
isInvalid: boolean,
|
|
12
|
+
ariaDescribedby: string,
|
|
13
|
+
}) => React.Element<any>,
|
|
14
|
+
/** Text describing any error with the field's content */
|
|
15
|
+
error?: React.Node,
|
|
16
|
+
/** Text acting as a description blurb below the main label **/
|
|
17
|
+
helperText?: React.Node,
|
|
18
|
+
/** ID of the form element (will be auto-generated if not provided) */
|
|
19
|
+
id?: string,
|
|
20
|
+
/** Whether the current contents of the field are invalid */
|
|
21
|
+
isInvalid?: boolean,
|
|
22
|
+
/** Label text to display above the form field */
|
|
23
|
+
label: React.Node,
|
|
24
|
+
qa?: Object,
|
|
25
|
+
/** Whether the label text should be visually hidden */
|
|
26
|
+
isLabelHidden?: boolean,
|
|
27
|
+
...
|
|
28
|
+
};
|
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
'no babel-plugin-flow-react-proptypes';
|
|
2
|
+
|
|
2
3
|
// @flow
|
|
3
4
|
import * as React from 'react';
|
|
4
|
-
import {useState} from 'react';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {useTextContent} from '../utils/hooks';
|
|
12
|
-
|
|
13
|
-
export type TypeProps = {
|
|
14
|
-
...React.ElementConfig<typeof Box>,
|
|
15
|
-
/** A function that receives props that need to be spread onto the child element */
|
|
16
|
-
children: (options: {
|
|
17
|
-
id: string,
|
|
18
|
-
isInvalid: boolean,
|
|
19
|
-
ariaDescribedby: string,
|
|
20
|
-
}) => React.Element<any>,
|
|
21
|
-
/** Text describing any error with the field's content */
|
|
22
|
-
error?: React.Node,
|
|
23
|
-
/** Text acting as a description blurb below the main label **/
|
|
24
|
-
helperText?: React.Node,
|
|
25
|
-
/** ID of the form element (will be auto-generated if not provided) */
|
|
26
|
-
id?: string,
|
|
27
|
-
/** Whether the current contents of the field are invalid */
|
|
28
|
-
isInvalid?: boolean,
|
|
29
|
-
/** Label text to display above the form field */
|
|
30
|
-
label: React.Node,
|
|
31
|
-
qa?: Object,
|
|
32
|
-
/** Whether the label text should be visually hidden */
|
|
33
|
-
isLabelHidden?: boolean,
|
|
34
|
-
};
|
|
5
|
+
import { useState } from 'react';
|
|
6
|
+
import { useTextContent } from "../utils/hooks";
|
|
7
|
+
import Box from "../Box";
|
|
8
|
+
import Label from "../Label";
|
|
9
|
+
import Text from "../Text";
|
|
10
|
+
import { VisuallyHidden } from "../VisuallyHidden";
|
|
11
|
+
import type { TypeFormFieldProps } from "./index.flow";
|
|
35
12
|
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use TypeFormFieldProps from root instead
|
|
15
|
+
*/
|
|
16
|
+
export type TypeProps = TypeFormFieldProps;
|
|
36
17
|
let idCounter = 0;
|
|
37
|
-
|
|
38
18
|
const FormField = ({
|
|
39
19
|
children,
|
|
40
20
|
error,
|
|
@@ -46,52 +26,28 @@ const FormField = ({
|
|
|
46
26
|
qa,
|
|
47
27
|
isLabelHidden = false,
|
|
48
28
|
...rest
|
|
49
|
-
}:
|
|
29
|
+
}: TypeFormFieldProps) => {
|
|
50
30
|
const [id] = useState(identifier || `FormField-${idCounter++}`);
|
|
51
31
|
const errorId = `Error-${id}`;
|
|
52
32
|
const containerText = useTextContent('');
|
|
53
33
|
const errorContainerText = useTextContent('');
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<Box
|
|
57
|
-
{...rest}
|
|
58
|
-
{...qa}
|
|
59
|
-
mb={mb}
|
|
60
|
-
data-qa-formfield={
|
|
61
|
-
(qa && qa['data-qa-formfield']) || id || containerText.current
|
|
62
|
-
}
|
|
63
|
-
data-qa-formfield-isinvalid={isInvalid === true}
|
|
64
|
-
>
|
|
65
|
-
{isLabelHidden ? (
|
|
66
|
-
<VisuallyHidden data-testid="visually-hidden">
|
|
34
|
+
return <Box {...rest} {...qa} mb={mb} data-qa-formfield={qa && qa['data-qa-formfield'] || id || containerText.current} data-qa-formfield-isinvalid={isInvalid === true}>
|
|
35
|
+
{isLabelHidden ? <VisuallyHidden data-testid="visually-hidden">
|
|
67
36
|
<Label htmlFor={id}>{label}</Label>
|
|
68
|
-
</VisuallyHidden>
|
|
69
|
-
) : (
|
|
70
|
-
<Label mb={helperText ? 100 : 300} htmlFor={id}>
|
|
37
|
+
</VisuallyHidden> : <Label mb={helperText ? 100 : 300} htmlFor={id}>
|
|
71
38
|
{label}
|
|
72
|
-
</Label>
|
|
73
|
-
|
|
74
|
-
{helperText && (
|
|
75
|
-
<Text as="p" fontSize={200} mb={300} color="text.subtext">
|
|
39
|
+
</Label>}
|
|
40
|
+
{helperText && <Text as="p" fontSize={200} mb={300} color="text.subtext">
|
|
76
41
|
{helperText}
|
|
77
|
-
</Text>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
color="text.error"
|
|
85
|
-
mt={300}
|
|
86
|
-
id={errorId}
|
|
87
|
-
data-qa-formfield-error={
|
|
88
|
-
(qa && qa['data-qa-formfield-error']) || errorContainerText.current
|
|
89
|
-
}
|
|
90
|
-
>
|
|
42
|
+
</Text>}
|
|
43
|
+
{children({
|
|
44
|
+
id,
|
|
45
|
+
isInvalid,
|
|
46
|
+
ariaDescribedby: errorId
|
|
47
|
+
})}
|
|
48
|
+
{isInvalid && error && <Text as="div" fontSize={200} color="text.error" mt={300} id={errorId} data-qa-formfield-error={qa && qa['data-qa-formfield-error'] || errorContainerText.current}>
|
|
91
49
|
{error}
|
|
92
|
-
</Text>
|
|
93
|
-
|
|
94
|
-
</Box>
|
|
95
|
-
);
|
|
50
|
+
</Text>}
|
|
51
|
+
</Box>;
|
|
96
52
|
};
|
|
97
|
-
export default FormField;
|
|
53
|
+
export default FormField;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// @flow
|
|
1
2
|
// In February of 2020, the Design Systems team renamed and consolidated some icons in an effort to introduce consistency in the naming of our icons. This object maps old, deprecated icon names to the "correct" name of the icon {"deprecated key": "correct icon name value"}
|
|
2
|
-
export default {
|
|
3
|
+
export default Object.freeze({
|
|
3
4
|
backtotop: 'back-to-top',
|
|
4
5
|
'circle-check-filled': 'circle-check',
|
|
5
6
|
'circle-check-no-fill': 'circle-check',
|
|
@@ -35,5 +36,5 @@ export default {
|
|
|
35
36
|
'tumblr-nofill': 'tumblr',
|
|
36
37
|
'twitter-business-mention': 'search',
|
|
37
38
|
'verified-nofill': 'verified',
|
|
38
|
-
'window-maximize-solid': 'window-maximize'
|
|
39
|
-
};
|
|
39
|
+
'window-maximize-solid': 'window-maximize'
|
|
40
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
import { type EnumIconNames } from "../EnumIconNames";
|
|
3
|
+
import deprecatedIcons from "./deprecatedIcons";
|
|
4
|
+
export type TypeIconName = EnumIconNames | $Keys<typeof deprecatedIcons>;
|
|
5
|
+
export type TypeIconProps = {
|
|
6
|
+
/** Name of the icon in the svg sprite */
|
|
7
|
+
name: TypeIconName,
|
|
8
|
+
size?: 'mini' // 12x12
|
|
9
|
+
// TODO: deprecate default in favor of small in future release
|
|
10
|
+
| 'default' // 16x16
|
|
11
|
+
| 'small' // 16x16
|
|
12
|
+
| 'medium' // 24x24
|
|
13
|
+
| 'large' // 32x32
|
|
14
|
+
| 'jumbo',
|
|
15
|
+
// 64x64
|
|
16
|
+
/** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */
|
|
17
|
+
fixedWidth?: boolean,
|
|
18
|
+
/** Label used to describe the icon if not used with an accompanying visual label */
|
|
19
|
+
ariaLabel?: string,
|
|
20
|
+
...
|
|
21
|
+
};
|
|
22
|
+
export type TypeToggleProps = {
|
|
23
|
+
/** Name of the icon to be shown in the active state */
|
|
24
|
+
activeName: EnumIconNames,
|
|
25
|
+
/** Name of the icon to be shown in the inactive state */
|
|
26
|
+
inactiveName: EnumIconNames,
|
|
27
|
+
/** Whether the active icon should be shown or not */
|
|
28
|
+
isActive: boolean,
|
|
29
|
+
/** The size of the icon. `small` is the default */
|
|
30
|
+
size?: 'mini' | 'default' | 'small' | 'medium' | 'large' | 'jumbo',
|
|
31
|
+
fixedWidth?: boolean,
|
|
32
|
+
ariaLabel?: string,
|
|
33
|
+
...
|
|
34
|
+
};
|
package/__flow__/Icon/index.js
CHANGED
|
@@ -1,91 +1,49 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import styled, {css} from 'styled-components';
|
|
4
|
-
import
|
|
5
|
-
import iconViewBoxes from
|
|
6
|
-
import Container from
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
export type TypeProps = {
|
|
11
|
-
/** Name of the icon in the svg sprite */
|
|
12
|
-
name: EnumIconNames | $Keys<typeof deprecatedIcons>,
|
|
13
|
-
size?:
|
|
14
|
-
| 'mini' // 12x12
|
|
15
|
-
// TODO: deprecate default in favor of small in future release
|
|
16
|
-
| 'default' // 16x16
|
|
17
|
-
| 'small' // 16x16
|
|
18
|
-
| 'medium' // 24x24
|
|
19
|
-
| 'large' // 32x32
|
|
20
|
-
| 'jumbo', // 64x64
|
|
21
|
-
/** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */
|
|
22
|
-
fixedWidth?: boolean,
|
|
23
|
-
/** Label used to describe the icon if not used with an accompanying visual label */
|
|
24
|
-
ariaLabel?: string,
|
|
25
|
-
};
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import Box from "../Box";
|
|
5
|
+
import iconViewBoxes from "../IconViewBoxes";
|
|
6
|
+
import Container from "./styles";
|
|
7
|
+
import deprecatedIcons from "./deprecatedIcons";
|
|
8
|
+
import type { TypeIconProps, TypeToggleProps } from "./index.flow";
|
|
26
9
|
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use TypeIconProps from root instead
|
|
12
|
+
*/
|
|
13
|
+
export type TypeProps = TypeIconProps;
|
|
27
14
|
const Icon = ({
|
|
28
15
|
name,
|
|
29
16
|
size = 'default',
|
|
30
17
|
fixedWidth = false,
|
|
31
18
|
ariaLabel,
|
|
32
19
|
...rest
|
|
33
|
-
}:
|
|
20
|
+
}: TypeIconProps) => {
|
|
21
|
+
// $FlowIssue
|
|
34
22
|
const iconName = deprecatedIcons[name] || name;
|
|
35
23
|
const iconViewBox = iconViewBoxes[iconName];
|
|
36
|
-
|
|
37
24
|
return (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
fixedWidth={!!fixedWidth}
|
|
41
|
-
key={name}
|
|
42
|
-
aria-label={ariaLabel}
|
|
43
|
-
data-qa-icon={name}
|
|
44
|
-
// $FlowIssue - upgrade v0.112.0
|
|
45
|
-
{...rest}
|
|
46
|
-
>
|
|
25
|
+
// $FlowIssue - upgrade v0.112.0
|
|
26
|
+
<Container iconSize={size} fixedWidth={!!fixedWidth} key={name} aria-label={ariaLabel} data-qa-icon={name} {...rest}>
|
|
47
27
|
<svg className="Icon-svg" viewBox={iconViewBox} focusable={false}>
|
|
48
|
-
<use
|
|
49
|
-
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
50
|
-
xlinkHref={`#ssiconsvg-${iconName}`}
|
|
51
|
-
/>
|
|
28
|
+
<use xmlnsXlink="http://www.w3.org/1999/xlink" xlinkHref={`#ssiconsvg-${iconName}`} />
|
|
52
29
|
</svg>
|
|
53
30
|
</Container>
|
|
54
31
|
);
|
|
55
32
|
};
|
|
56
|
-
|
|
57
33
|
const ToggleableIcon = styled(Icon)`
|
|
58
|
-
transition: all ${
|
|
34
|
+
transition: all ${p => p.theme.duration.fast} linear;
|
|
59
35
|
|
|
60
|
-
${
|
|
61
|
-
p.active &&
|
|
62
|
-
css`
|
|
36
|
+
${p => p.active && css`
|
|
63
37
|
opacity: 1;
|
|
64
38
|
transform: scale(1);
|
|
65
39
|
`}
|
|
66
40
|
|
|
67
|
-
${
|
|
68
|
-
!p.active &&
|
|
69
|
-
css`
|
|
41
|
+
${p => !p.active && css`
|
|
70
42
|
position: absolute;
|
|
71
43
|
opacity: 0;
|
|
72
44
|
transform: scale(0);
|
|
73
45
|
`}
|
|
74
46
|
`;
|
|
75
|
-
|
|
76
|
-
type TypeToggleProps = {
|
|
77
|
-
/** Name of the icon to be shown in the active state */
|
|
78
|
-
activeName: EnumIconNames,
|
|
79
|
-
/** Name of the icon to be shown in the inactive state */
|
|
80
|
-
inactiveName: EnumIconNames,
|
|
81
|
-
/** Whether the active icon should be shown or not */
|
|
82
|
-
isActive: boolean,
|
|
83
|
-
/** The size of the icon. `small` is the default */
|
|
84
|
-
size?: 'mini' | 'default' | 'small' | 'medium' | 'large' | 'jumbo',
|
|
85
|
-
fixedWidth?: boolean,
|
|
86
|
-
ariaLabel?: string,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
47
|
const IconToggle = ({
|
|
90
48
|
activeName,
|
|
91
49
|
inactiveName,
|
|
@@ -98,28 +56,11 @@ const IconToggle = ({
|
|
|
98
56
|
return (
|
|
99
57
|
// $FlowIssue - upgrade v0.112.0
|
|
100
58
|
<Box as="span" position="relative" display="inline-flex" {...rest}>
|
|
101
|
-
<ToggleableIcon
|
|
102
|
-
|
|
103
|
-
name={activeName}
|
|
104
|
-
size={size}
|
|
105
|
-
fixedWidth={fixedWidth}
|
|
106
|
-
ariaLabel={ariaLabel}
|
|
107
|
-
aria-hidden={!isActive}
|
|
108
|
-
/>
|
|
109
|
-
<ToggleableIcon
|
|
110
|
-
active={!isActive}
|
|
111
|
-
name={inactiveName}
|
|
112
|
-
size={size}
|
|
113
|
-
fixedWidth={fixedWidth}
|
|
114
|
-
ariaLabel={ariaLabel}
|
|
115
|
-
aria-hidden={isActive}
|
|
116
|
-
/>
|
|
59
|
+
<ToggleableIcon active={isActive} name={activeName} size={size} fixedWidth={fixedWidth} ariaLabel={ariaLabel} aria-hidden={!isActive} />
|
|
60
|
+
<ToggleableIcon active={!isActive} name={inactiveName} size={size} fixedWidth={fixedWidth} ariaLabel={ariaLabel} aria-hidden={isActive} />
|
|
117
61
|
</Box>
|
|
118
62
|
);
|
|
119
63
|
};
|
|
120
|
-
|
|
121
64
|
Icon.Toggle = IconToggle;
|
|
122
|
-
|
|
123
65
|
Icon.Toggle.displayName = 'Icon.Toggle';
|
|
124
|
-
|
|
125
|
-
export default Icon;
|
|
66
|
+
export default Icon;
|
package/__flow__/Icon/styles.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
//@flow
|
|
2
|
-
import styled, {css, type StyledComponent} from 'styled-components';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import type {TypeTheme} from '../types/theme.flow';
|
|
7
|
-
|
|
2
|
+
import styled, { css, type StyledComponent } from 'styled-components';
|
|
3
|
+
import { verticalAlign } from 'styled-system';
|
|
4
|
+
import { COMMON } from "../utils/system-props";
|
|
5
|
+
import type { TypeTheme } from "../types/theme.flow";
|
|
8
6
|
const sizes = {
|
|
9
7
|
mini: '12px',
|
|
10
8
|
/** TODO: deprecate default in favor of small in future release */
|
|
@@ -12,9 +10,8 @@ const sizes = {
|
|
|
12
10
|
small: '16px',
|
|
13
11
|
medium: '24px',
|
|
14
12
|
large: '32px',
|
|
15
|
-
jumbo: '64px'
|
|
13
|
+
jumbo: '64px'
|
|
16
14
|
};
|
|
17
|
-
|
|
18
15
|
const stylesForSize = (iconSize, fixedWidth) => css`
|
|
19
16
|
line-height: ${iconSize};
|
|
20
17
|
|
|
@@ -24,26 +21,23 @@ const stylesForSize = (iconSize, fixedWidth) => css`
|
|
|
24
21
|
fill: currentColor;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
${fixedWidth &&
|
|
28
|
-
`
|
|
24
|
+
${fixedWidth && `
|
|
29
25
|
&,
|
|
30
26
|
& .Icon-svg {
|
|
31
27
|
width: ${iconSize}
|
|
32
28
|
}
|
|
33
29
|
`}
|
|
34
30
|
`;
|
|
35
|
-
|
|
36
31
|
const Container: StyledComponent<{...}, TypeTheme, *> = styled.span.attrs({
|
|
37
|
-
className: 'Icon'
|
|
32
|
+
className: 'Icon'
|
|
38
33
|
})`
|
|
39
34
|
display: inline-block;
|
|
40
35
|
color: inherit;
|
|
41
36
|
vertical-align: middle;
|
|
42
37
|
|
|
43
|
-
${
|
|
38
|
+
${props => stylesForSize(sizes[props.iconSize], props.fixedWidth)}
|
|
44
39
|
|
|
45
40
|
${COMMON}
|
|
46
41
|
${verticalAlign}
|
|
47
42
|
`;
|
|
48
|
-
|
|
49
|
-
export default Container;
|
|
43
|
+
export default Container;
|