@sproutsocial/racine 14.2.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/__flow__/Card/Card.flow.js +1 -17
- package/__flow__/Card/CardTypes.flow.js +66 -0
- package/__flow__/Card/index.flow.js +2 -1
- package/__flow__/EnumIconNames.flow.js +1 -1
- package/__flow__/Icon/Icon.flow.js +3 -1
- package/__flow__/IconViewBoxes.js +2 -0
- package/__flow__/PartnerLogo/PartnerLogo.flow.js +3 -3
- package/__flow__/index.flow.js +1 -1
- package/__flow__/systemProps/{background.js → background.flow.js} +1 -1
- package/__flow__/systemProps/{border.js → border.flow.js} +1 -1
- package/__flow__/systemProps/{color.js → color.flow.js} +2 -2
- package/__flow__/systemProps/{custom.js → custom.flow.js} +1 -1
- package/__flow__/systemProps/{flexbox.js → flexbox.flow.js} +1 -1
- package/__flow__/systemProps/{grid.js → grid.flow.js} +1 -1
- package/__flow__/systemProps/index.flow.js +16 -0
- package/__flow__/systemProps/{layout.js → layout.flow.js} +1 -1
- package/__flow__/systemProps/{position.js → position.flow.js} +1 -1
- package/__flow__/systemProps/{shadow.js → shadow.flow.js} +1 -1
- package/__flow__/systemProps/{space.js → space.flow.js} +1 -1
- package/__flow__/systemProps/{systemProps.js → systemProps.flow.js} +13 -13
- package/__flow__/systemProps/{typography.js → typography.flow.js} +1 -1
- package/__flow__/systemProps/{variant.js → variant.flow.js} +1 -1
- package/__flow__/types/shared.flow.js +5 -1
- package/commonjs/Badge/Badge.js +2 -1
- package/commonjs/Banner/Banner.js +2 -1
- package/commonjs/Breadcrumb/Breadcrumb.js +2 -1
- package/commonjs/Card/Card.js +71 -26
- package/commonjs/Card/CardTypes.flow.js +6 -0
- package/commonjs/Card/index.flow.js +11 -0
- package/commonjs/Card/styles.js +102 -22
- package/commonjs/Card/subComponents.js +48 -0
- package/commonjs/Card/utils.js +56 -0
- package/commonjs/Checkbox/styles.js +6 -5
- package/commonjs/DatePicker/common.js +2 -1
- package/commonjs/Drawer/Drawer.js +9 -4
- package/commonjs/Icon/Icon.js +33 -10
- package/commonjs/IconViewBoxes.js +2 -0
- package/commonjs/IllustrationViewBoxes.d.js +5 -0
- package/commonjs/Indicator/Indicator.js +2 -1
- package/commonjs/Input/Input.js +2 -1
- package/commonjs/Listbox/Listbox.js +2 -1
- package/commonjs/Loader/styles.js +17 -12
- package/commonjs/LogoViewBoxes.d.js +5 -0
- package/commonjs/PartnerLogo/PartnerLogo.js +14 -13
- package/commonjs/PartnerLogo/PartnerLogoTypes.js +12 -1
- package/commonjs/PartnerLogo/index.js +0 -12
- package/commonjs/PartnerLogo/styles.js +1 -1
- package/commonjs/Select/Select.js +2 -1
- package/commonjs/Switch/Switch.js +1 -0
- package/commonjs/TableHeaderCell/TableHeaderCell.js +2 -1
- package/commonjs/TableRowAccordion/TableRowAccordion.js +6 -2
- package/commonjs/Toast/Toast.js +40 -34
- package/commonjs/ToggleHint/ToggleHint.js +4 -2
- package/commonjs/Token/Token.js +16 -2
- package/commonjs/Token/styles.js +1 -1
- package/commonjs/TokenInput/TokenInput.js +3 -1
- package/commonjs/index.flow.js +125 -125
- package/commonjs/systemProps/index.flow.js +159 -0
- package/commonjs/systemProps/{systemProps.js → systemProps.flow.js} +12 -12
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/theme.js +1 -1
- package/commonjs/types/shared.flow.js +6 -1
- package/commonjs/utils/index.js +27 -2
- package/dist/icon.svg +1 -1
- package/dist/iconList.js +1 -1
- package/dist/themes/dark/theme.scss +1 -1
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +1 -1
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +1 -1
- package/dist/themes/light/theme.scss +1 -1
- package/dist/types/Avatar/Avatar.d.ts +2 -2
- package/dist/types/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/Badge/Badge.d.ts +2 -1
- package/dist/types/Badge/Badge.d.ts.map +1 -1
- package/dist/types/Banner/Banner.d.ts +2 -1
- package/dist/types/Banner/Banner.d.ts.map +1 -1
- package/dist/types/Banner/styles.d.ts +3 -2
- package/dist/types/Banner/styles.d.ts.map +1 -1
- package/dist/types/Box/Box.d.ts +1 -1
- package/dist/types/Box/Box.d.ts.map +1 -1
- package/dist/types/Breadcrumb/Breadcrumb.d.ts +3 -2
- package/dist/types/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/types/Button/Button.d.ts +2 -1
- package/dist/types/Button/Button.d.ts.map +1 -1
- package/dist/types/Card/Card.d.ts +16 -2
- package/dist/types/Card/Card.d.ts.map +1 -1
- package/dist/types/Card/CardTypes.d.ts +48 -11
- package/dist/types/Card/CardTypes.d.ts.map +1 -1
- package/dist/types/Card/__tests__/CardTypes.d.ts +2 -0
- package/dist/types/Card/__tests__/CardTypes.d.ts.map +1 -0
- package/dist/types/Card/styles.d.ts +13 -6
- package/dist/types/Card/styles.d.ts.map +1 -1
- package/dist/types/Card/subComponents.d.ts +17 -0
- package/dist/types/Card/subComponents.d.ts.map +1 -0
- package/dist/types/Card/utils.d.ts +16 -0
- package/dist/types/Card/utils.d.ts.map +1 -0
- package/dist/types/CharacterCounter/CharacterCounter.d.ts +1 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts +2 -1
- package/dist/types/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/types/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/Checkbox/styles.d.ts +7 -5
- package/dist/types/Checkbox/styles.d.ts.map +1 -1
- package/dist/types/Collapsible/Collapsible.d.ts +4 -3
- package/dist/types/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/types/Collapsible/styles.d.ts +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +2 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts +2 -1
- package/dist/types/DatePicker/DateRangePicker/StatefulDateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts +2 -1
- package/dist/types/DatePicker/SingleDatePicker/StatefulSingleDatePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/common.d.ts +2 -1
- package/dist/types/DatePicker/common.d.ts.map +1 -1
- package/dist/types/DatePicker/styles.d.ts +1 -1
- package/dist/types/Drawer/Drawer.d.ts +3 -3
- package/dist/types/Drawer/Drawer.d.ts.map +1 -1
- package/dist/types/Drawer/SlideTransition.d.ts +1 -1
- package/dist/types/Drawer/SlideTransition.d.ts.map +1 -1
- package/dist/types/Drawer/styles.d.ts +1 -1
- package/dist/types/Drawer/styles.d.ts.map +1 -1
- package/dist/types/EmptyState/EmptyState.d.ts +2 -1
- package/dist/types/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/types/EnumIconNames.d.ts +1 -1
- package/dist/types/EnumIconNames.d.ts.map +1 -1
- package/dist/types/Fieldset/Fieldset.d.ts +4 -3
- package/dist/types/Fieldset/Fieldset.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 +2 -1
- package/dist/types/FormField/FormField.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts +4 -2
- package/dist/types/Icon/Icon.d.ts.map +1 -1
- package/dist/types/Icon/IconTypes.d.ts +3 -2
- package/dist/types/Icon/IconTypes.d.ts.map +1 -1
- package/dist/types/Image/Image.d.ts +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 -1
- package/dist/types/Link/Link.d.ts.map +1 -1
- package/dist/types/Link/styles.d.ts +2 -1
- package/dist/types/Link/styles.d.ts.map +1 -1
- package/dist/types/Listbox/Listbox.d.ts +11 -10
- package/dist/types/Listbox/Listbox.d.ts.map +1 -1
- package/dist/types/Listbox/ListboxTypes.d.ts +1 -1
- package/dist/types/Listbox/ListboxTypes.d.ts.map +1 -1
- package/dist/types/Loader/Loader.d.ts +1 -1
- package/dist/types/Loader/styles.d.ts.map +1 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts +2 -1
- package/dist/types/LoaderButton/LoaderButton.d.ts.map +1 -1
- package/dist/types/Menu/Menu.d.ts +14 -13
- package/dist/types/Menu/Menu.d.ts.map +1 -1
- package/dist/types/Menu/MenuTypes.d.ts +1 -1
- package/dist/types/Menu/MenuTypes.d.ts.map +1 -1
- package/dist/types/Menu/styles.d.ts +2 -2
- package/dist/types/Menu/styles.d.ts.map +1 -1
- package/dist/types/Menu/utils/descendants.d.ts +1 -1
- package/dist/types/Menu/utils/descendants.d.ts.map +1 -1
- package/dist/types/Message/Message.d.ts +8 -8
- package/dist/types/Message/styles.d.ts +5 -5
- package/dist/types/Message/styles.d.ts.map +1 -1
- package/dist/types/Modal/Modal.d.ts +5 -5
- package/dist/types/Modal/styles.d.ts +5 -5
- package/dist/types/Modal/styles.d.ts.map +1 -1
- package/dist/types/Numeral/Numeral.d.ts +2 -1
- package/dist/types/Numeral/Numeral.d.ts.map +1 -1
- package/dist/types/Numeral/styles.d.ts +3 -2
- package/dist/types/Numeral/styles.d.ts.map +1 -1
- package/dist/types/OverflowList/OverflowList.d.ts +2 -1
- package/dist/types/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/types/OverflowList/styles.d.ts +2 -1
- package/dist/types/OverflowList/styles.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts +2 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +12 -3
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- package/dist/types/PartnerLogo/index.d.ts +0 -1
- package/dist/types/PartnerLogo/index.d.ts.map +1 -1
- package/dist/types/Popout/Popout.d.ts +3 -2
- package/dist/types/Popout/Popout.d.ts.map +1 -1
- package/dist/types/Popout/PopoutTypes.d.ts +1 -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 +2 -1
- package/dist/types/Radio/styles.d.ts.map +1 -1
- package/dist/types/SegmentedControl/SegmentedControl.d.ts +3 -2
- package/dist/types/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/SegmentedControl/styles.d.ts +3 -3
- package/dist/types/SegmentedControl/styles.d.ts.map +1 -1
- package/dist/types/Select/Select.d.ts +1 -1
- package/dist/types/Select/Select.d.ts.map +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts +2 -1
- package/dist/types/SpotIllustration/SpotIllustration.d.ts.map +1 -1
- package/dist/types/Stack/Stack.d.ts +2 -1
- package/dist/types/Stack/Stack.d.ts.map +1 -1
- package/dist/types/Switch/Switch.d.ts +1 -1
- package/dist/types/Table/Table.d.ts +8 -7
- package/dist/types/Table/Table.d.ts.map +1 -1
- package/dist/types/TableCell/TableCell.d.ts +1 -1
- package/dist/types/TableCell/TableCellTypes.d.ts +1 -1
- package/dist/types/TableCell/TableCellTypes.d.ts.map +1 -1
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts +2 -2
- package/dist/types/TableHeaderCell/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts.map +1 -1
- package/dist/types/Tabs/Tabs.d.ts +2 -2
- package/dist/types/Tabs/styles.d.ts +2 -1
- package/dist/types/Tabs/styles.d.ts.map +1 -1
- package/dist/types/Text/Text.d.ts +2 -1
- package/dist/types/Text/Text.d.ts.map +1 -1
- package/dist/types/Textarea/Textarea.d.ts +1 -1
- package/dist/types/ThemeProvider/index.d.ts +1 -1
- package/dist/types/ThemeProvider/index.d.ts.map +1 -1
- package/dist/types/Toast/Toast.d.ts +2 -1
- package/dist/types/Toast/Toast.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/Token/Token.d.ts +2 -1
- package/dist/types/Token/Token.d.ts.map +1 -1
- package/dist/types/TokenInput/TokenInput.d.ts +1 -1
- package/dist/types/TokenInput/TokenInput.d.ts.map +1 -1
- package/dist/types/Tooltip/Tooltip.d.ts +2 -1
- package/dist/types/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/Tooltip/TooltipTypes.d.ts +1 -1
- package/dist/types/Tooltip/TooltipTypes.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/systemProps/index.d.ts +3 -79
- package/dist/types/systemProps/index.d.ts.map +1 -1
- package/dist/types/types/styled-components.d.ts +3 -3
- package/dist/types/types/styled-components.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/innerText.d.ts.map +1 -1
- package/icons/advocacy-outline.svg +2 -2
- package/icons/comment-ai-outline.svg +2 -2
- package/icons/comment-ai.svg +1 -1
- package/icons/dropbox.svg +2 -2
- package/icons/facebook-groups.svg +2 -2
- package/icons/facebook.svg +2 -2
- package/icons/feedly.svg +2 -2
- package/icons/flat-negative-sentiment-outline.svg +1 -1
- package/icons/flat-neutral-sentiment-outline.svg +1 -1
- package/icons/flat-positive-sentiment-outline.svg +1 -1
- package/icons/glassdoor.svg +2 -2
- package/icons/hand-sparkle-outline.svg +6 -0
- package/icons/hand-sparkle.svg +3 -0
- package/icons/instagram.svg +2 -2
- package/icons/linkedin.svg +2 -2
- package/icons/messenger.svg +2 -2
- package/icons/pinterest.svg +2 -2
- package/icons/reddit-alien.svg +2 -2
- package/icons/reddit.svg +2 -2
- package/icons/reels-outline.svg +1 -1
- package/icons/salesforce.svg +2 -2
- package/icons/send-again-outline.svg +1 -1
- package/icons/send-again.svg +1 -1
- package/icons/tasks-check.svg +1 -1
- package/icons/tumblr.svg +2 -2
- package/icons/twitter.svg +2 -2
- package/icons/youtube.svg +2 -2
- package/icons/zendesk.svg +2 -2
- package/lib/Badge/Badge.js +2 -1
- package/lib/Banner/Banner.js +2 -1
- package/lib/Breadcrumb/Breadcrumb.js +2 -1
- package/lib/Card/Card.js +73 -28
- package/lib/Card/CardTypes.flow.js +1 -0
- package/lib/Card/index.flow.js +2 -1
- package/lib/Card/styles.js +96 -20
- package/lib/Card/subComponents.js +37 -0
- package/lib/Card/utils.js +46 -0
- package/lib/Checkbox/styles.js +6 -5
- package/lib/DatePicker/common.js +2 -1
- package/lib/Drawer/Drawer.js +9 -4
- package/lib/Icon/Icon.js +33 -10
- package/lib/IconViewBoxes.js +2 -0
- package/lib/IllustrationViewBoxes.d.js +1 -0
- package/lib/Indicator/Indicator.js +2 -1
- package/lib/Input/Input.js +2 -1
- package/lib/Listbox/Listbox.js +2 -1
- package/lib/Loader/styles.js +17 -12
- package/lib/LogoViewBoxes.d.js +1 -0
- package/lib/PartnerLogo/PartnerLogo.js +14 -13
- package/lib/PartnerLogo/PartnerLogoTypes.js +8 -1
- package/lib/PartnerLogo/index.js +1 -2
- package/lib/PartnerLogo/styles.js +1 -1
- package/lib/Select/Select.js +2 -1
- package/lib/Switch/Switch.js +1 -0
- package/lib/TableHeaderCell/TableHeaderCell.js +2 -1
- package/lib/TableRowAccordion/TableRowAccordion.js +6 -2
- package/lib/Toast/Toast.js +40 -34
- package/lib/ToggleHint/ToggleHint.js +4 -2
- package/lib/Token/Token.js +16 -2
- package/lib/Token/styles.js +1 -1
- package/lib/TokenInput/TokenInput.js +3 -1
- package/lib/index.flow.js +1 -1
- package/lib/systemProps/index.flow.js +14 -0
- package/lib/systemProps/index.js +1 -45
- package/lib/systemProps/systemProps.flow.js +14 -0
- package/lib/themes/dark/theme.js +1 -1
- package/lib/themes/light/theme.js +1 -1
- package/lib/types/shared.flow.js +1 -0
- package/lib/utils/index.js +22 -1
- package/package.json +16 -12
- package/__flow__/systemProps/index.js +0 -16
- package/dist/types/PartnerLogo/TypePartnerNames.d.ts +0 -2
- package/dist/types/PartnerLogo/TypePartnerNames.d.ts.map +0 -1
- package/lib/systemProps/systemProps.js +0 -14
- /package/commonjs/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
- /package/commonjs/systemProps/{background.js → background.flow.js} +0 -0
- /package/commonjs/systemProps/{border.js → border.flow.js} +0 -0
- /package/commonjs/systemProps/{color.js → color.flow.js} +0 -0
- /package/commonjs/systemProps/{custom.js → custom.flow.js} +0 -0
- /package/commonjs/systemProps/{flexbox.js → flexbox.flow.js} +0 -0
- /package/commonjs/systemProps/{grid.js → grid.flow.js} +0 -0
- /package/commonjs/systemProps/{layout.js → layout.flow.js} +0 -0
- /package/commonjs/systemProps/{position.js → position.flow.js} +0 -0
- /package/commonjs/systemProps/{shadow.js → shadow.flow.js} +0 -0
- /package/commonjs/systemProps/{space.js → space.flow.js} +0 -0
- /package/commonjs/systemProps/{typography.js → typography.flow.js} +0 -0
- /package/commonjs/systemProps/{variant.js → variant.flow.js} +0 -0
- /package/lib/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
- /package/lib/systemProps/{background.js → background.flow.js} +0 -0
- /package/lib/systemProps/{border.js → border.flow.js} +0 -0
- /package/lib/systemProps/{color.js → color.flow.js} +0 -0
- /package/lib/systemProps/{custom.js → custom.flow.js} +0 -0
- /package/lib/systemProps/{flexbox.js → flexbox.flow.js} +0 -0
- /package/lib/systemProps/{grid.js → grid.flow.js} +0 -0
- /package/lib/systemProps/{layout.js → layout.flow.js} +0 -0
- /package/lib/systemProps/{position.js → position.flow.js} +0 -0
- /package/lib/systemProps/{shadow.js → shadow.flow.js} +0 -0
- /package/lib/systemProps/{space.js → space.flow.js} +0 -0
- /package/lib/systemProps/{typography.js → typography.flow.js} +0 -0
- /package/lib/systemProps/{variant.js → variant.flow.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
2
2
|
<path d="M1.881 6.38l13.993-4.254L13.937 8.5h1.567l2.077-6.834A1 1 0 0016.334.42L.703 5.169a1 1 0 00-.46 1.617l3.507 3.997v2.567a.9.9 0 00.9.9h2.568L8.5 15.376V13.38l-.717-.63H5.25l7.231-7.231c.216-.216-.07-.557-.32-.382l-7.043 4.93L1.881 6.38zM11.988 18h-.234c.078.01.156.01.234 0z"/>
|
|
3
|
-
<path
|
|
3
|
+
<path d="M11.5 17.086V18H10v-3.75h3.5v1.5h-1.244a2.572 2.572 0 004.21-.886l1.398.546a4.072 4.072 0 01-6.364 1.676zm5-6.172V10H18v3.75h-3.5v-1.5h1.244a2.572 2.572 0 00-4.21.886l-1.398-.546a4.072 4.072 0 016.364-1.676z"/>
|
|
4
4
|
</svg>
|
package/icons/send-again.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
|
|
2
2
|
<path fill-rule="evenodd" d="M16.416.33L.726 5.283a1 1 0 00-.443 1.62L3.5 10.5v3a1 1 0 001 1h3l1 .895V13.5a5 5 0 015-5h1.987l2.184-6.916A1 1 0 0016.416.329zM5 10l8.042-5.744c.25-.179.54.163.322.38L5 13v-3z" clip-rule="evenodd"/>
|
|
3
|
-
<path
|
|
3
|
+
<path d="M11.5 17.086V18H10v-3.75h3.5v1.5h-1.244a2.572 2.572 0 004.21-.886l1.398.546a4.072 4.072 0 01-6.364 1.676zm5-6.171V10H18v3.75h-3.5v-1.5h1.244a2.572 2.572 0 00-4.21.886l-1.398-.546a4.072 4.072 0 016.364-1.675z"/>
|
|
4
4
|
</svg>
|
package/icons/tasks-check.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
2
2
|
<path d="M1.75 0h6.377a5.251 5.251 0 003.314 8.438A3.26 3.26 0 0112 10.25a.75.75 0 01-.75.75H7v3.25a.25.25 0 01-.026.112l-.75 1.5a.25.25 0 01-.448 0l-.75-1.5A.25.25 0 015 14.25V11H.75a.75.75 0 01-.75-.75C0 8.664 1.17 7.4 2.687 6.696L3.069 3H1.75A.75.75 0 011 2.25V.75A.75.75 0 011.75 0z"/>
|
|
3
|
-
<path
|
|
3
|
+
<path d="M15.55 2.01L11.8 6.048 9.002 3.561l.996-1.122L11.7 3.952 14.45.99l1.1 1.02z"/>
|
|
4
4
|
</svg>
|
package/icons/tumblr.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
2
|
-
<path d="M14.286 0H1.714C.768 0 0 .768 0 1.714v12.572C0 15.232.768 16 1.714 16h12.572c.946 0 1.714-.768 1.714-1.714V1.714C16 .768 15.232 0 14.286 0zm-2.94 13.007c-.303.325-1.114.707-2.175.707-2.696 0-3.282-1.982-3.282-3.139V7.361H4.83a.223.223 0 01-.222-.222V5.621c0-.16.1-.303.254-.357C6.247 4.775 6.68 3.568 6.744 2.65c.018-.246.146-.364.357-.364h1.582c.122 0 .222.1.222.221V5.08h1.853c.122 0 .222.1.222.221v1.825c0 .121-.1.221-.222.221h-1.86v2.975c0 .765.528 1.197 1.517.8.107-.042.2-.071.286-.05.079.018.129.075.164.175l.493 1.436c.036.114.072.24-.01.325z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
|
2
|
+
<path fill="#35465C" d="M14.286 0H1.714C.768 0 0 .768 0 1.714v12.572C0 15.232.768 16 1.714 16h12.572c.946 0 1.714-.768 1.714-1.714V1.714C16 .768 15.232 0 14.286 0zm-2.94 13.007c-.303.325-1.114.707-2.175.707-2.696 0-3.282-1.982-3.282-3.139V7.361H4.83a.223.223 0 01-.222-.222V5.621c0-.16.1-.303.254-.357C6.247 4.775 6.68 3.568 6.744 2.65c.018-.246.146-.364.357-.364h1.582c.122 0 .222.1.222.221V5.08h1.853c.122 0 .222.1.222.221v1.825c0 .121-.1.221-.222.221h-1.86v2.975c0 .765.528 1.197 1.517.8.107-.042.2-.071.286-.05.079.018.129.075.164.175l.493 1.436c.036.114.072.24-.01.325z"/>
|
|
3
3
|
</svg>
|
package/icons/twitter.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 16">
|
|
2
|
-
<path d="M15.253 4.489c.01.153.01.306.01.46C15.263 9.618 11.758 15 5.35 15A9.748 9.748 0 010 13.414c.28.033.55.044.841.044a6.917 6.917 0 004.326-1.51 3.497 3.497 0 01-3.258-2.45 3.66 3.66 0 001.575-.065A3.521 3.521 0 01.69 5.966v-.044a3.473 3.473 0 001.575.448A3.543 3.543 0 01.712 3.428c0-.656.172-1.258.475-1.783A9.86 9.86 0 008.37 5.342a4.042 4.042 0 01-.087-.81C8.284 2.587 9.838 1 11.768 1c1.004 0 1.91.427 2.546 1.116a6.802 6.802 0 002.211-.854 3.515 3.515 0 01-1.531 1.947A6.91 6.91 0 0017 2.663a7.548 7.548 0 01-1.747 1.826z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 16">
|
|
2
|
+
<path fill="#1DA1F2" d="M15.253 4.489c.01.153.01.306.01.46C15.263 9.618 11.758 15 5.35 15A9.748 9.748 0 010 13.414c.28.033.55.044.841.044a6.917 6.917 0 004.326-1.51 3.497 3.497 0 01-3.258-2.45 3.66 3.66 0 001.575-.065A3.521 3.521 0 01.69 5.966v-.044a3.473 3.473 0 001.575.448A3.543 3.543 0 01.712 3.428c0-.656.172-1.258.475-1.783A9.86 9.86 0 008.37 5.342a4.042 4.042 0 01-.087-.81C8.284 2.587 9.838 1 11.768 1c1.004 0 1.91.427 2.546 1.116a6.802 6.802 0 002.211-.854 3.515 3.515 0 01-1.531 1.947A6.91 6.91 0 0017 2.663a7.548 7.548 0 01-1.747 1.826z"/>
|
|
3
3
|
</svg>
|
package/icons/youtube.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 15">
|
|
2
|
-
<path d="M15.666 3.721A1.988 1.988 0 0014.25 2.33C13.003 2 8 2 8 2s-5.003 0-6.251.329A1.988 1.988 0 00.334 3.721C0 4.95 0 7.511 0 7.511s0 2.562.334 3.79c.184.678.727 1.189 1.415 1.37C2.997 13 8 13 8 13s5.003 0 6.251-.329c.689-.181 1.23-.692 1.415-1.37.334-1.228.334-3.79.334-3.79s0-2.562-.334-3.79zM6.364 9.837V5.185l4.181 2.326-4.181 2.326z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 15">
|
|
2
|
+
<path fill="red" d="M15.666 3.721A1.988 1.988 0 0014.25 2.33C13.003 2 8 2 8 2s-5.003 0-6.251.329A1.988 1.988 0 00.334 3.721C0 4.95 0 7.511 0 7.511s0 2.562.334 3.79c.184.678.727 1.189 1.415 1.37C2.997 13 8 13 8 13s5.003 0 6.251-.329c.689-.181 1.23-.692 1.415-1.37.334-1.228.334-3.79.334-3.79s0-2.562-.334-3.79zM6.364 9.837V5.185l4.181 2.326-4.181 2.326z"/>
|
|
3
3
|
</svg>
|
package/icons/zendesk.svg
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
|
2
|
-
<path d="M7.39 14.124V5.202L0 14.124h7.39zM6.308 4.613A3.695 3.695 0 007.39 2H0a3.695 3.695 0 006.308 2.613zm3.382 6.899a3.695 3.695 0 00-1.082 2.613h7.39a3.695 3.695 0 00-6.308-2.613zM8.608 2v8.923L16 2H8.608z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
|
2
|
+
<path fill="#03363D" d="M7.39 14.124V5.202L0 14.124h7.39zM6.308 4.613A3.695 3.695 0 007.39 2H0a3.695 3.695 0 006.308 2.613zm3.382 6.899a3.695 3.695 0 00-1.082 2.613h7.39a3.695 3.695 0 00-6.308-2.613zM8.608 2v8.923L16 2H8.608z"/>
|
|
3
3
|
</svg>
|
package/lib/Badge/Badge.js
CHANGED
|
@@ -42,7 +42,8 @@ var Badge = function Badge(_ref) {
|
|
|
42
42
|
}, iconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
43
43
|
mr: 200,
|
|
44
44
|
name: iconName,
|
|
45
|
-
size: size === 'small' ? 'mini' : 'default'
|
|
45
|
+
size: size === 'small' ? 'mini' : 'default',
|
|
46
|
+
"aria-hidden": true
|
|
46
47
|
}) : null, children || text));
|
|
47
48
|
};
|
|
48
49
|
export default Badge;
|
package/lib/Banner/Banner.js
CHANGED
|
@@ -40,7 +40,8 @@ var Breadcrumb = function Breadcrumb(_ref2) {
|
|
|
40
40
|
px: 200,
|
|
41
41
|
py: 0
|
|
42
42
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
43
|
-
name: "dotdotdot"
|
|
43
|
+
name: "dotdotdot",
|
|
44
|
+
"aria-hidden": true
|
|
44
45
|
}))), listItems.map(function (item, i) {
|
|
45
46
|
// @ts-notes - item is a childNode which can be a string or number but `cloneElement` requires props
|
|
46
47
|
var itemElem = _typeof(item) === 'object' && 'props' in item ? item : /*#__PURE__*/React.createElement("span", null, "item");
|
package/lib/Card/Card.js
CHANGED
|
@@ -1,36 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _excluded = ["onClick", "href", "children", "ariaLabel", "buttonProps", "border", "borderColor", "color", "bg"];
|
|
1
|
+
var _excluded = ["children", "disabled", "elevation", "href", "onClick", "role", "selected"];
|
|
4
2
|
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); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
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."); }
|
|
5
|
+
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); }
|
|
6
|
+
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; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5
9
|
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; }
|
|
6
10
|
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; }
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
11
|
+
import React, { useRef, useState } from 'react';
|
|
12
|
+
import { StyledCard } from "./styles";
|
|
13
|
+
import { SubComponentContext, navigateTo, onKeyDown } from "./utils";
|
|
14
|
+
import { SelectedIcon } from "./subComponents";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @link https://seeds.sproutsocial.com/components/card/
|
|
18
|
+
*
|
|
19
|
+
* Avoid nesting interactive content inside a Card with role='button'.
|
|
20
|
+
*
|
|
21
|
+
* Interactive content: "a", "audio", "button", "embed", "iframe", "img", "input", "label", "select", "textarea", "video"
|
|
22
|
+
* @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <Card role="button" onClick={_onClick}>
|
|
26
|
+
* <Button>Click me</Button>
|
|
27
|
+
* </Card>
|
|
28
|
+
*/
|
|
29
|
+
|
|
9
30
|
var Card = function Card(_ref) {
|
|
10
|
-
var
|
|
31
|
+
var children = _ref.children,
|
|
32
|
+
_ref$disabled = _ref.disabled,
|
|
33
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
34
|
+
elevation = _ref.elevation,
|
|
11
35
|
href = _ref.href,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_ref$
|
|
15
|
-
|
|
16
|
-
_ref$border = _ref.border,
|
|
17
|
-
border = _ref$border === void 0 ? 500 : _ref$border,
|
|
18
|
-
_ref$borderColor = _ref.borderColor,
|
|
19
|
-
borderColor = _ref$borderColor === void 0 ? 'container.border.base' : _ref$borderColor,
|
|
20
|
-
_ref$color = _ref.color,
|
|
21
|
-
color = _ref$color === void 0 ? 'text.body' : _ref$color,
|
|
22
|
-
_ref$bg = _ref.bg,
|
|
23
|
-
bg = _ref$bg === void 0 ? 'container.background.base' : _ref$bg,
|
|
36
|
+
onClick = _ref.onClick,
|
|
37
|
+
_ref$role = _ref.role,
|
|
38
|
+
role = _ref$role === void 0 ? 'presentation' : _ref$role,
|
|
39
|
+
selected = _ref.selected,
|
|
24
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
var _useState = useState(false),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
hasSubComponent = _useState2[0],
|
|
44
|
+
setHasSubComponent = _useState2[1];
|
|
45
|
+
var containerRef = useRef(null);
|
|
46
|
+
var checkedConditions = role === 'checkbox' ? selected : undefined;
|
|
47
|
+
var handleClickConditions = function handleClickConditions(e) {
|
|
48
|
+
return role === 'link' ? navigateTo({
|
|
49
|
+
e: e,
|
|
50
|
+
href: href,
|
|
51
|
+
ref: containerRef
|
|
52
|
+
}) : onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
53
|
+
};
|
|
54
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
55
|
+
return onKeyDown({
|
|
56
|
+
e: e,
|
|
57
|
+
href: href,
|
|
58
|
+
onClick: onClick,
|
|
59
|
+
ref: containerRef,
|
|
60
|
+
role: role
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return /*#__PURE__*/React.createElement(StyledCard, _extends({
|
|
64
|
+
tabIndex: 0,
|
|
65
|
+
role: role,
|
|
66
|
+
onClick: handleClickConditions,
|
|
67
|
+
onKeyDown: handleKeyDown,
|
|
68
|
+
$elevation: elevation,
|
|
69
|
+
ref: containerRef,
|
|
70
|
+
$selected: selected,
|
|
71
|
+
"aria-checked": checkedConditions,
|
|
72
|
+
$disabled: disabled,
|
|
73
|
+
"aria-disabled": disabled && disabled,
|
|
74
|
+
$compositionalComponents: hasSubComponent
|
|
75
|
+
}, rest), /*#__PURE__*/React.createElement(SelectedIcon, {
|
|
76
|
+
$selected: selected
|
|
77
|
+
}), /*#__PURE__*/React.createElement(SubComponentContext.Provider, {
|
|
78
|
+
value: setHasSubComponent
|
|
79
|
+
}, children));
|
|
35
80
|
};
|
|
36
81
|
export default Card;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import * as React from 'react';
|
package/lib/Card/index.flow.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./Card.flow";
|
|
1
|
+
export * from "./Card.flow";
|
|
2
|
+
export * from "./CardTypes.flow";
|
package/lib/Card/styles.js
CHANGED
|
@@ -1,22 +1,98 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return
|
|
2
|
+
import { border, color, flexbox, grid, layout, position, space } from 'styled-system';
|
|
3
|
+
import { focusRing, disabled } from "../utils/mixins";
|
|
4
|
+
import Icon from "../Icon";
|
|
5
|
+
|
|
6
|
+
// TODO: Would be really cool to cherry pick specific props from style functions. For example,
|
|
7
|
+
// removing the css prop 'color' from the color function or importing just the specific
|
|
8
|
+
// props the component needs. It appears to be possible with some and not others.
|
|
9
|
+
// https://github.com/styled-system/styled-system/issues/1569
|
|
10
|
+
|
|
11
|
+
export var StyledCardContent = styled.div.withConfig({
|
|
12
|
+
displayName: "styles__StyledCardContent",
|
|
13
|
+
componentId: "sc-9tyqu4-0"
|
|
14
|
+
})(["display:flex;flex-direction:column;padding:", ";box-sizing:border-box;", " ", " ", " ", " ", " ", ""], function (_ref) {
|
|
15
|
+
var theme = _ref.theme;
|
|
16
|
+
return theme.space[400];
|
|
17
|
+
}, border, color, flexbox, grid, layout, space);
|
|
18
|
+
export var StyledCardHeader = styled(StyledCardContent).withConfig({
|
|
19
|
+
displayName: "styles__StyledCardHeader",
|
|
20
|
+
componentId: "sc-9tyqu4-1"
|
|
21
|
+
})(["flex-direction:row;border-bottom:", ";border-top-left-radius:", ";border-top-right-radius:", ";", " ", " ", " ", " ", " ", ""], function (_ref2) {
|
|
22
|
+
var theme = _ref2.theme;
|
|
23
|
+
return "".concat(theme.borderWidths[500], " solid\n ").concat(theme.colors.container.border.base);
|
|
24
|
+
}, function (_ref3) {
|
|
25
|
+
var theme = _ref3.theme;
|
|
26
|
+
return theme.radii.inner;
|
|
27
|
+
}, function (_ref4) {
|
|
28
|
+
var theme = _ref4.theme;
|
|
29
|
+
return theme.radii.inner;
|
|
30
|
+
}, border, color, flexbox, grid, layout, space);
|
|
31
|
+
export var StyledCardFooter = styled(StyledCardContent).withConfig({
|
|
32
|
+
displayName: "styles__StyledCardFooter",
|
|
33
|
+
componentId: "sc-9tyqu4-2"
|
|
34
|
+
})(["flex-direction:row;border-top:", ";border-bottom-left-radius:", ";border-bottom-right-radius:", ";", " ", " ", " ", " ", " ", ""], function (_ref5) {
|
|
35
|
+
var theme = _ref5.theme;
|
|
36
|
+
return "".concat(theme.borderWidths[500], " solid\n ").concat(theme.colors.container.border.base);
|
|
37
|
+
}, function (_ref6) {
|
|
38
|
+
var theme = _ref6.theme;
|
|
39
|
+
return theme.radii.inner;
|
|
40
|
+
}, function (_ref7) {
|
|
41
|
+
var theme = _ref7.theme;
|
|
42
|
+
return theme.radii.inner;
|
|
43
|
+
}, border, color, flexbox, grid, layout, space);
|
|
44
|
+
export var SelectedIconWrapper = styled.div.withConfig({
|
|
45
|
+
displayName: "styles__SelectedIconWrapper",
|
|
46
|
+
componentId: "sc-9tyqu4-3"
|
|
47
|
+
})(["display:flex;align-items:center;justify-content:center;position:absolute;top:-8px;right:-8px;"]);
|
|
48
|
+
export var StyledSelectedIcon = styled(Icon).withConfig({
|
|
49
|
+
displayName: "styles__StyledSelectedIcon",
|
|
50
|
+
componentId: "sc-9tyqu4-4"
|
|
51
|
+
})(["border-radius:50%;background:", ";opacity:0;transition:opacity ", ";", ""], function (_ref8) {
|
|
52
|
+
var theme = _ref8.theme;
|
|
53
|
+
return theme.colors.container.background.base;
|
|
54
|
+
}, function (_ref9) {
|
|
55
|
+
var theme = _ref9.theme;
|
|
56
|
+
return theme.duration.medium;
|
|
57
|
+
}, function (_ref10) {
|
|
58
|
+
var $selected = _ref10.$selected;
|
|
59
|
+
return $selected && "\n opacity: 1;\n ";
|
|
17
60
|
});
|
|
18
|
-
var
|
|
19
|
-
displayName: "
|
|
20
|
-
componentId: "sc-
|
|
21
|
-
})(["position:
|
|
22
|
-
|
|
61
|
+
export var StyledCard = styled.div.withConfig({
|
|
62
|
+
displayName: "styles__StyledCard",
|
|
63
|
+
componentId: "sc-9tyqu4-5"
|
|
64
|
+
})(["position:relative;display:flex;flex-direction:column;box-sizing:border-box;margin:0;background:", ";border:", " solid ", ";padding:", ";border-radius:", ";transition:box-shadow ", ",border ", ";&[role='link'],&[role='button'],&[role='checkbox']{cursor:pointer;}&:hover{box-shadow:", ";}&:focus{", "}", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (_ref11) {
|
|
65
|
+
var theme = _ref11.theme;
|
|
66
|
+
return theme.colors.container.background.base;
|
|
67
|
+
}, function (_ref12) {
|
|
68
|
+
var theme = _ref12.theme;
|
|
69
|
+
return theme.borderWidths[500];
|
|
70
|
+
}, function (_ref13) {
|
|
71
|
+
var theme = _ref13.theme;
|
|
72
|
+
return theme.colors.container.border.base;
|
|
73
|
+
}, function (_ref14) {
|
|
74
|
+
var theme = _ref14.theme,
|
|
75
|
+
$compositionalComponents = _ref14.$compositionalComponents;
|
|
76
|
+
return $compositionalComponents ? 0 : theme.space[400];
|
|
77
|
+
}, function (_ref15) {
|
|
78
|
+
var theme = _ref15.theme;
|
|
79
|
+
return theme.radii.outer;
|
|
80
|
+
}, function (_ref16) {
|
|
81
|
+
var theme = _ref16.theme;
|
|
82
|
+
return theme.duration.medium;
|
|
83
|
+
}, function (_ref17) {
|
|
84
|
+
var theme = _ref17.theme;
|
|
85
|
+
return theme.duration.medium;
|
|
86
|
+
}, function (_ref18) {
|
|
87
|
+
var theme = _ref18.theme,
|
|
88
|
+
_ref18$$elevation = _ref18.$elevation,
|
|
89
|
+
$elevation = _ref18$$elevation === void 0 ? 'low' : _ref18$$elevation;
|
|
90
|
+
return theme.shadows[$elevation];
|
|
91
|
+
}, focusRing, function (_ref19) {
|
|
92
|
+
var $disabled = _ref19.$disabled;
|
|
93
|
+
return $disabled && "\n ".concat(disabled, "\n ");
|
|
94
|
+
}, function (_ref20) {
|
|
95
|
+
var $selected = _ref20.$selected,
|
|
96
|
+
theme = _ref20.theme;
|
|
97
|
+
return $selected && "\n border: ".concat(theme.borderWidths[500], " solid ").concat(theme.colors.container.border.selected, "; \n ");
|
|
98
|
+
}, border, color, flexbox, grid, layout, position, space);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var _excluded = ["children"],
|
|
2
|
+
_excluded2 = ["children"],
|
|
3
|
+
_excluded3 = ["children"];
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { useChildContext } from "./utils";
|
|
8
|
+
import { StyledCardContent, StyledCardHeader, StyledCardFooter, StyledSelectedIcon, SelectedIconWrapper } from "./styles";
|
|
9
|
+
export var CardContent = function CardContent(_ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
// TODO: It could be cool to possibly adjust the context to include an array of names of child components.
|
|
13
|
+
// Then, if CardHeader or CardFooter aren't used with CardContent throw an error.
|
|
14
|
+
useChildContext();
|
|
15
|
+
return /*#__PURE__*/React.createElement(StyledCardContent, rest, children);
|
|
16
|
+
};
|
|
17
|
+
export var CardHeader = function CardHeader(_ref2) {
|
|
18
|
+
var children = _ref2.children,
|
|
19
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
20
|
+
useChildContext();
|
|
21
|
+
return /*#__PURE__*/React.createElement(StyledCardHeader, rest, children);
|
|
22
|
+
};
|
|
23
|
+
export var CardFooter = function CardFooter(_ref3) {
|
|
24
|
+
var children = _ref3.children,
|
|
25
|
+
rest = _objectWithoutProperties(_ref3, _excluded3);
|
|
26
|
+
useChildContext();
|
|
27
|
+
return /*#__PURE__*/React.createElement(StyledCardFooter, rest, children);
|
|
28
|
+
};
|
|
29
|
+
export var SelectedIcon = function SelectedIcon(_ref4) {
|
|
30
|
+
var $selected = _ref4.$selected;
|
|
31
|
+
return /*#__PURE__*/React.createElement(SelectedIconWrapper, null, /*#__PURE__*/React.createElement(StyledSelectedIcon, {
|
|
32
|
+
"aria-hidden": true,
|
|
33
|
+
color: "icon.base",
|
|
34
|
+
name: "circle-check",
|
|
35
|
+
$selected: $selected
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { assertIsElement } from "../utils";
|
|
3
|
+
export var SubComponentContext = /*#__PURE__*/createContext(
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5
|
+
function () {});
|
|
6
|
+
export function useChildContext() {
|
|
7
|
+
var setHasSubComponent = useContext(SubComponentContext);
|
|
8
|
+
setHasSubComponent(true);
|
|
9
|
+
}
|
|
10
|
+
export var navigateTo = function navigateTo(_ref) {
|
|
11
|
+
var _ref$current, _window$open;
|
|
12
|
+
var e = _ref.e,
|
|
13
|
+
href = _ref.href,
|
|
14
|
+
ref = _ref.ref;
|
|
15
|
+
var target = e.target;
|
|
16
|
+
|
|
17
|
+
// asserts that target is an element so `contains` accepts it
|
|
18
|
+
assertIsElement(target);
|
|
19
|
+
if ((_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.contains(target)) {
|
|
20
|
+
if (target.getAttribute('onclick') !== null || target.getAttribute('href') !== null) {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
(_window$open = window.open(href, '_blank')) === null || _window$open === void 0 ? void 0 : _window$open.focus();
|
|
26
|
+
};
|
|
27
|
+
export var onKeyDown = function onKeyDown(_ref2) {
|
|
28
|
+
var e = _ref2.e,
|
|
29
|
+
href = _ref2.href,
|
|
30
|
+
onClick = _ref2.onClick,
|
|
31
|
+
ref = _ref2.ref,
|
|
32
|
+
role = _ref2.role;
|
|
33
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === 'Enter') {
|
|
34
|
+
if (role === 'link') {
|
|
35
|
+
return navigateTo({
|
|
36
|
+
e: e,
|
|
37
|
+
href: href,
|
|
38
|
+
ref: ref
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (role === 'presentation') {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
return onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
45
|
+
}
|
|
46
|
+
};
|
package/lib/Checkbox/styles.js
CHANGED
|
@@ -47,13 +47,14 @@ export var CheckboxBox = styled.div.withConfig({
|
|
|
47
47
|
return props.theme.easing.ease_in;
|
|
48
48
|
});
|
|
49
49
|
CheckboxBox.displayName = 'CheckboxBox';
|
|
50
|
-
export var CheckIcon = styled(Icon).
|
|
50
|
+
export var CheckIcon = styled(Icon).attrs({
|
|
51
|
+
'aria-hidden': true
|
|
52
|
+
}).withConfig({
|
|
51
53
|
displayName: "styles__CheckIcon",
|
|
52
54
|
componentId: "sc-1hcgibh-3"
|
|
53
|
-
})(["position:absolute;display:inline-flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:all ", "
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return props.theme.easing.ease_inout;
|
|
55
|
+
})(["position:absolute;display:inline-flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:all ", ";&,& .Icon-svg{width:10px;height:10px;line-height:10px;}"], function (_ref) {
|
|
56
|
+
var theme = _ref.theme;
|
|
57
|
+
return "".concat(theme.duration.fast, " ").concat(theme.easing.ease_inout);
|
|
57
58
|
});
|
|
58
59
|
CheckIcon.displayName = 'CheckIcon';
|
|
59
60
|
export var PillInput = styled.input.withConfig({
|
package/lib/DatePicker/common.js
CHANGED
|
@@ -11,7 +11,8 @@ export var CalendarNavButton = function CalendarNavButton(_ref) {
|
|
|
11
11
|
var type = _ref.type;
|
|
12
12
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
13
13
|
size: "mini",
|
|
14
|
-
name: iconNames[type]
|
|
14
|
+
name: iconNames[type],
|
|
15
|
+
"aria-hidden": true
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
18
|
export var commonDatePickerProps = {
|
package/lib/Drawer/Drawer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["title", "children", "render"],
|
|
2
|
+
var _excluded = ["title", "id", "children", "render"],
|
|
3
3
|
_excluded2 = ["children"],
|
|
4
4
|
_excluded3 = ["id", "style", "offset", "direction", "children", "disableCloseOnClickOutside", "onClose", "zIndex", "closeTargets"],
|
|
5
5
|
_excluded4 = ["children", "closeButtonLabel", "direction", "disableCloseOnClickOutside", "id", "isOpen", "offset", "onClose", "zIndex", "closeTargets"];
|
|
@@ -46,12 +46,15 @@ var DrawerCloseButton = function DrawerCloseButton(props) {
|
|
|
46
46
|
"aria-label": closeButtonLabel,
|
|
47
47
|
onClick: onClose
|
|
48
48
|
}, props), props.children || /*#__PURE__*/React.createElement(Icon, {
|
|
49
|
+
"aria-hidden": true,
|
|
49
50
|
name: "x"
|
|
50
51
|
}));
|
|
51
52
|
};
|
|
52
53
|
var DrawerHeader = function DrawerHeader(_ref) {
|
|
53
54
|
var _ref$title = _ref.title,
|
|
54
55
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
56
|
+
_ref$id = _ref.id,
|
|
57
|
+
id = _ref$id === void 0 ? undefined : _ref$id,
|
|
55
58
|
children = _ref.children,
|
|
56
59
|
render = _ref.render,
|
|
57
60
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -70,7 +73,8 @@ var DrawerHeader = function DrawerHeader(_ref) {
|
|
|
70
73
|
as: "h2",
|
|
71
74
|
fontSize: 400,
|
|
72
75
|
fontWeight: "semibold",
|
|
73
|
-
color: "text.headline"
|
|
76
|
+
color: "text.headline",
|
|
77
|
+
id: id
|
|
74
78
|
}, title), /*#__PURE__*/React.createElement(DrawerCloseButton, null)));
|
|
75
79
|
};
|
|
76
80
|
var DrawerContent = function DrawerContent(_ref2) {
|
|
@@ -129,7 +133,7 @@ var Drawer = function Drawer(_ref3) {
|
|
|
129
133
|
}, [onClose, disableCloseOnClickOutside, closeTargets]);
|
|
130
134
|
return /*#__PURE__*/React.createElement(FocusLock, {
|
|
131
135
|
key: id,
|
|
132
|
-
autoFocus:
|
|
136
|
+
autoFocus: true,
|
|
133
137
|
returnFocus: true
|
|
134
138
|
}, /*#__PURE__*/React.createElement(AnimatedDrawer, _extends({
|
|
135
139
|
ref: drawerRef,
|
|
@@ -137,7 +141,8 @@ var Drawer = function Drawer(_ref3) {
|
|
|
137
141
|
width: DRAWER_WIDTH,
|
|
138
142
|
offset: offset,
|
|
139
143
|
direction: direction,
|
|
140
|
-
"data-qa-drawer": id
|
|
144
|
+
"data-qa-drawer": id,
|
|
145
|
+
role: "dialog"
|
|
141
146
|
}, rest), children));
|
|
142
147
|
};
|
|
143
148
|
var DrawerContainer = function DrawerContainer(_ref4) {
|
package/lib/Icon/Icon.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
var _excluded = ["name", "size", "fixedWidth", "ariaLabel"],
|
|
1
|
+
var _excluded = ["name", "size", "fixedWidth", "ariaLabel", "color", "svgProps"],
|
|
2
2
|
_excluded2 = ["activeName", "inactiveName", "isActive", "size", "fixedWidth", "ariaLabel"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
|
+
import iconViewBoxes from "../IconViewBoxes";
|
|
8
9
|
import Box from "../Box";
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
|
|
10
|
+
import PartnerLogo, { PartnerNames } from "../PartnerLogo";
|
|
11
|
+
import { includes } from "../utils";
|
|
12
|
+
|
|
12
13
|
// TODO: get json file working in flow so this can be shared
|
|
13
14
|
// import deprecatedIcons from './deprecatedIcons.json';
|
|
14
15
|
import deprecatedIcons from "./deprecatedIcons";
|
|
16
|
+
import Container from "./styles";
|
|
15
17
|
var Icon = function Icon(_ref) {
|
|
16
18
|
var name = _ref.name,
|
|
17
19
|
_ref$size = _ref.size,
|
|
@@ -19,20 +21,40 @@ var Icon = function Icon(_ref) {
|
|
|
19
21
|
_ref$fixedWidth = _ref.fixedWidth,
|
|
20
22
|
fixedWidth = _ref$fixedWidth === void 0 ? false : _ref$fixedWidth,
|
|
21
23
|
ariaLabel = _ref.ariaLabel,
|
|
24
|
+
color = _ref.color,
|
|
25
|
+
svgProps = _ref.svgProps,
|
|
22
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
if (includes(PartnerNames, name)) {
|
|
28
|
+
// Icon's "default" size is equivalent to PartnerLogo's "small" size
|
|
29
|
+
var logoSize = size === 'default' ? 'small' : size;
|
|
30
|
+
var logoProps = {
|
|
31
|
+
partnerName: name,
|
|
32
|
+
size: logoSize,
|
|
33
|
+
logoType: 'symbol',
|
|
34
|
+
svgProps: svgProps
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(PartnerLogo
|
|
37
|
+
// ariaLabel needs to be overridable by aria-label prop in ...rest
|
|
38
|
+
, _extends({
|
|
39
|
+
"aria-label": ariaLabel
|
|
40
|
+
}, rest, logoProps));
|
|
41
|
+
}
|
|
23
42
|
var iconName = deprecatedIcons[name] || name;
|
|
24
43
|
var iconViewBox = iconViewBoxes[iconName];
|
|
25
44
|
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
26
45
|
iconSize: size,
|
|
27
46
|
fixedWidth: !!fixedWidth,
|
|
28
47
|
key: name,
|
|
48
|
+
role: "img",
|
|
29
49
|
"aria-label": ariaLabel,
|
|
30
|
-
"data-qa-icon": name
|
|
31
|
-
|
|
50
|
+
"data-qa-icon": name,
|
|
51
|
+
color: color
|
|
52
|
+
}, rest), /*#__PURE__*/React.createElement("svg", _extends({
|
|
32
53
|
className: "Icon-svg",
|
|
33
54
|
viewBox: iconViewBox,
|
|
34
|
-
focusable: false
|
|
35
|
-
|
|
55
|
+
focusable: false,
|
|
56
|
+
"data-qa-icon-svg": "".concat(name, "-svg")
|
|
57
|
+
}, svgProps), /*#__PURE__*/React.createElement("use", {
|
|
36
58
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
37
59
|
xlinkHref: "#ssiconsvg-".concat(iconName)
|
|
38
60
|
})));
|
|
@@ -66,14 +88,14 @@ var IconToggle = function IconToggle(_ref2) {
|
|
|
66
88
|
name: activeName,
|
|
67
89
|
size: size,
|
|
68
90
|
fixedWidth: fixedWidth,
|
|
69
|
-
|
|
91
|
+
"aria-label": ariaLabel,
|
|
70
92
|
"aria-hidden": !isActive
|
|
71
93
|
}), /*#__PURE__*/React.createElement(ToggleableIcon, {
|
|
72
94
|
active: !isActive,
|
|
73
95
|
name: inactiveName,
|
|
74
96
|
size: size,
|
|
75
97
|
fixedWidth: fixedWidth,
|
|
76
|
-
|
|
98
|
+
"aria-label": ariaLabel,
|
|
77
99
|
"aria-hidden": isActive
|
|
78
100
|
}));
|
|
79
101
|
};
|
|
@@ -81,6 +103,7 @@ IconToggle.displayName = 'Icon.Toggle';
|
|
|
81
103
|
/**
|
|
82
104
|
* **Accessibility note:** It is best practice to wrap `<Icon.Toggle />` in a button. The button must include `aria-label` and `aria-pressed` in order for a screen reader to properly communicate the icon's state. See example below.
|
|
83
105
|
*
|
|
106
|
+
* @link https://www.w3.org/TR/wai-aria-practices-1.1/#button
|
|
84
107
|
* @example
|
|
85
108
|
* const [toggleState, setToggleState] = useState(false);
|
|
86
109
|
* <Button // Wrap Icon.Toggle with Button
|
package/lib/IconViewBoxes.js
CHANGED
|
@@ -174,6 +174,8 @@ module.exports = {
|
|
|
174
174
|
"h3": "0 0 16 16",
|
|
175
175
|
"h4": "0 0 16 16",
|
|
176
176
|
"hamburger": "0 0 16 18",
|
|
177
|
+
"hand-sparkle-outline": "0 0 18 18",
|
|
178
|
+
"hand-sparkle": "0 0 18 18",
|
|
177
179
|
"hashtag": "0 0 16 16",
|
|
178
180
|
"headset": "0 0 16 16",
|
|
179
181
|
"heart-outline": "0 0 16 16",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -39,7 +39,8 @@ var Indicator = /*#__PURE__*/function (_React$Component) {
|
|
|
39
39
|
tabIndex: 0
|
|
40
40
|
}, rest), tooltip && /*#__PURE__*/React.createElement("div", null, tooltip), /*#__PURE__*/React.createElement(Icon, {
|
|
41
41
|
name: "indicator",
|
|
42
|
-
size: "mini"
|
|
42
|
+
size: "mini",
|
|
43
|
+
"aria-hidden": true
|
|
43
44
|
}));
|
|
44
45
|
}
|
|
45
46
|
}]);
|
package/lib/Input/Input.js
CHANGED
|
@@ -62,7 +62,8 @@ var ClearButton = function ClearButton() {
|
|
|
62
62
|
ariaLabel: clearButtonLabel || 'Clear',
|
|
63
63
|
color: "icon.base"
|
|
64
64
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
65
|
-
name: "circlex"
|
|
65
|
+
name: "circlex",
|
|
66
|
+
"aria-hidden": true
|
|
66
67
|
}));
|
|
67
68
|
};
|
|
68
69
|
ClearButton.displayName = 'Input.ClearButton';
|