@intility/bifrost-react-select 4.0.0-alpha.8 → 4.0.0-beta.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/src/Select.tsx CHANGED
@@ -1,29 +1,29 @@
1
1
  /* eslint-disable @typescript-eslint/ban-ts-comment */
2
- 'use client'
2
+ "use client";
3
3
 
4
- import { CSSProperties, forwardRef, ReactNode, RefAttributes } from 'react'
4
+ import { CSSProperties, forwardRef, ReactNode, RefAttributes } from "react";
5
5
  import ReactSelectDefaultExport, {
6
6
  GroupBase,
7
7
  Props as ReactSelectProps,
8
8
  SelectInstance,
9
- components
10
- } from 'react-select'
9
+ components,
10
+ } from "react-select";
11
11
  import AsyncReactSelect, {
12
- AsyncProps as AsyncSelectProps
13
- } from 'react-select/async'
12
+ AsyncProps as AsyncSelectProps,
13
+ } from "react-select/async";
14
14
  import CreatableReactSelect, {
15
- CreatableProps as CreatableSelectProps
16
- } from 'react-select/creatable'
15
+ CreatableProps as CreatableSelectProps,
16
+ } from "react-select/creatable";
17
17
  import AsyncCreatableReactSelect, {
18
- AsyncCreatableProps as AsyncCreatableSelectProps
19
- } from 'react-select/async-creatable'
20
- import classNames from 'classnames'
18
+ AsyncCreatableProps as AsyncCreatableSelectProps,
19
+ } from "react-select/async-creatable";
20
+ import classNames from "classnames";
21
21
  import {
22
22
  Description,
23
23
  Feedback,
24
24
  Label,
25
- useUniqueId
26
- } from '@intility/bifrost-react'
25
+ useUniqueId,
26
+ } from "@intility/bifrost-react";
27
27
 
28
28
  import {
29
29
  DropdownIndicator,
@@ -31,197 +31,197 @@ import {
31
31
  CustomInput,
32
32
  CustomMenuList,
33
33
  CustomOption,
34
- LoadingIndicator
35
- } from './overrides'
34
+ LoadingIndicator,
35
+ } from "./overrides";
36
36
 
37
37
  const ReactSelect =
38
38
  (
39
39
  ReactSelectDefaultExport as unknown as {
40
- default: typeof ReactSelectDefaultExport
40
+ default: typeof ReactSelectDefaultExport;
41
41
  }
42
- ).default ?? ReactSelectDefaultExport
42
+ ).default ?? ReactSelectDefaultExport;
43
43
 
44
44
  export const selectStyles = {
45
- container: provided => ({
45
+ container: (provided) => ({
46
46
  ...provided,
47
- '.bf-label-description + &, .bf-label + &': {
48
- marginTop: 'var(--bfs4)' // add margin-top only when label or description is direct sibling with select
49
- }
47
+ ".bf-label-description + &, .bf-label + &": {
48
+ marginTop: "var(--bfs4)", // add margin-top only when label or description is direct sibling with select
49
+ },
50
50
  }),
51
51
  control: (provided, state) => ({
52
52
  ...provided,
53
- '&:hover': {
53
+ "&:hover": {
54
54
  borderBottomColor: state.isFocused
55
- ? 'var(--bfc-base-c-theme)'
56
- : 'var(--bfc-base-c-inverted-2)',
55
+ ? "var(--bfc-base-c-theme)"
56
+ : "var(--bfc-base-c-inverted-2)",
57
57
  // Change color of dropdown icon when hover on Select
58
- '.bf-select__dropdown-indicator': {
59
- color: 'var(--bfc-theme-3)'
60
- }
58
+ ".bf-select__dropdown-indicator": {
59
+ color: "var(--bfc-theme-3)",
60
+ },
61
61
  },
62
62
  backgroundColor: state.isDisabled
63
- ? 'var(--bfc-base-dimmed)'
64
- : 'var(--bfc-base-3)',
63
+ ? "var(--bfc-base-dimmed)"
64
+ : "var(--bfc-base-3)",
65
65
  border: 0,
66
- borderBottomWidth: '2px',
67
- borderBottomStyle: 'solid',
66
+ borderBottomWidth: "2px",
67
+ borderBottomStyle: "solid",
68
68
  borderBottomColor: state.isFocused
69
- ? 'var(--bfc-base-c-theme)'
69
+ ? "var(--bfc-base-c-theme)"
70
70
  : state.isDisabled
71
- ? 'transparent'
72
- : 'var(--bfc-base-c-wcag)',
73
- boxShadow: state.isFocused && '0 0 0 1px var(--bfc-theme-3)',
71
+ ? "transparent"
72
+ : "var(--bfc-base-c-wcag)",
73
+ boxShadow: state.isFocused && "0 0 0 1px var(--bfc-theme-3)",
74
74
  borderRadius: state.selectProps.menuIsOpen
75
- ? ' var(--bfl-border-radius) var(--bfl-border-radius) 0 0'
76
- : 'var(--bfl-border-radius)',
77
- minHeight: 'var(--bfs40)',
78
- cursor: 'text'
75
+ ? " var(--bf-radius-xs) var(--bf-radius-xs) 0 0"
76
+ : "var(--bf-radius-xs)",
77
+ minHeight: "var(--bfs40)",
78
+ cursor: "text",
79
79
  }),
80
80
  indicatorSeparator: () => ({
81
- display: 'none'
81
+ display: "none",
82
82
  }),
83
- indicatorsContainer: provided => ({
83
+ indicatorsContainer: (provided) => ({
84
84
  ...provided,
85
- alignItems: 'flex-start',
86
- padding: '7.5px 0'
85
+ alignItems: "flex-start",
86
+ padding: "7.5px 0",
87
87
  }),
88
- clearIndicator: provided => ({
88
+ clearIndicator: (provided) => ({
89
89
  ...provided,
90
- '&:hover': {
91
- color: 'var(--bfc-base-c-1)'
90
+ "&:hover": {
91
+ color: "var(--bfc-base-c-1)",
92
92
  },
93
- color: 'var(--bfc-base-c-2)',
94
- cursor: 'pointer',
95
- padding: 'var(--bfs4)',
96
- margin: '1px var(--bfs4) 0px 0px'
93
+ color: "var(--bfc-base-c-2)",
94
+ cursor: "pointer",
95
+ padding: "var(--bfs4)",
96
+ margin: "1px var(--bfs4) 0px 0px",
97
97
  }),
98
98
  dropdownIndicator: (provided, state) => ({
99
99
  ...provided,
100
- color: state.isDisabled ? 'var(--bfc-base-c-2)' : 'var(--bfc-theme-1)',
101
- cursor: 'pointer',
102
- padding: 'var(--bfs4)',
103
- marginRight: 'var(--bfs8)'
100
+ color: state.isDisabled ? "var(--bfc-base-c-2)" : "var(--bfc-theme-1)",
101
+ cursor: "pointer",
102
+ padding: "var(--bfs4)",
103
+ marginRight: "var(--bfs8)",
104
104
  }),
105
- input: provided => ({
105
+ input: (provided) => ({
106
106
  ...provided,
107
- color: 'var(--bfc-base-c-1)',
108
- fontFamily: 'inherit',
109
- fontSize: 'var(--bf-font-size-l)'
107
+ color: "var(--bfc-base-c-1)",
108
+ fontFamily: "inherit",
109
+ fontSize: "var(--bf-font-size-l)",
110
110
  }),
111
- menuPortal: provided => ({
111
+ menuPortal: (provided) => ({
112
112
  ...provided,
113
- zIndex: 9999
113
+ zIndex: 9999,
114
114
  }),
115
- menu: provided => ({
115
+ menu: (provided) => ({
116
116
  ...provided,
117
- backgroundColor: 'var(--bfc-base-3)',
118
- boxShadow: 'none',
119
- borderRadius: 'none',
117
+ backgroundColor: "var(--bfc-base-3)",
118
+ boxShadow: "none",
119
+ borderRadius: "none",
120
120
  marginTop: 0,
121
- zIndex: 3
121
+ zIndex: 3,
122
122
  }),
123
- menuList: provided => ({
123
+ menuList: (provided) => ({
124
124
  ...provided,
125
125
  padding: 0,
126
- boxShadow: '0 0 0 1px var(--bfc-theme-3)',
127
- borderRadius: '0 0 var(--bfl-border-radius) var(--bfl-border-radius)'
126
+ boxShadow: "0 0 0 1px var(--bfc-theme-3)",
127
+ borderRadius: "0 0 var(--bf-radius-xs) var(--bf-radius-xs)",
128
128
  }),
129
- placeholder: provided => ({
129
+ placeholder: (provided) => ({
130
130
  ...provided,
131
- color: 'var(--bfc-base-c-2)',
132
- fontSize: 'var(--bf-font-size-l)'
131
+ color: "var(--bfc-base-c-2)",
132
+ fontSize: "var(--bf-font-size-l)",
133
133
  }),
134
134
  singleValue: (provided, state) => ({
135
135
  ...provided,
136
136
  color: state.selectProps.menuIsOpen
137
- ? 'var(--bfc-base-c-2)'
138
- : 'var(--bfc-base-c)',
139
- fontSize: 'var(--bf-font-size-l)'
137
+ ? "var(--bfc-base-c-2)"
138
+ : "var(--bfc-base-c)",
139
+ fontSize: "var(--bf-font-size-l)",
140
140
  }),
141
141
  option: (provided, state) => ({
142
142
  ...provided,
143
- display: 'flex',
144
- justifyContent: !state.isMulti ? 'space-between' : 'normal',
145
- alignItems: 'baseline',
146
- padding: '7px 12px',
143
+ display: "flex",
144
+ justifyContent: !state.isMulti ? "space-between" : "normal",
145
+ alignItems: "baseline",
146
+ padding: "7px 12px",
147
147
  backgroundColor: state.isDisabled
148
- ? 'var(--bfc-base-dimmed)'
148
+ ? "var(--bfc-base-dimmed)"
149
149
  : state.isFocused
150
- ? 'var(--bfc-base-1)'
151
- : 'var(--bfc-base-3)',
152
- color: 'var(--bfc-base-c)',
153
- '& .bf-select-checkbox': {
154
- marginRight: 'var(--bfs8)',
155
- color: 'var(--bfc-theme)'
150
+ ? "var(--bfc-base-1)"
151
+ : "var(--bfc-base-3)",
152
+ color: "var(--bfc-base-c)",
153
+ "& .bf-select-checkbox": {
154
+ marginRight: "var(--bfs8)",
155
+ color: "var(--bfc-theme)",
156
156
  },
157
- '& .bf-select-selected-icon': {
158
- color: 'var(--bfc-base-c-theme)',
159
- marginLeft: 'var(--bfs4)'
157
+ "& .bf-select-selected-icon": {
158
+ color: "var(--bfc-base-c-theme)",
159
+ marginLeft: "var(--bfs4)",
160
160
  },
161
- '&:hover': {
161
+ "&:hover": {
162
162
  backgroundColor: state.isDisabled
163
- ? 'var(--bfc-base-dimmed)'
164
- : 'var(--bfc-base-1)',
165
- cursor: state.isDisabled ? 'default' : 'pointer'
163
+ ? "var(--bfc-base-dimmed)"
164
+ : "var(--bfc-base-1)",
165
+ cursor: state.isDisabled ? "default" : "pointer",
166
166
  },
167
- fontSize: 'var(--bf-font-size-l)',
167
+ fontSize: "var(--bf-font-size-l)",
168
168
  fontWeight: state.isSelected ? 600 : 400,
169
- wordBreak: 'break-word',
170
- whiteSpace: 'normal'
169
+ wordBreak: "break-word",
170
+ whiteSpace: "normal",
171
171
  }),
172
172
  multiValue: (provided, state) => ({
173
173
  ...provided,
174
174
  backgroundColor: state.isDisabled
175
- ? 'var(--bfc-base-c-inverted-2)'
176
- : 'var(--bfc-theme-c)',
177
- borderRadius: 'var(--bfl-border-radius)'
175
+ ? "var(--bfc-base-c-inverted-2)"
176
+ : "var(--bfc-theme-c)",
177
+ borderRadius: "var(--bf-radius-xs)",
178
178
  }),
179
179
  multiValueLabel: (provided, state) => ({
180
180
  ...provided,
181
- color: state.isDisabled ? 'var(--bfc-base-1)' : 'var(--bfc-base-c-theme)',
182
- fontSize: 'var(--bf-font-size-m)'
181
+ color: state.isDisabled ? "var(--bfc-base-1)" : "var(--bfc-base-c-theme)",
182
+ fontSize: "var(--bf-font-size-m)",
183
183
  }),
184
184
  multiValueRemove: (provided, state) => ({
185
185
  ...provided,
186
186
  color: state.isDisabled
187
- ? 'var(--bfc-base-1)'
187
+ ? "var(--bfc-base-1)"
188
188
  : state.isFocused
189
- ? 'var(--bfc-theme-c-base-3)'
190
- : 'var(--bfc-theme-1)',
191
- borderRadius: 'unset',
192
- borderTopRightRadius: 'var(--bfl-border-radius)',
193
- borderBottomRightRadius: 'var(--bfl-border-radius)',
194
- paddingLeft: 'var(--bfs2)',
195
- paddingRight: 'var(--bfs2)',
196
- marginLeft: 'var(--bfs2)',
197
- background: state.isFocused && 'var(--bfc-theme-2)',
198
- '&:hover': {
199
- color: 'var(--bfc-theme-c-base-3)',
200
- cursor: 'pointer',
201
- background: 'var(--bfc-theme)'
189
+ ? "var(--bfc-theme-c-base-3)"
190
+ : "var(--bfc-theme-1)",
191
+ borderRadius: "unset",
192
+ borderTopRightRadius: "var(--bf-radius-xs)",
193
+ borderBottomRightRadius: "var(--bf-radius-xs)",
194
+ paddingLeft: "var(--bfs2)",
195
+ paddingRight: "var(--bfs2)",
196
+ marginLeft: "var(--bfs2)",
197
+ background: state.isFocused && "var(--bfc-theme-2)",
198
+ "&:hover": {
199
+ color: "var(--bfc-theme-c-base-3)",
200
+ cursor: "pointer",
201
+ background: "var(--bfc-theme)",
202
202
  },
203
- '&:active': {
204
- background: 'var(--bfc-theme-2)'
203
+ "&:active": {
204
+ background: "var(--bfc-theme-2)",
205
205
  },
206
206
  svg: {
207
- marginTop: '1px'
208
- }
207
+ marginTop: "1px",
208
+ },
209
209
  }),
210
- group: provided => ({
210
+ group: (provided) => ({
211
211
  ...provided,
212
- padding: 'var(--bfs6) 0',
213
- '&:first-of-type': {
214
- marginTop: 'var(--bfs4)'
215
- }
212
+ padding: "var(--bfs6) 0",
213
+ "&:first-of-type": {
214
+ marginTop: "var(--bfs4)",
215
+ },
216
216
  }),
217
- groupHeading: provided => ({
217
+ groupHeading: (provided) => ({
218
218
  ...provided,
219
- textTransform: 'capitalize',
220
- color: 'var(--bfc-base-c-2)',
221
- fontSize: 'var(--bf-font-size-s)',
222
- marginBottom: 'var(--bfs2)'
223
- })
224
- }
219
+ textTransform: "capitalize",
220
+ color: "var(--bfc-base-c-2)",
221
+ fontSize: "var(--bf-font-size-s)",
222
+ marginBottom: "var(--bfs2)",
223
+ }),
224
+ };
225
225
 
226
226
  export const selectComponents: Partial<typeof components> = {
227
227
  DropdownIndicator,
@@ -229,11 +229,11 @@ export const selectComponents: Partial<typeof components> = {
229
229
  MenuList: CustomMenuList,
230
230
  ClearIndicator,
231
231
  Option: CustomOption,
232
- LoadingIndicator
233
- }
232
+ LoadingIndicator,
233
+ };
234
234
 
235
- const selectStates = ['default', 'alert'] as const
236
- export type SelectState = (typeof selectStates)[number]
235
+ const selectStates = ["default", "alert"] as const;
236
+ export type SelectState = (typeof selectStates)[number];
237
237
 
238
238
  /**
239
239
  * Select HOC
@@ -260,20 +260,20 @@ const SelectHOC = <Type, Selector>(Selector: Selector) => {
260
260
  components,
261
261
  ...props
262
262
  },
263
- ref
263
+ ref,
264
264
  ) => {
265
- const selectId = useUniqueId(inputId)
265
+ const selectId = useUniqueId(inputId);
266
266
 
267
267
  return (
268
268
  <div
269
269
  className={classNames(
270
270
  className,
271
- { 'bf-select-container': true },
272
- { 'bf-select-disabled': isDisabled },
273
- { 'bf-select-alert': !isDisabled && state === 'alert' }
271
+ { "bf-select-container": true },
272
+ { "bf-select-disabled": isDisabled },
273
+ { "bf-select-alert": !isDisabled && state === "alert" },
274
274
  )}
275
275
  style={style}
276
- data-testid='bf-select-container'
276
+ data-testid="bf-select-container"
277
277
  >
278
278
  {!hideLabel && (
279
279
  <Label
@@ -290,11 +290,11 @@ const SelectHOC = <Type, Selector>(Selector: Selector) => {
290
290
  <Selector
291
291
  ref={ref}
292
292
  inputId={selectId}
293
- placeholder=''
293
+ placeholder=""
294
294
  components={{ ...selectComponents, ...components }}
295
295
  styles={selectStyles}
296
296
  isDisabled={isDisabled}
297
- classNamePrefix='bf-select'
297
+ classNamePrefix="bf-select"
298
298
  required={!isDisabled && (required || requiredNoLabel)}
299
299
  aria-label={label}
300
300
  hideSelectedOptions={false}
@@ -304,37 +304,37 @@ const SelectHOC = <Type, Selector>(Selector: Selector) => {
304
304
  />
305
305
  <Feedback>{feedback}</Feedback>
306
306
  </div>
307
- )
308
- }
309
- )
307
+ );
308
+ },
309
+ );
310
310
 
311
- return GeneratedSelect
312
- }
311
+ return GeneratedSelect;
312
+ };
313
313
 
314
314
  // this is somewhat useless on it's own
315
315
  // has to be combined with one of the Select's props
316
316
  export type SelectProps = {
317
317
  /** Required label text */
318
- label: ReactNode
318
+ label: ReactNode;
319
319
  /** Hide label text, will add label prop as aria-label for screen readers */
320
- hideLabel?: boolean
320
+ hideLabel?: boolean;
321
321
  /** Description text to show more information */
322
- description?: ReactNode
322
+ description?: ReactNode;
323
323
  /** Available states: `default` and `alert` */
324
- state?: SelectState
324
+ state?: SelectState;
325
325
  /** Feedback text below the Select component */
326
- feedback?: ReactNode
326
+ feedback?: ReactNode;
327
327
  /** Required prop indicating mandatory field */
328
- required?: boolean
328
+ required?: boolean;
329
329
  /** Bool to mark Select component required, but hides the required label */
330
- requiredNoLabel?: boolean
330
+ requiredNoLabel?: boolean;
331
331
  /** Marks Select component as optional */
332
- optional?: boolean
332
+ optional?: boolean;
333
333
  /** Inline CSS styles */
334
- style?: CSSProperties
334
+ style?: CSSProperties;
335
335
  /** Displays a loading spinner */
336
- loading?: boolean
337
- }
336
+ loading?: boolean;
337
+ };
338
338
 
339
339
  // Each select get its own type which uses the correctly imported props
340
340
  // And calls the HOC
@@ -345,22 +345,22 @@ export type SelectType = {
345
345
  <
346
346
  OptionType = { label: string; value: string },
347
347
  IsMulti extends boolean = false,
348
- Group extends GroupBase<OptionType> = GroupBase<OptionType>
348
+ Group extends GroupBase<OptionType> = GroupBase<OptionType>,
349
349
  >(
350
350
  props: ReactSelectProps<OptionType, IsMulti, Group> &
351
351
  RefAttributes<SelectInstance<OptionType, IsMulti, Group>> &
352
- SelectProps
353
- ): React.ReactElement | null
354
- displayName?: string
355
- }
352
+ SelectProps,
353
+ ): React.ReactElement | null;
354
+ displayName?: string;
355
+ };
356
356
 
357
357
  /**
358
358
  * Select component - dropdown list
359
359
  */
360
360
  const SelectComponent: SelectType = SelectHOC<SelectType, typeof ReactSelect>(
361
- ReactSelect
362
- )
363
- SelectComponent.displayName = 'Select'
361
+ ReactSelect,
362
+ );
363
+ SelectComponent.displayName = "Select";
364
364
 
365
365
  // Async Select
366
366
  export type AsyncType = {
@@ -368,22 +368,22 @@ export type AsyncType = {
368
368
  OptionType = { label: string; value: string },
369
369
  IsMulti extends boolean = false,
370
370
  Group extends GroupBase<OptionType> = {
371
- options: OptionType[]
372
- label?: string
373
- }
371
+ options: OptionType[];
372
+ label?: string;
373
+ },
374
374
  >(
375
375
  props: AsyncSelectProps<OptionType, IsMulti, Group> &
376
376
  RefAttributes<SelectInstance<OptionType, IsMulti, Group>> &
377
- SelectProps
378
- ): React.ReactElement | null
379
- displayName?: string
380
- }
377
+ SelectProps,
378
+ ): React.ReactElement | null;
379
+ displayName?: string;
380
+ };
381
381
 
382
382
  const AsyncSelect = SelectHOC<AsyncType, typeof AsyncReactSelect>(
383
- AsyncReactSelect
384
- )
383
+ AsyncReactSelect,
384
+ );
385
385
 
386
- AsyncSelect.displayName = 'AsyncSelect'
386
+ AsyncSelect.displayName = "AsyncSelect";
387
387
 
388
388
  // Creatable Select
389
389
  export type CreatableType = {
@@ -391,22 +391,22 @@ export type CreatableType = {
391
391
  OptionType = { label: string; value: string },
392
392
  IsMulti extends boolean = false,
393
393
  Group extends GroupBase<OptionType> = {
394
- options: OptionType[]
395
- label?: string
396
- }
394
+ options: OptionType[];
395
+ label?: string;
396
+ },
397
397
  >(
398
398
  props: CreatableSelectProps<OptionType, IsMulti, Group> &
399
399
  RefAttributes<SelectInstance<OptionType, IsMulti, Group>> &
400
- SelectProps
401
- ): React.ReactElement | null
402
- displayName?: string
403
- }
400
+ SelectProps,
401
+ ): React.ReactElement | null;
402
+ displayName?: string;
403
+ };
404
404
 
405
405
  const CreatableSelect = SelectHOC<CreatableType, typeof CreatableReactSelect>(
406
- CreatableReactSelect
407
- )
406
+ CreatableReactSelect,
407
+ );
408
408
 
409
- CreatableSelect.displayName = 'CreatableSelect'
409
+ CreatableSelect.displayName = "CreatableSelect";
410
410
 
411
411
  // Async Creatable Select
412
412
  export type AsyncCreatableType = {
@@ -414,23 +414,23 @@ export type AsyncCreatableType = {
414
414
  OptionType = { label: string; value: string },
415
415
  IsMulti extends boolean = false,
416
416
  Group extends GroupBase<OptionType> = {
417
- options: OptionType[]
418
- label?: string
419
- }
417
+ options: OptionType[];
418
+ label?: string;
419
+ },
420
420
  >(
421
421
  props: AsyncCreatableSelectProps<OptionType, IsMulti, Group> &
422
422
  RefAttributes<SelectInstance<OptionType, IsMulti, Group>> &
423
- SelectProps
424
- ): React.ReactElement | null
425
- displayName?: string
426
- }
423
+ SelectProps,
424
+ ): React.ReactElement | null;
425
+ displayName?: string;
426
+ };
427
427
 
428
428
  const AsyncCreatableSelect = SelectHOC<
429
429
  AsyncCreatableType,
430
430
  typeof AsyncCreatableReactSelect
431
- >(AsyncCreatableReactSelect)
431
+ >(AsyncCreatableReactSelect);
432
432
 
433
- AsyncCreatableSelect.displayName = 'AsyncCreatableSelect'
433
+ AsyncCreatableSelect.displayName = "AsyncCreatableSelect";
434
434
 
435
- export { AsyncSelect, CreatableSelect, AsyncCreatableSelect }
436
- export default SelectComponent
435
+ export { AsyncSelect, CreatableSelect, AsyncCreatableSelect };
436
+ export default SelectComponent;
@@ -2,25 +2,25 @@ import {
2
2
  IconDefinition,
3
3
  IconName,
4
4
  IconPathData,
5
- IconPrefix
6
- } from '@fortawesome/fontawesome-svg-core'
5
+ IconPrefix,
6
+ } from "@fortawesome/fontawesome-svg-core";
7
7
 
8
- const prefix = 'fac' as IconPrefix
9
- const iconName = 'bf-spinner' as IconName
10
- const width = 18
11
- const height = 18
12
- const aliases = []
13
- const unicode = ''
8
+ const prefix = "fac" as IconPrefix;
9
+ const iconName = "bf-spinner" as IconName;
10
+ const width = 18;
11
+ const height = 18;
12
+ const aliases = [];
13
+ const unicode = "";
14
14
  const svgPathData: IconPathData = [
15
- 'M9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2ZM0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z',
16
- 'M8 1C8 0.447715 8.44772 0 9 0C13.9706 0 18 4.02944 18 9C18 9.55229 17.5523 10 17 10C16.4477 10 16 9.55229 16 9C16 5.13401 12.866 2 9 2C8.44772 2 8 1.55228 8 1Z'
17
- ]
15
+ "M9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2ZM0 9C0 4.02944 4.02944 0 9 0C13.9706 0 18 4.02944 18 9C18 13.9706 13.9706 18 9 18C4.02944 18 0 13.9706 0 9Z",
16
+ "M8 1C8 0.447715 8.44772 0 9 0C13.9706 0 18 4.02944 18 9C18 9.55229 17.5523 10 17 10C16.4477 10 16 9.55229 16 9C16 5.13401 12.866 2 9 2C8.44772 2 8 1.55228 8 1Z",
17
+ ];
18
18
 
19
19
  const definition: IconDefinition = {
20
20
  prefix,
21
21
  iconName,
22
- icon: [width, height, aliases, unicode, svgPathData]
23
- }
22
+ icon: [width, height, aliases, unicode, svgPathData],
23
+ };
24
24
 
25
25
  export {
26
26
  definition as default,
@@ -33,5 +33,5 @@ export {
33
33
  aliases as ligatures,
34
34
  unicode,
35
35
  svgPathData,
36
- aliases
37
- }
36
+ aliases,
37
+ };
package/src/index.ts CHANGED
@@ -4,5 +4,5 @@ export {
4
4
  CreatableSelect,
5
5
  AsyncCreatableSelect,
6
6
  selectStyles,
7
- selectComponents
8
- } from './Select'
7
+ selectComponents,
8
+ } from "./Select";