@sproutsocial/racine 14.1.1 → 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 +64 -0
- 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/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 +7 -6
- package/commonjs/DatePicker/common.js +2 -1
- package/commonjs/Drawer/Drawer.js +9 -4
- package/commonjs/Icon/Icon.js +50 -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/Input/styles.js +1 -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/Textarea/styles.js +1 -1
- 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/TokenInput/styles.js +3 -3
- package/commonjs/themes/dark/theme.js +1 -1
- package/commonjs/themes/light/theme.js +3 -3
- package/commonjs/utils/index.js +12 -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 +3 -3
- package/dist/themes/light/theme.scss +3 -3
- 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/EnumIconNames.d.ts +1 -1
- package/dist/types/EnumIconNames.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts +19 -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/Input/styles.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/Textarea/styles.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/TokenInput/styles.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/team-sprout-outline.svg +5 -0
- package/icons/team-sprout.svg +4 -0
- 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 +7 -6
- package/lib/DatePicker/common.js +2 -1
- package/lib/Drawer/Drawer.js +9 -4
- package/lib/Icon/Icon.js +50 -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/Input/styles.js +1 -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/Textarea/styles.js +1 -1
- 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/TokenInput/styles.js +3 -3
- package/lib/themes/dark/theme.js +1 -1
- package/lib/themes/light/theme.js +3 -3
- 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
|
@@ -81,12 +81,16 @@ var TableRowAccordion = /*#__PURE__*/function (_React$Component) {
|
|
|
81
81
|
}));
|
|
82
82
|
}), /*#__PURE__*/React.createElement(_TableCell.default, {
|
|
83
83
|
id: "tableRowAccordion_trigger",
|
|
84
|
-
content:
|
|
84
|
+
content:
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// TODO: This trigger needs an accessible label passed in via props
|
|
87
|
+
React.createElement(_styles.Trigger, {
|
|
85
88
|
"data-tablerowaccordion-trigger": true,
|
|
86
89
|
onClick: this.handleToggle,
|
|
87
90
|
role: "button"
|
|
88
91
|
}, /*#__PURE__*/React.createElement(_Icon.default, {
|
|
89
|
-
name: isExpanded ? 'chevron-up' : 'chevron-down'
|
|
92
|
+
name: isExpanded ? 'chevron-up' : 'chevron-down',
|
|
93
|
+
"aria-hidden": true
|
|
90
94
|
}))
|
|
91
95
|
})), /*#__PURE__*/React.createElement(_styles.Detail, {
|
|
92
96
|
isExpanded: isExpanded,
|
|
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
13
13
|
var Container = _styledComponents.default.div.withConfig({
|
|
14
14
|
displayName: "styles__Container",
|
|
15
15
|
componentId: "sc-12lw4hd-0"
|
|
16
|
-
})(["box-sizing:border-box;position:relative;textarea{box-sizing:border-box;display:block;width:100%;padding:", ";border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";outline:none;resize:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";", " font-weight:", ";appearance:none;&:focus{", "}
|
|
16
|
+
})(["box-sizing:border-box;position:relative;textarea{box-sizing:border-box;display:block;width:100%;padding:", ";border:1px solid ", ";border-radius:", ";background-color:", ";color:", ";outline:none;resize:none;transition:border-color ", " ", ",box-shadow ", " ", ";font-family:", ";", " font-weight:", ";appearance:none;&:focus{", "}&::placeholder{color:", ";font-style:italic;}", " ", " ", "}", " ", " ", ""], function (props) {
|
|
17
17
|
return props.theme.space[300];
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.theme.colors.form.border.base;
|
package/commonjs/Toast/Toast.js
CHANGED
|
@@ -78,40 +78,46 @@ var Toast = function Toast(_ref) {
|
|
|
78
78
|
theme = _ref.theme,
|
|
79
79
|
color = _ref.color,
|
|
80
80
|
icon = _ref.icon;
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
81
|
+
return (
|
|
82
|
+
/*#__PURE__*/
|
|
83
|
+
// TODO: if this closes when clicked, there should be a label saying "Click to close" that can be overriden
|
|
84
|
+
React.createElement(_styles.default, {
|
|
85
|
+
type: theme || 'info',
|
|
86
|
+
customColor: color,
|
|
87
|
+
borderLeft: "2px solid",
|
|
88
|
+
"data-qa-toast": ""
|
|
89
|
+
}, /*#__PURE__*/React.createElement(_Box.default, {
|
|
90
|
+
display: "flex",
|
|
91
|
+
minHeight: "48px",
|
|
92
|
+
maxHeight: "800px",
|
|
93
|
+
p: 350,
|
|
94
|
+
alignItems: "flex-start",
|
|
95
|
+
m: "auto",
|
|
96
|
+
width: 1
|
|
97
|
+
}, /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(_styles.CustomIcon, {
|
|
98
|
+
type: theme || 'info'
|
|
99
|
+
// TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
101
|
+
// @ts-ignore
|
|
102
|
+
,
|
|
103
|
+
color: color,
|
|
104
|
+
customColor: color,
|
|
105
|
+
name: theme ? themeIcon[theme] : icon || themeIcon['info'],
|
|
106
|
+
fixedWidth: true,
|
|
107
|
+
"aria-hidden": true
|
|
108
|
+
})), /*#__PURE__*/React.createElement(_StyledBox2, {
|
|
109
|
+
flex: 1
|
|
110
|
+
}, /*#__PURE__*/React.createElement(_Text.default, {
|
|
111
|
+
as: "div",
|
|
112
|
+
color: "text.body",
|
|
113
|
+
"data-qa-toast-content": ""
|
|
114
|
+
}, content)), /*#__PURE__*/React.createElement(IconBox, null, /*#__PURE__*/React.createElement(_Icon.default, {
|
|
115
|
+
name: "x",
|
|
116
|
+
ml: 400,
|
|
117
|
+
color: "icon.base",
|
|
118
|
+
"aria-hidden": true
|
|
119
|
+
}))))
|
|
120
|
+
);
|
|
115
121
|
};
|
|
116
122
|
var _default = ToastContainer;
|
|
117
123
|
exports.default = _default;
|
|
@@ -44,11 +44,13 @@ var ToggleHint = /*#__PURE__*/function (_React$Component) {
|
|
|
44
44
|
_defineProperty(_assertThisInitialized(_this), "getIcon", function () {
|
|
45
45
|
if (_this.props.icon === 'chevron') {
|
|
46
46
|
return /*#__PURE__*/React.createElement(_Icon.default, {
|
|
47
|
-
name: "chevron-down"
|
|
47
|
+
name: "chevron-down",
|
|
48
|
+
"aria-hidden": true
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
return /*#__PURE__*/React.createElement(_Icon.default, {
|
|
51
|
-
name: _this.props.isOpen ? 'minus' : 'plus'
|
|
52
|
+
name: _this.props.isOpen ? 'minus' : 'plus',
|
|
53
|
+
"aria-hidden": true
|
|
52
54
|
});
|
|
53
55
|
});
|
|
54
56
|
return _this;
|
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
|
|
@@ -13,7 +13,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
13
13
|
var Container = _styledComponents.default.div.withConfig({
|
|
14
14
|
displayName: "styles__Container",
|
|
15
15
|
componentId: "sc-18dw7or-0"
|
|
16
|
-
})(["box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-items:center;align-content:center;cursor:text;width:100%;border:1px solid ", ";border-radius:", ";margin:0;padding:", ";padding-top:", ";background-color:", ";color:", ";transition:border-color ", " ", ",box-shadow ", " ", ";", ";font-family:", ";font-weight:", ";appearance:none;button{margin:", " ", " 0 0;}input{", ";outline:none;border:none;flex:1;padding:0;padding-top:", ";margin:", " ", " ", " 0;color:", ";background-color:", ";min-height:20px;&::-webkit-search-cancel-button{appearance:none;}&:focus{box-shadow:none;}&::-ms-clear{display:none;}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}
|
|
16
|
+
})(["box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-items:center;align-content:center;cursor:text;width:100%;border:1px solid ", ";border-radius:", ";margin:0;padding:", ";padding-top:", ";background-color:", ";color:", ";transition:border-color ", " ", ",box-shadow ", " ", ";", ";font-family:", ";font-weight:", ";appearance:none;button{margin:", " ", " 0 0;}input{", ";outline:none;border:none;flex:1;padding:0;padding-top:", ";margin:", " ", " ", " 0;color:", ";background-color:", ";min-height:20px;&::-webkit-search-cancel-button{appearance:none;}&:focus{box-shadow:none;}&::-ms-clear{display:none;}&:not(output):not(:focus):-moz-ui-invalid{box-shadow:none;}&::placeholder{color:", ";font-style:italic;}", "}", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
17
17
|
return props.theme.colors.form.border.base;
|
|
18
18
|
}, function (props) {
|
|
19
19
|
return props.theme.radii[500];
|
|
@@ -57,10 +57,10 @@ var Container = _styledComponents.default.div.withConfig({
|
|
|
57
57
|
return props.theme.colors.text.body;
|
|
58
58
|
}, function (props) {
|
|
59
59
|
return props.theme.colors.form.background.base;
|
|
60
|
-
}, function (props) {
|
|
61
|
-
return props.disabled && (0, _styledComponents.css)(["opacity:0.4;cursor:not-allowed;"]);
|
|
62
60
|
}, function (props) {
|
|
63
61
|
return props.theme.colors.form.placeholder.base;
|
|
62
|
+
}, function (props) {
|
|
63
|
+
return props.disabled && (0, _styledComponents.css)(["opacity:0.4;cursor:not-allowed;"]);
|
|
64
64
|
}, function (props) {
|
|
65
65
|
return props.hasBeforeElement && (0, _styledComponents.css)(["padding-left:40px;"]);
|
|
66
66
|
}, function (props) {
|
|
@@ -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
|
|
@@ -209,13 +209,13 @@ var colors = _objectSpread(_objectSpread({
|
|
|
209
209
|
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
210
210
|
},
|
|
211
211
|
border: {
|
|
212
|
-
base: _seedsColor.default.
|
|
212
|
+
base: _seedsColor.default.COLOR_NEUTRAL_600,
|
|
213
213
|
error: _decorativePalettes.red.highlight,
|
|
214
214
|
warning: _decorativePalettes.yellow.highlight,
|
|
215
215
|
selected: _seedsColor.default.COLOR_NEUTRAL_800
|
|
216
216
|
},
|
|
217
217
|
placeholder: {
|
|
218
|
-
base: _seedsColor.default.
|
|
218
|
+
base: _seedsColor.default.COLOR_NEUTRAL_700
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
221
|
listItem: {
|
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
|
+
}
|