@intility/bifrost-react-select 4.2.4 → 4.3.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/CHANGELOG.md +26 -10
- package/dist/Select.d.ts +2 -0
- package/dist/Select.js +11 -7
- package/dist/overrides/CustomOption.internal.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
# @intility/bifrost-react-select
|
|
2
2
|
|
|
3
|
-
## 4.
|
|
3
|
+
## 4.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2703b98: Add support for `small` variants for most form field inputs, to match existing `small` button styling.
|
|
8
|
+
|
|
9
|
+
- `<Input>`
|
|
10
|
+
- `<DatePicker>`
|
|
11
|
+
- `<FieldGroup.Item>`
|
|
12
|
+
- `<Select>`
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- f70f414: Use `theme` color for selected checkbox with multi-select
|
|
17
|
+
- c2dfb58: Added translation text for select loading state
|
|
18
|
+
|
|
19
|
+
## 4.2.4 - 2024-08-07
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
7
23
|
- 2308f1a: Update multi-select checkboxes to more closely match bifrost checkbox styling.
|
|
8
24
|
|
|
9
|
-
## 4.2.3
|
|
25
|
+
## 4.2.3 - 2024-08-06
|
|
10
26
|
|
|
11
27
|
### Patch Changes
|
|
12
28
|
|
|
13
29
|
- 633e7b2: chore: avoid internal barrel file imports
|
|
14
30
|
- 899927b: Fix: form field height should follow browser font-size setting. Use `rem` over `px` for height-related units for form fields (input, button, select, datepicker).
|
|
15
31
|
|
|
16
|
-
## 4.2.2
|
|
32
|
+
## 4.2.2 - 2024-07-30
|
|
17
33
|
|
|
18
34
|
### Patch Changes
|
|
19
35
|
|
|
@@ -24,31 +40,31 @@
|
|
|
24
40
|
|
|
25
41
|
- 7b2eacc: Fix: Apparently, Chrome has changed its `<input autocomplete>` behaviour and now appears to only respect `autoComplete="off"`, so lets try that and pray to the browser gods that this will satisfy all of them for the forseeable future. #758
|
|
26
42
|
|
|
27
|
-
## 4.2.1
|
|
43
|
+
## 4.2.1 - 2024-06-21
|
|
28
44
|
|
|
29
45
|
### Patch Changes
|
|
30
46
|
|
|
31
47
|
- ba934052: Change option hover background to bfc-base-1
|
|
32
48
|
|
|
33
|
-
## 4.2.0
|
|
49
|
+
## 4.2.0 - 2024-06-13
|
|
34
50
|
|
|
35
51
|
### Minor Changes
|
|
36
52
|
|
|
37
53
|
- 833a15e4: Fix: update Select styling to allow `menuPlacement="top"` and more closely match DatePicker #754
|
|
38
54
|
|
|
39
|
-
## 4.1.0
|
|
55
|
+
## 4.1.0 - 2024-05-31
|
|
40
56
|
|
|
41
57
|
### Minor Changes
|
|
42
58
|
|
|
43
59
|
- ab69807d: Styling changes for Select input #740
|
|
44
60
|
|
|
45
|
-
## 4.0.3
|
|
61
|
+
## 4.0.3 - 2024-05-16
|
|
46
62
|
|
|
47
63
|
### Patch Changes
|
|
48
64
|
|
|
49
65
|
- 3db0503a: Fix: `selectComponents` properties should now correcly be non-null
|
|
50
66
|
|
|
51
|
-
## 4.0.2
|
|
67
|
+
## 4.0.2 - 2024-04-10
|
|
52
68
|
|
|
53
69
|
### Patch Changes
|
|
54
70
|
|
|
@@ -56,7 +72,7 @@
|
|
|
56
72
|
- Updated dependencies [79b9ab5d]
|
|
57
73
|
- @intility/bifrost-react@4.0.2
|
|
58
74
|
|
|
59
|
-
## 4.0.1
|
|
75
|
+
## 4.0.1 - 2024-04-05
|
|
60
76
|
|
|
61
77
|
### Patch Changes
|
|
62
78
|
|
|
@@ -65,7 +81,7 @@
|
|
|
65
81
|
- Updated dependencies [611f82ca]
|
|
66
82
|
- @intility/bifrost-react@4.0.1
|
|
67
83
|
|
|
68
|
-
## 4.0.0 (first release)
|
|
84
|
+
## 4.0.0 - 2024-04-03 (first release, previously part of @intility/bifrost-react)
|
|
69
85
|
|
|
70
86
|
### Minor Changes
|
|
71
87
|
|
package/dist/Select.d.ts
CHANGED
package/dist/Select.js
CHANGED
|
@@ -10,6 +10,7 @@ import Description from "@intility/bifrost-react/Description";
|
|
|
10
10
|
import Feedback from "@intility/bifrost-react/Feedback";
|
|
11
11
|
import Label from "@intility/bifrost-react/Label";
|
|
12
12
|
import useUniqueId from "@intility/bifrost-react/hooks/useUniqueId";
|
|
13
|
+
import useLocale from "@intility/bifrost-react/hooks/useLocale";
|
|
13
14
|
import DropdownIndicator from "./overrides/DropdownIndicator.internal.js";
|
|
14
15
|
import CustomInput from "./overrides/CustomInput.internal.js";
|
|
15
16
|
import CustomMenuList from "./overrides/CustomMenuList.internal.js";
|
|
@@ -39,7 +40,7 @@ export const selectStyles = {
|
|
|
39
40
|
borderColor: state.isFocused ? "var(--bfc-base-c-inverted)" : state.isDisabled ? "transparent" : "var(--bfc-base-c-wcag)",
|
|
40
41
|
boxShadow: state.isFocused ? "inset 0 0 0 1px var(--bfc-base-c-inverted)" : "none",
|
|
41
42
|
borderRadius: "var(--bf-radius-s)",
|
|
42
|
-
minHeight:
|
|
43
|
+
minHeight: undefined,
|
|
43
44
|
cursor: "text"
|
|
44
45
|
}),
|
|
45
46
|
indicatorSeparator: ()=>({
|
|
@@ -47,8 +48,7 @@ export const selectStyles = {
|
|
|
47
48
|
}),
|
|
48
49
|
indicatorsContainer: (provided)=>({
|
|
49
50
|
...provided,
|
|
50
|
-
alignItems: "flex-start"
|
|
51
|
-
padding: "0.46875rem 0"
|
|
51
|
+
alignItems: "flex-start"
|
|
52
52
|
}),
|
|
53
53
|
clearIndicator: (provided)=>({
|
|
54
54
|
...provided,
|
|
@@ -58,14 +58,14 @@ export const selectStyles = {
|
|
|
58
58
|
color: "var(--bfc-base-c-2)",
|
|
59
59
|
cursor: "pointer",
|
|
60
60
|
padding: "var(--bfs4)",
|
|
61
|
-
margin: "1px
|
|
61
|
+
margin: "1px 4px 0px 0px"
|
|
62
62
|
}),
|
|
63
63
|
dropdownIndicator: (provided, state)=>({
|
|
64
64
|
...provided,
|
|
65
65
|
color: state.isFocused ? "var(--bfc-base-c)" : "var(--bfc-base-c-2)",
|
|
66
66
|
cursor: "pointer",
|
|
67
67
|
padding: "var(--bfs4)",
|
|
68
|
-
marginRight:
|
|
68
|
+
marginRight: 8
|
|
69
69
|
}),
|
|
70
70
|
input: (provided)=>({
|
|
71
71
|
...provided,
|
|
@@ -132,7 +132,7 @@ export const selectStyles = {
|
|
|
132
132
|
multiValueLabel: (provided)=>({
|
|
133
133
|
...provided,
|
|
134
134
|
fontSize: "var(--bf-font-size-m)",
|
|
135
|
-
padding: "
|
|
135
|
+
padding: "1.5px 4px 1.5px 8px",
|
|
136
136
|
color: "inherit"
|
|
137
137
|
}),
|
|
138
138
|
multiValueRemove: (provided, state)=>({
|
|
@@ -186,8 +186,9 @@ const selectStates = [
|
|
|
186
186
|
*/ const SelectHOC = (Selector)=>{
|
|
187
187
|
// @ts-ignore
|
|
188
188
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/display-name
|
|
189
|
-
const GeneratedSelect = /*#__PURE__*/ forwardRef(({ label, hideLabel = false, isDisabled = false, state, feedback, required = false, description, requiredNoLabel = false, optional = false, inputId, className, style, loading = false, components, ...props }, ref)=>{
|
|
189
|
+
const GeneratedSelect = /*#__PURE__*/ forwardRef(({ label, hideLabel = false, isDisabled = false, state, feedback, required = false, description, requiredNoLabel = false, optional = false, inputId, className, style, loading = false, components, small = false, ...props }, ref)=>{
|
|
190
190
|
const selectId = useUniqueId(inputId);
|
|
191
|
+
const locale = useLocale();
|
|
191
192
|
return /*#__PURE__*/ _jsxs("div", {
|
|
192
193
|
className: classNames(className, {
|
|
193
194
|
"bf-select-container": true
|
|
@@ -195,6 +196,8 @@ const selectStates = [
|
|
|
195
196
|
"bf-select-disabled": isDisabled
|
|
196
197
|
}, {
|
|
197
198
|
"bf-select-alert": !isDisabled && state === "alert"
|
|
199
|
+
}, {
|
|
200
|
+
"bf-select-small": small
|
|
198
201
|
}),
|
|
199
202
|
style: style,
|
|
200
203
|
"data-testid": "bf-select-container",
|
|
@@ -225,6 +228,7 @@ const selectStates = [
|
|
|
225
228
|
hideSelectedOptions: false,
|
|
226
229
|
closeMenuOnSelect: props.isMulti ? false : true,
|
|
227
230
|
isLoading: loading ?? props.isLoading,
|
|
231
|
+
loadingMessage: ()=>locale.loading + "...",
|
|
228
232
|
...props
|
|
229
233
|
}),
|
|
230
234
|
/*#__PURE__*/ _jsx(Feedback, {
|
|
@@ -13,7 +13,7 @@ const CustomOption = (props)=>{
|
|
|
13
13
|
icon: props.isSelected ? faCheckSquare : faSquare,
|
|
14
14
|
fixedWidth: true,
|
|
15
15
|
marginRight: true,
|
|
16
|
-
color: props.isSelected ? "var(--bfc-
|
|
16
|
+
color: props.isSelected ? "var(--bfc-theme)" : "var(--bfc-base-c-2)"
|
|
17
17
|
})
|
|
18
18
|
}),
|
|
19
19
|
props.children,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intility/bifrost-react-select",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "React select component for Intility's design system, Bifrost.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/Select.js",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react-dom": ">=18.0.0",
|
|
38
38
|
"react": ">=18.0.0",
|
|
39
|
-
"@intility/bifrost-react": "^4.0
|
|
39
|
+
"@intility/bifrost-react": "^4.13.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@intility/bifrost-react": "^4.
|
|
42
|
+
"@intility/bifrost-react": "^4.13.0"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|