@sproutsocial/racine 14.2.0 → 14.3.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 +53 -0
- package/__flow__/Icon/Icon.flow.js +3 -1
- package/__flow__/PartnerLogo/PartnerLogo.flow.js +3 -3
- package/commonjs/Badge/Badge.js +2 -1
- package/commonjs/Banner/Banner.js +2 -1
- package/commonjs/Breadcrumb/Breadcrumb.js +2 -1
- 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 +32 -10
- 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/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/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/theme.js +1 -1
- package/commonjs/utils/index.js +12 -2
- package/dist/icon.svg +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/Badge/Badge.d.ts.map +1 -1
- package/dist/types/Banner/styles.d.ts +1 -1
- package/dist/types/Checkbox/styles.d.ts +4 -2
- package/dist/types/Checkbox/styles.d.ts.map +1 -1
- package/dist/types/Drawer/Drawer.d.ts +1 -1
- package/dist/types/Drawer/Drawer.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts +1 -1
- package/dist/types/Icon/Icon.d.ts.map +1 -1
- package/dist/types/Icon/IconTypes.d.ts +3 -2
- package/dist/types/Icon/IconTypes.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts +1 -1
- package/dist/types/PartnerLogo/PartnerLogo.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +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/Select/Select.d.ts.map +1 -1
- package/dist/types/TableRowAccordion/TableRowAccordion.d.ts.map +1 -1
- package/dist/types/Toast/Toast.d.ts.map +1 -1
- package/dist/types/Toast/styles.d.ts +1 -1
- package/dist/types/Token/Token.d.ts.map +1 -1
- package/dist/types/TokenInput/TokenInput.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/index.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/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/Checkbox/styles.js +6 -5
- package/lib/DatePicker/common.js +2 -1
- package/lib/Drawer/Drawer.js +9 -4
- package/lib/Icon/Icon.js +32 -10
- 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/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/themes/dark/theme.js +1 -1
- package/lib/themes/light/theme.js +1 -1
- package/lib/utils/index.js +9 -1
- package/package.json +3 -2
- package/dist/types/PartnerLogo/TypePartnerNames.d.ts +0 -2
- package/dist/types/PartnerLogo/TypePartnerNames.d.ts.map +0 -1
- /package/commonjs/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
- /package/lib/{PartnerLogo/TypePartnerNames.js → IconViewBoxes.d.js} +0 -0
package/commonjs/Token/Token.js
CHANGED
|
@@ -9,6 +9,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _hooks = require("../utils/hooks");
|
|
10
10
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
11
11
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
12
|
+
var _VisuallyHidden = require("../VisuallyHidden");
|
|
12
13
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
14
|
var _excluded = ["children", "closeable", "onClick", "qa", "valid", "disabled", "palette"];
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -47,11 +48,24 @@ var Token = function Token(_ref) {
|
|
|
47
48
|
"data-qa-token-iscloseable": closeable === true,
|
|
48
49
|
"data-qa-token-isvalid": valid === true,
|
|
49
50
|
"data-qa-token-isdisabled": disabled === true
|
|
50
|
-
}, qa, rest),
|
|
51
|
+
}, qa, rest), !valid && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_VisuallyHidden.VisuallyHidden, {
|
|
52
|
+
as: "div",
|
|
53
|
+
role: "status"
|
|
54
|
+
}, "This is an invalid token"), /*#__PURE__*/React.createElement(_Icon.default, {
|
|
55
|
+
"aria-hidden": true,
|
|
56
|
+
pr: 300,
|
|
57
|
+
name: "error",
|
|
58
|
+
size: "mini"
|
|
59
|
+
}), /*#__PURE__*/React.createElement(_VisuallyHidden.VisuallyHidden, null, "Invalid")), closeable ? /*#__PURE__*/React.createElement(_Box.default, {
|
|
51
60
|
display: "flex",
|
|
52
61
|
alignItems: "center",
|
|
53
62
|
justifyContent: "space-between"
|
|
54
|
-
}, /*#__PURE__*/React.createElement(
|
|
63
|
+
}, /*#__PURE__*/React.createElement(_Box.default, {
|
|
64
|
+
as: "span",
|
|
65
|
+
display: "flex",
|
|
66
|
+
alignItems: "center"
|
|
67
|
+
}, children), /*#__PURE__*/React.createElement(_Icon.default, {
|
|
68
|
+
"aria-hidden": true,
|
|
55
69
|
pl: 300,
|
|
56
70
|
name: "x",
|
|
57
71
|
size: "mini"
|
package/commonjs/Token/styles.js
CHANGED
|
@@ -14,7 +14,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
14
14
|
var Container = _styledComponents.default.button.withConfig({
|
|
15
15
|
displayName: "styles__Container",
|
|
16
16
|
componentId: "sc-1mt4sof-0"
|
|
17
|
-
})(["position:relative;display:inline-
|
|
17
|
+
})(["position:relative;display:inline-flex;align-items:center;margin:0;line-height:1;outline:none;", " &:focus{", "}", " ", " ", " ", " ", ""], function (_ref) {
|
|
18
18
|
var theme = _ref.theme;
|
|
19
19
|
return (0, _styledComponents.css)(["", " font-family:", ";font-weight:", ";border:1px solid ", ";border-radius:", ";color:", ";background:", ";padding:", " ", ";transition:all ", " ", ";"], theme.typography[200], theme.fontFamily, theme.fontWeights.normal, theme.colors.container.border.base, theme.radii[500], theme.colors.text.body, theme.colors.container.background.base, theme.space[200], theme.space[300], theme.duration.fast, theme.easing.ease_inout);
|
|
20
20
|
}, _mixins.focusRing, function (_ref2) {
|
|
@@ -201,7 +201,9 @@ var TokenInput = /*#__PURE__*/function (_React$Component) {
|
|
|
201
201
|
}, /*#__PURE__*/React.createElement(_Box.default, {
|
|
202
202
|
display: "flex",
|
|
203
203
|
alignItems: "center"
|
|
204
|
-
},
|
|
204
|
+
},
|
|
205
|
+
// TODO: add the ability to take labels or aria props for accessibility
|
|
206
|
+
iconName && /*#__PURE__*/React.createElement(_Icon.default, {
|
|
205
207
|
name: iconName,
|
|
206
208
|
size: "mini",
|
|
207
209
|
pr: 300
|
|
@@ -179,7 +179,7 @@ var colors = _objectSpread(_objectSpread({}, _theme.default.colors), {}, {
|
|
|
179
179
|
subtext: _seedsColor.default.COLOR_NEUTRAL_300,
|
|
180
180
|
body: _seedsColor.default.COLOR_NEUTRAL_100,
|
|
181
181
|
inverse: _seedsColor.default.COLOR_NEUTRAL_900,
|
|
182
|
-
error:
|
|
182
|
+
error: _decorativePalettes.red.foreground,
|
|
183
183
|
background: {
|
|
184
184
|
highlight: _seedsColor.default.COLOR_YELLOW_900,
|
|
185
185
|
selection: _seedsColor.default.COLOR_BLUE_800
|
|
@@ -182,7 +182,7 @@ var colors = _objectSpread(_objectSpread({
|
|
|
182
182
|
subtext: _seedsColor.default.COLOR_NEUTRAL_700,
|
|
183
183
|
body: _seedsColor.default.COLOR_NEUTRAL_800,
|
|
184
184
|
inverse: _seedsColor.default.COLOR_NEUTRAL_0,
|
|
185
|
-
error:
|
|
185
|
+
error: _decorativePalettes.red.foreground,
|
|
186
186
|
background: {
|
|
187
187
|
highlight: _seedsColor.default.COLOR_YELLOW_200,
|
|
188
188
|
selection: _seedsColor.default.COLOR_BLUE_300
|
package/commonjs/utils/index.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.canUseDOM = void 0;
|
|
7
|
+
exports.includes = includes;
|
|
8
|
+
exports.mergeRefs = void 0;
|
|
7
9
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
8
10
|
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); }
|
|
9
11
|
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; }
|
|
@@ -37,4 +39,12 @@ var mergeRefs = function mergeRefs(refs) {
|
|
|
37
39
|
}
|
|
38
40
|
};
|
|
39
41
|
};
|
|
40
|
-
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Type safe includes with narrowing
|
|
45
|
+
* https://fettblog.eu/typescript-array-includes/
|
|
46
|
+
*/
|
|
47
|
+
exports.mergeRefs = mergeRefs;
|
|
48
|
+
function includes(coll, el) {
|
|
49
|
+
return coll.includes(el);
|
|
50
|
+
}
|