@sproutsocial/racine 27.0.3 → 27.1.1
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 +14 -0
- package/dist/esm/index.js +45 -221
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +7 -55
- package/dist/index.d.ts +7 -55
- package/dist/index.js +48 -224
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 27.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [bc7d22b]
|
|
8
|
+
- @sproutsocial/seeds-react-accordion@0.1.5
|
|
9
|
+
|
|
10
|
+
## 27.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 94ee89b: Now exporting new seeds-react-accordion from racine
|
|
15
|
+
- 1cb2382: Replaced old breadcrumb package with refactored package
|
|
16
|
+
|
|
3
17
|
## 27.0.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/esm/index.js
CHANGED
|
@@ -12,15 +12,52 @@ import {
|
|
|
12
12
|
useInteractiveColor
|
|
13
13
|
} from "@sproutsocial/seeds-react-hooks";
|
|
14
14
|
export * from "@sproutsocial/seeds-react-mixins";
|
|
15
|
+
export * from "@sproutsocial/seeds-react-accordion";
|
|
15
16
|
export * from "@sproutsocial/seeds-react-avatar";
|
|
16
17
|
export * from "@sproutsocial/seeds-react-badge";
|
|
17
18
|
export * from "@sproutsocial/seeds-react-banner";
|
|
18
19
|
export * from "@sproutsocial/seeds-react-box";
|
|
20
|
+
export * from "@sproutsocial/seeds-react-breadcrumb";
|
|
21
|
+
export * from "@sproutsocial/seeds-react-button";
|
|
22
|
+
export * from "@sproutsocial/seeds-react-card";
|
|
23
|
+
export * from "@sproutsocial/seeds-react-character-counter";
|
|
24
|
+
export * from "@sproutsocial/seeds-react-chart-legend";
|
|
25
|
+
export * from "@sproutsocial/seeds-react-checkbox";
|
|
26
|
+
export * from "@sproutsocial/seeds-react-collapsible";
|
|
27
|
+
export * from "@sproutsocial/seeds-react-datepicker";
|
|
28
|
+
export * from "@sproutsocial/seeds-react-drawer";
|
|
29
|
+
export * from "@sproutsocial/seeds-react-duration";
|
|
30
|
+
export * from "@sproutsocial/seeds-react-empty-state";
|
|
31
|
+
export * from "@sproutsocial/seeds-react-fieldset";
|
|
32
|
+
export * from "@sproutsocial/seeds-react-form-field";
|
|
33
|
+
export * from "@sproutsocial/seeds-react-icon";
|
|
34
|
+
export * from "@sproutsocial/seeds-react-image";
|
|
35
|
+
export * from "@sproutsocial/seeds-react-indicator";
|
|
36
|
+
export * from "@sproutsocial/seeds-react-input";
|
|
37
|
+
export * from "@sproutsocial/seeds-react-keyboard-key";
|
|
38
|
+
export * from "@sproutsocial/seeds-react-label";
|
|
39
|
+
export * from "@sproutsocial/seeds-react-link";
|
|
40
|
+
|
|
41
|
+
// src/Listbox/Listbox.tsx
|
|
42
|
+
import styled3, { css as css2 } from "styled-components";
|
|
43
|
+
|
|
44
|
+
// src/Menu/utils/constants.ts
|
|
45
|
+
var MENU_ROLES = Object.freeze({
|
|
46
|
+
MENU: "menu",
|
|
47
|
+
LIST: "list",
|
|
48
|
+
LISTBOX: "listbox"
|
|
49
|
+
});
|
|
50
|
+
var MENU_ITEM_ROLES = Object.freeze({
|
|
51
|
+
MENUITEM: "menuitem",
|
|
52
|
+
LISTITEM: "listitem",
|
|
53
|
+
OPTION: "option",
|
|
54
|
+
RADIO: "menuitemradio",
|
|
55
|
+
CHECKBOX: "menuitemcheckbox"
|
|
56
|
+
});
|
|
19
57
|
|
|
20
|
-
// src/
|
|
21
|
-
import
|
|
58
|
+
// src/Listbox/Listbox.tsx
|
|
59
|
+
import { Arrow } from "@sproutsocial/seeds-react-select";
|
|
22
60
|
import Icon2 from "@sproutsocial/seeds-react-icon";
|
|
23
|
-
import Link from "@sproutsocial/seeds-react-link";
|
|
24
61
|
|
|
25
62
|
// src/Menu/Menu.tsx
|
|
26
63
|
import {
|
|
@@ -78,20 +115,6 @@ import Radio from "@sproutsocial/seeds-react-radio";
|
|
|
78
115
|
import Switch2 from "@sproutsocial/seeds-react-switch";
|
|
79
116
|
import Text from "@sproutsocial/seeds-react-text";
|
|
80
117
|
|
|
81
|
-
// src/Menu/utils/constants.ts
|
|
82
|
-
var MENU_ROLES = Object.freeze({
|
|
83
|
-
MENU: "menu",
|
|
84
|
-
LIST: "list",
|
|
85
|
-
LISTBOX: "listbox"
|
|
86
|
-
});
|
|
87
|
-
var MENU_ITEM_ROLES = Object.freeze({
|
|
88
|
-
MENUITEM: "menuitem",
|
|
89
|
-
LISTITEM: "listitem",
|
|
90
|
-
OPTION: "option",
|
|
91
|
-
RADIO: "menuitemradio",
|
|
92
|
-
CHECKBOX: "menuitemcheckbox"
|
|
93
|
-
});
|
|
94
|
-
|
|
95
118
|
// src/Menu/utils/descendants.tsx
|
|
96
119
|
import {
|
|
97
120
|
createContext,
|
|
@@ -1112,132 +1135,16 @@ var Menu_default = Menu;
|
|
|
1112
1135
|
// src/Menu/index.ts
|
|
1113
1136
|
var Menu_default2 = Menu_default;
|
|
1114
1137
|
|
|
1115
|
-
// src/Breadcrumb/styles.ts
|
|
1116
|
-
import styled3 from "styled-components";
|
|
1117
|
-
var Nav = styled3.nav`
|
|
1118
|
-
ol {
|
|
1119
|
-
${(props) => props.theme.typography[200]};
|
|
1120
|
-
margin: 0;
|
|
1121
|
-
font-family: ${(props) => props.theme.fontFamily};
|
|
1122
|
-
padding: 0;
|
|
1123
|
-
display: flex;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
li {
|
|
1127
|
-
margin-right: ${(props) => props.theme.space[200]};
|
|
1128
|
-
display: flex;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
a,
|
|
1132
|
-
button {
|
|
1133
|
-
${(props) => props.theme.typography[200]};
|
|
1134
|
-
max-width: 200px;
|
|
1135
|
-
overflow: hidden;
|
|
1136
|
-
text-overflow: ellipsis;
|
|
1137
|
-
white-space: nowrap;
|
|
1138
|
-
|
|
1139
|
-
&:not(.overflow--menu) {
|
|
1140
|
-
margin: 0;
|
|
1141
|
-
padding: 0;
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
ol > div + li::before {
|
|
1146
|
-
content: "/";
|
|
1147
|
-
margin-right: ${(props) => props.theme.space[200]};
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
li:last-child a,
|
|
1151
|
-
li:last-child button {
|
|
1152
|
-
color: ${(props) => props.theme.colors.text.body};
|
|
1153
|
-
font-weight: bold;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
li:not(:last-child)::after {
|
|
1157
|
-
content: "/";
|
|
1158
|
-
color: ${(props) => props.theme.colors.text.body};
|
|
1159
|
-
margin-left: ${(props) => props.theme.space[200]};
|
|
1160
|
-
}
|
|
1161
|
-
`;
|
|
1162
|
-
var styles_default = Nav;
|
|
1163
|
-
|
|
1164
|
-
// src/Breadcrumb/Breadcrumb.tsx
|
|
1165
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1166
|
-
var BreadcrumbItem = ({
|
|
1167
|
-
children,
|
|
1168
|
-
href,
|
|
1169
|
-
...rest
|
|
1170
|
-
}) => {
|
|
1171
|
-
return /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(Link, { href, ...rest, children }) });
|
|
1172
|
-
};
|
|
1173
|
-
var Breadcrumb = ({
|
|
1174
|
-
ariaLabel,
|
|
1175
|
-
overflow,
|
|
1176
|
-
children,
|
|
1177
|
-
...rest
|
|
1178
|
-
}) => {
|
|
1179
|
-
const listItems = React.Children.toArray(children);
|
|
1180
|
-
const lastItem = listItems[listItems.length - 1];
|
|
1181
|
-
return /* @__PURE__ */ jsx3(styles_default, { "aria-label": ariaLabel, "data-qa-breadcrumb": ariaLabel, ...rest, children: /* @__PURE__ */ jsxs2("ol", { children: [
|
|
1182
|
-
overflow && /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(
|
|
1183
|
-
MenuButton,
|
|
1184
|
-
{
|
|
1185
|
-
appearance: "secondary",
|
|
1186
|
-
content: overflow.menu,
|
|
1187
|
-
"aria-label": overflow.label,
|
|
1188
|
-
className: "overflow--menu",
|
|
1189
|
-
px: 200,
|
|
1190
|
-
py: 0,
|
|
1191
|
-
children: /* @__PURE__ */ jsx3(Icon2, { name: "ellipsis-horizontal-solid", "aria-hidden": true })
|
|
1192
|
-
}
|
|
1193
|
-
) }),
|
|
1194
|
-
listItems.map((item, i) => {
|
|
1195
|
-
const itemElem = typeof item === "object" && "props" in item ? item : /* @__PURE__ */ jsx3("span", { children: "item" });
|
|
1196
|
-
return React.cloneElement(itemElem, {
|
|
1197
|
-
...itemElem.props,
|
|
1198
|
-
"aria-current": listItems[i] === lastItem ? "page" : void 0
|
|
1199
|
-
});
|
|
1200
|
-
})
|
|
1201
|
-
] }) });
|
|
1202
|
-
};
|
|
1203
|
-
BreadcrumbItem.displayName = "Breadcrumb.Item";
|
|
1204
|
-
Breadcrumb.Item = BreadcrumbItem;
|
|
1205
|
-
var Breadcrumb_default = Breadcrumb;
|
|
1206
|
-
|
|
1207
|
-
// src/index.ts
|
|
1208
|
-
export * from "@sproutsocial/seeds-react-button";
|
|
1209
|
-
export * from "@sproutsocial/seeds-react-card";
|
|
1210
|
-
export * from "@sproutsocial/seeds-react-character-counter";
|
|
1211
|
-
export * from "@sproutsocial/seeds-react-chart-legend";
|
|
1212
|
-
export * from "@sproutsocial/seeds-react-checkbox";
|
|
1213
|
-
export * from "@sproutsocial/seeds-react-collapsible";
|
|
1214
|
-
export * from "@sproutsocial/seeds-react-datepicker";
|
|
1215
|
-
export * from "@sproutsocial/seeds-react-drawer";
|
|
1216
|
-
export * from "@sproutsocial/seeds-react-duration";
|
|
1217
|
-
export * from "@sproutsocial/seeds-react-empty-state";
|
|
1218
|
-
export * from "@sproutsocial/seeds-react-fieldset";
|
|
1219
|
-
export * from "@sproutsocial/seeds-react-form-field";
|
|
1220
|
-
export * from "@sproutsocial/seeds-react-icon";
|
|
1221
|
-
export * from "@sproutsocial/seeds-react-image";
|
|
1222
|
-
export * from "@sproutsocial/seeds-react-indicator";
|
|
1223
|
-
export * from "@sproutsocial/seeds-react-input";
|
|
1224
|
-
export * from "@sproutsocial/seeds-react-keyboard-key";
|
|
1225
|
-
export * from "@sproutsocial/seeds-react-label";
|
|
1226
|
-
export * from "@sproutsocial/seeds-react-link";
|
|
1227
|
-
|
|
1228
1138
|
// src/Listbox/Listbox.tsx
|
|
1229
|
-
import
|
|
1230
|
-
import { Arrow } from "@sproutsocial/seeds-react-select";
|
|
1231
|
-
import Icon3 from "@sproutsocial/seeds-react-icon";
|
|
1232
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1139
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1233
1140
|
var Listbox = ({
|
|
1234
1141
|
role = MENU_ROLES.LISTBOX,
|
|
1235
1142
|
children,
|
|
1236
1143
|
...rest
|
|
1237
1144
|
}) => {
|
|
1238
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ jsx3(Menu_default2, { ...rest, role, children });
|
|
1239
1146
|
};
|
|
1240
|
-
var ListboxButtonContainer =
|
|
1147
|
+
var ListboxButtonContainer = styled3(MenuButton)`
|
|
1241
1148
|
position: relative;
|
|
1242
1149
|
width: 100%;
|
|
1243
1150
|
border: 1px solid ${(props) => props.theme.colors.form.border.base};
|
|
@@ -1291,7 +1198,7 @@ var ListboxButtonContainer = styled4(MenuButton)`
|
|
|
1291
1198
|
var ListboxButton = ({
|
|
1292
1199
|
children,
|
|
1293
1200
|
...restProps
|
|
1294
|
-
}) => /* @__PURE__ */
|
|
1201
|
+
}) => /* @__PURE__ */ jsxs2(
|
|
1295
1202
|
ListboxButtonContainer,
|
|
1296
1203
|
{
|
|
1297
1204
|
...restProps,
|
|
@@ -1301,7 +1208,7 @@ var ListboxButton = ({
|
|
|
1301
1208
|
},
|
|
1302
1209
|
children: [
|
|
1303
1210
|
children,
|
|
1304
|
-
/* @__PURE__ */
|
|
1211
|
+
/* @__PURE__ */ jsx3(Arrow, { size: restProps.size, children: /* @__PURE__ */ jsx3(Icon2, { name: "chevron-down-outline", fixedWidth: true, "aria-hidden": true }) })
|
|
1305
1212
|
]
|
|
1306
1213
|
}
|
|
1307
1214
|
);
|
|
@@ -1339,87 +1246,6 @@ export * from "@sproutsocial/seeds-react-tabs";
|
|
|
1339
1246
|
export * from "@sproutsocial/seeds-react-text";
|
|
1340
1247
|
export * from "@sproutsocial/seeds-react-textarea";
|
|
1341
1248
|
export * from "@sproutsocial/seeds-react-toast";
|
|
1342
|
-
|
|
1343
|
-
// src/ToggleHint/ToggleHint.tsx
|
|
1344
|
-
import * as React2 from "react";
|
|
1345
|
-
import Icon4 from "@sproutsocial/seeds-react-icon";
|
|
1346
|
-
|
|
1347
|
-
// src/ToggleHint/styles.ts
|
|
1348
|
-
import styled5, { css as css3 } from "styled-components";
|
|
1349
|
-
import { COMMON } from "@sproutsocial/seeds-react-system-props";
|
|
1350
|
-
import { visuallyHidden } from "@sproutsocial/seeds-react-mixins";
|
|
1351
|
-
var Container = styled5.div`
|
|
1352
|
-
position: relative;
|
|
1353
|
-
display: inline-block;
|
|
1354
|
-
padding: ${(props) => props.theme.space[100]};
|
|
1355
|
-
color: currentColor;
|
|
1356
|
-
|
|
1357
|
-
${(props) => props.icon === "chevron" && css3`
|
|
1358
|
-
transition: transform
|
|
1359
|
-
${(props2) => `${props2.theme.duration.medium} ${props2.theme.easing.ease_inout}`};
|
|
1360
|
-
|
|
1361
|
-
${props.isOpen && css3`
|
|
1362
|
-
transform: rotateX(180deg);
|
|
1363
|
-
`}
|
|
1364
|
-
`}
|
|
1365
|
-
|
|
1366
|
-
${COMMON}
|
|
1367
|
-
`;
|
|
1368
|
-
var IconText = styled5.div`
|
|
1369
|
-
${visuallyHidden}
|
|
1370
|
-
`;
|
|
1371
|
-
var styles_default2 = Container;
|
|
1372
|
-
|
|
1373
|
-
// src/ToggleHint/ToggleHint.tsx
|
|
1374
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1375
|
-
var ToggleHint = class extends React2.Component {
|
|
1376
|
-
static defaultProps = {
|
|
1377
|
-
isOpen: false,
|
|
1378
|
-
icon: "chevron"
|
|
1379
|
-
};
|
|
1380
|
-
getIcon = () => {
|
|
1381
|
-
if (this.props.icon === "chevron") {
|
|
1382
|
-
return /* @__PURE__ */ jsx5(Icon4, { name: "chevron-down-outline", "aria-hidden": true });
|
|
1383
|
-
}
|
|
1384
|
-
return /* @__PURE__ */ jsx5(
|
|
1385
|
-
Icon4,
|
|
1386
|
-
{
|
|
1387
|
-
name: this.props.isOpen ? "minus-outline" : "plus-outline",
|
|
1388
|
-
"aria-hidden": true
|
|
1389
|
-
}
|
|
1390
|
-
);
|
|
1391
|
-
};
|
|
1392
|
-
render() {
|
|
1393
|
-
const {
|
|
1394
|
-
icon,
|
|
1395
|
-
isOpen,
|
|
1396
|
-
openString,
|
|
1397
|
-
closeString,
|
|
1398
|
-
qa,
|
|
1399
|
-
className,
|
|
1400
|
-
color,
|
|
1401
|
-
...rest
|
|
1402
|
-
} = this.props;
|
|
1403
|
-
return /* @__PURE__ */ jsxs4(
|
|
1404
|
-
styles_default2,
|
|
1405
|
-
{
|
|
1406
|
-
icon,
|
|
1407
|
-
isOpen,
|
|
1408
|
-
className: `ToggleHint ${className}`,
|
|
1409
|
-
"data-qa-togglehint-isopen": isOpen,
|
|
1410
|
-
color,
|
|
1411
|
-
...qa,
|
|
1412
|
-
...rest,
|
|
1413
|
-
children: [
|
|
1414
|
-
this.getIcon(),
|
|
1415
|
-
/* @__PURE__ */ jsx5(IconText, { children: isOpen ? closeString : openString })
|
|
1416
|
-
]
|
|
1417
|
-
}
|
|
1418
|
-
);
|
|
1419
|
-
}
|
|
1420
|
-
};
|
|
1421
|
-
|
|
1422
|
-
// src/index.ts
|
|
1423
1249
|
export * from "@sproutsocial/seeds-react-token";
|
|
1424
1250
|
export * from "@sproutsocial/seeds-react-token-input";
|
|
1425
1251
|
export * from "@sproutsocial/seeds-react-tooltip";
|
|
@@ -1428,7 +1254,6 @@ export * from "@sproutsocial/seeds-react-data-table";
|
|
|
1428
1254
|
import { Banner } from "@sproutsocial/seeds-react-banner";
|
|
1429
1255
|
export {
|
|
1430
1256
|
Banner as Alert,
|
|
1431
|
-
Breadcrumb_default as Breadcrumb,
|
|
1432
1257
|
DescendantProvider,
|
|
1433
1258
|
Listbox_default as Listbox,
|
|
1434
1259
|
ListboxButton,
|
|
@@ -1444,7 +1269,6 @@ export {
|
|
|
1444
1269
|
LogoNamesWithoutVariants as PartnerLogoNames,
|
|
1445
1270
|
IllustrationNames as SpotIllustrationNames,
|
|
1446
1271
|
default2 as ThemeProvider,
|
|
1447
|
-
ToggleHint,
|
|
1448
1272
|
canUseDOM,
|
|
1449
1273
|
createDescendantContext,
|
|
1450
1274
|
createNamedContext,
|