@activecollab/components 1.0.73 → 1.0.76

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.
Files changed (30) hide show
  1. package/dist/cjs/components/ComboBox/ComboBox.js +11 -14
  2. package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
  3. package/dist/cjs/components/ComboBox/Styles.js +11 -17
  4. package/dist/cjs/components/ComboBox/Styles.js.map +1 -1
  5. package/dist/cjs/components/Input/Styles.js +16 -2
  6. package/dist/cjs/components/Input/Styles.js.map +1 -1
  7. package/dist/cjs/components/Textarea/Styles.js +3 -1
  8. package/dist/cjs/components/Textarea/Styles.js.map +1 -1
  9. package/dist/cjs/components/Typography/Styles.js +51 -17
  10. package/dist/cjs/components/Typography/Styles.js.map +1 -1
  11. package/dist/esm/components/ComboBox/ComboBox.d.ts +3 -3
  12. package/dist/esm/components/ComboBox/ComboBox.d.ts.map +1 -1
  13. package/dist/esm/components/ComboBox/ComboBox.js +12 -15
  14. package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
  15. package/dist/esm/components/ComboBox/Styles.d.ts +1 -3
  16. package/dist/esm/components/ComboBox/Styles.d.ts.map +1 -1
  17. package/dist/esm/components/ComboBox/Styles.js +9 -15
  18. package/dist/esm/components/ComboBox/Styles.js.map +1 -1
  19. package/dist/esm/components/Input/Styles.d.ts.map +1 -1
  20. package/dist/esm/components/Input/Styles.js +16 -2
  21. package/dist/esm/components/Input/Styles.js.map +1 -1
  22. package/dist/esm/components/Textarea/Styles.js +3 -1
  23. package/dist/esm/components/Textarea/Styles.js.map +1 -1
  24. package/dist/esm/components/Typography/Styles.js +51 -17
  25. package/dist/esm/components/Typography/Styles.js.map +1 -1
  26. package/dist/index.js +90 -49
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.min.js +1 -1
  29. package/dist/index.min.js.map +1 -1
  30. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -780,35 +780,61 @@
780
780
  })(["", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
781
781
  return colors[props.$color];
782
782
  }, function (props) {
783
- return props.$variant === "Title 1" && styled.css(["font-size:2rem;"]);
783
+ return props.$variant === "Title 1" && styled.css(["", ""], {
784
+ "fontSize": "2rem"
785
+ });
784
786
  }, function (props) {
785
- return props.$variant === "Title 2" && styled.css(["font-size:1.625rem;"]);
787
+ return props.$variant === "Title 2" && styled.css(["", ""], {
788
+ "fontSize": "1.675rem"
789
+ });
786
790
  }, function (props) {
787
- return props.$variant === "Header 2" && styled.css(["font-size:1.125rem;"]);
791
+ return props.$variant === "Header 2" && styled.css(["", ""], {
792
+ "fontSize": "1.125rem"
793
+ });
788
794
  }, function (props) {
789
- return (props.$variant === "Header 3" || props.$variant === "Body 1") && styled.css(["font-size:1rem;"]);
795
+ return (props.$variant === "Header 3" || props.$variant === "Body 1") && styled.css(["", ""], {
796
+ "fontSize": "1rem"
797
+ });
790
798
  }, function (props) {
791
- return props.$variant === "Body 2" && styled.css(["font-size:0.875rem;"]);
799
+ return props.$variant === "Body 2" && styled.css(["", ""], {
800
+ "fontSize": "0.875rem"
801
+ });
792
802
  }, function (props) {
793
- return props.$variant === "Caption 1" && styled.css(["font-size:0.75rem;"]);
803
+ return props.$variant === "Caption 1" && styled.css(["", ""], {
804
+ "fontSize": "0.75rem"
805
+ });
794
806
  }, function (props) {
795
- return props.$variant === "Caption 2" && styled.css(["font-size:0.625rem;"]);
807
+ return props.$variant === "Caption 2" && styled.css(["", ""], {
808
+ "fontSize": "0.625rem"
809
+ });
796
810
  }, function (props) {
797
811
  return props.$italic ? styled.css(["font-style:italic;"]) : styled.css(["font-style:normal;"]);
798
812
  }, function (props) {
799
813
  return props.$tabularNums ? styled.css(["font-variant-numeric:tabular-nums;"]) : styled.css(["font-variant-numeric:normal;"]);
800
814
  }, function (props) {
801
- return props.$letterSpacing === "regular" && styled.css(["letter-spacing:0.02em;"]);
815
+ return props.$letterSpacing === "regular" && styled.css(["", ""], {
816
+ "letterSpacing": "0.02em"
817
+ });
802
818
  }, function (props) {
803
- return props.$letterSpacing === "tight" && styled.css(["letter-spacing:0em;"]);
819
+ return props.$letterSpacing === "tight" && styled.css(["", ""], {
820
+ "letterSpacing": "0em"
821
+ });
804
822
  }, function (props) {
805
- return props.$letterSpacing === "wide" && styled.css(["letter-spacing:0.08em;"]);
823
+ return props.$letterSpacing === "wide" && styled.css(["", ""], {
824
+ "letterSpacing": "0.08em"
825
+ });
806
826
  }, function (props) {
807
- return props.$lineHeight === "regular" && styled.css(["line-height:1.375;"]);
827
+ return props.$lineHeight === "regular" && styled.css(["", ""], {
828
+ "lineHeight": "1.375"
829
+ });
808
830
  }, function (props) {
809
- return props.$lineHeight === "tight" && styled.css(["line-height:1;"]);
831
+ return props.$lineHeight === "tight" && styled.css(["", ""], {
832
+ "lineHeight": "1"
833
+ });
810
834
  }, function (props) {
811
- return props.$lineHeight === "loose" && styled.css(["line-height:1.625;"]);
835
+ return props.$lineHeight === "loose" && styled.css(["", ""], {
836
+ "lineHeight": "1.625"
837
+ });
812
838
  }, function (props) {
813
839
  return props.$align === "left" && styled.css(["text-align:left;"]);
814
840
  }, function (props) {
@@ -856,13 +882,21 @@
856
882
  }, function (props) {
857
883
  return props.$wordBreak === "all" && styled.css(["word-break:break-all;"]);
858
884
  }, function (props) {
859
- return props.$weight === "regular" && styled.css(["font-weight:400;"]);
885
+ return props.$weight === "regular" && styled.css(["", ""], {
886
+ "fontWeight": "400"
887
+ });
860
888
  }, function (props) {
861
- return props.$weight === "light" && styled.css(["font-weight:300;"]);
889
+ return props.$weight === "light" && styled.css(["", ""], {
890
+ "fontWeight": "300"
891
+ });
862
892
  }, function (props) {
863
- return props.$weight === "medium" && styled.css(["font-weight:500;"]);
893
+ return props.$weight === "medium" && styled.css(["", ""], {
894
+ "fontWeight": "500"
895
+ });
864
896
  }, function (props) {
865
- return props.$weight === "bold" && styled.css(["font-weight:700;"]);
897
+ return props.$weight === "bold" && styled.css(["", ""], {
898
+ "fontWeight": "700"
899
+ });
866
900
  });
867
901
  StyledTypography.displayName = "StyledTypography";
868
902
 
@@ -4596,10 +4630,22 @@
4596
4630
  var StyledInput = styled__default["default"].input.withConfig({
4597
4631
  displayName: "Styles__StyledInput",
4598
4632
  componentId: "sc-ce8kcp-0"
4599
- })(["border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);font-size:14px;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);}"], FontStyle, BoxSizingStyle, function (props) {
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
+ "fontSize": "0.875rem"
4635
+ }, {
4636
+ "color": "var(--color-theme-900)"
4637
+ }, {
4638
+ "lineHeight": "1.375"
4639
+ }, {
4640
+ "letterSpacing": "0.02em"
4641
+ }, {
4642
+ "fontWeight": "400"
4643
+ }, FontStyle, BoxSizingStyle, function (props) {
4600
4644
  return props.$size === "small" && styled.css(["border-radius:6px;height:24px;"]);
4601
4645
  }, function (props) {
4602
- return props.$size === "big" && styled.css(["height:40px;font-size:16px;"]);
4646
+ return props.$size === "big" && styled.css(["", " height:40px;"], {
4647
+ "fontSize": "1rem"
4648
+ });
4603
4649
  }, function (props) {
4604
4650
  return props.disabled ? styled.css(["", ""], {
4605
4651
  "cursor": "not-allowed",
@@ -4612,6 +4658,8 @@
4612
4658
  }, {
4613
4659
  "borderColor": "var(--color-primary)"
4614
4660
  });
4661
+ }, {
4662
+ "color": "var(--color-theme-transparent-500)"
4615
4663
  });
4616
4664
  StyledInput.displayName = "StyledInput";
4617
4665
 
@@ -7705,7 +7753,9 @@
7705
7753
  var StyledTextarea = styled__default["default"].textarea.withConfig({
7706
7754
  displayName: "Styles__StyledTextarea",
7707
7755
  componentId: "sc-m6jqw8-0"
7708
- })(["border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);font-size:14px;padding:4px 10px 6px 8px;height:auto;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;min-height:90px;", " ", " ", " &:active,&:focus{outline:none !important;", "}&:focus{box-shadow:none;}&::placeholder{color:var(--color-theme-600);}", ""], FontStyle, BoxSizingStyle, function (props) {
7756
+ })(["", " border:1px solid var(--border-primary);border-radius:10px;color:var(--color-theme-900);padding:4px 10px 6px 8px;height:auto;background-color:var(--input-background-color);transition:all 0.3s ease;width:360px;min-height:90px;", " ", " ", " &:active,&:focus{outline:none !important;", "}&:focus{box-shadow:none;}&::placeholder{color:var(--color-theme-600);}", ""], {
7757
+ "fontSize": "0.875rem"
7758
+ }, FontStyle, BoxSizingStyle, function (props) {
7709
7759
  return !props.disabled && styled.css(["&:hover{outline:none !important;", "}"], {
7710
7760
  "borderColor": "var(--color-primary)"
7711
7761
  });
@@ -9696,28 +9746,20 @@
9696
9746
  var StyledComboBox = styled__default["default"].div.withConfig({
9697
9747
  displayName: "Styles__StyledComboBox",
9698
9748
  componentId: "sc-5qvkpb-0"
9699
- })(["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) {
9700
- return props.$open && styled.css(["border-color:var(--color-primary);"]);
9701
- }, function (props) {
9749
+ })(["position:relative;cursor:text;", " ", " ", ""], FontStyle, BoxSizingStyle, function (props) {
9702
9750
  return props.$loading && styled.css(["cursor:progress;"]);
9703
- }, function (props) {
9704
- return props.$size == "small" && styled.css(["height:26px;"]);
9705
- }, function (props) {
9706
- return props.$size == "big" && styled.css(["height:42px;"]);
9707
9751
  });
9708
9752
  StyledComboBox.displayName = "StyledComboBox";
9709
- var StyledComboBoxWrapper = styled__default["default"].div.withConfig({
9710
- displayName: "Styles__StyledComboBoxWrapper",
9753
+ var StyledComboBoxControls = styled__default["default"].div.withConfig({
9754
+ displayName: "Styles__StyledComboBoxControls",
9711
9755
  componentId: "sc-5qvkpb-1"
9712
- })(["width:100%;height:100%;display:flex;align-items:center;", ""], function (props) {
9713
- return props.$loading && styled.css(["pointer-events:none;"]);
9714
- });
9715
- StyledComboBoxWrapper.displayName = "StyledComboBoxWrapper";
9756
+ })(["position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;justify-content:center;"]);
9757
+ StyledComboBoxControls.displayName = "StyledComboBoxControls";
9716
9758
  var StyledIconDefaults = styled.css(["flex-shrink:0;cursor:pointer;"]);
9717
9759
  var StyledComboBoxCloseSmallIcon = styled__default["default"](CloseSmallIcon$1).withConfig({
9718
9760
  displayName: "Styles__StyledComboBoxCloseSmallIcon",
9719
9761
  componentId: "sc-5qvkpb-2"
9720
- })(["", " 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);
9721
9763
  StyledComboBoxCloseSmallIcon.displayName = "StyledComboBoxCloseSmallIcon";
9722
9764
  var StyledComboBoxCollapseExpandSingleIcon = styled__default["default"](CollapseExpandSingleIcon$1).withConfig({
9723
9765
  displayName: "Styles__StyledComboBoxCollapseExpandSingleIcon",
@@ -9729,7 +9771,9 @@
9729
9771
  var StyledComboBoxInput = styled__default["default"](Input).withConfig({
9730
9772
  displayName: "Styles__StyledComboBoxInput",
9731
9773
  componentId: "sc-5qvkpb-4"
9732
- })(["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
+ });
9733
9777
  StyledComboBoxInput.displayName = "StyledComboBoxInput";
9734
9778
  var StyledComboBoxList = styled__default["default"].div.withConfig({
9735
9779
  displayName: "Styles__StyledComboBoxList",
@@ -9741,7 +9785,7 @@
9741
9785
 
9742
9786
  var _excluded$1 = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size"];
9743
9787
  var ComboBox = function ComboBox(_ref) {
9744
- var _formRef$current;
9788
+ var _comboBoxRef$current;
9745
9789
 
9746
9790
  var _ref$options = _ref.options,
9747
9791
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -9754,7 +9798,8 @@
9754
9798
  handleEmptyAction = _ref.handleEmptyAction,
9755
9799
  _ref$disabled = _ref.disabled,
9756
9800
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9757
- size = _ref.size,
9801
+ _ref$size = _ref.size,
9802
+ size = _ref$size === void 0 ? "regular" : _ref$size,
9758
9803
  prop = _objectWithoutProperties(_ref, _excluded$1);
9759
9804
 
9760
9805
  var selectedName = React.useMemo(function () {
@@ -9811,7 +9856,6 @@
9811
9856
  e.stopPropagation();
9812
9857
  }
9813
9858
  }, [open, selectedName]);
9814
- var formRef = React.useRef(null);
9815
9859
  React.useEffect(function () {
9816
9860
  open && (childNode === null || childNode === void 0 ? void 0 : childNode.focus());
9817
9861
  !open && (childNode === null || childNode === void 0 ? void 0 : childNode.blur());
@@ -9872,29 +9916,26 @@
9872
9916
  className: "c-combo-box",
9873
9917
  $open: open,
9874
9918
  $loading: loading,
9875
- $size: size,
9876
- ref: comboBoxRef
9877
- }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxWrapper, {
9919
+ ref: comboBoxRef,
9878
9920
  onClick: onOpen,
9879
- onFocus: onOpen,
9880
- ref: formRef,
9881
- $loading: loading
9921
+ onFocus: onOpen
9882
9922
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxInput, {
9883
9923
  ref: handleRef,
9884
9924
  value: loading && loadingText ? loadingText : value,
9885
9925
  onKeyDown: handleOnKeyDown,
9886
9926
  onChange: handleOnChange,
9887
9927
  placeholder: placeholder,
9888
- disabled: disabled
9889
- }), !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, {
9890
9931
  onMouseDown: handleMouseDown,
9891
9932
  onClick: handleDeselect,
9892
9933
  variant: "text gray",
9893
9934
  size: "small"
9894
9935
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCloseSmallIcon, null)) : null, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxCollapseExpandSingleIcon, {
9895
9936
  $open: open
9896
- })) : null), !disabled ? /*#__PURE__*/React__default["default"].createElement(Popper, {
9897
- anchorEl: formRef.current,
9937
+ })) : null, !disabled ? /*#__PURE__*/React__default["default"].createElement(Popper, {
9938
+ anchorEl: comboBoxRef.current,
9898
9939
  open: open,
9899
9940
  placement: "bottom",
9900
9941
  style: {
@@ -9904,7 +9945,7 @@
9904
9945
  noIsolation: true,
9905
9946
  allowPinchZoom: true
9906
9947
  }, /*#__PURE__*/React__default["default"].createElement(StyledComboBoxList, {
9907
- $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
9908
9949
  }, /*#__PURE__*/React__default["default"].createElement(Autocomplete, _extends({}, prop, {
9909
9950
  inputEl: childNode,
9910
9951
  selected: selected,