ui-beyable 1.1.0-beta.25 → 1.1.0-beta.26

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.
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { spaceType } from '../Tokens/Tokens';
3
3
  type alignInlineType = 'stretch' | 'start' | 'center' | 'end';
4
+ type justifyType = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
4
5
  type flexType = 'none' | 'auto' | 'shrink' | 'grow';
5
6
  interface StackType {
6
7
  children?: React.ReactNode;
@@ -8,6 +9,7 @@ interface StackType {
8
9
  gap?: spaceType;
9
10
  shouldWrap?: boolean;
10
11
  alignInline?: alignInlineType;
12
+ justify?: justifyType;
11
13
  flex?: flexType;
12
14
  style?: React.CSSProperties;
13
15
  }
@@ -17,6 +19,6 @@ interface StackRowType {
17
19
  flex?: flexType;
18
20
  style?: React.CSSProperties;
19
21
  }
20
- declare function Stack({ children, className, gap, alignInline, flex, style }: StackType): JSX.Element;
22
+ declare function Stack({ children, className, gap, alignInline, justify, flex, style }: StackType): JSX.Element;
21
23
  declare function StackRow({ children, className, flex, style }: StackRowType): JSX.Element;
22
24
  export { Stack, StackRow };
package/lib/cjs/index.js CHANGED
@@ -3569,7 +3569,7 @@ var getAlignClass = function (direction) {
3569
3569
  }
3570
3570
  return '';
3571
3571
  };
3572
- var getJustifyClass = function (direction) {
3572
+ var getJustifyClass$1 = function (direction) {
3573
3573
  switch (direction) {
3574
3574
  case 'start': return flex.flex_justify_start;
3575
3575
  case 'center': return flex.flex_justify_center;
@@ -3615,7 +3615,7 @@ function Inline(_a) {
3615
3615
  cssClass.push(getAlignClass(align));
3616
3616
  }
3617
3617
  if (justify) {
3618
- cssClass.push(getJustifyClass(justify));
3618
+ cssClass.push(getJustifyClass$1(justify));
3619
3619
  }
3620
3620
  return (React.createElement("div", { className: cssClass.join(' '), style: style }, children));
3621
3621
  }
@@ -4189,8 +4189,19 @@ var getFlexClass = function (flex$1) {
4189
4189
  }
4190
4190
  return '';
4191
4191
  };
4192
+ var getJustifyClass = function (direction) {
4193
+ switch (direction) {
4194
+ case 'start': return flex.flex_justify_start;
4195
+ case 'center': return flex.flex_justify_center;
4196
+ case 'end': return flex.flex_justify_end;
4197
+ case 'space-between': return flex.flex_justify_between;
4198
+ case 'space-around': return flex.flex_justify_around;
4199
+ case 'space-evenly': return flex.flex_justify_evenly;
4200
+ }
4201
+ return '';
4202
+ };
4192
4203
  function Stack(_a) {
4193
- var children = _a.children, className = _a.className, _b = _a.gap, gap = _b === void 0 ? 'space.150' : _b, _c = _a.alignInline, alignInline = _c === void 0 ? 'stretch' : _c, flex$1 = _a.flex, _d = _a.style, style = _d === void 0 ? {} : _d;
4204
+ var children = _a.children, className = _a.className, _b = _a.gap, gap = _b === void 0 ? 'space.150' : _b, _c = _a.alignInline, alignInline = _c === void 0 ? 'stretch' : _c, _d = _a.justify, justify = _d === void 0 ? 'start' : _d, flex$1 = _a.flex, _e = _a.style, style = _e === void 0 ? {} : _e;
4194
4205
  var cssClass = [flex.flex, flex.flex_direction_column];
4195
4206
  style.rowGap = token(gap);
4196
4207
  if (className) {
@@ -4202,6 +4213,9 @@ function Stack(_a) {
4202
4213
  if (flex$1) {
4203
4214
  cssClass.push(getFlexClass(flex$1));
4204
4215
  }
4216
+ if (justify) {
4217
+ cssClass.push(getJustifyClass(justify));
4218
+ }
4205
4219
  return (React.createElement("div", { className: cssClass.join(' '), style: style }, children));
4206
4220
  }
4207
4221
  function StackRow(_a) {