@fibery/ui-kit 1.5.0 → 1.7.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/index.ts +0 -1
- package/package.json +37 -23
- package/src/Item.tsx +5 -2
- package/src/Pallete.ts +191 -191
- package/src/Select/components.tsx +22 -21
- package/src/Select/index.tsx +60 -25
- package/src/Select/select-control-settings-context.tsx +20 -0
- package/src/Select/select-in-popover.tsx +333 -0
- package/src/Select/styles.ts +27 -1
- package/src/ThemeProvider.tsx +1 -1
- package/src/antd/styles.ts +3 -3
- package/src/designSystem.ts +80 -63
- package/src/error-alert.tsx +2 -2
- package/src/icons/Icon.tsx +17 -12
- package/src/icons/ast/AddGroup.ts +8 -0
- package/src/icons/ast/AiAssistant.ts +8 -0
- package/src/icons/ast/AiAvatar.ts +8 -0
- package/src/icons/ast/ArrowBottom.ts +3 -27
- package/src/icons/ast/ArrowCollapse.ts +3 -27
- package/src/icons/ast/ArrowCollapseVertical.ts +3 -27
- package/src/icons/ast/ArrowLeft.ts +3 -27
- package/src/icons/ast/ArrowRight.ts +3 -27
- package/src/icons/ast/ArrowTop.ts +3 -27
- package/src/icons/ast/Atom.ts +8 -0
- package/src/icons/ast/Copy.ts +8 -0
- package/src/icons/ast/DynamicFilterValue.ts +8 -0
- package/src/icons/ast/ExtensionAssignments.ts +3 -35
- package/src/icons/ast/FileUpload.ts +8 -0
- package/src/icons/ast/FormWithCover.ts +8 -0
- package/src/icons/ast/FormWithoutCover.ts +8 -0
- package/src/icons/ast/Github.ts +3 -27
- package/src/icons/ast/Gitlab.ts +3 -25
- package/src/icons/ast/Hint.ts +1 -1
- package/src/icons/ast/Jira.ts +8 -0
- package/src/icons/ast/Markdown.ts +8 -0
- package/src/icons/ast/Minus.ts +3 -23
- package/src/icons/ast/MoreCompact.ts +1 -1
- package/src/icons/ast/RicheditorBlockFile.ts +8 -0
- package/src/icons/ast/RicheditorBlockH4.ts +1 -1
- package/src/icons/ast/SimpleCompass.ts +8 -0
- package/src/icons/ast/Templates.ts +8 -0
- package/src/icons/ast/TypeLocation.ts +8 -0
- package/src/icons/ast/ViewForm.ts +3 -25
- package/src/icons/ast/ViewMap.ts +8 -0
- package/src/icons/ast/index.tsx +199 -182
- package/src/icons/react/AddGroup.tsx +12 -0
- package/src/icons/react/AiAssistant.tsx +12 -0
- package/src/icons/react/AiAvatar.tsx +12 -0
- package/src/icons/react/Atom.tsx +12 -0
- package/src/icons/react/Copy.tsx +12 -0
- package/src/icons/react/DynamicFilterValue.tsx +12 -0
- package/src/icons/react/FileUpload.tsx +12 -0
- package/src/icons/react/FormWithCover.tsx +12 -0
- package/src/icons/react/FormWithoutCover.tsx +12 -0
- package/src/icons/react/Github.tsx +8 -6
- package/src/icons/react/Gitlab.tsx +8 -6
- package/src/icons/react/Jira.tsx +12 -0
- package/src/icons/react/Markdown.tsx +12 -0
- package/src/icons/react/Minus.tsx +8 -6
- package/src/icons/react/RicheditorBlockFile.tsx +12 -0
- package/src/icons/react/SimpleCompass.tsx +12 -0
- package/src/icons/react/Templates.tsx +12 -0
- package/src/icons/react/TypeLocation.tsx +12 -0
- package/src/icons/react/ViewForm.tsx +8 -6
- package/src/icons/react/ViewMap.tsx +12 -0
- package/src/icons/react/index.tsx +199 -182
- package/src/tooltip.tsx +132 -152
- package/src/BackButton.tsx +0 -27
- package/src/Button.d.ts +0 -28
- package/src/Button.js +0 -360
- package/src/antd/ant-tooltip.tsx +0 -5
- package/src/icons/IconAsBackground.tsx +0 -15
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -22,25 +22,28 @@
|
|
|
22
22
|
"src/error-alert.tsx",
|
|
23
23
|
"src/Pallete.ts",
|
|
24
24
|
"src/tooltip.tsx",
|
|
25
|
-
"src/antd/ant-tooltip.tsx",
|
|
26
25
|
"src/BackButton.tsx"
|
|
27
26
|
],
|
|
28
27
|
"license": "UNLICENSED",
|
|
29
28
|
"scripts": {
|
|
30
29
|
"test": "TZ=Europe/Minsk jest",
|
|
31
|
-
"test:ci": "yarn test --
|
|
30
|
+
"test:ci": "yarn test --reporters=default --reporters=jest-junit",
|
|
31
|
+
"test:coverage": "yarn test --coverage --coverageDirectory=${JEST_COVERAGE_RESULT_DIR:-$(pwd)}/coverage/ui-kit --reporters=default --reporters=jest-junit",
|
|
32
32
|
"lint": "eslint .",
|
|
33
33
|
"generate-icons": "node scripts/generate-icons.mjs"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fibery/helpers": "
|
|
37
|
-
"@fibery/react": "
|
|
36
|
+
"@fibery/helpers": "workspace:*",
|
|
37
|
+
"@fibery/react": "workspace:*",
|
|
38
38
|
"@linaria/core": "3.0.0-beta.15",
|
|
39
39
|
"@linaria/react": "3.0.0-beta.15",
|
|
40
|
-
"@popperjs/core": "2.
|
|
40
|
+
"@popperjs/core": "2.11.6",
|
|
41
41
|
"@radix-ui/react-collapsible": "1.0.1",
|
|
42
|
-
"@radix-ui/react-
|
|
43
|
-
"
|
|
42
|
+
"@radix-ui/react-context-menu": "2.1.1",
|
|
43
|
+
"@radix-ui/react-dropdown-menu": "2.0.3-rc.7",
|
|
44
|
+
"@radix-ui/react-tooltip": "1.0.3",
|
|
45
|
+
"@types/ua-parser-js": "0.7.36",
|
|
46
|
+
"antd": "4.24.7",
|
|
44
47
|
"chroma-js": "2.1.2",
|
|
45
48
|
"chrono-node": "^2.4.1",
|
|
46
49
|
"classnames": "2.3.1",
|
|
@@ -51,41 +54,52 @@
|
|
|
51
54
|
"invariant": "2.2.4",
|
|
52
55
|
"lodash": "4.17.21",
|
|
53
56
|
"md5": "2.2.1",
|
|
54
|
-
"moment": "2.
|
|
57
|
+
"moment": "2.29.4",
|
|
55
58
|
"prop-types": "15.7.2",
|
|
56
|
-
"rc-input-number": "
|
|
57
|
-
"rc-menu": "9.
|
|
58
|
-
"rc-progress": "3.
|
|
59
|
+
"rc-input-number": "7.3.11",
|
|
60
|
+
"rc-menu": "9.8.1",
|
|
61
|
+
"rc-progress": "3.4.1",
|
|
59
62
|
"react-color": "2.13.8",
|
|
60
|
-
"react-day-picker": "8.1.
|
|
61
|
-
"react-popper": "2.
|
|
63
|
+
"react-day-picker": "8.1.4",
|
|
64
|
+
"react-popper": "2.3.0",
|
|
62
65
|
"react-select": "5.3.2",
|
|
63
66
|
"react-select-country-list": "2.2.1",
|
|
64
67
|
"react-windowed-select": "5.0.0",
|
|
65
|
-
"screenfull": "6.0.1"
|
|
68
|
+
"screenfull": "6.0.1",
|
|
69
|
+
"ua-parser-js": "0.7.24"
|
|
66
70
|
},
|
|
67
71
|
"peerDependencies": {
|
|
68
|
-
"react": "^
|
|
69
|
-
"react-dom": "^
|
|
72
|
+
"react": "^18.2.0",
|
|
73
|
+
"react-dom": "^18.2.0"
|
|
70
74
|
},
|
|
71
75
|
"devDependencies": {
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@fibery/
|
|
76
|
+
"@babel/core": "7.20.5",
|
|
77
|
+
"@babel/runtime": "7.20.6",
|
|
78
|
+
"@fibery/babel-preset": "workspace:*",
|
|
79
|
+
"@fibery/eslint-config": "workspace:*",
|
|
75
80
|
"@linaria/babel-preset": "3.0.0-beta.15",
|
|
81
|
+
"@testing-library/dom": "8.19.1",
|
|
82
|
+
"@testing-library/jest-dom": "5.16.5",
|
|
83
|
+
"@testing-library/react": "13.4.0",
|
|
84
|
+
"@testing-library/user-event": "13.5.0",
|
|
76
85
|
"@types/chroma-js": "2.1.3",
|
|
77
86
|
"@types/color-hash": "1.0.2",
|
|
78
87
|
"@types/emoji-mart": "3.0.8",
|
|
88
|
+
"@types/invariant": "2.2.34",
|
|
89
|
+
"@types/lodash": "4.14.172",
|
|
90
|
+
"@types/prop-types": "15.7.5",
|
|
91
|
+
"@types/react": "18.0.26",
|
|
92
|
+
"@types/react-dom": "18.0.10",
|
|
79
93
|
"csstype": "3.0.8",
|
|
80
|
-
"enzyme": "3.11.0",
|
|
81
|
-
"enzyme-adapter-react-16": "1.15.6",
|
|
82
94
|
"fs-extra": "10.0.0",
|
|
83
95
|
"glob": "7.1.7",
|
|
84
96
|
"jest": "27.5.1",
|
|
85
97
|
"jest-junit": "13.0.0",
|
|
98
|
+
"react": "18.2.0",
|
|
99
|
+
"react-dom": "18.2.0",
|
|
86
100
|
"svg-parser": "2.0.4",
|
|
87
101
|
"svgo": "2.8.0",
|
|
88
|
-
"typescript": "
|
|
102
|
+
"typescript": "5.0.3",
|
|
89
103
|
"unist-util-reduce": "0.2.2"
|
|
90
104
|
},
|
|
91
105
|
"jest": {
|
package/src/Item.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
2
|
import cx from "classnames";
|
|
3
|
-
import {forwardRef, Ref, ReactNode, MouseEvent, CSSProperties} from "react";
|
|
3
|
+
import {forwardRef, Ref, ReactNode, MouseEvent, CSSProperties, AriaRole} from "react";
|
|
4
4
|
import {themeVars} from "./designSystem";
|
|
5
5
|
|
|
6
6
|
const getGridStyle = ({
|
|
@@ -28,7 +28,7 @@ const getGridStyle = ({
|
|
|
28
28
|
|
|
29
29
|
const hoverClass = css`
|
|
30
30
|
&:hover {
|
|
31
|
-
background-color: ${themeVars.opacity.
|
|
31
|
+
background-color: ${themeVars.opacity.opacity10};
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
34
|
|
|
@@ -62,6 +62,7 @@ type Props = {
|
|
|
62
62
|
onMouseLeave?: (event: MouseEvent<HTMLDivElement>) => unknown;
|
|
63
63
|
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => unknown;
|
|
64
64
|
style?: CSSProperties;
|
|
65
|
+
role?: AriaRole;
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -88,6 +89,7 @@ export const Item = forwardRef<HTMLDivElement, Props>(function Item(
|
|
|
88
89
|
dataId,
|
|
89
90
|
textRef,
|
|
90
91
|
style = {},
|
|
92
|
+
role,
|
|
91
93
|
},
|
|
92
94
|
ref
|
|
93
95
|
) {
|
|
@@ -95,6 +97,7 @@ export const Item = forwardRef<HTMLDivElement, Props>(function Item(
|
|
|
95
97
|
<div
|
|
96
98
|
data-testid={dataId}
|
|
97
99
|
data-id={dataId}
|
|
100
|
+
role={role}
|
|
98
101
|
ref={ref}
|
|
99
102
|
onMouseDown={onMouseDown}
|
|
100
103
|
onMouseEnter={onMouseEnter}
|
package/src/Pallete.ts
CHANGED
|
@@ -1,243 +1,243 @@
|
|
|
1
1
|
export const slate = {
|
|
2
|
-
slate1: "hsl(206, 30
|
|
3
|
-
slate2: "hsl(210,
|
|
4
|
-
slate3: "hsl(209, 13
|
|
5
|
-
slate4: "hsl(209, 12
|
|
6
|
-
slate5: "hsl(208,
|
|
7
|
-
slate6: "hsl(208, 11
|
|
8
|
-
slate7: "hsl(207, 11
|
|
9
|
-
slate8: "hsl(205,
|
|
10
|
-
slate9: "hsl(205, 8
|
|
11
|
-
slate10: "hsl(205, 9
|
|
12
|
-
slate11: "hsl(204, 14
|
|
13
|
-
slate12: "hsl(200, 7
|
|
2
|
+
slate1: "hsl(206, 30%, 99%)",
|
|
3
|
+
slate2: "hsl(210, 17%, 98%)",
|
|
4
|
+
slate3: "hsl(209, 13%, 95%)",
|
|
5
|
+
slate4: "hsl(209, 12%, 93%)",
|
|
6
|
+
slate5: "hsl(208, 12%, 91%)",
|
|
7
|
+
slate6: "hsl(208, 11%, 89%)",
|
|
8
|
+
slate7: "hsl(207, 11%, 86%)",
|
|
9
|
+
slate8: "hsl(205, 11%, 78%)",
|
|
10
|
+
slate9: "hsl(205, 8%, 62%)",
|
|
11
|
+
slate10: "hsl(205, 9%, 47%)",
|
|
12
|
+
slate11: "hsl(204, 14%, 37%)",
|
|
13
|
+
slate12: "hsl(200, 7%, 9%)",
|
|
14
14
|
} as const;
|
|
15
15
|
|
|
16
16
|
export const slateDark = {
|
|
17
|
-
slate1: "hsl(200, 7
|
|
18
|
-
slate2: "hsl(195, 7
|
|
19
|
-
slate3: "hsl(197,
|
|
20
|
-
slate4: "hsl(198,
|
|
21
|
-
slate5: "hsl(199, 6
|
|
22
|
-
slate6: "hsl(201, 6
|
|
23
|
-
slate7: "hsl(203, 6
|
|
24
|
-
slate8: "hsl(207,
|
|
25
|
-
slate9: "hsl(206, 6
|
|
26
|
-
slate10: "hsl(206, 5
|
|
27
|
-
slate11: "hsl(206, 6
|
|
28
|
-
slate12: "hsl(210, 6
|
|
17
|
+
slate1: "hsl(200, 7%, 9%)",
|
|
18
|
+
slate2: "hsl(195, 7%, 11%)",
|
|
19
|
+
slate3: "hsl(197, 7%, 14%)",
|
|
20
|
+
slate4: "hsl(198, 7%, 16%)",
|
|
21
|
+
slate5: "hsl(199, 6%, 18%)",
|
|
22
|
+
slate6: "hsl(201, 6%, 20%)",
|
|
23
|
+
slate7: "hsl(203, 6%, 24%)",
|
|
24
|
+
slate8: "hsl(207, 6%, 32%)",
|
|
25
|
+
slate9: "hsl(206, 6%, 44%)",
|
|
26
|
+
slate10: "hsl(206, 5%, 50%)",
|
|
27
|
+
slate11: "hsl(206, 6%, 63%)",
|
|
28
|
+
slate12: "hsl(210, 6%, 93%)",
|
|
29
29
|
} as const;
|
|
30
30
|
|
|
31
31
|
export const sage = {
|
|
32
|
-
sage1: "hsl(155, 30
|
|
33
|
-
sage2: "hsl(150,
|
|
34
|
-
sage3: "hsl(151,
|
|
35
|
-
sage4: "hsl(151,
|
|
36
|
-
sage5: "hsl(151,
|
|
37
|
-
sage6: "hsl(152, 7
|
|
38
|
-
sage7: "hsl(153,
|
|
39
|
-
sage8: "hsl(154, 6
|
|
40
|
-
sage9: "hsl(155,
|
|
41
|
-
sage10: "hsl(154,
|
|
42
|
-
sage11: "hsl(155, 3
|
|
43
|
-
sage12: "hsl(155, 24
|
|
32
|
+
sage1: "hsl(155, 30%, 99%)",
|
|
33
|
+
sage2: "hsl(150, 17%, 98%)",
|
|
34
|
+
sage3: "hsl(151, 11%, 95%)",
|
|
35
|
+
sage4: "hsl(151, 9%, 93%)",
|
|
36
|
+
sage5: "hsl(151, 8%, 91%)",
|
|
37
|
+
sage6: "hsl(152, 7%, 88%)",
|
|
38
|
+
sage7: "hsl(153, 7%, 85%)",
|
|
39
|
+
sage8: "hsl(154, 6%, 78%)",
|
|
40
|
+
sage9: "hsl(155, 4%, 56%)",
|
|
41
|
+
sage10: "hsl(154, 3%, 52%)",
|
|
42
|
+
sage11: "hsl(155, 3%, 43%)",
|
|
43
|
+
sage12: "hsl(155, 24%, 9%)",
|
|
44
44
|
} as const;
|
|
45
45
|
|
|
46
46
|
export const sageDark = {
|
|
47
|
-
sage1: "hsl(160, 7
|
|
48
|
-
sage2: "hsl(150, 7
|
|
49
|
-
sage3: "hsl(150,
|
|
50
|
-
sage4: "hsl(150, 6
|
|
51
|
-
sage5: "hsl(150, 6
|
|
52
|
-
sage6: "hsl(150,
|
|
53
|
-
sage7: "hsl(150, 5
|
|
54
|
-
sage8: "hsl(150, 5
|
|
55
|
-
sage9: "hsl(155, 6
|
|
56
|
-
sage10: "hsl(153,
|
|
57
|
-
sage11: "hsl(155, 5
|
|
58
|
-
sage12: "hsl(155, 6
|
|
47
|
+
sage1: "hsl(160, 7%, 8%)",
|
|
48
|
+
sage2: "hsl(150, 7%, 11%)",
|
|
49
|
+
sage3: "hsl(150, 7%, 13%)",
|
|
50
|
+
sage4: "hsl(150, 6%, 15%)",
|
|
51
|
+
sage5: "hsl(150, 6%, 17%)",
|
|
52
|
+
sage6: "hsl(150, 6%, 20%)",
|
|
53
|
+
sage7: "hsl(150, 5%, 24%)",
|
|
54
|
+
sage8: "hsl(150, 5%, 31%)",
|
|
55
|
+
sage9: "hsl(155, 6%, 42%)",
|
|
56
|
+
sage10: "hsl(153, 5%, 48%)",
|
|
57
|
+
sage11: "hsl(155, 5%, 62%)",
|
|
58
|
+
sage12: "hsl(155, 6%, 93%)",
|
|
59
59
|
} as const;
|
|
60
60
|
|
|
61
61
|
export const teal = {
|
|
62
|
-
teal1: "hsl(165, 60
|
|
63
|
-
teal2: "hsl(169,
|
|
64
|
-
teal3: "hsl(169,
|
|
65
|
-
teal4: "hsl(169, 53
|
|
66
|
-
teal5: "hsl(170, 47
|
|
67
|
-
teal6: "hsl(170,
|
|
68
|
-
teal7: "hsl(170,
|
|
69
|
-
teal8: "hsl(172, 42
|
|
70
|
-
teal9: "hsl(173, 80
|
|
71
|
-
teal10: "hsl(173, 83
|
|
72
|
-
teal11: "hsl(174, 90
|
|
73
|
-
teal12: "hsl(170, 50
|
|
62
|
+
teal1: "hsl(165, 60%, 99%)",
|
|
63
|
+
teal2: "hsl(169, 65%, 97%)",
|
|
64
|
+
teal3: "hsl(169, 60%, 94%)",
|
|
65
|
+
teal4: "hsl(169, 53%, 90%)",
|
|
66
|
+
teal5: "hsl(170, 47%, 85%)",
|
|
67
|
+
teal6: "hsl(170, 43%, 78%)",
|
|
68
|
+
teal7: "hsl(170, 40%, 68%)",
|
|
69
|
+
teal8: "hsl(172, 42%, 52%)",
|
|
70
|
+
teal9: "hsl(173, 80%, 36%)",
|
|
71
|
+
teal10: "hsl(173, 83%, 33%)",
|
|
72
|
+
teal11: "hsl(174, 90%, 25%)",
|
|
73
|
+
teal12: "hsl(170, 50%, 13%)",
|
|
74
74
|
} as const;
|
|
75
75
|
|
|
76
76
|
export const tealDark = {
|
|
77
|
-
teal1: "hsl(168, 48
|
|
78
|
-
teal2: "hsl(169,
|
|
79
|
-
teal3: "hsl(170, 76
|
|
80
|
-
teal4: "hsl(171,
|
|
81
|
-
teal5: "hsl(171,
|
|
82
|
-
teal6: "hsl(172,
|
|
83
|
-
teal7: "hsl(172,
|
|
84
|
-
teal8: "hsl(173, 80
|
|
85
|
-
teal9: "hsl(173, 80
|
|
86
|
-
teal10: "hsl(174,
|
|
87
|
-
teal11: "hsl(174, 90
|
|
88
|
-
teal12: "hsl(166, 73
|
|
77
|
+
teal1: "hsl(168, 48%, 6%)",
|
|
78
|
+
teal2: "hsl(169, 78%, 7%)",
|
|
79
|
+
teal3: "hsl(170, 76%, 9%)",
|
|
80
|
+
teal4: "hsl(171, 76%, 11%)",
|
|
81
|
+
teal5: "hsl(171, 76%, 13%)",
|
|
82
|
+
teal6: "hsl(172, 76%, 15%)",
|
|
83
|
+
teal7: "hsl(172, 77%, 19%)",
|
|
84
|
+
teal8: "hsl(173, 80%, 24%)",
|
|
85
|
+
teal9: "hsl(173, 80%, 36%)",
|
|
86
|
+
teal10: "hsl(174, 84%, 38%)",
|
|
87
|
+
teal11: "hsl(174, 90%, 41%)",
|
|
88
|
+
teal12: "hsl(166, 73%, 93%)",
|
|
89
89
|
} as const;
|
|
90
90
|
|
|
91
91
|
export const indigo = {
|
|
92
|
-
indigo1: "hsl(225, 60
|
|
93
|
-
indigo2: "hsl(223, 100%,
|
|
94
|
-
indigo3: "hsl(223, 98
|
|
95
|
-
indigo4: "hsl(223,
|
|
96
|
-
indigo5: "hsl(224, 87
|
|
97
|
-
indigo6: "hsl(224,
|
|
98
|
-
indigo7: "hsl(225, 77
|
|
99
|
-
indigo8: "hsl(226, 75
|
|
100
|
-
indigo9: "hsl(226, 70
|
|
101
|
-
indigo10: "hsl(226,
|
|
102
|
-
indigo11: "hsl(226, 55
|
|
103
|
-
indigo12: "hsl(226, 62
|
|
92
|
+
indigo1: "hsl(225, 60%, 99%)",
|
|
93
|
+
indigo2: "hsl(223, 100%, 99%)",
|
|
94
|
+
indigo3: "hsl(223, 98%, 97%)",
|
|
95
|
+
indigo4: "hsl(223, 93%, 95%)",
|
|
96
|
+
indigo5: "hsl(224, 87%, 92%)",
|
|
97
|
+
indigo6: "hsl(224, 82%, 88%)",
|
|
98
|
+
indigo7: "hsl(225, 77%, 82%)",
|
|
99
|
+
indigo8: "hsl(226, 75%, 75%)",
|
|
100
|
+
indigo9: "hsl(226, 70%, 56%)",
|
|
101
|
+
indigo10: "hsl(226, 59%, 51%)",
|
|
102
|
+
indigo11: "hsl(226, 55%, 45%)",
|
|
103
|
+
indigo12: "hsl(226, 62%, 17%)",
|
|
104
104
|
} as const;
|
|
105
105
|
|
|
106
106
|
export const indigoDark = {
|
|
107
|
-
indigo1: "hsl(229, 24
|
|
108
|
-
indigo2: "hsl(230, 36
|
|
109
|
-
indigo3: "hsl(228, 43
|
|
110
|
-
indigo4: "hsl(227, 47
|
|
111
|
-
indigo5: "hsl(227, 50
|
|
112
|
-
indigo6: "hsl(226,
|
|
113
|
-
indigo7: "hsl(226, 56
|
|
114
|
-
indigo8: "hsl(226, 58
|
|
115
|
-
indigo9: "hsl(226, 70
|
|
116
|
-
indigo10: "hsl(227, 75
|
|
117
|
-
indigo11: "hsl(228, 100%,
|
|
118
|
-
indigo12: "hsl(226, 83
|
|
107
|
+
indigo1: "hsl(229, 24%, 10%)",
|
|
108
|
+
indigo2: "hsl(230, 36%, 13%)",
|
|
109
|
+
indigo3: "hsl(228, 43%, 18%)",
|
|
110
|
+
indigo4: "hsl(227, 47%, 21%)",
|
|
111
|
+
indigo5: "hsl(227, 50%, 24%)",
|
|
112
|
+
indigo6: "hsl(226, 53%, 28%)",
|
|
113
|
+
indigo7: "hsl(226, 56%, 35%)",
|
|
114
|
+
indigo8: "hsl(226, 58%, 44%)",
|
|
115
|
+
indigo9: "hsl(226, 70%, 56%)",
|
|
116
|
+
indigo10: "hsl(227, 75%, 62%)",
|
|
117
|
+
indigo11: "hsl(228, 100%, 76%)",
|
|
118
|
+
indigo12: "hsl(226, 83%, 96%)",
|
|
119
119
|
} as const;
|
|
120
120
|
|
|
121
121
|
export const red = {
|
|
122
|
-
red1: "hsl(359, 100%, 99
|
|
123
|
-
red2: "hsl(359, 100%,
|
|
124
|
-
red3: "hsl(360, 100%,
|
|
125
|
-
red4: "hsl(360,
|
|
126
|
-
red5: "hsl(360, 90
|
|
127
|
-
red6: "hsl(360,
|
|
128
|
-
red7: "hsl(359, 74
|
|
129
|
-
red8: "hsl(359, 69
|
|
130
|
-
red9: "hsl(358, 75
|
|
131
|
-
red10: "hsl(358, 69
|
|
132
|
-
red11: "hsl(358, 65
|
|
133
|
-
red12: "hsl(354, 50
|
|
122
|
+
red1: "hsl(359, 100%, 99%)",
|
|
123
|
+
red2: "hsl(359, 100%, 99%)",
|
|
124
|
+
red3: "hsl(360, 100%, 97%)",
|
|
125
|
+
red4: "hsl(360, 98%, 95%)",
|
|
126
|
+
red5: "hsl(360, 90%, 92%)",
|
|
127
|
+
red6: "hsl(360, 82%, 88%)",
|
|
128
|
+
red7: "hsl(359, 74%, 82%)",
|
|
129
|
+
red8: "hsl(359, 69%, 74%)",
|
|
130
|
+
red9: "hsl(358, 75%, 59%)",
|
|
131
|
+
red10: "hsl(358, 69%, 55%)",
|
|
132
|
+
red11: "hsl(358, 65%, 49%)",
|
|
133
|
+
red12: "hsl(354, 50%, 15%)",
|
|
134
134
|
} as const;
|
|
135
135
|
|
|
136
136
|
export const redDark = {
|
|
137
|
-
red1: "hsl(353, 23
|
|
138
|
-
red2: "hsl(357, 34
|
|
139
|
-
red3: "hsl(356, 43
|
|
140
|
-
red4: "hsl(356,
|
|
141
|
-
red5: "hsl(356, 51
|
|
142
|
-
red6: "hsl(356, 55
|
|
143
|
-
red7: "hsl(357, 60
|
|
144
|
-
red8: "hsl(358, 65
|
|
145
|
-
red9: "hsl(358, 75
|
|
146
|
-
red10: "hsl(358, 85
|
|
147
|
-
red11: "hsl(358, 100%,
|
|
148
|
-
red12: "hsl(351, 89
|
|
137
|
+
red1: "hsl(353, 23%, 10%)",
|
|
138
|
+
red2: "hsl(357, 34%, 12%)",
|
|
139
|
+
red3: "hsl(356, 43%, 16%)",
|
|
140
|
+
red4: "hsl(356, 48%, 19%)",
|
|
141
|
+
red5: "hsl(356, 51%, 22%)",
|
|
142
|
+
red6: "hsl(356, 55%, 26%)",
|
|
143
|
+
red7: "hsl(357, 60%, 32%)",
|
|
144
|
+
red8: "hsl(358, 65%, 40%)",
|
|
145
|
+
red9: "hsl(358, 75%, 59%)",
|
|
146
|
+
red10: "hsl(358, 85%, 64%)",
|
|
147
|
+
red11: "hsl(358, 100%, 70%)",
|
|
148
|
+
red12: "hsl(351, 89%, 96%)",
|
|
149
149
|
} as const;
|
|
150
150
|
|
|
151
151
|
export const blue = {
|
|
152
|
-
blue1: "hsl(206, 100%, 99
|
|
153
|
-
blue2: "hsl(210, 100%, 98
|
|
154
|
-
blue3: "hsl(209, 100%, 96
|
|
155
|
-
blue4: "hsl(210,
|
|
156
|
-
blue5: "hsl(209, 95
|
|
157
|
-
blue6: "hsl(209, 81
|
|
158
|
-
blue7: "hsl(208, 77
|
|
159
|
-
blue8: "hsl(206,
|
|
160
|
-
blue9: "hsl(206, 100%, 50
|
|
161
|
-
blue10: "hsl(208, 100%, 47
|
|
162
|
-
blue11: "hsl(211, 100%, 43
|
|
163
|
-
blue12: "hsl(211, 100%, 15
|
|
152
|
+
blue1: "hsl(206, 100%, 99%)",
|
|
153
|
+
blue2: "hsl(210, 100%, 98%)",
|
|
154
|
+
blue3: "hsl(209, 100%, 96%)",
|
|
155
|
+
blue4: "hsl(210, 99%, 94%)",
|
|
156
|
+
blue5: "hsl(209, 95%, 90%)",
|
|
157
|
+
blue6: "hsl(209, 81%, 84%)",
|
|
158
|
+
blue7: "hsl(208, 77%, 77%)",
|
|
159
|
+
blue8: "hsl(206, 82%, 65%)",
|
|
160
|
+
blue9: "hsl(206, 100%, 50%)",
|
|
161
|
+
blue10: "hsl(208, 100%, 47%)",
|
|
162
|
+
blue11: "hsl(211, 100%, 43%)",
|
|
163
|
+
blue12: "hsl(211, 100%, 15%)",
|
|
164
164
|
} as const;
|
|
165
165
|
|
|
166
166
|
export const blueDark = {
|
|
167
|
-
blue1: "hsl(212, 35
|
|
168
|
-
blue2: "hsl(216, 50
|
|
169
|
-
blue3: "hsl(214, 59
|
|
170
|
-
blue4: "hsl(214,
|
|
171
|
-
blue5: "hsl(213, 71
|
|
172
|
-
blue6: "hsl(212, 77
|
|
173
|
-
blue7: "hsl(211, 85
|
|
174
|
-
blue8: "hsl(211,
|
|
175
|
-
blue9: "hsl(206, 100%, 50
|
|
176
|
-
blue10: "hsl(209, 100%,
|
|
177
|
-
blue11: "hsl(210, 100%, 66
|
|
178
|
-
blue12: "hsl(206, 98
|
|
167
|
+
blue1: "hsl(212, 35%, 9%)",
|
|
168
|
+
blue2: "hsl(216, 50%, 12%)",
|
|
169
|
+
blue3: "hsl(214, 59%, 15%)",
|
|
170
|
+
blue4: "hsl(214, 66%, 18%)",
|
|
171
|
+
blue5: "hsl(213, 71%, 20%)",
|
|
172
|
+
blue6: "hsl(212, 77%, 23%)",
|
|
173
|
+
blue7: "hsl(211, 85%, 27%)",
|
|
174
|
+
blue8: "hsl(211, 90%, 34%)",
|
|
175
|
+
blue9: "hsl(206, 100%, 50%)",
|
|
176
|
+
blue10: "hsl(209, 100%, 61%)",
|
|
177
|
+
blue11: "hsl(210, 100%, 66%)",
|
|
178
|
+
blue12: "hsl(206, 98%, 96%)",
|
|
179
179
|
} as const;
|
|
180
180
|
|
|
181
181
|
export const yellow = {
|
|
182
|
-
yellow1: "hsl(60, 54
|
|
183
|
-
yellow2: "hsl(52, 100%, 95
|
|
184
|
-
yellow3: "hsl(55, 100%,
|
|
185
|
-
yellow4: "hsl(54, 100%,
|
|
186
|
-
yellow5: "hsl(52,
|
|
187
|
-
yellow6: "hsl(50, 89
|
|
188
|
-
yellow7: "hsl(47, 80
|
|
189
|
-
yellow8: "hsl(48, 100%, 46
|
|
190
|
-
yellow9: "hsl(53, 92
|
|
191
|
-
yellow10: "hsl(50, 100%, 48
|
|
192
|
-
yellow11: "hsl(42, 100%, 29
|
|
193
|
-
yellow12: "hsl(40, 55
|
|
182
|
+
yellow1: "hsl(60, 54%, 98%)",
|
|
183
|
+
yellow2: "hsl(52, 100%, 95%)",
|
|
184
|
+
yellow3: "hsl(55, 100%, 91%)",
|
|
185
|
+
yellow4: "hsl(54, 100%, 87%)",
|
|
186
|
+
yellow5: "hsl(52, 98%, 82%)",
|
|
187
|
+
yellow6: "hsl(50, 89%, 76%)",
|
|
188
|
+
yellow7: "hsl(47, 80%, 68%)",
|
|
189
|
+
yellow8: "hsl(48, 100%, 46%)",
|
|
190
|
+
yellow9: "hsl(53, 92%, 50%)",
|
|
191
|
+
yellow10: "hsl(50, 100%, 48%)",
|
|
192
|
+
yellow11: "hsl(42, 100%, 29%)",
|
|
193
|
+
yellow12: "hsl(40, 55%, 13%)",
|
|
194
194
|
} as const;
|
|
195
195
|
|
|
196
196
|
export const yellowDark = {
|
|
197
|
-
yellow1: "hsl(45, 100%, 5
|
|
198
|
-
yellow2: "hsl(46, 100%,
|
|
199
|
-
yellow3: "hsl(45, 100%,
|
|
200
|
-
yellow4: "hsl(45, 100%, 10
|
|
201
|
-
yellow5: "hsl(47, 100%, 12
|
|
202
|
-
yellow6: "hsl(49, 100%, 14
|
|
203
|
-
yellow7: "hsl(49, 90
|
|
204
|
-
yellow8: "hsl(50, 100%, 22
|
|
205
|
-
yellow9: "hsl(53, 92
|
|
206
|
-
yellow10: "hsl(54, 100%, 68
|
|
207
|
-
yellow11: "hsl(48, 100%, 47
|
|
208
|
-
yellow12: "hsl(53, 100%, 91
|
|
197
|
+
yellow1: "hsl(45, 100%, 5%)",
|
|
198
|
+
yellow2: "hsl(46, 100%, 7%)",
|
|
199
|
+
yellow3: "hsl(45, 100%, 9%)",
|
|
200
|
+
yellow4: "hsl(45, 100%, 10%)",
|
|
201
|
+
yellow5: "hsl(47, 100%, 12%)",
|
|
202
|
+
yellow6: "hsl(49, 100%, 14%)",
|
|
203
|
+
yellow7: "hsl(49, 90%, 18%)",
|
|
204
|
+
yellow8: "hsl(50, 100%, 22%)",
|
|
205
|
+
yellow9: "hsl(53, 92%, 50%)",
|
|
206
|
+
yellow10: "hsl(54, 100%, 68%)",
|
|
207
|
+
yellow11: "hsl(48, 100%, 47%)",
|
|
208
|
+
yellow12: "hsl(53, 100%, 91%)",
|
|
209
209
|
} as const;
|
|
210
210
|
|
|
211
211
|
export const blackA = {
|
|
212
212
|
blackA0: "#000000",
|
|
213
|
-
blackA1: "hsla(0, 0%, 0%, 0.
|
|
214
|
-
blackA2: "hsla(0, 0%, 0%, 0.
|
|
215
|
-
blackA3: "hsla(0, 0%, 0%, 0.
|
|
216
|
-
blackA4: "hsla(0, 0%, 0%, 0.
|
|
217
|
-
blackA5: "hsla(0, 0%, 0%, 0.
|
|
218
|
-
blackA6: "hsla(0, 0%, 0%, 0.
|
|
219
|
-
blackA7: "hsla(0, 0%, 0%, 0.
|
|
220
|
-
blackA8: "hsla(0, 0%, 0%, 0.
|
|
221
|
-
blackA9: "hsla(0, 0%, 0%, 0.
|
|
222
|
-
blackA10: "hsla(0, 0%, 0%, 0.
|
|
223
|
-
blackA11: "hsla(0, 0%, 0%, 0.
|
|
224
|
-
blackA12: "hsla(0, 0%, 0%, 0.
|
|
213
|
+
blackA1: "hsla(0, 0%, 0%, 0.01)",
|
|
214
|
+
blackA2: "hsla(0, 0%, 0%, 0.03)",
|
|
215
|
+
blackA3: "hsla(0, 0%, 0%, 0.05)",
|
|
216
|
+
blackA4: "hsla(0, 0%, 0%, 0.07)",
|
|
217
|
+
blackA5: "hsla(0, 0%, 0%, 0.09)",
|
|
218
|
+
blackA6: "hsla(0, 0%, 0%, 0.11)",
|
|
219
|
+
blackA7: "hsla(0, 0%, 0%, 0.14)",
|
|
220
|
+
blackA8: "hsla(0, 0%, 0%, 0.22)",
|
|
221
|
+
blackA9: "hsla(0, 0%, 0%, 0.44)",
|
|
222
|
+
blackA10: "hsla(0, 0%, 0%, 0.48)",
|
|
223
|
+
blackA11: "hsla(0, 0%, 0%, 0.57)",
|
|
224
|
+
blackA12: "hsla(0, 0%, 0%, 0.91)",
|
|
225
225
|
} as const;
|
|
226
226
|
|
|
227
227
|
export const whiteA = {
|
|
228
228
|
whiteA0: "#FFFFFF",
|
|
229
229
|
whiteA1: "hsla(0, 0%, 100%, 0)",
|
|
230
|
-
whiteA2: "hsla(0, 0%, 100%, 0.
|
|
231
|
-
whiteA3: "hsla(0, 0%, 100%, 0.
|
|
232
|
-
whiteA4: "hsla(0, 0%, 100%, 0.
|
|
233
|
-
whiteA5: "hsla(0, 0%, 100%, 0.
|
|
234
|
-
whiteA6: "hsla(0, 0%, 100%, 0.
|
|
235
|
-
whiteA7: "hsla(0, 0%, 100%, 0.
|
|
236
|
-
whiteA8: "hsla(0, 0%, 100%, 0.
|
|
237
|
-
whiteA9: "hsla(0, 0%, 100%, 0.
|
|
238
|
-
whiteA10: "hsla(0, 0%, 100%, 0.
|
|
239
|
-
whiteA11: "hsla(0, 0%, 100%, 0.
|
|
240
|
-
whiteA12: "hsla(0, 0%, 100%, 0.
|
|
230
|
+
whiteA2: "hsla(0, 0%, 100%, 0.01)",
|
|
231
|
+
whiteA3: "hsla(0, 0%, 100%, 0.03)",
|
|
232
|
+
whiteA4: "hsla(0, 0%, 100%, 0.06)",
|
|
233
|
+
whiteA5: "hsla(0, 0%, 100%, 0.09)",
|
|
234
|
+
whiteA6: "hsla(0, 0%, 100%, 0.12)",
|
|
235
|
+
whiteA7: "hsla(0, 0%, 100%, 0.18)",
|
|
236
|
+
whiteA8: "hsla(0, 0%, 100%, 0.25)",
|
|
237
|
+
whiteA9: "hsla(0, 0%, 100%, 0.39)",
|
|
238
|
+
whiteA10: "hsla(0, 0%, 100%, 0.45)",
|
|
239
|
+
whiteA11: "hsla(0, 0%, 100%, 0.59)",
|
|
240
|
+
whiteA12: "hsla(0, 0%, 100%, 0.92)",
|
|
241
241
|
} as const;
|
|
242
242
|
|
|
243
243
|
export const opacity = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, {ReactNode} from "react";
|
|
2
2
|
import {css} from "@linaria/core";
|
|
3
3
|
import {components} from "react-windowed-select";
|
|
4
4
|
import RemoveIcon from "../icons/react/Remove";
|
|
5
|
-
import {
|
|
6
|
-
import {Button} from "../Button";
|
|
7
|
-
import {
|
|
5
|
+
import {ClearIndicatorProps, DropdownIndicatorProps, GroupBase, MultiValueRemoveProps, OptionProps} from "react-select";
|
|
6
|
+
import {Button} from "../Button/button";
|
|
7
|
+
import {space, themeVars} from "../designSystem";
|
|
8
8
|
import ArrowCollapseVertical from "../icons/react/ArrowCollapseVertical";
|
|
9
|
-
import {
|
|
9
|
+
import {expanderExpandedStyle, expanderStyle} from "./styles";
|
|
10
10
|
import cn from "classnames";
|
|
11
11
|
|
|
12
12
|
export const Option = <
|
|
@@ -43,24 +43,9 @@ export function ClearIndicator<
|
|
|
43
43
|
innerProps,
|
|
44
44
|
selectProps,
|
|
45
45
|
}: ClearIndicatorProps<TOption, IsMulti, Group> | MultiValueRemoveProps<TOption, IsMulti, Group>) {
|
|
46
|
-
const onMouseDown = innerProps.onMouseDown;
|
|
47
|
-
const wrappedOnMouseDown = useCallback(
|
|
48
|
-
(e) => {
|
|
49
|
-
onMouseDown?.(e);
|
|
50
|
-
// This prevents false positive triggering in rc-trigger
|
|
51
|
-
e.nativeEvent.stopImmediatePropagation();
|
|
52
|
-
},
|
|
53
|
-
[onMouseDown]
|
|
54
|
-
);
|
|
55
46
|
return (
|
|
56
47
|
<div {...innerProps}>
|
|
57
|
-
<Button
|
|
58
|
-
borderless
|
|
59
|
-
Icon={RemoveIcon}
|
|
60
|
-
disabled={selectProps.isDisabled}
|
|
61
|
-
size={":button-size/super-small"}
|
|
62
|
-
onMouseDown={wrappedOnMouseDown}
|
|
63
|
-
/>
|
|
48
|
+
<Button borderless Icon={RemoveIcon} disabled={selectProps.isDisabled} size={":button-size/super-small"} />
|
|
64
49
|
</div>
|
|
65
50
|
);
|
|
66
51
|
}
|
|
@@ -81,3 +66,19 @@ export const NoOptionsMessage = ({children}: {children: ReactNode}) => {
|
|
|
81
66
|
</div>
|
|
82
67
|
);
|
|
83
68
|
};
|
|
69
|
+
|
|
70
|
+
const groupDividerContainerStyle = css`
|
|
71
|
+
padding: ${space.l}px 0;
|
|
72
|
+
box-sizing: content-box;
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
const groupDividerStyle = css`
|
|
76
|
+
width: 100%;
|
|
77
|
+
border-top: 1px solid #eeeff1;
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
export const GroupDivider = () => (
|
|
81
|
+
<div className={groupDividerContainerStyle}>
|
|
82
|
+
<div className={groupDividerStyle}></div>
|
|
83
|
+
</div>
|
|
84
|
+
);
|