@sproutsocial/racine 24.1.0 → 25.0.0
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 +34 -0
- package/codemods/__tests__/icon-library.test.js +5 -11
- package/commonjs/Avatar/Avatar.js +3 -2
- package/commonjs/Duration/Duration.js +31 -49
- package/commonjs/Duration/constants.js +21 -2
- package/commonjs/Duration/index.js +9 -1
- package/commonjs/Duration/utils.js +76 -0
- package/dist/types/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/Duration/Duration.d.ts.map +1 -1
- package/dist/types/Duration/DurationTypes.d.ts +16 -4
- package/dist/types/Duration/DurationTypes.d.ts.map +1 -1
- package/dist/types/Duration/constants.d.ts +18 -1
- package/dist/types/Duration/constants.d.ts.map +1 -1
- package/dist/types/Duration/index.d.ts +3 -0
- package/dist/types/Duration/index.d.ts.map +1 -1
- package/dist/types/Duration/utils.d.ts +16 -0
- package/dist/types/Duration/utils.d.ts.map +1 -0
- package/lib/Avatar/Avatar.js +3 -2
- package/lib/Duration/Duration.js +30 -48
- package/lib/Duration/constants.js +20 -1
- package/lib/Duration/index.js +2 -0
- package/lib/Duration/utils.js +70 -0
- package/package.json +2 -9
- package/__flow__/Avatar/Avatar.flow.js +0 -17
- package/__flow__/Avatar/constants.flow.js +0 -11
- package/__flow__/Avatar/index.flow.js +0 -3
- package/__flow__/Badge/Badge.flow.js +0 -21
- package/__flow__/Badge/constants.flow.js +0 -28
- package/__flow__/Badge/index.flow.js +0 -3
- package/__flow__/Banner/Banner.flow.js +0 -22
- package/__flow__/Banner/index.flow.js +0 -2
- package/__flow__/Box/Box.flow.js +0 -22
- package/__flow__/Box/index.flow.js +0 -2
- package/__flow__/Breadcrumb/Breadcrumb.flow.js +0 -22
- package/__flow__/Breadcrumb/index.flow.js +0 -2
- package/__flow__/Button/Button.flow.js +0 -36
- package/__flow__/Button/index.flow.js +0 -2
- package/__flow__/Card/Card.flow.js +0 -9
- package/__flow__/Card/CardTypes.flow.js +0 -73
- package/__flow__/Card/index.flow.js +0 -3
- package/__flow__/CharacterCounter/CharacterCounter.flow.js +0 -12
- package/__flow__/CharacterCounter/index.flow.js +0 -2
- package/__flow__/ChartLegend/ChartLegend.flow.js +0 -18
- package/__flow__/ChartLegend/index.flow.js +0 -2
- package/__flow__/Checkbox/Checkbox.flow.js +0 -24
- package/__flow__/Checkbox/index.flow.js +0 -2
- package/__flow__/Collapsible/Collapsible.flow.js +0 -19
- package/__flow__/Collapsible/index.flow.js +0 -2
- package/__flow__/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -19
- package/__flow__/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -11
- package/__flow__/DatePicker/DateRangePicker/index.flow.js +0 -3
- package/__flow__/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -17
- package/__flow__/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -9
- package/__flow__/DatePicker/SingleDatePicker/index.flow.js +0 -3
- package/__flow__/DatePicker/common.flow.js +0 -21
- package/__flow__/DatePicker/index.flow.js +0 -6
- package/__flow__/Drawer/Drawer.flow.js +0 -49
- package/__flow__/Drawer/index.flow.js +0 -2
- package/__flow__/EmptyState/EmptyState.flow.js +0 -17
- package/__flow__/EmptyState/index.flow.js +0 -2
- package/__flow__/Fieldset/Fieldset.flow.js +0 -16
- package/__flow__/Fieldset/index.flow.js +0 -2
- package/__flow__/FormField/FormField.flow.js +0 -32
- package/__flow__/FormField/index.flow.js +0 -2
- package/__flow__/Icon/Icon.flow.js +0 -50
- package/__flow__/Icon/index.flow.js +0 -4
- package/__flow__/Image/Image.flow.js +0 -25
- package/__flow__/Image/index.flow.js +0 -2
- package/__flow__/Indicator/Indicator.flow.js +0 -11
- package/__flow__/Indicator/index.flow.js +0 -2
- package/__flow__/Input/Input.flow.js +0 -65
- package/__flow__/Input/index.flow.js +0 -2
- package/__flow__/KeyboardKey/KeyboardKey.flow.js +0 -9
- package/__flow__/KeyboardKey/index.flow.js +0 -2
- package/__flow__/Label/Label.flow.js +0 -16
- package/__flow__/Label/index.flow.js +0 -2
- package/__flow__/Link/Link.flow.js +0 -20
- package/__flow__/Link/index.flow.js +0 -2
- package/__flow__/Listbox/Listbox.flow.js +0 -33
- package/__flow__/Listbox/index.flow.js +0 -2
- package/__flow__/Loader/Loader.flow.js +0 -14
- package/__flow__/Loader/index.flow.js +0 -2
- package/__flow__/LoaderButton/LoaderButton.flow.js +0 -11
- package/__flow__/LoaderButton/index.flow.js +0 -2
- package/__flow__/Menu/Menu.flow.js +0 -142
- package/__flow__/Menu/index.flow.js +0 -3
- package/__flow__/Menu/utils/constants.flow.js +0 -16
- package/__flow__/Message/Message.flow.js +0 -48
- package/__flow__/Message/index.flow.js +0 -2
- package/__flow__/Modal/Modal.flow.js +0 -59
- package/__flow__/Modal/index.flow.js +0 -2
- package/__flow__/Numeral/Numeral.flow.js +0 -23
- package/__flow__/Numeral/index.flow.js +0 -2
- package/__flow__/PartnerLogo/PartnerLogo.flow.js +0 -27
- package/__flow__/PartnerLogo/index.flow.js +0 -2
- package/__flow__/Popout/Popout.flow.js +0 -103
- package/__flow__/Popout/index.flow.js +0 -2
- package/__flow__/Portal/Portal.flow.js +0 -17
- package/__flow__/Portal/index.flow.js +0 -2
- package/__flow__/Radio/Radio.flow.js +0 -21
- package/__flow__/Radio/index.flow.js +0 -2
- package/__flow__/SegmentedControl/SegmentedControl.flow.js +0 -27
- package/__flow__/SegmentedControl/index.flow.js +0 -2
- package/__flow__/Select/Select.flow.js +0 -27
- package/__flow__/Select/index.flow.js +0 -2
- package/__flow__/Skeleton/Skeleton.flow.js +0 -6
- package/__flow__/Skeleton/index.flow.js +0 -2
- package/__flow__/SpotIllustration/SpotIllustration.flow.js +0 -12
- package/__flow__/SpotIllustration/index.flow.js +0 -2
- package/__flow__/Stack/Stack.flow.js +0 -26
- package/__flow__/Stack/index.flow.js +0 -2
- package/__flow__/Switch/Switch.flow.js +0 -5
- package/__flow__/Switch/SwitchTypes.flow.js +0 -16
- package/__flow__/Switch/index.flow.js +0 -3
- package/__flow__/Table/Table.flow.js +0 -48
- package/__flow__/Table/index.flow.js +0 -2
- package/__flow__/TableCell/TableCell.flow.js +0 -28
- package/__flow__/TableCell/index.flow.js +0 -2
- package/__flow__/TableHeaderCell/TableHeaderCell.flow.js +0 -30
- package/__flow__/TableHeaderCell/index.flow.js +0 -2
- package/__flow__/TableRowAccordion/TableRowAccordion.flow.js +0 -15
- package/__flow__/TableRowAccordion/index.flow.js +0 -2
- package/__flow__/Tabs/Tabs.flow.js +0 -26
- package/__flow__/Tabs/index.flow.js +0 -2
- package/__flow__/Text/Text.flow.js +0 -27
- package/__flow__/Text/index.flow.js +0 -2
- package/__flow__/Textarea/Textarea.flow.js +0 -59
- package/__flow__/Textarea/index.flow.js +0 -2
- package/__flow__/ThemeProvider/index.flow.js +0 -12
- package/__flow__/Toast/Toast.flow.js +0 -27
- package/__flow__/Toast/index.flow.js +0 -2
- package/__flow__/ToggleHint/ToggleHint.flow.js +0 -21
- package/__flow__/ToggleHint/index.flow.js +0 -2
- package/__flow__/Token/Token.flow.js +0 -17
- package/__flow__/Token/index.flow.js +0 -2
- package/__flow__/TokenInput/TokenInput.flow.js +0 -79
- package/__flow__/TokenInput/TokenScreenReaderStatus.js +0 -32
- package/__flow__/TokenInput/index.flow.js +0 -2
- package/__flow__/Tooltip/Tooltip.flow.js +0 -24
- package/__flow__/Tooltip/index.flow.js +0 -2
- package/__flow__/VisuallyHidden/VisuallyHidden.flow.js +0 -3
- package/__flow__/VisuallyHidden/index.flow.js +0 -2
- package/__flow__/index.flow.js +0 -136
- package/__flow__/index.js +0 -2
- package/__flow__/systemProps/background.flow.js +0 -17
- package/__flow__/systemProps/border.flow.js +0 -46
- package/__flow__/systemProps/color.flow.js +0 -16
- package/__flow__/systemProps/custom.flow.js +0 -16
- package/__flow__/systemProps/flexbox.flow.js +0 -28
- package/__flow__/systemProps/grid.flow.js +0 -26
- package/__flow__/systemProps/index.flow.js +0 -16
- package/__flow__/systemProps/layout.flow.js +0 -25
- package/__flow__/systemProps/position.flow.js +0 -17
- package/__flow__/systemProps/shadow.flow.js +0 -13
- package/__flow__/systemProps/space.flow.js +0 -71
- package/__flow__/systemProps/systemProps.flow.js +0 -30
- package/__flow__/systemProps/tests/types.flow.js +0 -51
- package/__flow__/systemProps/types.flow.js +0 -12
- package/__flow__/systemProps/typography.flow.js +0 -21
- package/__flow__/systemProps/variant.flow.js +0 -14
- package/__flow__/themes/dark/dataviz-palette.flow.js +0 -3
- package/__flow__/themes/dark/decorative-palettes.flow.js +0 -13
- package/__flow__/themes/dark/theme.flow.js +0 -5
- package/__flow__/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -10
- package/__flow__/themes/extendedThemes/sproutTheme/index.flow.js +0 -3
- package/__flow__/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -10
- package/__flow__/themes/light/dataviz-palette.flow.js +0 -29
- package/__flow__/themes/light/decorative-palettes.flow.js +0 -17
- package/__flow__/themes/light/literal-colors.flow.js +0 -31
- package/__flow__/themes/light/theme.flow.js +0 -16
- package/__flow__/types/index.flow.js +0 -7
- package/__flow__/types/shared.flow.js +0 -9
- package/__flow__/types/styled-components.flow.js +0 -8
- package/__flow__/types/system-props.flow.js +0 -136
- package/__flow__/types/theme.colors.flow.js +0 -364
- package/__flow__/types/theme.flow.js +0 -373
- package/__flow__/utils/a11yTest.flow.js +0 -5
- package/__flow__/utils/chartColors.flow.js +0 -11
- package/__flow__/utils/constants.flow.js +0 -3
- package/__flow__/utils/dataQaLabelQueries.flow.js +0 -20
- package/__flow__/utils/hooks.flow.js +0 -66
- package/__flow__/utils/index.flow.js +0 -11
- package/__flow__/utils/innerText.flow.js +0 -4
- package/__flow__/utils/mixins.flow.js +0 -7
- package/__flow__/utils/react-testing-library.flow.js +0 -14
- package/__flow__/utils/responsiveProps/index.flow.js +0 -3
- package/__flow__/utils/responsiveProps/index.test.flow.js +0 -22
- package/__flow__/utils/system-props.flow.js +0 -9
- package/__flow__/utils/useInteractiveColor.flow.js +0 -3
- package/commonjs/Avatar/Avatar.flow.js +0 -6
- package/commonjs/Avatar/constants.flow.js +0 -16
- package/commonjs/Avatar/index.flow.js +0 -27
- package/commonjs/Badge/Badge.flow.js +0 -7
- package/commonjs/Badge/constants.flow.js +0 -19
- package/commonjs/Badge/index.flow.js +0 -27
- package/commonjs/Banner/Banner.flow.js +0 -6
- package/commonjs/Banner/index.flow.js +0 -16
- package/commonjs/Box/Box.flow.js +0 -6
- package/commonjs/Box/index.flow.js +0 -16
- package/commonjs/Breadcrumb/Breadcrumb.flow.js +0 -6
- package/commonjs/Breadcrumb/index.flow.js +0 -16
- package/commonjs/Button/Button.flow.js +0 -6
- package/commonjs/Button/index.flow.js +0 -16
- package/commonjs/Card/Card.flow.js +0 -6
- package/commonjs/Card/CardTypes.flow.js +0 -6
- package/commonjs/Card/index.flow.js +0 -27
- package/commonjs/CharacterCounter/CharacterCounter.flow.js +0 -6
- package/commonjs/CharacterCounter/index.flow.js +0 -16
- package/commonjs/ChartLegend/ChartLegend.flow.js +0 -6
- package/commonjs/ChartLegend/index.flow.js +0 -16
- package/commonjs/Checkbox/Checkbox.flow.js +0 -6
- package/commonjs/Checkbox/index.flow.js +0 -16
- package/commonjs/Collapsible/Collapsible.flow.js +0 -6
- package/commonjs/Collapsible/index.flow.js +0 -16
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -6
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -6
- package/commonjs/DatePicker/DateRangePicker/index.flow.js +0 -27
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -6
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -6
- package/commonjs/DatePicker/SingleDatePicker/index.flow.js +0 -27
- package/commonjs/DatePicker/common.flow.js +0 -1
- package/commonjs/DatePicker/index.flow.js +0 -60
- package/commonjs/Drawer/Drawer.flow.js +0 -6
- package/commonjs/Drawer/index.flow.js +0 -16
- package/commonjs/EmptyState/EmptyState.flow.js +0 -6
- package/commonjs/EmptyState/index.flow.js +0 -16
- package/commonjs/Fieldset/Fieldset.flow.js +0 -6
- package/commonjs/Fieldset/index.flow.js +0 -16
- package/commonjs/FormField/FormField.flow.js +0 -6
- package/commonjs/FormField/index.flow.js +0 -16
- package/commonjs/Icon/Icon.flow.js +0 -6
- package/commonjs/Icon/index.flow.js +0 -29
- package/commonjs/Image/Image.flow.js +0 -6
- package/commonjs/Image/index.flow.js +0 -16
- package/commonjs/Indicator/Indicator.flow.js +0 -6
- package/commonjs/Indicator/index.flow.js +0 -16
- package/commonjs/Input/Input.flow.js +0 -6
- package/commonjs/Input/index.flow.js +0 -16
- package/commonjs/KeyboardKey/KeyboardKey.flow.js +0 -6
- package/commonjs/KeyboardKey/index.flow.js +0 -16
- package/commonjs/Label/Label.flow.js +0 -8
- package/commonjs/Label/index.flow.js +0 -16
- package/commonjs/Link/Link.flow.js +0 -6
- package/commonjs/Link/index.flow.js +0 -16
- package/commonjs/Listbox/Listbox.flow.js +0 -10
- package/commonjs/Listbox/index.flow.js +0 -16
- package/commonjs/Loader/Loader.flow.js +0 -6
- package/commonjs/Loader/index.flow.js +0 -16
- package/commonjs/LoaderButton/LoaderButton.flow.js +0 -6
- package/commonjs/LoaderButton/index.flow.js +0 -16
- package/commonjs/Menu/Menu.flow.js +0 -11
- package/commonjs/Menu/index.flow.js +0 -27
- package/commonjs/Menu/utils/constants.flow.js +0 -18
- package/commonjs/Message/Message.flow.js +0 -20
- package/commonjs/Message/index.flow.js +0 -16
- package/commonjs/Modal/Modal.flow.js +0 -8
- package/commonjs/Modal/index.flow.js +0 -16
- package/commonjs/Numeral/Numeral.flow.js +0 -6
- package/commonjs/Numeral/index.flow.js +0 -16
- package/commonjs/PartnerLogo/PartnerLogo.flow.js +0 -6
- package/commonjs/PartnerLogo/index.flow.js +0 -16
- package/commonjs/Popout/Popout.flow.js +0 -6
- package/commonjs/Popout/index.flow.js +0 -16
- package/commonjs/Portal/Portal.flow.js +0 -6
- package/commonjs/Portal/index.flow.js +0 -16
- package/commonjs/Radio/Radio.flow.js +0 -6
- package/commonjs/Radio/index.flow.js +0 -16
- package/commonjs/SegmentedControl/SegmentedControl.flow.js +0 -6
- package/commonjs/SegmentedControl/index.flow.js +0 -16
- package/commonjs/Select/Select.flow.js +0 -6
- package/commonjs/Select/index.flow.js +0 -16
- package/commonjs/Skeleton/Skeleton.flow.js +0 -4
- package/commonjs/Skeleton/index.flow.js +0 -16
- package/commonjs/SpotIllustration/SpotIllustration.flow.js +0 -6
- package/commonjs/SpotIllustration/index.flow.js +0 -16
- package/commonjs/Stack/Stack.flow.js +0 -6
- package/commonjs/Stack/index.flow.js +0 -16
- package/commonjs/Switch/Switch.flow.js +0 -6
- package/commonjs/Switch/SwitchTypes.flow.js +0 -1
- package/commonjs/Switch/index.flow.js +0 -27
- package/commonjs/Table/Table.flow.js +0 -9
- package/commonjs/Table/index.flow.js +0 -16
- package/commonjs/TableCell/TableCell.flow.js +0 -6
- package/commonjs/TableCell/index.flow.js +0 -16
- package/commonjs/TableHeaderCell/TableHeaderCell.flow.js +0 -14
- package/commonjs/TableHeaderCell/index.flow.js +0 -16
- package/commonjs/TableRowAccordion/TableRowAccordion.flow.js +0 -6
- package/commonjs/TableRowAccordion/index.flow.js +0 -16
- package/commonjs/Tabs/Tabs.flow.js +0 -6
- package/commonjs/Tabs/index.flow.js +0 -16
- package/commonjs/Text/Text.flow.js +0 -6
- package/commonjs/Text/index.flow.js +0 -16
- package/commonjs/Textarea/Textarea.flow.js +0 -6
- package/commonjs/Textarea/index.flow.js +0 -16
- package/commonjs/ThemeProvider/index.flow.js +0 -6
- package/commonjs/Toast/Toast.flow.js +0 -6
- package/commonjs/Toast/index.flow.js +0 -16
- package/commonjs/ToggleHint/ToggleHint.flow.js +0 -6
- package/commonjs/ToggleHint/index.flow.js +0 -16
- package/commonjs/Token/Token.flow.js +0 -6
- package/commonjs/Token/index.flow.js +0 -16
- package/commonjs/TokenInput/TokenInput.flow.js +0 -6
- package/commonjs/TokenInput/index.flow.js +0 -16
- package/commonjs/Tooltip/Tooltip.flow.js +0 -6
- package/commonjs/Tooltip/index.flow.js +0 -16
- package/commonjs/VisuallyHidden/VisuallyHidden.flow.js +0 -6
- package/commonjs/VisuallyHidden/index.flow.js +0 -16
- package/commonjs/index.flow.js +0 -594
- package/commonjs/index.js.flow +0 -2
- package/commonjs/systemProps/background.flow.js +0 -9
- package/commonjs/systemProps/border.flow.js +0 -9
- package/commonjs/systemProps/color.flow.js +0 -9
- package/commonjs/systemProps/custom.flow.js +0 -12
- package/commonjs/systemProps/flexbox.flow.js +0 -9
- package/commonjs/systemProps/grid.flow.js +0 -9
- package/commonjs/systemProps/index.flow.js +0 -159
- package/commonjs/systemProps/layout.flow.js +0 -9
- package/commonjs/systemProps/position.flow.js +0 -9
- package/commonjs/systemProps/shadow.flow.js +0 -9
- package/commonjs/systemProps/space.flow.js +0 -23
- package/commonjs/systemProps/systemProps.flow.js +0 -20
- package/commonjs/systemProps/tests/types.flow.js +0 -48
- package/commonjs/systemProps/types.flow.js +0 -1
- package/commonjs/systemProps/typography.flow.js +0 -9
- package/commonjs/systemProps/variant.flow.js +0 -12
- package/commonjs/themes/dark/dataviz-palette.flow.js +0 -1
- package/commonjs/themes/dark/decorative-palettes.flow.js +0 -1
- package/commonjs/themes/dark/theme.flow.js +0 -1
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -7
- package/commonjs/themes/extendedThemes/sproutTheme/index.flow.js +0 -20
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -1
- package/commonjs/themes/light/dataviz-palette.flow.js +0 -1
- package/commonjs/themes/light/decorative-palettes.flow.js +0 -1
- package/commonjs/themes/light/literal-colors.flow.js +0 -1
- package/commonjs/themes/light/theme.flow.js +0 -1
- package/commonjs/types/index.flow.js +0 -60
- package/commonjs/types/shared.flow.js +0 -6
- package/commonjs/types/styled-components.flow.js +0 -6
- package/commonjs/types/system-props.flow.js +0 -2
- package/commonjs/types/theme.colors.flow.js +0 -1
- package/commonjs/types/theme.flow.js +0 -1
- package/commonjs/utils/a11yTest.flow.js +0 -1
- package/commonjs/utils/chartColors.flow.js +0 -1
- package/commonjs/utils/constants.flow.js +0 -1
- package/commonjs/utils/dataQaLabelQueries.flow.js +0 -1
- package/commonjs/utils/hooks.flow.js +0 -28
- package/commonjs/utils/index.flow.js +0 -1
- package/commonjs/utils/innerText.flow.js +0 -6
- package/commonjs/utils/mixins.flow.js +0 -1
- package/commonjs/utils/react-testing-library.flow.js +0 -9
- package/commonjs/utils/responsiveProps/index.flow.js +0 -1
- package/commonjs/utils/responsiveProps/index.test.flow.js +0 -23
- package/commonjs/utils/system-props.flow.js +0 -1
- package/commonjs/utils/useInteractiveColor.flow.js +0 -1
- package/lib/Avatar/Avatar.flow.js +0 -1
- package/lib/Avatar/constants.flow.js +0 -10
- package/lib/Avatar/index.flow.js +0 -2
- package/lib/Badge/Badge.flow.js +0 -2
- package/lib/Badge/constants.flow.js +0 -13
- package/lib/Badge/index.flow.js +0 -2
- package/lib/Banner/Banner.flow.js +0 -1
- package/lib/Banner/index.flow.js +0 -1
- package/lib/Box/Box.flow.js +0 -1
- package/lib/Box/index.flow.js +0 -1
- package/lib/Breadcrumb/Breadcrumb.flow.js +0 -1
- package/lib/Breadcrumb/index.flow.js +0 -1
- package/lib/Button/Button.flow.js +0 -1
- package/lib/Button/index.flow.js +0 -1
- package/lib/Card/Card.flow.js +0 -1
- package/lib/Card/CardTypes.flow.js +0 -1
- package/lib/Card/index.flow.js +0 -2
- package/lib/CharacterCounter/CharacterCounter.flow.js +0 -1
- package/lib/CharacterCounter/index.flow.js +0 -1
- package/lib/ChartLegend/ChartLegend.flow.js +0 -1
- package/lib/ChartLegend/index.flow.js +0 -1
- package/lib/Checkbox/Checkbox.flow.js +0 -1
- package/lib/Checkbox/index.flow.js +0 -1
- package/lib/Collapsible/Collapsible.flow.js +0 -1
- package/lib/Collapsible/index.flow.js +0 -1
- package/lib/DatePicker/DateRangePicker/DateRangePicker.flow.js +0 -1
- package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +0 -1
- package/lib/DatePicker/DateRangePicker/index.flow.js +0 -2
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +0 -1
- package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +0 -1
- package/lib/DatePicker/SingleDatePicker/index.flow.js +0 -2
- package/lib/DatePicker/common.flow.js +0 -0
- package/lib/DatePicker/index.flow.js +0 -5
- package/lib/Drawer/Drawer.flow.js +0 -1
- package/lib/Drawer/index.flow.js +0 -1
- package/lib/EmptyState/EmptyState.flow.js +0 -1
- package/lib/EmptyState/index.flow.js +0 -1
- package/lib/Fieldset/Fieldset.flow.js +0 -1
- package/lib/Fieldset/index.flow.js +0 -1
- package/lib/FormField/FormField.flow.js +0 -1
- package/lib/FormField/index.flow.js +0 -1
- package/lib/Icon/Icon.flow.js +0 -3
- package/lib/Icon/index.flow.js +0 -3
- package/lib/Image/Image.flow.js +0 -2
- package/lib/Image/index.flow.js +0 -1
- package/lib/Indicator/Indicator.flow.js +0 -1
- package/lib/Indicator/index.flow.js +0 -1
- package/lib/Input/Input.flow.js +0 -1
- package/lib/Input/index.flow.js +0 -1
- package/lib/KeyboardKey/KeyboardKey.flow.js +0 -1
- package/lib/KeyboardKey/index.flow.js +0 -1
- package/lib/Label/Label.flow.js +0 -2
- package/lib/Label/index.flow.js +0 -1
- package/lib/Link/Link.flow.js +0 -1
- package/lib/Link/index.flow.js +0 -1
- package/lib/Listbox/Listbox.flow.js +0 -4
- package/lib/Listbox/index.flow.js +0 -1
- package/lib/Loader/Loader.flow.js +0 -1
- package/lib/Loader/index.flow.js +0 -1
- package/lib/LoaderButton/LoaderButton.flow.js +0 -1
- package/lib/LoaderButton/index.flow.js +0 -1
- package/lib/Menu/Menu.flow.js +0 -5
- package/lib/Menu/index.flow.js +0 -2
- package/lib/Menu/utils/constants.flow.js +0 -12
- package/lib/Message/Message.flow.js +0 -11
- package/lib/Message/index.flow.js +0 -1
- package/lib/Modal/Modal.flow.js +0 -2
- package/lib/Modal/index.flow.js +0 -1
- package/lib/Numeral/Numeral.flow.js +0 -1
- package/lib/Numeral/index.flow.js +0 -1
- package/lib/PartnerLogo/PartnerLogo.flow.js +0 -5
- package/lib/PartnerLogo/index.flow.js +0 -1
- package/lib/Popout/Popout.flow.js +0 -3
- package/lib/Popout/index.flow.js +0 -1
- package/lib/Portal/Portal.flow.js +0 -1
- package/lib/Portal/index.flow.js +0 -1
- package/lib/Radio/Radio.flow.js +0 -1
- package/lib/Radio/index.flow.js +0 -1
- package/lib/SegmentedControl/SegmentedControl.flow.js +0 -1
- package/lib/SegmentedControl/index.flow.js +0 -1
- package/lib/Select/Select.flow.js +0 -1
- package/lib/Select/index.flow.js +0 -1
- package/lib/Skeleton/Skeleton.flow.js +0 -1
- package/lib/Skeleton/index.flow.js +0 -1
- package/lib/SpotIllustration/SpotIllustration.flow.js +0 -1
- package/lib/SpotIllustration/index.flow.js +0 -1
- package/lib/Stack/Stack.flow.js +0 -1
- package/lib/Stack/index.flow.js +0 -1
- package/lib/Switch/Switch.flow.js +0 -1
- package/lib/Switch/SwitchTypes.flow.js +0 -0
- package/lib/Switch/index.flow.js +0 -2
- package/lib/Table/Table.flow.js +0 -3
- package/lib/Table/index.flow.js +0 -1
- package/lib/TableCell/TableCell.flow.js +0 -5
- package/lib/TableCell/index.flow.js +0 -1
- package/lib/TableHeaderCell/TableHeaderCell.flow.js +0 -5
- package/lib/TableHeaderCell/index.flow.js +0 -1
- package/lib/TableRowAccordion/TableRowAccordion.flow.js +0 -1
- package/lib/TableRowAccordion/index.flow.js +0 -1
- package/lib/Tabs/Tabs.flow.js +0 -1
- package/lib/Tabs/index.flow.js +0 -1
- package/lib/Text/Text.flow.js +0 -1
- package/lib/Text/index.flow.js +0 -1
- package/lib/Textarea/Textarea.flow.js +0 -1
- package/lib/Textarea/index.flow.js +0 -1
- package/lib/ThemeProvider/index.flow.js +0 -3
- package/lib/Toast/Toast.flow.js +0 -1
- package/lib/Toast/index.flow.js +0 -1
- package/lib/ToggleHint/ToggleHint.flow.js +0 -1
- package/lib/ToggleHint/index.flow.js +0 -1
- package/lib/Token/Token.flow.js +0 -1
- package/lib/Token/index.flow.js +0 -1
- package/lib/TokenInput/TokenInput.flow.js +0 -1
- package/lib/TokenInput/index.flow.js +0 -1
- package/lib/Tooltip/Tooltip.flow.js +0 -1
- package/lib/Tooltip/index.flow.js +0 -1
- package/lib/VisuallyHidden/VisuallyHidden.flow.js +0 -1
- package/lib/VisuallyHidden/index.flow.js +0 -1
- package/lib/index.flow.js +0 -79
- package/lib/index.js.flow +0 -2
- package/lib/systemProps/background.flow.js +0 -5
- package/lib/systemProps/border.flow.js +0 -5
- package/lib/systemProps/color.flow.js +0 -5
- package/lib/systemProps/custom.flow.js +0 -8
- package/lib/systemProps/flexbox.flow.js +0 -5
- package/lib/systemProps/grid.flow.js +0 -5
- package/lib/systemProps/index.flow.js +0 -14
- package/lib/systemProps/layout.flow.js +0 -5
- package/lib/systemProps/position.flow.js +0 -5
- package/lib/systemProps/shadow.flow.js +0 -5
- package/lib/systemProps/space.flow.js +0 -32
- package/lib/systemProps/systemProps.flow.js +0 -14
- package/lib/systemProps/tests/types.flow.js +0 -46
- package/lib/systemProps/types.flow.js +0 -0
- package/lib/systemProps/typography.flow.js +0 -5
- package/lib/systemProps/variant.flow.js +0 -8
- package/lib/themes/dark/dataviz-palette.flow.js +0 -0
- package/lib/themes/dark/decorative-palettes.flow.js +0 -0
- package/lib/themes/dark/theme.flow.js +0 -0
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.flow.js +0 -1
- package/lib/themes/extendedThemes/sproutTheme/index.flow.js +0 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.flow.js +0 -0
- package/lib/themes/light/dataviz-palette.flow.js +0 -0
- package/lib/themes/light/decorative-palettes.flow.js +0 -0
- package/lib/themes/light/literal-colors.flow.js +0 -0
- package/lib/themes/light/theme.flow.js +0 -0
- package/lib/types/index.flow.js +0 -5
- package/lib/types/shared.flow.js +0 -1
- package/lib/types/styled-components.flow.js +0 -1
- package/lib/types/system-props.flow.js +0 -1
- package/lib/types/theme.colors.flow.js +0 -0
- package/lib/types/theme.flow.js +0 -0
- package/lib/utils/a11yTest.flow.js +0 -0
- package/lib/utils/chartColors.flow.js +0 -0
- package/lib/utils/constants.flow.js +0 -0
- package/lib/utils/dataQaLabelQueries.flow.js +0 -0
- package/lib/utils/hooks.flow.js +0 -27
- package/lib/utils/index.flow.js +0 -0
- package/lib/utils/innerText.flow.js +0 -1
- package/lib/utils/mixins.flow.js +0 -0
- package/lib/utils/react-testing-library.flow.js +0 -3
- package/lib/utils/responsiveProps/index.flow.js +0 -0
- package/lib/utils/responsiveProps/index.test.flow.js +0 -21
- package/lib/utils/system-props.flow.js +0 -0
- package/lib/utils/useInteractiveColor.flow.js +0 -0
package/lib/Duration/Duration.js
CHANGED
|
@@ -4,25 +4,17 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
7
|
import * as React from "react";
|
|
14
8
|
import memoize from "lru-memoize";
|
|
15
9
|
import { EM_DASH } from "../utils/constants";
|
|
16
10
|
import { VisuallyHidden } from "../VisuallyHidden";
|
|
17
|
-
import { MEMO_CACHE_SIZE,
|
|
11
|
+
import { COMPARE_OBJECTS, DEFAULT_DISPLAY, DEFAULT_DISPLAY_UNITS, DEFAULT_LOCALE, DEFAULT_MILLISECONDS, MEMO_CACHE_SIZE, ORDERED_UNITS, UNITS } from "./constants";
|
|
18
12
|
import { Container } from "./styles";
|
|
13
|
+
import { isValidNumber, getLowestUnit, splitMillisecondsIntoUnits } from "./utils";
|
|
19
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
-
var
|
|
23
|
-
return [Math.floor(numerator / denominator), numerator % denominator];
|
|
24
|
-
};
|
|
25
|
-
var _createDurationFormatter = function _createDurationFormatter(locale, unitDisplay) {
|
|
17
|
+
var _createDurationFormatter = function _createDurationFormatter(locale, unitDisplay, displayUnits) {
|
|
26
18
|
var timeUnitFormatter = function timeUnitFormatter(locale, unit, unitDisplay) {
|
|
27
19
|
return Intl.NumberFormat(locale, {
|
|
28
20
|
style: "unit",
|
|
@@ -30,41 +22,31 @@ var _createDurationFormatter = function _createDurationFormatter(locale, unitDis
|
|
|
30
22
|
unitDisplay: unitDisplay
|
|
31
23
|
}).format;
|
|
32
24
|
};
|
|
33
|
-
var
|
|
34
|
-
var formatHours = timeUnitFormatter(locale, "hour", unitDisplay);
|
|
35
|
-
var formatMinutes = timeUnitFormatter(locale, "minute", unitDisplay);
|
|
36
|
-
var formatSeconds = timeUnitFormatter(locale, "second", unitDisplay);
|
|
37
|
-
var formatMilliseconds = timeUnitFormatter(locale, "millisecond", unitDisplay);
|
|
25
|
+
var formatterByUnit = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, UNITS.days, timeUnitFormatter(locale, "day", unitDisplay)), UNITS.hours, timeUnitFormatter(locale, "hour", unitDisplay)), UNITS.minutes, timeUnitFormatter(locale, "minute", unitDisplay)), UNITS.seconds, timeUnitFormatter(locale, "second", unitDisplay)), UNITS.milliseconds, timeUnitFormatter(locale, "millisecond", unitDisplay));
|
|
38
26
|
var formatList = new Intl.ListFormat(locale, {
|
|
39
27
|
style: "narrow",
|
|
40
28
|
type: "unit"
|
|
41
29
|
});
|
|
42
|
-
return function (
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
return function (value) {
|
|
31
|
+
var lowestUnit = getLowestUnit(displayUnits);
|
|
32
|
+
|
|
33
|
+
// if the value is zero or negative, we just want to return 0 for the lowest unit (ex "0 minutes")
|
|
34
|
+
if (value <= 0) {
|
|
35
|
+
return formatterByUnit[lowestUnit](0);
|
|
45
36
|
}
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var _getDivisionAndRemain6 = _slicedToArray(_getDivisionAndRemain5, 2);
|
|
60
|
-
minutes = _getDivisionAndRemain6[0];
|
|
61
|
-
milliseconds = _getDivisionAndRemain6[1];
|
|
62
|
-
var _getDivisionAndRemain7 = getDivisionAndRemainder(milliseconds, 1000);
|
|
63
|
-
var _getDivisionAndRemain8 = _slicedToArray(_getDivisionAndRemain7, 2);
|
|
64
|
-
seconds = _getDivisionAndRemain8[0];
|
|
65
|
-
milliseconds = _getDivisionAndRemain8[1];
|
|
66
|
-
var list = [days ? formatDays(days) : null, hours ? formatHours(hours) : null, minutes ? formatMinutes(minutes) : null, seconds ? formatSeconds(seconds) : null, milliseconds ? formatMilliseconds(milliseconds) : null].filter(function (listItem) {
|
|
67
|
-
return listItem !== null;
|
|
37
|
+
var millisecondsByUnit = splitMillisecondsIntoUnits(value, displayUnits);
|
|
38
|
+
var list = [];
|
|
39
|
+
ORDERED_UNITS.forEach(function (unit) {
|
|
40
|
+
if (unit in millisecondsByUnit) {
|
|
41
|
+
var unitValue = millisecondsByUnit[unit];
|
|
42
|
+
|
|
43
|
+
// we want to add to the list if one of two conditions are met:
|
|
44
|
+
// 1) the unit has a value greater than 0 OR
|
|
45
|
+
// 2) the unit has value 0 AND the unit is the lowest unit AND the list is already empty
|
|
46
|
+
if (unitValue !== 0 || unitValue === 0 && unit === lowestUnit && list.length === 0) {
|
|
47
|
+
list.push(formatterByUnit[unit](millisecondsByUnit[unit]));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
68
50
|
});
|
|
69
51
|
return formatList.format(list);
|
|
70
52
|
};
|
|
@@ -73,19 +55,18 @@ var _createDurationFormatter = function _createDurationFormatter(locale, unitDis
|
|
|
73
55
|
// Memoize to reduce the energy of creating new instances of Intl.NumberFormat
|
|
74
56
|
var memoizer = memoize(MEMO_CACHE_SIZE, COMPARE_OBJECTS);
|
|
75
57
|
var createDurationFormatter = memoizer(_createDurationFormatter);
|
|
76
|
-
var isValidNumber = function isValidNumber(value) {
|
|
77
|
-
return typeof value === "number" && isFinite(value);
|
|
78
|
-
};
|
|
79
58
|
var getDuration = function getDuration(_ref) {
|
|
80
59
|
var returnType = _ref.returnType,
|
|
81
60
|
props = _ref.props;
|
|
82
61
|
var _props$display = props.display,
|
|
83
|
-
display = _props$display === void 0 ?
|
|
62
|
+
display = _props$display === void 0 ? DEFAULT_DISPLAY : _props$display,
|
|
63
|
+
_props$displayUnits = props.displayUnits,
|
|
64
|
+
displayUnits = _props$displayUnits === void 0 ? DEFAULT_DISPLAY_UNITS : _props$displayUnits,
|
|
84
65
|
invalidMillisecondsLabel = props.invalidMillisecondsLabel,
|
|
85
66
|
_props$locale = props.locale,
|
|
86
|
-
locale = _props$locale === void 0 ?
|
|
67
|
+
locale = _props$locale === void 0 ? DEFAULT_LOCALE : _props$locale,
|
|
87
68
|
_props$milliseconds = props.milliseconds,
|
|
88
|
-
milliseconds = _props$milliseconds === void 0 ?
|
|
69
|
+
milliseconds = _props$milliseconds === void 0 ? DEFAULT_MILLISECONDS : _props$milliseconds,
|
|
89
70
|
qa = props.qa;
|
|
90
71
|
var isReturnTypeString = returnType === "string";
|
|
91
72
|
if (!isValidNumber(milliseconds)) {
|
|
@@ -102,7 +83,8 @@ var getDuration = function getDuration(_ref) {
|
|
|
102
83
|
}))]
|
|
103
84
|
});
|
|
104
85
|
}
|
|
105
|
-
var
|
|
86
|
+
var validatedDisplayUnits = Object.keys(displayUnits).length === 0 ? DEFAULT_DISPLAY_UNITS : displayUnits;
|
|
87
|
+
var fullText = createDurationFormatter(locale, display, validatedDisplayUnits)(milliseconds);
|
|
106
88
|
return isReturnTypeString ? fullText : /*#__PURE__*/_jsx(Container, _objectSpread(_objectSpread({}, qa), {}, {
|
|
107
89
|
children: fullText
|
|
108
90
|
}));
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
export var COMPARE_OBJECTS = true;
|
|
1
6
|
export var MEMO_CACHE_SIZE = 10;
|
|
2
|
-
export var
|
|
7
|
+
export var UNITS = {
|
|
8
|
+
days: "days",
|
|
9
|
+
hours: "hours",
|
|
10
|
+
minutes: "minutes",
|
|
11
|
+
seconds: "seconds",
|
|
12
|
+
milliseconds: "milliseconds"
|
|
13
|
+
};
|
|
14
|
+
export var MILLISECONDS_IN = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, UNITS.days, 1 * 1000 * 60 * 60 * 24), UNITS.hours, 1 * 1000 * 60 * 60), UNITS.minutes, 1 * 1000 * 60), UNITS.seconds, 1 * 1000), UNITS.milliseconds, 1);
|
|
15
|
+
export var ORDERED_UNITS = [UNITS.days, UNITS.hours, UNITS.minutes, UNITS.seconds, UNITS.milliseconds];
|
|
16
|
+
|
|
17
|
+
// Duration props defaults
|
|
18
|
+
export var DEFAULT_DISPLAY = "narrow";
|
|
19
|
+
export var DEFAULT_DISPLAY_UNITS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, UNITS.days, true), UNITS.hours, true), UNITS.minutes, true), UNITS.seconds, true), UNITS.milliseconds, false);
|
|
20
|
+
export var DEFAULT_LOCALE = "en-US";
|
|
21
|
+
export var DEFAULT_MILLISECONDS = null;
|
package/lib/Duration/index.js
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
import { MILLISECONDS_IN, ORDERED_UNITS, UNITS } from "./constants";
|
|
9
|
+
export var getLowestUnit = function getLowestUnit(displayUnits) {
|
|
10
|
+
return _toConsumableArray(ORDERED_UNITS).reverse().find(function (unit) {
|
|
11
|
+
return displayUnits[unit];
|
|
12
|
+
}) || UNITS.milliseconds;
|
|
13
|
+
};
|
|
14
|
+
export var splitMillisecondsIntoUnits = function splitMillisecondsIntoUnits(milliseconds, displayUnits) {
|
|
15
|
+
var lowestUnit = getLowestUnit(displayUnits);
|
|
16
|
+
var remainder = milliseconds % MILLISECONDS_IN[lowestUnit];
|
|
17
|
+
if (2 * remainder >= MILLISECONDS_IN[lowestUnit]) {
|
|
18
|
+
// if the remainder is large, add enough seconds to increse the lowest unit
|
|
19
|
+
milliseconds += MILLISECONDS_IN[lowestUnit] - remainder;
|
|
20
|
+
}
|
|
21
|
+
var units = {};
|
|
22
|
+
ORDERED_UNITS.forEach(function (unit) {
|
|
23
|
+
if (displayUnits[unit]) {
|
|
24
|
+
units[unit] = Math.floor(milliseconds / MILLISECONDS_IN[unit]);
|
|
25
|
+
milliseconds -= units[unit] * MILLISECONDS_IN[unit];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return units;
|
|
29
|
+
};
|
|
30
|
+
export var isValidNumber = function isValidNumber(value) {
|
|
31
|
+
return typeof value === "number" && isFinite(value);
|
|
32
|
+
};
|
|
33
|
+
export var getDurationMaxDisplayUnits = function getDurationMaxDisplayUnits(_ref) {
|
|
34
|
+
var milliseconds = _ref.milliseconds,
|
|
35
|
+
_ref$maxDisplayUnits = _ref.maxDisplayUnits,
|
|
36
|
+
maxDisplayUnits = _ref$maxDisplayUnits === void 0 ? ORDERED_UNITS.length : _ref$maxDisplayUnits;
|
|
37
|
+
var displayUnits = {};
|
|
38
|
+
if (!isValidNumber(milliseconds)) {
|
|
39
|
+
return displayUnits;
|
|
40
|
+
}
|
|
41
|
+
var _iterator = _createForOfIteratorHelper(ORDERED_UNITS),
|
|
42
|
+
_step;
|
|
43
|
+
try {
|
|
44
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
45
|
+
var unit = _step.value;
|
|
46
|
+
if (Object.keys(displayUnits).length >= maxDisplayUnits) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
|
|
51
|
+
var millisecondsByUnit = splitMillisecondsIntoUnits(milliseconds, {
|
|
52
|
+
days: true,
|
|
53
|
+
hours: true,
|
|
54
|
+
minutes: true,
|
|
55
|
+
seconds: true,
|
|
56
|
+
milliseconds: true
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// @ts-expect-error - stupid typescript isn't smart enough to check the isValidNumber check above ¯\_(ツ)_/¯
|
|
60
|
+
if (milliseconds > MILLISECONDS_IN[unit] && millisecondsByUnit[unit] > 0) {
|
|
61
|
+
displayUnits[unit] = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
_iterator.e(err);
|
|
66
|
+
} finally {
|
|
67
|
+
_iterator.f();
|
|
68
|
+
}
|
|
69
|
+
return displayUnits;
|
|
70
|
+
};
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/racine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18"
|
|
7
7
|
},
|
|
8
8
|
"readme": "README.NPM.md",
|
|
9
9
|
"files": [
|
|
10
|
-
"__flow__",
|
|
11
10
|
"commonjs",
|
|
12
11
|
"dist",
|
|
13
12
|
"lib",
|
|
@@ -55,8 +54,7 @@
|
|
|
55
54
|
"release": "yarn build && yarn test && yarn changeset publish",
|
|
56
55
|
"storybook": "rm -rf node_modules/.cache/storybook && storybook dev -c .storybook -p 9999",
|
|
57
56
|
"build-storybook": "storybook build --quiet -c .storybook -o .storybook-dist",
|
|
58
|
-
"build-chromatic": "storybook build --quiet -c .storybook -o .storybook-dist"
|
|
59
|
-
"ts-to-flow": "flowgen $FILE -o $OUTPUT --add-flow-header --no-module-exports"
|
|
57
|
+
"build-chromatic": "storybook build --quiet -c .storybook -o .storybook-dist"
|
|
60
58
|
},
|
|
61
59
|
"dependencies": {
|
|
62
60
|
"@react-spring/web": "^9.0.0",
|
|
@@ -98,13 +96,10 @@
|
|
|
98
96
|
"@babel/cli": "^7.22.10",
|
|
99
97
|
"@babel/core": "^7.22.10",
|
|
100
98
|
"@babel/eslint-parser": "^7.22.10",
|
|
101
|
-
"@babel/plugin-syntax-flow": "^7.22.5",
|
|
102
99
|
"@babel/plugin-syntax-jsx": "^7.22.5",
|
|
103
100
|
"@babel/preset-env": "^7.22.10",
|
|
104
|
-
"@babel/preset-flow": "^7.0.0",
|
|
105
101
|
"@babel/preset-react": "^7.22.5",
|
|
106
102
|
"@babel/preset-typescript": "^7.22.5",
|
|
107
|
-
"@khanacademy/flow-to-ts": "^0.5.2",
|
|
108
103
|
"@sproutsocial/eslint-config-seeds": "*",
|
|
109
104
|
"@sproutsocial/seeds-border": "*",
|
|
110
105
|
"@sproutsocial/seeds-color": "*",
|
|
@@ -161,8 +156,6 @@
|
|
|
161
156
|
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
162
157
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
163
158
|
"eslint-plugin-jest": "^27.6.3",
|
|
164
|
-
"flow-bin": "0.131.0",
|
|
165
|
-
"flowgen": "^1.21.0",
|
|
166
159
|
"glob": "^7.1.6",
|
|
167
160
|
"identity-obj-proxy": "^3.0.0",
|
|
168
161
|
"inquirer": "^6.4.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
export type TypeAvatarProps = {
|
|
4
|
-
/** Circles are used for social profile avatars, leaf is for internal Sprout user avatars */
|
|
5
|
-
appearance?: "circle" | "leaf",
|
|
6
|
-
/** The name of the user that the avatar represents */
|
|
7
|
-
name?: string,
|
|
8
|
-
/** URL of the avatar image. If a URL is not provided, the component will fall back to showing the user's initials */
|
|
9
|
-
src?: string,
|
|
10
|
-
type?: "neutral" | "purple" | "green" | "blue" | "yellow" | "red" | "orange",
|
|
11
|
-
bg?: string,
|
|
12
|
-
color?: string,
|
|
13
|
-
size?: string,
|
|
14
|
-
...
|
|
15
|
-
};
|
|
16
|
-
declare var Avatar: React.StatelessFunctionalComponent<TypeAvatarProps>;
|
|
17
|
-
declare export default typeof Avatar;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { TypeIconName } from "../Icon/index.flow";
|
|
4
|
-
import { badgeColors } from "./constants.flow";
|
|
5
|
-
export type TypeBadgeColor = $Keys<typeof badgeColors>;
|
|
6
|
-
export type TypeBadgeProps = {
|
|
7
|
-
children?: React.Node,
|
|
8
|
-
/** DEPRECATED: Use children instead of text */
|
|
9
|
-
text?: React.Node,
|
|
10
|
-
/** Size default is deprecated in favor of small and large */
|
|
11
|
-
size?: "small" | "large" | "default",
|
|
12
|
-
badgeColor?: TypeBadgeColor,
|
|
13
|
-
iconName?: TypeIconName,
|
|
14
|
-
/** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
|
|
15
|
-
tip?: React.Node,
|
|
16
|
-
/** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
|
|
17
|
-
type?: string,
|
|
18
|
-
...
|
|
19
|
-
};
|
|
20
|
-
declare var Badge: React.StatelessFunctionalComponent<TypeBadgeProps>;
|
|
21
|
-
declare export default typeof Badge;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
type TypeLegacyBadgeColor = {|
|
|
4
|
-
color: string,
|
|
5
|
-
background: string,
|
|
6
|
-
|};
|
|
7
|
-
declare export var legacyBadgeColors: {|
|
|
8
|
-
primary: TypeLegacyBadgeColor,
|
|
9
|
-
secondary: TypeLegacyBadgeColor,
|
|
10
|
-
passive: TypeLegacyBadgeColor,
|
|
11
|
-
common: TypeLegacyBadgeColor,
|
|
12
|
-
approval: TypeLegacyBadgeColor,
|
|
13
|
-
default: TypeLegacyBadgeColor,
|
|
14
|
-
suggestion: TypeLegacyBadgeColor,
|
|
15
|
-
|};
|
|
16
|
-
export const badgeColors = Object.freeze({
|
|
17
|
-
green: "green",
|
|
18
|
-
blue: "blue",
|
|
19
|
-
purple: "purple",
|
|
20
|
-
yellow: "yellow",
|
|
21
|
-
orange: "orange",
|
|
22
|
-
red: "red",
|
|
23
|
-
neutral: "neutral",
|
|
24
|
-
magenta: "magenta",
|
|
25
|
-
pink: "pink",
|
|
26
|
-
aqua: "aqua",
|
|
27
|
-
teal: "teal"
|
|
28
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { TypeIconProps } from "../Icon/index.flow";
|
|
4
|
-
export type EnumBannerType = "success" | "info" | "error" | "warning" | "opportunity";
|
|
5
|
-
export type TypeBannerProps = {
|
|
6
|
-
text: React.Node,
|
|
7
|
-
/** Type of banner. */
|
|
8
|
-
type?: EnumBannerType,
|
|
9
|
-
/** Show the close icon in the banner with an action when clicked */
|
|
10
|
-
onClose?: () => void,
|
|
11
|
-
/** Close icon aria label */
|
|
12
|
-
closeButtonLabel?: string,
|
|
13
|
-
/** Icon props that can be passed to the Type specific Icon */
|
|
14
|
-
typeIconProps?: {
|
|
15
|
-
...TypeIconProps,
|
|
16
|
-
name?: void,
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
...
|
|
20
|
-
};
|
|
21
|
-
declare var Banner: React.StatelessFunctionalComponent<TypeBannerProps>;
|
|
22
|
-
declare export default typeof Banner;
|
package/__flow__/Box/Box.flow.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { StyledComponent } from "styled-components";
|
|
4
|
-
import type { TypeStyledComponentsCommonProps } from "../types/styled-components.flow";
|
|
5
|
-
import type { TypeSystemCommonProps, TypeSystemBorderProps, TypeSystemLayoutProps, TypeSystemPositionProps, TypeSystemFlexboxProps, TypeSystemGridProps } from "../types/system-props.flow";
|
|
6
|
-
import type { TypeTheme } from "../types/theme.flow";
|
|
7
|
-
export type TypeContainerProps = $ReadOnly<{|
|
|
8
|
-
...TypeStyledComponentsCommonProps,
|
|
9
|
-
...TypeSystemCommonProps,
|
|
10
|
-
...TypeSystemBorderProps,
|
|
11
|
-
...TypeSystemLayoutProps,
|
|
12
|
-
...TypeSystemPositionProps,
|
|
13
|
-
...TypeSystemFlexboxProps,
|
|
14
|
-
...TypeSystemGridProps,
|
|
15
|
-
|}>;
|
|
16
|
-
type TypeBoxContainer = StyledComponent<TypeContainerProps, TypeTheme, *>;
|
|
17
|
-
export type TypeBoxProps = {
|
|
18
|
-
...React.ElementConfig<TypeBoxContainer>,
|
|
19
|
-
...
|
|
20
|
-
};
|
|
21
|
-
declare var Box: React.AbstractComponent<TypeBoxProps, *>;
|
|
22
|
-
declare export default typeof Box;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { TypeLinkProps } from "../Link/index.flow";
|
|
4
|
-
import type { TypeWithDisplayName } from "../types/shared.flow";
|
|
5
|
-
export type TypeBreadcrumbProps = {
|
|
6
|
-
children: React.Node,
|
|
7
|
-
/** Description of the type of navigation being provided by the breadcrumb (i.e. "Asset library breadcrumb") */
|
|
8
|
-
ariaLabel: string,
|
|
9
|
-
/** optional */
|
|
10
|
-
overflow?: {
|
|
11
|
-
label: string,
|
|
12
|
-
menu: React.Node,
|
|
13
|
-
...
|
|
14
|
-
},
|
|
15
|
-
...
|
|
16
|
-
};
|
|
17
|
-
export type TypeBreadcrumbItemProps = TypeLinkProps;
|
|
18
|
-
declare var BreadcrumbItem: TypeWithDisplayName<React.StatelessFunctionalComponent<TypeBreadcrumbItemProps>>;
|
|
19
|
-
declare class Breadcrumb extends React.Component<TypeBreadcrumbProps> {
|
|
20
|
-
static Item: typeof BreadcrumbItem
|
|
21
|
-
}
|
|
22
|
-
declare export default typeof Breadcrumb;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { type StyledComponent } from "styled-components";
|
|
4
|
-
import type { TypeTheme } from "../types/theme.flow";
|
|
5
|
-
import type { TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemFlexboxProps, TypeSystemGridProps } from "../types/system-props.flow";
|
|
6
|
-
export type TypeButtonProps = {
|
|
7
|
-
...TypeSystemCommonProps,
|
|
8
|
-
...TypeSystemLayoutProps,
|
|
9
|
-
...TypeSystemFlexboxProps,
|
|
10
|
-
...TypeSystemGridProps,
|
|
11
|
-
/** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
|
|
12
|
-
external?: boolean,
|
|
13
|
-
size?: "large" | "default",
|
|
14
|
-
/** What the button looks like. "default" is deprecated in favor of "unstyled" */
|
|
15
|
-
appearance?: "primary" | "secondary" | "pill" | "destructive" | "unstyled" | "placeholder",
|
|
16
|
-
/** Set the button to display in its active state */
|
|
17
|
-
active?: boolean,
|
|
18
|
-
/** Disables user action and applies a disabled style on the button */
|
|
19
|
-
disabled?: boolean,
|
|
20
|
-
children: React.Node,
|
|
21
|
-
/** Setting this prop will cause the component to be rendered as an anchor element instead of a button element */
|
|
22
|
-
href?: string,
|
|
23
|
-
/** Used to get a reference to the underlying button */
|
|
24
|
-
innerRef?: React.Ref<"button">,
|
|
25
|
-
/** Action to perform when the button is clicked */
|
|
26
|
-
onClick?: (e: SyntheticEvent<HTMLButtonElement>) => any,
|
|
27
|
-
title?: string,
|
|
28
|
-
qa?: Object,
|
|
29
|
-
as?: any,
|
|
30
|
-
/** Label used to describe the button if the button does not have text within it */
|
|
31
|
-
ariaLabel?: string,
|
|
32
|
-
...
|
|
33
|
-
};
|
|
34
|
-
declare export var Container: StyledComponent<any, TypeTheme, *>;
|
|
35
|
-
declare var Button: React.StatelessFunctionalComponent<TypeButtonProps>;
|
|
36
|
-
declare export default typeof Button;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import type { TypeCardProps, TypeCardLink, TypeCardArea } from "./CardTypes.flow";
|
|
4
|
-
declare var Card: React.StatelessFunctionalComponent<TypeCardProps>;
|
|
5
|
-
declare export var CardLink: React.StatelessFunctionalComponent<TypeCardLink>;
|
|
6
|
-
declare export var CardHeader: React.StatelessFunctionalComponent<TypeCardArea>;
|
|
7
|
-
declare export var CardContent: React.StatelessFunctionalComponent<TypeCardArea>;
|
|
8
|
-
declare export var CardFooter: React.StatelessFunctionalComponent<TypeCardArea>;
|
|
9
|
-
declare export default typeof Card;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import type { TypeIconProps } from "../Icon/index.flow";
|
|
5
|
-
import type { TypeStyledComponentsCommonProps, TypePropsWithChildren } from "../types/index.flow";
|
|
6
|
-
import type { TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypePositionSystemProps, TypeSpaceSystemProps, TypeTypographySystemProps } from "../systemProps/index.flow";
|
|
7
|
-
export type TypeSharedCardSystemProps = TypePropsWithChildren<{|
|
|
8
|
-
...TypeStyledComponentsCommonProps,
|
|
9
|
-
...TypeBorderSystemProps,
|
|
10
|
-
...TypeColorSystemProps,
|
|
11
|
-
...TypeFlexboxSystemProps,
|
|
12
|
-
...TypeGridSystemProps,
|
|
13
|
-
...TypeLayoutSystemProps,
|
|
14
|
-
...TypePositionSystemProps,
|
|
15
|
-
...TypeSpaceSystemProps,
|
|
16
|
-
key?: React.Key,
|
|
17
|
-
|}>;
|
|
18
|
-
export type TypeCardStyleProps = {|
|
|
19
|
-
elevation?: "low" | "medium" | "high",
|
|
20
|
-
disabled?: boolean,
|
|
21
|
-
compositionalComponents?: boolean,
|
|
22
|
-
selected?: boolean,
|
|
23
|
-
|};
|
|
24
|
-
export type TypeCardStyleTransientProps = {|
|
|
25
|
-
$elevation?: "low" | "medium" | "high",
|
|
26
|
-
$disabled?: boolean,
|
|
27
|
-
$compositionalComponents?: boolean,
|
|
28
|
-
$selected?: boolean,
|
|
29
|
-
|};
|
|
30
|
-
export type TypeStyledCard = {
|
|
31
|
-
...TypeSharedCardSystemProps,
|
|
32
|
-
...TypeCardStyleTransientProps,
|
|
33
|
-
...
|
|
34
|
-
};
|
|
35
|
-
export type TypeCardStyles = {|
|
|
36
|
-
...TypeSharedCardSystemProps,
|
|
37
|
-
...$Diff<TypeCardStyleProps, {|
|
|
38
|
-
compositionalComponents: any
|
|
39
|
-
|}>,
|
|
40
|
-
|};
|
|
41
|
-
declare type TypeOnClick = (event: SyntheticMouseEvent<HTMLElement> | SyntheticMouseEvent<HTMLElement>) => void;
|
|
42
|
-
export type TypeCardConditions = {|
|
|
43
|
-
role: "link" | "button" | "checkbox" | "presentation",
|
|
44
|
-
href?: string,
|
|
45
|
-
onClick?: TypeOnClick,
|
|
46
|
-
selected?: boolean,
|
|
47
|
-
|};
|
|
48
|
-
export type TypeCardProps = {
|
|
49
|
-
...TypeCardConditions,
|
|
50
|
-
...TypeCardStyles,
|
|
51
|
-
$elevation?: void,
|
|
52
|
-
$disabled?: void,
|
|
53
|
-
$compositionalComponents?: void,
|
|
54
|
-
$selected?: void,
|
|
55
|
-
...
|
|
56
|
-
};
|
|
57
|
-
export type TypeCardArea = {
|
|
58
|
-
...TypeSharedCardSystemProps,
|
|
59
|
-
$divider?: "top" | "bottom",
|
|
60
|
-
...
|
|
61
|
-
};
|
|
62
|
-
export type TypeStyledSelectedIcon = {
|
|
63
|
-
...TypeIconProps,
|
|
64
|
-
$selected: $PropertyType<TypeCardStyleTransientProps, "$selected">,
|
|
65
|
-
...
|
|
66
|
-
};
|
|
67
|
-
export type TypeCardLink = {
|
|
68
|
-
...TypeColorSystemProps,
|
|
69
|
-
...TypeTypographySystemProps,
|
|
70
|
-
affordance?: boolean,
|
|
71
|
-
external?: boolean,
|
|
72
|
-
...
|
|
73
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
export type TypeCharacterCounterProps = {
|
|
4
|
-
/** Current value of relative input/textarea */
|
|
5
|
-
currentValue: number,
|
|
6
|
-
/** Max amount of characters for input/textarea */
|
|
7
|
-
maxValue: number,
|
|
8
|
-
size?: "default" | "mini",
|
|
9
|
-
...
|
|
10
|
-
};
|
|
11
|
-
declare var CharacterCounter: React.ComponentType<TypeCharacterCounterProps>;
|
|
12
|
-
declare export default typeof CharacterCounter;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// @flow
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
export type TypeChartLegendTheme = "compare" | "contrast" | "extended";
|
|
4
|
-
export type TypeChartLegendProps = {
|
|
5
|
-
/** Inline or stacked y plots */
|
|
6
|
-
stacked?: boolean,
|
|
7
|
-
theme?: TypeChartLegendTheme,
|
|
8
|
-
/** Array of names with optional color to display. If no color is specified, index of label will be used to determine color based on the theme. */
|
|
9
|
-
legendLabels: {
|
|
10
|
-
name: string,
|
|
11
|
-
color?: string,
|
|
12
|
-
...
|
|
13
|
-
}[],
|
|
14
|
-
qa?: Object,
|
|
15
|
-
...
|
|
16
|
-
};
|
|
17
|
-
declare var ChartLegend: React.StatelessFunctionalComponent<TypeChartLegendProps>;
|
|
18
|
-
declare export default typeof ChartLegend;
|