@intility/bifrost-react-select 4.0.0-beta.8 → 4.0.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 CHANGED
@@ -1,134 +1,17 @@
1
1
  # @intility/bifrost-react-select
2
2
 
3
- ## 4.0.0-beta.8
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [3849abc3]
8
- - @intility/bifrost-react@4.0.0-beta.7
9
-
10
- ## 4.0.0-beta.7
11
-
12
- ### Patch Changes
13
-
14
- - Updated dependencies [82ab21b5]
15
- - Updated dependencies [81af701b]
16
- - @intility/bifrost-react@4.0.0-beta.6
17
-
18
- ## 4.0.0-beta.6
3
+ ## 4.0.0 (first release)
19
4
 
20
5
  ### Minor Changes
21
6
 
7
+ - 62b02461: Include JSDoc comments in typescript definition output
22
8
  - 6b355639: New styling for inputs, now always outlined. Removed `variant` prop from `<Input>`.
23
9
 
24
10
  ### Patch Changes
25
11
 
26
- - Updated dependencies [6b355639]
27
- - Updated dependencies [6b355639]
28
- - @intility/bifrost-react@4.0.0-beta.5
29
-
30
- ## 4.0.0-beta.5
31
-
32
- ### Patch Changes
33
-
34
- - e410a910: New base color values for light mode #711
35
- - Updated dependencies [e410a910]
36
- - @intility/bifrost-react@4.0.0-beta.4
37
-
38
- ## 4.0.0-beta.4
39
-
40
- ### Patch Changes
41
-
12
+ - 217c8741: Named export for Select and DatePicker
42
13
  - a903f282: fix: export typescript types used in react components
43
- - Updated dependencies [a903f282]
44
- - Updated dependencies [19500ce7]
45
- - Updated dependencies [8263586d]
46
- - @intility/bifrost-react@4.0.0-beta.3
47
-
48
- ## 4.0.0-beta.3
49
-
50
- ### Patch Changes
51
-
52
- - Updated dependencies [b60c063d]
53
- - @intility/bifrost-react@4.0.0-beta.2
54
-
55
- ## 4.0.0-beta.2
56
-
57
- ### Major Changes
58
-
59
- - 608d2083: update module output
60
-
61
- ### Patch Changes
62
-
14
+ - e410a910: New base color values for light mode #711
15
+ - ea861dbc: Update lint config, add displayName for components
63
16
  - 165904af: use deep imports from @intility/bifrost-react
64
- - Updated dependencies [165904af]
65
- - Updated dependencies [608d2083]
66
- - @intility/bifrost-react@4.0.0-beta.1
67
-
68
- ## 4.0.0-beta.1
69
-
70
- ### Patch Changes
71
-
72
- - 217c8741: Named export for Select and DatePicker
73
-
74
- ## 4.0.0-beta.0
75
-
76
- ### Major Changes
77
-
78
- - 5c7ba5a4: split react-select and react-datepicker
79
-
80
- ### Patch Changes
81
-
82
- - Updated dependencies [3785f8d6]
83
- - Updated dependencies [5c7ba5a4]
84
- - Updated dependencies [5cb3ebac]
85
- - Updated dependencies [d8bd3f72]
86
- - Updated dependencies [df1f169d]
87
- - Updated dependencies [727894c3]
88
- - @intility/bifrost-react@4.0.0-beta.0
89
-
90
- ## 4.0.0-alpha.8
91
-
92
- ### Patch Changes
93
-
94
- - Updated dependencies
95
- - @intility/bifrost-react@4.0.0-alpha.8
96
-
97
- ## 4.0.0-alpha.7
98
-
99
- ### Patch Changes
100
-
101
- - Updated dependencies
102
- - @intility/bifrost-react@4.0.0-alpha.7
103
-
104
- ## 4.0.0-alpha.6
105
-
106
- ### Patch Changes
107
-
108
- - Updated dependencies
109
- - @intility/bifrost-react@4.0.0-alpha.6
110
-
111
- ## 4.0.0-alpha.5
112
-
113
- ### Patch Changes
114
-
115
- - Updated dependencies
116
- - @intility/bifrost-react@4.0.0-alpha.5
117
-
118
- ## 4.0.0-alpha.4
119
-
120
- ### Patch Changes
121
-
122
- - Updated dependencies
123
- - @intility/bifrost-react@4.0.0-alpha.4
124
-
125
- ## 4.0.0-alpha.3
126
-
127
- ### Major Changes
128
-
129
- - 5c7ba5a4: split react-select and react-datepicker
130
-
131
- ### Patch Changes
132
-
133
- - Updated dependencies [5c7ba5a4]
134
- - @intility/bifrost-react@4.0.0-alpha.3
17
+ - fdc6caee: fix: select dropdown background should no longer bleed outside border radius when opened
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
@@ -74,7 +74,7 @@ export const selectStyles = {
74
74
  }),
75
75
  menu: (provided)=>({
76
76
  ...provided,
77
- backgroundColor: "var(--bfc-base-3)",
77
+ backgroundColor: "transparent",
78
78
  boxShadow: "none",
79
79
  borderRadius: "none",
80
80
  marginTop: 0,
@@ -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.8",
3
+ "version": "4.0.0",
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.7",
44
+ "@intility/bifrost-react": "4.0.0",
44
45
  "classnames": "^2.2.6",
45
46
  "react-select": "^5.7.7"
46
47
  }
package/src/Select.tsx CHANGED
@@ -111,7 +111,7 @@ export const selectStyles = {
111
111
  }),
112
112
  menu: (provided) => ({
113
113
  ...provided,
114
- backgroundColor: "var(--bfc-base-3)",
114
+ backgroundColor: "transparent",
115
115
  boxShadow: "none",
116
116
  borderRadius: "none",
117
117
  marginTop: 0,
@@ -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
  {