@majoo-ui/react 1.56.1 → 1.56.2

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.
@@ -6,6 +6,7 @@ export declare const ButtonPrimitive: import("@stitches/react/types/styled-compo
6
6
  size?: "sm" | "md" | "lg" | "xs" | undefined;
7
7
  iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
8
8
  hidden?: boolean | "true" | undefined;
9
+ withIcon?: boolean | "true" | undefined;
9
10
  }, {
10
11
  sm: "(min-width: 359px)";
11
12
  md: "(min-width: 767px)";
@@ -134,6 +135,7 @@ export declare const Button: React.ForwardRefExoticComponent<import("@stitches/r
134
135
  size?: "sm" | "md" | "lg" | "xs" | undefined;
135
136
  iconSize?: "sm" | "md" | "lg" | "xs" | undefined;
136
137
  hidden?: boolean | "true" | undefined;
138
+ withIcon?: boolean | "true" | undefined;
137
139
  }, {
138
140
  sm: "(min-width: 359px)";
139
141
  md: "(min-width: 767px)";
package/index.esm.js CHANGED
@@ -4014,10 +4014,8 @@ const StyledIconRight$2 = styled('div', {
4014
4014
  });
4015
4015
  const ButtonPrimitive = styled('button', {
4016
4016
  margin: 0,
4017
- display: 'inline-flex',
4018
- flexDirection: 'row',
4019
- alignItems: 'center',
4020
- justifyContent: 'center',
4017
+ display: 'block',
4018
+ verticalAlign: 'middle',
4021
4019
  fontWeight: 600,
4022
4020
  width: 'auto',
4023
4021
  height: '40px',
@@ -4131,6 +4129,14 @@ const ButtonPrimitive = styled('button', {
4131
4129
  true: {
4132
4130
  display: 'none'
4133
4131
  }
4132
+ },
4133
+ withIcon: {
4134
+ true: {
4135
+ display: 'inline-flex',
4136
+ flexDirection: 'row',
4137
+ alignItems: 'center',
4138
+ justifyContent: 'center'
4139
+ }
4134
4140
  }
4135
4141
  }
4136
4142
  });
@@ -4153,6 +4159,7 @@ const Button$4 = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
4153
4159
  type: type,
4154
4160
  buttonType: buttonType,
4155
4161
  size: size,
4162
+ withIcon: Boolean(icon || leftIcon || rightIcon),
4156
4163
  iconSize: icon ? size : undefined,
4157
4164
  disabled: disabled,
4158
4165
  css: Object.assign(Object.assign({}, props.css), {
@@ -13448,7 +13455,7 @@ function addPropsToChildren(children, props) {
13448
13455
  const _excluded$9 = ["children"],
13449
13456
  _excluded2$3 = ["children", "activeTabs"],
13450
13457
  _excluded3$1 = ["children", "icon", "activeTabs", "value"],
13451
- _excluded4$1 = ["activeTabs"];
13458
+ _excluded4 = ["activeTabs"];
13452
13459
  var _jsxFileName$r = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/tabs/Tabs.js";
13453
13460
  const StyledTabs = styled(TabsPrimitive.Root, {
13454
13461
  display: 'flex',
@@ -13760,7 +13767,7 @@ const TabsTrigger$1 = _ref3 => {
13760
13767
  }), (!icon || activeTabs === value) && children)));
13761
13768
  };
13762
13769
  const TabsContent$1 = _ref4 => {
13763
- let props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
13770
+ let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
13764
13771
  return /*#__PURE__*/React__default.createElement(StyledContent$4, _extends({}, props, {
13765
13772
  __self: undefined,
13766
13773
  __source: {
@@ -21504,8 +21511,7 @@ const AlertDialogConfirm = ADialog.Action;
21504
21511
 
21505
21512
  const _excluded = ["side", "align", "children"],
21506
21513
  _excluded2 = ["children"],
21507
- _excluded3 = ["asChild"],
21508
- _excluded4 = ["rightIcon"];
21514
+ _excluded3 = ["asChild"];
21509
21515
  var _jsxFileName$a = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/dropdownMenu/DropdownMenu.js";
21510
21516
  const Context = /*#__PURE__*/React__default.createContext();
21511
21517
  const slideUpAndFade = keyframes({
@@ -21721,9 +21727,7 @@ const RightSlot = styled('div', {
21721
21727
  color: colors$5.gray400
21722
21728
  }
21723
21729
  });
21724
- const StyledDropdown = styled(ButtonPrimitive, {
21725
- display: 'flex',
21726
- gap: '8px',
21730
+ const StyledDropdown = styled(Button$4, {
21727
21731
  padding: '6px 12px',
21728
21732
  '&:disabled': {
21729
21733
  '& + div': {
@@ -21732,10 +21736,7 @@ const StyledDropdown = styled(ButtonPrimitive, {
21732
21736
  }
21733
21737
  });
21734
21738
  const ButtonDropdown = /*#__PURE__*/React__default.forwardRef((props, ref) => {
21735
- const {
21736
- rightIcon
21737
- } = props,
21738
- rest = _objectWithoutPropertiesLoose(props, _excluded4);
21739
+ const rest = Object.assign({}, (_objectDestructuringEmpty(props), props));
21739
21740
  return /*#__PURE__*/React__default.createElement(StyledDropdown, _extends({
21740
21741
  ref: ref,
21741
21742
  css: rest.css
@@ -21743,10 +21744,10 @@ const ButtonDropdown = /*#__PURE__*/React__default.forwardRef((props, ref) => {
21743
21744
  __self: undefined,
21744
21745
  __source: {
21745
21746
  fileName: _jsxFileName$a,
21746
- lineNumber: 177,
21747
+ lineNumber: 175,
21747
21748
  columnNumber: 5
21748
21749
  }
21749
- }), rest.children, rightIcon && rightIcon);
21750
+ }), rest.children);
21750
21751
  });
21751
21752
  ButtonDropdown.propTypes = {
21752
21753
  children: PropTypes.node.isRequired,
package/index.umd.js CHANGED
@@ -4089,10 +4089,8 @@
4089
4089
  });
4090
4090
  var ButtonPrimitive = styled('button', {
4091
4091
  margin: 0,
4092
- display: 'inline-flex',
4093
- flexDirection: 'row',
4094
- alignItems: 'center',
4095
- justifyContent: 'center',
4092
+ display: 'block',
4093
+ verticalAlign: 'middle',
4096
4094
  fontWeight: 600,
4097
4095
  width: 'auto',
4098
4096
  height: '40px',
@@ -4206,6 +4204,14 @@
4206
4204
  true: {
4207
4205
  display: 'none'
4208
4206
  }
4207
+ },
4208
+ withIcon: {
4209
+ true: {
4210
+ display: 'inline-flex',
4211
+ flexDirection: 'row',
4212
+ alignItems: 'center',
4213
+ justifyContent: 'center'
4214
+ }
4209
4215
  }
4210
4216
  }
4211
4217
  });
@@ -4231,6 +4237,7 @@
4231
4237
  type: type,
4232
4238
  buttonType: buttonType,
4233
4239
  size: size,
4240
+ withIcon: Boolean(icon || leftIcon || rightIcon),
4234
4241
  iconSize: icon ? size : undefined,
4235
4242
  disabled: disabled,
4236
4243
  css: __assign(__assign({}, props.css), {
@@ -13623,7 +13630,7 @@
13623
13630
  const _excluded$9 = ["children"],
13624
13631
  _excluded2$3 = ["children", "activeTabs"],
13625
13632
  _excluded3$1 = ["children", "icon", "activeTabs", "value"],
13626
- _excluded4$1 = ["activeTabs"];
13633
+ _excluded4 = ["activeTabs"];
13627
13634
  var _jsxFileName$r = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/tabs/Tabs.js";
13628
13635
  const StyledTabs = styled(TabsPrimitive__namespace.Root, {
13629
13636
  display: 'flex',
@@ -13935,7 +13942,7 @@
13935
13942
  }), (!icon || activeTabs === value) && children)));
13936
13943
  };
13937
13944
  const TabsContent$1 = _ref4 => {
13938
- let props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
13945
+ let props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
13939
13946
  return /*#__PURE__*/React__default["default"].createElement(StyledContent$4, _extends({}, props, {
13940
13947
  __self: undefined,
13941
13948
  __source: {
@@ -21886,8 +21893,7 @@
21886
21893
 
21887
21894
  const _excluded = ["side", "align", "children"],
21888
21895
  _excluded2 = ["children"],
21889
- _excluded3 = ["asChild"],
21890
- _excluded4 = ["rightIcon"];
21896
+ _excluded3 = ["asChild"];
21891
21897
  var _jsxFileName$a = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/dropdownMenu/DropdownMenu.js";
21892
21898
  const Context = /*#__PURE__*/React__default["default"].createContext();
21893
21899
  const slideUpAndFade = keyframes({
@@ -22103,9 +22109,7 @@
22103
22109
  color: colors$5.gray400
22104
22110
  }
22105
22111
  });
22106
- const StyledDropdown = styled(ButtonPrimitive, {
22107
- display: 'flex',
22108
- gap: '8px',
22112
+ const StyledDropdown = styled(Button$4, {
22109
22113
  padding: '6px 12px',
22110
22114
  '&:disabled': {
22111
22115
  '& + div': {
@@ -22114,10 +22118,7 @@
22114
22118
  }
22115
22119
  });
22116
22120
  const ButtonDropdown = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => {
22117
- const {
22118
- rightIcon
22119
- } = props,
22120
- rest = _objectWithoutPropertiesLoose(props, _excluded4);
22121
+ const rest = Object.assign({}, (_objectDestructuringEmpty(props), props));
22121
22122
  return /*#__PURE__*/React__default["default"].createElement(StyledDropdown, _extends({
22122
22123
  ref: ref,
22123
22124
  css: rest.css
@@ -22125,10 +22126,10 @@
22125
22126
  __self: undefined,
22126
22127
  __source: {
22127
22128
  fileName: _jsxFileName$a,
22128
- lineNumber: 177,
22129
+ lineNumber: 175,
22129
22130
  columnNumber: 5
22130
22131
  }
22131
- }), rest.children, rightIcon && rightIcon);
22132
+ }), rest.children);
22132
22133
  });
22133
22134
  ButtonDropdown.propTypes = {
22134
22135
  children: PropTypes__default["default"].node.isRequired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.56.1",
3
+ "version": "1.56.2",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",