braid-design-system 0.0.0-gap-stack-20240815031637 → 0.0.0-gap-stack-20240815054002
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
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const assert = require("assert");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const lib_utils_flattenChildren_cjs = require("../../utils/flattenChildren.cjs");
|
|
6
4
|
const lib_components_Box_Box_cjs = require("../Box/Box.cjs");
|
|
7
|
-
const lib_css_negativeMargin_negativeMargin_cjs = require("../../css/negativeMargin/negativeMargin.cjs");
|
|
8
5
|
const lib_utils_collapsibleAlignmentProps_cjs = require("../../utils/collapsibleAlignmentProps.cjs");
|
|
9
6
|
const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
|
|
10
7
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
@@ -25,13 +22,7 @@ const Inline = ({
|
|
|
25
22
|
validInlineComponents.includes(component),
|
|
26
23
|
`Invalid Inline component: '${component}'. Should be one of [${validInlineComponents.map((c) => `'${c}'`).join(", ")}]`
|
|
27
24
|
);
|
|
28
|
-
const
|
|
29
|
-
const inlineItemComponent = isList ? "li" : component;
|
|
30
|
-
const {
|
|
31
|
-
collapsibleAlignmentProps,
|
|
32
|
-
collapsibleAlignmentChildProps,
|
|
33
|
-
orderChildren
|
|
34
|
-
} = lib_utils_collapsibleAlignmentProps_cjs.resolveCollapsibleAlignmentProps({
|
|
25
|
+
const { collapsibleAlignmentProps } = lib_utils_collapsibleAlignmentProps_cjs.resolveCollapsibleAlignmentProps({
|
|
35
26
|
align,
|
|
36
27
|
alignY,
|
|
37
28
|
collapseBelow,
|
|
@@ -40,33 +31,13 @@ const Inline = ({
|
|
|
40
31
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
41
32
|
lib_components_Box_Box_cjs.Box,
|
|
42
33
|
{
|
|
43
|
-
component
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
component,
|
|
35
|
+
...collapsibleAlignmentProps,
|
|
36
|
+
display: "flex",
|
|
37
|
+
gap: space,
|
|
38
|
+
flexWrap: "wrap",
|
|
46
39
|
...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
|
|
47
|
-
children
|
|
48
|
-
lib_components_Box_Box_cjs.Box,
|
|
49
|
-
{
|
|
50
|
-
component,
|
|
51
|
-
className: lib_css_negativeMargin_negativeMargin_cjs.negativeMargin("left", space),
|
|
52
|
-
flexWrap: "wrap",
|
|
53
|
-
...collapsibleAlignmentProps,
|
|
54
|
-
children: React.Children.map(
|
|
55
|
-
orderChildren(lib_utils_flattenChildren_cjs.flattenChildren(children)),
|
|
56
|
-
(child) => child !== null && child !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
-
lib_components_Box_Box_cjs.Box,
|
|
58
|
-
{
|
|
59
|
-
component: inlineItemComponent,
|
|
60
|
-
minWidth: 0,
|
|
61
|
-
marginLeft: space,
|
|
62
|
-
marginTop: space,
|
|
63
|
-
...collapsibleAlignmentChildProps,
|
|
64
|
-
children: child
|
|
65
|
-
}
|
|
66
|
-
) : null
|
|
67
|
-
)
|
|
68
|
-
}
|
|
69
|
-
)
|
|
40
|
+
children
|
|
70
41
|
}
|
|
71
42
|
);
|
|
72
43
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import assert from "assert";
|
|
3
|
-
import { Children } from "react";
|
|
4
|
-
import { flattenChildren } from "../../utils/flattenChildren.mjs";
|
|
5
3
|
import { Box } from "../Box/Box.mjs";
|
|
6
|
-
import { negativeMargin } from "../../css/negativeMargin/negativeMargin.mjs";
|
|
7
4
|
import { resolveCollapsibleAlignmentProps } from "../../utils/collapsibleAlignmentProps.mjs";
|
|
8
5
|
import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
|
|
9
6
|
const validInlineComponents = ["div", "span", "ol", "ul"];
|
|
@@ -22,13 +19,7 @@ const Inline = ({
|
|
|
22
19
|
validInlineComponents.includes(component),
|
|
23
20
|
`Invalid Inline component: '${component}'. Should be one of [${validInlineComponents.map((c) => `'${c}'`).join(", ")}]`
|
|
24
21
|
);
|
|
25
|
-
const
|
|
26
|
-
const inlineItemComponent = isList ? "li" : component;
|
|
27
|
-
const {
|
|
28
|
-
collapsibleAlignmentProps,
|
|
29
|
-
collapsibleAlignmentChildProps,
|
|
30
|
-
orderChildren
|
|
31
|
-
} = resolveCollapsibleAlignmentProps({
|
|
22
|
+
const { collapsibleAlignmentProps } = resolveCollapsibleAlignmentProps({
|
|
32
23
|
align,
|
|
33
24
|
alignY,
|
|
34
25
|
collapseBelow,
|
|
@@ -37,33 +28,13 @@ const Inline = ({
|
|
|
37
28
|
return /* @__PURE__ */ jsx(
|
|
38
29
|
Box,
|
|
39
30
|
{
|
|
40
|
-
component
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
component,
|
|
32
|
+
...collapsibleAlignmentProps,
|
|
33
|
+
display: "flex",
|
|
34
|
+
gap: space,
|
|
35
|
+
flexWrap: "wrap",
|
|
43
36
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
44
|
-
children
|
|
45
|
-
Box,
|
|
46
|
-
{
|
|
47
|
-
component,
|
|
48
|
-
className: negativeMargin("left", space),
|
|
49
|
-
flexWrap: "wrap",
|
|
50
|
-
...collapsibleAlignmentProps,
|
|
51
|
-
children: Children.map(
|
|
52
|
-
orderChildren(flattenChildren(children)),
|
|
53
|
-
(child) => child !== null && child !== void 0 ? /* @__PURE__ */ jsx(
|
|
54
|
-
Box,
|
|
55
|
-
{
|
|
56
|
-
component: inlineItemComponent,
|
|
57
|
-
minWidth: 0,
|
|
58
|
-
marginLeft: space,
|
|
59
|
-
marginTop: space,
|
|
60
|
-
...collapsibleAlignmentChildProps,
|
|
61
|
-
children: child
|
|
62
|
-
}
|
|
63
|
-
) : null
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
)
|
|
37
|
+
children
|
|
67
38
|
}
|
|
68
39
|
);
|
|
69
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "0.0.0-gap-stack-
|
|
3
|
+
"version": "0.0.0-gap-stack-20240815054002",
|
|
4
4
|
"description": "Themeable design system for the SEEK Group",
|
|
5
5
|
"homepage": "https://seek-oss.github.io/braid-design-system/",
|
|
6
6
|
"bugs": {
|