@bitrise/bitkit 13.174.0 → 13.176.0
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import Label from '../Label/Label';
|
|
|
7
7
|
import Skeleton from '../Skeleton/Skeleton';
|
|
8
8
|
import SkeletonBox from '../Skeleton/SkeletonBox';
|
|
9
9
|
|
|
10
|
-
type DataOrPlaceholder = { placeholder
|
|
10
|
+
type DataOrPlaceholder = { placeholder?: string; data?: never } | { data?: string; placeholder?: never };
|
|
11
11
|
export type LabeledDataProps = BoxProps & {
|
|
12
12
|
skeletonVariant?: 'single' | 'double';
|
|
13
13
|
as?: 'div' | 'dl';
|
|
@@ -29,8 +29,9 @@ const useTabs = <T extends string>(props: UseTabsProps<T>) => {
|
|
|
29
29
|
}, []);
|
|
30
30
|
|
|
31
31
|
useEffect(() => {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const queryValue = tabIds[tabIndex];
|
|
33
|
+
if (queryValue) {
|
|
34
|
+
searchParams.set(queryKey, queryValue);
|
|
34
35
|
window.parent.history.replaceState(null, '', `?${decodeURIComponent(searchParams.toString())}`);
|
|
35
36
|
}
|
|
36
37
|
}, [tabIndex]);
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { CardProps, createStylesContext, useMultiStyleConfig } from '@chakra-ui/react';
|
|
3
3
|
import Card from '../../Components/Card/Card';
|
|
4
4
|
import LabeledData, { LabeledDataProps } from '../../Components/LabeledData/LabeledData';
|
|
5
|
-
import Box from '../../Components/Box/Box';
|
|
5
|
+
import Box, { BoxProps } from '../../Components/Box/Box';
|
|
6
6
|
import Toggle, { ToggleProps } from '../../Components/Toggle/Toggle';
|
|
7
7
|
import Icon, { IconProps } from '../../Components/Icon/Icon';
|
|
8
8
|
import Text from '../../Components/Text/Text';
|
|
@@ -11,9 +11,22 @@ import SkeletonBox from '../../Components/Skeleton/SkeletonBox';
|
|
|
11
11
|
import ToggleComponent, { ToggleComponentProps } from '../../Components/Toggle/ToggleComponent';
|
|
12
12
|
|
|
13
13
|
const [SettingsCardStyleProvider, useSettingsCardStyle] = createStylesContext('SettingsCard');
|
|
14
|
-
export const SettingsCardData = (
|
|
14
|
+
export const SettingsCardData = ({ helperText, ...rest }: LabeledDataProps & { helperText?: string }) => {
|
|
15
15
|
const { data } = useSettingsCardStyle();
|
|
16
|
-
|
|
16
|
+
const labaledData = <LabeledData {...rest} __css={data} />;
|
|
17
|
+
|
|
18
|
+
return helperText ? (
|
|
19
|
+
<Box __css={data}>
|
|
20
|
+
<LabeledData {...rest} />
|
|
21
|
+
{helperText && (
|
|
22
|
+
<Text color="input/text/helper" textStyle="comp/input/helperText">
|
|
23
|
+
{helperText}
|
|
24
|
+
</Text>
|
|
25
|
+
)}
|
|
26
|
+
</Box>
|
|
27
|
+
) : (
|
|
28
|
+
labaledData
|
|
29
|
+
);
|
|
17
30
|
};
|
|
18
31
|
export const SettingsCardActions = ({ children }: { children: ReactNode }) => {
|
|
19
32
|
const { actions } = useSettingsCardStyle();
|
|
@@ -36,9 +49,13 @@ export const SettingsCardToggle = (props: Omit<ToggleProps, 'variant'> & { label
|
|
|
36
49
|
</Box>
|
|
37
50
|
);
|
|
38
51
|
};
|
|
39
|
-
export const SettingsCardFooter = ({ children }:
|
|
52
|
+
export const SettingsCardFooter = ({ children, ...rest }: BoxProps) => {
|
|
40
53
|
const { footer } = useSettingsCardStyle();
|
|
41
|
-
return
|
|
54
|
+
return (
|
|
55
|
+
<Box __css={footer} {...rest}>
|
|
56
|
+
{children}
|
|
57
|
+
</Box>
|
|
58
|
+
);
|
|
42
59
|
};
|
|
43
60
|
export const SettingsCardFooterToggle = ({
|
|
44
61
|
label,
|