@intility/bifrost-react-select 5.2.2 → 6.0.1
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 +23 -0
- package/dist/Select.d.ts +10 -0
- package/dist/Select.js +10 -2
- package/dist/overrides/ClearIndicator.internal.js +1 -0
- package/dist/overrides/CustomOption.internal.js +0 -2
- package/dist/overrides/DropdownIndicator.internal.js +1 -0
- package/dist/overrides/LoadingIndicator.internal.js +0 -1
- package/package.json +7 -8
- package/dist/overrides/CustomInput.internal.d.ts +0 -2
- package/dist/overrides/CustomInput.internal.js +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @intility/bifrost-react-select
|
|
2
2
|
|
|
3
|
+
## 6.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 01a6406: Update `@fortawesome/*-icons` dependencies to `^7.0.1`
|
|
8
|
+
|
|
9
|
+
## 6.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 5de0e05: Update `peerDependencies` to explicit major versions:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
@intility/bifrost-react: ^6
|
|
17
|
+
react: ^17 || ^18 || ^19
|
|
18
|
+
react-dom: ^17 || ^18 || ^19
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- 5de0e05: Updated Font Awesome dependencies from `^6.4.2` to `^7.0.0`.
|
|
22
|
+
- If you have trouble installing, try deleting your `node_modules` and
|
|
23
|
+
`package-lock.json`.
|
|
24
|
+
- 5de0e05: No longer override internal Input for Select (apparently does nothing) - could potentially break something?
|
|
25
|
+
|
|
3
26
|
## 5.2.2
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/Select.d.ts
CHANGED
|
@@ -59,6 +59,16 @@ export type SelectType = {
|
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
61
|
* Select component - dropdown list
|
|
62
|
+
*
|
|
63
|
+
* @see https://bifrost.intility.com/react/select
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* <Select
|
|
67
|
+
* label="Select a country"
|
|
68
|
+
* options={countries} // [{ value: countryData, label: "Norway" }, ...]
|
|
69
|
+
* value={selected}
|
|
70
|
+
* onChange={(item) => setSelected(item)}
|
|
71
|
+
* />
|
|
62
72
|
*/
|
|
63
73
|
export declare const Select: SelectType;
|
|
64
74
|
export type AsyncType = {
|
package/dist/Select.js
CHANGED
|
@@ -12,7 +12,6 @@ import Label from "@intility/bifrost-react/Label";
|
|
|
12
12
|
import useUniqueId from "@intility/bifrost-react/hooks/useUniqueId";
|
|
13
13
|
import useLocale from "@intility/bifrost-react/hooks/useLocale";
|
|
14
14
|
import DropdownIndicator from "./overrides/DropdownIndicator.internal.js";
|
|
15
|
-
import CustomInput from "./overrides/CustomInput.internal.js";
|
|
16
15
|
import CustomMenuList from "./overrides/CustomMenuList.internal.js";
|
|
17
16
|
import ClearIndicator from "./overrides/ClearIndicator.internal.js";
|
|
18
17
|
import CustomOption from "./overrides/CustomOption.internal.js";
|
|
@@ -206,7 +205,6 @@ export const selectStyles = {
|
|
|
206
205
|
export const selectComponents = {
|
|
207
206
|
...originalComponents,
|
|
208
207
|
DropdownIndicator,
|
|
209
|
-
Input: CustomInput,
|
|
210
208
|
MenuList: CustomMenuList,
|
|
211
209
|
// @ts-ignore
|
|
212
210
|
Menu,
|
|
@@ -281,6 +279,16 @@ export const selectComponents = {
|
|
|
281
279
|
};
|
|
282
280
|
/**
|
|
283
281
|
* Select component - dropdown list
|
|
282
|
+
*
|
|
283
|
+
* @see https://bifrost.intility.com/react/select
|
|
284
|
+
*
|
|
285
|
+
* @example
|
|
286
|
+
* <Select
|
|
287
|
+
* label="Select a country"
|
|
288
|
+
* options={countries} // [{ value: countryData, label: "Norway" }, ...]
|
|
289
|
+
* value={selected}
|
|
290
|
+
* onChange={(item) => setSelected(item)}
|
|
291
|
+
* />
|
|
284
292
|
*/ export const Select = SelectHOC(ReactSelect);
|
|
285
293
|
Select.displayName = "Select";
|
|
286
294
|
const AsyncSelect = SelectHOC(AsyncReactSelect);
|
|
@@ -11,7 +11,6 @@ const CustomOption = (props)=>{
|
|
|
11
11
|
props.isMulti && /*#__PURE__*/ _jsx("div", {
|
|
12
12
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
13
13
|
icon: props.isSelected ? faCheckSquare : faSquare,
|
|
14
|
-
fixedWidth: true,
|
|
15
14
|
marginRight: true,
|
|
16
15
|
color: props.isSelected ? "var(--bfc-theme)" : "var(--bfc-base-c-2)"
|
|
17
16
|
})
|
|
@@ -20,7 +19,6 @@ const CustomOption = (props)=>{
|
|
|
20
19
|
!props.isMulti && props.isSelected && /*#__PURE__*/ _jsx("div", {
|
|
21
20
|
children: /*#__PURE__*/ _jsx(Icon, {
|
|
22
21
|
icon: faCheck,
|
|
23
|
-
fixedWidth: true,
|
|
24
22
|
className: "bf-select-selected-icon"
|
|
25
23
|
})
|
|
26
24
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intility/bifrost-react-select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "React select component for Intility's design system, Bifrost.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/Select.js",
|
|
@@ -39,17 +39,16 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@intility/bifrost-react": "
|
|
43
|
-
"react": "
|
|
44
|
-
"react-dom": "
|
|
42
|
+
"@intility/bifrost-react": "^6",
|
|
43
|
+
"react": "^17 || ^18 || ^19",
|
|
44
|
+
"react-dom": "^17 || ^18 || ^19"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@intility/bifrost-react": "^
|
|
47
|
+
"@intility/bifrost-react": "^6.3.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fortawesome/fontawesome-svg-core": "^
|
|
51
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
52
|
-
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
50
|
+
"@fortawesome/fontawesome-svg-core": "^7.0.1",
|
|
51
|
+
"@fortawesome/free-solid-svg-icons": "^7.0.1",
|
|
53
52
|
"classnames": "^2.2.6",
|
|
54
53
|
"react-select": "^5.10.2"
|
|
55
54
|
},
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { components } from "react-select";
|
|
3
|
-
const CustomInput = (props)=>{
|
|
4
|
-
const { required, value } = props.selectProps;
|
|
5
|
-
const updatedProps = {
|
|
6
|
-
...props,
|
|
7
|
-
autoComplete: "off"
|
|
8
|
-
};
|
|
9
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
10
|
-
children: [
|
|
11
|
-
/*#__PURE__*/ _jsx(components.Input, {
|
|
12
|
-
...updatedProps
|
|
13
|
-
}),
|
|
14
|
-
/*#__PURE__*/ _jsx("input", {
|
|
15
|
-
style: {
|
|
16
|
-
opacity: 0,
|
|
17
|
-
height: 0,
|
|
18
|
-
position: "absolute",
|
|
19
|
-
pointerEvents: "none"
|
|
20
|
-
},
|
|
21
|
-
onChange: (e)=>e.preventDefault(),
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
-
value: value?.label ?? "",
|
|
24
|
-
tabIndex: -1,
|
|
25
|
-
autoComplete: "off",
|
|
26
|
-
required: required,
|
|
27
|
-
"data-testid": "bf-select-input"
|
|
28
|
-
})
|
|
29
|
-
]
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
export default CustomInput;
|