@trackunit/react-components 0.1.3 → 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
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,
|
|
@@ -3682,19 +3684,19 @@ const StyledTextInput = twx(TextInput)`
|
|
|
3682
3684
|
*/
|
|
3683
3685
|
const Spacer = ({
|
|
3684
3686
|
minHeight,
|
|
3685
|
-
border,
|
|
3687
|
+
border = false,
|
|
3686
3688
|
dataTestId
|
|
3687
3689
|
}) => {
|
|
3688
3690
|
return jsx(Space, {
|
|
3689
3691
|
"data-testid": dataTestId,
|
|
3690
|
-
minHeight: minHeight,
|
|
3691
|
-
border: border
|
|
3692
|
+
"$minHeight": minHeight,
|
|
3693
|
+
"$border": border
|
|
3692
3694
|
});
|
|
3693
3695
|
};
|
|
3694
3696
|
const GetSpacerHeight = () => ({
|
|
3695
|
-
minHeight
|
|
3697
|
+
$minHeight
|
|
3696
3698
|
}) => {
|
|
3697
|
-
switch (minHeight) {
|
|
3699
|
+
switch ($minHeight) {
|
|
3698
3700
|
case "normal":
|
|
3699
3701
|
return tws`tu-spacer--normal`;
|
|
3700
3702
|
case "large":
|
|
@@ -3704,7 +3706,7 @@ const GetSpacerHeight = () => ({
|
|
|
3704
3706
|
}
|
|
3705
3707
|
};
|
|
3706
3708
|
const Space = tw.div`
|
|
3707
|
-
${p => `${p
|
|
3709
|
+
${p => `${p.$border ? `tu-spacer--border` : null}`}
|
|
3708
3710
|
${GetSpacerHeight()}
|
|
3709
3711
|
`;
|
|
3710
3712
|
|
|
@@ -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({},
|
|
4588
|
+
})), async ? jsx(ReactAsyncSelect, Object.assign({}, propsNoClassName, selectProps, async, {
|
|
4584
4589
|
onMenuOpen: openMenuHandler,
|
|
4585
4590
|
onMenuClose: closeMenuHandler
|
|
4586
|
-
})) : jsx(ReactSelect, Object.assign({},
|
|
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
|
-
|
|
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
|
@@ -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
|
-
|
|
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 {};
|