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