@activecollab/components 1.0.74 → 1.0.77

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 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,eAAO,MAAM,WAAW;;SAqDvB,CAAC"}
1
+ {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/Styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,eAAO,MAAM,WAAW;;SAwDvB,CAAC"}
@@ -4,8 +4,16 @@ import { FontStyle } from "../FontStyle";
4
4
  export var StyledInput = styled.input.withConfig({
5
5
  displayName: "Styles__StyledInput",
6
6
  componentId: "sc-ce8kcp-0"
7
- })(["", " border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);padding:4px 10px 6px 8px;height:32px;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;outline:none;", " ", " ", " ", " ", " &::placeholder{color:var(--color-theme-600);}"], {
7
+ })(["", " ", " ", " ", " ", " border:1px solid var(--border-primary);border-radius:10px;padding:4px 10px 6px 8px;height:32px;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;outline:none;", " ", " ", " ", " ", " &::placeholder{", "}"], {
8
8
  "fontSize": "0.875rem"
9
+ }, {
10
+ "color": "var(--color-theme-900)"
11
+ }, {
12
+ "lineHeight": "1.375"
13
+ }, {
14
+ "letterSpacing": "0.02em"
15
+ }, {
16
+ "fontWeight": "400"
9
17
  }, FontStyle, BoxSizingStyle, function (props) {
10
18
  return props.$size === "small" && css(["border-radius:6px;height:24px;"]);
11
19
  }, function (props) {
@@ -24,6 +32,8 @@ export var StyledInput = styled.input.withConfig({
24
32
  }, {
25
33
  "borderColor": "var(--color-primary)"
26
34
  });
35
+ }, {
36
+ "color": "var(--color-theme-transparent-500)"
27
37
  });
28
38
  StyledInput.displayName = "StyledInput";
29
39
  //# sourceMappingURL=Styles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/Input/Styles.ts"],"names":["styled","css","BoxSizingStyle","FontStyle","StyledInput","input","props","$size","disabled","displayName"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AAGA,SAASC,cAAT,QAA+B,mBAA/B;AACA,SAASC,SAAT,QAA0B,cAA1B;AAEA,OAAO,IAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAV;AAAA;AAAA;AAAA,iTAGlB;AAAA;AAAA,CAHkB,EAcpBF,SAdoB,EAepBD,cAfoB,EAiBpB,UAACI,KAAD;AAAA,SACAA,KAAK,CAACC,KAAN,KAAgB,OAAhB,IACAN,GADA,oCADA;AAAA,CAjBoB,EAwBpB,UAACK,KAAD;AAAA,SACAA,KAAK,CAACC,KAAN,KAAgB,KAAhB,IACAN,GADA,wBAEM;AAAA;AAAA,GAFN,CADA;AAAA,CAxBoB,EA+BpB,UAACK,KAAD;AAAA,SACAA,KAAK,CAACE,QAAN,GACIP,GADJ,WAEU;AAAA;AAAA;AAAA;AAAA,GAFV,IAIIA,GAJJ,+CAMY;AAAA;AAAA,GANZ,EAUY;AAAA;AAAA,GAVZ,EAcY;AAAA;AAAA,GAdZ,CADA;AAAA,CA/BoB,CAAjB;AAuDPG,WAAW,CAACK,WAAZ,GAA0B,aAA1B","sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\nimport { InputSize } from \"./Input\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledInput = styled.input<{\n $size?: InputSize;\n}>`\n ${tw`tw-text-body-2`}\n border: 1px solid var(--border-primary);\n border-radius: 10px;\n color: var(--color-theme-900);\n padding: 4px 10px 6px 8px;\n height: 32px;\n background-color: var(--input-background-color);\n transition: all 0.3s ease;\n width: 360px;\n outline: none;\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${(props) =>\n props.$size === \"small\" &&\n css`\n border-radius: 6px;\n height: 24px;\n `}\n\n ${(props) =>\n props.$size === \"big\" &&\n css`\n ${tw`tw-text-body-1`}\n height: 40px;\n `}\n\n ${(props) =>\n props.disabled\n ? css`\n ${tw`tw-cursor-not-allowed tw-opacity-50 tw-border-theme-400`}\n `\n : css`\n &:hover {\n ${tw`tw-border-primary`}\n }\n\n &:active {\n ${tw`tw-border-primary`}\n }\n\n &:focus {\n ${tw`tw-border-primary`}\n }\n `}\n\n &::placeholder {\n color: var(--color-theme-600);\n }\n`;\n\nStyledInput.displayName = \"StyledInput\";\n"],"file":"Styles.js"}
1
+ {"version":3,"sources":["../../../../src/components/Input/Styles.ts"],"names":["styled","css","BoxSizingStyle","FontStyle","StyledInput","input","props","$size","disabled","displayName"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AAGA,SAASC,cAAT,QAA+B,mBAA/B;AACA,SAASC,SAAT,QAA0B,cAA1B;AAEA,OAAO,IAAMC,WAAW,GAAGJ,MAAM,CAACK,KAAV;AAAA;AAAA;AAAA,+QAGlB;AAAA;AAAA,CAHkB,EAIlB;AAAA;AAAA,CAJkB,EAKlB;AAAA;AAAA,CALkB,EAMlB;AAAA;AAAA,CANkB,EAOlB;AAAA;AAAA,CAPkB,EAiBpBF,SAjBoB,EAkBpBD,cAlBoB,EAoBpB,UAACI,KAAD;AAAA,SACAA,KAAK,CAACC,KAAN,KAAgB,OAAhB,IACAN,GADA,oCADA;AAAA,CApBoB,EA2BpB,UAACK,KAAD;AAAA,SACAA,KAAK,CAACC,KAAN,KAAgB,KAAhB,IACAN,GADA,wBAEM;AAAA;AAAA,GAFN,CADA;AAAA,CA3BoB,EAkCpB,UAACK,KAAD;AAAA,SACAA,KAAK,CAACE,QAAN,GACIP,GADJ,WAEU;AAAA;AAAA;AAAA;AAAA,GAFV,IAIIA,GAJJ,+CAMY;AAAA;AAAA,GANZ,EAUY;AAAA;AAAA,GAVZ,EAcY;AAAA;AAAA,GAdZ,CADA;AAAA,CAlCoB,EAsDhB;AAAA;AAAA,CAtDgB,CAAjB;AA0DPG,WAAW,CAACK,WAAZ,GAA0B,aAA1B","sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\nimport { InputSize } from \"./Input\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledInput = styled.input<{\n $size?: InputSize;\n}>`\n ${tw`tw-text-body-2`}\n ${tw`tw-text-theme-900`}\n ${tw`tw-leading-regular`}\n ${tw`tw-tracking-regular`}\n ${tw`tw-font-regular`}\n border: 1px solid var(--border-primary);\n border-radius: 10px;\n padding: 4px 10px 6px 8px;\n height: 32px;\n background-color: var(--input-background-color);\n transition: all 0.3s ease;\n width: 360px;\n outline: none;\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n ${(props) =>\n props.$size === \"small\" &&\n css`\n border-radius: 6px;\n height: 24px;\n `}\n\n ${(props) =>\n props.$size === \"big\" &&\n css`\n ${tw`tw-text-body-1`}\n height: 40px;\n `}\n\n ${(props) =>\n props.disabled\n ? css`\n ${tw`tw-cursor-not-allowed tw-opacity-50 tw-border-theme-400`}\n `\n : css`\n &:hover {\n ${tw`tw-border-primary`}\n }\n\n &:active {\n ${tw`tw-border-primary`}\n }\n\n &:focus {\n ${tw`tw-border-primary`}\n }\n `}\n\n &::placeholder {\n ${tw`tw-text-theme-transparent-500`}\n }\n`;\n\nStyledInput.displayName = \"StyledInput\";\n"],"file":"Styles.js"}
package/dist/index.js CHANGED
@@ -4630,8 +4630,16 @@
4630
4630
  var StyledInput = styled__default["default"].input.withConfig({
4631
4631
  displayName: "Styles__StyledInput",
4632
4632
  componentId: "sc-ce8kcp-0"
4633
- })(["", " border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);padding:4px 10px 6px 8px;height:32px;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;outline:none;", " ", " ", " ", " ", " &::placeholder{color:var(--color-theme-600);}"], {
4633
+ })(["", " ", " ", " ", " ", " border:1px solid var(--border-primary);border-radius:10px;padding:4px 10px 6px 8px;height:32px;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;outline:none;", " ", " ", " ", " ", " &::placeholder{", "}"], {
4634
4634
  "fontSize": "0.875rem"
4635
+ }, {
4636
+ "color": "var(--color-theme-900)"
4637
+ }, {
4638
+ "lineHeight": "1.375"
4639
+ }, {
4640
+ "letterSpacing": "0.02em"
4641
+ }, {
4642
+ "fontWeight": "400"
4635
4643
  }, FontStyle, BoxSizingStyle, function (props) {
4636
4644
  return props.$size === "small" && styled.css(["border-radius:6px;height:24px;"]);
4637
4645
  }, function (props) {
@@ -4650,6 +4658,8 @@
4650
4658
  }, {
4651
4659
  "borderColor": "var(--color-primary)"
4652
4660
  });
4661
+ }, {
4662
+ "color": "var(--color-theme-transparent-500)"
4653
4663
  });
4654
4664
  StyledInput.displayName = "StyledInput";
4655
4665
 
@@ -9736,28 +9746,20 @@
9736
9746
  var StyledComboBox = styled__default["default"].div.withConfig({
9737
9747
  displayName: "Styles__StyledComboBox",
9738
9748
  componentId: "sc-5qvkpb-0"
9739
- })(["height:34px;border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);font-size:14px;background-color:var(--input-background-color);cursor:text;", " ", " ", " ", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
9740
- return props.$open && styled.css(["border-color:var(--color-primary);"]);
9741
- }, function (props) {
9749
+ })(["position:relative;cursor:text;", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
9742
9750
  return props.$loading && styled.css(["cursor:progress;"]);
9743
- }, function (props) {
9744
- return props.$size == "small" && styled.css(["height:26px;"]);
9745
- }, function (props) {
9746
- return props.$size == "big" && styled.css(["height:42px;"]);
9747
9751
  });
9748
9752
  StyledComboBox.displayName = "StyledComboBox";
9749
- var StyledComboBoxWrapper = styled__default["default"].div.withConfig({
9750
- displayName: "Styles__StyledComboBoxWrapper",
9753
+ var StyledComboBoxControls = styled__default["default"].div.withConfig({
9754
+ displayName: "Styles__StyledComboBoxControls",
9751
9755
  componentId: "sc-5qvkpb-1"
9752
- })(["width:100%;height:100%;display:flex;align-items:center;", ""], function (props) {
9753
- return props.$loading && styled.css(["pointer-events:none;"]);
9754
- });
9755
- StyledComboBoxWrapper.displayName = "StyledComboBoxWrapper";
9756
+ })(["position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;justify-content:center;"]);
9757
+ StyledComboBoxControls.displayName = "StyledComboBoxControls";
9756
9758
  var StyledIconDefaults = styled.css(["flex-shrink:0;cursor:pointer;"]);
9757
9759
  var StyledComboBoxCloseSmallIcon = styled__default["default"](CloseSmallIcon$1).withConfig({
9758
9760
  displayName: "Styles__StyledComboBoxCloseSmallIcon",
9759
9761
  componentId: "sc-5qvkpb-2"
9760
- })(["", " opacity:0;transition-property:all;transition-duration:0.2s;transition-delay:0.5s;", ":hover &{opacity:1;transition-delay:0s;}"], StyledIconDefaults, StyledComboBoxWrapper);
9762
+ })(["", " opacity:0;transition-property:all;transition-duration:0.2s;transition-delay:0.5s;", ":hover &{opacity:1;transition-delay:0s;}"], StyledIconDefaults, StyledComboBox);
9761
9763
  StyledComboBoxCloseSmallIcon.displayName = "StyledComboBoxCloseSmallIcon";
9762
9764
  var StyledComboBoxCollapseExpandSingleIcon = styled__default["default"](CollapseExpandSingleIcon$1).withConfig({
9763
9765
  displayName: "Styles__StyledComboBoxCollapseExpandSingleIcon",
@@ -9769,7 +9771,9 @@
9769
9771
  var StyledComboBoxInput = styled__default["default"](Input).withConfig({
9770
9772
  displayName: "Styles__StyledComboBoxInput",
9771
9773
  componentId: "sc-5qvkpb-4"
9772
- })(["overflow:hidden;text-overflow:ellipsis;background-color:transparent;border:none;width:100%;"]);
9774
+ })(["overflow:hidden;text-overflow:ellipsis;width:100%;padding-right:80px;", ":hover &{", "}"], StyledComboBox, {
9775
+ "borderColor": "var(--color-primary)"
9776
+ });
9773
9777
  StyledComboBoxInput.displayName = "StyledComboBoxInput";
9774
9778
  var StyledComboBoxList = styled__default["default"].div.withConfig({
9775
9779
  displayName: "Styles__StyledComboBoxList",
@@ -9781,7 +9785,7 @@
9781
9785
 
9782
9786
  var _excluded$1 = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size"];
9783
9787
  var ComboBox = function ComboBox(_ref) {
9784
- var _formRef$current;
9788
+ var _comboBoxRef$current;
9785
9789
 
9786
9790
  var _ref$options = _ref.options,
9787
9791
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -9794,7 +9798,8 @@
9794
9798
  handleEmptyAction = _ref.handleEmptyAction,
9795
9799
  _ref$disabled = _ref.disabled,
9796
9800
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9797
- size = _ref.size,
9801
+ _ref$size = _ref.size,
9802
+ size = _ref$size === void 0 ? "regular" : _ref$size,
9798
9803
  prop = _objectWithoutProperties(_ref, _excluded$1);
9799
9804
 
9800
9805
  var selectedName = React.useMemo(function () {
@@ -9851,7 +9856,6 @@
9851
9856
  e.stopPropagation();
9852
9857
  }
9853
9858
  }, [open, selectedName]);
9854
- var formRef = React.useRef(null);
9855
9859
  React.useEffect(function () {
9856
9860
  open && (childNode === null || childNode === void 0 ? void 0 : childNode.focus());
9857
9861
  !open && (childNode === null || childNode === void 0 ? void 0 : childNode.blur());
@@ -9908,25 +9912,22 @@
9908
9912
  document.removeEventListener("click", clickOutsideCallback);
9909
9913
  };
9910
9914
  }, [clickOutsideCallback]);
9911
- return /*#__PURE__*/React__default["default"].createElement(StyledComboBox, {
9915
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(StyledComboBox, {
9912
9916
  className: "c-combo-box",
9913
9917
  $open: open,
9914
9918
  $loading: loading,
9915
- $size: size,
9916
- ref: comboBoxRef
9917
- }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxWrapper, {
9919
+ ref: comboBoxRef,
9918
9920
  onClick: onOpen,
9919
- onFocus: onOpen,
9920
- ref: formRef,
9921
- $loading: loading
9921
+ onFocus: onOpen
9922
9922
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxInput, {
9923
9923
  ref: handleRef,
9924
9924
  value: loading && loadingText ? loadingText : value,
9925
9925
  onKeyDown: handleOnKeyDown,
9926
9926
  onChange: handleOnChange,
9927
9927
  placeholder: placeholder,
9928
- disabled: disabled
9929
- }), !disabled ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, loading ? /*#__PURE__*/React__default["default"].createElement(SpinnerLoader, null) : selected ? /*#__PURE__*/React__default["default"].createElement(Button, {
9928
+ disabled: disabled,
9929
+ size: size
9930
+ }), !disabled ? /*#__PURE__*/React__default["default"].createElement(StyledComboBoxControls, null, loading ? /*#__PURE__*/React__default["default"].createElement(SpinnerLoader, null) : selected ? /*#__PURE__*/React__default["default"].createElement(Button, {
9930
9931
  onMouseDown: handleMouseDown,
9931
9932
  onClick: handleDeselect,
9932
9933
  variant: "text gray",
@@ -9934,7 +9935,7 @@
9934
9935
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)) : null, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
9935
9936
  $open: open
9936
9937
  })) : null), !disabled ? /*#__PURE__*/React__default["default"].createElement(Popper, {
9937
- anchorEl: formRef.current,
9938
+ anchorEl: comboBoxRef.current,
9938
9939
  open: open,
9939
9940
  placement: "bottom",
9940
9941
  style: {
@@ -9944,7 +9945,7 @@
9944
9945
  noIsolation: true,
9945
9946
  allowPinchZoom: true
9946
9947
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxList, {
9947
- $width: (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.clientWidth
9948
+ $width: (_comboBoxRef$current = comboBoxRef.current) === null || _comboBoxRef$current === void 0 ? void 0 : _comboBoxRef$current.clientWidth
9948
9949
  }, /*#__PURE__*/React__default["default"].createElement(Autocomplete, _extends({}, prop, {
9949
9950
  inputEl: childNode,
9950
9951
  selected: selected,