diginet-core-ui 1.3.75-beta.1 → 1.3.75-beta.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.
|
@@ -437,15 +437,15 @@ Avatar.propTypes = {
|
|
|
437
437
|
/** If `true`, display remove avatar icon. */
|
|
438
438
|
clearAble: PropTypes.bool,
|
|
439
439
|
|
|
440
|
-
/**
|
|
441
|
-
* data to display when hoverAble is true<br />
|
|
442
|
-
* data is an object or function return a jsx element
|
|
440
|
+
/**
|
|
441
|
+
* data to display when hoverAble is true<br />
|
|
442
|
+
* data is an object or function return a jsx element
|
|
443
443
|
*/
|
|
444
444
|
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
|
|
445
445
|
|
|
446
|
-
/**
|
|
447
|
-
* it is used to display the default if there is no src<br />
|
|
448
|
-
* if undefined, will display icons available in the icons store
|
|
446
|
+
/**
|
|
447
|
+
* it is used to display the default if there is no src<br />
|
|
448
|
+
* if undefined, will display icons available in the icons store
|
|
449
449
|
*/
|
|
450
450
|
defaultSrc: PropTypes.string,
|
|
451
451
|
|
|
@@ -500,19 +500,19 @@ Avatar.propTypes = {
|
|
|
500
500
|
/** the error to show on wrong type */
|
|
501
501
|
wrongTypeError: PropTypes.string,
|
|
502
502
|
|
|
503
|
-
/**
|
|
504
|
-
* ref methods
|
|
505
|
-
*
|
|
506
|
-
* * option(): Gets all UI component properties
|
|
507
|
-
* * Returns value - object
|
|
508
|
-
* * option(optionName): Gets the value of a single property
|
|
509
|
-
* * @param {optionName} - string
|
|
510
|
-
* * Returns value - any
|
|
511
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
512
|
-
* * @param {optionName} - string
|
|
513
|
-
* * @param {optionValue} - any
|
|
514
|
-
* * option(options): Updates the values of several properties
|
|
515
|
-
* * @param {options} - object
|
|
503
|
+
/**
|
|
504
|
+
* ref methods
|
|
505
|
+
*
|
|
506
|
+
* * option(): Gets all UI component properties
|
|
507
|
+
* * Returns value - object
|
|
508
|
+
* * option(optionName): Gets the value of a single property
|
|
509
|
+
* * @param {optionName} - string
|
|
510
|
+
* * Returns value - any
|
|
511
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
512
|
+
* * @param {optionName} - string
|
|
513
|
+
* * @param {optionValue} - any
|
|
514
|
+
* * option(options): Updates the values of several properties
|
|
515
|
+
* * @param {options} - object
|
|
516
516
|
*/
|
|
517
517
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
518
518
|
current: PropTypes.instanceOf(Element)
|
|
@@ -376,14 +376,14 @@ ButtonIcon.propTypes = {
|
|
|
376
376
|
/** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
|
|
377
377
|
name: PropTypes.string,
|
|
378
378
|
|
|
379
|
-
/**
|
|
380
|
-
* The size of the component.
|
|
381
|
-
*
|
|
382
|
-
* * tiny (button 24px, icon 16px)
|
|
383
|
-
* * small (button 32px, icon 20px)
|
|
384
|
-
* * medium (button 40px, icon 24px)
|
|
385
|
-
* * large (button 48px, icon 32px)
|
|
386
|
-
* * giant (button 56px, icon 40px)
|
|
379
|
+
/**
|
|
380
|
+
* The size of the component.
|
|
381
|
+
*
|
|
382
|
+
* * tiny (button 24px, icon 16px)
|
|
383
|
+
* * small (button 32px, icon 20px)
|
|
384
|
+
* * medium (button 40px, icon 24px)
|
|
385
|
+
* * large (button 48px, icon 32px)
|
|
386
|
+
* * giant (button 56px, icon 40px)
|
|
387
387
|
* */
|
|
388
388
|
size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
|
|
389
389
|
|
|
@@ -399,19 +399,19 @@ ButtonIcon.propTypes = {
|
|
|
399
399
|
/** Width of the component. */
|
|
400
400
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
401
401
|
|
|
402
|
-
/**
|
|
403
|
-
* ref methods (ref.current.instance.*method*)
|
|
404
|
-
*
|
|
405
|
-
* * option(): Gets all UI component properties
|
|
406
|
-
* * Returns value - object
|
|
407
|
-
* * option(optionName): Gets the value of a single property
|
|
408
|
-
* * @param {optionName} - string
|
|
409
|
-
* * Returns value - any
|
|
410
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
411
|
-
* * @param {optionName} - string
|
|
412
|
-
* * @param {optionValue} - any
|
|
413
|
-
* * option(options): Updates the values of several properties
|
|
414
|
-
* * @param {options} - object
|
|
402
|
+
/**
|
|
403
|
+
* ref methods (ref.current.instance.*method*)
|
|
404
|
+
*
|
|
405
|
+
* * option(): Gets all UI component properties
|
|
406
|
+
* * Returns value - object
|
|
407
|
+
* * option(optionName): Gets the value of a single property
|
|
408
|
+
* * @param {optionName} - string
|
|
409
|
+
* * Returns value - any
|
|
410
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
411
|
+
* * @param {optionName} - string
|
|
412
|
+
* * @param {optionValue} - any
|
|
413
|
+
* * option(options): Updates the values of several properties
|
|
414
|
+
* * @param {options} - object
|
|
415
415
|
*/
|
|
416
416
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
417
417
|
current: PropTypes.instanceOf(Element)
|
|
@@ -491,19 +491,19 @@ Button.propTypes = {
|
|
|
491
491
|
/** The variant to use. */
|
|
492
492
|
viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'link']),
|
|
493
493
|
|
|
494
|
-
/**
|
|
495
|
-
* ref methods (ref.current.instance.*method*)
|
|
496
|
-
*
|
|
497
|
-
* * option(): Gets all UI component properties
|
|
498
|
-
* * Returns value - object
|
|
499
|
-
* * option(optionName): Gets the value of a single property
|
|
500
|
-
* * @param {optionName} - string
|
|
501
|
-
* * Returns value - any
|
|
502
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
503
|
-
* * @param {optionName} - string
|
|
504
|
-
* * @param {optionValue} - any
|
|
505
|
-
* * option(options): Updates the values of several properties
|
|
506
|
-
* * @param {options} - object
|
|
494
|
+
/**
|
|
495
|
+
* ref methods (ref.current.instance.*method*)
|
|
496
|
+
*
|
|
497
|
+
* * option(): Gets all UI component properties
|
|
498
|
+
* * Returns value - object
|
|
499
|
+
* * option(optionName): Gets the value of a single property
|
|
500
|
+
* * @param {optionName} - string
|
|
501
|
+
* * Returns value - any
|
|
502
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
503
|
+
* * @param {optionName} - string
|
|
504
|
+
* * @param {optionValue} - any
|
|
505
|
+
* * option(options): Updates the values of several properties
|
|
506
|
+
* * @param {options} - object
|
|
507
507
|
*/
|
|
508
508
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
509
509
|
current: PropTypes.instanceOf(Element)
|
|
@@ -433,10 +433,10 @@ TextInput.propTypes = {
|
|
|
433
433
|
/** Type of the input element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types). */
|
|
434
434
|
type: PropTypes.oneOf(['inform', 'edit', 'quickEdit', 'text', 'number', 'password']),
|
|
435
435
|
|
|
436
|
-
/** Validation value, argument can:<br/>
|
|
437
|
-
* * string: the validation rule. Example required.<br/>
|
|
438
|
-
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
439
|
-
* * array: the validation rule list, insist object/string
|
|
436
|
+
/** Validation value, argument can:<br/>
|
|
437
|
+
* * string: the validation rule. Example required.<br/>
|
|
438
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
439
|
+
* * array: the validation rule list, insist object/string
|
|
440
440
|
*/
|
|
441
441
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
442
442
|
|
|
@@ -496,7 +496,10 @@ const Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
496
496
|
const currentRef = ref.current || {};
|
|
497
497
|
currentRef.element = ref.current;
|
|
498
498
|
const _instance = {
|
|
499
|
-
show: el =>
|
|
499
|
+
show: el => {
|
|
500
|
+
if (el) setElement(el);
|
|
501
|
+
!openState && el ? updatePositionPopover(el, onOpenPopover()) : onOpenPopover();
|
|
502
|
+
},
|
|
500
503
|
close: () => onClosePopover(),
|
|
501
504
|
setPosition: el => updatePositionPopover(el),
|
|
502
505
|
...action
|