@fixefy/fixefy-ui-components 0.2.32 → 0.2.34

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.
@@ -120,7 +120,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBox,
120
120
  fontSize: "small"
121
121
  });
122
122
  const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
123
- const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStyle } = props;
123
+ const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name } = props;
124
124
  const ref = (0, _react.useRef)(null);
125
125
  const theme = (0, _material.useTheme)();
126
126
  const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
@@ -397,6 +397,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
397
397
  }, option._id);
398
398
  break;
399
399
  case 'logo':
400
+ var _option_name;
400
401
  rv = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
401
402
  sx: {
402
403
  display: 'flex',
@@ -411,7 +412,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
411
412
  width: '70px'
412
413
  },
413
414
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
414
- icon: `companies/${option.logo ? option.logo : 'logo_placeholder/logo_placeholder.svg'}`,
415
+ icon: `${option.logo ? `${logo_folder_name}/${option.logo}` : logo_placeholder ? logo_placeholder : (_option_name = option === null || option === void 0 ? void 0 : option[name]) !== null && _option_name !== void 0 ? _option_name : 'x'}`,
415
416
  width: 70,
416
417
  height: 16
417
418
  })
@@ -491,8 +492,6 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
491
492
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
492
493
  direction: 'row',
493
494
  sx: {
494
- maxWidth: 270,
495
- minWidth: 270,
496
495
  display: 'flex',
497
496
  justifyContent: 'space-between'
498
497
  },
@@ -529,7 +528,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
529
528
  });
530
529
  };
531
530
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dropdownstyles.Root, {
532
- style: rootStyle,
531
+ style: rootStylesOverride,
533
532
  children: [
534
533
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
535
534
  children: [
@@ -1,7 +1,4 @@
1
1
  export declare const Root: any;
2
- export declare const Label: any;
3
2
  export declare const Loading: any;
4
3
  export declare const InputWrapper: any;
5
- export declare const Listbox: any;
6
- export declare const StyledClose: any;
7
4
  export declare const StyledListBox: any;
@@ -12,21 +12,12 @@ _export(exports, {
12
12
  InputWrapper: function() {
13
13
  return InputWrapper;
14
14
  },
15
- Label: function() {
16
- return Label;
17
- },
18
- Listbox: function() {
19
- return Listbox;
20
- },
21
15
  Loading: function() {
22
16
  return Loading;
23
17
  },
24
18
  Root: function() {
25
19
  return Root;
26
20
  },
27
- StyledClose: function() {
28
- return StyledClose;
29
- },
30
21
  StyledListBox: function() {
31
22
  return StyledListBox;
32
23
  }
@@ -85,7 +76,7 @@ function _object_spread_props(target, source) {
85
76
  return target;
86
77
  }
87
78
  const Root = (0, _styles.styled)('div')(({ props })=>{
88
- return _object_spread_props(_object_spread({}, props), {
79
+ return _object_spread({
89
80
  color: 'rgba(0,0,0,.85)',
90
81
  fontSize: 14,
91
82
  background: '#FFFFFF',
@@ -95,14 +86,11 @@ const Root = (0, _styles.styled)('div')(({ props })=>{
95
86
  ['& > div']: {
96
87
  padding: 0
97
88
  }
98
- }
99
- });
89
+ },
90
+ maxWidth: 270,
91
+ minWidth: 270
92
+ }, props);
100
93
  });
101
- const Label = (0, _styles.styled)('label')(()=>({
102
- padding: '0 0 4px',
103
- lineHeight: '1.5',
104
- display: 'block'
105
- }));
106
94
  const Loading = (0, _styles.styled)('div')(()=>({
107
95
  width: 30,
108
96
  height: 30,
@@ -160,33 +148,8 @@ const InputWrapper = (0, _styles.styled)('div')(({ theme, hasValue, disabled })=
160
148
  })
161
149
  };
162
150
  });
163
- const Listbox = (0, _styles.styled)('ul')(({ theme })=>({
164
- margin: 0,
165
- padding: 0,
166
- position: 'absolute',
167
- listStyle: 'none',
168
- backgroundColor: theme.palette.common.white,
169
- overflow: 'auto',
170
- maxHeight: 250,
171
- minHeight: 250,
172
- borderRadius: 4,
173
- boxShadow: '0px 0px 10px rgba(86, 135, 147, 0.2)',
174
- zIndex: 1,
175
- maxWidth: 270,
176
- minWidth: 270,
177
- top: 48,
178
- left: -42,
179
- ['& div']: {
180
- textOverflow: 'ellipsis',
181
- whiteSpace: 'nowrap',
182
- overflow: 'hidden'
183
- }
184
- }));
185
- const StyledClose = (0, _styles.styled)('div')(()=>({
186
- position: 'absolute',
187
- bottom: 0
188
- }));
189
- const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
151
+ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>{
152
+ return {
190
153
  margin: 0,
191
154
  padding: 0,
192
155
  listStyle: 'none',
@@ -198,7 +161,6 @@ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
198
161
  overflowX: 'hidden',
199
162
  paddingTop: 8,
200
163
  paddingBottom: 8,
201
- maxWidth: 270,
202
164
  minWidth: 270,
203
165
  '&::-webkit-scrollbar': {
204
166
  width: '8px',
@@ -228,7 +190,6 @@ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
228
190
  whiteSpace: 'nowrap',
229
191
  overflow: 'hidden',
230
192
  width: '100%',
231
- maxWidth: 270,
232
193
  minWidth: 270
233
194
  },
234
195
  ['& li:hover']: {
@@ -245,4 +206,5 @@ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
245
206
  color: 'currentColor'
246
207
  }
247
208
  }
248
- }));
209
+ };
210
+ });
@@ -59,11 +59,12 @@ function _interop_require_wildcard(obj, nodeInterop) {
59
59
  }
60
60
  return newObj;
61
61
  }
62
- const PublicIcon = ({ icon, width, height, onClick })=>{
62
+ const PublicIcon = ({ icon, width, height, onClick, variant })=>{
63
63
  const [isError, setError] = (0, _react.useState)(false);
64
64
  const handleError = (isError)=>setError(isError);
65
65
  if (isError) {
66
66
  return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Avatar, {
67
+ variant: variant || 'circular',
67
68
  children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
68
69
  fontSize: 29,
69
70
  fontWeight: 600,
@@ -18,6 +18,6 @@ export type StaticDropdownPropsType = {
18
18
  isInitialOpen?: boolean;
19
19
  placeholder?: string;
20
20
  data: string[];
21
- rootStyle?: any;
21
+ rootStylesOverride?: any;
22
22
  };
23
23
  export declare const FxStaticDropdown: React.ForwardRefExoticComponent<StaticDropdownPropsType & React.RefAttributes<unknown>>;
@@ -65,7 +65,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBox,
65
65
  fontSize: "small"
66
66
  });
67
67
  const FxStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
68
- const { onAdd, onRemoveOne, onRemoveAll, type = 'text', modal_type, multiple, query, isInitialOpen, placeholder, data, rootStyle } = props;
68
+ const { onAdd, onRemoveOne, onRemoveAll, type = 'text', modal_type, multiple, query, isInitialOpen, placeholder, data, rootStylesOverride } = props;
69
69
  const ref = (0, _react.useRef)(null);
70
70
  const theme = (0, _material.useTheme)();
71
71
  const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
@@ -383,7 +383,7 @@ const FxStaticDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
383
383
  });
384
384
  };
385
385
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_dropdownstyles.Root, {
386
- style: rootStyle,
386
+ style: rootStylesOverride,
387
387
  children: [
388
388
  /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
389
389
  children: [
@@ -73,7 +73,7 @@ function _object_spread_props(target, source) {
73
73
  return target;
74
74
  }
75
75
  const Root = (0, _styles.styled)('div')(({ props })=>{
76
- return _object_spread_props(_object_spread({}, props), {
76
+ return _object_spread({
77
77
  color: 'rgba(0,0,0,.85)',
78
78
  fontSize: 14,
79
79
  background: '#FFFFFF',
@@ -84,7 +84,7 @@ const Root = (0, _styles.styled)('div')(({ props })=>{
84
84
  padding: 0
85
85
  }
86
86
  }
87
- });
87
+ }, props);
88
88
  });
89
89
  const InputWrapper = (0, _styles.styled)('div')(({ theme, hasValue, disabled })=>{
90
90
  const disabledBorder = `1px solid ${theme.palette.greyscale[200]}`;
@@ -144,8 +144,6 @@ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
144
144
  overflowX: 'hidden',
145
145
  paddingTop: 8,
146
146
  paddingBottom: 8,
147
- maxWidth: 270,
148
- minWidth: 270,
149
147
  '&::-webkit-scrollbar': {
150
148
  width: '8px',
151
149
  backgroundColor: 'transparent'
@@ -173,9 +171,7 @@ const StyledListBox = (0, _styles.styled)('ul')(({ theme })=>({
173
171
  textOverflow: 'ellipsis',
174
172
  whiteSpace: 'nowrap',
175
173
  overflow: 'hidden',
176
- width: '100%',
177
- maxWidth: 270,
178
- minWidth: 270
174
+ width: '100%'
179
175
  },
180
176
  ['& li:hover']: {
181
177
  backgroundColor: '#F6F9FA'
package/package.json CHANGED
@@ -65,5 +65,5 @@
65
65
  "require": "./dist/index.js"
66
66
  }
67
67
  },
68
- "version": "0.2.32"
68
+ "version": "0.2.34"
69
69
  }