@nulogy/components 10.2.14 → 10.4.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/dist/main.js +27 -18
- package/dist/main.module.js +27 -18
- package/dist/src/AsyncSelect/fixtures.d.ts +4 -0
- package/dist/src/Button/Button.d.ts +2 -1
- package/dist/src/Button/ControlIcon.d.ts +2 -1
- package/dist/src/Button/IconicButton.d.ts +2 -1
- package/dist/src/FieldLabel/FramedIcon.d.ts +2 -1
- package/dist/src/Icon/Icon.d.ts +2 -1
- package/dist/src/Input/InputField.d.ts +2 -1
- package/dist/src/Select/customReactSelectStyles.d.ts +5 -5
- package/dist/src/Tooltip/Tooltip.story.d.ts +1 -0
- package/dist/src/utils/story/simulatedAPIRequests.d.ts +4 -0
- package/package.json +5 -4
- package/dist/src/utils/story/simulatedAPIRequest.d.ts +0 -5
package/dist/main.js
CHANGED
|
@@ -21630,14 +21630,18 @@
|
|
|
21630
21630
|
};
|
|
21631
21631
|
}
|
|
21632
21632
|
function stylesForSize(config, size) {
|
|
21633
|
+
if (size === void 0) {
|
|
21634
|
+
size = "medium";
|
|
21635
|
+
}
|
|
21636
|
+
|
|
21633
21637
|
return config[size];
|
|
21634
21638
|
}
|
|
21635
|
-
|
|
21636
|
-
var
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
return
|
|
21640
|
-
}
|
|
21639
|
+
function showIndicatorSeparator(_ref5) {
|
|
21640
|
+
var hasValue = _ref5.hasValue,
|
|
21641
|
+
isClearable = _ref5.isClearable,
|
|
21642
|
+
isMulti = _ref5.isMulti;
|
|
21643
|
+
return hasValue && (isMulti || isClearable);
|
|
21644
|
+
}
|
|
21641
21645
|
|
|
21642
21646
|
var customStyles = function customStyles(_ref6) {
|
|
21643
21647
|
var theme = _ref6.theme,
|
|
@@ -21653,6 +21657,11 @@
|
|
|
21653
21657
|
height: 38
|
|
21654
21658
|
};
|
|
21655
21659
|
},
|
|
21660
|
+
clearIndicator: function clearIndicator(provided) {
|
|
21661
|
+
return Object.assign(Object.assign({}, provided), {
|
|
21662
|
+
color: theme.colors.midGrey
|
|
21663
|
+
});
|
|
21664
|
+
},
|
|
21656
21665
|
control: function control(provided, state) {
|
|
21657
21666
|
return Object.assign(Object.assign({}, provided), {
|
|
21658
21667
|
display: "flex",
|
|
@@ -21664,7 +21673,6 @@
|
|
|
21664
21673
|
lineHeight: theme.lineHeights.base,
|
|
21665
21674
|
color: state.isDisabled ? curriedTransparentize(0.6667, theme.colors.black) : theme.colors.black,
|
|
21666
21675
|
background: state.isDisabled ? theme.colors.whiteGrey : theme.colors.white,
|
|
21667
|
-
border: "1px solid " + theme.colors.grey,
|
|
21668
21676
|
borderColor: getBorderColor({
|
|
21669
21677
|
errored: error,
|
|
21670
21678
|
disabled: state.isDisabled,
|
|
@@ -21722,12 +21730,12 @@
|
|
|
21722
21730
|
return Object.assign(Object.assign(Object.assign({}, provided), !hasDefaultOptions && {
|
|
21723
21731
|
display: "none"
|
|
21724
21732
|
}), {
|
|
21725
|
-
color: theme.colors.
|
|
21733
|
+
color: theme.colors.midGrey
|
|
21726
21734
|
});
|
|
21727
21735
|
},
|
|
21728
21736
|
indicatorsContainer: function indicatorsContainer(provided) {
|
|
21729
21737
|
return Object.assign(Object.assign({}, provided), {
|
|
21730
|
-
color: theme.colors.
|
|
21738
|
+
color: theme.colors.midGrey
|
|
21731
21739
|
});
|
|
21732
21740
|
},
|
|
21733
21741
|
singleValue: function singleValue(provided) {
|
|
@@ -21741,8 +21749,8 @@
|
|
|
21741
21749
|
},
|
|
21742
21750
|
valueContainer: function valueContainer(provided, state) {
|
|
21743
21751
|
return Object.assign(Object.assign(Object.assign({}, provided), {
|
|
21744
|
-
display: "flex",
|
|
21745
21752
|
padding: 0,
|
|
21753
|
+
display: "flex",
|
|
21746
21754
|
overflow: "auto",
|
|
21747
21755
|
maxHeight: "150px",
|
|
21748
21756
|
gap: theme.space.half
|
|
@@ -21753,8 +21761,8 @@
|
|
|
21753
21761
|
gap: theme.space.x1
|
|
21754
21762
|
},
|
|
21755
21763
|
medium: {
|
|
21756
|
-
paddingTop: theme.space.
|
|
21757
|
-
paddingBottom: theme.space.
|
|
21764
|
+
paddingTop: theme.space.none,
|
|
21765
|
+
paddingBottom: theme.space.none
|
|
21758
21766
|
}
|
|
21759
21767
|
}, size));
|
|
21760
21768
|
},
|
|
@@ -21884,9 +21892,9 @@
|
|
|
21884
21892
|
indicatorSeparator: function indicatorSeparator(provided, state) {
|
|
21885
21893
|
return Object.assign(Object.assign({}, provided), {
|
|
21886
21894
|
display: showIndicatorSeparator({
|
|
21887
|
-
isMulti: state.isMulti,
|
|
21888
21895
|
hasValue: state.hasValue,
|
|
21889
|
-
|
|
21896
|
+
isClearable: state.selectProps.isClearable,
|
|
21897
|
+
isMulti: state.isMulti
|
|
21890
21898
|
}) ? "block" : "none",
|
|
21891
21899
|
borderLeft: "1px solid " + theme.colors.grey
|
|
21892
21900
|
});
|
|
@@ -21899,7 +21907,7 @@
|
|
|
21899
21907
|
position: "absolute",
|
|
21900
21908
|
top: "50%",
|
|
21901
21909
|
transform: "translateY(-50%)",
|
|
21902
|
-
color: state.isDisabled ? curriedTransparentize(0.
|
|
21910
|
+
color: state.isDisabled ? curriedTransparentize(0.7, theme.colors.midGrey) : theme.colors.midGrey
|
|
21903
21911
|
};
|
|
21904
21912
|
}
|
|
21905
21913
|
};
|
|
@@ -26920,9 +26928,10 @@
|
|
|
26920
26928
|
listStyle: "none",
|
|
26921
26929
|
display: "inline-flex",
|
|
26922
26930
|
alignSelf: "center",
|
|
26923
|
-
color: theme.colors.
|
|
26931
|
+
color: theme.colors.midGrey,
|
|
26924
26932
|
a: {
|
|
26925
|
-
color: theme.colors.darkBlue
|
|
26933
|
+
color: theme.colors.darkBlue,
|
|
26934
|
+
textDecorationLine: "none"
|
|
26926
26935
|
},
|
|
26927
26936
|
"a:visited": {
|
|
26928
26937
|
color: theme.colors.darkBlue
|
|
@@ -26938,7 +26947,7 @@
|
|
|
26938
26947
|
large: {
|
|
26939
26948
|
"a, p": {
|
|
26940
26949
|
py: "x2",
|
|
26941
|
-
px: "
|
|
26950
|
+
px: "x0",
|
|
26942
26951
|
fontSize: "medium"
|
|
26943
26952
|
}
|
|
26944
26953
|
},
|
package/dist/main.module.js
CHANGED
|
@@ -21613,14 +21613,18 @@ function getMenuBorderRadius(_ref4) {
|
|
|
21613
21613
|
};
|
|
21614
21614
|
}
|
|
21615
21615
|
function stylesForSize(config, size) {
|
|
21616
|
+
if (size === void 0) {
|
|
21617
|
+
size = "medium";
|
|
21618
|
+
}
|
|
21619
|
+
|
|
21616
21620
|
return config[size];
|
|
21617
21621
|
}
|
|
21618
|
-
|
|
21619
|
-
var
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
return
|
|
21623
|
-
}
|
|
21622
|
+
function showIndicatorSeparator(_ref5) {
|
|
21623
|
+
var hasValue = _ref5.hasValue,
|
|
21624
|
+
isClearable = _ref5.isClearable,
|
|
21625
|
+
isMulti = _ref5.isMulti;
|
|
21626
|
+
return hasValue && (isMulti || isClearable);
|
|
21627
|
+
}
|
|
21624
21628
|
|
|
21625
21629
|
var customStyles = function customStyles(_ref6) {
|
|
21626
21630
|
var theme = _ref6.theme,
|
|
@@ -21636,6 +21640,11 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21636
21640
|
height: 38
|
|
21637
21641
|
};
|
|
21638
21642
|
},
|
|
21643
|
+
clearIndicator: function clearIndicator(provided) {
|
|
21644
|
+
return Object.assign(Object.assign({}, provided), {
|
|
21645
|
+
color: theme.colors.midGrey
|
|
21646
|
+
});
|
|
21647
|
+
},
|
|
21639
21648
|
control: function control(provided, state) {
|
|
21640
21649
|
return Object.assign(Object.assign({}, provided), {
|
|
21641
21650
|
display: "flex",
|
|
@@ -21647,7 +21656,6 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21647
21656
|
lineHeight: theme.lineHeights.base,
|
|
21648
21657
|
color: state.isDisabled ? curriedTransparentize(0.6667, theme.colors.black) : theme.colors.black,
|
|
21649
21658
|
background: state.isDisabled ? theme.colors.whiteGrey : theme.colors.white,
|
|
21650
|
-
border: "1px solid " + theme.colors.grey,
|
|
21651
21659
|
borderColor: getBorderColor({
|
|
21652
21660
|
errored: error,
|
|
21653
21661
|
disabled: state.isDisabled,
|
|
@@ -21705,12 +21713,12 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21705
21713
|
return Object.assign(Object.assign(Object.assign({}, provided), !hasDefaultOptions && {
|
|
21706
21714
|
display: "none"
|
|
21707
21715
|
}), {
|
|
21708
|
-
color: theme.colors.
|
|
21716
|
+
color: theme.colors.midGrey
|
|
21709
21717
|
});
|
|
21710
21718
|
},
|
|
21711
21719
|
indicatorsContainer: function indicatorsContainer(provided) {
|
|
21712
21720
|
return Object.assign(Object.assign({}, provided), {
|
|
21713
|
-
color: theme.colors.
|
|
21721
|
+
color: theme.colors.midGrey
|
|
21714
21722
|
});
|
|
21715
21723
|
},
|
|
21716
21724
|
singleValue: function singleValue(provided) {
|
|
@@ -21724,8 +21732,8 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21724
21732
|
},
|
|
21725
21733
|
valueContainer: function valueContainer(provided, state) {
|
|
21726
21734
|
return Object.assign(Object.assign(Object.assign({}, provided), {
|
|
21727
|
-
display: "flex",
|
|
21728
21735
|
padding: 0,
|
|
21736
|
+
display: "flex",
|
|
21729
21737
|
overflow: "auto",
|
|
21730
21738
|
maxHeight: "150px",
|
|
21731
21739
|
gap: theme.space.half
|
|
@@ -21736,8 +21744,8 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21736
21744
|
gap: theme.space.x1
|
|
21737
21745
|
},
|
|
21738
21746
|
medium: {
|
|
21739
|
-
paddingTop: theme.space.
|
|
21740
|
-
paddingBottom: theme.space.
|
|
21747
|
+
paddingTop: theme.space.none,
|
|
21748
|
+
paddingBottom: theme.space.none
|
|
21741
21749
|
}
|
|
21742
21750
|
}, size));
|
|
21743
21751
|
},
|
|
@@ -21867,9 +21875,9 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21867
21875
|
indicatorSeparator: function indicatorSeparator(provided, state) {
|
|
21868
21876
|
return Object.assign(Object.assign({}, provided), {
|
|
21869
21877
|
display: showIndicatorSeparator({
|
|
21870
|
-
isMulti: state.isMulti,
|
|
21871
21878
|
hasValue: state.hasValue,
|
|
21872
|
-
|
|
21879
|
+
isClearable: state.selectProps.isClearable,
|
|
21880
|
+
isMulti: state.isMulti
|
|
21873
21881
|
}) ? "block" : "none",
|
|
21874
21882
|
borderLeft: "1px solid " + theme.colors.grey
|
|
21875
21883
|
});
|
|
@@ -21882,7 +21890,7 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21882
21890
|
position: "absolute",
|
|
21883
21891
|
top: "50%",
|
|
21884
21892
|
transform: "translateY(-50%)",
|
|
21885
|
-
color: state.isDisabled ? curriedTransparentize(0.
|
|
21893
|
+
color: state.isDisabled ? curriedTransparentize(0.7, theme.colors.midGrey) : theme.colors.midGrey
|
|
21886
21894
|
};
|
|
21887
21895
|
}
|
|
21888
21896
|
};
|
|
@@ -26903,9 +26911,10 @@ var BreadcrumbsListItem = styled.li.withConfig({
|
|
|
26903
26911
|
listStyle: "none",
|
|
26904
26912
|
display: "inline-flex",
|
|
26905
26913
|
alignSelf: "center",
|
|
26906
|
-
color: theme.colors.
|
|
26914
|
+
color: theme.colors.midGrey,
|
|
26907
26915
|
a: {
|
|
26908
|
-
color: theme.colors.darkBlue
|
|
26916
|
+
color: theme.colors.darkBlue,
|
|
26917
|
+
textDecorationLine: "none"
|
|
26909
26918
|
},
|
|
26910
26919
|
"a:visited": {
|
|
26911
26920
|
color: theme.colors.darkBlue
|
|
@@ -26921,7 +26930,7 @@ var BreadcrumbsListItem = styled.li.withConfig({
|
|
|
26921
26930
|
large: {
|
|
26922
26931
|
"a, p": {
|
|
26923
26932
|
py: "x2",
|
|
26924
|
-
px: "
|
|
26933
|
+
px: "x0",
|
|
26925
26934
|
fontSize: "medium"
|
|
26926
26935
|
}
|
|
26927
26936
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
import { DefaultNDSThemeType } from "../theme.type";
|
|
4
|
+
import icons from "@nulogy/icons";
|
|
4
5
|
type ComponentSize = "small" | "medium" | "large";
|
|
5
6
|
export type ButtonProps = SpaceProps & React.ComponentPropsWithRef<"button"> & {
|
|
6
7
|
className?: string;
|
|
7
|
-
icon?:
|
|
8
|
+
icon?: keyof typeof icons | "loading";
|
|
8
9
|
iconSide?: "left" | "right";
|
|
9
10
|
size?: ComponentSize;
|
|
10
11
|
fullWidth?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import icons from "@nulogy/icons";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { SpaceProps } from "styled-system";
|
|
3
4
|
declare const ControlIcon: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
4
5
|
ref?: React.Ref<HTMLButtonElement>;
|
|
5
6
|
} & SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
6
7
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
7
|
-
icon:
|
|
8
|
+
icon: keyof typeof icons | "loading";
|
|
8
9
|
toggled?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
size?: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
+
import icons from "@nulogy/icons";
|
|
3
4
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
4
5
|
interface BaseProps {
|
|
5
6
|
size?: ComponentSize;
|
|
6
7
|
color?: string;
|
|
7
8
|
labelHidden?: boolean;
|
|
8
|
-
icon?:
|
|
9
|
+
icon?: keyof typeof icons | "loading";
|
|
9
10
|
iconSize?: string;
|
|
10
11
|
hoverBackgroundColor?: string;
|
|
11
12
|
fontSize?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
|
+
import icons from "@nulogy/icons";
|
|
2
3
|
interface FramedIconProps extends React.ComponentPropsWithoutRef<"svg"> {
|
|
3
4
|
iconSize: string;
|
|
4
|
-
icon:
|
|
5
|
+
icon: keyof typeof icons | "loading";
|
|
5
6
|
focusable?: boolean;
|
|
6
7
|
maxWidth?: string;
|
|
7
8
|
tooltip?: string | ReactElement;
|
package/dist/src/Icon/Icon.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
|
+
import icons from "@nulogy/icons";
|
|
3
4
|
interface IconProps extends SpaceProps {
|
|
4
|
-
icon:
|
|
5
|
+
icon: keyof typeof icons | "loading";
|
|
5
6
|
className?: string;
|
|
6
7
|
size?: string;
|
|
7
8
|
title?: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
3
|
+
import icons from "@nulogy/icons";
|
|
3
4
|
type NativeInputProps = Omit<React.ComponentPropsWithRef<"input">, "size">;
|
|
4
5
|
export interface InputFieldProps extends NativeInputProps {
|
|
5
6
|
htmlSize?: number;
|
|
6
7
|
size?: ComponentSize;
|
|
7
|
-
icon?:
|
|
8
|
+
icon?: keyof typeof icons | "loading";
|
|
8
9
|
error?: boolean;
|
|
9
10
|
labelText?: string;
|
|
10
11
|
requirementText?: string;
|
|
@@ -22,12 +22,12 @@ export declare function getMenuBorderRadius({ border, menuPlacement, theme, }: {
|
|
|
22
22
|
type SizeConfig = {
|
|
23
23
|
[key in ComponentSize]: CSSObject;
|
|
24
24
|
};
|
|
25
|
-
export declare function stylesForSize(config: SizeConfig, size
|
|
26
|
-
export declare
|
|
27
|
-
isMulti: any;
|
|
25
|
+
export declare function stylesForSize(config: SizeConfig, size?: ComponentSize): CSSObject;
|
|
26
|
+
export declare function showIndicatorSeparator({ hasValue, isClearable, isMulti }: {
|
|
28
27
|
hasValue: any;
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
isClearable: any;
|
|
29
|
+
isMulti: any;
|
|
30
|
+
}): any;
|
|
31
31
|
interface Args {
|
|
32
32
|
theme: DefaultNDSThemeType;
|
|
33
33
|
[key: string]: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nulogy/components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.0",
|
|
4
4
|
"description": "Component library for the Nulogy Design System - http://nulogy.design",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"@nulogy/icons": "4",
|
|
53
53
|
"react": ">=16.10.2",
|
|
54
54
|
"react-dom": ">=16.10.2",
|
|
55
|
-
"styled-components": "^5.1.0"
|
|
55
|
+
"styled-components": "^5.1.0",
|
|
56
|
+
"typescript": "4.9.5"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@babel/core": "^7.0.0-0",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"@babel/preset-env": "7.3.1",
|
|
64
65
|
"@babel/preset-typescript": "^7.10.4",
|
|
65
66
|
"@nulogy/eslint-config-nulogy": "^1.0.0",
|
|
66
|
-
"@nulogy/icons": "4.
|
|
67
|
+
"@nulogy/icons": "^4.36.0",
|
|
67
68
|
"@rollup/plugin-babel": "^5.0.0",
|
|
68
69
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
69
70
|
"@semantic-release/changelog": "^6.0.2",
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"eslint-plugin-prettier": "^3.1.4",
|
|
111
112
|
"http-server": "^14.0.0",
|
|
112
113
|
"husky": "^4.3.0",
|
|
113
|
-
"jest": "29.
|
|
114
|
+
"jest": "29.7.0",
|
|
114
115
|
"jest-environment-jsdom": "^29.5.0",
|
|
115
116
|
"jest-styled-components": "7",
|
|
116
117
|
"jscodeshift": "^0.11.0",
|