@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.
Files changed (72) hide show
  1. package/index.ts +0 -1
  2. package/package.json +37 -23
  3. package/src/Item.tsx +5 -2
  4. package/src/Pallete.ts +191 -191
  5. package/src/Select/components.tsx +22 -21
  6. package/src/Select/index.tsx +60 -25
  7. package/src/Select/select-control-settings-context.tsx +20 -0
  8. package/src/Select/select-in-popover.tsx +333 -0
  9. package/src/Select/styles.ts +27 -1
  10. package/src/ThemeProvider.tsx +1 -1
  11. package/src/antd/styles.ts +3 -3
  12. package/src/designSystem.ts +80 -63
  13. package/src/error-alert.tsx +2 -2
  14. package/src/icons/Icon.tsx +17 -12
  15. package/src/icons/ast/AddGroup.ts +8 -0
  16. package/src/icons/ast/AiAssistant.ts +8 -0
  17. package/src/icons/ast/AiAvatar.ts +8 -0
  18. package/src/icons/ast/ArrowBottom.ts +3 -27
  19. package/src/icons/ast/ArrowCollapse.ts +3 -27
  20. package/src/icons/ast/ArrowCollapseVertical.ts +3 -27
  21. package/src/icons/ast/ArrowLeft.ts +3 -27
  22. package/src/icons/ast/ArrowRight.ts +3 -27
  23. package/src/icons/ast/ArrowTop.ts +3 -27
  24. package/src/icons/ast/Atom.ts +8 -0
  25. package/src/icons/ast/Copy.ts +8 -0
  26. package/src/icons/ast/DynamicFilterValue.ts +8 -0
  27. package/src/icons/ast/ExtensionAssignments.ts +3 -35
  28. package/src/icons/ast/FileUpload.ts +8 -0
  29. package/src/icons/ast/FormWithCover.ts +8 -0
  30. package/src/icons/ast/FormWithoutCover.ts +8 -0
  31. package/src/icons/ast/Github.ts +3 -27
  32. package/src/icons/ast/Gitlab.ts +3 -25
  33. package/src/icons/ast/Hint.ts +1 -1
  34. package/src/icons/ast/Jira.ts +8 -0
  35. package/src/icons/ast/Markdown.ts +8 -0
  36. package/src/icons/ast/Minus.ts +3 -23
  37. package/src/icons/ast/MoreCompact.ts +1 -1
  38. package/src/icons/ast/RicheditorBlockFile.ts +8 -0
  39. package/src/icons/ast/RicheditorBlockH4.ts +1 -1
  40. package/src/icons/ast/SimpleCompass.ts +8 -0
  41. package/src/icons/ast/Templates.ts +8 -0
  42. package/src/icons/ast/TypeLocation.ts +8 -0
  43. package/src/icons/ast/ViewForm.ts +3 -25
  44. package/src/icons/ast/ViewMap.ts +8 -0
  45. package/src/icons/ast/index.tsx +199 -182
  46. package/src/icons/react/AddGroup.tsx +12 -0
  47. package/src/icons/react/AiAssistant.tsx +12 -0
  48. package/src/icons/react/AiAvatar.tsx +12 -0
  49. package/src/icons/react/Atom.tsx +12 -0
  50. package/src/icons/react/Copy.tsx +12 -0
  51. package/src/icons/react/DynamicFilterValue.tsx +12 -0
  52. package/src/icons/react/FileUpload.tsx +12 -0
  53. package/src/icons/react/FormWithCover.tsx +12 -0
  54. package/src/icons/react/FormWithoutCover.tsx +12 -0
  55. package/src/icons/react/Github.tsx +8 -6
  56. package/src/icons/react/Gitlab.tsx +8 -6
  57. package/src/icons/react/Jira.tsx +12 -0
  58. package/src/icons/react/Markdown.tsx +12 -0
  59. package/src/icons/react/Minus.tsx +8 -6
  60. package/src/icons/react/RicheditorBlockFile.tsx +12 -0
  61. package/src/icons/react/SimpleCompass.tsx +12 -0
  62. package/src/icons/react/Templates.tsx +12 -0
  63. package/src/icons/react/TypeLocation.tsx +12 -0
  64. package/src/icons/react/ViewForm.tsx +8 -6
  65. package/src/icons/react/ViewMap.tsx +12 -0
  66. package/src/icons/react/index.tsx +199 -182
  67. package/src/tooltip.tsx +132 -152
  68. package/src/BackButton.tsx +0 -27
  69. package/src/Button.d.ts +0 -28
  70. package/src/Button.js +0 -360
  71. package/src/antd/ant-tooltip.tsx +0 -5
  72. package/src/icons/IconAsBackground.tsx +0 -15
package/index.ts CHANGED
@@ -1,2 +1 @@
1
1
  export * from "./src/designSystem";
2
- export {Button} from "./src/Button";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/ui-kit",
3
- "version": "1.5.0",
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 --coverage --reporters=default --reporters=jest-junit",
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": "1.0.2",
37
- "@fibery/react": "1.0.0",
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.9.3",
40
+ "@popperjs/core": "2.11.6",
41
41
  "@radix-ui/react-collapsible": "1.0.1",
42
- "@radix-ui/react-dropdown-menu": "2.0.1",
43
- "antd": "4.18.8",
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.20.1",
57
+ "moment": "2.29.4",
55
58
  "prop-types": "15.7.2",
56
- "rc-input-number": "^7.3.4",
57
- "rc-menu": "9.3.2",
58
- "rc-progress": "3.2.4",
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.3",
61
- "react-popper": "2.2.5",
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": "^16.14.0",
69
- "react-dom": "^16.14.0"
72
+ "react": "^18.2.0",
73
+ "react-dom": "^18.2.0"
70
74
  },
71
75
  "devDependencies": {
72
- "@fibery/babel-preset": "7.2.0",
73
- "@fibery/eslint-config": "8.2.0",
74
- "@fibery/text-editor": "1.0.0",
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": "4.7.4",
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.thin};
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.0%, 98.8%)",
3
- slate2: "hsl(210, 16.7%, 97.6%)",
4
- slate3: "hsl(209, 13.3%, 95.3%)",
5
- slate4: "hsl(209, 12.2%, 93.2%)",
6
- slate5: "hsl(208, 11.7%, 91.1%)",
7
- slate6: "hsl(208, 11.3%, 88.9%)",
8
- slate7: "hsl(207, 11.1%, 85.9%)",
9
- slate8: "hsl(205, 10.7%, 78.0%)",
10
- slate9: "hsl(205, 8.0%, 62.1%)",
11
- slate10: "hsl(205, 9.0%, 47.3%)",
12
- slate11: "hsl(204, 14.0%, 37.3%)",
13
- slate12: "hsl(200, 7.0%, 8.8%)",
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.0%, 8.8%)",
18
- slate2: "hsl(195, 7.1%, 11.0%)",
19
- slate3: "hsl(197, 6.8%, 13.6%)",
20
- slate4: "hsl(198, 6.6%, 15.8%)",
21
- slate5: "hsl(199, 6.4%, 17.9%)",
22
- slate6: "hsl(201, 6.2%, 20.5%)",
23
- slate7: "hsl(203, 6.0%, 24.3%)",
24
- slate8: "hsl(207, 5.6%, 31.6%)",
25
- slate9: "hsl(206, 6.0%, 43.9%)",
26
- slate10: "hsl(206, 5.2%, 49.5%)",
27
- slate11: "hsl(206, 6.0%, 63.0%)",
28
- slate12: "hsl(210, 6.0%, 93.0%)",
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.0%, 98.8%)",
33
- sage2: "hsl(150, 16.7%, 97.6%)",
34
- sage3: "hsl(151, 10.6%, 95.2%)",
35
- sage4: "hsl(151, 8.8%, 93.0%)",
36
- sage5: "hsl(151, 7.8%, 90.8%)",
37
- sage6: "hsl(152, 7.2%, 88.4%)",
38
- sage7: "hsl(153, 6.7%, 85.3%)",
39
- sage8: "hsl(154, 6.1%, 77.5%)",
40
- sage9: "hsl(155, 3.5%, 55.5%)",
41
- sage10: "hsl(154, 2.8%, 51.7%)",
42
- sage11: "hsl(155, 3.0%, 43.0%)",
43
- sage12: "hsl(155, 24.0%, 9.0%)",
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.0%, 8.4%)",
48
- sage2: "hsl(150, 7.4%, 10.6%)",
49
- sage3: "hsl(150, 6.7%, 13.1%)",
50
- sage4: "hsl(150, 6.4%, 15.3%)",
51
- sage5: "hsl(150, 6.1%, 17.4%)",
52
- sage6: "hsl(150, 5.8%, 19.9%)",
53
- sage7: "hsl(150, 5.5%, 23.6%)",
54
- sage8: "hsl(150, 5.1%, 30.6%)",
55
- sage9: "hsl(155, 6.0%, 42.5%)",
56
- sage10: "hsl(153, 4.8%, 48.2%)",
57
- sage11: "hsl(155, 5.0%, 61.8%)",
58
- sage12: "hsl(155, 6.0%, 93.0%)",
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.0%, 98.8%)",
63
- teal2: "hsl(169, 64.7%, 96.7%)",
64
- teal3: "hsl(169, 59.8%, 94.0%)",
65
- teal4: "hsl(169, 53.1%, 90.2%)",
66
- teal5: "hsl(170, 47.1%, 85.0%)",
67
- teal6: "hsl(170, 42.6%, 77.9%)",
68
- teal7: "hsl(170, 39.9%, 68.1%)",
69
- teal8: "hsl(172, 42.1%, 52.5%)",
70
- teal9: "hsl(173, 80.0%, 36.0%)",
71
- teal10: "hsl(173, 83.4%, 32.5%)",
72
- teal11: "hsl(174, 90.0%, 25.2%)",
73
- teal12: "hsl(170, 50.0%, 12.5%)",
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.0%, 6.5%)",
78
- teal2: "hsl(169, 77.8%, 7.1%)",
79
- teal3: "hsl(170, 76.1%, 9.2%)",
80
- teal4: "hsl(171, 75.8%, 11.0%)",
81
- teal5: "hsl(171, 75.7%, 12.8%)",
82
- teal6: "hsl(172, 75.8%, 15.1%)",
83
- teal7: "hsl(172, 76.7%, 18.6%)",
84
- teal8: "hsl(173, 80.2%, 23.7%)",
85
- teal9: "hsl(173, 80.0%, 36.0%)",
86
- teal10: "hsl(174, 83.9%, 38.2%)",
87
- teal11: "hsl(174, 90.0%, 40.7%)",
88
- teal12: "hsl(166, 73.0%, 93.1%)",
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.0%, 99.4%)",
93
- indigo2: "hsl(223, 100%, 98.6%)",
94
- indigo3: "hsl(223, 98.4%, 97.1%)",
95
- indigo4: "hsl(223, 92.9%, 95.0%)",
96
- indigo5: "hsl(224, 87.1%, 92.0%)",
97
- indigo6: "hsl(224, 81.9%, 87.8%)",
98
- indigo7: "hsl(225, 77.4%, 82.1%)",
99
- indigo8: "hsl(226, 75.4%, 74.5%)",
100
- indigo9: "hsl(226, 70.0%, 55.5%)",
101
- indigo10: "hsl(226, 58.6%, 51.3%)",
102
- indigo11: "hsl(226, 55.0%, 45.0%)",
103
- indigo12: "hsl(226, 62.0%, 17.0%)",
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.0%, 10.0%)",
108
- indigo2: "hsl(230, 36.4%, 12.9%)",
109
- indigo3: "hsl(228, 43.3%, 17.5%)",
110
- indigo4: "hsl(227, 47.2%, 21.0%)",
111
- indigo5: "hsl(227, 50.0%, 24.1%)",
112
- indigo6: "hsl(226, 52.9%, 28.2%)",
113
- indigo7: "hsl(226, 56.0%, 34.5%)",
114
- indigo8: "hsl(226, 58.2%, 44.1%)",
115
- indigo9: "hsl(226, 70.0%, 55.5%)",
116
- indigo10: "hsl(227, 75.2%, 61.6%)",
117
- indigo11: "hsl(228, 100%, 75.9%)",
118
- indigo12: "hsl(226, 83.0%, 96.3%)",
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.4%)",
123
- red2: "hsl(359, 100%, 98.6%)",
124
- red3: "hsl(360, 100%, 96.8%)",
125
- red4: "hsl(360, 97.9%, 94.8%)",
126
- red5: "hsl(360, 90.2%, 91.9%)",
127
- red6: "hsl(360, 81.7%, 87.8%)",
128
- red7: "hsl(359, 74.2%, 81.7%)",
129
- red8: "hsl(359, 69.5%, 74.3%)",
130
- red9: "hsl(358, 75.0%, 59.0%)",
131
- red10: "hsl(358, 69.4%, 55.2%)",
132
- red11: "hsl(358, 65.0%, 48.7%)",
133
- red12: "hsl(354, 50.0%, 14.6%)",
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.0%, 9.8%)",
138
- red2: "hsl(357, 34.4%, 12.0%)",
139
- red3: "hsl(356, 43.4%, 16.4%)",
140
- red4: "hsl(356, 47.6%, 19.2%)",
141
- red5: "hsl(356, 51.1%, 21.9%)",
142
- red6: "hsl(356, 55.2%, 25.9%)",
143
- red7: "hsl(357, 60.2%, 31.8%)",
144
- red8: "hsl(358, 65.0%, 40.4%)",
145
- red9: "hsl(358, 75.0%, 59.0%)",
146
- red10: "hsl(358, 85.3%, 64.0%)",
147
- red11: "hsl(358, 100%, 69.5%)",
148
- red12: "hsl(351, 89.0%, 96.0%)",
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.2%)",
153
- blue2: "hsl(210, 100%, 98.0%)",
154
- blue3: "hsl(209, 100%, 96.5%)",
155
- blue4: "hsl(210, 98.8%, 94.0%)",
156
- blue5: "hsl(209, 95.0%, 90.1%)",
157
- blue6: "hsl(209, 81.2%, 84.5%)",
158
- blue7: "hsl(208, 77.5%, 76.9%)",
159
- blue8: "hsl(206, 81.9%, 65.3%)",
160
- blue9: "hsl(206, 100%, 50.0%)",
161
- blue10: "hsl(208, 100%, 47.3%)",
162
- blue11: "hsl(211, 100%, 43.2%)",
163
- blue12: "hsl(211, 100%, 15.0%)",
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.0%, 9.2%)",
168
- blue2: "hsl(216, 50.0%, 11.8%)",
169
- blue3: "hsl(214, 59.4%, 15.3%)",
170
- blue4: "hsl(214, 65.8%, 17.9%)",
171
- blue5: "hsl(213, 71.2%, 20.2%)",
172
- blue6: "hsl(212, 77.4%, 23.1%)",
173
- blue7: "hsl(211, 85.1%, 27.4%)",
174
- blue8: "hsl(211, 89.7%, 34.1%)",
175
- blue9: "hsl(206, 100%, 50.0%)",
176
- blue10: "hsl(209, 100%, 60.6%)",
177
- blue11: "hsl(210, 100%, 66.1%)",
178
- blue12: "hsl(206, 98.0%, 95.8%)",
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.0%, 98.5%)",
183
- yellow2: "hsl(52, 100%, 95.5%)",
184
- yellow3: "hsl(55, 100%, 90.9%)",
185
- yellow4: "hsl(54, 100%, 86.6%)",
186
- yellow5: "hsl(52, 97.9%, 82.0%)",
187
- yellow6: "hsl(50, 89.4%, 76.1%)",
188
- yellow7: "hsl(47, 80.4%, 68.0%)",
189
- yellow8: "hsl(48, 100%, 46.1%)",
190
- yellow9: "hsl(53, 92.0%, 50.0%)",
191
- yellow10: "hsl(50, 100%, 48.5%)",
192
- yellow11: "hsl(42, 100%, 29.0%)",
193
- yellow12: "hsl(40, 55.0%, 13.5%)",
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.5%)",
198
- yellow2: "hsl(46, 100%, 6.7%)",
199
- yellow3: "hsl(45, 100%, 8.7%)",
200
- yellow4: "hsl(45, 100%, 10.4%)",
201
- yellow5: "hsl(47, 100%, 12.1%)",
202
- yellow6: "hsl(49, 100%, 14.3%)",
203
- yellow7: "hsl(49, 90.3%, 18.4%)",
204
- yellow8: "hsl(50, 100%, 22.0%)",
205
- yellow9: "hsl(53, 92.0%, 50.0%)",
206
- yellow10: "hsl(54, 100%, 68.0%)",
207
- yellow11: "hsl(48, 100%, 47.0%)",
208
- yellow12: "hsl(53, 100%, 91.0%)",
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.012)",
214
- blackA2: "hsla(0, 0%, 0%, 0.027)",
215
- blackA3: "hsla(0, 0%, 0%, 0.047)",
216
- blackA4: "hsla(0, 0%, 0%, 0.071)",
217
- blackA5: "hsla(0, 0%, 0%, 0.090)",
218
- blackA6: "hsla(0, 0%, 0%, 0.114)",
219
- blackA7: "hsla(0, 0%, 0%, 0.141)",
220
- blackA8: "hsla(0, 0%, 0%, 0.220)",
221
- blackA9: "hsla(0, 0%, 0%, 0.439)",
222
- blackA10: "hsla(0, 0%, 0%, 0.478)",
223
- blackA11: "hsla(0, 0%, 0%, 0.565)",
224
- blackA12: "hsla(0, 0%, 0%, 0.910)",
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.013)",
231
- whiteA3: "hsla(0, 0%, 100%, 0.034)",
232
- whiteA4: "hsla(0, 0%, 100%, 0.056)",
233
- whiteA5: "hsla(0, 0%, 100%, 0.086)",
234
- whiteA6: "hsla(0, 0%, 100%, 0.124)",
235
- whiteA7: "hsla(0, 0%, 100%, 0.176)",
236
- whiteA8: "hsla(0, 0%, 100%, 0.249)",
237
- whiteA9: "hsla(0, 0%, 100%, 0.386)",
238
- whiteA10: "hsla(0, 0%, 100%, 0.446)",
239
- whiteA11: "hsla(0, 0%, 100%, 0.592)",
240
- whiteA12: "hsla(0, 0%, 100%, 0.923)",
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 {useCallback, ReactNode} from "react";
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 {OptionProps, DropdownIndicatorProps, ClearIndicatorProps, MultiValueRemoveProps, GroupBase} from "react-select";
6
- import {Button} from "../Button";
7
- import {themeVars, space} from "../designSystem";
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 {expanderStyle, expanderExpandedStyle} from "./styles";
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
+ );