@activecollab/components 1.0.223 → 1.0.225

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.
@@ -26,12 +26,7 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
26
  variant: variant,
27
27
  size: size,
28
28
  ref: ref
29
- }, args), _react.Children.map(children, function (child) {
30
- if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
31
- return null;
32
- }
33
- return child;
34
- }));
29
+ }, args), children);
35
30
  });
36
31
  exports.IconButton = IconButton;
37
32
  IconButton.displayName = "IconButton";
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","names":["IconButton","forwardRef","ref","children","className","variant","size","args","classNames","Children","map","child","isValidElement","displayName"],"sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import classNames from \"classnames\";\nimport React, {\n Children,\n forwardRef,\n isValidElement,\n PropsWithChildren,\n} from \"react\";\nimport { ButtonProps } from \"../Button\";\nimport { StyledIconButton } from \"./Styles\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IconButtonProps extends ButtonProps {}\n\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(({ children, className, variant, size, ...args }, ref) => {\n return (\n <StyledIconButton\n className={classNames(\"c-btn--icon-only\", className)}\n variant={variant}\n size={size}\n ref={ref}\n {...args}\n >\n {Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return null;\n }\n\n return child;\n })}\n </StyledIconButton>\n );\n});\n\nIconButton.displayName = \"IconButton\";\n"],"mappings":";;;;;;;AAAA;AACA;AAOA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKrC,IAAMA,UAAU,gBAAG,IAAAC,iBAAU,EAGlC,gBAAkDC,GAAG,EAAK;EAAA,IAAvDC,QAAQ,QAARA,QAAQ;IAAEC,SAAS,QAATA,SAAS;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAKC,IAAI;EAC9C,oBACE,6BAAC,wBAAgB;IACf,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEJ,SAAS,CAAE;IACrD,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEC,IAAK;IACX,GAAG,EAAEJ;EAAI,GACLK,IAAI,GAEPE,eAAQ,CAACC,GAAG,CAACP,QAAQ,EAAE,UAACQ,KAAK,EAAK;IACjC,IAAI,eAAC,IAAAC,qBAAc,EAACD,KAAK,CAAC,EAAE;MAC1B,OAAO,IAAI;IACb;IAEA,OAAOA,KAAK;EACd,CAAC,CAAC,CACe;AAEvB,CAAC,CAAC;AAAC;AAEHX,UAAU,CAACa,WAAW,GAAG,YAAY"}
1
+ {"version":3,"file":"IconButton.js","names":["IconButton","forwardRef","ref","children","className","variant","size","args","classNames","displayName"],"sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import classNames from \"classnames\";\nimport React, { forwardRef, PropsWithChildren } from \"react\";\nimport { ButtonProps } from \"../Button\";\nimport { StyledIconButton } from \"./Styles\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IconButtonProps extends ButtonProps {}\n\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(({ children, className, variant, size, ...args }, ref) => {\n return (\n <StyledIconButton\n className={classNames(\"c-btn--icon-only\", className)}\n variant={variant}\n size={size}\n ref={ref}\n {...args}\n >\n {children}\n </StyledIconButton>\n );\n});\n\nIconButton.displayName = \"IconButton\";\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKrC,IAAMA,UAAU,gBAAG,IAAAC,iBAAU,EAGlC,gBAAkDC,GAAG,EAAK;EAAA,IAAvDC,QAAQ,QAARA,QAAQ;IAAEC,SAAS,QAATA,SAAS;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAKC,IAAI;EAC9C,oBACE,6BAAC,wBAAgB;IACf,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEJ,SAAS,CAAE;IACrD,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEC,IAAK;IACX,GAAG,EAAEJ;EAAI,GACLK,IAAI,GAEPJ,QAAQ,CACQ;AAEvB,CAAC,CAAC;AAAC;AAEHH,UAAU,CAACS,WAAW,GAAG,YAAY"}
@@ -12,7 +12,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
12
12
  var StyledIconButton = (0, _styledComponents.default)(_Button.Button).withConfig({
13
13
  displayName: "Styles__StyledIconButton",
14
14
  componentId: "sc-1teza2f-0"
15
- })(["display:flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
15
+ })(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
16
16
  var size = _ref.size;
17
17
  return size === "small" && (0, _styledComponents.css)(["width:24px;"]);
18
18
  }, function (_ref2) {
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["StyledIconButton","styled","Button","size","css"],"sources":["../../../../src/components/IconButton/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Button } from \"../Button\";\n\nexport const StyledIconButton = styled(Button)`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0;\n width: 32px;\n\n ${({ size }) =>\n size === \"small\" &&\n css`\n width: 24px;\n `}\n\n ${({ size }) =>\n size === \"big\" &&\n css`\n width: 40px;\n `}\n`;\n"],"mappings":";;;;;;;AAAA;AACA;AAAmC;AAAA;AAE5B,IAAMA,gBAAgB,GAAG,IAAAC,yBAAM,EAACC,cAAM,CAAC;EAAA;EAAA;AAAA,8FAO1C;EAAA,IAAGC,IAAI,QAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,OAAO,QAChBC,qBAAG,kBAEF;AAAA,GAED;EAAA,IAAGD,IAAI,SAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,KAAK,QACdC,qBAAG,kBAEF;AAAA,EACJ;AAAC"}
1
+ {"version":3,"file":"Styles.js","names":["StyledIconButton","styled","Button","size","css"],"sources":["../../../../src/components/IconButton/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Button } from \"../Button\";\n\nexport const StyledIconButton = styled(Button)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 0;\n width: 32px;\n\n ${({ size }) =>\n size === \"small\" &&\n css`\n width: 24px;\n `}\n\n ${({ size }) =>\n size === \"big\" &&\n css`\n width: 40px;\n `}\n`;\n"],"mappings":";;;;;;;AAAA;AACA;AAAmC;AAAA;AAE5B,IAAMA,gBAAgB,GAAG,IAAAC,yBAAM,EAACC,cAAM,CAAC;EAAA;EAAA;AAAA,qGAO1C;EAAA,IAAGC,IAAI,QAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,OAAO,QAChBC,qBAAG,kBAEF;AAAA,GAED;EAAA,IAAGD,IAAI,SAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,KAAK,QACdC,qBAAG,kBAEF;AAAA,EACJ;AAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAKN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC,MAAM,WAAW,eAAgB,SAAQ,WAAW;CAAG;AAEvD,eAAO,MAAM,UAAU;;2CAqBrB,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxC,MAAM,WAAW,eAAgB,SAAQ,WAAW;CAAG;AAEvD,eAAO,MAAM,UAAU;;2CAerB,CAAC"}
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["children", "className", "variant", "size"];
4
4
  import classNames from "classnames";
5
- import React, { Children, forwardRef, isValidElement } from "react";
5
+ import React, { forwardRef } from "react";
6
6
  import { StyledIconButton } from "./Styles";
7
7
 
8
8
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -18,12 +18,7 @@ export var IconButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
18
18
  variant: variant,
19
19
  size: size,
20
20
  ref: ref
21
- }, args), Children.map(children, function (child) {
22
- if (! /*#__PURE__*/isValidElement(child)) {
23
- return null;
24
- }
25
- return child;
26
- }));
21
+ }, args), children);
27
22
  });
28
23
  IconButton.displayName = "IconButton";
29
24
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","names":["classNames","React","Children","forwardRef","isValidElement","StyledIconButton","IconButton","ref","children","className","variant","size","args","map","child","displayName"],"sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import classNames from \"classnames\";\nimport React, {\n Children,\n forwardRef,\n isValidElement,\n PropsWithChildren,\n} from \"react\";\nimport { ButtonProps } from \"../Button\";\nimport { StyledIconButton } from \"./Styles\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IconButtonProps extends ButtonProps {}\n\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(({ children, className, variant, size, ...args }, ref) => {\n return (\n <StyledIconButton\n className={classNames(\"c-btn--icon-only\", className)}\n variant={variant}\n size={size}\n ref={ref}\n {...args}\n >\n {Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return null;\n }\n\n return child;\n })}\n </StyledIconButton>\n );\n});\n\nIconButton.displayName = \"IconButton\";\n"],"mappings":";;;AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IACVC,QAAQ,EACRC,UAAU,EACVC,cAAc,QAET,OAAO;AAEd,SAASC,gBAAgB,QAAQ,UAAU;;AAE3C;;AAGA,OAAO,IAAMC,UAAU,gBAAGH,UAAU,CAGlC,gBAAkDI,GAAG,EAAK;EAAA,IAAvDC,QAAQ,QAARA,QAAQ;IAAEC,SAAS,QAATA,SAAS;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAKC,IAAI;EAC9C,oBACE,oBAAC,gBAAgB;IACf,SAAS,EAAEZ,UAAU,CAAC,kBAAkB,EAAES,SAAS,CAAE;IACrD,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEC,IAAK;IACX,GAAG,EAAEJ;EAAI,GACLK,IAAI,GAEPV,QAAQ,CAACW,GAAG,CAACL,QAAQ,EAAE,UAACM,KAAK,EAAK;IACjC,IAAI,eAACV,cAAc,CAACU,KAAK,CAAC,EAAE;MAC1B,OAAO,IAAI;IACb;IAEA,OAAOA,KAAK;EACd,CAAC,CAAC,CACe;AAEvB,CAAC,CAAC;AAEFR,UAAU,CAACS,WAAW,GAAG,YAAY"}
1
+ {"version":3,"file":"IconButton.js","names":["classNames","React","forwardRef","StyledIconButton","IconButton","ref","children","className","variant","size","args","displayName"],"sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import classNames from \"classnames\";\nimport React, { forwardRef, PropsWithChildren } from \"react\";\nimport { ButtonProps } from \"../Button\";\nimport { StyledIconButton } from \"./Styles\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface IconButtonProps extends ButtonProps {}\n\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(({ children, className, variant, size, ...args }, ref) => {\n return (\n <StyledIconButton\n className={classNames(\"c-btn--icon-only\", className)}\n variant={variant}\n size={size}\n ref={ref}\n {...args}\n >\n {children}\n </StyledIconButton>\n );\n});\n\nIconButton.displayName = \"IconButton\";\n"],"mappings":";;;AAAA,OAAOA,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IAAIC,UAAU,QAA2B,OAAO;AAE5D,SAASC,gBAAgB,QAAQ,UAAU;;AAE3C;;AAGA,OAAO,IAAMC,UAAU,gBAAGF,UAAU,CAGlC,gBAAkDG,GAAG,EAAK;EAAA,IAAvDC,QAAQ,QAARA,QAAQ;IAAEC,SAAS,QAATA,SAAS;IAAEC,OAAO,QAAPA,OAAO;IAAEC,IAAI,QAAJA,IAAI;IAAKC,IAAI;EAC9C,oBACE,oBAAC,gBAAgB;IACf,SAAS,EAAEV,UAAU,CAAC,kBAAkB,EAAEO,SAAS,CAAE;IACrD,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEC,IAAK;IACX,GAAG,EAAEJ;EAAI,GACLK,IAAI,GAEPJ,QAAQ,CACQ;AAEvB,CAAC,CAAC;AAEFF,UAAU,CAACO,WAAW,GAAG,YAAY"}
@@ -3,7 +3,7 @@ import { Button } from "../Button";
3
3
  export var StyledIconButton = styled(Button).withConfig({
4
4
  displayName: "Styles__StyledIconButton",
5
5
  componentId: "sc-1teza2f-0"
6
- })(["display:flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
6
+ })(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
7
7
  var size = _ref.size;
8
8
  return size === "small" && css(["width:24px;"]);
9
9
  }, function (_ref2) {
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.js","names":["styled","css","Button","StyledIconButton","size"],"sources":["../../../../src/components/IconButton/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Button } from \"../Button\";\n\nexport const StyledIconButton = styled(Button)`\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0;\n width: 32px;\n\n ${({ size }) =>\n size === \"small\" &&\n css`\n width: 24px;\n `}\n\n ${({ size }) =>\n size === \"big\" &&\n css`\n width: 40px;\n `}\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,IAAMC,gBAAgB,GAAGH,MAAM,CAACE,MAAM,CAAC;EAAA;EAAA;AAAA,8FAO1C;EAAA,IAAGE,IAAI,QAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,OAAO,IAChBH,GAAG,iBAEF;AAAA,GAED;EAAA,IAAGG,IAAI,SAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,KAAK,IACdH,GAAG,iBAEF;AAAA,EACJ"}
1
+ {"version":3,"file":"Styles.js","names":["styled","css","Button","StyledIconButton","size"],"sources":["../../../../src/components/IconButton/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Button } from \"../Button\";\n\nexport const StyledIconButton = styled(Button)`\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 0;\n width: 32px;\n\n ${({ size }) =>\n size === \"small\" &&\n css`\n width: 24px;\n `}\n\n ${({ size }) =>\n size === \"big\" &&\n css`\n width: 40px;\n `}\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,IAAMC,gBAAgB,GAAGH,MAAM,CAACE,MAAM,CAAC;EAAA;EAAA;AAAA,qGAO1C;EAAA,IAAGE,IAAI,QAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,OAAO,IAChBH,GAAG,iBAEF;AAAA,GAED;EAAA,IAAGG,IAAI,SAAJA,IAAI;EAAA,OACPA,IAAI,KAAK,KAAK,IACdH,GAAG,iBAEF;AAAA,EACJ"}
package/dist/index.js CHANGED
@@ -12389,7 +12389,7 @@
12389
12389
  var StyledIconButton = styled__default["default"](Button).withConfig({
12390
12390
  displayName: "Styles__StyledIconButton",
12391
12391
  componentId: "sc-1teza2f-0"
12392
- })(["display:flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
12392
+ })(["display:inline-flex;justify-content:center;align-items:center;padding:0;width:32px;", " ", ""], function (_ref) {
12393
12393
  var size = _ref.size;
12394
12394
  return size === "small" && styled.css(["width:24px;"]);
12395
12395
  }, function (_ref2) {
@@ -12412,12 +12412,7 @@
12412
12412
  variant: variant,
12413
12413
  size: size,
12414
12414
  ref: ref
12415
- }, args), React.Children.map(children, function (child) {
12416
- if (! /*#__PURE__*/React.isValidElement(child)) {
12417
- return null;
12418
- }
12419
- return child;
12420
- }));
12415
+ }, args), children);
12421
12416
  });
12422
12417
  IconButton.displayName = "IconButton";
12423
12418