@intility/bifrost-react-select 4.0.0-beta.10 → 4.0.0-beta.13
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 -0
- package/dist/Select.d.ts +13 -0
- package/dist/Select.js +1 -1
- package/package.json +4 -3
- package/src/Select.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @intility/bifrost-react-select
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.13
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 62b02461: Include JSDoc comments in typescript definition output
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [62b02461]
|
|
12
|
+
- @intility/bifrost-react@4.0.0-beta.12
|
|
13
|
+
|
|
14
|
+
## 4.0.0-beta.12
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [18c2b063]
|
|
19
|
+
- @intility/bifrost-react@4.0.0-beta.11
|
|
20
|
+
|
|
21
|
+
## 4.0.0-beta.11
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- ea861dbc: Update lint config, add displayName for components
|
|
26
|
+
- Updated dependencies [ea861dbc]
|
|
27
|
+
- @intility/bifrost-react@4.0.0-beta.10
|
|
28
|
+
|
|
3
29
|
## 4.0.0-beta.10
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/Select.d.ts
CHANGED
|
@@ -29,15 +29,25 @@ export declare const selectComponents: Partial<typeof components>;
|
|
|
29
29
|
declare const selectStates: readonly ["default", "alert"];
|
|
30
30
|
export type SelectState = (typeof selectStates)[number];
|
|
31
31
|
export type SelectProps = {
|
|
32
|
+
/** Required label text */
|
|
32
33
|
label: ReactNode;
|
|
34
|
+
/** Hide label text, will add label prop as aria-label for screen readers */
|
|
33
35
|
hideLabel?: boolean;
|
|
36
|
+
/** Description text to show more information */
|
|
34
37
|
description?: ReactNode;
|
|
38
|
+
/** Available states: `default` and `alert` */
|
|
35
39
|
state?: SelectState;
|
|
40
|
+
/** Feedback text below the Select component */
|
|
36
41
|
feedback?: ReactNode;
|
|
42
|
+
/** Required prop indicating mandatory field */
|
|
37
43
|
required?: boolean;
|
|
44
|
+
/** Bool to mark Select component required, but hides the required label */
|
|
38
45
|
requiredNoLabel?: boolean;
|
|
46
|
+
/** Marks Select component as optional */
|
|
39
47
|
optional?: boolean;
|
|
48
|
+
/** Inline CSS styles */
|
|
40
49
|
style?: CSSProperties;
|
|
50
|
+
/** Displays a loading spinner */
|
|
41
51
|
loading?: boolean;
|
|
42
52
|
};
|
|
43
53
|
export type SelectType = {
|
|
@@ -47,6 +57,9 @@ export type SelectType = {
|
|
|
47
57
|
}, IsMulti extends boolean = false, Group extends GroupBase<OptionType> = GroupBase<OptionType>>(props: ReactSelectProps<OptionType, IsMulti, Group> & RefAttributes<SelectInstance<OptionType, IsMulti, Group>> & SelectProps): React.ReactElement | null;
|
|
48
58
|
displayName?: string;
|
|
49
59
|
};
|
|
60
|
+
/**
|
|
61
|
+
* Select component - dropdown list
|
|
62
|
+
*/
|
|
50
63
|
export declare const Select: SelectType;
|
|
51
64
|
export type AsyncType = {
|
|
52
65
|
<OptionType = {
|
package/dist/Select.js
CHANGED
|
@@ -185,7 +185,7 @@ const selectStates = [
|
|
|
185
185
|
* Select HOC
|
|
186
186
|
*/ const SelectHOC = (Selector)=>{
|
|
187
187
|
// @ts-ignore
|
|
188
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/display-name
|
|
189
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)=>{
|
|
190
190
|
const selectId = useUniqueId(inputId);
|
|
191
191
|
return /*#__PURE__*/ _jsxs("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intility/bifrost-react-select",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.13",
|
|
4
4
|
"description": "React select component for Intility's design system, Bifrost.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/Select.js",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"start": "run-p watch:*",
|
|
12
12
|
"watch:module": "npm run build:module -- --watch",
|
|
13
13
|
"watch:types": "npm run build:types -- --watch --preserveWatchOutput",
|
|
14
|
-
"clean": "rimraf dist"
|
|
14
|
+
"clean": "rimraf dist",
|
|
15
|
+
"lint": "eslint ./src/**/*.{ts,tsx}"
|
|
15
16
|
},
|
|
16
17
|
"exports": {
|
|
17
18
|
"./package.json": "./package.json",
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
|
41
42
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
|
42
43
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
43
|
-
"@intility/bifrost-react": "4.0.0-beta.
|
|
44
|
+
"@intility/bifrost-react": "4.0.0-beta.12",
|
|
44
45
|
"classnames": "^2.2.6",
|
|
45
46
|
"react-select": "^5.7.7"
|
|
46
47
|
}
|
package/src/Select.tsx
CHANGED
|
@@ -238,7 +238,7 @@ export type SelectState = (typeof selectStates)[number];
|
|
|
238
238
|
*/
|
|
239
239
|
const SelectHOC = <Type, Selector>(Selector: Selector) => {
|
|
240
240
|
// @ts-ignore
|
|
241
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
241
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, react/display-name
|
|
242
242
|
const GeneratedSelect: Type = forwardRef<any, any>(
|
|
243
243
|
(
|
|
244
244
|
{
|