braid-design-system 0.0.0-gap-stack-20240815054002 → 0.0.0-gap-stack-20240815060712

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,6 +1,6 @@
1
1
  # braid-design-system
2
2
 
3
- ## 0.0.0-gap-stack-20240815054002
3
+ ## 0.0.0-gap-stack-20240815060712
4
4
 
5
5
  ### Major Changes
6
6
 
@@ -15,17 +15,7 @@ const Column = ({
15
15
  hideAbove,
16
16
  ...restProps
17
17
  }) => {
18
- const {
19
- collapseMobile,
20
- collapseTablet,
21
- collapseDesktop,
22
- mobileSpace,
23
- tabletSpace,
24
- desktopSpace,
25
- wideSpace,
26
- collapsibleAlignmentChildProps,
27
- component
28
- } = React.useContext(lib_components_Columns_ColumnsContext_cjs.ColumnsContext);
18
+ const { component } = React.useContext(lib_components_Columns_ColumnsContext_cjs.ColumnsContext);
29
19
  const [hideOnMobile, hideOnTablet, hideOnDesktop, hideOnWide] = lib_utils_resolveResponsiveRangeProps_cjs.resolveResponsiveRangeProps({
30
20
  below: hideBelow,
31
21
  above: hideAbove
@@ -49,28 +39,7 @@ const Column = ({
49
39
  width !== "content" ? lib_components_Column_Column_css_cjs.width[width] : null
50
40
  ],
51
41
  ...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
52
- children: /* @__PURE__ */ jsxRuntime.jsx(
53
- lib_components_Box_Box_cjs.Box,
54
- {
55
- component,
56
- paddingLeft: lib_utils_optimizeResponsiveArray_cjs.optimizeResponsiveArray([
57
- collapseMobile ? "none" : mobileSpace,
58
- collapseTablet ? "none" : tabletSpace,
59
- collapseDesktop ? "none" : desktopSpace,
60
- wideSpace
61
- ]),
62
- paddingTop: collapseMobile || collapseTablet || collapseDesktop ? lib_utils_optimizeResponsiveArray_cjs.optimizeResponsiveArray([
63
- collapseMobile ? mobileSpace : "none",
64
- collapseTablet ? tabletSpace : "none",
65
- collapseDesktop ? desktopSpace : "none",
66
- "none"
67
- ]) : void 0,
68
- height: "full",
69
- ...collapsibleAlignmentChildProps,
70
- className: lib_components_Column_Column_css_cjs.columnContent,
71
- children
72
- }
73
- )
42
+ children
74
43
  }
75
44
  );
76
45
  };
@@ -3,7 +3,7 @@ const fileScope = require("@vanilla-extract/css/fileScope");
3
3
  const css = require("@vanilla-extract/css");
4
4
  fileScope.setFileScope("src/lib/components/Column/Column.css.ts", "braid-design-system");
5
5
  const column = css.style({}, "column");
6
- const columnContent = css.style({
6
+ css.style({
7
7
  selectors: {
8
8
  [`${column}:first-child > &`]: {
9
9
  paddingTop: 0
@@ -26,5 +26,4 @@ const width = css.styleVariants({
26
26
  }, "width");
27
27
  fileScope.endFileScope();
28
28
  exports.column = column;
29
- exports.columnContent = columnContent;
30
29
  exports.width = width;
@@ -2,7 +2,7 @@ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
2
2
  import { style, styleVariants } from "@vanilla-extract/css";
3
3
  setFileScope("src/lib/components/Column/Column.css.ts", "braid-design-system");
4
4
  const column = style({}, "column");
5
- const columnContent = style({
5
+ style({
6
6
  selectors: {
7
7
  [`${column}:first-child > &`]: {
8
8
  paddingTop: 0
@@ -26,6 +26,5 @@ const width = styleVariants({
26
26
  endFileScope();
27
27
  export {
28
28
  column,
29
- columnContent,
30
29
  width
31
30
  };
@@ -5,7 +5,7 @@ import { Box } from "../Box/Box.mjs";
5
5
  import { ColumnsContext } from "../Columns/ColumnsContext.mjs";
6
6
  import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
7
7
  import { resolveResponsiveRangeProps } from "../../utils/resolveResponsiveRangeProps.mjs";
8
- import { column, width, columnContent } from "./Column.css.mjs";
8
+ import { column, width } from "./Column.css.mjs";
9
9
  const Column = ({
10
10
  children,
11
11
  data,
@@ -14,17 +14,7 @@ const Column = ({
14
14
  hideAbove,
15
15
  ...restProps
16
16
  }) => {
17
- const {
18
- collapseMobile,
19
- collapseTablet,
20
- collapseDesktop,
21
- mobileSpace,
22
- tabletSpace,
23
- desktopSpace,
24
- wideSpace,
25
- collapsibleAlignmentChildProps,
26
- component
27
- } = useContext(ColumnsContext);
17
+ const { component } = useContext(ColumnsContext);
28
18
  const [hideOnMobile, hideOnTablet, hideOnDesktop, hideOnWide] = resolveResponsiveRangeProps({
29
19
  below: hideBelow,
30
20
  above: hideAbove
@@ -48,28 +38,7 @@ const Column = ({
48
38
  width$1 !== "content" ? width[width$1] : null
49
39
  ],
50
40
  ...buildDataAttributes({ data, validateRestProps: restProps }),
51
- children: /* @__PURE__ */ jsx(
52
- Box,
53
- {
54
- component,
55
- paddingLeft: optimizeResponsiveArray([
56
- collapseMobile ? "none" : mobileSpace,
57
- collapseTablet ? "none" : tabletSpace,
58
- collapseDesktop ? "none" : desktopSpace,
59
- wideSpace
60
- ]),
61
- paddingTop: collapseMobile || collapseTablet || collapseDesktop ? optimizeResponsiveArray([
62
- collapseMobile ? mobileSpace : "none",
63
- collapseTablet ? tabletSpace : "none",
64
- collapseDesktop ? desktopSpace : "none",
65
- "none"
66
- ]) : void 0,
67
- height: "full",
68
- ...collapsibleAlignmentChildProps,
69
- className: columnContent,
70
- children
71
- }
72
- )
41
+ children
73
42
  }
74
43
  );
75
44
  };
@@ -2,9 +2,7 @@
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
3
  const assert = require("assert");
4
4
  const lib_components_Box_Box_cjs = require("../Box/Box.cjs");
5
- const lib_css_negativeMargin_negativeMargin_cjs = require("../../css/negativeMargin/negativeMargin.cjs");
6
5
  const lib_utils_collapsibleAlignmentProps_cjs = require("../../utils/collapsibleAlignmentProps.cjs");
7
- const lib_css_atoms_sprinkles_css_cjs = require("../../css/atoms/sprinkles.css.cjs");
8
6
  const lib_components_private_buildDataAttributes_cjs = require("../private/buildDataAttributes.cjs");
9
7
  const lib_components_Columns_ColumnsContext_cjs = require("./ColumnsContext.cjs");
10
8
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
@@ -24,21 +22,7 @@ const Columns = ({
24
22
  lib_components_Columns_ColumnsContext_cjs.validColumnsComponents.includes(component),
25
23
  `Invalid Columns component: '${component}'. Should be one of [${lib_components_Columns_ColumnsContext_cjs.validColumnsComponents.map((c) => `'${c}'`).join(", ")}]`
26
24
  );
27
- const normalizedSpace = lib_css_atoms_sprinkles_css_cjs.normalizeResponsiveValue(space);
28
- const {
29
- mobile: mobileSpace = "none",
30
- tablet: tabletSpace = mobileSpace,
31
- desktop: desktopSpace = tabletSpace,
32
- wide: wideSpace = desktopSpace
33
- } = normalizedSpace;
34
- const {
35
- collapsibleAlignmentProps,
36
- collapsibleAlignmentChildProps,
37
- collapseMobile,
38
- collapseTablet,
39
- collapseDesktop,
40
- orderChildren
41
- } = lib_utils_collapsibleAlignmentProps_cjs.resolveCollapsibleAlignmentProps({
25
+ const { collapsibleAlignmentProps } = lib_utils_collapsibleAlignmentProps_cjs.resolveCollapsibleAlignmentProps({
42
26
  collapseBelow,
43
27
  align,
44
28
  alignY,
@@ -49,28 +33,16 @@ const Columns = ({
49
33
  {
50
34
  component,
51
35
  ...collapsibleAlignmentProps,
52
- className: lib_css_negativeMargin_negativeMargin_cjs.negativeMargin("left", {
53
- mobile: collapseMobile ? "none" : mobileSpace,
54
- tablet: collapseTablet ? "none" : tabletSpace,
55
- desktop: collapseDesktop ? "none" : desktopSpace,
56
- wide: wideSpace
57
- }),
36
+ display: "flex",
37
+ gap: space,
58
38
  ...lib_components_private_buildDataAttributes_cjs.buildDataAttributes({ data, validateRestProps: restProps }),
59
39
  children: /* @__PURE__ */ jsxRuntime.jsx(
60
40
  lib_components_Columns_ColumnsContext_cjs.ColumnsContext.Provider,
61
41
  {
62
42
  value: {
63
- collapseMobile,
64
- collapseTablet,
65
- collapseDesktop,
66
- mobileSpace,
67
- tabletSpace,
68
- desktopSpace,
69
- wideSpace,
70
- collapsibleAlignmentChildProps,
71
43
  component
72
44
  },
73
- children: orderChildren(children)
45
+ children
74
46
  }
75
47
  )
76
48
  }
@@ -1,9 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import assert from "assert";
3
3
  import { Box } from "../Box/Box.mjs";
4
- import { negativeMargin } from "../../css/negativeMargin/negativeMargin.mjs";
5
4
  import { resolveCollapsibleAlignmentProps } from "../../utils/collapsibleAlignmentProps.mjs";
6
- import { normalizeResponsiveValue } from "../../css/atoms/sprinkles.css.mjs";
7
5
  import { buildDataAttributes } from "../private/buildDataAttributes.mjs";
8
6
  import { validColumnsComponents, ColumnsContext } from "./ColumnsContext.mjs";
9
7
  const Columns = ({
@@ -21,21 +19,7 @@ const Columns = ({
21
19
  validColumnsComponents.includes(component),
22
20
  `Invalid Columns component: '${component}'. Should be one of [${validColumnsComponents.map((c) => `'${c}'`).join(", ")}]`
23
21
  );
24
- const normalizedSpace = normalizeResponsiveValue(space);
25
- const {
26
- mobile: mobileSpace = "none",
27
- tablet: tabletSpace = mobileSpace,
28
- desktop: desktopSpace = tabletSpace,
29
- wide: wideSpace = desktopSpace
30
- } = normalizedSpace;
31
- const {
32
- collapsibleAlignmentProps,
33
- collapsibleAlignmentChildProps,
34
- collapseMobile,
35
- collapseTablet,
36
- collapseDesktop,
37
- orderChildren
38
- } = resolveCollapsibleAlignmentProps({
22
+ const { collapsibleAlignmentProps } = resolveCollapsibleAlignmentProps({
39
23
  collapseBelow,
40
24
  align,
41
25
  alignY,
@@ -46,28 +30,16 @@ const Columns = ({
46
30
  {
47
31
  component,
48
32
  ...collapsibleAlignmentProps,
49
- className: negativeMargin("left", {
50
- mobile: collapseMobile ? "none" : mobileSpace,
51
- tablet: collapseTablet ? "none" : tabletSpace,
52
- desktop: collapseDesktop ? "none" : desktopSpace,
53
- wide: wideSpace
54
- }),
33
+ display: "flex",
34
+ gap: space,
55
35
  ...buildDataAttributes({ data, validateRestProps: restProps }),
56
36
  children: /* @__PURE__ */ jsx(
57
37
  ColumnsContext.Provider,
58
38
  {
59
39
  value: {
60
- collapseMobile,
61
- collapseTablet,
62
- collapseDesktop,
63
- mobileSpace,
64
- tabletSpace,
65
- desktopSpace,
66
- wideSpace,
67
- collapsibleAlignmentChildProps,
68
40
  component
69
41
  },
70
- children: orderChildren(children)
42
+ children
71
43
  }
72
44
  )
73
45
  }
@@ -2,14 +2,6 @@
2
2
  const React = require("react");
3
3
  const validColumnsComponents = ["div", "span"];
4
4
  const ColumnsContext = React.createContext({
5
- collapseMobile: false,
6
- collapseTablet: false,
7
- collapseDesktop: false,
8
- mobileSpace: "none",
9
- tabletSpace: "none",
10
- desktopSpace: "none",
11
- wideSpace: "none",
12
- collapsibleAlignmentChildProps: null,
13
5
  component: "div"
14
6
  });
15
7
  exports.ColumnsContext = ColumnsContext;
@@ -1,14 +1,6 @@
1
1
  import { createContext } from "react";
2
2
  const validColumnsComponents = ["div", "span"];
3
3
  const ColumnsContext = createContext({
4
- collapseMobile: false,
5
- collapseTablet: false,
6
- collapseDesktop: false,
7
- mobileSpace: "none",
8
- tabletSpace: "none",
9
- desktopSpace: "none",
10
- wideSpace: "none",
11
- collapsibleAlignmentChildProps: null,
12
4
  component: "div"
13
5
  });
14
6
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-design-system",
3
- "version": "0.0.0-gap-stack-20240815054002",
3
+ "version": "0.0.0-gap-stack-20240815060712",
4
4
  "description": "Themeable design system for the SEEK Group",
5
5
  "homepage": "https://seek-oss.github.io/braid-design-system/",
6
6
  "bugs": {