@mailstep/design-system 0.6.42 → 0.6.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.6.42",
3
+ "version": "0.6.43",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -20,14 +20,17 @@ import DropdownSelect from '../../../../Elements/DropdownSelect';
20
20
  export var Row = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"], ["\n display: flex;\n & > * {\n margin-right: 12px;\n }\n z-index: 2;\n"])));
21
21
  var StyledButton = styled(Button)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"], ["\n display: none;\n\n @media (min-width: 1024px) {\n display: block;\n }\n"])));
22
22
  var ControlButton = function (_a) {
23
- var node = _a.node, label = _a.label, appearance = _a.appearance, variant = _a.variant, disabled = _a.disabled, onClick = _a.onClick, onSelect = _a.onSelect, options = _a.options, hideChevron = _a.hideChevron;
23
+ var hide = _a.hide, node = _a.node, label = _a.label, appearance = _a.appearance, variant = _a.variant, disabled = _a.disabled, onClick = _a.onClick, onSelect = _a.onSelect, options = _a.options, hideChevron = _a.hideChevron, iconLeft = _a.iconLeft;
24
+ if (hide) {
25
+ return null;
26
+ }
24
27
  if (node)
25
28
  return _jsx(_Fragment, { children: node });
26
29
  if (options) {
27
30
  return (_jsx(DropdownSelect, { label: label || '', appearance: appearance || 'secondary', variant: variant || 'default', options: options, showChevron: !hideChevron, onSelect: onSelect, disabled: disabled }));
28
31
  }
29
32
  else {
30
- return (_jsx(StyledButton, { type: "button", onClick: onClick, disabled: disabled, variant: variant || 'default', appearance: appearance || 'secondary', children: label }));
33
+ return (_jsx(StyledButton, { type: "button", onClick: onClick, disabled: disabled, variant: variant || 'default', appearance: appearance || 'primary', iconLeft: iconLeft, children: label }));
31
34
  }
32
35
  };
33
36
  var ExtraControlButtons = function (_a) {
@@ -287,6 +287,7 @@ export type ExtraControlButton = {
287
287
  hide?: boolean;
288
288
  hideChevron?: boolean;
289
289
  disabled?: boolean;
290
+ iconLeft?: string | JSX.Element;
290
291
  };
291
292
  export type Group = {
292
293
  name?: string;
package/ui/index.es.js CHANGED
@@ -46892,16 +46892,18 @@ const lxe = ie.div`
46892
46892
  display: block;
46893
46893
  }
46894
46894
  `, Mxe = ({
46895
- node: e,
46896
- label: t,
46897
- appearance: r,
46898
- variant: n,
46899
- disabled: i,
46900
- onClick: o,
46901
- onSelect: l,
46902
- options: c,
46903
- hideChevron: u
46904
- }) => e ? /* @__PURE__ */ b.jsx(b.Fragment, { children: e }) : c ? /* @__PURE__ */ b.jsx(Oxe, { label: t || "", appearance: r || "secondary", variant: n || "default", options: c, showChevron: !u, onSelect: l, disabled: i }) : /* @__PURE__ */ b.jsx(Pxe, { type: "button", onClick: o, disabled: i, variant: n || "default", appearance: r || "secondary", children: t }), uM = ({
46895
+ hide: e,
46896
+ node: t,
46897
+ label: r,
46898
+ appearance: n,
46899
+ variant: i,
46900
+ disabled: o,
46901
+ onClick: l,
46902
+ onSelect: c,
46903
+ options: u,
46904
+ hideChevron: f,
46905
+ iconLeft: h
46906
+ }) => e ? null : t ? /* @__PURE__ */ b.jsx(b.Fragment, { children: t }) : u ? /* @__PURE__ */ b.jsx(Oxe, { label: r || "", appearance: n || "secondary", variant: i || "default", options: u, showChevron: !f, onSelect: c, disabled: o }) : /* @__PURE__ */ b.jsx(Pxe, { type: "button", onClick: l, disabled: o, variant: i || "default", appearance: n || "primary", iconLeft: h, children: r }), uM = ({
46905
46907
  extraControlButtons: e,
46906
46908
  targetPosition: t
46907
46909
  }) => /* @__PURE__ */ b.jsx(Txe, { children: (e || []).filter(({
package/ui/index.umd.js CHANGED
@@ -3661,7 +3661,7 @@ Avoid returning a new reference inside your input selector, e.g.
3661
3661
  @media (min-width: 1024px) {
3662
3662
  display: block;
3663
3663
  }
3664
- `,Mxe=({node:e,label:t,appearance:r,variant:n,disabled:i,onClick:o,onSelect:l,options:u,hideChevron:c})=>e?b.jsx(b.Fragment,{children:e}):u?b.jsx(Lj,{label:t||"",appearance:r||"secondary",variant:n||"default",options:u,showChevron:!c,onSelect:l,disabled:i}):b.jsx(Pxe,{type:"button",onClick:o,disabled:i,variant:n||"default",appearance:r||"secondary",children:t}),Rj=({extraControlButtons:e,targetPosition:t})=>b.jsx(Txe,{children:(e||[]).filter(({position:r})=>r==t).map((r,n)=>b.jsx(ot.div,{children:b.jsx(Mxe,{...r})},n))}),Dxe=ae(Ll)`
3664
+ `,Mxe=({hide:e,node:t,label:r,appearance:n,variant:i,disabled:o,onClick:l,onSelect:u,options:c,hideChevron:f,iconLeft:h})=>e?null:t?b.jsx(b.Fragment,{children:t}):c?b.jsx(Lj,{label:r||"",appearance:n||"secondary",variant:i||"default",options:c,showChevron:!f,onSelect:u,disabled:o}):b.jsx(Pxe,{type:"button",onClick:l,disabled:o,variant:i||"default",appearance:n||"primary",iconLeft:h,children:r}),Rj=({extraControlButtons:e,targetPosition:t})=>b.jsx(Txe,{children:(e||[]).filter(({position:r})=>r==t).map((r,n)=>b.jsx(ot.div,{children:b.jsx(Mxe,{...r})},n))}),Dxe=ae(Ll)`
3665
3665
  position: ${({isMobileInputView:e})=>e?"absolute":"relative"};
3666
3666
  z-index: ${({isMobileInputView:e})=>e?"3":"1"};
3667
3667
  width: ${({isMobileInputView:e})=>e?"90vw":"auto"};