@sproutsocial/racine 20.15.0 → 20.17.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 +17 -0
- package/README.md +21 -96
- package/__flow__/Avatar/Avatar.flow.js +4 -4
- package/__flow__/Avatar/constants.flow.js +8 -8
- package/__flow__/Badge/Badge.flow.js +2 -2
- package/__flow__/Badge/constants.flow.js +11 -11
- package/__flow__/Banner/Banner.flow.js +2 -2
- package/__flow__/Box/Box.flow.js +2 -2
- package/__flow__/Breadcrumb/Breadcrumb.flow.js +1 -1
- package/__flow__/Button/Button.flow.js +5 -5
- package/__flow__/Card/Card.flow.js +1 -1
- package/__flow__/Card/CardTypes.flow.js +6 -6
- package/__flow__/CharacterCounter/CharacterCounter.flow.js +2 -2
- package/__flow__/ChartLegend/ChartLegend.flow.js +2 -2
- package/__flow__/Checkbox/Checkbox.flow.js +2 -2
- package/__flow__/Collapsible/Collapsible.flow.js +1 -1
- package/__flow__/DatePicker/DateRangePicker/DateRangePicker.flow.js +2 -2
- package/__flow__/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +4 -4
- package/__flow__/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +1 -1
- package/__flow__/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +1 -1
- package/__flow__/DatePicker/common.flow.js +1 -1
- package/__flow__/Drawer/Drawer.flow.js +2 -2
- package/__flow__/EmptyState/EmptyState.flow.js +1 -1
- package/__flow__/EnumIllustrationNames.flow.js +1 -1
- package/__flow__/Fieldset/Fieldset.flow.js +2 -2
- package/__flow__/FormField/FormField.flow.js +1 -1
- package/__flow__/Icon/Icon.flow.js +10 -10
- package/__flow__/IllustrationViewBoxes.js +1 -0
- package/__flow__/Image/Image.flow.js +5 -5
- package/__flow__/Indicator/Indicator.flow.js +1 -1
- package/__flow__/Input/Input.flow.js +4 -4
- package/__flow__/KeyboardKey/KeyboardKey.flow.js +1 -1
- package/__flow__/Label/Label.flow.js +1 -1
- package/__flow__/Link/Link.flow.js +2 -2
- package/__flow__/Listbox/Listbox.flow.js +5 -5
- package/__flow__/Loader/Loader.flow.js +3 -3
- package/__flow__/LoaderButton/LoaderButton.flow.js +1 -1
- package/__flow__/Menu/Menu.flow.js +9 -9
- package/__flow__/Menu/utils/constants.flow.js +8 -8
- package/__flow__/Message/Message.flow.js +6 -6
- package/__flow__/Modal/Modal.flow.js +1 -1
- package/__flow__/Numeral/Numeral.flow.js +3 -3
- package/__flow__/PartnerLogo/PartnerLogo.flow.js +8 -8
- package/__flow__/Popout/Popout.flow.js +4 -4
- package/__flow__/Portal/Portal.flow.js +1 -1
- package/__flow__/Radio/Radio.flow.js +1 -1
- package/__flow__/SegmentedControl/SegmentedControl.flow.js +1 -1
- package/__flow__/Select/Select.flow.js +2 -2
- package/__flow__/Skeleton/Skeleton.flow.js +1 -1
- package/__flow__/SpotIllustration/SpotIllustration.flow.js +2 -2
- package/__flow__/Stack/Stack.flow.js +3 -3
- package/__flow__/Switch/Switch.flow.js +1 -1
- package/__flow__/Table/Table.flow.js +1 -1
- package/__flow__/TableCell/TableCell.flow.js +2 -2
- package/__flow__/TableHeaderCell/TableHeaderCell.flow.js +3 -3
- package/__flow__/TableRowAccordion/TableRowAccordion.flow.js +1 -1
- package/__flow__/Tabs/Tabs.flow.js +1 -1
- package/__flow__/Text/Text.flow.js +1 -1
- package/__flow__/Textarea/Textarea.flow.js +3 -3
- package/__flow__/ThemeProvider/index.flow.js +1 -1
- package/__flow__/Toast/Toast.flow.js +2 -2
- package/__flow__/ToggleHint/ToggleHint.flow.js +4 -4
- package/__flow__/Token/Token.flow.js +2 -2
- package/__flow__/TokenInput/TokenInput.flow.js +2 -2
- package/__flow__/TokenInput/TokenScreenReaderStatus.js +3 -3
- package/__flow__/Tooltip/Tooltip.flow.js +2 -2
- package/__flow__/VisuallyHidden/VisuallyHidden.flow.js +1 -1
- package/__flow__/index.flow.js +1 -1
- package/__flow__/systemProps/background.flow.js +2 -2
- package/__flow__/systemProps/border.flow.js +2 -2
- package/__flow__/systemProps/color.flow.js +2 -2
- package/__flow__/systemProps/custom.flow.js +2 -2
- package/__flow__/systemProps/flexbox.flow.js +2 -2
- package/__flow__/systemProps/grid.flow.js +2 -2
- package/__flow__/systemProps/layout.flow.js +2 -2
- package/__flow__/systemProps/position.flow.js +2 -2
- package/__flow__/systemProps/shadow.flow.js +2 -2
- package/__flow__/systemProps/space.flow.js +2 -2
- package/__flow__/systemProps/systemProps.flow.js +1 -1
- package/__flow__/systemProps/tests/types.flow.js +17 -17
- package/__flow__/systemProps/typography.flow.js +2 -2
- package/__flow__/systemProps/variant.flow.js +3 -3
- package/__flow__/themes/light/dataviz-palette.flow.js +20 -20
- package/__flow__/themes/light/literal-colors.flow.js +12 -12
- package/__flow__/types/shared.flow.js +1 -1
- package/__flow__/types/styled-components.flow.js +1 -1
- package/__flow__/types/system-props.flow.js +2 -2
- package/__flow__/types/theme.flow.js +28 -28
- package/__flow__/utils/hooks.flow.js +3 -3
- package/__flow__/utils/index.flow.js +1 -1
- package/__flow__/utils/innerText.flow.js +1 -1
- package/__flow__/utils/mixins.flow.js +1 -1
- package/__flow__/utils/react-testing-library.flow.js +3 -3
- package/__flow__/utils/responsiveProps/index.test.flow.js +7 -7
- package/bin/racine-codemod.js +18 -18
- package/codemods/__tests__/icon-library.test.js +31 -31
- package/codemods/__tests__/icon-name-substitution.test.js +8 -8
- package/codemods/__tests__/migrate-2.x-to-3.x.test.js +2 -2
- package/codemods/codemod-docs.js +17 -17
- package/codemods/icon-library.js +35 -35
- package/codemods/icon-name-substitution.js +5 -5
- package/codemods/migrate-2.x-to-3.x.js +30 -29
- package/commonjs/Avatar/Avatar.js +16 -16
- package/commonjs/Avatar/constants.flow.js +8 -8
- package/commonjs/Avatar/constants.js +8 -8
- package/commonjs/Badge/Badge.js +6 -6
- package/commonjs/Badge/constants.flow.js +11 -11
- package/commonjs/Badge/constants.js +25 -25
- package/commonjs/Badge/styles.js +2 -2
- package/commonjs/Banner/Banner.js +22 -22
- package/commonjs/Box/Box.js +1 -1
- package/commonjs/Breadcrumb/Breadcrumb.js +3 -3
- package/commonjs/Breadcrumb/styles.js +1 -1
- package/commonjs/Button/Button.js +10 -10
- package/commonjs/Button/styles.js +9 -9
- package/commonjs/Card/Card.js +3 -3
- package/commonjs/Card/styles.js +2 -2
- package/commonjs/Card/subComponents.js +2 -2
- package/commonjs/Card/utils.js +6 -6
- package/commonjs/CharacterCounter/CharacterCounter.js +2 -2
- package/commonjs/ChartLegend/ChartLegend.js +1 -1
- package/commonjs/ChartLegend/styles.js +2 -2
- package/commonjs/ChartLegend/useChartLabels.js +3 -3
- package/commonjs/Checkbox/Checkbox.js +8 -8
- package/commonjs/Checkbox/styles.js +13 -13
- package/commonjs/Collapsible/Collapsible.js +4 -4
- package/commonjs/Collapsible/styles.js +1 -1
- package/commonjs/DatePicker/common.js +8 -8
- package/commonjs/DatePicker/styles.js +5 -5
- package/commonjs/Drawer/Drawer.js +12 -12
- package/commonjs/Drawer/SlideTransition.js +2 -2
- package/commonjs/EmptyState/EmptyState.js +2 -2
- package/commonjs/Fieldset/Fieldset.js +5 -5
- package/commonjs/Fieldset/styles.js +2 -2
- package/commonjs/FormField/FormField.js +4 -4
- package/commonjs/Icon/Icon.js +7 -7
- package/commonjs/Icon/styles.js +7 -7
- package/commonjs/IllustrationViewBoxes.js +1 -0
- package/commonjs/Image/Image.js +3 -3
- package/commonjs/Image/styles.js +1 -1
- package/commonjs/Indicator/Indicator.js +1 -1
- package/commonjs/Indicator/styles.js +1 -1
- package/commonjs/Input/Input.js +20 -20
- package/commonjs/Input/styles.js +13 -13
- package/commonjs/Label/Label.js +1 -1
- package/commonjs/Link/Link.js +5 -5
- package/commonjs/Link/constants.js +3 -3
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/Listbox.js +8 -8
- package/commonjs/Loader/Loader.js +6 -6
- package/commonjs/Loader/styles.js +3 -3
- package/commonjs/LoaderButton/LoaderButton.js +4 -4
- package/commonjs/Menu/Menu.js +31 -31
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/Menu/utils/constants.flow.js +8 -8
- package/commonjs/Menu/utils/constants.js +8 -8
- package/commonjs/Menu/utils/descendants.js +24 -24
- package/commonjs/Menu/utils/hooks.js +9 -9
- package/commonjs/Message/Message.flow.js +4 -4
- package/commonjs/Message/Message.js +16 -16
- package/commonjs/Message/constants.js +4 -4
- package/commonjs/Message/styles.js +7 -7
- package/commonjs/Modal/Modal.js +8 -8
- package/commonjs/Modal/styles.js +11 -11
- package/commonjs/Numeral/Numeral.js +10 -10
- package/commonjs/PartnerLogo/PartnerLogo.js +9 -9
- package/commonjs/PartnerLogo/PartnerLogoTypes.js +6 -6
- package/commonjs/PartnerLogo/styles.js +7 -7
- package/commonjs/Popout/Popout.js +29 -29
- package/commonjs/Portal/Portal.js +3 -3
- package/commonjs/Radio/Radio.js +2 -2
- package/commonjs/Radio/styles.js +9 -9
- package/commonjs/SegmentedControl/SegmentedControl.js +1 -1
- package/commonjs/Select/Select.js +4 -4
- package/commonjs/Select/styles.js +16 -16
- package/commonjs/Skeleton/Skeleton.js +1 -1
- package/commonjs/SpotIllustration/SpotIllustration.js +1 -1
- package/commonjs/SpotIllustration/illustrationNames.js +1 -1
- package/commonjs/Stack/Stack.js +21 -21
- package/commonjs/Switch/Switch.js +1 -1
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/Table.js +5 -5
- package/commonjs/TableCell/TableCell.js +1 -1
- package/commonjs/TableHeaderCell/TableHeaderCell.flow.js +2 -2
- package/commonjs/TableHeaderCell/TableHeaderCell.js +7 -7
- package/commonjs/TableHeaderCell/constants.js +2 -2
- package/commonjs/TableRowAccordion/TableRowAccordion.js +1 -1
- package/commonjs/Tabs/styles.js +1 -1
- package/commonjs/Text/Text.js +8 -8
- package/commonjs/Text/styles.js +1 -1
- package/commonjs/Textarea/styles.js +2 -2
- package/commonjs/Toast/Toast.js +12 -12
- package/commonjs/ToggleHint/ToggleHint.js +3 -3
- package/commonjs/ToggleHint/styles.js +1 -1
- package/commonjs/Token/Token.js +4 -4
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/TokenInput.js +10 -10
- package/commonjs/TokenInput/TokenScreenReaderStatus.js +1 -1
- package/commonjs/TokenInput/styles.js +1 -1
- package/commonjs/TokenInput/util.js +2 -2
- package/commonjs/Tooltip/Tooltip.js +16 -16
- package/commonjs/Tooltip/styles.js +1 -1
- package/commonjs/illustrationNames.js +1 -1
- package/commonjs/systemProps/index.js +2 -2
- package/commonjs/systemProps/tests/types.flow.js +14 -14
- package/commonjs/systemProps/variant.flow.js +2 -2
- package/commonjs/themes/dark/dataviz-palette.js +20 -20
- package/commonjs/themes/dark/theme.js +10 -10
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +1 -1
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +1 -1
- package/commonjs/themes/light/dataviz-palette.js +20 -20
- package/commonjs/themes/light/literal-colors.js +134 -132
- package/commonjs/themes/light/theme.js +12 -12
- package/commonjs/types/system-props.flow.js +1 -1
- package/commonjs/utils/constants.js +1 -1
- package/commonjs/utils/hooks.js +8 -8
- package/commonjs/utils/index.js +3 -3
- package/commonjs/utils/innerText.js +8 -8
- package/commonjs/utils/mixins.js +2 -2
- package/commonjs/utils/responsiveProps/index.js +1 -1
- package/commonjs/utils/responsiveProps/index.test.flow.js +7 -7
- package/commonjs/utils/system-props/gap.js +6 -6
- package/commonjs/utils/system-props/system-props.js +2 -2
- package/commonjs/utils/use-measure.js +1 -1
- package/commonjs/utils/useInteractiveColor.js +2 -2
- package/dist/illustration.svg +1 -1
- package/dist/illustrationList.js +1 -1
- package/dist/themes/dark/theme.scss +2 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +2 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +2 -0
- package/dist/themes/light/theme.scss +2 -0
- package/dist/types/Avatar/Avatar.d.ts +2 -2
- package/dist/types/Avatar/AvatarTypes.d.ts +5 -5
- package/dist/types/Avatar/AvatarTypes.d.ts.map +1 -1
- package/dist/types/Avatar/index.d.ts +3 -3
- package/dist/types/Avatar/index.d.ts.map +1 -1
- package/dist/types/Badge/Badge.d.ts +1 -1
- package/dist/types/Badge/Badge.d.ts.map +1 -1
- package/dist/types/Badge/BadgeTypes.d.ts +6 -6
- package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
- package/dist/types/Badge/index.d.ts +3 -3
- package/dist/types/Badge/index.d.ts.map +1 -1
- package/dist/types/Banner/Banner.d.ts +1 -1
- package/dist/types/Banner/Banner.d.ts.map +1 -1
- package/dist/types/Banner/BannerTypes.d.ts +7 -7
- package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
- package/dist/types/Banner/index.d.ts +2 -2
- package/dist/types/Banner/index.d.ts.map +1 -1
- package/dist/types/Banner/styles.d.ts +1 -1
- package/dist/types/Banner/styles.d.ts.map +1 -1
- package/dist/types/Box/Box.d.ts +2 -2
- package/dist/types/Box/Box.d.ts.map +1 -1
- package/dist/types/Box/BoxTypes.d.ts +3 -3
- package/dist/types/Box/BoxTypes.d.ts.map +1 -1
- package/dist/types/Box/index.d.ts +2 -2
- package/dist/types/Box/index.d.ts.map +1 -1
- package/dist/types/Box/styles.d.ts +1 -1
- package/dist/types/Box/styles.d.ts.map +1 -1
- package/dist/types/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts +5 -5
- package/dist/types/Breadcrumb/BreadcrumbTypes.d.ts.map +1 -1
- package/dist/types/Breadcrumb/index.d.ts +2 -2
- package/dist/types/Breadcrumb/index.d.ts.map +1 -1
- package/dist/types/Button/Button.d.ts +1 -1
- package/dist/types/Button/Button.d.ts.map +1 -1
- package/dist/types/Button/ButtonTypes.d.ts +7 -7
- package/dist/types/Button/ButtonTypes.d.ts.map +1 -1
- package/dist/types/Button/index.d.ts +2 -2
- package/dist/types/Button/index.d.ts.map +1 -1
- package/dist/types/Button/styles.d.ts +2 -2
- package/dist/types/Button/styles.d.ts.map +1 -1
- package/dist/types/Card/Card.d.ts +1 -1
- package/dist/types/Card/Card.d.ts.map +1 -1
- package/dist/types/Card/CardTypes.d.ts +14 -14
- package/dist/types/Card/CardTypes.d.ts.map +1 -1
- package/dist/types/Card/index.d.ts +3 -3
- package/dist/types/Card/index.d.ts.map +1 -1
- package/dist/types/Card/styles.d.ts +1 -1
- package/dist/types/Card/subComponents.d.ts +2 -2
- package/dist/types/Card/subComponents.d.ts.map +1 -1
- package/dist/types/Card/utils.d.ts +4 -4
- package/dist/types/Card/utils.d.ts.map +1 -1
- package/dist/types/CharacterCounter/CharacterCounter.d.ts +2 -2
- package/dist/types/CharacterCounter/CharacterCounter.d.ts.map +1 -1
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts +5 -5
- package/dist/types/CharacterCounter/CharacterCounterTypes.d.ts.map +1 -1
- package/dist/types/CharacterCounter/index.d.ts +2 -2
- package/dist/types/CharacterCounter/index.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts +1 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts +5 -5
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +1 -1
- package/dist/types/ChartLegend/index.d.ts +2 -2
- package/dist/types/ChartLegend/index.d.ts.map +1 -1
- package/dist/types/ChartLegend/styles.d.ts +3 -3
- package/dist/types/ChartLegend/styles.d.ts.map +1 -1
- package/dist/types/ChartLegend/useChartLabels.d.ts +1 -1
- package/dist/types/ChartLegend/useChartLabels.d.ts.map +1 -1
- package/dist/types/Checkbox/Checkbox.d.ts +2 -2
- package/dist/types/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/Checkbox/CheckboxTypes.d.ts +8 -8
- package/dist/types/Checkbox/CheckboxTypes.d.ts.map +1 -1
- package/dist/types/Checkbox/index.d.ts +2 -2
- package/dist/types/Checkbox/index.d.ts.map +1 -1
- package/dist/types/Checkbox/styles.d.ts +3 -3
- package/dist/types/Checkbox/styles.d.ts.map +1 -1
- package/dist/types/Collapsible/Collapsible.d.ts +1 -1
- package/dist/types/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/types/Collapsible/CollapsibleTypes.d.ts +1 -1
- package/dist/types/Collapsible/index.d.ts +2 -2
- package/dist/types/Collapsible/index.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts +4 -4
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts +1 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/index.d.ts +3 -3
- package/dist/types/DatePicker/DateRangePicker/index.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePicker.d.ts +2 -2
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts +3 -3
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts +1 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/index.d.ts +3 -3
- package/dist/types/DatePicker/SingleDatePicker/index.d.ts.map +1 -1
- package/dist/types/DatePicker/common.d.ts +5 -5
- package/dist/types/DatePicker/common.d.ts.map +1 -1
- package/dist/types/DatePicker/index.d.ts +2 -2
- package/dist/types/DatePicker/styles.d.ts +2 -2
- package/dist/types/DatePicker/styles.d.ts.map +1 -1
- package/dist/types/DatePicker/types.d.ts +3 -3
- package/dist/types/DatePicker/types.d.ts.map +1 -1
- package/dist/types/Drawer/Drawer.d.ts +2 -2
- package/dist/types/Drawer/Drawer.d.ts.map +1 -1
- package/dist/types/Drawer/DrawerTypes.d.ts +9 -9
- package/dist/types/Drawer/DrawerTypes.d.ts.map +1 -1
- package/dist/types/Drawer/SlideTransition.d.ts +3 -3
- package/dist/types/Drawer/SlideTransition.d.ts.map +1 -1
- package/dist/types/Drawer/index.d.ts +2 -2
- package/dist/types/Drawer/index.d.ts.map +1 -1
- package/dist/types/Drawer/styles.d.ts +3 -3
- package/dist/types/Drawer/styles.d.ts.map +1 -1
- package/dist/types/EmptyState/EmptyState.d.ts +1 -1
- package/dist/types/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/types/EmptyState/EmptyStateTypes.d.ts +2 -2
- package/dist/types/EmptyState/EmptyStateTypes.d.ts.map +1 -1
- package/dist/types/EmptyState/index.d.ts +2 -2
- package/dist/types/EmptyState/index.d.ts.map +1 -1
- package/dist/types/EnumIllustrationNames.d.ts +1 -1
- package/dist/types/EnumIllustrationNames.d.ts.map +1 -1
- package/dist/types/Fieldset/Fieldset.d.ts +1 -1
- package/dist/types/Fieldset/Fieldset.d.ts.map +1 -1
- package/dist/types/Fieldset/FieldsetTypes.d.ts +4 -4
- package/dist/types/Fieldset/FieldsetTypes.d.ts.map +1 -1
- package/dist/types/Fieldset/index.d.ts +2 -2
- package/dist/types/Fieldset/index.d.ts.map +1 -1
- package/dist/types/Fieldset/styles.d.ts +1 -1
- package/dist/types/Fieldset/styles.d.ts.map +1 -1
- package/dist/types/FormField/FormField.d.ts +1 -1
- package/dist/types/FormField/FormField.d.ts.map +1 -1
- package/dist/types/FormField/FormFieldTypes.d.ts +3 -3
- package/dist/types/FormField/FormFieldTypes.d.ts.map +1 -1
- package/dist/types/FormField/index.d.ts +2 -2
- package/dist/types/FormField/index.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts +1 -1
- package/dist/types/Icon/Icon.d.ts.map +1 -1
- package/dist/types/Icon/IconTypes.d.ts +9 -9
- package/dist/types/Icon/IconTypes.d.ts.map +1 -1
- package/dist/types/Icon/index.d.ts +2 -2
- package/dist/types/Icon/index.d.ts.map +1 -1
- package/dist/types/Icon/styles.d.ts +1 -1
- package/dist/types/Icon/styles.d.ts.map +1 -1
- package/dist/types/Image/Image.d.ts +2 -2
- package/dist/types/Image/Image.d.ts.map +1 -1
- package/dist/types/Image/ImageTypes.d.ts +5 -5
- package/dist/types/Image/ImageTypes.d.ts.map +1 -1
- package/dist/types/Image/index.d.ts +2 -2
- package/dist/types/Image/index.d.ts.map +1 -1
- package/dist/types/Indicator/Indicator.d.ts +2 -2
- package/dist/types/Indicator/Indicator.d.ts.map +1 -1
- package/dist/types/Indicator/IndicatorTypes.d.ts +4 -4
- package/dist/types/Indicator/IndicatorTypes.d.ts.map +1 -1
- package/dist/types/Indicator/index.d.ts +2 -2
- package/dist/types/Indicator/index.d.ts.map +1 -1
- package/dist/types/Input/Input.d.ts +2 -2
- package/dist/types/Input/Input.d.ts.map +1 -1
- package/dist/types/Input/InputTypes.d.ts +11 -11
- package/dist/types/Input/InputTypes.d.ts.map +1 -1
- package/dist/types/Input/index.d.ts +2 -2
- package/dist/types/Input/index.d.ts.map +1 -1
- package/dist/types/Input/styles.d.ts +1 -1
- package/dist/types/Input/styles.d.ts.map +1 -1
- package/dist/types/KeyboardKey/KeyboardKey.d.ts +2 -2
- package/dist/types/KeyboardKey/KeyboardKey.d.ts.map +1 -1
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts +4 -4
- package/dist/types/KeyboardKey/KeyboardKeyTypes.d.ts.map +1 -1
- package/dist/types/KeyboardKey/index.d.ts +2 -2
- package/dist/types/KeyboardKey/index.d.ts.map +1 -1
- package/dist/types/Label/Label.d.ts +2 -2
- package/dist/types/Label/Label.d.ts.map +1 -1
- package/dist/types/Label/LabelTypes.d.ts +2 -2
- package/dist/types/Label/LabelTypes.d.ts.map +1 -1
- package/dist/types/Label/index.d.ts +2 -2
- package/dist/types/Label/index.d.ts.map +1 -1
- package/dist/types/Link/Link.d.ts +1 -1
- package/dist/types/Link/Link.d.ts.map +1 -1
- package/dist/types/Link/LinkTypes.d.ts +6 -6
- package/dist/types/Link/LinkTypes.d.ts.map +1 -1
- package/dist/types/Link/index.d.ts +3 -3
- package/dist/types/Link/index.d.ts.map +1 -1
- package/dist/types/Link/styles.d.ts +1 -1
- package/dist/types/Link/styles.d.ts.map +1 -1
- package/dist/types/Listbox/Listbox.d.ts +1 -1
- package/dist/types/Listbox/Listbox.d.ts.map +1 -1
- package/dist/types/Listbox/ListboxTypes.d.ts +9 -9
- package/dist/types/Listbox/ListboxTypes.d.ts.map +1 -1
- package/dist/types/Listbox/index.d.ts +2 -2
- package/dist/types/Listbox/index.d.ts.map +1 -1
- package/dist/types/Loader/Loader.d.ts +2 -2
- package/dist/types/Loader/Loader.d.ts.map +1 -1
- package/dist/types/Loader/LoaderTypes.d.ts +6 -6
- package/dist/types/Loader/LoaderTypes.d.ts.map +1 -1
- package/dist/types/Loader/index.d.ts +2 -2
- package/dist/types/Loader/index.d.ts.map +1 -1
- package/dist/types/Loader/styles.d.ts +2 -2
- package/dist/types/Loader/styles.d.ts.map +1 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts +1 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts.map +1 -1
- package/dist/types/LoaderButton/LoaderButtonTypes.d.ts +1 -1
- package/dist/types/LoaderButton/LoaderButtonTypes.d.ts.map +1 -1
- package/dist/types/LoaderButton/index.d.ts +2 -2
- package/dist/types/LoaderButton/index.d.ts.map +1 -1
- package/dist/types/Menu/Menu.d.ts +3 -3
- package/dist/types/Menu/Menu.d.ts.map +1 -1
- package/dist/types/Menu/MenuTypes.d.ts +22 -22
- package/dist/types/Menu/MenuTypes.d.ts.map +1 -1
- package/dist/types/Menu/index.d.ts +4 -4
- package/dist/types/Menu/index.d.ts.map +1 -1
- package/dist/types/Menu/styles.d.ts +1 -1
- package/dist/types/Menu/styles.d.ts.map +1 -1
- package/dist/types/Menu/utils/descendants.d.ts +4 -4
- package/dist/types/Menu/utils/descendants.d.ts.map +1 -1
- package/dist/types/Menu/utils/hooks.d.ts +1 -1
- package/dist/types/Menu/utils/hooks.d.ts.map +1 -1
- package/dist/types/Menu/utils/index.d.ts +3 -3
- package/dist/types/Message/Message.d.ts +7 -7
- package/dist/types/Message/Message.d.ts.map +1 -1
- package/dist/types/Message/MessageTypes.d.ts +6 -6
- package/dist/types/Message/MessageTypes.d.ts.map +1 -1
- package/dist/types/Message/index.d.ts +3 -3
- package/dist/types/Message/index.d.ts.map +1 -1
- package/dist/types/Message/styles.d.ts +1 -1
- package/dist/types/Message/styles.d.ts.map +1 -1
- package/dist/types/Modal/Modal.d.ts +2 -2
- package/dist/types/Modal/ModalTypes.d.ts +6 -6
- package/dist/types/Modal/ModalTypes.d.ts.map +1 -1
- package/dist/types/Modal/index.d.ts +2 -2
- package/dist/types/Modal/index.d.ts.map +1 -1
- package/dist/types/Modal/styles.d.ts +3 -3
- package/dist/types/Modal/styles.d.ts.map +1 -1
- package/dist/types/Numeral/Numeral.d.ts +1 -1
- package/dist/types/Numeral/Numeral.d.ts.map +1 -1
- package/dist/types/Numeral/NumeralTypes.d.ts +5 -5
- package/dist/types/Numeral/NumeralTypes.d.ts.map +1 -1
- package/dist/types/Numeral/constants.d.ts +1 -1
- package/dist/types/Numeral/constants.d.ts.map +1 -1
- package/dist/types/Numeral/index.d.ts +2 -2
- package/dist/types/Numeral/index.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts +1 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +8 -8
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- package/dist/types/PartnerLogo/index.d.ts +2 -2
- package/dist/types/PartnerLogo/index.d.ts.map +1 -1
- package/dist/types/PartnerLogo/styles.d.ts +2 -2
- package/dist/types/Popout/Popout.d.ts +3 -3
- package/dist/types/Popout/Popout.d.ts.map +1 -1
- package/dist/types/Popout/PopoutTypes.d.ts +8 -8
- package/dist/types/Popout/PopoutTypes.d.ts.map +1 -1
- package/dist/types/Popout/index.d.ts +2 -2
- package/dist/types/Popout/index.d.ts.map +1 -1
- package/dist/types/Portal/Portal.d.ts +2 -2
- package/dist/types/Portal/Portal.d.ts.map +1 -1
- package/dist/types/Portal/PortalTypes.d.ts +1 -1
- package/dist/types/Portal/index.d.ts +2 -2
- package/dist/types/Radio/Radio.d.ts +2 -2
- package/dist/types/Radio/Radio.d.ts.map +1 -1
- package/dist/types/Radio/RadioTypes.d.ts +5 -5
- package/dist/types/Radio/RadioTypes.d.ts.map +1 -1
- package/dist/types/Radio/index.d.ts +2 -2
- package/dist/types/Radio/index.d.ts.map +1 -1
- package/dist/types/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/types/SegmentedControl/SegmentedControlTypes.d.ts +2 -2
- package/dist/types/SegmentedControl/SegmentedControlTypes.d.ts.map +1 -1
- package/dist/types/SegmentedControl/index.d.ts +2 -2
- package/dist/types/SegmentedControl/index.d.ts.map +1 -1
- package/dist/types/SegmentedControl/styles.d.ts +1 -1
- package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
- package/dist/types/Select/Select.d.ts +2 -2
- package/dist/types/Select/Select.d.ts.map +1 -1
- package/dist/types/Select/SelectTypes.d.ts +9 -9
- package/dist/types/Select/SelectTypes.d.ts.map +1 -1
- package/dist/types/Select/index.d.ts +2 -2
- package/dist/types/Select/index.d.ts.map +1 -1
- package/dist/types/Select/styles.d.ts +2 -2
- package/dist/types/Select/styles.d.ts.map +1 -1
- package/dist/types/Skeleton/index.d.ts +1 -1
- package/dist/types/Skeleton/index.d.ts.map +1 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts +1 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts.map +1 -1
- package/dist/types/SpotIllustration/SpotIllustrationTypes.d.ts +4 -4
- package/dist/types/SpotIllustration/SpotIllustrationTypes.d.ts.map +1 -1
- package/dist/types/SpotIllustration/illustrationNames.d.ts.map +1 -1
- package/dist/types/SpotIllustration/index.d.ts +2 -2
- package/dist/types/SpotIllustration/index.d.ts.map +1 -1
- package/dist/types/Stack/Stack.d.ts +1 -1
- package/dist/types/Stack/Stack.d.ts.map +1 -1
- package/dist/types/Stack/StackTypes.d.ts +5 -5
- package/dist/types/Stack/StackTypes.d.ts.map +1 -1
- package/dist/types/Stack/index.d.ts +2 -2
- package/dist/types/Stack/index.d.ts.map +1 -1
- package/dist/types/StatefulStory.d.ts +1 -1
- package/dist/types/StatefulStory.d.ts.map +1 -1
- package/dist/types/Switch/Switch.d.ts +1 -1
- package/dist/types/Switch/Switch.d.ts.map +1 -1
- package/dist/types/Switch/SwitchTypes.d.ts +4 -4
- package/dist/types/Switch/SwitchTypes.d.ts.map +1 -1
- package/dist/types/Switch/index.d.ts +2 -2
- package/dist/types/Switch/index.d.ts.map +1 -1
- package/dist/types/Table/Table.d.ts +3 -3
- package/dist/types/Table/Table.d.ts.map +1 -1
- package/dist/types/Table/TableTypes.d.ts +6 -6
- package/dist/types/Table/TableTypes.d.ts.map +1 -1
- package/dist/types/Table/index.d.ts +2 -2
- package/dist/types/Table/index.d.ts.map +1 -1
- package/dist/types/TableCell/TableCell.d.ts +2 -2
- package/dist/types/TableCell/TableCell.d.ts.map +1 -1
- package/dist/types/TableCell/TableCellTypes.d.ts +4 -4
- package/dist/types/TableCell/TableCellTypes.d.ts.map +1 -1
- package/dist/types/TableCell/index.d.ts +2 -2
- package/dist/types/TableCell/index.d.ts.map +1 -1
- package/dist/types/TableCell/styles.d.ts +2 -2
- package/dist/types/TableCell/styles.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts +3 -3
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts +4 -4
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/index.d.ts +3 -3
- package/dist/types/TableHeaderCell/index.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/styles.d.ts +3 -3
- package/dist/types/TableHeaderCell/styles.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts +2 -2
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts +4 -4
- package/dist/types/TableRowAccordion/TableRowAccordionTypes.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/index.d.ts +2 -2
- package/dist/types/TableRowAccordion/index.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/styles.d.ts.map +1 -1
- package/dist/types/Tabs/Tabs.d.ts +3 -3
- package/dist/types/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/Tabs/TabsTypes.d.ts +5 -5
- package/dist/types/Tabs/TabsTypes.d.ts.map +1 -1
- package/dist/types/Tabs/index.d.ts +2 -2
- package/dist/types/Tabs/index.d.ts.map +1 -1
- package/dist/types/Tabs/styles.d.ts +2 -2
- package/dist/types/Tabs/styles.d.ts.map +1 -1
- package/dist/types/Text/Text.d.ts +1 -1
- package/dist/types/Text/Text.d.ts.map +1 -1
- package/dist/types/Text/TextTypes.d.ts +7 -7
- package/dist/types/Text/TextTypes.d.ts.map +1 -1
- package/dist/types/Text/index.d.ts +2 -2
- package/dist/types/Text/index.d.ts.map +1 -1
- package/dist/types/Text/styles.d.ts +1 -1
- package/dist/types/Text/styles.d.ts.map +1 -1
- package/dist/types/Textarea/Textarea.d.ts +2 -2
- package/dist/types/Textarea/Textarea.d.ts.map +1 -1
- package/dist/types/Textarea/TextareaTypes.d.ts +10 -10
- package/dist/types/Textarea/TextareaTypes.d.ts.map +1 -1
- package/dist/types/Textarea/index.d.ts +2 -2
- package/dist/types/Textarea/index.d.ts.map +1 -1
- package/dist/types/Textarea/styles.d.ts +1 -1
- package/dist/types/ThemeProvider/index.d.ts +2 -2
- package/dist/types/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/Toast/Toast.d.ts +1 -1
- package/dist/types/Toast/ToastTypes.d.ts +4 -4
- package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
- package/dist/types/Toast/index.d.ts +3 -3
- package/dist/types/Toast/index.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +3 -3
- package/dist/types/Toast/styles.d.ts.map +1 -1
- package/dist/types/ToggleHint/ToggleHint.d.ts +2 -2
- package/dist/types/ToggleHint/ToggleHint.d.ts.map +1 -1
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts +5 -5
- package/dist/types/ToggleHint/ToggleHintTypes.d.ts.map +1 -1
- package/dist/types/ToggleHint/index.d.ts +2 -2
- package/dist/types/ToggleHint/index.d.ts.map +1 -1
- package/dist/types/ToggleHint/styles.d.ts +1 -1
- package/dist/types/ToggleHint/styles.d.ts.map +1 -1
- package/dist/types/Token/Token.d.ts +1 -1
- package/dist/types/Token/Token.d.ts.map +1 -1
- package/dist/types/Token/TokenTypes.d.ts +7 -7
- package/dist/types/Token/TokenTypes.d.ts.map +1 -1
- package/dist/types/Token/index.d.ts +2 -2
- package/dist/types/Token/index.d.ts.map +1 -1
- package/dist/types/Token/styles.d.ts +1 -1
- package/dist/types/Token/styles.d.ts.map +1 -1
- package/dist/types/TokenInput/TokenInput.d.ts +2 -2
- package/dist/types/TokenInput/TokenInput.d.ts.map +1 -1
- package/dist/types/TokenInput/TokenInputTypes.d.ts +8 -8
- package/dist/types/TokenInput/TokenInputTypes.d.ts.map +1 -1
- package/dist/types/TokenInput/index.d.ts +2 -2
- package/dist/types/TokenInput/index.d.ts.map +1 -1
- package/dist/types/TokenInput/styles.d.ts +2 -2
- package/dist/types/TokenInput/styles.d.ts.map +1 -1
- package/dist/types/TokenInput/util.d.ts +1 -1
- package/dist/types/TokenInput/util.d.ts.map +1 -1
- package/dist/types/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/Tooltip/TooltipTypes.d.ts +7 -7
- package/dist/types/Tooltip/TooltipTypes.d.ts.map +1 -1
- package/dist/types/Tooltip/index.d.ts +2 -2
- package/dist/types/Tooltip/index.d.ts.map +1 -1
- package/dist/types/Tooltip/styles.d.ts +1 -1
- package/dist/types/Tooltip/styles.d.ts.map +1 -1
- package/dist/types/VisuallyHidden/index.d.ts +1 -1
- package/dist/types/illustrationNames.d.ts +1 -1
- package/dist/types/illustrationNames.d.ts.map +1 -1
- package/dist/types/index.d.ts +68 -68
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/systemProps/index.d.ts +3 -3
- package/dist/types/systemProps/index.d.ts.map +1 -1
- package/dist/types/themes/dark/dataviz-palette.d.ts +20 -20
- package/dist/types/themes/dark/theme.d.ts +175 -173
- package/dist/types/themes/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/index.d.ts +2 -2
- package/dist/types/themes/extendedThemes/sproutTheme/index.d.ts.map +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts.map +1 -1
- package/dist/types/themes/light/dataviz-palette.d.ts +20 -20
- package/dist/types/themes/light/literal-colors.d.ts +134 -132
- package/dist/types/themes/light/literal-colors.d.ts.map +1 -1
- package/dist/types/themes/light/theme.d.ts +175 -173
- package/dist/types/themes/light/theme.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +5 -5
- package/dist/types/types/styled-components.d.ts +3 -3
- package/dist/types/types/styled-components.d.ts.map +1 -1
- package/dist/types/types/system-props.d.ts +7 -7
- package/dist/types/types/system-props.d.ts.map +1 -1
- package/dist/types/types/theme.colors.d.ts +2 -2
- package/dist/types/types/theme.colors.d.ts.map +1 -1
- package/dist/types/types/theme.d.ts +5 -5
- package/dist/types/types/theme.d.ts.map +1 -1
- package/dist/types/utils/dataQaLabelQueries.d.ts +1 -1
- package/dist/types/utils/hooks.d.ts +1 -1
- package/dist/types/utils/hooks.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/innerText.d.ts +1 -1
- package/dist/types/utils/innerText.d.ts.map +1 -1
- package/dist/types/utils/react-testing-library.d.ts +2 -2
- package/dist/types/utils/responsiveProps/index.d.ts +1 -1
- package/dist/types/utils/responsiveProps/index.d.ts.map +1 -1
- package/dist/types/utils/system-props/index.d.ts +1 -1
- package/dist/types/utils/system-props/system-props.d.ts +1 -1
- package/dist/types/utils/use-measure.d.ts +1 -1
- package/dist/types/utils/use-measure.d.ts.map +1 -1
- package/dist/types/utils/useInteractiveColor.d.ts.map +1 -1
- package/lib/Avatar/Avatar.flow.js +1 -1
- package/lib/Avatar/Avatar.js +20 -20
- package/lib/Avatar/constants.flow.js +8 -8
- package/lib/Avatar/constants.js +8 -8
- package/lib/Badge/Badge.flow.js +1 -1
- package/lib/Badge/Badge.js +7 -7
- package/lib/Badge/constants.flow.js +11 -11
- package/lib/Badge/constants.js +25 -25
- package/lib/Badge/styles.js +4 -4
- package/lib/Banner/Banner.flow.js +1 -1
- package/lib/Banner/Banner.js +23 -23
- package/lib/Banner/styles.js +1 -1
- package/lib/Box/Box.flow.js +1 -1
- package/lib/Box/Box.js +2 -2
- package/lib/Box/styles.js +1 -1
- package/lib/Breadcrumb/Breadcrumb.flow.js +1 -1
- package/lib/Breadcrumb/Breadcrumb.js +4 -4
- package/lib/Breadcrumb/styles.js +2 -2
- package/lib/Button/Button.flow.js +1 -1
- package/lib/Button/Button.js +11 -11
- package/lib/Button/styles.js +10 -10
- package/lib/Card/Card.flow.js +1 -1
- package/lib/Card/Card.js +4 -4
- package/lib/Card/CardTypes.flow.js +1 -1
- package/lib/Card/styles.js +4 -4
- package/lib/Card/subComponents.js +3 -3
- package/lib/Card/utils.js +7 -7
- package/lib/CharacterCounter/CharacterCounter.flow.js +1 -1
- package/lib/CharacterCounter/CharacterCounter.js +3 -3
- package/lib/CharacterCounter/styles.js +1 -1
- package/lib/ChartLegend/ChartLegend.flow.js +1 -1
- package/lib/ChartLegend/ChartLegend.js +2 -2
- package/lib/ChartLegend/styles.js +3 -3
- package/lib/ChartLegend/useChartLabels.js +5 -5
- package/lib/Checkbox/Checkbox.flow.js +1 -1
- package/lib/Checkbox/Checkbox.js +9 -9
- package/lib/Checkbox/styles.js +16 -16
- package/lib/Collapsible/Collapsible.flow.js +1 -1
- package/lib/Collapsible/Collapsible.js +6 -6
- package/lib/Collapsible/styles.js +2 -2
- package/lib/DatePicker/DateRangePicker/DateRangePicker.flow.js +1 -1
- package/lib/DatePicker/DateRangePicker/DateRangePicker.js +3 -3
- package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +1 -1
- package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.js +2 -2
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +1 -1
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.js +3 -3
- package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +1 -1
- package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +1 -1
- package/lib/DatePicker/common.js +11 -11
- package/lib/DatePicker/styles.js +7 -7
- package/lib/Drawer/Drawer.flow.js +1 -1
- package/lib/Drawer/Drawer.js +16 -16
- package/lib/Drawer/SlideTransition.js +5 -5
- package/lib/Drawer/styles.js +1 -1
- package/lib/EmptyState/EmptyState.flow.js +1 -1
- package/lib/EmptyState/EmptyState.js +3 -3
- package/lib/Fieldset/Fieldset.flow.js +1 -1
- package/lib/Fieldset/Fieldset.js +6 -6
- package/lib/Fieldset/styles.js +3 -3
- package/lib/FormField/FormField.flow.js +1 -1
- package/lib/FormField/FormField.js +5 -5
- package/lib/Icon/Icon.flow.js +1 -1
- package/lib/Icon/Icon.js +10 -10
- package/lib/Icon/styles.js +9 -9
- package/lib/IllustrationViewBoxes.js +1 -0
- package/lib/Image/Image.flow.js +1 -1
- package/lib/Image/Image.js +4 -4
- package/lib/Image/styles.js +2 -2
- package/lib/Indicator/Indicator.flow.js +1 -1
- package/lib/Indicator/Indicator.js +2 -2
- package/lib/Indicator/styles.js +2 -2
- package/lib/Input/Input.flow.js +1 -1
- package/lib/Input/Input.js +22 -22
- package/lib/Input/styles.js +14 -14
- package/lib/KeyboardKey/KeyboardKey.flow.js +1 -1
- package/lib/KeyboardKey/KeyboardKey.js +1 -1
- package/lib/KeyboardKey/styles.js +1 -1
- package/lib/Label/Label.flow.js +1 -1
- package/lib/Label/Label.js +3 -3
- package/lib/Link/Link.flow.js +1 -1
- package/lib/Link/Link.js +6 -6
- package/lib/Link/constants.js +4 -4
- package/lib/Link/styles.js +2 -2
- package/lib/Listbox/Listbox.flow.js +1 -1
- package/lib/Listbox/Listbox.js +10 -10
- package/lib/Loader/Loader.flow.js +1 -1
- package/lib/Loader/Loader.js +7 -7
- package/lib/Loader/styles.js +4 -4
- package/lib/LoaderButton/LoaderButton.flow.js +1 -1
- package/lib/LoaderButton/LoaderButton.js +6 -6
- package/lib/Menu/Menu.flow.js +1 -1
- package/lib/Menu/Menu.js +35 -35
- package/lib/Menu/styles.js +2 -2
- package/lib/Menu/utils/constants.flow.js +8 -8
- package/lib/Menu/utils/constants.js +8 -8
- package/lib/Menu/utils/descendants.js +26 -26
- package/lib/Menu/utils/hooks.js +11 -11
- package/lib/Message/Message.flow.js +5 -5
- package/lib/Message/Message.js +17 -17
- package/lib/Message/constants.js +4 -4
- package/lib/Message/styles.js +9 -9
- package/lib/Modal/Modal.flow.js +1 -1
- package/lib/Modal/Modal.js +10 -10
- package/lib/Modal/styles.js +15 -15
- package/lib/Numeral/Numeral.flow.js +1 -1
- package/lib/Numeral/Numeral.js +12 -12
- package/lib/Numeral/styles.js +1 -1
- package/lib/PartnerLogo/PartnerLogo.flow.js +1 -1
- package/lib/PartnerLogo/PartnerLogo.js +11 -11
- package/lib/PartnerLogo/PartnerLogoTypes.js +6 -6
- package/lib/PartnerLogo/styles.js +9 -9
- package/lib/Popout/Popout.flow.js +1 -1
- package/lib/Popout/Popout.js +35 -35
- package/lib/Popout/styles.js +1 -1
- package/lib/Portal/Portal.flow.js +1 -1
- package/lib/Portal/Portal.js +5 -5
- package/lib/Radio/Radio.flow.js +1 -1
- package/lib/Radio/Radio.js +3 -3
- package/lib/Radio/styles.js +10 -10
- package/lib/SegmentedControl/SegmentedControl.flow.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.js +3 -3
- package/lib/SegmentedControl/styles.js +1 -1
- package/lib/Select/Select.flow.js +1 -1
- package/lib/Select/Select.js +5 -5
- package/lib/Select/styles.js +17 -17
- package/lib/Skeleton/Skeleton.js +2 -2
- package/lib/SpotIllustration/SpotIllustration.flow.js +1 -1
- package/lib/SpotIllustration/SpotIllustration.js +3 -3
- package/lib/SpotIllustration/illustrationNames.js +1 -1
- package/lib/Stack/Stack.flow.js +1 -1
- package/lib/Stack/Stack.js +23 -23
- package/lib/StatefulStory.js +1 -1
- package/lib/Switch/Switch.flow.js +1 -1
- package/lib/Switch/Switch.js +2 -2
- package/lib/Switch/styles.js +3 -3
- package/lib/Table/Table.flow.js +1 -1
- package/lib/Table/Table.js +6 -6
- package/lib/Table/styles.js +1 -1
- package/lib/TableCell/TableCell.flow.js +1 -1
- package/lib/TableCell/TableCell.js +2 -2
- package/lib/TableCell/styles.js +1 -1
- package/lib/TableHeaderCell/TableHeaderCell.flow.js +3 -3
- package/lib/TableHeaderCell/TableHeaderCell.js +8 -8
- package/lib/TableHeaderCell/constants.js +2 -2
- package/lib/TableHeaderCell/styles.js +1 -1
- package/lib/TableRowAccordion/TableRowAccordion.flow.js +1 -1
- package/lib/TableRowAccordion/TableRowAccordion.js +2 -2
- package/lib/TableRowAccordion/styles.js +1 -1
- package/lib/Tabs/Tabs.flow.js +1 -1
- package/lib/Tabs/Tabs.js +1 -1
- package/lib/Tabs/styles.js +2 -2
- package/lib/Text/Text.flow.js +1 -1
- package/lib/Text/Text.js +10 -10
- package/lib/Text/styles.js +2 -2
- package/lib/Textarea/Textarea.flow.js +1 -1
- package/lib/Textarea/Textarea.js +1 -1
- package/lib/Textarea/styles.js +3 -3
- package/lib/ThemeProvider/index.flow.js +1 -1
- package/lib/ThemeProvider/index.js +2 -2
- package/lib/Toast/Toast.flow.js +1 -1
- package/lib/Toast/Toast.js +15 -15
- package/lib/Toast/styles.js +2 -2
- package/lib/ToggleHint/ToggleHint.flow.js +1 -1
- package/lib/ToggleHint/ToggleHint.js +4 -4
- package/lib/ToggleHint/styles.js +2 -2
- package/lib/Token/Token.flow.js +1 -1
- package/lib/Token/Token.js +5 -5
- package/lib/Token/styles.js +2 -2
- package/lib/TokenInput/TokenInput.flow.js +1 -1
- package/lib/TokenInput/TokenInput.js +11 -11
- package/lib/TokenInput/TokenScreenReaderStatus.js +3 -3
- package/lib/TokenInput/styles.js +2 -2
- package/lib/TokenInput/util.js +3 -3
- package/lib/Tooltip/Tooltip.flow.js +1 -1
- package/lib/Tooltip/Tooltip.js +19 -19
- package/lib/Tooltip/styles.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.flow.js +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.js +1 -1
- package/lib/illustrationNames.js +1 -1
- package/lib/styled.d.js +1 -1
- package/lib/systemProps/background.flow.js +1 -1
- package/lib/systemProps/border.flow.js +1 -1
- package/lib/systemProps/color.flow.js +1 -1
- package/lib/systemProps/custom.flow.js +1 -1
- package/lib/systemProps/flexbox.flow.js +1 -1
- package/lib/systemProps/grid.flow.js +1 -1
- package/lib/systemProps/index.js +3 -3
- package/lib/systemProps/layout.flow.js +1 -1
- package/lib/systemProps/position.flow.js +1 -1
- package/lib/systemProps/shadow.flow.js +1 -1
- package/lib/systemProps/space.flow.js +1 -1
- package/lib/systemProps/systemProps.flow.js +1 -1
- package/lib/systemProps/tests/types.flow.js +14 -14
- package/lib/systemProps/typography.flow.js +1 -1
- package/lib/systemProps/variant.flow.js +3 -3
- package/lib/themes/dark/dataviz-palette.js +21 -21
- package/lib/themes/dark/decorative-palettes.js +1 -1
- package/lib/themes/dark/theme.js +13 -13
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +2 -2
- package/lib/themes/light/dataviz-palette.js +21 -21
- package/lib/themes/light/decorative-palettes.js +1 -1
- package/lib/themes/light/literal-colors.js +135 -133
- package/lib/themes/light/theme.js +20 -20
- package/lib/types/shared.flow.js +1 -1
- package/lib/types/styled-components.flow.js +1 -1
- package/lib/types/system-props.flow.js +1 -1
- package/lib/utils/a11yTest.js +1 -1
- package/lib/utils/chartColors.js +1 -1
- package/lib/utils/constants.js +1 -1
- package/lib/utils/dataQaLabelQueries.js +1 -1
- package/lib/utils/hooks.flow.js +1 -1
- package/lib/utils/hooks.js +9 -9
- package/lib/utils/index.js +3 -3
- package/lib/utils/innerText.flow.js +1 -1
- package/lib/utils/innerText.js +8 -8
- package/lib/utils/mixins.js +4 -4
- package/lib/utils/react-testing-library.flow.js +3 -3
- package/lib/utils/react-testing-library.js +2 -2
- package/lib/utils/responsiveProps/index.js +1 -1
- package/lib/utils/responsiveProps/index.test.flow.js +7 -7
- package/lib/utils/system-props/gap.js +7 -7
- package/lib/utils/system-props/system-props.js +3 -3
- package/lib/utils/use-measure.js +2 -2
- package/lib/utils/useInteractiveColor.js +4 -4
- package/package.json +3 -2
package/bin/racine-codemod.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
// to run codemod: node bin/racine-codemod name-of-transform path/to/src
|
|
4
4
|
// Respectfully adapted from https://github.com/reactjs/react-codemod/blob/master/bin/react-codemod.js
|
|
5
5
|
|
|
6
|
-
const childProcess = require(
|
|
7
|
-
const fs = require(
|
|
8
|
-
const path = require(
|
|
9
|
-
const docs = require(
|
|
6
|
+
const childProcess = require("child_process");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const path = require("path");
|
|
9
|
+
const docs = require("../codemods/codemod-docs");
|
|
10
10
|
|
|
11
11
|
const currentDir = process.cwd();
|
|
12
12
|
process.chdir(__dirname);
|
|
13
13
|
|
|
14
14
|
const codemods = fs
|
|
15
|
-
.readdirSync(
|
|
16
|
-
.filter((x) => x.slice(-3) ===
|
|
15
|
+
.readdirSync("../codemods")
|
|
16
|
+
.filter((x) => x.slice(-3) === ".js")
|
|
17
17
|
.map((x) => x.slice(0, -3))
|
|
18
|
-
.filter((x) => x !==
|
|
18
|
+
.filter((x) => x !== "codemod-docs");
|
|
19
19
|
|
|
20
20
|
const transform = process.argv[2];
|
|
21
21
|
const dest = process.argv[3];
|
|
@@ -23,8 +23,8 @@ const usage = `racine-codemod <transformName> <path> <...otherArgs>\n`;
|
|
|
23
23
|
if (!transform || codemods.indexOf(transform) === -1) {
|
|
24
24
|
console.log(usage);
|
|
25
25
|
console.error(
|
|
26
|
-
|
|
27
|
-
codemods.map((x) =>
|
|
26
|
+
"Missing/invalid transform name. Pick one of:\n" +
|
|
27
|
+
codemods.map((x) => "- " + x).join("\n")
|
|
28
28
|
);
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
@@ -44,7 +44,7 @@ ${Object.entries(docs.arguments)
|
|
|
44
44
|
: `Example: ${argumentDocs.example}`
|
|
45
45
|
}`;
|
|
46
46
|
})
|
|
47
|
-
.join(
|
|
47
|
+
.join("\n")}`;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
// If a path argument is not passed, log the available arguments and example usage for the codemod.
|
|
@@ -52,28 +52,28 @@ if (!dest) {
|
|
|
52
52
|
console.log(
|
|
53
53
|
docs[transform]
|
|
54
54
|
? formatCodemodDocs(docs[transform])
|
|
55
|
-
:
|
|
55
|
+
: "Missing path argument"
|
|
56
56
|
);
|
|
57
57
|
process.exit(1);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
const filePath = path.join(
|
|
60
|
+
const filePath = path.join("../codemods", transform + ".js");
|
|
61
61
|
const relativePath = path.join(currentDir, dest);
|
|
62
62
|
const userArgs = [...process.argv]
|
|
63
63
|
.slice(4)
|
|
64
|
-
.map((arg) => arg.replace(/\s/g,
|
|
64
|
+
.map((arg) => arg.replace(/\s/g, ""));
|
|
65
65
|
|
|
66
66
|
const args = [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
"jscodeshift",
|
|
68
|
+
"--",
|
|
69
|
+
"-t",
|
|
70
70
|
filePath,
|
|
71
71
|
relativePath,
|
|
72
|
-
|
|
72
|
+
"--ignore-pattern=**/node_modules/**",
|
|
73
73
|
...userArgs,
|
|
74
74
|
];
|
|
75
75
|
|
|
76
|
-
childProcess.execFileSync(
|
|
76
|
+
childProcess.execFileSync("npx", args, { stdio: "inherit" });
|
|
77
77
|
|
|
78
78
|
console.log(
|
|
79
79
|
`Codemod complete! Please run prettier on "${dest}" to fix any formatting issues caused by the codemod.`
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
jest.autoMockOff();
|
|
2
|
-
const defineInlineTest = require(
|
|
3
|
-
const transform = require(
|
|
2
|
+
const defineInlineTest = require("jscodeshift/dist/testUtils").defineInlineTest;
|
|
3
|
+
const transform = require("../icon-library");
|
|
4
4
|
|
|
5
|
-
describe(
|
|
5
|
+
describe("icon-library codemod", () => {
|
|
6
6
|
function createTest(testName, input, output, options = {}) {
|
|
7
7
|
return defineInlineTest(
|
|
8
8
|
transform,
|
|
9
|
-
{parser:
|
|
9
|
+
{ parser: "flow", ...options },
|
|
10
10
|
input,
|
|
11
11
|
output,
|
|
12
12
|
testName
|
|
@@ -14,31 +14,31 @@ describe('icon-library codemod', () => {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
createTest(
|
|
17
|
-
|
|
17
|
+
"No changes for already-migrated icons",
|
|
18
18
|
`<Icon name='dollar-outline' />`,
|
|
19
19
|
`<Icon name='dollar-outline' />`
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
createTest(
|
|
23
|
-
|
|
23
|
+
"Simple replacement",
|
|
24
24
|
`<Icon name='ads' />`,
|
|
25
25
|
`<Icon name='dollar-outline' />`
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
createTest(
|
|
29
|
-
|
|
29
|
+
"deprecatedIcons",
|
|
30
30
|
`<Icon name='backtotop' />`,
|
|
31
31
|
`<Icon name='arrow-up-outline' />`
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
createTest(
|
|
35
|
-
|
|
35
|
+
"Handle subcomponents",
|
|
36
36
|
`<Icon.Toggle activeName='like' inactiveName='like-outline'/>;`,
|
|
37
37
|
`<Icon.Toggle activeName='thumbs-up-solid' inactiveName='thumbs-up-outline'/>;`
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
createTest(
|
|
41
|
-
|
|
41
|
+
"ssiconsvg icon regex replacements",
|
|
42
42
|
`<use
|
|
43
43
|
xlink:href="#ssiconsvg-rejected"
|
|
44
44
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
@@ -50,7 +50,7 @@ describe('icon-library codemod', () => {
|
|
|
50
50
|
);
|
|
51
51
|
|
|
52
52
|
createTest(
|
|
53
|
-
|
|
53
|
+
"ssiconsvg logo regex replacements",
|
|
54
54
|
`<use
|
|
55
55
|
xlink:href="#ssiconsvg-facebook"
|
|
56
56
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
@@ -62,7 +62,7 @@ describe('icon-library codemod', () => {
|
|
|
62
62
|
);
|
|
63
63
|
|
|
64
64
|
createTest(
|
|
65
|
-
|
|
65
|
+
"icon/iconName regex replacements",
|
|
66
66
|
`expect(queryByDataQaLabel({icon: 'dashboard'})).toBeFalsy();
|
|
67
67
|
const iconMap = {iconName: "like"};
|
|
68
68
|
const iconName = 'reply';`,
|
|
@@ -72,7 +72,7 @@ describe('icon-library codemod', () => {
|
|
|
72
72
|
);
|
|
73
73
|
|
|
74
74
|
createTest(
|
|
75
|
-
|
|
75
|
+
"Add comments",
|
|
76
76
|
`import { Badge, Icon } from '@sproutsocial/racine';
|
|
77
77
|
|
|
78
78
|
<>
|
|
@@ -97,7 +97,7 @@ import { Badge, Icon } from '@sproutsocial/racine';
|
|
|
97
97
|
// A partner name is left as-is and does not contribute to the count of issues.
|
|
98
98
|
// The variable name Icon is converted to IconShim and does not contribute to the count of issues.
|
|
99
99
|
createTest(
|
|
100
|
-
|
|
100
|
+
"Add shim component and add comments",
|
|
101
101
|
`import { Icon } from '@sproutsocial/racine';
|
|
102
102
|
|
|
103
103
|
<>
|
|
@@ -119,13 +119,13 @@ import { IconShim } from 'script/core/react/IconShim';
|
|
|
119
119
|
<IconShim name={iconName} />
|
|
120
120
|
</>`,
|
|
121
121
|
{
|
|
122
|
-
shimName:
|
|
123
|
-
shimImportPath:
|
|
122
|
+
shimName: "IconShim",
|
|
123
|
+
shimImportPath: "script/core/react/IconShim",
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
|
|
127
127
|
createTest(
|
|
128
|
-
|
|
128
|
+
"Add shim, remove Icon import",
|
|
129
129
|
`import { Icon } from '@sproutsocial/racine';
|
|
130
130
|
|
|
131
131
|
<Icon name={iconName} />`,
|
|
@@ -134,13 +134,13 @@ import { IconShim } from 'script/core/react/IconShim';
|
|
|
134
134
|
<IconShim name={iconName} />
|
|
135
135
|
`,
|
|
136
136
|
{
|
|
137
|
-
shimName:
|
|
138
|
-
shimImportPath:
|
|
137
|
+
shimName: "IconShim",
|
|
138
|
+
shimImportPath: "script/core/react/IconShim",
|
|
139
139
|
}
|
|
140
140
|
);
|
|
141
141
|
|
|
142
142
|
createTest(
|
|
143
|
-
|
|
143
|
+
"Add shim, keep Icon import due to styled usage",
|
|
144
144
|
`import { Icon } from '@sproutsocial/racine';
|
|
145
145
|
const StyledIcon = styled(Icon);
|
|
146
146
|
<Icon name={iconName} />`,
|
|
@@ -150,13 +150,13 @@ const StyledIcon = styled(Icon);
|
|
|
150
150
|
<IconShim name={iconName} />
|
|
151
151
|
`,
|
|
152
152
|
{
|
|
153
|
-
shimName:
|
|
154
|
-
shimImportPath:
|
|
153
|
+
shimName: "IconShim",
|
|
154
|
+
shimImportPath: "script/core/react/IconShim",
|
|
155
155
|
}
|
|
156
156
|
);
|
|
157
157
|
|
|
158
158
|
createTest(
|
|
159
|
-
|
|
159
|
+
"Add shim, keep Icon import due to typeof Icon usage",
|
|
160
160
|
`import { Icon } from '@sproutsocial/racine';
|
|
161
161
|
const iconType = typeof Icon;
|
|
162
162
|
<Icon name={iconName} />;`,
|
|
@@ -166,13 +166,13 @@ const iconType = typeof Icon;
|
|
|
166
166
|
<IconShim name={iconName} />;
|
|
167
167
|
`,
|
|
168
168
|
{
|
|
169
|
-
shimName:
|
|
170
|
-
shimImportPath:
|
|
169
|
+
shimName: "IconShim",
|
|
170
|
+
shimImportPath: "script/core/react/IconShim",
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
|
|
174
174
|
createTest(
|
|
175
|
-
|
|
175
|
+
"Retain first comments when Icon import is removed",
|
|
176
176
|
`// @flow
|
|
177
177
|
import { Icon } from '@sproutsocial/racine';
|
|
178
178
|
|
|
@@ -183,13 +183,13 @@ import { IconShim } from 'script/core/react/IconShim';
|
|
|
183
183
|
<IconShim name={iconName} />
|
|
184
184
|
`,
|
|
185
185
|
{
|
|
186
|
-
shimName:
|
|
187
|
-
shimImportPath:
|
|
186
|
+
shimName: "IconShim",
|
|
187
|
+
shimImportPath: "script/core/react/IconShim",
|
|
188
188
|
}
|
|
189
189
|
);
|
|
190
190
|
|
|
191
191
|
createTest(
|
|
192
|
-
|
|
192
|
+
"Retain first comments and add new comments",
|
|
193
193
|
`// @flow
|
|
194
194
|
import { Badge, Icon } from '@sproutsocial/racine';
|
|
195
195
|
|
|
@@ -230,9 +230,9 @@ import { Badge, Icon } from '@sproutsocial/racine';
|
|
|
230
230
|
// Unfortunately, because it's getting passed directly to the transform in this case,
|
|
231
231
|
// We need to simulate the way that it gets mangled when passed through the console.
|
|
232
232
|
components: [
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
"Message.Header:[iconName]",
|
|
234
|
+
"SearchInput:[iconLeft",
|
|
235
|
+
"iconRight]",
|
|
236
236
|
],
|
|
237
237
|
}
|
|
238
238
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
jest.autoMockOff();
|
|
2
|
-
const defineInlineTest = require(
|
|
3
|
-
const transform = require(
|
|
2
|
+
const defineInlineTest = require("jscodeshift/dist/testUtils").defineInlineTest;
|
|
3
|
+
const transform = require("../icon-name-substitution");
|
|
4
4
|
|
|
5
|
-
describe(
|
|
5
|
+
describe("icon-name-substitution codemod", () => {
|
|
6
6
|
function createTest(testName, input, output, options = {}) {
|
|
7
7
|
return defineInlineTest(
|
|
8
8
|
transform,
|
|
9
|
-
{parser:
|
|
9
|
+
{ parser: "flow", ...options },
|
|
10
10
|
input,
|
|
11
11
|
output,
|
|
12
12
|
testName
|
|
@@ -14,13 +14,13 @@ describe('icon-name-substitution codemod', () => {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
createTest(
|
|
17
|
-
|
|
17
|
+
"No changes for already-migrated icon names. Empty output due to returning null.",
|
|
18
18
|
`const IconMap = {ads: 'dollar-outline', draft: 'paper-solid'};`,
|
|
19
|
-
|
|
19
|
+
""
|
|
20
20
|
);
|
|
21
21
|
|
|
22
22
|
createTest(
|
|
23
|
-
|
|
23
|
+
"Simple replacements",
|
|
24
24
|
`const IconMap = {ads: 'ads', draft: 'drafts'}`,
|
|
25
25
|
`const IconMap = {ads: 'dollar-outline', draft: 'paper-solid'}`
|
|
26
26
|
);
|
|
@@ -32,7 +32,7 @@ describe('icon-name-substitution codemod', () => {
|
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
createTest(
|
|
35
|
-
|
|
35
|
+
"deprecatedIcons",
|
|
36
36
|
`const name = 'backtotop';`,
|
|
37
37
|
`const name = 'arrow-up-outline';`
|
|
38
38
|
);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
jest.autoMockOff();
|
|
2
|
-
const defineTest = require(
|
|
3
|
-
defineTest(__dirname,
|
|
2
|
+
const defineTest = require("jscodeshift/dist/testUtils").defineTest;
|
|
3
|
+
defineTest(__dirname, "migrate-2.x-to-3.x");
|
package/codemods/codemod-docs.js
CHANGED
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
|
|
4
4
|
// Reused arguments
|
|
5
5
|
const quote = {
|
|
6
|
-
default:
|
|
7
|
-
options:
|
|
6
|
+
default: "single",
|
|
7
|
+
options: "single|double",
|
|
8
8
|
description:
|
|
9
|
-
|
|
9
|
+
"What kind of quotation marks should be preferred when converting updated files back to JS?",
|
|
10
10
|
};
|
|
11
11
|
const parser = {
|
|
12
|
-
default:
|
|
13
|
-
options:
|
|
14
|
-
description:
|
|
12
|
+
default: "babel",
|
|
13
|
+
options: "babel|babylon|flow|ts|tsx",
|
|
14
|
+
description: "Which parser should be used to parse files to AST?",
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
module.exports = {
|
|
18
|
-
|
|
18
|
+
"icon-library": {
|
|
19
19
|
description:
|
|
20
|
-
|
|
20
|
+
"Assists in migrating Icon names and usages. Due to abstraction such as using variables and mappings to define icon names, the codemod cannot automatically migrate every icon name. To help you identify these cases, the codemod can add comments or shim component usages.",
|
|
21
21
|
example:
|
|
22
22
|
"racine-codemod icon-library src --parser=tsx --components=\"{IconButton:['name'],MessageMeta:['iconNameLeft','iconNameRight']}\" --shimComponent=IconShim --shimImportPath=src/components/IconShim --quote=double --addComments=false",
|
|
23
23
|
arguments: {
|
|
24
24
|
quote,
|
|
25
25
|
parser,
|
|
26
26
|
addComments: {
|
|
27
|
-
default:
|
|
28
|
-
options:
|
|
27
|
+
default: "true",
|
|
28
|
+
options: "true|false",
|
|
29
29
|
description:
|
|
30
30
|
'Should code comments be added when the codemod identifies a case that cannot be automatically migrated? Comments will include "icon-library" to help you locate and remediate them.',
|
|
31
31
|
},
|
|
@@ -34,27 +34,27 @@ module.exports = {
|
|
|
34
34
|
example:
|
|
35
35
|
"\"{IconButton:['name'],MessageMeta:['iconNameLeft','iconNameRight']}\"",
|
|
36
36
|
description:
|
|
37
|
-
|
|
37
|
+
"What additional component names + prop name combinations would you like the codemod to target for the migration? Wrap this argument in quotes.",
|
|
38
38
|
},
|
|
39
39
|
shimName: {
|
|
40
40
|
default: '""',
|
|
41
|
-
example:
|
|
41
|
+
example: "IconShim",
|
|
42
42
|
description:
|
|
43
43
|
"If you provide a shim component name, any Icon that has a variable for its `name` prop will be renamed to the shim component's name. You must create this component in your own codebase, it is not provided.",
|
|
44
44
|
},
|
|
45
45
|
shimImportPath: {
|
|
46
46
|
default: '""',
|
|
47
|
-
example:
|
|
47
|
+
example: "src/components/IconShim",
|
|
48
48
|
description:
|
|
49
49
|
'shimImportPath is the import path for your shim component (see "shimName") so that imports can be automatically when usages are added.',
|
|
50
50
|
},
|
|
51
51
|
},
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
"icon-name-substitution": {
|
|
54
54
|
description:
|
|
55
|
-
|
|
55
|
+
"Replaces string literals that are deprecated icon names with their updated names. Please note that this codemod will change any strings that happen to match a deprecated icon name, even if they are unrelated to icons, so we recommend running it against specific files (not your entire codebase) and carefully checking the results.",
|
|
56
56
|
example:
|
|
57
|
-
|
|
58
|
-
arguments: {quote, parser},
|
|
57
|
+
"racine-codemod icon-name-substitution src/constants.js --quote=double --parser=tsx",
|
|
58
|
+
arguments: { quote, parser },
|
|
59
59
|
},
|
|
60
60
|
};
|
package/codemods/icon-library.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// We need the deprecated icon name mapping so that we can migrate icons still
|
|
2
2
|
// using the ancient names all the way to the new names.
|
|
3
|
-
const deprecatedNames = require(
|
|
3
|
+
const deprecatedNames = require("./artifacts/deprecated-icon-map.json");
|
|
4
4
|
|
|
5
5
|
// Mapping from old icon names to new icon names
|
|
6
|
-
const IconMap = require(
|
|
6
|
+
const IconMap = require("./artifacts/icon-map.json");
|
|
7
7
|
|
|
8
8
|
// All the new icon names. Used to avoid attempting to migrate an icon name that has already been migrated.
|
|
9
9
|
const {
|
|
10
10
|
ExternalIconNames,
|
|
11
11
|
GeneralIconNames,
|
|
12
12
|
SproutIconNames,
|
|
13
|
-
} = require(
|
|
13
|
+
} = require("@sproutsocial/seeds-icons");
|
|
14
14
|
const newIconNames = [
|
|
15
15
|
...ExternalIconNames,
|
|
16
16
|
...GeneralIconNames,
|
|
@@ -37,7 +37,7 @@ const mapIconName = (currentName) => {
|
|
|
37
37
|
) {
|
|
38
38
|
return currentName;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return "";
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// Perform regex replacements with the raw file text
|
|
@@ -45,7 +45,7 @@ function replaceIconNames(file, firstRegex, secondRegex) {
|
|
|
45
45
|
let source = file.source;
|
|
46
46
|
firstRegex?.forEach((result) => {
|
|
47
47
|
// Extract just the icon name from the regex result
|
|
48
|
-
const iconName = result.match(/['"]([^'"]+)['"]/g)[0].replace(/['"]/g,
|
|
48
|
+
const iconName = result.match(/['"]([^'"]+)['"]/g)[0].replace(/['"]/g, "");
|
|
49
49
|
const mappedIcon = mapIconName(iconName);
|
|
50
50
|
if (mappedIcon) {
|
|
51
51
|
const replacement = result.replace(iconName, mappedIcon);
|
|
@@ -54,15 +54,15 @@ function replaceIconNames(file, firstRegex, secondRegex) {
|
|
|
54
54
|
});
|
|
55
55
|
secondRegex?.forEach((result) => {
|
|
56
56
|
// Extract just the icon name from the regex result
|
|
57
|
-
const iconName = result.replace(
|
|
57
|
+
const iconName = result.replace("ssiconsvg-", "").replace(/['"]/g, "");
|
|
58
58
|
const mappedIcon = mapIconName(iconName);
|
|
59
59
|
// Replace ssiconsvg with the correct sprite prefix.
|
|
60
60
|
const prefix = PartnerNames.includes(mappedIcon)
|
|
61
|
-
?
|
|
62
|
-
:
|
|
61
|
+
? "sslogosvg-"
|
|
62
|
+
: "seeds-svgs_";
|
|
63
63
|
if (mappedIcon) {
|
|
64
64
|
const replacement = result
|
|
65
|
-
.replace(
|
|
65
|
+
.replace("ssiconsvg-", prefix)
|
|
66
66
|
.replace(iconName, mappedIcon);
|
|
67
67
|
source = source.replace(result, replacement);
|
|
68
68
|
}
|
|
@@ -74,10 +74,10 @@ function replaceIconNames(file, firstRegex, secondRegex) {
|
|
|
74
74
|
// Users can pass in additional components in their codebase that accept icon names as props with "--components={componentName: [iconPropNames], ...}".
|
|
75
75
|
// A non-top-level prop example is the "iconName" prop nested under TokenInput's "tokens" prop. We can't fix those automatically.
|
|
76
76
|
const defaultComponents = {
|
|
77
|
-
Icon: [
|
|
78
|
-
|
|
79
|
-
Badge: [
|
|
80
|
-
TokenInput: [
|
|
77
|
+
Icon: ["name"],
|
|
78
|
+
"Icon.Toggle": ["activeName", "inactiveName"],
|
|
79
|
+
Badge: ["iconName"],
|
|
80
|
+
TokenInput: ["iconName"],
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
// We need to concatenate a few properties to get subcomponent names from AST (e.g., Icon.Toggle).
|
|
@@ -92,11 +92,11 @@ const getSubcomponentName = (element) => {
|
|
|
92
92
|
// Wrap each word in quotes and join it all together with commas, then wrap it in bracket and parse it from JSON.
|
|
93
93
|
const optionToObject = (components) => {
|
|
94
94
|
const withQuotesAndCommas = components
|
|
95
|
-
.join(
|
|
95
|
+
.join(",")
|
|
96
96
|
// (\w|\.) = letters or periods. Handles component names with periods in them such as subcomponents.
|
|
97
97
|
.replace(/((\w|\.)+)/g, '"$1"');
|
|
98
98
|
try {
|
|
99
|
-
return JSON.parse(
|
|
99
|
+
return JSON.parse("{" + withQuotesAndCommas + "}");
|
|
100
100
|
} catch (e) {
|
|
101
101
|
e.message = `
|
|
102
102
|
Failed to parse the components argument. Please verify that it is formatted correctly:
|
|
@@ -108,13 +108,13 @@ const optionToObject = (components) => {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
module.exports = function transformer(file, api, options) {
|
|
111
|
-
const quote = options?.quote ??
|
|
111
|
+
const quote = options?.quote ?? "single";
|
|
112
112
|
const components = options?.components
|
|
113
|
-
? {...defaultComponents, ...optionToObject(options.components)}
|
|
113
|
+
? { ...defaultComponents, ...optionToObject(options.components) }
|
|
114
114
|
: defaultComponents;
|
|
115
115
|
const addComments = options?.addComments ?? true;
|
|
116
|
-
const shimComponentName = options?.shimName ??
|
|
117
|
-
const shimComponentPath = options?.shimImportPath ??
|
|
116
|
+
const shimComponentName = options?.shimName ?? "";
|
|
117
|
+
const shimComponentPath = options?.shimImportPath ?? "";
|
|
118
118
|
const addShimComponent = !!shimComponentName;
|
|
119
119
|
|
|
120
120
|
let source = file.source;
|
|
@@ -163,9 +163,9 @@ module.exports = function transformer(file, api, options) {
|
|
|
163
163
|
if (
|
|
164
164
|
// file.path is undefined during test runs only
|
|
165
165
|
file.path &&
|
|
166
|
-
!file.path.endsWith(
|
|
167
|
-
!file.path.endsWith(
|
|
168
|
-
!file.path.endsWith(
|
|
166
|
+
!file.path.endsWith("js") &&
|
|
167
|
+
!file.path.endsWith("ts") &&
|
|
168
|
+
!file.path.endsWith("tsx")
|
|
169
169
|
) {
|
|
170
170
|
return hasModifications ? source : null;
|
|
171
171
|
}
|
|
@@ -175,17 +175,17 @@ module.exports = function transformer(file, api, options) {
|
|
|
175
175
|
const ast = j(source);
|
|
176
176
|
const icons = ast.find(j.JSXOpeningElement).filter((element) => {
|
|
177
177
|
let componentName = element.value.name.name;
|
|
178
|
-
if (element.value.name?.type ===
|
|
178
|
+
if (element.value.name?.type === "JSXMemberExpression") {
|
|
179
179
|
componentName = getSubcomponentName(element);
|
|
180
180
|
}
|
|
181
|
-
if (componentName ===
|
|
181
|
+
if (componentName === "Icon") {
|
|
182
182
|
iconCount += 1;
|
|
183
183
|
}
|
|
184
184
|
return components[componentName];
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
// Save comments at the top of the file if they exist. Otherwise, they may be deleted if we modify the first import.
|
|
188
|
-
const originalFirstNode = ast.find(j.Program).get(
|
|
188
|
+
const originalFirstNode = ast.find(j.Program).get("body", 0).node;
|
|
189
189
|
const originalFirstComments = originalFirstNode.comments;
|
|
190
190
|
|
|
191
191
|
icons.forEach((iconPath) => {
|
|
@@ -194,7 +194,7 @@ module.exports = function transformer(file, api, options) {
|
|
|
194
194
|
iconPath.value.name.name ?? getSubcomponentName(iconPath);
|
|
195
195
|
const nameProps = components[componentName];
|
|
196
196
|
attrs.forEach((path) => {
|
|
197
|
-
const {node} = path;
|
|
197
|
+
const { node } = path;
|
|
198
198
|
// nameProps is an array because some components accept icon names for multiple props
|
|
199
199
|
// (e.g., Icon.Toggle's activeName and inactiveName props)
|
|
200
200
|
if (nameProps.includes(node.name.name)) {
|
|
@@ -211,7 +211,7 @@ module.exports = function transformer(file, api, options) {
|
|
|
211
211
|
!unmigratedComponents.includes(componentName) &&
|
|
212
212
|
unmigratedComponents.push(componentName);
|
|
213
213
|
}
|
|
214
|
-
} else if (node.value.expression.type ===
|
|
214
|
+
} else if (node.value.expression.type === "ConditionalExpression") {
|
|
215
215
|
// Handle ternary statements (eg, `name={isActive ? 'like' : 'like-outline'}`)
|
|
216
216
|
const oldConsequent = node.value.expression.consequent?.value;
|
|
217
217
|
const oldAlternate = node.value.expression.alternate?.value;
|
|
@@ -233,7 +233,7 @@ module.exports = function transformer(file, api, options) {
|
|
|
233
233
|
}
|
|
234
234
|
} else {
|
|
235
235
|
// This case handles when the nameProp value is a variable.
|
|
236
|
-
if (componentName ===
|
|
236
|
+
if (componentName === "Icon" && addShimComponent) {
|
|
237
237
|
iconPath.node.name = shimComponentName;
|
|
238
238
|
shimmedCount += 1;
|
|
239
239
|
hasModifications = true;
|
|
@@ -251,13 +251,13 @@ module.exports = function transformer(file, api, options) {
|
|
|
251
251
|
// Add the shim import after the racine import
|
|
252
252
|
ast
|
|
253
253
|
.find(j.ImportDeclaration, {
|
|
254
|
-
source: {value:
|
|
254
|
+
source: { value: "@sproutsocial/racine" },
|
|
255
255
|
})
|
|
256
256
|
.filter((element) => {
|
|
257
257
|
// There may be multiple Racine import statements. Only change the one that imports Icon.
|
|
258
258
|
return element.node.specifiers
|
|
259
259
|
.map((specifier) => specifier.imported.name)
|
|
260
|
-
.includes(
|
|
260
|
+
.includes("Icon");
|
|
261
261
|
})
|
|
262
262
|
.insertAfter(
|
|
263
263
|
j.importDeclaration(
|
|
@@ -275,12 +275,12 @@ module.exports = function transformer(file, api, options) {
|
|
|
275
275
|
if (shimmedCount === iconCount && !hasOtherIconUsages) {
|
|
276
276
|
ast
|
|
277
277
|
.find(j.ImportDeclaration, {
|
|
278
|
-
source: {value:
|
|
278
|
+
source: { value: "@sproutsocial/racine" },
|
|
279
279
|
})
|
|
280
280
|
.replaceWith((path) => {
|
|
281
281
|
// Remove "Icon" from the imported items
|
|
282
282
|
const importedItems = path.node.specifiers.filter(
|
|
283
|
-
(specifier) => specifier.imported.name !==
|
|
283
|
+
(specifier) => specifier.imported.name !== "Icon"
|
|
284
284
|
);
|
|
285
285
|
|
|
286
286
|
// If Icon was the only item being imported from Racine, delete the import statement.
|
|
@@ -299,7 +299,7 @@ module.exports = function transformer(file, api, options) {
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
// If the first node has been modified or deleted, reattach the comments to the new first node.
|
|
302
|
-
const newFirstNode = ast.find(j.Program).get(
|
|
302
|
+
const newFirstNode = ast.find(j.Program).get("body", 0).node;
|
|
303
303
|
if (newFirstNode !== originalFirstNode) {
|
|
304
304
|
newFirstNode.comments = originalFirstComments;
|
|
305
305
|
}
|
|
@@ -307,7 +307,7 @@ module.exports = function transformer(file, api, options) {
|
|
|
307
307
|
if (addComments && unmigratedCount > 0) {
|
|
308
308
|
const comment = j.commentBlock(
|
|
309
309
|
`TODO (icon-library codemod): Please manually migrate icon names passed to ${unmigratedCount} component(s) in this file.
|
|
310
|
-
Look for usages of these components: ${unmigratedComponents.join(
|
|
310
|
+
Look for usages of these components: ${unmigratedComponents.join(", ")}`
|
|
311
311
|
);
|
|
312
312
|
// Add this comment after any comments on the first node.
|
|
313
313
|
newFirstNode.comments = newFirstNode.comments
|
|
@@ -316,5 +316,5 @@ module.exports = function transformer(file, api, options) {
|
|
|
316
316
|
hasModifications = true;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
return hasModifications ? ast.toSource({quote}) : null;
|
|
319
|
+
return hasModifications ? ast.toSource({ quote }) : null;
|
|
320
320
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// We need the deprecated icon name mapping so that we can migrate icons still
|
|
2
2
|
// using the ancient names all the way to the new names.
|
|
3
|
-
const deprecatedNames = require(
|
|
3
|
+
const deprecatedNames = require("./artifacts/deprecated-icon-map.json");
|
|
4
4
|
|
|
5
5
|
// Mapping from old icon names to new icon names
|
|
6
|
-
const IconMap = require(
|
|
6
|
+
const IconMap = require("./artifacts/icon-map.json");
|
|
7
7
|
|
|
8
8
|
// Map the current icon name to the new icon name
|
|
9
9
|
const mapIconName = (currentName) => {
|
|
@@ -14,11 +14,11 @@ const mapIconName = (currentName) => {
|
|
|
14
14
|
if (IconMap[deprecatedNames[currentName]]) {
|
|
15
15
|
return IconMap[deprecatedNames[currentName]];
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return "";
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
module.exports = function transformer(file, api, options) {
|
|
21
|
-
const quote = options?.quote ??
|
|
21
|
+
const quote = options?.quote ?? "single";
|
|
22
22
|
const j = api.jscodeshift;
|
|
23
23
|
const ast = j(file.source);
|
|
24
24
|
let hasModifications = false;
|
|
@@ -38,5 +38,5 @@ module.exports = function transformer(file, api, options) {
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
return hasModifications ? ast.toSource({quote}) : null;
|
|
41
|
+
return hasModifications ? ast.toSource({ quote }) : null;
|
|
42
42
|
};
|