funda-ui 4.5.676 → 4.5.680

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.
@@ -603,6 +603,8 @@ var ColorPicker = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
603
603
  htmlFor: idRes,
604
604
  className: "form-label"
605
605
  }, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
606
+ className: "position-relative"
607
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
606
608
  className: "input-group"
607
609
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
608
610
  ref: function ref(node) {
@@ -649,7 +651,7 @@ var ColorPicker = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
649
651
  className: "text-danger"
650
652
  }, "*"))) : '', changedVal === '' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
651
653
  className: "custom-colorpicker__transparent-placeholder"
652
- })) : null));
654
+ })) : null)));
653
655
  });
654
656
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColorPicker);
655
657
  })();
package/Date/index.js CHANGED
@@ -1762,6 +1762,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1762
1762
  set: function set(value, cb) {
1763
1763
  setChangedVal("".concat(value));
1764
1764
  cb === null || cb === void 0 ? void 0 : cb();
1765
+ },
1766
+ aiPredictReset: function aiPredictReset() {
1767
+ setTimeout(function () {
1768
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1769
+ setCurrentSuggestion('');
1770
+ }, 0);
1765
1771
  }
1766
1772
  };
1767
1773
  }, [contentRef]);
package/Input/index.js CHANGED
@@ -1208,6 +1208,12 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1208
1208
  set: function set(value, cb) {
1209
1209
  setChangedVal("".concat(value));
1210
1210
  cb === null || cb === void 0 ? void 0 : cb();
1211
+ },
1212
+ aiPredictReset: function aiPredictReset() {
1213
+ setTimeout(function () {
1214
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1215
+ setCurrentSuggestion('');
1216
+ }, 0);
1211
1217
  }
1212
1218
  };
1213
1219
  }, [contentRef]);
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 UIUX Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAM AGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1728,6 +1728,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1728
1728
  set: function set(value, cb) {
1729
1729
  setChangedVal("".concat(value));
1730
1730
  cb === null || cb === void 0 ? void 0 : cb();
1731
+ },
1732
+ aiPredictReset: function aiPredictReset() {
1733
+ setTimeout(function () {
1734
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1735
+ setCurrentSuggestion('');
1736
+ }, 0);
1731
1737
  }
1732
1738
  };
1733
1739
  }, [contentRef]);
package/Textarea/index.js CHANGED
@@ -1486,6 +1486,12 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
1486
1486
  set: function set(value, cb) {
1487
1487
  setChangedVal("".concat(value));
1488
1488
  cb === null || cb === void 0 ? void 0 : cb();
1489
+ },
1490
+ aiPredictReset: function aiPredictReset() {
1491
+ setTimeout(function () {
1492
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1493
+ setCurrentSuggestion('');
1494
+ }, 0);
1489
1495
  }
1490
1496
  };
1491
1497
  }, [contentRef]);
@@ -603,6 +603,8 @@ var ColorPicker = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
603
603
  htmlFor: idRes,
604
604
  className: "form-label"
605
605
  }, label)) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
606
+ className: "position-relative"
607
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
606
608
  className: "input-group"
607
609
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
608
610
  ref: function ref(node) {
@@ -649,7 +651,7 @@ var ColorPicker = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
649
651
  className: "text-danger"
650
652
  }, "*"))) : '', changedVal === '' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
651
653
  className: "custom-colorpicker__transparent-placeholder"
652
- })) : null));
654
+ })) : null)));
653
655
  });
654
656
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ColorPicker);
655
657
  })();
@@ -1762,6 +1762,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1762
1762
  set: function set(value, cb) {
1763
1763
  setChangedVal("".concat(value));
1764
1764
  cb === null || cb === void 0 ? void 0 : cb();
1765
+ },
1766
+ aiPredictReset: function aiPredictReset() {
1767
+ setTimeout(function () {
1768
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1769
+ setCurrentSuggestion('');
1770
+ }, 0);
1765
1771
  }
1766
1772
  };
1767
1773
  }, [contentRef]);
@@ -1208,6 +1208,12 @@ var Input = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(funct
1208
1208
  set: function set(value, cb) {
1209
1209
  setChangedVal("".concat(value));
1210
1210
  cb === null || cb === void 0 ? void 0 : cb();
1211
+ },
1212
+ aiPredictReset: function aiPredictReset() {
1213
+ setTimeout(function () {
1214
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1215
+ setCurrentSuggestion('');
1216
+ }, 0);
1211
1217
  }
1212
1218
  };
1213
1219
  }, [contentRef]);
@@ -1728,6 +1728,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1728
1728
  set: function set(value, cb) {
1729
1729
  setChangedVal("".concat(value));
1730
1730
  cb === null || cb === void 0 ? void 0 : cb();
1731
+ },
1732
+ aiPredictReset: function aiPredictReset() {
1733
+ setTimeout(function () {
1734
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1735
+ setCurrentSuggestion('');
1736
+ }, 0);
1731
1737
  }
1732
1738
  };
1733
1739
  }, [contentRef]);
@@ -1486,6 +1486,12 @@ var Textarea = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
1486
1486
  set: function set(value, cb) {
1487
1487
  setChangedVal("".concat(value));
1488
1488
  cb === null || cb === void 0 ? void 0 : cb();
1489
+ },
1490
+ aiPredictReset: function aiPredictReset() {
1491
+ setTimeout(function () {
1492
+ // Avoid conflicts with other asynchronous states, resulting in invalid clearing
1493
+ setCurrentSuggestion('');
1494
+ }, 0);
1489
1495
  }
1490
1496
  };
1491
1497
  }, [contentRef]);
@@ -137,59 +137,63 @@ const ColorPicker = forwardRef((props: ColorPickerProps, externalRef: any) => {
137
137
  )} ref={rootRef}>
138
138
  {label ? <>{typeof label === 'string' ? <label htmlFor={idRes} className="form-label" dangerouslySetInnerHTML={{ __html: `${label}` }}></label> : <label htmlFor={idRes} className="form-label">{label}</label>}</> : null}
139
139
 
140
+ <div className="position-relative">
140
141
  <div className="input-group">
141
- <input
142
- ref={(node) => {
143
- valRef.current = node;
144
- if (typeof externalRef === 'function') {
145
- externalRef(node);
146
- } else if (externalRef) {
147
- externalRef.current = node;
148
- }
149
- }}
150
-
151
-
152
- tabIndex={tabIndex || 0}
153
- type='color'
154
- className={combinedCls(
155
- clsWrite(controlClassName, 'form-control custom-colorpicker-control flex-grow-0'),
156
- controlExClassName
157
- )}
158
- value={changedVal}
159
- onFocus={handleFocus}
160
- onBlur={handleBlur}
161
- onChange={handleChange}
162
- disabled={disabled || null}
163
- readOnly={readOnly || null}
164
- style={style}
165
- {...attributes}
166
- />
167
-
168
- {/* Prevents the color from automatically becoming #000000 when it is empty */}
169
- <input
170
- tabIndex={-1}
171
- type="hidden"
172
- id={idRes}
173
- name={name}
174
- value={changedVal} // do not use `defaultValue`
175
- onChange={() => void(0)}
176
- required={required || null}
177
- {...attributes}
178
- />
179
-
180
- {changedVal !== '' ? <><button tabIndex={-1} type="button" className={clearBtnClassName || 'btn btn-link btn-sm'} onClick={(e: React.MouseEvent) => {
181
- setChangedVal('');
182
- onChange?.(e);
183
- onClear?.(e);
184
- }}>{clearBtnLabel || 'clear'}
185
- </button></> : null}
186
-
142
+ <input
143
+ ref={(node) => {
144
+ valRef.current = node;
145
+ if (typeof externalRef === 'function') {
146
+ externalRef(node);
147
+ } else if (externalRef) {
148
+ externalRef.current = node;
149
+ }
150
+ }}
151
+
152
+
153
+ tabIndex={tabIndex || 0}
154
+ type='color'
155
+ className={combinedCls(
156
+ clsWrite(controlClassName, 'form-control custom-colorpicker-control flex-grow-0'),
157
+ controlExClassName
158
+ )}
159
+ value={changedVal}
160
+ onFocus={handleFocus}
161
+ onBlur={handleBlur}
162
+ onChange={handleChange}
163
+ disabled={disabled || null}
164
+ readOnly={readOnly || null}
165
+ style={style}
166
+ {...attributes}
167
+ />
168
+
169
+ {/* Prevents the color from automatically becoming #000000 when it is empty */}
170
+ <input
171
+ tabIndex={-1}
172
+ type="hidden"
173
+ id={idRes}
174
+ name={name}
175
+ value={changedVal} // do not use `defaultValue`
176
+ onChange={() => void(0)}
177
+ required={required || null}
178
+ {...attributes}
179
+ />
180
+
181
+ {changedVal !== '' ? <><button tabIndex={-1} type="button" className={clearBtnClassName || 'btn btn-link btn-sm'} onClick={(e: React.MouseEvent) => {
182
+ setChangedVal('');
183
+ onChange?.(e);
184
+ onClear?.(e);
185
+ }}>{clearBtnLabel || 'clear'}
186
+ </button></> : null}
187
+
188
+
189
+ </div>
190
+ {required ? <>{requiredLabel || requiredLabel === '' ? requiredLabel : <span className="position-absolute end-0 top-0 my-2 mx-2"><span className="text-danger">*</span></span>}</> : ''}
191
+
192
+ {changedVal === '' ? <><div className="custom-colorpicker__transparent-placeholder"></div></> : null}
187
193
 
188
194
  </div>
189
- {required ? <>{requiredLabel || requiredLabel === '' ? requiredLabel : <span className="position-absolute end-0 top-0 my-2 mx-2"><span className="text-danger">*</span></span>}</> : ''}
190
-
191
- {changedVal === '' ? <><div className="custom-colorpicker__transparent-placeholder"></div></> : null}
192
195
 
196
+
193
197
  </div>
194
198
 
195
199
 
@@ -6,8 +6,6 @@ import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
6
6
  import { actualPropertyValue, getTextTop } from 'funda-utils/dist/cjs/inputsCalculation';
7
7
  import useDebounce from 'funda-utils/dist/cjs/useDebounce';
8
8
 
9
-
10
-
11
9
  export type InputProps = {
12
10
  contentRef?: React.ForwardedRef<any>;
13
11
  wrapperClassName?: string;
@@ -316,7 +314,12 @@ const Input = forwardRef((props: InputProps, externalRef: any) => {
316
314
  set: (value: string, cb?: any) => {
317
315
  setChangedVal(`${value}`);
318
316
  cb?.();
319
- }
317
+ },
318
+ aiPredictReset: () => {
319
+ setTimeout(() => { // Avoid conflicts with other asynchronous states, resulting in invalid clearing
320
+ setCurrentSuggestion('');
321
+ }, 0);
322
+ },
320
323
  }),
321
324
  [contentRef],
322
325
  );
@@ -18,7 +18,7 @@ export type TabsProps = {
18
18
  animTransitionDuration?: number;
19
19
  /** -- */
20
20
  style?: React.CSSProperties;
21
- onChange?: (nav: any, targetId: any, index: number, persistentIndex: number) => void;
21
+ onChange?: (nav: HTMLElement, targetId: string, index: number, persistentIndex: number) => void;
22
22
  onLoad?: (func: Function) => void;
23
23
  children: React.ReactNode | React.ReactNode[];
24
24
 
@@ -292,7 +292,12 @@ const Textarea = forwardRef((props: TextareaProps, externalRef: any) => {
292
292
  set: (value: string, cb?: any) => {
293
293
  setChangedVal(`${value}`);
294
294
  cb?.();
295
- }
295
+ },
296
+ aiPredictReset: () => {
297
+ setTimeout(() => { // Avoid conflicts with other asynchronous states, resulting in invalid clearing
298
+ setCurrentSuggestion('');
299
+ }, 0);
300
+ },
296
301
  }),
297
302
  [contentRef]
298
303
  );
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": "4.5.676",
5
+ "version": "4.5.680",
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",