@sproutsocial/racine 15.1.0 → 17.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 +79 -0
- package/__flow__/Badge/Badge.flow.js +3 -1
- package/__flow__/Badge/constants.flow.js +14 -1
- package/__flow__/Banner/Banner.flow.js +7 -0
- package/__flow__/DatePicker/DateRangePicker/DateRangePicker.flow.js +1 -0
- package/__flow__/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +1 -0
- package/__flow__/EnumIconNames.flow.js +1 -1
- package/__flow__/EnumIllustrationNames.flow.js +1 -1
- package/__flow__/EnumLogoNames.flow.js +1 -1
- package/__flow__/Icon/Icon.flow.js +2 -2
- package/__flow__/IconViewBoxes.js +1 -0
- package/__flow__/IllustrationViewBoxes.js +1 -0
- package/__flow__/LogoViewBoxes.js +14 -0
- package/__flow__/PartnerLogo/PartnerLogo.flow.js +7 -2
- package/__flow__/PartnerLogo/index.flow.js +1 -2
- package/__flow__/Switch/Switch.flow.js +2 -21
- package/__flow__/Switch/SwitchTypes.flow.js +16 -0
- package/__flow__/Switch/index.flow.js +2 -1
- package/__flow__/Toast/Toast.flow.js +2 -2
- package/__flow__/index.flow.js +2 -4
- package/commonjs/Badge/Badge.flow.js +1 -0
- package/commonjs/Badge/constants.flow.js +20 -1
- package/commonjs/Badge/constants.js +16 -2
- package/commonjs/Banner/Banner.js +4 -3
- package/commonjs/Card/Card.js +14 -9
- package/commonjs/Card/index.js +8 -1
- package/commonjs/Card/styles.js +40 -12
- package/commonjs/Card/subComponents.js +38 -5
- package/commonjs/Card/utils.js +9 -5
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +30 -5
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.js +29 -5
- package/commonjs/DatePicker/common.js +18 -2
- package/commonjs/Icon/Icon.js +3 -2
- package/commonjs/IconViewBoxes.js +1 -0
- package/commonjs/IllustrationViewBoxes.js +1 -0
- package/commonjs/LogoViewBoxes.js +14 -0
- package/commonjs/PartnerLogo/PartnerLogo.js +34 -29
- package/commonjs/PartnerLogo/PartnerLogoTypes.js +14 -3
- package/commonjs/PartnerLogo/index.flow.js +0 -11
- package/commonjs/Popout/Popout.js +4 -3
- package/commonjs/SpotIllustration/illustrationNames.js +1 -1
- package/commonjs/Switch/Switch.js +43 -77
- package/commonjs/Switch/index.flow.js +11 -0
- package/commonjs/Switch/styles.js +61 -37
- package/commonjs/Table/Table.js +20 -13
- package/commonjs/TableHeaderCell/TableHeaderCell.js +17 -4
- package/commonjs/TableHeaderCell/styles.js +6 -1
- package/commonjs/Tabs/Tabs.js +7 -2
- package/commonjs/iconNames.js +8 -0
- package/commonjs/illustrationNames.js +8 -0
- package/commonjs/index.flow.js +12 -8
- package/commonjs/index.js +24 -0
- package/commonjs/logoNames.js +8 -0
- package/dist/icon.svg +1 -1
- package/dist/iconList.js +1 -1
- package/dist/illustration.svg +1 -1
- package/dist/illustrationList.js +1 -1
- package/dist/logo.svg +1 -1
- package/dist/logoList.js +1 -1
- package/dist/types/Badge/BadgeTypes.d.ts +3 -1
- package/dist/types/Badge/BadgeTypes.d.ts.map +1 -1
- package/dist/types/Badge/constants.d.ts +13 -0
- package/dist/types/Badge/constants.d.ts.map +1 -1
- package/dist/types/Banner/Banner.d.ts +1 -1
- package/dist/types/Banner/Banner.d.ts.map +1 -1
- package/dist/types/Banner/BannerTypes.d.ts +3 -0
- package/dist/types/Banner/BannerTypes.d.ts.map +1 -1
- package/dist/types/Banner/__tests__/BannerTypes.d.ts +2 -0
- package/dist/types/Banner/__tests__/BannerTypes.d.ts.map +1 -0
- package/dist/types/Card/Card.d.ts.map +1 -1
- package/dist/types/Card/CardTypes.d.ts +9 -0
- package/dist/types/Card/CardTypes.d.ts.map +1 -1
- package/dist/types/Card/index.d.ts +1 -1
- package/dist/types/Card/index.d.ts.map +1 -1
- package/dist/types/Card/styles.d.ts +8 -0
- package/dist/types/Card/styles.d.ts.map +1 -1
- package/dist/types/Card/subComponents.d.ts +5 -0
- package/dist/types/Card/subComponents.d.ts.map +1 -1
- package/dist/types/Card/utils.d.ts +2 -1
- package/dist/types/Card/utils.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts +2 -1
- package/dist/types/DatePicker/DateRangePicker/DateRangePickerTypes.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts +2 -1
- package/dist/types/DatePicker/SingleDatePicker/SingleDatePickerTypes.d.ts.map +1 -1
- package/dist/types/DatePicker/common.d.ts +2 -0
- package/dist/types/DatePicker/common.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/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/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/PartnerLogo/PartnerLogo.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +13 -4
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- package/dist/types/Popout/Popout.d.ts +1 -1
- package/dist/types/Popout/Popout.d.ts.map +1 -1
- package/dist/types/SpotIllustration/illustrationNames.d.ts.map +1 -1
- package/dist/types/Switch/Switch.d.ts +15 -12
- package/dist/types/Switch/Switch.d.ts.map +1 -1
- package/dist/types/Switch/SwitchTypes.d.ts +4 -11
- package/dist/types/Switch/SwitchTypes.d.ts.map +1 -1
- package/dist/types/Switch/styles.d.ts +4 -5
- package/dist/types/Switch/styles.d.ts.map +1 -1
- package/dist/types/Table/Table.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/TableHeaderCell/styles.d.ts +1 -0
- package/dist/types/TableHeaderCell/styles.d.ts.map +1 -1
- package/dist/types/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/Toast/ToastTypes.d.ts +2 -2
- package/dist/types/Toast/ToastTypes.d.ts.map +1 -1
- package/dist/types/iconNames.d.ts +3 -0
- package/dist/types/iconNames.d.ts.map +1 -0
- package/dist/types/illustrationNames.d.ts +3 -0
- package/dist/types/illustrationNames.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logoNames.d.ts +3 -0
- package/dist/types/logoNames.d.ts.map +1 -0
- package/icons/quotes-solid.svg +3 -0
- package/lib/Badge/Badge.flow.js +2 -1
- package/lib/Badge/constants.flow.js +13 -0
- package/lib/Badge/constants.js +13 -0
- package/lib/Banner/Banner.js +4 -3
- package/lib/Card/Card.js +15 -10
- package/lib/Card/index.js +1 -1
- package/lib/Card/styles.js +38 -12
- package/lib/Card/subComponents.js +34 -4
- package/lib/Card/utils.js +9 -5
- package/lib/DatePicker/DateRangePicker/DateRangePicker.js +32 -7
- package/lib/DatePicker/SingleDatePicker/SingleDatePicker.js +31 -7
- package/lib/DatePicker/common.js +14 -0
- package/lib/Icon/Icon.js +3 -2
- package/lib/IconViewBoxes.js +1 -0
- package/lib/IllustrationViewBoxes.js +1 -0
- package/lib/LogoViewBoxes.js +14 -0
- package/lib/PartnerLogo/PartnerLogo.js +34 -27
- package/lib/PartnerLogo/PartnerLogoTypes.js +13 -2
- package/lib/PartnerLogo/index.flow.js +1 -2
- package/lib/Popout/Popout.js +4 -3
- package/lib/SpotIllustration/illustrationNames.js +1 -1
- package/lib/Switch/Switch.js +41 -77
- package/lib/Switch/index.flow.js +2 -1
- package/lib/Switch/styles.js +60 -35
- package/lib/Table/Table.js +20 -13
- package/lib/TableHeaderCell/TableHeaderCell.js +18 -5
- package/lib/TableHeaderCell/styles.js +4 -0
- package/lib/Tabs/Tabs.js +7 -2
- package/lib/iconNames.js +1 -0
- package/lib/illustrationNames.js +1 -0
- package/lib/index.flow.js +1 -1
- package/lib/index.js +4 -0
- package/lib/logoNames.js +1 -0
- package/package.json +6 -3
- package/__flow__/PartnerLogo/TypePartnerNames.flow.js +0 -3
- /package/commonjs/{PartnerLogo/TypePartnerNames.flow.js → Switch/SwitchTypes.flow.js} +0 -0
- /package/lib/{PartnerLogo/TypePartnerNames.flow.js → Switch/SwitchTypes.flow.js} +0 -0
package/commonjs/Card/styles.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledSelectedIcon = exports.StyledCardHeader = exports.StyledCardFooter = exports.StyledCardContent = exports.StyledCard = exports.SelectedIconWrapper = void 0;
|
|
6
|
+
exports.StyledSelectedIcon = exports.StyledCardLink = exports.StyledCardHeader = exports.StyledCardFooter = exports.StyledCardContent = exports.StyledCardAffordance = exports.StyledCard = exports.SelectedIconWrapper = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _styledSystem = require("styled-system");
|
|
9
9
|
var _mixins = require("../utils/mixins");
|
|
@@ -69,10 +69,23 @@ var StyledSelectedIcon = (0, _styledComponents.default)(_Icon.default).withConfi
|
|
|
69
69
|
return $selected && "\n opacity: 1;\n ";
|
|
70
70
|
});
|
|
71
71
|
exports.StyledSelectedIcon = StyledSelectedIcon;
|
|
72
|
+
var StyledCardLink = _styledComponents.default.a.withConfig({
|
|
73
|
+
displayName: "styles__StyledCardLink",
|
|
74
|
+
componentId: "sc-9tyqu4-5"
|
|
75
|
+
})(["font-family:", ";font-weight:", ";color:", ";", ";", " ", ""], function (p) {
|
|
76
|
+
return p.theme.fontFamily;
|
|
77
|
+
}, function (p) {
|
|
78
|
+
return p.theme.fontWeights.bold;
|
|
79
|
+
}, function (p) {
|
|
80
|
+
return p.theme.colors.text.headline;
|
|
81
|
+
}, function (p) {
|
|
82
|
+
return p.theme.typography[400];
|
|
83
|
+
}, _styledSystem.color, _styledSystem.typography);
|
|
84
|
+
exports.StyledCardLink = StyledCardLink;
|
|
72
85
|
var StyledCard = _styledComponents.default.div.withConfig({
|
|
73
86
|
displayName: "styles__StyledCard",
|
|
74
|
-
componentId: "sc-9tyqu4-
|
|
75
|
-
})(["position:relative;display:flex;flex-direction:column;box-sizing:border-box;margin:0;background:", ";border:", " solid ", ";padding:", ";border-radius:", ";transition:box-shadow ", ",border ", ";&[role='
|
|
87
|
+
componentId: "sc-9tyqu4-6"
|
|
88
|
+
})(["position:relative;display:flex;flex-direction:column;box-sizing:border-box;margin:0;background:", ";border:", " solid ", ";padding:", ";border-radius:", ";transition:box-shadow ", ",border ", ";&[role='button'],&[role='checkbox']{cursor:pointer;}", " &:hover{box-shadow:", ";}&:focus-within{", " ", ":focus{border:none;box-shadow:none;outline:none;}}&:focus{", "}", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (_ref11) {
|
|
76
89
|
var theme = _ref11.theme;
|
|
77
90
|
return theme.colors.container.background.base;
|
|
78
91
|
}, function (_ref12) {
|
|
@@ -95,16 +108,31 @@ var StyledCard = _styledComponents.default.div.withConfig({
|
|
|
95
108
|
var theme = _ref17.theme;
|
|
96
109
|
return theme.duration.medium;
|
|
97
110
|
}, function (_ref18) {
|
|
98
|
-
var
|
|
99
|
-
|
|
100
|
-
|
|
111
|
+
var $isRoleLink = _ref18.$isRoleLink;
|
|
112
|
+
return $isRoleLink && "\n\t\tcursor: pointer;\n\t";
|
|
113
|
+
}, function (_ref19) {
|
|
114
|
+
var theme = _ref19.theme,
|
|
115
|
+
_ref19$$elevation = _ref19.$elevation,
|
|
116
|
+
$elevation = _ref19$$elevation === void 0 ? 'low' : _ref19$$elevation;
|
|
101
117
|
return theme.shadows[$elevation];
|
|
102
|
-
}, _mixins.focusRing, function (_ref19) {
|
|
103
|
-
var $disabled = _ref19.$disabled;
|
|
104
|
-
return $disabled && "\n ".concat(_mixins.disabled, "\n ");
|
|
105
118
|
}, function (_ref20) {
|
|
106
|
-
var $
|
|
107
|
-
|
|
119
|
+
var $isRoleLink = _ref20.$isRoleLink;
|
|
120
|
+
return $isRoleLink ? _mixins.focusRing : null;
|
|
121
|
+
}, StyledCardLink, _mixins.focusRing, function (_ref21) {
|
|
122
|
+
var $disabled = _ref21.$disabled;
|
|
123
|
+
return $disabled && "\n ".concat(_mixins.disabled, "\n ");
|
|
124
|
+
}, function (_ref22) {
|
|
125
|
+
var $selected = _ref22.$selected,
|
|
126
|
+
theme = _ref22.theme;
|
|
108
127
|
return $selected && "\n border: ".concat(theme.borderWidths[500], " solid ").concat(theme.colors.container.border.selected, "; \n ");
|
|
109
128
|
}, _styledSystem.border, _styledSystem.color, _styledSystem.flexbox, _styledSystem.grid, _styledSystem.layout, _styledSystem.position, _styledSystem.space);
|
|
110
|
-
exports.StyledCard = StyledCard;
|
|
129
|
+
exports.StyledCard = StyledCard;
|
|
130
|
+
var StyledCardAffordance = (0, _styledComponents.default)(_Icon.default).withConfig({
|
|
131
|
+
displayName: "styles__StyledCardAffordance",
|
|
132
|
+
componentId: "sc-9tyqu4-7"
|
|
133
|
+
})(["", ":hover &{transform:translateX(", ");}transition:", ";"], StyledCard, function (p) {
|
|
134
|
+
return p.theme.space[200];
|
|
135
|
+
}, function (p) {
|
|
136
|
+
return p.theme.duration.medium;
|
|
137
|
+
});
|
|
138
|
+
exports.StyledCardAffordance = StyledCardAffordance;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.SelectedIcon = exports.CardHeader = exports.CardFooter = exports.CardContent = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
exports.SelectedIcon = exports.CardLink = exports.CardHeader = exports.CardFooter = exports.CardContent = exports.CardAffordance = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _utils = require("./utils");
|
|
9
10
|
var _styles = require("./styles");
|
|
10
11
|
var _excluded = ["children"],
|
|
11
12
|
_excluded2 = ["children"],
|
|
12
|
-
_excluded3 = ["children"]
|
|
13
|
-
|
|
13
|
+
_excluded3 = ["children"],
|
|
14
|
+
_excluded4 = ["affordance", "children"];
|
|
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
|
+
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 _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
18
|
+
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); }
|
|
14
19
|
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; }
|
|
15
20
|
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; }
|
|
16
21
|
var CardContent = function CardContent(_ref) {
|
|
@@ -45,4 +50,32 @@ var SelectedIcon = function SelectedIcon(_ref4) {
|
|
|
45
50
|
$selected: $selected
|
|
46
51
|
}));
|
|
47
52
|
};
|
|
48
|
-
exports.SelectedIcon = SelectedIcon;
|
|
53
|
+
exports.SelectedIcon = SelectedIcon;
|
|
54
|
+
var CardAffordance = function CardAffordance(_ref5) {
|
|
55
|
+
var rest = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledCardAffordance, _extends({}, rest, {
|
|
57
|
+
size: "mini",
|
|
58
|
+
name: "arrow-right",
|
|
59
|
+
"aria-hidden": true
|
|
60
|
+
}));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// jsdocs, never types?
|
|
64
|
+
exports.CardAffordance = CardAffordance;
|
|
65
|
+
var CardLink = function CardLink(_ref6) {
|
|
66
|
+
var affordance = _ref6.affordance,
|
|
67
|
+
children = _ref6.children,
|
|
68
|
+
rest = _objectWithoutProperties(_ref6, _excluded4);
|
|
69
|
+
var _useContext = (0, _react.useContext)(_utils.SubComponentContext),
|
|
70
|
+
href = _useContext.href,
|
|
71
|
+
linkRef = _useContext.linkRef;
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledCardLink, _extends({}, rest, {
|
|
73
|
+
target: "_blank",
|
|
74
|
+
rel: "noreferrer",
|
|
75
|
+
href: href,
|
|
76
|
+
ref: linkRef
|
|
77
|
+
}), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, affordance ? /*#__PURE__*/_react.default.createElement(CardAffordance, {
|
|
78
|
+
ml: 300
|
|
79
|
+
}) : null));
|
|
80
|
+
};
|
|
81
|
+
exports.CardLink = CardLink;
|
package/commonjs/Card/utils.js
CHANGED
|
@@ -7,13 +7,17 @@ exports.onKeyDown = exports.navigateTo = exports.SubComponentContext = void 0;
|
|
|
7
7
|
exports.useChildContext = useChildContext;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _utils = require("../utils");
|
|
10
|
-
var SubComponentContext = /*#__PURE__*/(0, _react.createContext)(
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
12
|
-
function () {}
|
|
10
|
+
var SubComponentContext = /*#__PURE__*/(0, _react.createContext)({
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
12
|
+
setHasSubComponent: function setHasSubComponent() {},
|
|
13
|
+
href: '',
|
|
14
|
+
linkRef: null
|
|
15
|
+
});
|
|
13
16
|
exports.SubComponentContext = SubComponentContext;
|
|
14
17
|
function useChildContext() {
|
|
15
|
-
var
|
|
16
|
-
|
|
18
|
+
var _useContext = (0, _react.useContext)(SubComponentContext),
|
|
19
|
+
setHasSubComponent = _useContext.setHasSubComponent;
|
|
20
|
+
setHasSubComponent && setHasSubComponent(true);
|
|
17
21
|
}
|
|
18
22
|
var navigateTo = function navigateTo(_ref) {
|
|
19
23
|
var _ref$current, _window$open;
|
|
@@ -9,27 +9,52 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _DayPickerRangeController = _interopRequireDefault(require("react-dates/lib/components/DayPickerRangeController"));
|
|
10
10
|
var _styles = require("../styles");
|
|
11
11
|
var _common = require("../common");
|
|
12
|
-
var
|
|
12
|
+
var _VisuallyHidden = require("../../VisuallyHidden");
|
|
13
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
|
+
var _excluded = ["startDate", "endDate", "onDatesChange", "setStatusText", "initialVisibleMonth", "numberOfMonths"];
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
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); }
|
|
15
17
|
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; }
|
|
16
18
|
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); }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
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."); }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
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; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
25
|
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; }
|
|
18
26
|
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; }
|
|
19
27
|
var DateRangePicker = function DateRangePicker(_ref) {
|
|
28
|
+
var _ref2, _initialVisibleMonth;
|
|
20
29
|
var _ref$startDate = _ref.startDate,
|
|
21
30
|
startDate = _ref$startDate === void 0 ? null : _ref$startDate,
|
|
22
31
|
_ref$endDate = _ref.endDate,
|
|
23
32
|
endDate = _ref$endDate === void 0 ? null : _ref$endDate,
|
|
24
33
|
onDatesChange = _ref.onDatesChange,
|
|
34
|
+
_ref$setStatusText = _ref.setStatusText,
|
|
35
|
+
setStatusText = _ref$setStatusText === void 0 ? _common.DefaultSetStatusText : _ref$setStatusText,
|
|
36
|
+
initialVisibleMonth = _ref.initialVisibleMonth,
|
|
37
|
+
_ref$numberOfMonths = _ref.numberOfMonths,
|
|
38
|
+
numberOfMonths = _ref$numberOfMonths === void 0 ? 2 : _ref$numberOfMonths,
|
|
25
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
|
|
40
|
+
var _useState = (0, _react.useState)(setStatusText((0, _common.getVisibleMonths)((0, _moment.default)((_ref2 = (_initialVisibleMonth = initialVisibleMonth === null || initialVisibleMonth === void 0 ? void 0 : initialVisibleMonth()) !== null && _initialVisibleMonth !== void 0 ? _initialVisibleMonth : startDate) !== null && _ref2 !== void 0 ? _ref2 : undefined), numberOfMonths))),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
statusText = _useState2[0],
|
|
43
|
+
updateStatusText = _useState2[1];
|
|
44
|
+
var handleMonthClick = function handleMonthClick(month) {
|
|
45
|
+
updateStatusText(setStatusText((0, _common.getVisibleMonths)(month, numberOfMonths)));
|
|
46
|
+
};
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ReactDatesCssOverrides, null), /*#__PURE__*/_react.default.createElement(_VisuallyHidden.VisuallyHidden, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
role: "status"
|
|
49
|
+
}, statusText)), /*#__PURE__*/_react.default.createElement(_DayPickerRangeController.default, _extends({}, _common.commonDatePickerProps, {
|
|
27
50
|
startDate: startDate,
|
|
28
51
|
endDate: endDate,
|
|
29
52
|
onDatesChange: onDatesChange,
|
|
30
|
-
numberOfMonths:
|
|
31
|
-
initialVisibleMonth: null
|
|
32
|
-
|
|
53
|
+
numberOfMonths: numberOfMonths,
|
|
54
|
+
initialVisibleMonth: initialVisibleMonth || null,
|
|
55
|
+
onPrevMonthClick: handleMonthClick,
|
|
56
|
+
onNextMonthClick: handleMonthClick
|
|
57
|
+
}, rest)));
|
|
33
58
|
};
|
|
34
59
|
var _default = DateRangePicker;
|
|
35
60
|
exports.default = _default;
|
|
@@ -9,29 +9,53 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _DayPickerSingleDateController = _interopRequireDefault(require("react-dates/lib/components/DayPickerSingleDateController"));
|
|
10
10
|
var _styles = require("../styles");
|
|
11
11
|
var _common = require("../common");
|
|
12
|
-
var
|
|
12
|
+
var _VisuallyHidden = require("../../VisuallyHidden");
|
|
13
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
14
|
+
var _excluded = ["onDateChange", "setStatusText", "date", "focused", "onFocusChange", "initialVisibleMonth", "numberOfMonths"];
|
|
13
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
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); }
|
|
15
17
|
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; }
|
|
16
18
|
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); }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
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."); }
|
|
21
|
+
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); }
|
|
22
|
+
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; }
|
|
23
|
+
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; } }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
25
|
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; }
|
|
18
26
|
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; }
|
|
19
27
|
var SingleDatePicker = function SingleDatePicker(_ref) {
|
|
20
28
|
var onDateChange = _ref.onDateChange,
|
|
29
|
+
_ref$setStatusText = _ref.setStatusText,
|
|
30
|
+
setStatusText = _ref$setStatusText === void 0 ? _common.DefaultSetStatusText : _ref$setStatusText,
|
|
21
31
|
_ref$date = _ref.date,
|
|
22
32
|
date = _ref$date === void 0 ? null : _ref$date,
|
|
23
33
|
_ref$focused = _ref.focused,
|
|
24
34
|
focused = _ref$focused === void 0 ? false : _ref$focused,
|
|
25
35
|
_ref$onFocusChange = _ref.onFocusChange,
|
|
26
36
|
onFocusChange = _ref$onFocusChange === void 0 ? function () {} : _ref$onFocusChange,
|
|
37
|
+
initialVisibleMonth = _ref.initialVisibleMonth,
|
|
38
|
+
_ref$numberOfMonths = _ref.numberOfMonths,
|
|
39
|
+
numberOfMonths = _ref$numberOfMonths === void 0 ? 1 : _ref$numberOfMonths,
|
|
27
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
|
|
41
|
+
var _useState = (0, _react.useState)(setStatusText((0, _common.getVisibleMonths)((0, _moment.default)((initialVisibleMonth === null || initialVisibleMonth === void 0 ? void 0 : initialVisibleMonth()) || date || undefined), numberOfMonths))),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
statusText = _useState2[0],
|
|
44
|
+
updateStatusText = _useState2[1];
|
|
45
|
+
var handleMonthClick = function handleMonthClick(date) {
|
|
46
|
+
updateStatusText(setStatusText((0, _common.getVisibleMonths)(date, numberOfMonths)));
|
|
47
|
+
};
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.ReactDatesCssOverrides, null), /*#__PURE__*/_react.default.createElement(_VisuallyHidden.VisuallyHidden, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
role: "status"
|
|
50
|
+
}, statusText)), /*#__PURE__*/_react.default.createElement(_DayPickerSingleDateController.default, _extends({}, _common.commonDatePickerProps, {
|
|
29
51
|
date: date,
|
|
30
|
-
numberOfMonths:
|
|
52
|
+
numberOfMonths: numberOfMonths,
|
|
31
53
|
onDateChange: onDateChange,
|
|
32
|
-
initialVisibleMonth: null,
|
|
54
|
+
initialVisibleMonth: initialVisibleMonth || null,
|
|
33
55
|
focused: focused,
|
|
34
|
-
onFocusChange: onFocusChange
|
|
56
|
+
onFocusChange: onFocusChange,
|
|
57
|
+
onPrevMonthClick: handleMonthClick,
|
|
58
|
+
onNextMonthClick: handleMonthClick
|
|
35
59
|
}, rest)));
|
|
36
60
|
};
|
|
37
61
|
var _default = /*#__PURE__*/_react.default.memo(SingleDatePicker);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getVisibleMonthWithReactDatesInternalApi = exports.formatDateAsCalendarHeader = exports.formatDateAsCalendarDay = exports.commonDatePickerProps = exports.CalendarNavButton = void 0;
|
|
6
|
+
exports.getVisibleMonths = exports.getVisibleMonthWithReactDatesInternalApi = exports.formatDateAsCalendarHeader = exports.formatDateAsCalendarDay = exports.commonDatePickerProps = exports.DefaultSetStatusText = exports.CalendarNavButton = void 0;
|
|
7
7
|
require("react-dates/initialize");
|
|
8
8
|
require("react-dates/lib/css/_datepicker.css");
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -54,4 +54,20 @@ var getVisibleMonthWithReactDatesInternalApi = function getVisibleMonthWithReact
|
|
|
54
54
|
var _container$querySelec, _container$querySelec2;
|
|
55
55
|
return (_container$querySelec = (_container$querySelec2 = container.querySelector('[data-visible=true] strong')) === null || _container$querySelec2 === void 0 ? void 0 : _container$querySelec2.textContent) !== null && _container$querySelec !== void 0 ? _container$querySelec : '';
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
|
|
58
|
+
// Receives a single Moment and returns an array of Moments, one for each currently visible month.
|
|
59
|
+
exports.getVisibleMonthWithReactDatesInternalApi = getVisibleMonthWithReactDatesInternalApi;
|
|
60
|
+
var getVisibleMonths = function getVisibleMonths(initialMonth, numberOfMonths) {
|
|
61
|
+
var months = [initialMonth];
|
|
62
|
+
for (var i = 1; i < numberOfMonths; i++) {
|
|
63
|
+
months.push(initialMonth.clone().add(i, 'month'));
|
|
64
|
+
}
|
|
65
|
+
return months;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// Default setStatusText prop for both SingleDatePicker and DateRangePicker
|
|
69
|
+
exports.getVisibleMonths = getVisibleMonths;
|
|
70
|
+
var DefaultSetStatusText = function DefaultSetStatusText(dates) {
|
|
71
|
+
return dates.map(formatDateAsCalendarHeader).join(', ');
|
|
72
|
+
};
|
|
73
|
+
exports.DefaultSetStatusText = DefaultSetStatusText;
|
package/commonjs/Icon/Icon.js
CHANGED
|
@@ -9,8 +9,9 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
10
|
var _IconViewBoxes = _interopRequireDefault(require("../IconViewBoxes"));
|
|
11
11
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
12
|
-
var _PartnerLogo =
|
|
12
|
+
var _PartnerLogo = _interopRequireDefault(require("../PartnerLogo"));
|
|
13
13
|
var _utils = require("../utils");
|
|
14
|
+
var _logoNames = _interopRequireDefault(require("../logoNames"));
|
|
14
15
|
var _deprecatedIcons = _interopRequireDefault(require("./deprecatedIcons"));
|
|
15
16
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
16
17
|
var _excluded = ["name", "size", "fixedWidth", "ariaLabel", "color", "svgProps"],
|
|
@@ -31,7 +32,7 @@ var Icon = function Icon(_ref) {
|
|
|
31
32
|
color = _ref.color,
|
|
32
33
|
svgProps = _ref.svgProps,
|
|
33
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
if ((0, _utils.includes)(
|
|
35
|
+
if ((0, _utils.includes)(_logoNames.default, name)) {
|
|
35
36
|
// Icon's "default" size is equivalent to PartnerLogo's "small" size
|
|
36
37
|
var logoSize = size === 'default' ? 'small' : size;
|
|
37
38
|
var logoProps = {
|
|
@@ -24,6 +24,7 @@ module.exports = {
|
|
|
24
24
|
"contact": "0 0 305 145",
|
|
25
25
|
"conversation": "0 0 330 236",
|
|
26
26
|
"custom-branding": "0 0 168 164",
|
|
27
|
+
"custom-post-variables": "0 0 87 57",
|
|
27
28
|
"customer-service": "0 0 302 155",
|
|
28
29
|
"dashboard": "0 0 337 195",
|
|
29
30
|
"exclamation-mark": "0 0 219 143",
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
"adobe-experience-manager-dark": "0 0 16 17",
|
|
5
5
|
"adobe-experience-manager": "0 0 16 17",
|
|
6
|
+
"android-dark": "0 0 18 18",
|
|
7
|
+
"android": "0 0 18 18",
|
|
6
8
|
"apple-app-store-dark": "0 0 140 140",
|
|
7
9
|
"apple-app-store": "0 0 140 140",
|
|
10
|
+
"apple-dark": "0 0 18 18",
|
|
11
|
+
"apple": "0 0 18 18",
|
|
8
12
|
"bigcommerce-dark": "0 0 140 140",
|
|
9
13
|
"bigcommerce-lockup-dark": "0 0 291 66",
|
|
10
14
|
"bigcommerce-lockup": "0 0 291 66",
|
|
@@ -31,6 +35,8 @@ module.exports = {
|
|
|
31
35
|
"facebook": "0 0 141 139",
|
|
32
36
|
"feedly-dark": "0 0 141 123",
|
|
33
37
|
"feedly": "0 0 141 123",
|
|
38
|
+
"github-dark": "0 0 18 18",
|
|
39
|
+
"github": "0 0 18 18",
|
|
34
40
|
"glassdoor-dark": "0 0 140 196",
|
|
35
41
|
"glassdoor": "0 0 140 196",
|
|
36
42
|
"google-analytics-dark": "0 0 140 160",
|
|
@@ -59,8 +65,12 @@ module.exports = {
|
|
|
59
65
|
"microsoft-dynamics": "0 0 140 227",
|
|
60
66
|
"pinterest-dark": "0 0 140 141",
|
|
61
67
|
"pinterest": "0 0 140 141",
|
|
68
|
+
"reddit-alien-dark": "0 0 18 18",
|
|
69
|
+
"reddit-alien": "0 0 18 18",
|
|
62
70
|
"reddit-dark": "0 0 140 140",
|
|
63
71
|
"reddit": "0 0 140 140",
|
|
72
|
+
"salesforce-cloud-dark": "0 0 20 18",
|
|
73
|
+
"salesforce-cloud": "0 0 20 18",
|
|
64
74
|
"salesforce-dark": "0 0 140 99",
|
|
65
75
|
"salesforce": "0 0 140 99",
|
|
66
76
|
"shopify-dark": "0 0 140 159",
|
|
@@ -73,6 +83,10 @@ module.exports = {
|
|
|
73
83
|
"sproutsocial-wordmark-dark": "0 0 320 52",
|
|
74
84
|
"sproutsocial-wordmark": "0 0 320 52",
|
|
75
85
|
"sproutsocial": "0 0 140 174",
|
|
86
|
+
"tableau-dark": "0 0 18 18",
|
|
87
|
+
"tableau-lockup-dark": "0 0 291 56",
|
|
88
|
+
"tableau-lockup": "0 0 291 56",
|
|
89
|
+
"tableau": "0 0 18 18",
|
|
76
90
|
"tiktok-dark": "0 0 140 159",
|
|
77
91
|
"tiktok": "0 0 140 159",
|
|
78
92
|
"tripadvisor-dark": "0 0 140 140",
|
|
@@ -1,47 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _styledComponents = require("styled-components");
|
|
10
|
-
var
|
|
9
|
+
var _LogoViewBoxes = _interopRequireDefault(require("../LogoViewBoxes"));
|
|
11
10
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
12
11
|
var _excluded = ["partnerName", "backgroundType", "logoType", "height", "width", "size", "aria-label", "svgProps"];
|
|
13
|
-
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); }
|
|
14
|
-
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; }
|
|
15
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
13
|
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); }
|
|
17
14
|
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; }
|
|
18
15
|
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; }
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
var whichLogo = function whichLogo(_ref, mode) {
|
|
17
|
+
var backgroundType = _ref.backgroundType,
|
|
18
|
+
logoType = _ref.logoType,
|
|
19
|
+
partnerName = _ref.partnerName;
|
|
20
|
+
var logo = logoType && logoType !== 'symbol' ? partnerName + '-' + logoType : partnerName;
|
|
21
|
+
if (backgroundType && backgroundType === 'dark') {
|
|
22
|
+
return "".concat(logo, "-dark");
|
|
23
|
+
} else if (backgroundType && backgroundType === 'light') {
|
|
24
|
+
return logo;
|
|
25
|
+
} else if (mode === 'dark') {
|
|
26
|
+
return "".concat(logo, "-dark");
|
|
27
|
+
} else {
|
|
28
|
+
return logo;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var PartnerLogo = function PartnerLogo(_ref2) {
|
|
32
|
+
var partnerName = _ref2.partnerName,
|
|
33
|
+
backgroundType = _ref2.backgroundType,
|
|
34
|
+
_ref2$logoType = _ref2.logoType,
|
|
35
|
+
logoType = _ref2$logoType === void 0 ? 'symbol' : _ref2$logoType,
|
|
36
|
+
height = _ref2.height,
|
|
37
|
+
width = _ref2.width,
|
|
38
|
+
size = _ref2.size,
|
|
39
|
+
ariaLabel = _ref2['aria-label'],
|
|
40
|
+
svgProps = _ref2.svgProps,
|
|
41
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
30
42
|
var _useTheme = (0, _styledComponents.useTheme)(),
|
|
31
43
|
mode = _useTheme.mode;
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} else if (mode === 'dark') {
|
|
39
|
-
return "".concat(logo, "-dark");
|
|
40
|
-
} else {
|
|
41
|
-
return logo;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
var logoViewBox = logoViewBoxes[whichLogo(backgroundType)];
|
|
44
|
+
var logo = whichLogo({
|
|
45
|
+
backgroundType: backgroundType,
|
|
46
|
+
logoType: logoType,
|
|
47
|
+
partnerName: partnerName
|
|
48
|
+
}, mode);
|
|
49
|
+
var logoViewBox = _LogoViewBoxes.default[logo];
|
|
45
50
|
var viewBoxCoordinates = (logoViewBox === null || logoViewBox === void 0 ? void 0 : logoViewBox.split(' ')) || [];
|
|
46
51
|
var defaultWidth = viewBoxCoordinates[2];
|
|
47
52
|
var defaultHeight = viewBoxCoordinates[3];
|
|
@@ -61,7 +66,7 @@ var PartnerLogo = function PartnerLogo(_ref) {
|
|
|
61
66
|
"data-qa-logo-svg": "".concat(partnerName, "-svg")
|
|
62
67
|
}, svgProps), /*#__PURE__*/_react.default.createElement("use", {
|
|
63
68
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
64
|
-
xlinkHref: "#sslogosvg-".concat(
|
|
69
|
+
xlinkHref: "#sslogosvg-".concat(logo)
|
|
65
70
|
})));
|
|
66
71
|
};
|
|
67
72
|
var _default = PartnerLogo;
|
|
@@ -3,8 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.PartnerNames = exports.PartnerLogoSizes = void 0;
|
|
7
|
-
var
|
|
6
|
+
exports.PartnerNames = exports.PartnerLogoTypes = exports.PartnerLogoSizes = void 0;
|
|
7
|
+
var _logoNames = _interopRequireDefault(require("../logoNames"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use PartnerLogoNames instead
|
|
11
|
+
*/
|
|
12
|
+
var PartnerNames = _logoNames.default;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use EnumLogoNames instead
|
|
16
|
+
*/
|
|
8
17
|
exports.PartnerNames = PartnerNames;
|
|
9
18
|
var PartnerLogoSizes = {
|
|
10
19
|
mini: '12px',
|
|
@@ -13,4 +22,6 @@ var PartnerLogoSizes = {
|
|
|
13
22
|
large: '32px',
|
|
14
23
|
jumbo: '64px'
|
|
15
24
|
};
|
|
16
|
-
exports.PartnerLogoSizes = PartnerLogoSizes;
|
|
25
|
+
exports.PartnerLogoSizes = PartnerLogoSizes;
|
|
26
|
+
var PartnerLogoTypes = ['symbol', 'wordmark', 'lockup'];
|
|
27
|
+
exports.PartnerLogoTypes = PartnerLogoTypes;
|
|
@@ -13,15 +13,4 @@ Object.keys(_PartnerLogo).forEach(function (key) {
|
|
|
13
13
|
return _PartnerLogo[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
});
|
|
17
|
-
var _TypePartnerNames = require("./TypePartnerNames.flow");
|
|
18
|
-
Object.keys(_TypePartnerNames).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _TypePartnerNames[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _TypePartnerNames[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
16
|
});
|
|
@@ -15,7 +15,7 @@ var _hooks = require("../utils/hooks");
|
|
|
15
15
|
var _Portal = _interopRequireDefault(require("../Portal"));
|
|
16
16
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
17
17
|
var _styles = require("./styles");
|
|
18
|
-
var _excluded = ["isOpen", "setIsOpen", "content", "children", "placement", "fullWidth", "zIndex", "focusOnContent", "onOpen", "onClose", "qa", "popperProps", "scheduleUpdateRef", "appendToBody", "focusLockProps", "color"],
|
|
18
|
+
var _excluded = ["isOpen", "setIsOpen", "content", "children", "placement", "fullWidth", "zIndex", "focusOnContent", "onOpen", "onClose", "qa", "popperProps", "scheduleUpdateRef", "appendToBody", "focusLockProps", "color", "aria-haspopup"],
|
|
19
19
|
_excluded2 = ["autoFocus", "returnFocus"],
|
|
20
20
|
_excluded3 = ["children"];
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -96,6 +96,7 @@ function Popout(_ref) {
|
|
|
96
96
|
_ref$focusLockProps = _ref.focusLockProps,
|
|
97
97
|
focusLockProps = _ref$focusLockProps === void 0 ? {} : _ref$focusLockProps,
|
|
98
98
|
color = _ref.color,
|
|
99
|
+
ariaHasPopup = _ref['aria-haspopup'],
|
|
99
100
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
100
101
|
var PopoutComponentWrapper = appendToBody ? _Portal.default : React.Fragment;
|
|
101
102
|
var _useState = (0, React.useState)(false),
|
|
@@ -194,9 +195,9 @@ function Popout(_ref) {
|
|
|
194
195
|
var ariaProps = (0, React.useMemo)(function () {
|
|
195
196
|
return {
|
|
196
197
|
'aria-expanded': isShown,
|
|
197
|
-
'aria-haspopup': true
|
|
198
|
+
'aria-haspopup': ariaHasPopup ? ariaHasPopup : true
|
|
198
199
|
};
|
|
199
|
-
}, [isShown]);
|
|
200
|
+
}, [isShown, ariaHasPopup]);
|
|
200
201
|
|
|
201
202
|
// In cases where a controlled popout is used (e.g. props.isOpen is true), we need
|
|
202
203
|
// to wait for the targetRef to receive a value before rendering the popout. Otherwise,
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.illustrationNames = void 0;
|
|
7
|
-
var illustrationNames = Object.freeze(["abacus", "analytics-offering", "asset-cards", "astronaut", "binoculars", "brand-keyword", "browser-doc", "business", "calendar-event", "calendar-reporting", "cat-error", "cat-no-access", "cat", "checkbox-alert", "coffee-cup", "competitors", "compose-window", "compose", "computer-error", "connect", "contact", "conversation", "custom-branding", "customer-service", "dashboard", "exclamation-mark", "face-happy", "find-bookmark", "flask", "general-topic", "global-features", "global-trend", "grow-large", "grow", "hands-raised", "headset", "heartbeat-connection", "instagram-links", "invoice", "jewel", "keyword-tracking", "lightbulb-alt", "lightbulb", "like-conversation", "link-broken", "link-messages", "link-sections", "link-upload", "listening-pendo", "listening-sentiment", "listening-topic-templates", "listening-tour", "listening", "loading", "mailbox-empty", "mailbox-full", "megaphone", "message", "molecule", "network-data", "no-messages-found", "no-notifications", "note", "notification", "notifications-onboarding", "notifications", "organize-message", "outbox-queue", "outbox-reviews", "pdf", "planning", "podium", "pointer", "publish-assets", "publish-links", "publishing-notifications", "publishing", "puzzle-piece", "question-mark", "reporting-folder", "reporting", "review-location", "review", "robot-assembly", "robot-error", "robot-happy", "rocket", "schedule-date", "schedule-messages", "search-keywords", "search-success", "search-trends", "search", "security", "sentiment", "shopping-bag", "spark-line", "sprout-mobile-app", "stamp", "storefront", "success", "tag-message", "tag", "team-roles", "team", "telescope", "tha-mel", "thumbs-up", "toggle-switch", "toolset-strength", "tracking-time", "twitter-messages", "twitter-profiles", "under-construction", "unsubscribe", "upward-trend", "user-task", "user-team", "variable-table", "view-connections", "vip-list", "warning", "wifi", "workflow-steps"]);
|
|
7
|
+
var illustrationNames = Object.freeze(["abacus", "analytics-offering", "asset-cards", "astronaut", "binoculars", "brand-keyword", "browser-doc", "business", "calendar-event", "calendar-reporting", "cat-error", "cat-no-access", "cat", "checkbox-alert", "coffee-cup", "competitors", "compose-window", "compose", "computer-error", "connect", "contact", "conversation", "custom-branding", "custom-post-variables", "customer-service", "dashboard", "exclamation-mark", "face-happy", "find-bookmark", "flask", "general-topic", "global-features", "global-trend", "grow-large", "grow", "hands-raised", "headset", "heartbeat-connection", "instagram-links", "invoice", "jewel", "keyword-tracking", "lightbulb-alt", "lightbulb", "like-conversation", "link-broken", "link-messages", "link-sections", "link-upload", "listening-pendo", "listening-sentiment", "listening-topic-templates", "listening-tour", "listening", "loading", "mailbox-empty", "mailbox-full", "megaphone", "message", "molecule", "network-data", "no-messages-found", "no-notifications", "note", "notification", "notifications-onboarding", "notifications", "organize-message", "outbox-queue", "outbox-reviews", "pdf", "planning", "podium", "pointer", "publish-assets", "publish-links", "publishing-notifications", "publishing", "puzzle-piece", "question-mark", "reporting-folder", "reporting", "review-location", "review", "robot-assembly", "robot-error", "robot-happy", "rocket", "schedule-date", "schedule-messages", "search-keywords", "search-success", "search-trends", "search", "security", "sentiment", "shopping-bag", "spark-line", "sprout-mobile-app", "stamp", "storefront", "success", "tag-message", "tag", "team-roles", "team", "telescope", "tha-mel", "thumbs-up", "toggle-switch", "toolset-strength", "tracking-time", "twitter-messages", "twitter-profiles", "under-construction", "unsubscribe", "upward-trend", "user-task", "user-team", "variable-table", "view-connections", "vip-list", "warning", "wifi", "workflow-steps"]);
|
|
8
8
|
exports.illustrationNames = illustrationNames;
|