@intility/bifrost-react-select 4.2.4 → 4.3.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 CHANGED
@@ -1,19 +1,41 @@
1
1
  # @intility/bifrost-react-select
2
2
 
3
- ## 4.2.4
3
+ ## 4.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 9ac0d65: allow react 17 as a peer dep
8
+
9
+ ## 4.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 2703b98: Add support for `small` variants for most form field inputs, to match existing `small` button styling.
14
+
15
+ - `<Input>`
16
+ - `<DatePicker>`
17
+ - `<FieldGroup.Item>`
18
+ - `<Select>`
19
+
20
+ ### Patch Changes
21
+
22
+ - f70f414: Use `theme` color for selected checkbox with multi-select
23
+ - c2dfb58: Added translation text for select loading state
24
+
25
+ ## 4.2.4 - 2024-08-07
4
26
 
5
27
  ### Patch Changes
6
28
 
7
29
  - 2308f1a: Update multi-select checkboxes to more closely match bifrost checkbox styling.
8
30
 
9
- ## 4.2.3
31
+ ## 4.2.3 - 2024-08-06
10
32
 
11
33
  ### Patch Changes
12
34
 
13
35
  - 633e7b2: chore: avoid internal barrel file imports
14
36
  - 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
37
 
16
- ## 4.2.2
38
+ ## 4.2.2 - 2024-07-30
17
39
 
18
40
  ### Patch Changes
19
41
 
@@ -24,31 +46,31 @@
24
46
 
25
47
  - 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
48
 
27
- ## 4.2.1
49
+ ## 4.2.1 - 2024-06-21
28
50
 
29
51
  ### Patch Changes
30
52
 
31
53
  - ba934052: Change option hover background to bfc-base-1
32
54
 
33
- ## 4.2.0
55
+ ## 4.2.0 - 2024-06-13
34
56
 
35
57
  ### Minor Changes
36
58
 
37
59
  - 833a15e4: Fix: update Select styling to allow `menuPlacement="top"` and more closely match DatePicker #754
38
60
 
39
- ## 4.1.0
61
+ ## 4.1.0 - 2024-05-31
40
62
 
41
63
  ### Minor Changes
42
64
 
43
65
  - ab69807d: Styling changes for Select input #740
44
66
 
45
- ## 4.0.3
67
+ ## 4.0.3 - 2024-05-16
46
68
 
47
69
  ### Patch Changes
48
70
 
49
71
  - 3db0503a: Fix: `selectComponents` properties should now correcly be non-null
50
72
 
51
- ## 4.0.2
73
+ ## 4.0.2 - 2024-04-10
52
74
 
53
75
  ### Patch Changes
54
76
 
@@ -56,7 +78,7 @@
56
78
  - Updated dependencies [79b9ab5d]
57
79
  - @intility/bifrost-react@4.0.2
58
80
 
59
- ## 4.0.1
81
+ ## 4.0.1 - 2024-04-05
60
82
 
61
83
  ### Patch Changes
62
84
 
@@ -65,7 +87,7 @@
65
87
  - Updated dependencies [611f82ca]
66
88
  - @intility/bifrost-react@4.0.1
67
89
 
68
- ## 4.0.0 (first release)
90
+ ## 4.0.0 - 2024-04-03 (first release, previously part of @intility/bifrost-react)
69
91
 
70
92
  ### Minor Changes
71
93
 
package/dist/Select.d.ts CHANGED
@@ -49,6 +49,8 @@ export type SelectProps = {
49
49
  style?: CSSProperties;
50
50
  /** Displays a loading spinner */
51
51
  loading?: boolean;
52
+ /** Decrease height of the input from `40px` to `32px` */
53
+ small?: boolean;
52
54
  };
53
55
  export type SelectType = {
54
56
  <OptionType = {
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: "var(--bfs40)",
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 var(--bfs4) 0px 0px"
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: "var(--bfs8)"
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: "2px 4px 2px 8px",
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-base-c)" : "var(--bfc-base-c-2)"
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.2.4",
3
+ "version": "4.3.1",
4
4
  "description": "React select component for Intility's design system, Bifrost.",
5
5
  "type": "module",
6
6
  "main": "dist/Select.js",
@@ -34,12 +34,12 @@
34
34
  "access": "public"
35
35
  },
36
36
  "peerDependencies": {
37
- "react-dom": ">=18.0.0",
38
- "react": ">=18.0.0",
39
- "@intility/bifrost-react": "^4.0.2"
37
+ "react-dom": ">=17.0.0",
38
+ "react": ">=17.0.0",
39
+ "@intility/bifrost-react": "^4.13.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@intility/bifrost-react": "^4.7.4"
42
+ "@intility/bifrost-react": "^4.14.1"
43
43
  },
44
44
  "dependencies": {
45
45
  "@fortawesome/fontawesome-svg-core": "^6.4.2",