@trackunit/react-components 0.1.4 → 0.1.7

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/index.css CHANGED
@@ -17,9 +17,8 @@
17
17
  cursor-pointer
18
18
  flex-none
19
19
  py-1.5
20
- px-2.5
20
+ component-button-padding
21
21
  component-button-height
22
- component-button-width
23
22
  focus:ring
24
23
  focus:ring-offset-1
25
24
  focus:outline-none
package/index.js CHANGED
@@ -3631,9 +3631,11 @@ const Search = ({
3631
3631
  name,
3632
3632
  onClear,
3633
3633
  dataTestId,
3634
- autoComplete = "on"
3634
+ autoComplete = "on",
3635
+ ref
3635
3636
  }) => {
3636
3637
  return jsx(StyledTextInput, {
3638
+ ref: ref,
3637
3639
  dataTestId: dataTestId,
3638
3640
  name: name,
3639
3641
  className: className,
@@ -4508,9 +4510,12 @@ const CreatableSelect = props => {
4508
4510
  * @returns {JSX.Element} Select component
4509
4511
  */
4510
4512
  const Select = props => {
4513
+ const {
4514
+ className
4515
+ } = props,
4516
+ propsNoClassName = __rest(props, ["className"]);
4511
4517
  const {
4512
4518
  id,
4513
- className,
4514
4519
  dataTestId = "select",
4515
4520
  prefix,
4516
4521
  async,
@@ -4580,10 +4585,10 @@ const Select = props => {
4580
4585
  ref: refPrefix
4581
4586
  }, {
4582
4587
  children: prefix
4583
- })), async ? jsx(ReactAsyncSelect, Object.assign({}, props, selectProps, async, {
4588
+ })), async ? jsx(ReactAsyncSelect, Object.assign({}, propsNoClassName, selectProps, async, {
4584
4589
  onMenuOpen: openMenuHandler,
4585
4590
  onMenuClose: closeMenuHandler
4586
- })) : jsx(ReactSelect, Object.assign({}, props, selectProps, {
4591
+ })) : jsx(ReactSelect, Object.assign({}, propsNoClassName, selectProps, {
4587
4592
  options: filterOption ? orderedOptions : options,
4588
4593
  hideSelectedOptions: false,
4589
4594
  isMulti: isMulti,
@@ -5411,10 +5416,13 @@ const Layout$2 = tw.span`
5411
5416
  * @returns {JSX.Element} TitleNavContentLayout component
5412
5417
  */
5413
5418
  const TitleNavContentLayout = ({
5414
- children
5415
- }) => jsx(Layout$1, {
5419
+ children,
5420
+ className
5421
+ }) => jsx(Layout$1, Object.assign({
5422
+ className: className
5423
+ }, {
5416
5424
  children: children
5417
- });
5425
+ }));
5418
5426
  const Layout$1 = tw.div`
5419
5427
  tu-layout-TitleNavContentLayout
5420
5428
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
@@ -50,6 +50,7 @@ export interface SearchProps extends CommonProps {
50
50
  * Event that search box is cleared.
51
51
  */
52
52
  onClear?: () => void;
53
+ ref?: React.Ref<HTMLInputElement | undefined>;
53
54
  }
54
55
  /**
55
56
  * The Search component is used to render a search input field.
@@ -57,4 +58,4 @@ export interface SearchProps extends CommonProps {
57
58
  * @param {SearchProps} props - The props for the Search component
58
59
  * @returns {JSX.Element} Search component
59
60
  */
60
- export declare const Search: ({ className, placeholder, value, widenInputOnFocus, showBorderWhenNotInFocus, disabled, onKeyUp, onChange, onFocus, onBlur, name, onClear, dataTestId, autoComplete, }: SearchProps) => JSX.Element;
61
+ export declare const Search: ({ className, placeholder, value, widenInputOnFocus, showBorderWhenNotInFocus, disabled, onKeyUp, onChange, onFocus, onBlur, name, onClear, dataTestId, autoComplete, ref, }: SearchProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- interface TitleNavContentLayoutProps {
2
+ import { CommonProps } from "../../common";
3
+ interface TitleNavContentLayoutProps extends CommonProps {
3
4
  children: React.ReactNode;
4
5
  }
5
6
  /**
@@ -8,5 +9,5 @@ interface TitleNavContentLayoutProps {
8
9
  * @param {TitleNavContentLayoutProps} props - The props for the TitleNavContentLayout component
9
10
  * @returns {JSX.Element} TitleNavContentLayout component
10
11
  */
11
- export declare const TitleNavContentLayout: ({ children }: TitleNavContentLayoutProps) => JSX.Element;
12
+ export declare const TitleNavContentLayout: ({ children, className }: TitleNavContentLayoutProps) => JSX.Element;
12
13
  export {};