@activecollab/components 1.0.408 → 1.0.409

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,21 +1,13 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
7
+ var _react = _interopRequireDefault(require("react"));
9
8
  var _excluded = ["isIndeterminate", "data-testid"];
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
10
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
11
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
20
12
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
13
  /**
@@ -41,18 +33,17 @@ var CheckboxIcon = /*#__PURE__*/_react.default.forwardRef(function (_ref, svgRef
41
33
  var isIndeterminate = _ref.isIndeterminate,
42
34
  testId = _ref["data-testid"],
43
35
  props = _objectWithoutProperties(_ref, _excluded);
44
- var _useState = (0, _react.useState)(false),
45
- _useState2 = _slicedToArray(_useState, 2),
46
- animate = _useState2[0],
47
- setAnimate = _useState2[1];
48
- var mountRef = (0, _react.useRef)(false);
49
- (0, _react.useEffect)(function () {
50
- if (mountRef.current) {
51
- setAnimate(true);
52
- } else {
53
- mountRef.current = true;
54
- }
55
- }, []);
36
+ // const [animate, setAnimate] = useState(false);
37
+ // const mountRef = useRef(false);
38
+
39
+ // useEffect(() => {
40
+ // if (mountRef.current) {
41
+ // setAnimate(true);
42
+ // } else {
43
+ // mountRef.current = true;
44
+ // }
45
+ // }, [isIndeterminate]);
46
+
56
47
  if (isIndeterminate) {
57
48
  return /*#__PURE__*/_react.default.createElement("svg", {
58
49
  width: "16",
@@ -69,17 +60,11 @@ var CheckboxIcon = /*#__PURE__*/_react.default.forwardRef(function (_ref, svgRef
69
60
  }), /*#__PURE__*/_react.default.createElement("rect", {
70
61
  x: "3",
71
62
  y: "7",
72
- width: !animate ? 10 : 0,
63
+ width: 10,
73
64
  height: "2",
74
65
  rx: "1",
75
66
  fill: "var(--page-paper-main)"
76
- }, animate && /*#__PURE__*/_react.default.createElement("animate", {
77
- attributeName: "width",
78
- from: "0",
79
- to: "10",
80
- dur: "0.2s",
81
- fill: "freeze"
82
- })));
67
+ }));
83
68
  }
84
69
  return /*#__PURE__*/_react.default.createElement("svg", _extends({
85
70
  width: 16,
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxIcon.js","names":["CheckboxIcon","React","forwardRef","svgRef","isIndeterminate","testId","props","useState","animate","setAnimate","mountRef","useRef","useEffect","current","displayName"],"sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\n\n/**\n * @component CheckboxIcon\n * @description\n *\n * The React Icon component is a visual element that displays an icon to represent a concept, object, or action.\n * The Icon component is\n * customizable, allowing for variations in size, color, and style to fit the needs of the application.\n *\n *\n * @example\n * return (\n * <CheckboxIcon className=\"mr-2\" showAdditionalIcon={true} />\n * )\n *\n * @see\n * https://system.activecollab.com/?path=/story/foundation-icons-icons--icons\n * @see\n * https://design.activecollab.com/docs/foundations/icons\n */\nconst CheckboxIcon = React.forwardRef(\n (\n {\n isIndeterminate,\n \"data-testid\": testId,\n ...props\n }: {\n isIndeterminate?: boolean;\n \"data-testid\"?: string;\n } & React.SVGProps<SVGSVGElement>,\n svgRef?: React.Ref<SVGSVGElement>\n ) => {\n const [animate, setAnimate] = useState(false);\n const mountRef = useRef(false);\n\n useEffect(() => {\n if (mountRef.current) {\n setAnimate(true);\n } else {\n mountRef.current = true;\n }\n }, []);\n\n if (isIndeterminate) {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid={testId}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z\"\n fill=\"var(--color-secondary)\"\n />\n <rect\n x=\"3\"\n y=\"7\"\n width={!animate ? 10 : 0}\n height=\"2\"\n rx=\"1\"\n fill=\"var(--page-paper-main)\"\n >\n {animate && (\n <animate\n attributeName=\"width\"\n from=\"0\"\n to=\"10\"\n dur=\"0.2s\"\n fill=\"freeze\"\n />\n )}\n </rect>\n </svg>\n );\n }\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"var(--color-theme-600)\"\n focusable={false}\n ref={svgRef}\n {...props}\n data-testid={testId}\n >\n <g fillRule=\"evenodd\">\n <rect\n stroke=\"#8E8E8E\"\n x={0.5}\n y={0.5}\n width={15}\n height={15}\n rx={2}\n />\n <path\n stroke=\"#979797\"\n strokeWidth={2}\n d=\"M12.243 5l-5.657 5.657-2.829-2.829\"\n />\n </g>\n </svg>\n );\n }\n);\nCheckboxIcon.displayName = \"CheckboxIcon\";\nexport default CheckboxIcon;\n"],"mappings":";;;;;;;AAAA;AAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,YAAY,gBAAGC,cAAK,CAACC,UAAU,CACnC,gBASEC,MAAiC,EAC9B;EAAA,IARDC,eAAe,QAAfA,eAAe;IACAC,MAAM,QAArB,aAAa;IACVC,KAAK;EAOV,gBAA8B,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAAtCC,OAAO;IAAEC,UAAU;EAC1B,IAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAE9B,IAAAC,gBAAS,EAAC,YAAM;IACd,IAAIF,QAAQ,CAACG,OAAO,EAAE;MACpBJ,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,MAAM;MACLC,QAAQ,CAACG,OAAO,GAAG,IAAI;IACzB;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIT,eAAe,EAAE;IACnB,oBACE;MACE,KAAK,EAAC,IAAI;MACV,MAAM,EAAC,IAAI;MACX,OAAO,EAAC,WAAW;MACnB,IAAI,EAAC,MAAM;MACX,KAAK,EAAC,4BAA4B;MAClC,eAAaC;IAAO,gBAEpB;MACE,QAAQ,EAAC,SAAS;MAClB,QAAQ,EAAC,SAAS;MAClB,CAAC,EAAC,+KAA+K;MACjL,IAAI,EAAC;IAAwB,EAC7B,eACF;MACE,CAAC,EAAC,GAAG;MACL,CAAC,EAAC,GAAG;MACL,KAAK,EAAE,CAACG,OAAO,GAAG,EAAE,GAAG,CAAE;MACzB,MAAM,EAAC,GAAG;MACV,EAAE,EAAC,GAAG;MACN,IAAI,EAAC;IAAwB,GAE5BA,OAAO,iBACN;MACE,aAAa,EAAC,OAAO;MACrB,IAAI,EAAC,GAAG;MACR,EAAE,EAAC,IAAI;MACP,GAAG,EAAC,MAAM;MACV,IAAI,EAAC;IAAQ,EAEhB,CACI,CACH;EAEV;EACA,oBACE;IACE,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,OAAO,EAAC,WAAW;IACnB,KAAK,EAAC,4BAA4B;IAClC,IAAI,EAAC,wBAAwB;IAC7B,SAAS,EAAE,KAAM;IACjB,GAAG,EAAEL;EAAO,GACRG,KAAK;IACT,eAAaD;EAAO,iBAEpB;IAAG,QAAQ,EAAC;EAAS,gBACnB;IACE,MAAM,EAAC,SAAS;IAChB,CAAC,EAAE,GAAI;IACP,CAAC,EAAE,GAAI;IACP,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,EAAE,EAAE;EAAE,EACN,eACF;IACE,MAAM,EAAC,SAAS;IAChB,WAAW,EAAE,CAAE;IACf,CAAC,EAAC;EAAoC,EACtC,CACA,CACA;AAEV,CAAC,CACF;AACDL,YAAY,CAACc,WAAW,GAAG,cAAc;AAAC,eAC3Bd,YAAY;AAAA"}
1
+ {"version":3,"file":"CheckboxIcon.js","names":["CheckboxIcon","React","forwardRef","svgRef","isIndeterminate","testId","props","displayName"],"sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"sourcesContent":["import React from \"react\";\n\n/**\n * @component CheckboxIcon\n * @description\n *\n * The React Icon component is a visual element that displays an icon to represent a concept, object, or action.\n * The Icon component is\n * customizable, allowing for variations in size, color, and style to fit the needs of the application.\n *\n *\n * @example\n * return (\n * <CheckboxIcon className=\"mr-2\" showAdditionalIcon={true} />\n * )\n *\n * @see\n * https://system.activecollab.com/?path=/story/foundation-icons-icons--icons\n * @see\n * https://design.activecollab.com/docs/foundations/icons\n */\nconst CheckboxIcon = React.forwardRef(\n (\n {\n isIndeterminate,\n \"data-testid\": testId,\n ...props\n }: {\n isIndeterminate?: boolean;\n \"data-testid\"?: string;\n } & React.SVGProps<SVGSVGElement>,\n svgRef?: React.Ref<SVGSVGElement>\n ) => {\n // const [animate, setAnimate] = useState(false);\n // const mountRef = useRef(false);\n\n // useEffect(() => {\n // if (mountRef.current) {\n // setAnimate(true);\n // } else {\n // mountRef.current = true;\n // }\n // }, [isIndeterminate]);\n\n if (isIndeterminate) {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid={testId}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z\"\n fill=\"var(--color-secondary)\"\n />\n <rect\n x=\"3\"\n y=\"7\"\n width={10}\n height=\"2\"\n rx=\"1\"\n fill=\"var(--page-paper-main)\"\n ></rect>\n </svg>\n );\n }\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"var(--color-theme-600)\"\n focusable={false}\n ref={svgRef}\n {...props}\n data-testid={testId}\n >\n <g fillRule=\"evenodd\">\n <rect\n stroke=\"#8E8E8E\"\n x={0.5}\n y={0.5}\n width={15}\n height={15}\n rx={2}\n />\n <path\n stroke=\"#979797\"\n strokeWidth={2}\n d=\"M12.243 5l-5.657 5.657-2.829-2.829\"\n />\n </g>\n </svg>\n );\n }\n);\nCheckboxIcon.displayName = \"CheckboxIcon\";\nexport default CheckboxIcon;\n"],"mappings":";;;;;;AAAA;AAA0B;AAAA;AAAA;AAAA;AAAA;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,YAAY,gBAAGC,cAAK,CAACC,UAAU,CACnC,gBASEC,MAAiC,EAC9B;EAAA,IARDC,eAAe,QAAfA,eAAe;IACAC,MAAM,QAArB,aAAa;IACVC,KAAK;EAOV;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA,IAAIF,eAAe,EAAE;IACnB,oBACE;MACE,KAAK,EAAC,IAAI;MACV,MAAM,EAAC,IAAI;MACX,OAAO,EAAC,WAAW;MACnB,IAAI,EAAC,MAAM;MACX,KAAK,EAAC,4BAA4B;MAClC,eAAaC;IAAO,gBAEpB;MACE,QAAQ,EAAC,SAAS;MAClB,QAAQ,EAAC,SAAS;MAClB,CAAC,EAAC,+KAA+K;MACjL,IAAI,EAAC;IAAwB,EAC7B,eACF;MACE,CAAC,EAAC,GAAG;MACL,CAAC,EAAC,GAAG;MACL,KAAK,EAAE,EAAG;MACV,MAAM,EAAC,GAAG;MACV,EAAE,EAAC,GAAG;MACN,IAAI,EAAC;IAAwB,EACvB,CACJ;EAEV;EACA,oBACE;IACE,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,OAAO,EAAC,WAAW;IACnB,KAAK,EAAC,4BAA4B;IAClC,IAAI,EAAC,wBAAwB;IAC7B,SAAS,EAAE,KAAM;IACjB,GAAG,EAAEF;EAAO,GACRG,KAAK;IACT,eAAaD;EAAO,iBAEpB;IAAG,QAAQ,EAAC;EAAS,gBACnB;IACE,MAAM,EAAC,SAAS;IAChB,CAAC,EAAE,GAAI;IACP,CAAC,EAAE,GAAI;IACP,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,EAAE,EAAE;EAAE,EACN,eACF;IACE,MAAM,EAAC,SAAS;IAChB,WAAW,EAAE,CAAE;IACf,CAAC,EAAC;EAAoC,EACtC,CACA,CACA;AAEV,CAAC,CACF;AACDL,YAAY,CAACO,WAAW,GAAG,cAAc;AAAC,eAC3BP,YAAY;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,YAAY;;;slPA0FjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"CheckboxIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,YAAY;;;slPAgFjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["isIndeterminate", "data-testid"];
4
- import React, { useEffect, useRef, useState } from "react";
4
+ import React from "react";
5
5
 
6
6
  /**
7
7
  * @component CheckboxIcon
@@ -26,17 +26,17 @@ var CheckboxIcon = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
26
26
  var isIndeterminate = _ref.isIndeterminate,
27
27
  testId = _ref["data-testid"],
28
28
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
29
- var _useState = useState(false),
30
- animate = _useState[0],
31
- setAnimate = _useState[1];
32
- var mountRef = useRef(false);
33
- useEffect(function () {
34
- if (mountRef.current) {
35
- setAnimate(true);
36
- } else {
37
- mountRef.current = true;
38
- }
39
- }, []);
29
+ // const [animate, setAnimate] = useState(false);
30
+ // const mountRef = useRef(false);
31
+
32
+ // useEffect(() => {
33
+ // if (mountRef.current) {
34
+ // setAnimate(true);
35
+ // } else {
36
+ // mountRef.current = true;
37
+ // }
38
+ // }, [isIndeterminate]);
39
+
40
40
  if (isIndeterminate) {
41
41
  return /*#__PURE__*/React.createElement("svg", {
42
42
  width: "16",
@@ -53,17 +53,11 @@ var CheckboxIcon = /*#__PURE__*/React.forwardRef(function (_ref, svgRef) {
53
53
  }), /*#__PURE__*/React.createElement("rect", {
54
54
  x: "3",
55
55
  y: "7",
56
- width: !animate ? 10 : 0,
56
+ width: 10,
57
57
  height: "2",
58
58
  rx: "1",
59
59
  fill: "var(--page-paper-main)"
60
- }, animate && /*#__PURE__*/React.createElement("animate", {
61
- attributeName: "width",
62
- from: "0",
63
- to: "10",
64
- dur: "0.2s",
65
- fill: "freeze"
66
- })));
60
+ }));
67
61
  }
68
62
  return /*#__PURE__*/React.createElement("svg", _extends({
69
63
  width: 16,
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxIcon.js","names":["React","useEffect","useRef","useState","CheckboxIcon","forwardRef","svgRef","isIndeterminate","testId","props","animate","setAnimate","mountRef","current","displayName"],"sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from \"react\";\n\n/**\n * @component CheckboxIcon\n * @description\n *\n * The React Icon component is a visual element that displays an icon to represent a concept, object, or action.\n * The Icon component is\n * customizable, allowing for variations in size, color, and style to fit the needs of the application.\n *\n *\n * @example\n * return (\n * <CheckboxIcon className=\"mr-2\" showAdditionalIcon={true} />\n * )\n *\n * @see\n * https://system.activecollab.com/?path=/story/foundation-icons-icons--icons\n * @see\n * https://design.activecollab.com/docs/foundations/icons\n */\nconst CheckboxIcon = React.forwardRef(\n (\n {\n isIndeterminate,\n \"data-testid\": testId,\n ...props\n }: {\n isIndeterminate?: boolean;\n \"data-testid\"?: string;\n } & React.SVGProps<SVGSVGElement>,\n svgRef?: React.Ref<SVGSVGElement>\n ) => {\n const [animate, setAnimate] = useState(false);\n const mountRef = useRef(false);\n\n useEffect(() => {\n if (mountRef.current) {\n setAnimate(true);\n } else {\n mountRef.current = true;\n }\n }, []);\n\n if (isIndeterminate) {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid={testId}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z\"\n fill=\"var(--color-secondary)\"\n />\n <rect\n x=\"3\"\n y=\"7\"\n width={!animate ? 10 : 0}\n height=\"2\"\n rx=\"1\"\n fill=\"var(--page-paper-main)\"\n >\n {animate && (\n <animate\n attributeName=\"width\"\n from=\"0\"\n to=\"10\"\n dur=\"0.2s\"\n fill=\"freeze\"\n />\n )}\n </rect>\n </svg>\n );\n }\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"var(--color-theme-600)\"\n focusable={false}\n ref={svgRef}\n {...props}\n data-testid={testId}\n >\n <g fillRule=\"evenodd\">\n <rect\n stroke=\"#8E8E8E\"\n x={0.5}\n y={0.5}\n width={15}\n height={15}\n rx={2}\n />\n <path\n stroke=\"#979797\"\n strokeWidth={2}\n d=\"M12.243 5l-5.657 5.657-2.829-2.829\"\n />\n </g>\n </svg>\n );\n }\n);\nCheckboxIcon.displayName = \"CheckboxIcon\";\nexport default CheckboxIcon;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,YAAY,gBAAGJ,KAAK,CAACK,UAAU,CACnC,gBASEC,MAAiC,EAC9B;EAAA,IARDC,eAAe,QAAfA,eAAe;IACAC,MAAM,QAArB,aAAa;IACVC,KAAK;EAOV,gBAA8BN,QAAQ,CAAC,KAAK,CAAC;IAAtCO,OAAO;IAAEC,UAAU;EAC1B,IAAMC,QAAQ,GAAGV,MAAM,CAAC,KAAK,CAAC;EAE9BD,SAAS,CAAC,YAAM;IACd,IAAIW,QAAQ,CAACC,OAAO,EAAE;MACpBF,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,MAAM;MACLC,QAAQ,CAACC,OAAO,GAAG,IAAI;IACzB;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIN,eAAe,EAAE;IACnB,oBACE;MACE,KAAK,EAAC,IAAI;MACV,MAAM,EAAC,IAAI;MACX,OAAO,EAAC,WAAW;MACnB,IAAI,EAAC,MAAM;MACX,KAAK,EAAC,4BAA4B;MAClC,eAAaC;IAAO,gBAEpB;MACE,QAAQ,EAAC,SAAS;MAClB,QAAQ,EAAC,SAAS;MAClB,CAAC,EAAC,+KAA+K;MACjL,IAAI,EAAC;IAAwB,EAC7B,eACF;MACE,CAAC,EAAC,GAAG;MACL,CAAC,EAAC,GAAG;MACL,KAAK,EAAE,CAACE,OAAO,GAAG,EAAE,GAAG,CAAE;MACzB,MAAM,EAAC,GAAG;MACV,EAAE,EAAC,GAAG;MACN,IAAI,EAAC;IAAwB,GAE5BA,OAAO,iBACN;MACE,aAAa,EAAC,OAAO;MACrB,IAAI,EAAC,GAAG;MACR,EAAE,EAAC,IAAI;MACP,GAAG,EAAC,MAAM;MACV,IAAI,EAAC;IAAQ,EAEhB,CACI,CACH;EAEV;EACA,oBACE;IACE,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,OAAO,EAAC,WAAW;IACnB,KAAK,EAAC,4BAA4B;IAClC,IAAI,EAAC,wBAAwB;IAC7B,SAAS,EAAE,KAAM;IACjB,GAAG,EAAEJ;EAAO,GACRG,KAAK;IACT,eAAaD;EAAO,iBAEpB;IAAG,QAAQ,EAAC;EAAS,gBACnB;IACE,MAAM,EAAC,SAAS;IAChB,CAAC,EAAE,GAAI;IACP,CAAC,EAAE,GAAI;IACP,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,EAAE,EAAE;EAAE,EACN,eACF;IACE,MAAM,EAAC,SAAS;IAChB,WAAW,EAAE,CAAE;IACf,CAAC,EAAC;EAAoC,EACtC,CACA,CACA;AAEV,CAAC,CACF;AACDJ,YAAY,CAACU,WAAW,GAAG,cAAc;AACzC,eAAeV,YAAY"}
1
+ {"version":3,"file":"CheckboxIcon.js","names":["React","CheckboxIcon","forwardRef","svgRef","isIndeterminate","testId","props","displayName"],"sources":["../../../../src/components/Checkbox/CheckboxIcon.tsx"],"sourcesContent":["import React from \"react\";\n\n/**\n * @component CheckboxIcon\n * @description\n *\n * The React Icon component is a visual element that displays an icon to represent a concept, object, or action.\n * The Icon component is\n * customizable, allowing for variations in size, color, and style to fit the needs of the application.\n *\n *\n * @example\n * return (\n * <CheckboxIcon className=\"mr-2\" showAdditionalIcon={true} />\n * )\n *\n * @see\n * https://system.activecollab.com/?path=/story/foundation-icons-icons--icons\n * @see\n * https://design.activecollab.com/docs/foundations/icons\n */\nconst CheckboxIcon = React.forwardRef(\n (\n {\n isIndeterminate,\n \"data-testid\": testId,\n ...props\n }: {\n isIndeterminate?: boolean;\n \"data-testid\"?: string;\n } & React.SVGProps<SVGSVGElement>,\n svgRef?: React.Ref<SVGSVGElement>\n ) => {\n // const [animate, setAnimate] = useState(false);\n // const mountRef = useRef(false);\n\n // useEffect(() => {\n // if (mountRef.current) {\n // setAnimate(true);\n // } else {\n // mountRef.current = true;\n // }\n // }, [isIndeterminate]);\n\n if (isIndeterminate) {\n return (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n data-testid={testId}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M14.2222 0C15.2041 0 16 0.795938 16 1.77778V14.2222C16 15.2041 15.2041 16 14.2222 16H1.77778C0.795938 16 0 15.2041 0 14.2222V1.77778C0 0.795938 0.795938 0 1.77778 0H14.2222Z\"\n fill=\"var(--color-secondary)\"\n />\n <rect\n x=\"3\"\n y=\"7\"\n width={10}\n height=\"2\"\n rx=\"1\"\n fill=\"var(--page-paper-main)\"\n ></rect>\n </svg>\n );\n }\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"var(--color-theme-600)\"\n focusable={false}\n ref={svgRef}\n {...props}\n data-testid={testId}\n >\n <g fillRule=\"evenodd\">\n <rect\n stroke=\"#8E8E8E\"\n x={0.5}\n y={0.5}\n width={15}\n height={15}\n rx={2}\n />\n <path\n stroke=\"#979797\"\n strokeWidth={2}\n d=\"M12.243 5l-5.657 5.657-2.829-2.829\"\n />\n </g>\n </svg>\n );\n }\n);\nCheckboxIcon.displayName = \"CheckboxIcon\";\nexport default CheckboxIcon;\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,YAAY,gBAAGD,KAAK,CAACE,UAAU,CACnC,gBASEC,MAAiC,EAC9B;EAAA,IARDC,eAAe,QAAfA,eAAe;IACAC,MAAM,QAArB,aAAa;IACVC,KAAK;EAOV;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA,IAAIF,eAAe,EAAE;IACnB,oBACE;MACE,KAAK,EAAC,IAAI;MACV,MAAM,EAAC,IAAI;MACX,OAAO,EAAC,WAAW;MACnB,IAAI,EAAC,MAAM;MACX,KAAK,EAAC,4BAA4B;MAClC,eAAaC;IAAO,gBAEpB;MACE,QAAQ,EAAC,SAAS;MAClB,QAAQ,EAAC,SAAS;MAClB,CAAC,EAAC,+KAA+K;MACjL,IAAI,EAAC;IAAwB,EAC7B,eACF;MACE,CAAC,EAAC,GAAG;MACL,CAAC,EAAC,GAAG;MACL,KAAK,EAAE,EAAG;MACV,MAAM,EAAC,GAAG;MACV,EAAE,EAAC,GAAG;MACN,IAAI,EAAC;IAAwB,EACvB,CACJ;EAEV;EACA,oBACE;IACE,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,OAAO,EAAC,WAAW;IACnB,KAAK,EAAC,4BAA4B;IAClC,IAAI,EAAC,wBAAwB;IAC7B,SAAS,EAAE,KAAM;IACjB,GAAG,EAAEF;EAAO,GACRG,KAAK;IACT,eAAaD;EAAO,iBAEpB;IAAG,QAAQ,EAAC;EAAS,gBACnB;IACE,MAAM,EAAC,SAAS;IAChB,CAAC,EAAE,GAAI;IACP,CAAC,EAAE,GAAI;IACP,KAAK,EAAE,EAAG;IACV,MAAM,EAAE,EAAG;IACX,EAAE,EAAE;EAAE,EACN,eACF;IACE,MAAM,EAAC,SAAS;IAChB,WAAW,EAAE,CAAE;IACf,CAAC,EAAC;EAAoC,EACtC,CACA,CACA;AAEV,CAAC,CACF;AACDJ,YAAY,CAACM,WAAW,GAAG,cAAc;AACzC,eAAeN,YAAY"}
package/dist/index.js CHANGED
@@ -10701,18 +10701,17 @@
10701
10701
  var isIndeterminate = _ref.isIndeterminate,
10702
10702
  testId = _ref["data-testid"],
10703
10703
  props = _objectWithoutProperties(_ref, _excluded$R);
10704
- var _useState = React.useState(false),
10705
- _useState2 = _slicedToArray(_useState, 2),
10706
- animate = _useState2[0],
10707
- setAnimate = _useState2[1];
10708
- var mountRef = React.useRef(false);
10709
- React.useEffect(function () {
10710
- if (mountRef.current) {
10711
- setAnimate(true);
10712
- } else {
10713
- mountRef.current = true;
10714
- }
10715
- }, []);
10704
+ // const [animate, setAnimate] = useState(false);
10705
+ // const mountRef = useRef(false);
10706
+
10707
+ // useEffect(() => {
10708
+ // if (mountRef.current) {
10709
+ // setAnimate(true);
10710
+ // } else {
10711
+ // mountRef.current = true;
10712
+ // }
10713
+ // }, [isIndeterminate]);
10714
+
10716
10715
  if (isIndeterminate) {
10717
10716
  return /*#__PURE__*/React__default["default"].createElement("svg", {
10718
10717
  width: "16",
@@ -10729,17 +10728,11 @@
10729
10728
  }), /*#__PURE__*/React__default["default"].createElement("rect", {
10730
10729
  x: "3",
10731
10730
  y: "7",
10732
- width: !animate ? 10 : 0,
10731
+ width: 10,
10733
10732
  height: "2",
10734
10733
  rx: "1",
10735
10734
  fill: "var(--page-paper-main)"
10736
- }, animate && /*#__PURE__*/React__default["default"].createElement("animate", {
10737
- attributeName: "width",
10738
- from: "0",
10739
- to: "10",
10740
- dur: "0.2s",
10741
- fill: "freeze"
10742
- })));
10735
+ }));
10743
10736
  }
10744
10737
  return /*#__PURE__*/React__default["default"].createElement("svg", _extends({
10745
10738
  width: 16,