funda-ui 3.8.817 → 3.8.821

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.
Files changed (55) hide show
  1. package/CascadingSelect/index.js +4 -2
  2. package/CascadingSelectE2E/index.js +4 -2
  3. package/Checkbox/index.js +6 -3
  4. package/ColorPicker/index.js +6 -3
  5. package/Date/index.js +12 -6
  6. package/DynamicFields/index.js +4 -2
  7. package/File/index.js +2 -1
  8. package/Input/index.js +6 -3
  9. package/LiveSearch/index.js +6 -3
  10. package/MultiFuncSelect/index.js +6 -3
  11. package/Radio/index.js +6 -3
  12. package/RangeSlider/index.js +6 -3
  13. package/SearchBar/index.js +6 -3
  14. package/Select/index.js +6 -3
  15. package/Switch/index.js +6 -3
  16. package/Table/index.js +10 -5
  17. package/TagInput/index.js +6 -3
  18. package/Textarea/index.js +6 -3
  19. package/Tree/index.js +6 -3
  20. package/lib/cjs/CascadingSelect/index.js +4 -2
  21. package/lib/cjs/CascadingSelectE2E/index.js +4 -2
  22. package/lib/cjs/Checkbox/index.js +6 -3
  23. package/lib/cjs/ColorPicker/index.js +6 -3
  24. package/lib/cjs/Date/index.js +12 -6
  25. package/lib/cjs/DynamicFields/index.js +4 -2
  26. package/lib/cjs/File/index.js +2 -1
  27. package/lib/cjs/Input/index.js +6 -3
  28. package/lib/cjs/LiveSearch/index.js +6 -3
  29. package/lib/cjs/MultiFuncSelect/index.js +6 -3
  30. package/lib/cjs/Radio/index.js +6 -3
  31. package/lib/cjs/RangeSlider/index.js +6 -3
  32. package/lib/cjs/SearchBar/index.js +6 -3
  33. package/lib/cjs/Select/index.js +6 -3
  34. package/lib/cjs/Switch/index.js +6 -3
  35. package/lib/cjs/Table/index.js +10 -5
  36. package/lib/cjs/TagInput/index.js +6 -3
  37. package/lib/cjs/Textarea/index.js +6 -3
  38. package/lib/cjs/Tree/index.js +6 -3
  39. package/lib/esm/CascadingSelect/index.tsx +2 -2
  40. package/lib/esm/CascadingSelectE2E/index.tsx +2 -2
  41. package/lib/esm/Checkbox/index.tsx +3 -3
  42. package/lib/esm/ColorPicker/index.tsx +3 -3
  43. package/lib/esm/Date/index.tsx +3 -3
  44. package/lib/esm/DynamicFields/index.tsx +2 -2
  45. package/lib/esm/File/index.tsx +1 -1
  46. package/lib/esm/Input/index.tsx +3 -3
  47. package/lib/esm/MultiFuncSelect/index.tsx +3 -3
  48. package/lib/esm/Radio/index.tsx +3 -3
  49. package/lib/esm/SearchBar/index.tsx +3 -3
  50. package/lib/esm/Select/index.tsx +3 -3
  51. package/lib/esm/Switch/index.tsx +3 -3
  52. package/lib/esm/Table/index.tsx +2 -2
  53. package/lib/esm/TagInput/index.tsx +3 -3
  54. package/lib/esm/Textarea/index.tsx +3 -3
  55. package/package.json +1 -1
@@ -59,7 +59,7 @@ const Checkbox = forwardRef((props: CheckboxProps, ref: any) => {
59
59
  const [val, setVal] = useState<any>(null || false); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
60
60
 
61
61
  function handleFocus(event: any) {
62
- rootRef.current.classList.add('focus');
62
+ rootRef.current?.classList.add('focus');
63
63
 
64
64
  //
65
65
  onFocus?.(event);
@@ -73,7 +73,7 @@ const Checkbox = forwardRef((props: CheckboxProps, ref: any) => {
73
73
 
74
74
  //----
75
75
  //remove focus style
76
- rootRef.current.classList.remove('focus');
76
+ rootRef.current?.classList.remove('focus');
77
77
 
78
78
  //
79
79
  if (typeof (onChange) === 'function') {
@@ -89,7 +89,7 @@ const Checkbox = forwardRef((props: CheckboxProps, ref: any) => {
89
89
 
90
90
  //----
91
91
  //remove focus style
92
- rootRef.current.classList.remove('focus');
92
+ rootRef.current?.classList.remove('focus');
93
93
 
94
94
  //
95
95
  onBlur?.(event);
@@ -76,7 +76,7 @@ const ColorPicker = forwardRef((props: ColorPickerProps, ref: any) => {
76
76
 
77
77
 
78
78
  function handleFocus(event: ChangeEvent<HTMLInputElement>) {
79
- rootRef.current.classList.add('focus');
79
+ rootRef.current?.classList.add('focus');
80
80
 
81
81
  //
82
82
  onFocus?.(event);
@@ -91,7 +91,7 @@ const ColorPicker = forwardRef((props: ColorPickerProps, ref: any) => {
91
91
  //----
92
92
  //remove focus style
93
93
  if (val === '') {
94
- rootRef.current.classList.remove('focus');
94
+ rootRef.current?.classList.remove('focus');
95
95
  }
96
96
 
97
97
  //
@@ -107,7 +107,7 @@ const ColorPicker = forwardRef((props: ColorPickerProps, ref: any) => {
107
107
  //----
108
108
  //remove focus style
109
109
  if (val === '') {
110
- rootRef.current.classList.remove('focus');
110
+ rootRef.current?.classList.remove('focus');
111
111
  }
112
112
 
113
113
  //
@@ -466,7 +466,7 @@ const Date = forwardRef((props: DateProps, ref: any) => {
466
466
  popwinPosHide();
467
467
 
468
468
  //remove focus style
469
- rootRef.current.classList.remove('focus');
469
+ rootRef.current?.classList.remove('focus');
470
470
  }
471
471
 
472
472
  }
@@ -486,7 +486,7 @@ const Date = forwardRef((props: DateProps, ref: any) => {
486
486
 
487
487
 
488
488
  function handleFocus(event: ChangeEvent<HTMLElement>) {
489
- rootRef.current.classList.add('focus');
489
+ rootRef.current?.classList.add('focus');
490
490
 
491
491
 
492
492
  //
@@ -505,7 +505,7 @@ const Date = forwardRef((props: DateProps, ref: any) => {
505
505
  function handleBlur(event: ChangeEvent<HTMLElement>) {
506
506
 
507
507
  //remove focus style
508
- rootRef.current.classList.remove('focus');
508
+ rootRef.current?.classList.remove('focus');
509
509
 
510
510
  //
511
511
  onBlur?.(inputRef.current);
@@ -130,9 +130,9 @@ const DynamicFields = (props: DynamicFieldsProps) => {
130
130
  if (innerAppendEmptyContent === '' || typeof innerAppendEmptyContent === 'undefined') return false;
131
131
 
132
132
  if (type === 'add') {
133
- emptyRef.current.classList.add(ITEM_HIDE_CLASSNAME);
133
+ emptyRef.current?.classList.add(ITEM_HIDE_CLASSNAME);
134
134
  } else {
135
- emptyRef.current.classList.remove(ITEM_HIDE_CLASSNAME);
135
+ emptyRef.current?.classList.remove(ITEM_HIDE_CLASSNAME);
136
136
  }
137
137
  return true;
138
138
  }
@@ -214,7 +214,7 @@ const File = forwardRef((props: FileProps, ref: any) => {
214
214
  //----
215
215
  //remove focus style
216
216
  if (val === '') {
217
- rootRef.current.classList.remove('focus');
217
+ rootRef.current?.classList.remove('focus');
218
218
  }
219
219
 
220
220
  //
@@ -135,7 +135,7 @@ const Input = forwardRef((props: InputProps, ref: any) => {
135
135
 
136
136
 
137
137
  function handleFocus(event: ChangeEvent<HTMLInputElement>) {
138
- rootRef.current.classList.add('focus');
138
+ rootRef.current?.classList.add('focus');
139
139
 
140
140
  //
141
141
  onFocus?.(event, onComposition, valRef.current);
@@ -150,7 +150,7 @@ const Input = forwardRef((props: InputProps, ref: any) => {
150
150
  //----
151
151
  //remove focus style
152
152
  if (val === '') {
153
- rootRef.current.classList.remove('focus');
153
+ rootRef.current?.classList.remove('focus');
154
154
  }
155
155
 
156
156
  //
@@ -173,7 +173,7 @@ const Input = forwardRef((props: InputProps, ref: any) => {
173
173
  //----
174
174
  //remove focus style
175
175
  if (val === '') {
176
- rootRef.current.classList.remove('focus');
176
+ rootRef.current?.classList.remove('focus');
177
177
  }
178
178
 
179
179
  //
@@ -1162,7 +1162,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
1162
1162
  [].slice.call(document.querySelectorAll('.mf-select__wrapper')).forEach((node: any) => {
1163
1163
  node.classList.remove('active', 'focus');
1164
1164
  });
1165
- rootRef.current.classList.add('active', 'focus');
1165
+ rootRef.current?.classList.add('active', 'focus');
1166
1166
  }
1167
1167
 
1168
1168
 
@@ -1187,7 +1187,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
1187
1187
 
1188
1188
  //remove focus style
1189
1189
  if (!(MULTI_SEL_VALID)) {
1190
- rootRef.current.classList.remove('focus');
1190
+ rootRef.current?.classList.remove('focus');
1191
1191
  }
1192
1192
 
1193
1193
  // get options
@@ -1671,7 +1671,7 @@ const MultiFuncSelect = forwardRef((props: MultiFuncSelectProps, ref: any) => {
1671
1671
  //
1672
1672
  function handleFocus(event: any) {
1673
1673
 
1674
- rootRef.current.classList.add('focus');
1674
+ rootRef.current?.classList.add('focus');
1675
1675
 
1676
1676
  // update temporary value
1677
1677
  setControlTempValue('');
@@ -260,7 +260,7 @@ const Radio = (props: RadioProps) => {
260
260
 
261
261
  //
262
262
  function handleFocus(event: any) {
263
- rootRef.current.classList.add('focus');
263
+ rootRef.current?.classList.add('focus');
264
264
 
265
265
  //
266
266
  onFocus?.(event);
@@ -291,7 +291,7 @@ const Radio = (props: RadioProps) => {
291
291
 
292
292
  //----
293
293
  //remove focus style
294
- rootRef.current.classList.remove('focus');
294
+ rootRef.current?.classList.remove('focus');
295
295
 
296
296
 
297
297
  //
@@ -307,7 +307,7 @@ const Radio = (props: RadioProps) => {
307
307
 
308
308
  //----
309
309
  //remove focus style
310
- rootRef.current.classList.remove('focus');
310
+ rootRef.current?.classList.remove('focus');
311
311
 
312
312
  //
313
313
  onBlur?.(event);
@@ -112,7 +112,7 @@ const SearchBar = forwardRef((props: SearchBarProps, ref: any) => {
112
112
  }
113
113
 
114
114
  function handleFocus(event: any) {
115
- rootRef.current.classList.add('focus');
115
+ rootRef.current?.classList.add('focus');
116
116
 
117
117
  //
118
118
  onFocus?.(event, onComposition);
@@ -126,7 +126,7 @@ const SearchBar = forwardRef((props: SearchBarProps, ref: any) => {
126
126
  //----
127
127
  //remove focus style
128
128
  if (val === '') {
129
- rootRef.current.classList.remove('focus');
129
+ rootRef.current?.classList.remove('focus');
130
130
  }
131
131
 
132
132
  //
@@ -141,7 +141,7 @@ const SearchBar = forwardRef((props: SearchBarProps, ref: any) => {
141
141
  //----
142
142
  //remove focus style
143
143
  if (val === '') {
144
- rootRef.current.classList.remove('focus');
144
+ rootRef.current?.classList.remove('focus');
145
145
  }
146
146
 
147
147
  //
@@ -212,7 +212,7 @@ const Select = forwardRef((props: SelectProps, ref: any) => {
212
212
 
213
213
  //
214
214
  function handleFocus(event: any) {
215
- rootRef.current.classList.add('focus');
215
+ rootRef.current?.classList.add('focus');
216
216
 
217
217
  //
218
218
  onFocus?.(event);
@@ -229,7 +229,7 @@ const Select = forwardRef((props: SelectProps, ref: any) => {
229
229
 
230
230
  //----
231
231
  //remove focus style
232
- rootRef.current.classList.remove('focus');
232
+ rootRef.current?.classList.remove('focus');
233
233
 
234
234
  //
235
235
  if ( typeof(onChange) === 'function' ) {
@@ -244,7 +244,7 @@ const Select = forwardRef((props: SelectProps, ref: any) => {
244
244
 
245
245
  //----
246
246
  //remove focus style
247
- rootRef.current.classList.remove('focus');
247
+ rootRef.current?.classList.remove('focus');
248
248
 
249
249
  //
250
250
  onBlur?.(event);
@@ -54,7 +54,7 @@ const Switch = forwardRef((props: SwitchProps, ref: any) => {
54
54
  const [val, setVal] = useState<any>(null || false); // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
55
55
 
56
56
  function handleFocus(event: any) {
57
- rootRef.current.classList.add('focus');
57
+ rootRef.current?.classList.add('focus');
58
58
 
59
59
  //
60
60
  onFocus?.(event);
@@ -68,7 +68,7 @@ const Switch = forwardRef((props: SwitchProps, ref: any) => {
68
68
 
69
69
  //----
70
70
  //remove focus style
71
- rootRef.current.classList.remove('focus');
71
+ rootRef.current?.classList.remove('focus');
72
72
 
73
73
  //
74
74
  if (typeof (onChange) === 'function') {
@@ -84,7 +84,7 @@ const Switch = forwardRef((props: SwitchProps, ref: any) => {
84
84
 
85
85
  //----
86
86
  //remove focus style
87
- rootRef.current.classList.remove('focus');
87
+ rootRef.current?.classList.remove('focus');
88
88
 
89
89
  //
90
90
  onBlur?.(event);
@@ -370,7 +370,7 @@ const Table = (props: TableProps) => {
370
370
  };
371
371
 
372
372
  function handleTbodyLeave(e: any) {
373
- tbodyRef.current.classList.remove('drag-trigger-mousedown');
373
+ tbodyRef.current?.classList.remove('drag-trigger-mousedown');
374
374
  }
375
375
 
376
376
  // events fired on the drop targets
@@ -422,7 +422,7 @@ const Table = (props: TableProps) => {
422
422
  removePlaceholder();
423
423
 
424
424
  draggedObj.classList.remove( 'dragging' );
425
- tbodyRef.current.classList.remove('drag-trigger-mousedown');
425
+ tbodyRef.current?.classList.remove('drag-trigger-mousedown');
426
426
 
427
427
 
428
428
  if ( overObj === null ) return;
@@ -160,7 +160,7 @@ const TagInput = forwardRef((props: TagInputProps, ref: any) => {
160
160
  //----
161
161
  //remove focus style
162
162
  if (val === '') {
163
- rootRef.current.classList.remove('focus');
163
+ rootRef.current?.classList.remove('focus');
164
164
  }
165
165
 
166
166
  //
@@ -186,7 +186,7 @@ const TagInput = forwardRef((props: TagInputProps, ref: any) => {
186
186
 
187
187
 
188
188
  function handleFocus(event: any) {
189
- rootRef.current.classList.add('focus');
189
+ rootRef.current?.classList.add('focus');
190
190
 
191
191
  //
192
192
  onFocus?.(event);
@@ -201,7 +201,7 @@ const TagInput = forwardRef((props: TagInputProps, ref: any) => {
201
201
  //----
202
202
  //remove focus style
203
203
  if (val === '') {
204
- rootRef.current.classList.remove('focus');
204
+ rootRef.current?.classList.remove('focus');
205
205
  }
206
206
 
207
207
  //
@@ -104,7 +104,7 @@ const Textarea = forwardRef((props: TextareaProps, ref: any) => {
104
104
 
105
105
  function handleFocus(event: any) {
106
106
  const el = event.target;
107
- rootRef.current.classList.add('focus');
107
+ rootRef.current?.classList.add('focus');
108
108
 
109
109
  //
110
110
  onFocus?.(event, valRef.current);
@@ -118,7 +118,7 @@ const Textarea = forwardRef((props: TextareaProps, ref: any) => {
118
118
  //----
119
119
  //remove focus style
120
120
  if (val === '') {
121
- rootRef.current.classList.remove('focus');
121
+ rootRef.current?.classList.remove('focus');
122
122
  }
123
123
 
124
124
  //
@@ -140,7 +140,7 @@ const Textarea = forwardRef((props: TextareaProps, ref: any) => {
140
140
  //----
141
141
  //remove focus style
142
142
  if (val === '') {
143
- rootRef.current.classList.remove('focus');
143
+ rootRef.current?.classList.remove('focus');
144
144
  }
145
145
 
146
146
  //
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "3.8.817",
5
+ "version": "3.8.821",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",