@intility/bifrost-react-select 5.0.1 → 5.0.2

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,5 +1,13 @@
1
1
  # @intility/bifrost-react-select
2
2
 
3
+ ## 5.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 775ce3c: Fix: Include styling for `small` and `state="alert"` for `<Select>` css-in-js.
8
+ (This means we can now use main bifrost-bundle.css in a layer, and selects
9
+ should still be styled correctly) #117
10
+
3
11
  ## 5.0.1
4
12
 
5
13
  ### Patch Changes
package/dist/Select.d.ts CHANGED
@@ -17,6 +17,7 @@ export declare const selectStyles: {
17
17
  menu: (provided: any) => any;
18
18
  menuList: (provided: any) => any;
19
19
  placeholder: (provided: any) => any;
20
+ valueContainer: (provided: any) => any;
20
21
  singleValue: (provided: any, state: any) => any;
21
22
  option: (provided: any, state: any) => any;
22
23
  multiValue: (provided: any, state: any) => any;
package/dist/Select.js CHANGED
@@ -34,13 +34,33 @@ export const selectStyles = {
34
34
  color: "var(--bfc-base-c)"
35
35
  }
36
36
  },
37
+ ".bf-select-small &": {
38
+ minHeight: "var(--rem32)"
39
+ },
40
+ ".bf-select-alert &": {
41
+ borderColor: state.isFocused ? "var(--bfc-base-c-inverted)" : state.isDisabled ? "transparent" : "var(--bfc-base-c-alert)"
42
+ },
43
+ ".bf-select-alert &:hover": {
44
+ borderColor: state.isFocused ? undefined : state.isDisabled ? "transparent" : "var(--bfc-alert-2)"
45
+ },
46
+ ".bf-fieldgroup &": {
47
+ borderRadius: 0
48
+ },
49
+ ".bf-fieldgroup > :first-child &": {
50
+ borderTopLeftRadius: "var(--bf-radius-s)",
51
+ borderBottomLeftRadius: "var(--bf-radius-s)"
52
+ },
53
+ ".bf-fieldgroup > :last-child &": {
54
+ borderTopRightRadius: "var(--bf-radius-s)",
55
+ borderBottomRightRadius: "var(--bf-radius-s)"
56
+ },
37
57
  backgroundColor: state.isDisabled ? "var(--bfc-base-dimmed)" : "var(--bfc-base-3)",
38
58
  borderWidth: "1px",
39
59
  borderStyle: "solid",
40
60
  borderColor: state.isFocused ? "var(--bfc-base-c-inverted)" : state.isDisabled ? "transparent" : "var(--bfc-base-c-wcag)",
41
61
  boxShadow: state.isFocused ? "inset 0 0 0 1px var(--bfc-base-c-inverted)" : "none",
42
62
  borderRadius: "var(--bf-radius-s)",
43
- minHeight: undefined,
63
+ minHeight: "var(--rem40)",
44
64
  cursor: "text"
45
65
  }),
46
66
  indicatorSeparator: ()=>({
@@ -48,6 +68,10 @@ export const selectStyles = {
48
68
  }),
49
69
  indicatorsContainer: (provided)=>({
50
70
  ...provided,
71
+ ".bf-select-small &": {
72
+ paddingBlock: "0.2187rem"
73
+ },
74
+ padding: "0.469rem 0",
51
75
  alignItems: "flex-start"
52
76
  }),
53
77
  clearIndicator: (provided)=>({
@@ -62,6 +86,9 @@ export const selectStyles = {
62
86
  }),
63
87
  dropdownIndicator: (provided, state)=>({
64
88
  ...provided,
89
+ ".bf-select-small &": {
90
+ marginRight: 4
91
+ },
65
92
  color: state.isFocused ? "var(--bfc-base-c)" : "var(--bfc-base-c-2)",
66
93
  cursor: "pointer",
67
94
  padding: "var(--bfs4)",
@@ -69,6 +96,9 @@ export const selectStyles = {
69
96
  }),
70
97
  input: (provided)=>({
71
98
  ...provided,
99
+ ".bf-select-small &": {
100
+ marginBlock: 0
101
+ },
72
102
  color: "var(--bfc-base-c)",
73
103
  fontFamily: "inherit",
74
104
  fontSize: "var(--bf-font-size-l)"
@@ -96,6 +126,13 @@ export const selectStyles = {
96
126
  color: "var(--bfc-base-c-2)",
97
127
  fontSize: "var(--bf-font-size-l)"
98
128
  }),
129
+ valueContainer: (provided)=>({
130
+ ...provided,
131
+ ".bf-select-small &": {
132
+ padding: "0 8px"
133
+ },
134
+ padding: "var(--rem2) 12px"
135
+ }),
99
136
  singleValue: (provided, state)=>({
100
137
  ...provided,
101
138
  color: state.selectProps.menuIsOpen || state.isDisabled ? "var(--bfc-base-c-2)" : "var(--bfc-base-c)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intility/bifrost-react-select",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "React select component for Intility's design system, Bifrost.",
5
5
  "type": "module",
6
6
  "main": "dist/Select.js",
@@ -44,7 +44,7 @@
44
44
  "react-dom": ">=17.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@intility/bifrost-react": "^5.0.2"
47
+ "@intility/bifrost-react": "^5.2.1"
48
48
  },
49
49
  "dependencies": {
50
50
  "@fortawesome/fontawesome-svg-core": "^6.4.2",