@spark-web/stack 1.0.10 → 1.1.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @spark-web/stack
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#382](https://github.com/brighte-labs/spark-web/pull/382)
8
+ [`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)
9
+ Thanks [@dilipt-brighte](https://github.com/dilipt-brighte)! - Updates React
10
+ version to latest (18.2.0)
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ [[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)]:
16
+ - @spark-web/box@1.2.0
17
+ - @spark-web/divider@1.1.0
18
+ - @spark-web/theme@3.2.0
19
+ - @spark-web/utils@1.3.0
20
+
3
21
  ## 1.0.10
4
22
 
5
23
  ### Patch Changes
@@ -5,10 +5,10 @@ declare const alignLookup: {
5
5
  readonly stretch: "stretch";
6
6
  };
7
7
  export declare type Align = keyof typeof alignLookup;
8
- export declare const alignToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"left" | "right" | "center" | "stretch"> | undefined) => "start" | "center" | "stretch" | "end" | {
9
- mobile: "start" | "center" | "stretch" | "end" | undefined;
10
- tablet: "start" | "center" | "stretch" | "end" | undefined;
11
- desktop: "start" | "center" | "stretch" | "end" | undefined;
12
- wide: "start" | "center" | "stretch" | "end" | undefined;
8
+ export declare const alignToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"left" | "right" | "center" | "stretch"> | undefined) => "center" | "stretch" | "start" | "end" | {
9
+ mobile: "center" | "stretch" | "start" | "end" | undefined;
10
+ tablet: "center" | "stretch" | "start" | "end" | undefined;
11
+ desktop: "center" | "stretch" | "start" | "end" | undefined;
12
+ wide: "center" | "stretch" | "start" | "end" | undefined;
13
13
  } | undefined;
14
14
  export {};
@@ -11,7 +11,7 @@ export declare type StackProps = {
11
11
  } & ValidBoxProps;
12
12
  export declare const Stack: <Comp extends import("react").ElementType<any> = "div">(props: {
13
13
  as?: Comp | undefined;
14
- ref?: import("react").Ref<Comp extends "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "set" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "set">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
14
+ ref?: import("react").Ref<Comp extends "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap | "set" ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "set">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
15
15
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & {
16
16
  /** Horizontally align items within the stack. */
17
17
  align?: ResponsiveProp<"left" | "right" | "center" | "stretch"> | undefined;
@@ -22,31 +22,29 @@ var alignToAlignItems = theme.createResponsiveMapFn(alignLookup);
22
22
  var _excluded = ["align", "children", "data", "dividers"];
23
23
  var Stack = ts.forwardRefWithAs(function (_ref, forwardedRef) {
24
24
  var _ref$align = _ref.align,
25
- align = _ref$align === void 0 ? 'stretch' : _ref$align,
26
- children = _ref.children,
27
- data = _ref.data,
28
- dividers = _ref.dividers,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
-
25
+ align = _ref$align === void 0 ? 'stretch' : _ref$align,
26
+ children = _ref.children,
27
+ data = _ref.data,
28
+ dividers = _ref.dividers,
29
+ props = _objectWithoutProperties(_ref, _excluded);
31
30
  var alignItems = alignToAlignItems(align);
32
-
33
31
  var rootProps = _objectSpread({
34
32
  ref: forwardedRef,
35
33
  alignItems: alignItems,
36
34
  data: data,
37
35
  display: 'flex',
38
36
  flexDirection: 'column'
39
- }, props); // bail early w/o dividers to avoid unnecessary map
40
-
37
+ }, props);
41
38
 
39
+ // bail early w/o dividers to avoid unnecessary map
42
40
  if (!dividers) {
43
41
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, rootProps), {}, {
44
42
  children: children
45
43
  }));
46
- } // map over children to insert dividers
47
- // remove falsy values before mapping, keeps the index in sync
48
-
44
+ }
49
45
 
46
+ // map over children to insert dividers
47
+ // remove falsy values before mapping, keeps the index in sync
50
48
  var childArray = react.Children.toArray(children);
51
49
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, rootProps), {}, {
52
50
  children: childArray.map(function (child, idx) {
@@ -22,31 +22,29 @@ var alignToAlignItems = theme.createResponsiveMapFn(alignLookup);
22
22
  var _excluded = ["align", "children", "data", "dividers"];
23
23
  var Stack = ts.forwardRefWithAs(function (_ref, forwardedRef) {
24
24
  var _ref$align = _ref.align,
25
- align = _ref$align === void 0 ? 'stretch' : _ref$align,
26
- children = _ref.children,
27
- data = _ref.data,
28
- dividers = _ref.dividers,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
-
25
+ align = _ref$align === void 0 ? 'stretch' : _ref$align,
26
+ children = _ref.children,
27
+ data = _ref.data,
28
+ dividers = _ref.dividers,
29
+ props = _objectWithoutProperties(_ref, _excluded);
31
30
  var alignItems = alignToAlignItems(align);
32
-
33
31
  var rootProps = _objectSpread({
34
32
  ref: forwardedRef,
35
33
  alignItems: alignItems,
36
34
  data: data,
37
35
  display: 'flex',
38
36
  flexDirection: 'column'
39
- }, props); // bail early w/o dividers to avoid unnecessary map
40
-
37
+ }, props);
41
38
 
39
+ // bail early w/o dividers to avoid unnecessary map
42
40
  if (!dividers) {
43
41
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, rootProps), {}, {
44
42
  children: children
45
43
  }));
46
- } // map over children to insert dividers
47
- // remove falsy values before mapping, keeps the index in sync
48
-
44
+ }
49
45
 
46
+ // map over children to insert dividers
47
+ // remove falsy values before mapping, keeps the index in sync
50
48
  var childArray = react.Children.toArray(children);
51
49
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, rootProps), {}, {
52
50
  children: childArray.map(function (child, idx) {
@@ -18,31 +18,29 @@ var alignToAlignItems = createResponsiveMapFn(alignLookup);
18
18
  var _excluded = ["align", "children", "data", "dividers"];
19
19
  var Stack = forwardRefWithAs(function (_ref, forwardedRef) {
20
20
  var _ref$align = _ref.align,
21
- align = _ref$align === void 0 ? 'stretch' : _ref$align,
22
- children = _ref.children,
23
- data = _ref.data,
24
- dividers = _ref.dividers,
25
- props = _objectWithoutProperties(_ref, _excluded);
26
-
21
+ align = _ref$align === void 0 ? 'stretch' : _ref$align,
22
+ children = _ref.children,
23
+ data = _ref.data,
24
+ dividers = _ref.dividers,
25
+ props = _objectWithoutProperties(_ref, _excluded);
27
26
  var alignItems = alignToAlignItems(align);
28
-
29
27
  var rootProps = _objectSpread({
30
28
  ref: forwardedRef,
31
29
  alignItems: alignItems,
32
30
  data: data,
33
31
  display: 'flex',
34
32
  flexDirection: 'column'
35
- }, props); // bail early w/o dividers to avoid unnecessary map
36
-
33
+ }, props);
37
34
 
35
+ // bail early w/o dividers to avoid unnecessary map
38
36
  if (!dividers) {
39
37
  return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, rootProps), {}, {
40
38
  children: children
41
39
  }));
42
- } // map over children to insert dividers
43
- // remove falsy values before mapping, keeps the index in sync
44
-
40
+ }
45
41
 
42
+ // map over children to insert dividers
43
+ // remove falsy values before mapping, keeps the index in sync
46
44
  var childArray = Children.toArray(children);
47
45
  return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, rootProps), {}, {
48
46
  children: childArray.map(function (child, idx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/stack",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,14 +17,14 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.19.0",
19
19
  "@emotion/css": "^11.9.0",
20
- "@spark-web/box": "^1.1.0",
21
- "@spark-web/divider": "^1.0.10",
22
- "@spark-web/theme": "^3.1.0",
23
- "@spark-web/utils": "^1.2.3"
20
+ "@spark-web/box": "^1.2.0",
21
+ "@spark-web/divider": "^1.1.0",
22
+ "@spark-web/theme": "^3.2.0",
23
+ "@spark-web/utils": "^1.3.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/react": "^17.0.12",
27
- "react": "^17.0.2"
26
+ "@types/react": "^18.2.0",
27
+ "react": "^18.2.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": ">=17.0.2"