@groupeactual/ui-kit 0.4.7 → 0.4.9

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,5 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps } from '@mui/material/Button';
3
- type ActButtonType = (props: ButtonProps) => JSX.Element | null;
4
- declare const ActButton: ActButtonType;
5
- export default ActButton;
3
+ interface Props extends Omit<ButtonProps, 'variant'> {
4
+ variant?: 'primary' | 'secondary';
5
+ component?: any;
6
+ }
7
+ declare const Button: (props: Props) => JSX.Element;
8
+ export default Button;
package/dist/cjs/index.js CHANGED
@@ -44301,7 +44301,7 @@ const ButtonEndIcon = styled$1('span', {
44301
44301
  }, ownerState.size === 'small' && {
44302
44302
  marginRight: -2
44303
44303
  }, commonIconStyles(ownerState)));
44304
- const Button = /*#__PURE__*/React__namespace.forwardRef(function Button(inProps, ref) {
44304
+ const Button$1 = /*#__PURE__*/React__namespace.forwardRef(function Button(inProps, ref) {
44305
44305
  // props priority: `inProps` > `contextProps` > `themeDefaultProps`
44306
44306
  const contextProps = React__namespace.useContext(ButtonGroupContext$1);
44307
44307
  const resolvedProps = resolveProps(contextProps, inProps);
@@ -44362,7 +44362,7 @@ const Button = /*#__PURE__*/React__namespace.forwardRef(function Button(inProps,
44362
44362
  children: [startIcon, children, endIcon]
44363
44363
  }));
44364
44364
  });
44365
- process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = {
44365
+ process.env.NODE_ENV !== "production" ? Button$1.propTypes /* remove-proptypes */ = {
44366
44366
  // ----------------------------- Warning --------------------------------
44367
44367
  // | These PropTypes are generated from the TypeScript type definitions |
44368
44368
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -44456,7 +44456,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */
44456
44456
  */
44457
44457
  variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])
44458
44458
  } : void 0;
44459
- var Button$1 = Button;
44459
+ var ButtonMUI = Button$1;
44460
44460
 
44461
44461
  function getSwitchBaseUtilityClass(slot) {
44462
44462
  return generateUtilityClass('PrivateSwitchBase', slot);
@@ -50454,19 +50454,9 @@ var Text = function (props) { return jsxRuntime.jsx(Typography$1, __assign$1({},
50454
50454
 
50455
50455
  var Link = function (props) { return jsxRuntime.jsx(LinkMui, __assign$1({}, props)); };
50456
50456
 
50457
- var ActButton = styled$1(Button$1)(function (_a) {
50458
- var theme = _a.theme;
50459
- return ({
50460
- color: theme.palette.blueClickable,
50461
- border: "1px solid ".concat(theme.palette.greyLightDefaultborder),
50462
- borderRadius: 4,
50463
- padding: '7.5px 16px',
50464
- fontWeight: theme.typography.fontWeightBold,
50465
- lineHeight: '18px',
50466
- textTransform: 'unset',
50467
- fontSize: '14px'
50468
- });
50469
- });
50457
+ var Button = function (props) {
50458
+ return jsxRuntime.jsx(ButtonMUI, __assign$1({}, props));
50459
+ };
50470
50460
 
50471
50461
  var TextField = function (_a) {
50472
50462
  var name = _a.name, value = _a.value, error = _a.error, onBlur = _a.onBlur, onChange = _a.onChange, label = _a.label, disabled = _a.disabled, endAdornment = _a.endAdornment; _a.isValid; var _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, maxLength = _a.maxLength, props = __rest(_a, ["name", "value", "error", "onBlur", "onChange", "label", "disabled", "endAdornment", "isValid", "placeholder", "maxLength"]);
@@ -50978,7 +50968,7 @@ var TextFieldCss = function (muiTokens) {
50978
50968
  fontSize: '14px',
50979
50969
  lineHeight: '18px',
50980
50970
  fontWeight: 400,
50981
- padding: '12px 14px',
50971
+ padding: '12px 14px !important',
50982
50972
  height: '18px',
50983
50973
  color: muiTokens.palette.greyXDark,
50984
50974
  '&::placeholder': {
@@ -50999,6 +50989,7 @@ var TextFieldCss = function (muiTokens) {
50999
50989
  fontSize: '16px'
51000
50990
  },
51001
50991
  root: {
50992
+ padding: '0px !important',
51002
50993
  '&.Mui-error.MuiOutlinedInput-notchedOutline': {
51003
50994
  borderColor: muiTokens.palette.redError
51004
50995
  },
@@ -51029,10 +51020,48 @@ var TextFieldCss = function (muiTokens) {
51029
51020
  };
51030
51021
  };
51031
51022
 
51023
+ var ButtonCss = function (muiTokens) {
51024
+ return {
51025
+ MuiButton: {
51026
+ styleOverrides: {
51027
+ root: {
51028
+ borderRadius: 4,
51029
+ padding: '7.5px 16px',
51030
+ fontWeight: muiTokens.typography.fontWeightBold,
51031
+ lineHeight: '18px',
51032
+ textTransform: 'unset',
51033
+ fontSize: '14px',
51034
+ border: '1px solid'
51035
+ },
51036
+ primary: {
51037
+ color: muiTokens.palette.white,
51038
+ backgroundColor: muiTokens.palette.blueClickable,
51039
+ borderColor: muiTokens.palette.blueClickable,
51040
+ '&.Mui-disabled': {
51041
+ backgroundColor: muiTokens.palette.greyMediumInactive,
51042
+ borderColor: muiTokens.palette.greyMediumInactive,
51043
+ color: muiTokens.palette.white
51044
+ }
51045
+ },
51046
+ secondary: {
51047
+ color: muiTokens.palette.blueClickable,
51048
+ backgroundColor: muiTokens.palette.white,
51049
+ borderColor: muiTokens.palette.greyLightDefaultborder,
51050
+ '&.Mui-disabled': {
51051
+ backgroundColor: muiTokens.palette.white,
51052
+ borderColor: muiTokens.palette.greyLightDefaultborder,
51053
+ color: muiTokens.palette.greyMediumInactive
51054
+ }
51055
+ }
51056
+ }
51057
+ }
51058
+ };
51059
+ };
51060
+
51032
51061
  var useMaterialThemeCss = function (muiTokens) {
51033
51062
  var muiCss = React.useMemo(function () {
51034
51063
  return {
51035
- components: __assign(__assign({}, TextFieldCss(muiTokens)), { MuiSvgIcon: {
51064
+ components: __assign(__assign(__assign({}, TextFieldCss(muiTokens)), ButtonCss(muiTokens)), { MuiSvgIcon: {
51036
51065
  styleOverrides: {
51037
51066
  colorSuccess: {
51038
51067
  color: muiTokens.palette.success.main
@@ -51239,7 +51268,7 @@ var DesignSystemProvider = function (_a) {
51239
51268
  };
51240
51269
 
51241
51270
  exports.Accordion = ActAccordion;
51242
- exports.Button = ActButton;
51271
+ exports.Button = Button;
51243
51272
  exports.Checkbox = Checkbox;
51244
51273
  exports.DesignSystemContext = DesignSystemContext;
51245
51274
  exports.DesignSystemProvider = DesignSystemProvider;