@sproutsocial/racine 20.0.0 → 20.1.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 +22 -0
- package/README.md +5 -5
- package/__flow__/Avatar/Avatar.flow.js +1 -0
- package/__flow__/Avatar/constants.flow.js +11 -0
- package/__flow__/Avatar/index.flow.js +2 -1
- package/__flow__/Menu/Menu.flow.js +3 -0
- package/__flow__/Popout/Popout.flow.js +5 -0
- package/__flow__/types/theme.colors.flow.js +14 -0
- package/commonjs/Avatar/Avatar.flow.js +1 -1
- package/commonjs/Avatar/Avatar.js +54 -30
- package/commonjs/Avatar/constants.flow.js +17 -0
- package/commonjs/Avatar/constants.js +17 -0
- package/commonjs/Avatar/index.flow.js +12 -1
- package/commonjs/Avatar/index.js +9 -1
- package/commonjs/Badge/Badge.flow.js +1 -1
- package/commonjs/Badge/Badge.js +1 -1
- package/commonjs/Banner/Banner.flow.js +1 -1
- package/commonjs/Banner/Banner.js +1 -1
- package/commonjs/Banner/styles.js +1 -1
- package/commonjs/Box/Box.flow.js +1 -1
- package/commonjs/Box/Box.js +1 -1
- package/commonjs/Breadcrumb/Breadcrumb.flow.js +1 -1
- package/commonjs/Breadcrumb/Breadcrumb.js +3 -3
- package/commonjs/Button/Button.flow.js +1 -1
- package/commonjs/Button/styles.js +1 -1
- package/commonjs/Card/Card.flow.js +1 -1
- package/commonjs/Card/Card.js +3 -3
- package/commonjs/Card/CardTypes.flow.js +1 -1
- package/commonjs/Card/subComponents.js +1 -1
- package/commonjs/Card/utils.js +1 -1
- package/commonjs/CharacterCounter/CharacterCounter.flow.js +1 -1
- package/commonjs/CharacterCounter/CharacterCounter.js +1 -1
- package/commonjs/CharacterCounter/styles.js +1 -1
- package/commonjs/ChartLegend/ChartLegend.flow.js +1 -1
- package/commonjs/ChartLegend/ChartLegend.js +1 -1
- package/commonjs/ChartLegend/styles.js +1 -1
- package/commonjs/Checkbox/Checkbox.flow.js +1 -1
- package/commonjs/Checkbox/Checkbox.js +1 -1
- package/commonjs/Checkbox/styles.js +1 -1
- package/commonjs/Collapsible/Collapsible.flow.js +1 -1
- package/commonjs/Collapsible/Collapsible.js +5 -5
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.flow.js +1 -1
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +3 -3
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +1 -1
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.js +3 -3
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +1 -1
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.js +3 -3
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +1 -1
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +3 -3
- package/commonjs/DatePicker/index.flow.js +1 -1
- package/commonjs/DatePicker/styles.js +1 -1
- package/commonjs/Drawer/Drawer.flow.js +1 -1
- package/commonjs/Drawer/Drawer.js +4 -4
- package/commonjs/Drawer/SlideTransition.js +1 -1
- package/commonjs/Drawer/styles.js +1 -1
- package/commonjs/EmptyState/EmptyState.flow.js +1 -1
- package/commonjs/EmptyState/EmptyState.js +2 -2
- package/commonjs/Fieldset/Fieldset.flow.js +1 -1
- package/commonjs/Fieldset/Fieldset.js +2 -2
- package/commonjs/Fieldset/styles.js +1 -1
- package/commonjs/FormField/FormField.flow.js +1 -1
- package/commonjs/FormField/FormField.js +3 -3
- package/commonjs/Icon/Icon.flow.js +1 -1
- package/commonjs/Icon/Icon.js +3 -3
- package/commonjs/Icon/index.flow.js +1 -1
- package/commonjs/Icon/styles.js +1 -1
- package/commonjs/Image/Image.flow.js +1 -1
- package/commonjs/Image/Image.js +1 -1
- package/commonjs/Image/styles.js +1 -1
- package/commonjs/Indicator/Indicator.flow.js +1 -1
- package/commonjs/Indicator/Indicator.js +1 -1
- package/commonjs/Input/Input.flow.js +1 -1
- package/commonjs/Input/Input.js +8 -4
- package/commonjs/Input/styles.js +1 -1
- package/commonjs/KeyboardKey/KeyboardKey.flow.js +1 -1
- package/commonjs/KeyboardKey/KeyboardKey.js +1 -1
- package/commonjs/Label/Label.flow.js +1 -1
- package/commonjs/Label/Label.js +1 -1
- package/commonjs/Link/Link.flow.js +1 -1
- package/commonjs/Link/Link.js +1 -1
- package/commonjs/Link/styles.js +1 -1
- package/commonjs/Listbox/Listbox.flow.js +1 -1
- package/commonjs/Listbox/Listbox.js +3 -3
- package/commonjs/Listbox/index.js +1 -1
- package/commonjs/Loader/Loader.flow.js +1 -1
- package/commonjs/Loader/Loader.js +1 -1
- package/commonjs/Loader/styles.js +1 -1
- package/commonjs/LoaderButton/LoaderButton.flow.js +1 -1
- package/commonjs/LoaderButton/LoaderButton.js +4 -5
- package/commonjs/Menu/Menu.flow.js +1 -1
- package/commonjs/Menu/Menu.js +51 -30
- package/commonjs/Menu/index.js +1 -1
- package/commonjs/Menu/styles.js +1 -1
- package/commonjs/Menu/utils/descendants.js +12 -6
- package/commonjs/Menu/utils/hooks.js +8 -2
- package/commonjs/Menu/utils/index.js +0 -11
- package/commonjs/Message/Message.flow.js +1 -1
- package/commonjs/Message/Message.js +1 -1
- package/commonjs/Modal/Modal.flow.js +1 -1
- package/commonjs/Modal/Modal.js +1 -1
- package/commonjs/Modal/styles.js +1 -1
- package/commonjs/Numeral/Numeral.flow.js +1 -1
- package/commonjs/Numeral/Numeral.js +3 -3
- package/commonjs/PartnerLogo/PartnerLogo.flow.js +1 -1
- package/commonjs/PartnerLogo/styles.js +1 -1
- package/commonjs/Popout/Popout.flow.js +1 -1
- package/commonjs/Popout/Popout.js +15 -10
- package/commonjs/Portal/Portal.flow.js +1 -1
- package/commonjs/Portal/Portal.js +1 -1
- package/commonjs/Radio/Radio.flow.js +1 -1
- package/commonjs/Radio/Radio.js +1 -1
- package/commonjs/Radio/styles.js +1 -1
- package/commonjs/SegmentedControl/SegmentedControl.flow.js +1 -1
- package/commonjs/SegmentedControl/SegmentedControl.js +3 -3
- package/commonjs/SegmentedControl/styles.js +1 -1
- package/commonjs/Select/Select.flow.js +1 -1
- package/commonjs/Select/Select.js +1 -1
- package/commonjs/Select/styles.js +1 -1
- package/commonjs/SpotIllustration/SpotIllustration.flow.js +1 -1
- package/commonjs/SpotIllustration/SpotIllustration.js +2 -2
- package/commonjs/Stack/Stack.flow.js +1 -1
- package/commonjs/Stack/Stack.js +1 -1
- package/commonjs/StatefulStory.js +8 -2
- package/commonjs/Switch/Switch.flow.js +1 -1
- package/commonjs/Switch/Switch.js +1 -1
- package/commonjs/Switch/styles.js +1 -1
- package/commonjs/Table/Table.flow.js +1 -1
- package/commonjs/Table/Table.js +1 -1
- package/commonjs/TableCell/TableCell.flow.js +1 -1
- package/commonjs/TableCell/TableCell.js +1 -1
- package/commonjs/TableHeaderCell/TableHeaderCell.flow.js +1 -1
- package/commonjs/TableHeaderCell/TableHeaderCell.js +2 -1
- package/commonjs/TableHeaderCell/styles.js +1 -1
- package/commonjs/TableRowAccordion/TableRowAccordion.flow.js +1 -1
- package/commonjs/TableRowAccordion/TableRowAccordion.js +1 -1
- package/commonjs/TableRowAccordion/styles.js +1 -1
- package/commonjs/Tabs/Tabs.flow.js +1 -1
- package/commonjs/Tabs/Tabs.js +4 -4
- package/commonjs/Tabs/styles.js +1 -1
- package/commonjs/Text/Text.flow.js +1 -1
- package/commonjs/Text/Text.js +1 -1
- package/commonjs/Text/styles.js +1 -1
- package/commonjs/Textarea/Textarea.flow.js +1 -1
- package/commonjs/Textarea/Textarea.js +5 -2
- package/commonjs/Textarea/styles.js +1 -1
- package/commonjs/ThemeProvider/index.flow.js +1 -1
- package/commonjs/ThemeProvider/index.js +3 -1
- package/commonjs/Toast/Toast.flow.js +1 -1
- package/commonjs/Toast/Toast.js +1 -1
- package/commonjs/Toast/index.js +1 -1
- package/commonjs/Toast/styles.js +1 -2
- package/commonjs/ToggleHint/ToggleHint.flow.js +1 -1
- package/commonjs/ToggleHint/ToggleHint.js +1 -1
- package/commonjs/ToggleHint/styles.js +1 -1
- package/commonjs/Token/Token.flow.js +1 -1
- package/commonjs/Token/Token.js +1 -1
- package/commonjs/Token/index.js +1 -1
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/TokenInput.flow.js +1 -1
- package/commonjs/TokenInput/TokenInput.js +4 -4
- package/commonjs/TokenInput/TokenScreenReaderStatus.js +4 -4
- package/commonjs/TokenInput/styles.js +1 -1
- package/commonjs/Tooltip/Tooltip.flow.js +1 -1
- package/commonjs/Tooltip/Tooltip.js +114 -44
- package/commonjs/VisuallyHidden/VisuallyHidden.flow.js +1 -1
- package/commonjs/index.flow.js +1 -1
- package/commonjs/systemProps/background.flow.js +1 -0
- package/commonjs/systemProps/border.flow.js +1 -0
- package/commonjs/systemProps/color.flow.js +1 -0
- package/commonjs/systemProps/custom.flow.js +1 -0
- package/commonjs/systemProps/flexbox.flow.js +1 -0
- package/commonjs/systemProps/grid.flow.js +1 -0
- package/commonjs/systemProps/index.js +2 -0
- package/commonjs/systemProps/layout.flow.js +1 -0
- package/commonjs/systemProps/position.flow.js +1 -0
- package/commonjs/systemProps/shadow.flow.js +1 -0
- package/commonjs/systemProps/space.flow.js +16 -1
- package/commonjs/systemProps/typography.flow.js +1 -0
- package/commonjs/systemProps/variant.flow.js +1 -0
- package/commonjs/themes/dark/theme.js +19 -4
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +5 -4
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +5 -4
- package/commonjs/themes/light/theme.js +19 -4
- package/commonjs/types/shared.flow.js +1 -1
- package/commonjs/types/styled-components.flow.js +1 -1
- package/commonjs/utils/a11yTest.js +14 -16
- package/commonjs/utils/dataQaLabelQueries.js +2 -2
- package/commonjs/utils/hooks.flow.js +4 -2
- package/commonjs/utils/hooks.js +5 -5
- package/commonjs/utils/index.js +1 -1
- package/commonjs/utils/innerText.flow.js +1 -1
- package/commonjs/utils/react-testing-library.flow.js +1 -1
- package/commonjs/utils/react-testing-library.js +15 -13
- package/commonjs/utils/responsiveProps/index.js +2 -2
- package/commonjs/utils/system-props/system-props.js +1 -1
- package/commonjs/utils/use-measure.js +2 -2
- package/dist/themes/dark/theme.scss +13 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +13 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +13 -0
- package/dist/themes/light/theme.scss +13 -0
- package/dist/types/Avatar/Avatar.d.ts +4 -3
- package/dist/types/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/Avatar/AvatarTypes.d.ts +5 -2
- package/dist/types/Avatar/AvatarTypes.d.ts.map +1 -1
- package/dist/types/Avatar/constants.d.ts +11 -0
- package/dist/types/Avatar/constants.d.ts.map +1 -0
- package/dist/types/Avatar/index.d.ts +1 -0
- package/dist/types/Avatar/index.d.ts.map +1 -1
- package/dist/types/Badge/Badge.d.ts +2 -2
- package/dist/types/Badge/Badge.d.ts.map +1 -1
- package/dist/types/Badge/BadgeTypes.d.ts +1 -1
- package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
- package/dist/types/Banner/Banner.d.ts +2 -2
- package/dist/types/Banner/Banner.d.ts.map +1 -1
- package/dist/types/Banner/BannerTypes.d.ts +1 -1
- package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
- package/dist/types/Banner/styles.d.ts +3 -3
- package/dist/types/Banner/styles.d.ts.map +1 -1
- package/dist/types/Breadcrumb/Breadcrumb.d.ts +3 -3
- package/dist/types/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/Button/Button.d.ts +2 -2
- package/dist/types/Button/Button.d.ts.map +1 -1
- package/dist/types/Button/ButtonTypes.d.ts +1 -1
- package/dist/types/Button/ButtonTypes.d.ts.map +1 -1
- package/dist/types/Card/Card.d.ts +2 -2
- package/dist/types/Card/Card.d.ts.map +1 -1
- package/dist/types/Card/CardTypes.d.ts +5 -5
- package/dist/types/Card/CardTypes.d.ts.map +1 -1
- package/dist/types/Card/styles.d.ts +4 -4
- package/dist/types/Card/subComponents.d.ts +6 -6
- package/dist/types/Card/subComponents.d.ts.map +1 -1
- package/dist/types/CharacterCounter/CharacterCounter.d.ts +1 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts +2 -2
- package/dist/types/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts +1 -1
- package/dist/types/ChartLegend/ChartLegendTypes.d.ts.map +1 -1
- package/dist/types/ChartLegend/useChartLabels.d.ts +2 -2
- package/dist/types/ChartLegend/useChartLabels.d.ts.map +1 -1
- package/dist/types/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/Checkbox/styles.d.ts +3 -3
- package/dist/types/Collapsible/Collapsible.d.ts +4 -4
- package/dist/types/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts +2 -2
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts +2 -2
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/common.d.ts +3 -3
- package/dist/types/DatePicker/common.d.ts.map +1 -1
- package/dist/types/Drawer/Drawer.d.ts +2 -2
- package/dist/types/Drawer/SlideTransition.d.ts +2 -2
- package/dist/types/Drawer/SlideTransition.d.ts.map +1 -1
- package/dist/types/EmptyState/EmptyState.d.ts +2 -2
- package/dist/types/EmptyState/EmptyState.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/EnumLogoNames.d.ts +1 -1
- package/dist/types/EnumLogoNames.d.ts.map +1 -1
- package/dist/types/Fieldset/Fieldset.d.ts +4 -4
- package/dist/types/Fieldset/Fieldset.d.ts.map +1 -1
- package/dist/types/FormField/FormField.d.ts +2 -2
- package/dist/types/FormField/FormField.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts +3 -3
- package/dist/types/Icon/Icon.d.ts.map +1 -1
- package/dist/types/Icon/IconTypes.d.ts +2 -2
- package/dist/types/Icon/IconTypes.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/Indicator/Indicator.d.ts +1 -1
- package/dist/types/Input/Input.d.ts +2 -2
- package/dist/types/KeyboardKey/KeyboardKey.d.ts +1 -1
- package/dist/types/Label/Label.d.ts +1 -1
- package/dist/types/Link/Link.d.ts +2 -2
- package/dist/types/Link/Link.d.ts.map +1 -1
- package/dist/types/Link/styles.d.ts +1 -1
- package/dist/types/Listbox/Listbox.d.ts +11 -11
- package/dist/types/Listbox/Listbox.d.ts.map +1 -1
- package/dist/types/Loader/Loader.d.ts +1 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts +2 -2
- package/dist/types/LoaderButton/LoaderButton.d.ts.map +1 -1
- package/dist/types/Menu/Menu.d.ts +14 -14
- package/dist/types/Menu/Menu.d.ts.map +1 -1
- package/dist/types/Menu/MenuTypes.d.ts +4 -2
- package/dist/types/Menu/MenuTypes.d.ts.map +1 -1
- package/dist/types/Menu/utils/descendants.d.ts +3 -3
- 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 +0 -1
- package/dist/types/Menu/utils/index.d.ts.map +1 -1
- package/dist/types/Message/Message.d.ts +8 -8
- package/dist/types/Message/MessageTypes.d.ts +2 -2
- package/dist/types/Message/MessageTypes.d.ts.map +1 -1
- package/dist/types/Modal/Modal.d.ts +4 -4
- package/dist/types/Modal/styles.d.ts +1 -1
- package/dist/types/Modal/styles.d.ts.map +1 -1
- package/dist/types/Numeral/Numeral.d.ts +2 -2
- package/dist/types/Numeral/Numeral.d.ts.map +1 -1
- package/dist/types/Numeral/NumeralTypes.d.ts +1 -1
- package/dist/types/Numeral/NumeralTypes.d.ts.map +1 -1
- package/dist/types/Numeral/styles.d.ts +2 -2
- package/dist/types/PartnerLogo/PartnerLogo.d.ts +2 -2
- package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +3 -3
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- 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 +5 -1
- package/dist/types/Popout/PopoutTypes.d.ts.map +1 -1
- package/dist/types/Radio/Radio.d.ts +1 -1
- package/dist/types/Radio/styles.d.ts +1 -1
- package/dist/types/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/types/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/SegmentedControl/styles.d.ts +1 -1
- package/dist/types/Select/Select.d.ts +1 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts +2 -2
- package/dist/types/SpotIllustration/SpotIllustration.d.ts.map +1 -1
- package/dist/types/Stack/Stack.d.ts +2 -2
- package/dist/types/Stack/Stack.d.ts.map +1 -1
- package/dist/types/Stack/StackTypes.d.ts +3 -3
- package/dist/types/Stack/StackTypes.d.ts.map +1 -1
- package/dist/types/Switch/Switch.d.ts +2 -2
- package/dist/types/Switch/Switch.d.ts.map +1 -1
- package/dist/types/Table/Table.d.ts +8 -8
- package/dist/types/Table/Table.d.ts.map +1 -1
- package/dist/types/TableCell/TableCell.d.ts +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts +2 -2
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCellTypes.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts +1 -1
- package/dist/types/Tabs/Tabs.d.ts +2 -2
- package/dist/types/Tabs/Tabs.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 +2 -2
- package/dist/types/Text/Text.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 +1 -1
- package/dist/types/Textarea/TextareaTypes.d.ts.map +1 -1
- package/dist/types/ThemeProvider/index.d.ts +3 -3
- package/dist/types/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/Toast/Toast.d.ts +2 -2
- package/dist/types/Toast/Toast.d.ts.map +1 -1
- package/dist/types/Toast/ToastTypes.d.ts +1 -1
- package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +2 -2
- package/dist/types/ToggleHint/ToggleHint.d.ts +2 -2
- package/dist/types/ToggleHint/ToggleHint.d.ts.map +1 -1
- package/dist/types/Token/Token.d.ts +2 -2
- package/dist/types/Token/Token.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/Tooltip/Tooltip.d.ts +2 -2
- package/dist/types/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/Tooltip/TooltipTypes.d.ts +2 -0
- package/dist/types/Tooltip/TooltipTypes.d.ts.map +1 -1
- package/dist/types/themes/dark/theme.d.ts +13 -0
- package/dist/types/themes/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/light/theme.d.ts +14 -1
- package/dist/types/themes/light/theme.d.ts.map +1 -1
- package/dist/types/types/shared.d.ts +3 -3
- package/dist/types/types/shared.d.ts.map +1 -1
- package/dist/types/types/system-props.d.ts +3 -3
- package/dist/types/types/system-props.d.ts.map +1 -1
- package/dist/types/types/theme.colors.d.ts +28 -15
- package/dist/types/types/theme.colors.d.ts.map +1 -1
- package/dist/types/types/theme.d.ts +13 -13
- package/dist/types/types/theme.d.ts.map +1 -1
- package/dist/types/utils/dataQaLabelQueries.d.ts +2 -2
- package/dist/types/utils/dataQaLabelQueries.d.ts.map +1 -1
- package/dist/types/utils/hooks.d.ts +6 -6
- 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/react-testing-library.d.ts +3 -123
- package/dist/types/utils/react-testing-library.d.ts.map +1 -1
- package/lib/Avatar/Avatar.js +51 -28
- package/lib/Avatar/constants.flow.js +10 -0
- package/lib/Avatar/constants.js +10 -0
- package/lib/Avatar/index.flow.js +2 -1
- package/lib/Avatar/index.js +2 -1
- package/lib/Breadcrumb/Breadcrumb.js +3 -3
- package/lib/Card/Card.js +2 -2
- package/lib/Card/utils.js +1 -1
- package/lib/CharacterCounter/CharacterCounter.js +1 -1
- package/lib/Checkbox/Checkbox.js +1 -1
- package/lib/Collapsible/Collapsible.js +5 -5
- package/lib/DatePicker/DateRangePicker/DateRangePicker.js +2 -2
- package/lib/DatePicker/DateRangePicker/StatefulDateRangePicker.js +2 -2
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.js +2 -2
- package/lib/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +2 -2
- package/lib/Drawer/Drawer.js +3 -3
- package/lib/FormField/FormField.js +2 -2
- package/lib/Icon/Icon.flow.js +3 -1
- package/lib/Icon/Icon.js +3 -3
- package/lib/Image/Image.js +1 -1
- package/lib/Indicator/Indicator.js +1 -1
- package/lib/Input/Input.js +9 -4
- package/lib/KeyboardKey/KeyboardKey.js +1 -1
- package/lib/Label/Label.js +1 -1
- package/lib/Listbox/Listbox.js +3 -3
- package/lib/Loader/Loader.js +1 -1
- package/lib/LoaderButton/LoaderButton.js +3 -4
- package/lib/Menu/Menu.js +51 -30
- package/lib/Menu/utils/descendants.js +5 -5
- package/lib/Menu/utils/hooks.js +8 -2
- package/lib/Menu/utils/index.js +1 -2
- package/lib/Numeral/Numeral.js +2 -2
- package/lib/PartnerLogo/PartnerLogo.flow.js +5 -1
- package/lib/Popout/Popout.flow.js +3 -1
- package/lib/Popout/Popout.js +15 -10
- package/lib/Portal/Portal.js +1 -1
- package/lib/Radio/Radio.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.js +2 -2
- package/lib/Select/Select.js +1 -1
- package/lib/StatefulStory.js +2 -2
- package/lib/TableCell/TableCell.flow.js +5 -1
- package/lib/TableCell/TableCell.js +1 -1
- package/lib/TableHeaderCell/TableHeaderCell.js +2 -1
- package/lib/TableRowAccordion/TableRowAccordion.js +1 -1
- package/lib/Tabs/Tabs.js +4 -4
- package/lib/Textarea/Textarea.js +5 -1
- package/lib/ThemeProvider/index.flow.js +3 -1
- package/lib/ThemeProvider/index.js +3 -0
- package/lib/ToggleHint/ToggleHint.js +1 -1
- package/lib/TokenInput/TokenInput.js +4 -4
- package/lib/TokenInput/TokenScreenReaderStatus.js +2 -2
- package/lib/Tooltip/Tooltip.js +114 -44
- package/lib/systemProps/background.flow.js +3 -0
- package/lib/systemProps/border.flow.js +3 -0
- package/lib/systemProps/color.flow.js +3 -0
- package/lib/systemProps/custom.flow.js +3 -0
- package/lib/systemProps/flexbox.flow.js +3 -0
- package/lib/systemProps/grid.flow.js +3 -0
- package/lib/systemProps/index.js +7 -1
- package/lib/systemProps/layout.flow.js +3 -0
- package/lib/systemProps/position.flow.js +3 -0
- package/lib/systemProps/shadow.flow.js +3 -0
- package/lib/systemProps/space.flow.js +16 -0
- package/lib/systemProps/typography.flow.js +3 -0
- package/lib/systemProps/variant.flow.js +3 -0
- package/lib/themes/dark/theme.js +16 -3
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +3 -3
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +3 -3
- package/lib/themes/light/theme.js +16 -4
- package/lib/utils/a11yTest.js +13 -15
- package/lib/utils/dataQaLabelQueries.js +2 -2
- package/lib/utils/hooks.flow.js +2 -3
- package/lib/utils/hooks.js +5 -5
- package/lib/utils/index.js +1 -1
- package/lib/utils/react-testing-library.js +15 -13
- package/lib/utils/responsiveProps/index.js +2 -2
- package/lib/utils/use-measure.js +2 -2
- package/package.json +47 -42
- package/commonjs/Menu/utils/names.js +0 -8
- package/dist/types/Menu/utils/names.d.ts +0 -2
- package/dist/types/Menu/utils/names.d.ts.map +0 -1
- package/lib/Menu/utils/names.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 20.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1a52bdb4: Adds footerContent prop to Menu/Listbox to improve keyboard accessibility
|
|
8
|
+
- Currently, the `children` prop is the only way to pass content to be rendered inside a Menu. Menu implicitly expects the only interactive elements in `children` to be `Menu.Item`s. When interactive, non-`Menu.Item` content is included in `children`, it will not be accessible to keyboard users, because any keydown events will be applied to the active `Menu.Item`s instead.
|
|
9
|
+
- The new `footerContent` prop allows content that should be shown below the Menu Items to be passed and focused separately. When the focus is on the footer, `Menu.Item` keyboard events will be suppressed, allowing interaction with the `footerContent`.
|
|
10
|
+
- Listbox is a variant of Menu, so the explanation and changes described apply equally to Listbox.
|
|
11
|
+
- cfab3798: - Avatar now accepts `type="auto"` to automatically and randomly apply a background color
|
|
12
|
+
- Deprecated `variant` prop. Avatar now handles darkmode automatically
|
|
13
|
+
- A border is now applied by default to Avatars that have not been given an image
|
|
14
|
+
- Fixed a bug where the `color` prop was needlessly appending 'px' to color values
|
|
15
|
+
- fd96bb33: The Tooltip component has undergone several updates with a focus on accessibility
|
|
16
|
+
- The tooltip component now keeps the tooltip open when the mouse hovers over the tooltip content. Previously, the tooltip would close as soon as the mouse left the tooltip trigger.
|
|
17
|
+
- The tooltip component now closes when the user presses the escape key on the keyboard.
|
|
18
|
+
- The tooltip content now has the `role='tooltip'` attribute, improving accessibility.
|
|
19
|
+
- `Tooltip` and subsequently `Popout` component no longer propagate `id` throughout all of their children
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 2167e323: - Changed the manner in which we were handling a transparent color on LoaderButton from using the polishedjs rgba() to hexadecimal.
|
|
24
|
+
|
|
3
25
|
## 20.0.0
|
|
4
26
|
|
|
5
27
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ $ yarn start
|
|
|
124
124
|
/* ~/YourCodeFolder/web-app-core/YourFile.js */
|
|
125
125
|
import {Icon} from '@sproutsocial/racine';
|
|
126
126
|
// ...
|
|
127
|
-
<Icon name="
|
|
127
|
+
<Icon name="pencil-outline" />;
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
4. **When you are done, be sure to unlink Racine so you are using the app's version of the package**
|
|
@@ -179,7 +179,7 @@ Cut a feature branch off `dev` and start coding! As updates are merged into `dev
|
|
|
179
179
|
|
|
180
180
|
_Need to make an urgent update? Branch off `main` instead of dev, and open your PR later against `main`. We consider this a hotfix and only support it for critical time-sensitive updates, so check with the Design Systems team prior to making this kind of contribution._
|
|
181
181
|
|
|
182
|
-
We use a [visual regression testing](https://racine.netlify.app/?path=/story/welcome-visual-regression-testing--page) suite to capture any unintended changes during development.
|
|
182
|
+
We use a [visual regression testing](https://racine.netlify.app/?path=/story/welcome-visual-regression-testing--page) suite to capture any unintended changes during development. After running `yarn build` you can run the suite locally with `yarn backstop-test`, which will open a report in your browser to show you what passed and what failed. If any fails are actually intentional visual changes you can run `yarn backstop-approve` to approve those changes as new reference images and include them in your PR.
|
|
183
183
|
|
|
184
184
|
As you develop you'll want to track the scope of the changes you make. Racine supports this with a tool called [changesets](https://github.com/atlassian/changesets) to automatically pick new version numbers and update the changelog whenever we publish a new version of the package.
|
|
185
185
|
|
|
@@ -193,7 +193,7 @@ When running this command, you will be asked to select whether your change is a
|
|
|
193
193
|
- **minor** changes are for new features or improvements, and they bump the middle digit in the version number (`x.0.x`)
|
|
194
194
|
- **major** changes are _breaking changes_, and they bump the first digit (`0.x.x`). These types of changes are rare and should be coordinated in advance with the Design Systems team.
|
|
195
195
|
|
|
196
|
-
The changeset CLI will also ask you to input a message detailing your changes. The completion of the command will generate a new changeset markdown file. You are more than welcome to edit this file after it has been generated, so don't get hung up on trying to write the perfect text from the command line. Aim to make the text of the changeset file(s) as descriptive and informative as possible, as they will be used to build a changelog file when the new version is released.
|
|
196
|
+
The changeset CLI will also ask you to input a message detailing your changes. The completion of the command will generate a new changeset markdown file. You are more than welcome to edit this file after it has been generated, so don't get hung up on trying to write the perfect text from the command line. Aim to make the text of the changeset file(s) as descriptive and informative as possible, as they will be used to build a changelog file when the new version is released. Check out our documentation for the [Seeds Release Process](https://sprout.atlassian.net/wiki/spaces/SEEDS/pages/3522756609/DS+Seeds+Release+Process#Changesets) for examples of what makes a good or bad changeset.
|
|
197
197
|
|
|
198
198
|
**You can add as many changesets to a PR as you would like.** If your PR makes several distinct changes to Racine, you should create a changeset detailing each one individually.
|
|
199
199
|
|
|
@@ -207,7 +207,7 @@ Once you're ready to submit your changes for review, open a PR against the `dev`
|
|
|
207
207
|
- Netlify will create a preview deploy of Racine's Storybook and include a link to it in a comment on the PR so you can see your changes and share them with others.
|
|
208
208
|
- A Racine package snapshot including your changes will be published to Artifactory and included in a comment on the PR so you can install it locally or in a web app PR/snapshot in order to test your changes.
|
|
209
209
|
|
|
210
|
-
You may be asked to make changes to match Racine's contribution guidelines, so expect to keep attention on your PR for a little bit. Once your tests are passing and you have at least one approving Design Systems review, a member of the Design Systems team will merge your changes for inclusion in a future release of Racine!
|
|
210
|
+
You may be asked to make changes to match Racine's contribution guidelines, so expect to keep attention on your PR for a little bit. Once your tests are passing and you have at least one approving Design Systems review, a member of the Design Systems team will merge your changes for inclusion in a future release of Racine! Please **do NOT** merge your own PR unless expressly told to, since commits to `dev` end up in the next release, and the Design Systems team needs to make sure they have the bandwidth to validate any contribution before it releases.
|
|
211
211
|
|
|
212
212
|
### **☁️ Step 5: Changes get published to Artifactory**
|
|
213
213
|
|
|
@@ -217,4 +217,4 @@ When the PR is merged, [GitHub will kick off a publish of the new version](https
|
|
|
217
217
|
|
|
218
218
|
### **✍ Step 6: Document your changes**
|
|
219
219
|
|
|
220
|
-
Racine components are documented in [Seeds](https://sproutsocial.com/seeds/components), Sprout's design system. You can open a PR to the [Seeds repository](https://github.com/sproutsocial/seeds) to add or edit component documentation.
|
|
220
|
+
Racine components are documented in [Seeds](https://sproutsocial.com/seeds/components), Sprout's design system. You can open a PR to the [Seeds repository](https://github.com/sproutsocial/seeds) to add or edit component documentation. It's a good idea to have documentation changes ready to go at the same time your Racine contributions are deployed, so start early! Reach out to the Design Systems team if you need help getting started.
|
|
@@ -8,6 +8,7 @@ export type TypeAvatarProps = {
|
|
|
8
8
|
/** URL of the avatar image. If a URL is not provided, the component will fall back to showing the user's initials */
|
|
9
9
|
src?: string,
|
|
10
10
|
type?: 'neutral' | 'purple' | 'green' | 'blue' | 'yellow' | 'red' | 'orange',
|
|
11
|
+
/** @deprecated Avatar now uses the theme by default and using `variant` is no longer needed */
|
|
11
12
|
variant?: 'dark' | 'light',
|
|
12
13
|
bg?: string,
|
|
13
14
|
color?: string,
|
|
@@ -17,6 +17,7 @@ export type TypeMenuState = {|
|
|
|
17
17
|
filterQuery: string,
|
|
18
18
|
filteredItems: ?number[],
|
|
19
19
|
isFilterInputFocused: boolean,
|
|
20
|
+
isFooterFocused: boolean,
|
|
20
21
|
|};
|
|
21
22
|
export type TypeMenuSharedProps = {|
|
|
22
23
|
multiselect?: boolean,
|
|
@@ -40,6 +41,8 @@ export type TypeMenuProps = {
|
|
|
40
41
|
...TypeMenuSharedProps,
|
|
41
42
|
children?: React.Node,
|
|
42
43
|
innerRef?: React.Ref<any>,
|
|
44
|
+
// Any interactive elements that you want to display below the menu should be passed here, not as children
|
|
45
|
+
footerContent?: React.Node,
|
|
43
46
|
...
|
|
44
47
|
};
|
|
45
48
|
export type TypeMenuItemProps = {
|
|
@@ -30,6 +30,11 @@ export type TypePopoutProps = {
|
|
|
30
30
|
* Is the popout open? This prop is optional. By using it, you will lose some automatic handling of the logic for opening and closing the popout.
|
|
31
31
|
*/
|
|
32
32
|
isOpen?: boolean,
|
|
33
|
+
/**
|
|
34
|
+
* Whether Popout should automatically add aria-attributes to its wrapped elements
|
|
35
|
+
*/
|
|
36
|
+
disableWrapperAria?: boolean,
|
|
37
|
+
/**
|
|
33
38
|
/**
|
|
34
39
|
* If you use the isOpen prop you will need to pass a handler to change the state of the popout
|
|
35
40
|
*/
|
|
@@ -200,6 +200,20 @@ type TypeTextColors = {|
|
|
|
200
200
|
highlight: string,
|
|
201
201
|
...
|
|
202
202
|
},
|
|
203
|
+
decorative: {
|
|
204
|
+
green: string,
|
|
205
|
+
blue: string,
|
|
206
|
+
purple: string,
|
|
207
|
+
yellow: string,
|
|
208
|
+
orange: string,
|
|
209
|
+
red: string,
|
|
210
|
+
neutral: string,
|
|
211
|
+
magenta: string,
|
|
212
|
+
pink: string,
|
|
213
|
+
aqua: string,
|
|
214
|
+
teal: string,
|
|
215
|
+
...
|
|
216
|
+
},
|
|
203
217
|
...
|
|
204
218
|
}
|
|
205
219
|
|};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.Avatar = void 0;
|
|
7
|
+
exports.getAvatarColor = exports.default = exports.Avatar = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -20,8 +20,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
20
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
21
|
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."); }
|
|
22
22
|
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); }
|
|
23
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24
|
-
function _iterableToArrayLimit(
|
|
23
|
+
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; }
|
|
24
|
+
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; } }
|
|
25
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
26
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
27
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -35,20 +35,24 @@ var AvatarText = (0, _styledComponents.default)(function (_ref) {
|
|
|
35
35
|
}).withConfig({
|
|
36
36
|
displayName: "Avatar__AvatarText",
|
|
37
37
|
componentId: "sc-1ffu253-0"
|
|
38
|
-
})(["font-size:", "px;color:", "
|
|
38
|
+
})(["font-size:", "px;color:", ";"], function (props) {
|
|
39
39
|
return props.fontSize;
|
|
40
|
-
}, function (
|
|
41
|
-
|
|
40
|
+
}, function (_ref2) {
|
|
41
|
+
var theme = _ref2.theme,
|
|
42
|
+
type = _ref2.type,
|
|
43
|
+
color = _ref2.color;
|
|
44
|
+
return color ? color : theme.colors.text.decorative[type];
|
|
42
45
|
});
|
|
43
46
|
var Container = (0, _styledComponents.default)(_Box.default).withConfig({
|
|
44
47
|
displayName: "Avatar__Container",
|
|
45
48
|
componentId: "sc-1ffu253-1"
|
|
46
|
-
})(["", ""], function (
|
|
47
|
-
var theme =
|
|
48
|
-
type =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
})(["", ""], function (_ref3) {
|
|
50
|
+
var theme = _ref3.theme,
|
|
51
|
+
type = _ref3.type,
|
|
52
|
+
bg = _ref3.bg,
|
|
53
|
+
$src = _ref3.$src,
|
|
54
|
+
borderColor = _ref3.borderColor;
|
|
55
|
+
return (0, _styledComponents.css)(["background:", ";border:", ";border-color:", ";color:", ";"], bg ? bg : theme.colors.container.background.decorative[type], $src ? 'none' : "1px solid", borderColor ? borderColor : theme.colors.container.border.decorative[type], theme.colors.text.decorative[type]);
|
|
52
56
|
});
|
|
53
57
|
var getInitials = function getInitials(name) {
|
|
54
58
|
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '?';
|
|
@@ -59,21 +63,39 @@ var getInitials = function getInitials(name) {
|
|
|
59
63
|
}) // Watch out for empty strings
|
|
60
64
|
.join('');
|
|
61
65
|
};
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
var getAvatarColor = function getAvatarColor(name, type) {
|
|
67
|
+
if (type !== 'auto') {
|
|
68
|
+
return type;
|
|
69
|
+
}
|
|
70
|
+
var colors = ['purple', 'green', 'blue', 'yellow', 'red', 'orange'];
|
|
71
|
+
|
|
72
|
+
// Condense the avatar name down into a number
|
|
73
|
+
var seed = name.split('').reduce(function (seed, char) {
|
|
74
|
+
return seed + char.charCodeAt(0);
|
|
75
|
+
}, 0);
|
|
76
|
+
|
|
77
|
+
// Use that seed modulo the number of available colors to generate
|
|
78
|
+
// a "random" color value which will always be consistent
|
|
79
|
+
// for a given string. As a failsafe, return neutral (this should never happen).
|
|
80
|
+
return colors[seed % colors.length] || 'neutral';
|
|
81
|
+
};
|
|
82
|
+
exports.getAvatarColor = getAvatarColor;
|
|
83
|
+
var Avatar = function Avatar(_ref4) {
|
|
84
|
+
var _ref4$appearance = _ref4.appearance,
|
|
85
|
+
appearance = _ref4$appearance === void 0 ? 'circle' : _ref4$appearance,
|
|
86
|
+
_ref4$name = _ref4.name,
|
|
87
|
+
name = _ref4$name === void 0 ? '' : _ref4$name,
|
|
88
|
+
src = _ref4.src,
|
|
89
|
+
_ref4$variant = _ref4.variant,
|
|
90
|
+
variant = _ref4$variant === void 0 ? 'light' : _ref4$variant,
|
|
91
|
+
_ref4$type = _ref4.type,
|
|
92
|
+
type = _ref4$type === void 0 ? defaultType : _ref4$type,
|
|
93
|
+
_ref4$size = _ref4.size,
|
|
94
|
+
size = _ref4$size === void 0 ? '40px' : _ref4$size,
|
|
95
|
+
bg = _ref4.bg,
|
|
96
|
+
color = _ref4.color,
|
|
97
|
+
rest = _objectWithoutProperties(_ref4, _excluded2);
|
|
98
|
+
var colorType = getAvatarColor(name, type);
|
|
77
99
|
var _useState = (0, React.useState)(false),
|
|
78
100
|
_useState2 = _slicedToArray(_useState, 2),
|
|
79
101
|
imageFailedLoading = _useState2[0],
|
|
@@ -100,12 +122,14 @@ var Avatar = function Avatar(_ref3) {
|
|
|
100
122
|
title: name,
|
|
101
123
|
bg: bg,
|
|
102
124
|
variant: variant,
|
|
103
|
-
type:
|
|
104
|
-
"data-qa-user-avatar": name
|
|
125
|
+
type: colorType,
|
|
126
|
+
"data-qa-user-avatar": name,
|
|
127
|
+
$src: src
|
|
105
128
|
}, rest), !src || imageFailedLoading ? /*#__PURE__*/React.createElement(AvatarText, {
|
|
106
129
|
lineHeight: size,
|
|
107
130
|
fontWeight: "semibold",
|
|
108
131
|
fontSize: fontSize,
|
|
132
|
+
type: colorType,
|
|
109
133
|
color: color
|
|
110
134
|
}, initials) : /*#__PURE__*/React.createElement(_Image.default, {
|
|
111
135
|
alt: name,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AvatarColorOptions = void 0;
|
|
7
|
+
var AvatarColorOptions = Object.freeze({
|
|
8
|
+
auto: 'auto',
|
|
9
|
+
neutral: 'neutral',
|
|
10
|
+
purple: 'purple',
|
|
11
|
+
green: 'green',
|
|
12
|
+
blue: 'blue',
|
|
13
|
+
yellow: 'yellow',
|
|
14
|
+
red: 'red',
|
|
15
|
+
orange: 'orange'
|
|
16
|
+
});
|
|
17
|
+
exports.AvatarColorOptions = AvatarColorOptions;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AvatarColorOptions = void 0;
|
|
7
|
+
var AvatarColorOptions = {
|
|
8
|
+
auto: 'auto',
|
|
9
|
+
neutral: 'neutral',
|
|
10
|
+
purple: 'purple',
|
|
11
|
+
green: 'green',
|
|
12
|
+
blue: 'blue',
|
|
13
|
+
yellow: 'yellow',
|
|
14
|
+
red: 'red',
|
|
15
|
+
orange: 'orange'
|
|
16
|
+
};
|
|
17
|
+
exports.AvatarColorOptions = AvatarColorOptions;
|
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
AvatarColorOptions: true
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "AvatarColorOptions", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function get() {
|
|
12
|
+
return _constants.AvatarColorOptions;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
6
15
|
var _Avatar = require("./Avatar.flow");
|
|
7
16
|
Object.keys(_Avatar).forEach(function (key) {
|
|
8
17
|
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
9
19
|
if (key in exports && exports[key] === _Avatar[key]) return;
|
|
10
20
|
Object.defineProperty(exports, key, {
|
|
11
21
|
enumerable: true,
|
|
@@ -13,4 +23,5 @@ Object.keys(_Avatar).forEach(function (key) {
|
|
|
13
23
|
return _Avatar[key];
|
|
14
24
|
}
|
|
15
25
|
});
|
|
16
|
-
});
|
|
26
|
+
});
|
|
27
|
+
var _constants = require("./constants.flow");
|
package/commonjs/Avatar/index.js
CHANGED
|
@@ -4,7 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
-
Avatar: true
|
|
7
|
+
Avatar: true,
|
|
8
|
+
AvatarColorOptions: true
|
|
8
9
|
};
|
|
9
10
|
Object.defineProperty(exports, "Avatar", {
|
|
10
11
|
enumerable: true,
|
|
@@ -12,6 +13,12 @@ Object.defineProperty(exports, "Avatar", {
|
|
|
12
13
|
return _Avatar.default;
|
|
13
14
|
}
|
|
14
15
|
});
|
|
16
|
+
Object.defineProperty(exports, "AvatarColorOptions", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function get() {
|
|
19
|
+
return _constants.AvatarColorOptions;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
15
22
|
exports.default = void 0;
|
|
16
23
|
var _Avatar = _interopRequireDefault(require("./Avatar"));
|
|
17
24
|
var _AvatarTypes = require("./AvatarTypes");
|
|
@@ -26,6 +33,7 @@ Object.keys(_AvatarTypes).forEach(function (key) {
|
|
|
26
33
|
}
|
|
27
34
|
});
|
|
28
35
|
});
|
|
36
|
+
var _constants = require("./constants");
|
|
29
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
38
|
var _default = _Avatar.default;
|
|
31
39
|
exports.default = _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
var _constants = require("./constants.flow");
|
|
6
6
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
package/commonjs/Badge/Badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
package/commonjs/Box/Box.flow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/commonjs/Box/Box.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -14,12 +14,12 @@ var _excluded = ["children", "href"],
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
function ownKeys(
|
|
18
|
-
function _objectSpread(
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
19
|
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; }
|
|
20
20
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
21
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
|
-
function _typeof(
|
|
22
|
+
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); }
|
|
23
23
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
24
24
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
25
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/commonjs/Card/Card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -16,8 +16,8 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
16
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
17
|
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."); }
|
|
18
18
|
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); }
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
20
|
-
function _iterableToArrayLimit(
|
|
19
|
+
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; }
|
|
20
|
+
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; } }
|
|
21
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
22
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
5
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
6
6
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|