@sproutsocial/seeds-react-content-block 0.5.3 → 0.5.14
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/dist/content-block.css +48 -0
- package/dist/esm/index.js +221 -32
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +218 -32
- package/dist/index.js.map +1 -1
- package/package.json +21 -9
- package/.eslintignore +0 -6
- package/.eslintrc.js +0 -4
- package/.turbo/turbo-build.log +0 -21
- package/CHANGELOG.md +0 -324
- package/jest.config.js +0 -9
- package/src/ContentBlock.stories.tsx +0 -189
- package/src/ContentBlock.tsx +0 -198
- package/src/__tests__/content-block.test.tsx +0 -280
- package/src/index.ts +0 -6
- package/src/styled.d.ts +0 -7
- package/src/styles.ts +0 -19
- package/tsconfig.json +0 -9
- package/tsup.config.ts +0 -12
package/dist/index.js
CHANGED
|
@@ -36,19 +36,188 @@ __export(index_exports, {
|
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/ContentBlock.tsx
|
|
39
|
-
var
|
|
39
|
+
var import_react4 = require("react");
|
|
40
40
|
var import_seeds_react_box2 = require("@sproutsocial/seeds-react-box");
|
|
41
|
+
|
|
42
|
+
// src/ContentBlockHybrid.tsx
|
|
43
|
+
var import_react3 = require("react");
|
|
44
|
+
var import_seeds_react_system_props = require("@sproutsocial/seeds-react-system-props");
|
|
45
|
+
|
|
46
|
+
// src/ContentBlockTailwind.tsx
|
|
47
|
+
var import_react = require("react");
|
|
41
48
|
var import_seeds_react_loader = require("@sproutsocial/seeds-react-loader");
|
|
42
49
|
var import_seeds_react_collapsible = require("@sproutsocial/seeds-react-collapsible");
|
|
43
50
|
var import_seeds_react_content_header = require("@sproutsocial/seeds-react-content-header");
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
+
function cn(...inputs) {
|
|
53
|
+
const classes = [];
|
|
54
|
+
for (const input of inputs) {
|
|
55
|
+
if (!input) continue;
|
|
56
|
+
if (typeof input === "string") {
|
|
57
|
+
classes.push(input);
|
|
58
|
+
} else if (typeof input === "object") {
|
|
59
|
+
for (const [key, value] of Object.entries(input)) {
|
|
60
|
+
if (value) {
|
|
61
|
+
classes.push(key);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return classes.join(" ");
|
|
67
|
+
}
|
|
68
|
+
var ContentFooterTailwind = ({
|
|
69
|
+
footerContent,
|
|
70
|
+
footerActions,
|
|
71
|
+
className
|
|
72
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("seeds-content-block-footer", className), children: [
|
|
73
|
+
footerContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: footerContent }),
|
|
74
|
+
footerActions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: footerActions })
|
|
75
|
+
] });
|
|
76
|
+
var ContentArea = ({
|
|
77
|
+
isLoading,
|
|
78
|
+
children,
|
|
79
|
+
flushLayout,
|
|
80
|
+
hasFooter,
|
|
81
|
+
contentProps
|
|
82
|
+
}) => {
|
|
83
|
+
const { className, ...domProps } = contentProps ?? {};
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
...domProps,
|
|
88
|
+
className: cn(
|
|
89
|
+
"seeds-content-block-content",
|
|
90
|
+
{
|
|
91
|
+
flush: !!flushLayout,
|
|
92
|
+
"no-footer": !hasFooter
|
|
93
|
+
},
|
|
94
|
+
className
|
|
95
|
+
),
|
|
96
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "seeds-content-block-loader", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_seeds_react_loader.Loader, { delay: false }) }) : children
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
var CollapsibleContentBlock = ({
|
|
101
|
+
title,
|
|
102
|
+
subtitle,
|
|
103
|
+
titleAs = "h2",
|
|
104
|
+
subtitleAs = "h3",
|
|
105
|
+
children,
|
|
106
|
+
isLoading,
|
|
107
|
+
headerActions,
|
|
108
|
+
flushLayout,
|
|
109
|
+
footerContent,
|
|
110
|
+
footerActions,
|
|
111
|
+
contentProps,
|
|
112
|
+
isOpen: controlledIsOpen,
|
|
113
|
+
defaultOpen = true,
|
|
114
|
+
onOpenChange
|
|
115
|
+
}) => {
|
|
116
|
+
const [internalOpen, setInternalOpen] = (0, import_react.useState)(defaultOpen);
|
|
117
|
+
const open = controlledIsOpen !== void 0 ? controlledIsOpen : internalOpen;
|
|
118
|
+
const hasFooter = !!(footerContent || footerActions);
|
|
119
|
+
const handleOpenChange = (newOpen) => {
|
|
120
|
+
if (controlledIsOpen === void 0) {
|
|
121
|
+
setInternalOpen(newOpen);
|
|
122
|
+
}
|
|
123
|
+
onOpenChange?.(newOpen);
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_seeds_react_collapsible.Collapsible, { isOpen: open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "seeds-content-block", children: [
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
+
import_seeds_react_content_header.CollapsibleContentHeader,
|
|
128
|
+
{
|
|
129
|
+
title,
|
|
130
|
+
subtitle,
|
|
131
|
+
headingLevel: titleAs,
|
|
132
|
+
subtitleAs,
|
|
133
|
+
headerActions,
|
|
134
|
+
trigger: import_seeds_react_collapsible.Collapsible.Trigger,
|
|
135
|
+
triggerPosition: "left"
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_seeds_react_collapsible.Collapsible.Panel, { children: [
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
ContentArea,
|
|
141
|
+
{
|
|
142
|
+
isLoading,
|
|
143
|
+
flushLayout,
|
|
144
|
+
hasFooter,
|
|
145
|
+
contentProps,
|
|
146
|
+
children
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
hasFooter && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
|
+
ContentFooterTailwind,
|
|
151
|
+
{
|
|
152
|
+
footerContent,
|
|
153
|
+
footerActions
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] })
|
|
157
|
+
] }) });
|
|
158
|
+
};
|
|
159
|
+
var ContentBlockTailwind = ({
|
|
160
|
+
isCollapsible,
|
|
161
|
+
...props
|
|
162
|
+
}) => {
|
|
163
|
+
if (isCollapsible) {
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollapsibleContentBlock, { ...props });
|
|
165
|
+
}
|
|
166
|
+
const {
|
|
167
|
+
title,
|
|
168
|
+
subtitle,
|
|
169
|
+
titleAs = "h2",
|
|
170
|
+
subtitleAs = "h3",
|
|
171
|
+
children,
|
|
172
|
+
isLoading,
|
|
173
|
+
headerActions,
|
|
174
|
+
flushLayout,
|
|
175
|
+
footerContent,
|
|
176
|
+
footerActions,
|
|
177
|
+
contentProps
|
|
178
|
+
} = props;
|
|
179
|
+
const hasFooter = !!(footerContent || footerActions);
|
|
180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "seeds-content-block", children: [
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
182
|
+
import_seeds_react_content_header.ContentHeader,
|
|
183
|
+
{
|
|
184
|
+
title,
|
|
185
|
+
subtitle,
|
|
186
|
+
headingLevel: titleAs,
|
|
187
|
+
subtitleAs,
|
|
188
|
+
headerActions
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
192
|
+
ContentArea,
|
|
193
|
+
{
|
|
194
|
+
isLoading,
|
|
195
|
+
flushLayout,
|
|
196
|
+
hasFooter,
|
|
197
|
+
contentProps,
|
|
198
|
+
children
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
hasFooter && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
202
|
+
ContentFooterTailwind,
|
|
203
|
+
{
|
|
204
|
+
footerContent,
|
|
205
|
+
footerActions
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
] });
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// src/ContentBlockStyled.tsx
|
|
212
|
+
var import_react2 = require("react");
|
|
213
|
+
var import_seeds_react_box = require("@sproutsocial/seeds-react-box");
|
|
214
|
+
var import_seeds_react_loader2 = require("@sproutsocial/seeds-react-loader");
|
|
215
|
+
var import_seeds_react_collapsible2 = require("@sproutsocial/seeds-react-collapsible");
|
|
216
|
+
var import_seeds_react_content_header2 = require("@sproutsocial/seeds-react-content-header");
|
|
44
217
|
var import_seeds_react_container = require("@sproutsocial/seeds-react-container");
|
|
45
218
|
|
|
46
219
|
// src/styles.ts
|
|
47
220
|
var import_styled_components = __toESM(require("styled-components"));
|
|
48
|
-
var import_seeds_react_box = require("@sproutsocial/seeds-react-box");
|
|
49
|
-
var ContentBlockContent = (0, import_styled_components.default)(import_seeds_react_box.Box)`
|
|
50
|
-
padding: ${({ theme }) => theme.space[400]};
|
|
51
|
-
`;
|
|
52
221
|
var FooterContainer = import_styled_components.default.div`
|
|
53
222
|
box-sizing: border-box;
|
|
54
223
|
display: flex;
|
|
@@ -62,32 +231,32 @@ var FooterContainer = import_styled_components.default.div`
|
|
|
62
231
|
border-bottom-right-radius: ${({ theme }) => theme.radii.outer};
|
|
63
232
|
`;
|
|
64
233
|
|
|
65
|
-
// src/
|
|
66
|
-
var
|
|
67
|
-
var
|
|
234
|
+
// src/ContentBlockStyled.tsx
|
|
235
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
236
|
+
var ContentArea2 = ({
|
|
68
237
|
isLoading,
|
|
69
238
|
children,
|
|
70
239
|
contentProps,
|
|
71
240
|
flushLayout,
|
|
72
241
|
hasFooter
|
|
73
|
-
}) => /* @__PURE__ */ (0,
|
|
74
|
-
|
|
242
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
243
|
+
import_seeds_react_box.Box,
|
|
75
244
|
{
|
|
76
245
|
p: flushLayout ? 0 : 400,
|
|
77
246
|
...contentProps,
|
|
78
247
|
borderBottomLeftRadius: hasFooter ? void 0 : "outer",
|
|
79
248
|
borderBottomRightRadius: hasFooter ? void 0 : "outer",
|
|
80
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
249
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_seeds_react_box.Box, { my: 400, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_seeds_react_loader2.Loader, { delay: false }) }) : children
|
|
81
250
|
}
|
|
82
251
|
);
|
|
83
252
|
var ContentFooter = ({
|
|
84
253
|
footerContent,
|
|
85
254
|
footerActions
|
|
86
|
-
}) => /* @__PURE__ */ (0,
|
|
87
|
-
footerContent && /* @__PURE__ */ (0,
|
|
88
|
-
footerActions && /* @__PURE__ */ (0,
|
|
255
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(FooterContainer, { children: [
|
|
256
|
+
footerContent && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: footerContent }),
|
|
257
|
+
footerActions && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: footerActions })
|
|
89
258
|
] });
|
|
90
|
-
var
|
|
259
|
+
var CollapsibleContentBlock2 = ({
|
|
91
260
|
title,
|
|
92
261
|
subtitle,
|
|
93
262
|
titleAs = "h2",
|
|
@@ -103,7 +272,7 @@ var CollapsibleContentBlock = ({
|
|
|
103
272
|
defaultOpen = true,
|
|
104
273
|
onOpenChange
|
|
105
274
|
}) => {
|
|
106
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
275
|
+
const [internalOpen, setInternalOpen] = (0, import_react2.useState)(defaultOpen);
|
|
107
276
|
const open = controlledIsOpen !== void 0 ? controlledIsOpen : internalOpen;
|
|
108
277
|
const hasFooter = !!(footerContent || footerActions);
|
|
109
278
|
const handleOpenChange = (newOpen) => {
|
|
@@ -112,22 +281,22 @@ var CollapsibleContentBlock = ({
|
|
|
112
281
|
}
|
|
113
282
|
onOpenChange?.(newOpen);
|
|
114
283
|
};
|
|
115
|
-
return /* @__PURE__ */ (0,
|
|
116
|
-
/* @__PURE__ */ (0,
|
|
117
|
-
|
|
284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_seeds_react_collapsible2.Collapsible, { isOpen: open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_seeds_react_container.Container, { as: "section", children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
286
|
+
import_seeds_react_content_header2.CollapsibleContentHeader,
|
|
118
287
|
{
|
|
119
288
|
title,
|
|
120
289
|
subtitle,
|
|
121
290
|
headingLevel: titleAs,
|
|
122
291
|
subtitleAs,
|
|
123
292
|
headerActions,
|
|
124
|
-
trigger:
|
|
293
|
+
trigger: import_seeds_react_collapsible2.Collapsible.Trigger,
|
|
125
294
|
triggerPosition: "left"
|
|
126
295
|
}
|
|
127
296
|
),
|
|
128
|
-
/* @__PURE__ */ (0,
|
|
129
|
-
/* @__PURE__ */ (0,
|
|
130
|
-
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_seeds_react_collapsible2.Collapsible.Panel, { children: [
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
299
|
+
ContentArea2,
|
|
131
300
|
{
|
|
132
301
|
isLoading,
|
|
133
302
|
contentProps,
|
|
@@ -136,7 +305,7 @@ var CollapsibleContentBlock = ({
|
|
|
136
305
|
children
|
|
137
306
|
}
|
|
138
307
|
),
|
|
139
|
-
hasFooter && /* @__PURE__ */ (0,
|
|
308
|
+
hasFooter && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
140
309
|
ContentFooter,
|
|
141
310
|
{
|
|
142
311
|
footerContent,
|
|
@@ -146,9 +315,12 @@ var CollapsibleContentBlock = ({
|
|
|
146
315
|
] })
|
|
147
316
|
] }) });
|
|
148
317
|
};
|
|
149
|
-
var
|
|
318
|
+
var ContentBlockStyled = ({
|
|
319
|
+
isCollapsible,
|
|
320
|
+
...props
|
|
321
|
+
}) => {
|
|
150
322
|
if (isCollapsible) {
|
|
151
|
-
return /* @__PURE__ */ (0,
|
|
323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CollapsibleContentBlock2, { ...props });
|
|
152
324
|
}
|
|
153
325
|
const {
|
|
154
326
|
title,
|
|
@@ -164,9 +336,9 @@ var ContentBlock = ({ isCollapsible, ...props }) => {
|
|
|
164
336
|
footerActions
|
|
165
337
|
} = props;
|
|
166
338
|
const hasFooter = !!(footerContent || footerActions);
|
|
167
|
-
return /* @__PURE__ */ (0,
|
|
168
|
-
/* @__PURE__ */ (0,
|
|
169
|
-
|
|
339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_seeds_react_container.Container, { as: "section", children: [
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
341
|
+
import_seeds_react_content_header2.ContentHeader,
|
|
170
342
|
{
|
|
171
343
|
title,
|
|
172
344
|
subtitle,
|
|
@@ -175,8 +347,8 @@ var ContentBlock = ({ isCollapsible, ...props }) => {
|
|
|
175
347
|
headerActions
|
|
176
348
|
}
|
|
177
349
|
),
|
|
178
|
-
/* @__PURE__ */ (0,
|
|
179
|
-
|
|
350
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
351
|
+
ContentArea2,
|
|
180
352
|
{
|
|
181
353
|
isLoading,
|
|
182
354
|
contentProps,
|
|
@@ -185,7 +357,7 @@ var ContentBlock = ({ isCollapsible, ...props }) => {
|
|
|
185
357
|
children
|
|
186
358
|
}
|
|
187
359
|
),
|
|
188
|
-
hasFooter && /* @__PURE__ */ (0,
|
|
360
|
+
hasFooter && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
189
361
|
ContentFooter,
|
|
190
362
|
{
|
|
191
363
|
footerContent,
|
|
@@ -194,6 +366,20 @@ var ContentBlock = ({ isCollapsible, ...props }) => {
|
|
|
194
366
|
)
|
|
195
367
|
] });
|
|
196
368
|
};
|
|
369
|
+
|
|
370
|
+
// src/ContentBlockHybrid.tsx
|
|
371
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
372
|
+
var ContentBlockHybrid = (props) => {
|
|
373
|
+
if (props.contentProps && (0, import_seeds_react_system_props.hasStyledProps)(props.contentProps)) {
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ContentBlockStyled, { ...props });
|
|
375
|
+
}
|
|
376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ContentBlockTailwind, { ...props });
|
|
377
|
+
};
|
|
378
|
+
var ContentBlockHybrid_default = ContentBlockHybrid;
|
|
379
|
+
|
|
380
|
+
// src/ContentBlock.tsx
|
|
381
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
382
|
+
var ContentBlock = (props) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ContentBlockHybrid_default, { ...props });
|
|
197
383
|
var ContentBlock_default = ContentBlock;
|
|
198
384
|
|
|
199
385
|
// src/index.ts
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/ContentBlock.tsx","../src/styles.ts"],"sourcesContent":["import ContentBlock from \"./ContentBlock\";\n\nexport type { ContentBlockProps } from \"./ContentBlock\";\n\nexport default ContentBlock;\nexport { ContentBlock };\n","import React, { useState } from \"react\";\nimport { Box } from \"@sproutsocial/seeds-react-box\";\nimport { Loader } from \"@sproutsocial/seeds-react-loader\";\nimport { Collapsible } from \"@sproutsocial/seeds-react-collapsible\";\nimport {\n ContentHeader,\n CollapsibleContentHeader,\n} from \"@sproutsocial/seeds-react-content-header\";\nimport { Container } from \"@sproutsocial/seeds-react-container\";\nimport { FooterContainer } from \"./styles\";\n\ninterface ContentBlockBaseProps {\n title: string;\n subtitle?: string;\n titleAs?: \"h1\" | \"h2\" | \"h3\" | \"h4\";\n subtitleAs?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"p\";\n isLoading?: boolean;\n children: React.ReactNode;\n headerActions?: React.ReactNode;\n contentProps?: React.ComponentProps<typeof Box>;\n /** Sets content area padding to 0 */\n flushLayout?: boolean;\n /** Left slot of the footer area */\n footerContent?: React.ReactNode;\n /** Right slot of the footer area */\n footerActions?: React.ReactNode;\n}\n\ntype StaticContentBlockProps = ContentBlockBaseProps & {\n isCollapsible?: false;\n isOpen?: never;\n defaultOpen?: never;\n onOpenChange?: never;\n};\n\ntype CollapsibleContentBlockProps = ContentBlockBaseProps & {\n /** Enables collapse/expand behavior on the content area */\n isCollapsible: true;\n /** Controlled open state. When provided, the component is in controlled mode. */\n isOpen?: boolean;\n /** Initial open state for uncontrolled mode. Defaults to true. */\n defaultOpen?: boolean;\n /** Called when the open state changes */\n onOpenChange?: (open: boolean) => void;\n};\n\nexport type ContentBlockProps =\n | StaticContentBlockProps\n | CollapsibleContentBlockProps;\n\nconst ContentArea = ({\n isLoading,\n children,\n contentProps,\n flushLayout,\n hasFooter,\n}: Pick<\n ContentBlockBaseProps,\n \"isLoading\" | \"children\" | \"contentProps\" | \"flushLayout\"\n> & { hasFooter?: boolean }) => (\n <Box\n p={flushLayout ? 0 : 400}\n {...contentProps}\n borderBottomLeftRadius={hasFooter ? undefined : \"outer\"}\n borderBottomRightRadius={hasFooter ? undefined : \"outer\"}\n >\n {isLoading ? (\n <Box my={400}>\n <Loader delay={false} />\n </Box>\n ) : (\n children\n )}\n </Box>\n);\n\nconst ContentFooter = ({\n footerContent,\n footerActions,\n}: {\n footerContent?: React.ReactNode;\n footerActions?: React.ReactNode;\n}) => (\n <FooterContainer>\n {footerContent && <span>{footerContent}</span>}\n {footerActions && <span>{footerActions}</span>}\n </FooterContainer>\n);\n\nconst CollapsibleContentBlock = ({\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n contentProps,\n flushLayout,\n footerContent,\n footerActions,\n isOpen: controlledIsOpen,\n defaultOpen = true,\n onOpenChange,\n}: Omit<CollapsibleContentBlockProps, \"isCollapsible\">) => {\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const open = controlledIsOpen !== undefined ? controlledIsOpen : internalOpen;\n const hasFooter = !!(footerContent || footerActions);\n\n const handleOpenChange = (newOpen: boolean) => {\n if (controlledIsOpen === undefined) {\n setInternalOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n };\n\n return (\n <Collapsible isOpen={open} onOpenChange={handleOpenChange}>\n <Container as=\"section\">\n <CollapsibleContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n trigger={Collapsible.Trigger}\n triggerPosition=\"left\"\n />\n <Collapsible.Panel>\n <ContentArea\n isLoading={isLoading}\n contentProps={contentProps}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooter\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </Collapsible.Panel>\n </Container>\n </Collapsible>\n );\n};\n\nconst ContentBlock = ({ isCollapsible, ...props }: ContentBlockProps) => {\n if (isCollapsible) {\n return <CollapsibleContentBlock {...props} />;\n }\n\n const {\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n contentProps,\n flushLayout,\n footerContent,\n footerActions,\n } = props;\n\n const hasFooter = !!(footerContent || footerActions);\n\n return (\n <Container as=\"section\">\n <ContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n />\n <ContentArea\n isLoading={isLoading}\n contentProps={contentProps}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooter\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </Container>\n );\n};\n\nexport default ContentBlock;\n","import styled from \"styled-components\";\nimport { Box } from \"@sproutsocial/seeds-react-box\";\n\nexport const ContentBlockContent = styled(Box)`\n padding: ${({ theme }) => theme.space[400]};\n`;\n\nexport const FooterContainer = styled.div`\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: ${({ theme }) => theme.space[400]};\n border-top: ${({ theme }) => theme.borderWidths[500]} solid\n ${({ theme }) => theme.colors.container.border.base};\n border-bottom-left-radius: ${({ theme }) => theme.radii.outer};\n border-bottom-right-radius: ${({ theme }) => theme.radii.outer};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAgC;AAChC,IAAAA,0BAAoB;AACpB,gCAAuB;AACvB,qCAA4B;AAC5B,wCAGO;AACP,mCAA0B;;;ACR1B,+BAAmB;AACnB,6BAAoB;AAEb,IAAM,0BAAsB,yBAAAC,SAAO,0BAAG;AAAA,aAChC,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA;AAGrC,IAAM,kBAAkB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMzB,CAAC,EAAE,MAAM,MAAM,MAAM,MAAM,GAAG,CAAC;AAAA,gBAC5B,CAAC,EAAE,MAAM,MAAM,MAAM,aAAa,GAAG,CAAC;AAAA,MAChD,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,UAAU,OAAO,IAAI;AAAA,+BACxB,CAAC,EAAE,M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,2CAAY;AAAA,QACrB,iBAAgB;AAAA;AAAA,IAClB;AAAA,IACA,6CAAC,2CAAY,OAAZ,EACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UAEC;AAAA;AAAA,MACH;AAAA,MACC,aACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA;AAAA,MACF;AAAA,OAEJ;AAAA,KACF,GACF;AAEJ;AAEA,IAAM,eAAe,CAAC,EAAE,eAAe,GAAG,MAAM,MAAyB;AACvE,MAAI,eAAe;AACjB,WAAO,4CAAC,2BAAyB,GAAG,OAAO;AAAA,EAC7C;AAEA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,YAAY,CAAC,EAAE,iBAAiB;AAEtC,SACE,6CAAC,0CAAU,IAAG,WACZ;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,cAAc;AAAA,QACd;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACC,aACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;AAEA,IAAO,uBAAQ;;;ADjMf,IAAO,gBAAQ;","names":["import_seeds_react_box","styled"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/ContentBlock.tsx","../src/ContentBlockHybrid.tsx","../src/ContentBlockTailwind.tsx","../src/ContentBlockStyled.tsx","../src/styles.ts"],"sourcesContent":["import ContentBlock from \"./ContentBlock\";\n\nexport type { ContentBlockProps } from \"./ContentBlock\";\n\nexport default ContentBlock;\nexport { ContentBlock };\n","import React from \"react\";\nimport { Box } from \"@sproutsocial/seeds-react-box\";\nimport ContentBlockHybrid from \"./ContentBlockHybrid\";\n\nexport interface ContentBlockBaseProps {\n title: string;\n subtitle?: string;\n titleAs?: \"h1\" | \"h2\" | \"h3\" | \"h4\";\n subtitleAs?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"p\";\n isLoading?: boolean;\n children: React.ReactNode;\n headerActions?: React.ReactNode;\n contentProps?: React.ComponentProps<typeof Box>;\n /** Sets content area padding to 0 */\n flushLayout?: boolean;\n /** Left slot of the footer area */\n footerContent?: React.ReactNode;\n /** Right slot of the footer area */\n footerActions?: React.ReactNode;\n}\n\ntype StaticContentBlockProps = ContentBlockBaseProps & {\n isCollapsible?: false;\n isOpen?: never;\n defaultOpen?: never;\n onOpenChange?: never;\n};\n\nexport type CollapsibleContentBlockProps = ContentBlockBaseProps & {\n /** Enables collapse/expand behavior on the content area */\n isCollapsible: true;\n /** Controlled open state. When provided, the component is in controlled mode. */\n isOpen?: boolean;\n /** Initial open state for uncontrolled mode. Defaults to true. */\n defaultOpen?: boolean;\n /** Called when the open state changes */\n onOpenChange?: (open: boolean) => void;\n};\n\nexport type ContentBlockProps =\n | StaticContentBlockProps\n | CollapsibleContentBlockProps;\n\n/**\n * ContentBlock component. Automatically routes between the Tailwind\n * implementation (preferred) and the styled-components implementation (used when\n * `contentProps` carries styled-system props), mirroring the Button hybrid.\n */\nconst ContentBlock = (props: ContentBlockProps) => (\n <ContentBlockHybrid {...props} />\n);\n\nexport default ContentBlock;\n","/**\n * Hybrid ContentBlock\n *\n * Routes the whole component between the Tailwind implementation (preferred)\n * and the styled-components implementation (legacy fallback), mirroring\n * ButtonHybrid's single `hasStyledProps` gate.\n *\n * `contentProps` is ContentBlock's only styled-system passthrough surface: it\n * is spread onto the content `<Box>` and may carry props (`bg`, `py`, …) that a\n * plain Tailwind element cannot honor. When it does, render the styled-components\n * tree so those props still apply; otherwise use the lighter Tailwind path.\n */\n\nimport React from \"react\";\nimport { hasStyledProps } from \"@sproutsocial/seeds-react-system-props\";\nimport {\n ContentBlockTailwind,\n ContentFooterTailwind,\n type ContentFooterProps,\n} from \"./ContentBlockTailwind\";\nimport { ContentBlockStyled } from \"./ContentBlockStyled\";\nimport type { ContentBlockProps } from \"./ContentBlock\";\n\nconst ContentBlockHybrid = (props: ContentBlockProps) => {\n if (props.contentProps && hasStyledProps(props.contentProps)) {\n return <ContentBlockStyled {...props} />;\n }\n\n return <ContentBlockTailwind {...props} />;\n};\n\nexport default ContentBlockHybrid;\n\n/**\n * Hybrid ContentBlock footer.\n *\n * The footer exposes no styled-system props and no styled()-extendable surface\n * (FooterContainer is internal and never re-exported from index.ts), so the\n * Tailwind/CSS-class footer is always used — no routing predicate is needed here.\n * Kept as a separate export so the footer-override story/tests can render it\n * directly.\n */\nexport const ContentFooterHybrid = (props: ContentFooterProps) => (\n <ContentFooterTailwind {...props} />\n);\n","/**\n * Tailwind CSS implementation of the ContentBlock component.\n * Renders the whole component (card, content area, loader, footer) with plain\n * elements and the Seeds content-block CSS classes from content-block.css.\n * Child components (ContentHeader, Collapsible, Loader) are composed unchanged.\n */\n\nimport React, { useState } from \"react\";\nimport { Loader } from \"@sproutsocial/seeds-react-loader\";\nimport { Collapsible } from \"@sproutsocial/seeds-react-collapsible\";\nimport {\n ContentHeader,\n CollapsibleContentHeader,\n} from \"@sproutsocial/seeds-react-content-header\";\nimport type {\n ContentBlockBaseProps,\n ContentBlockProps,\n CollapsibleContentBlockProps,\n} from \"./ContentBlock\";\n\n// Utility for merging class names properly.\n// cn is NOT exported from @sproutsocial/seeds-react-utilities, so it is\n// reproduced locally here (mirrors ButtonTailwind.tsx).\nfunction cn(\n ...inputs: (string | undefined | null | false | Record<string, boolean>)[]\n): string {\n const classes: string[] = [];\n\n for (const input of inputs) {\n if (!input) continue;\n\n if (typeof input === \"string\") {\n classes.push(input);\n } else if (typeof input === \"object\") {\n for (const [key, value] of Object.entries(input)) {\n if (value) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(\" \");\n}\n\nexport type ContentFooterProps = {\n footerContent?: React.ReactNode;\n footerActions?: React.ReactNode;\n className?: string;\n};\n\nexport const ContentFooterTailwind = ({\n footerContent,\n footerActions,\n className,\n}: ContentFooterProps) => (\n <div className={cn(\"seeds-content-block-footer\", className)}>\n {footerContent && <span>{footerContent}</span>}\n {footerActions && <span>{footerActions}</span>}\n </div>\n);\n\nconst ContentArea = ({\n isLoading,\n children,\n flushLayout,\n hasFooter,\n contentProps,\n}: Pick<\n ContentBlockBaseProps,\n \"isLoading\" | \"children\" | \"flushLayout\" | \"contentProps\"\n> & {\n hasFooter?: boolean;\n}) => {\n // By construction, any contentProps reaching the Tailwind path carries no\n // styled-system props (those route to ContentBlockStyled via hasStyledProps),\n // so the rest is pure DOM attributes safe to spread onto a div. Pull className\n // out and merge it via cn so the seeds-content-block-content class is\n // preserved, rendering className after the spread so the merged value wins\n // (mirrors ButtonTailwind).\n const { className, ...domProps } = contentProps ?? {};\n return (\n <div\n {...(domProps as React.HTMLAttributes<HTMLDivElement>)}\n className={cn(\n \"seeds-content-block-content\",\n {\n flush: !!flushLayout,\n \"no-footer\": !hasFooter,\n },\n className\n )}\n >\n {isLoading ? (\n <div className=\"seeds-content-block-loader\">\n <Loader delay={false} />\n </div>\n ) : (\n children\n )}\n </div>\n );\n};\n\nconst CollapsibleContentBlock = ({\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n flushLayout,\n footerContent,\n footerActions,\n contentProps,\n isOpen: controlledIsOpen,\n defaultOpen = true,\n onOpenChange,\n}: Omit<CollapsibleContentBlockProps, \"isCollapsible\">) => {\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const open = controlledIsOpen !== undefined ? controlledIsOpen : internalOpen;\n const hasFooter = !!(footerContent || footerActions);\n\n const handleOpenChange = (newOpen: boolean) => {\n if (controlledIsOpen === undefined) {\n setInternalOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n };\n\n return (\n <Collapsible isOpen={open} onOpenChange={handleOpenChange}>\n <section className=\"seeds-content-block\">\n <CollapsibleContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n trigger={Collapsible.Trigger}\n triggerPosition=\"left\"\n />\n <Collapsible.Panel>\n <ContentArea\n isLoading={isLoading}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n contentProps={contentProps}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooterTailwind\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </Collapsible.Panel>\n </section>\n </Collapsible>\n );\n};\n\n/**\n * Tailwind/CSS-class implementation of the full ContentBlock. Preferred path;\n * the Hybrid routes here unless `contentProps` carries styled-system props.\n */\nexport const ContentBlockTailwind = ({\n isCollapsible,\n ...props\n}: ContentBlockProps) => {\n if (isCollapsible) {\n return <CollapsibleContentBlock {...props} />;\n }\n\n const {\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n flushLayout,\n footerContent,\n footerActions,\n contentProps,\n } = props;\n\n const hasFooter = !!(footerContent || footerActions);\n\n return (\n <section className=\"seeds-content-block\">\n <ContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n />\n <ContentArea\n isLoading={isLoading}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n contentProps={contentProps}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooterTailwind\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </section>\n );\n};\n","/**\n * Styled-components implementation of the full ContentBlock.\n *\n * This is the legacy fallback the Hybrid delegates to whenever `contentProps`\n * carries styled-system props (e.g. `bg`, `py`) that a plain Tailwind element\n * cannot honor. It reproduces the original Box/Container/FooterContainer tree\n * verbatim so styled-system passthrough and visual parity are preserved.\n */\n\nimport React, { useState } from \"react\";\nimport { Box } from \"@sproutsocial/seeds-react-box\";\nimport { Loader } from \"@sproutsocial/seeds-react-loader\";\nimport { Collapsible } from \"@sproutsocial/seeds-react-collapsible\";\nimport {\n ContentHeader,\n CollapsibleContentHeader,\n} from \"@sproutsocial/seeds-react-content-header\";\nimport { Container } from \"@sproutsocial/seeds-react-container\";\nimport { FooterContainer } from \"./styles\";\nimport type {\n ContentBlockBaseProps,\n ContentBlockProps,\n CollapsibleContentBlockProps,\n} from \"./ContentBlock\";\n\nconst ContentArea = ({\n isLoading,\n children,\n contentProps,\n flushLayout,\n hasFooter,\n}: Pick<\n ContentBlockBaseProps,\n \"isLoading\" | \"children\" | \"contentProps\" | \"flushLayout\"\n> & { hasFooter?: boolean }) => (\n <Box\n p={flushLayout ? 0 : 400}\n {...contentProps}\n borderBottomLeftRadius={hasFooter ? undefined : \"outer\"}\n borderBottomRightRadius={hasFooter ? undefined : \"outer\"}\n >\n {isLoading ? (\n <Box my={400}>\n <Loader delay={false} />\n </Box>\n ) : (\n children\n )}\n </Box>\n);\n\nconst ContentFooter = ({\n footerContent,\n footerActions,\n}: {\n footerContent?: React.ReactNode;\n footerActions?: React.ReactNode;\n}) => (\n <FooterContainer>\n {footerContent && <span>{footerContent}</span>}\n {footerActions && <span>{footerActions}</span>}\n </FooterContainer>\n);\n\nconst CollapsibleContentBlock = ({\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n contentProps,\n flushLayout,\n footerContent,\n footerActions,\n isOpen: controlledIsOpen,\n defaultOpen = true,\n onOpenChange,\n}: Omit<CollapsibleContentBlockProps, \"isCollapsible\">) => {\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n const open = controlledIsOpen !== undefined ? controlledIsOpen : internalOpen;\n const hasFooter = !!(footerContent || footerActions);\n\n const handleOpenChange = (newOpen: boolean) => {\n if (controlledIsOpen === undefined) {\n setInternalOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n };\n\n return (\n <Collapsible isOpen={open} onOpenChange={handleOpenChange}>\n <Container as=\"section\">\n <CollapsibleContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n trigger={Collapsible.Trigger}\n triggerPosition=\"left\"\n />\n <Collapsible.Panel>\n <ContentArea\n isLoading={isLoading}\n contentProps={contentProps}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooter\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </Collapsible.Panel>\n </Container>\n </Collapsible>\n );\n};\n\nexport const ContentBlockStyled = ({\n isCollapsible,\n ...props\n}: ContentBlockProps) => {\n if (isCollapsible) {\n return <CollapsibleContentBlock {...props} />;\n }\n\n const {\n title,\n subtitle,\n titleAs = \"h2\",\n subtitleAs = \"h3\",\n children,\n isLoading,\n headerActions,\n contentProps,\n flushLayout,\n footerContent,\n footerActions,\n } = props;\n\n const hasFooter = !!(footerContent || footerActions);\n\n return (\n <Container as=\"section\">\n <ContentHeader\n title={title}\n subtitle={subtitle}\n headingLevel={titleAs}\n subtitleAs={subtitleAs}\n headerActions={headerActions}\n />\n <ContentArea\n isLoading={isLoading}\n contentProps={contentProps}\n flushLayout={flushLayout}\n hasFooter={hasFooter}\n >\n {children}\n </ContentArea>\n {hasFooter && (\n <ContentFooter\n footerContent={footerContent}\n footerActions={footerActions}\n />\n )}\n </Container>\n );\n};\n","import styled from \"styled-components\";\n\nexport const FooterContainer = styled.div`\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: ${({ theme }) => theme.space[400]};\n border-top: ${({ theme }) => theme.borderWidths[500]} solid\n ${({ theme }) => theme.colors.container.border.base};\n border-bottom-left-radius: ${({ theme }) => theme.radii.outer};\n border-bottom-right-radius: ${({ theme }) => theme.radii.outer};\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;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EAC7C;AAEA,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,YAAY,CAAC,EAAE,iBAAiB;AAEtC,SACE,8CAAC,0CAAU,IAAG,WACZ;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,cAAc;AAAA,QACd;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IACA;AAAA,MAACD;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,IACC,aACC;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;;;AFpJW,IAAAE,sBAAA;AAFX,IAAM,qBAAqB,CAAC,UAA6B;AACvD,MAAI,MAAM,oBAAgB,gDAAe,MAAM,YAAY,GAAG;AAC5D,WAAO,6CAAC,sBAAoB,GAAG,OAAO;AAAA,EACxC;AAEA,SAAO,6CAAC,wBAAsB,GAAG,OAAO;AAC1C;AAEA,IAAO,6BAAQ;;;ADkBb,IAAAC,sBAAA;AADF,IAAM,eAAe,CAAC,UACpB,6CAAC,8BAAoB,GAAG,OAAO;AAGjC,IAAO,uBAAQ;;;ADhDf,IAAO,gBAAQ;","names":["import_react","import_seeds_react_box","import_react","import_react","import_seeds_react_loader","import_seeds_react_collapsible","import_seeds_react_content_header","styled","import_jsx_runtime","ContentArea","CollapsibleContentBlock","import_jsx_runtime","import_jsx_runtime"]}
|
package/package.json
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-content-block",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"description": "Seeds React ContentBlock",
|
|
5
5
|
"author": "Sprout Social, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/esm/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/esm/index.js",
|
|
16
|
+
"require": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./dist/content-block.css": "./dist/content-block.css"
|
|
20
|
+
},
|
|
10
21
|
"scripts": {
|
|
11
|
-
"build": "tsup --dts",
|
|
12
|
-
"build:debug": "tsup --dts --metafile",
|
|
22
|
+
"build": "tsup --dts && cp src/content-block.css dist/content-block.css",
|
|
23
|
+
"build:debug": "tsup --dts --metafile && cp src/content-block.css dist/content-block.css",
|
|
13
24
|
"dev": "tsup --watch --dts",
|
|
14
25
|
"clean": "rm -rf .turbo dist",
|
|
15
26
|
"clean:modules": "rm -rf node_modules",
|
|
@@ -18,13 +29,14 @@
|
|
|
18
29
|
"test:watch": "jest --watch --coverage=false"
|
|
19
30
|
},
|
|
20
31
|
"dependencies": {
|
|
21
|
-
"@sproutsocial/seeds-react-box": "^1.1.
|
|
22
|
-
"@sproutsocial/seeds-react-button": "^2.
|
|
32
|
+
"@sproutsocial/seeds-react-box": "^1.1.21",
|
|
33
|
+
"@sproutsocial/seeds-react-button": "^2.2.1",
|
|
23
34
|
"@sproutsocial/seeds-react-collapsible": "^2.0.0",
|
|
24
|
-
"@sproutsocial/seeds-react-container": "^0.3.
|
|
25
|
-
"@sproutsocial/seeds-react-content-header": "^0.2.
|
|
26
|
-
"@sproutsocial/seeds-react-loader": "^1.0.
|
|
27
|
-
"@sproutsocial/seeds-react-
|
|
35
|
+
"@sproutsocial/seeds-react-container": "^0.3.15",
|
|
36
|
+
"@sproutsocial/seeds-react-content-header": "^0.2.19",
|
|
37
|
+
"@sproutsocial/seeds-react-loader": "^1.0.22",
|
|
38
|
+
"@sproutsocial/seeds-react-system-props": "^3.1.0",
|
|
39
|
+
"@sproutsocial/seeds-react-theme": "^4.1.0"
|
|
28
40
|
},
|
|
29
41
|
"devDependencies": {
|
|
30
42
|
"@types/react": "^18.0.0",
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
yarn run v1.22.22
|
|
2
|
-
$ tsup --dts
|
|
3
|
-
[34mCLI[39m Building entry: src/index.ts
|
|
4
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
5
|
-
[34mCLI[39m tsup v8.5.0
|
|
6
|
-
[34mCLI[39m Using tsup config: /home/runner/_work/seeds/seeds/seeds-react/seeds-react-content-block/tsup.config.ts
|
|
7
|
-
[34mCLI[39m Target: es2022
|
|
8
|
-
[34mCLI[39m Cleaning output folder
|
|
9
|
-
[34mCJS[39m Build start
|
|
10
|
-
[34mESM[39m Build start
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m6.84 KB[39m
|
|
12
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m8.58 KB[39m
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in 13ms
|
|
14
|
-
[32mESM[39m [1mdist/esm/index.js [22m[32m4.37 KB[39m
|
|
15
|
-
[32mESM[39m [1mdist/esm/index.js.map [22m[32m8.56 KB[39m
|
|
16
|
-
[32mESM[39m ⚡️ Build success in 13ms
|
|
17
|
-
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in 1885ms
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.51 KB[39m
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m1.51 KB[39m
|
|
21
|
-
Done in 2.65s.
|