diginet-core-ui 1.3.74 → 1.3.75
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/components/avatar/index.js +19 -19
- package/components/form-control/date-range-picker/index.js +6 -6
- package/components/form-control/dropdown/index.js +35 -35
- package/components/form-control/text-input/index.js +4 -4
- package/components/popover/index.js +21 -21
- package/components/tab/tab-header.js +2 -2
- package/components/tab/tab.js +2 -2
- package/components/tree-view/index.js +38 -38
- package/components/typography/index.js +12 -12
- package/package.json +1 -1
- package/readme.md +3 -0
- package/styles/general.js +11 -11
- package/theme/set-theme.js +3 -3
|
@@ -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)
|
|
@@ -463,8 +463,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
463
463
|
tableData = [],
|
|
464
464
|
weekDateFirst = getDateOfWeek(firstDay),
|
|
465
465
|
weekDateLast = getDateOfWeek(lastDay);
|
|
466
|
-
/**
|
|
467
|
-
* days of previous month
|
|
466
|
+
/**
|
|
467
|
+
* days of previous month
|
|
468
468
|
*/
|
|
469
469
|
|
|
470
470
|
for (let i = weekDateFirst; i > 0; i--) {
|
|
@@ -477,8 +477,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
477
477
|
className: unique.day.day
|
|
478
478
|
})));
|
|
479
479
|
}
|
|
480
|
-
/**
|
|
481
|
-
* days of current month
|
|
480
|
+
/**
|
|
481
|
+
* days of current month
|
|
482
482
|
*/
|
|
483
483
|
|
|
484
484
|
|
|
@@ -492,8 +492,8 @@ const DateRangePickerV2 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
492
492
|
}, jsx(Typography, { ...typographyProps(unique.day.day)
|
|
493
493
|
}, i + 1)));
|
|
494
494
|
}
|
|
495
|
-
/**
|
|
496
|
-
* days of next month
|
|
495
|
+
/**
|
|
496
|
+
* days of next month
|
|
497
497
|
*/
|
|
498
498
|
|
|
499
499
|
|
|
@@ -1850,14 +1850,14 @@ Dropdown.propTypes = {
|
|
|
1850
1850
|
/** The icon to display if not found the icon follow `iconExpr`. */
|
|
1851
1851
|
iconDefault: PropTypes.string,
|
|
1852
1852
|
|
|
1853
|
-
/** Field name used for icon display.<br/>
|
|
1854
|
-
* Example:<br/>
|
|
1855
|
-
* string: 'icon'<br/>
|
|
1856
|
-
* object: {<br/>
|
|
1857
|
-
* key: 'icon',<br/>
|
|
1858
|
-
* prefix: 'https://imglink.com',<br/>
|
|
1859
|
-
* suffix: '.jpg'<br/>
|
|
1860
|
-
* }
|
|
1853
|
+
/** Field name used for icon display.<br/>
|
|
1854
|
+
* Example:<br/>
|
|
1855
|
+
* string: 'icon'<br/>
|
|
1856
|
+
* object: {<br/>
|
|
1857
|
+
* key: 'icon',<br/>
|
|
1858
|
+
* prefix: 'https://imglink.com',<br/>
|
|
1859
|
+
* suffix: '.jpg'<br/>
|
|
1860
|
+
* }
|
|
1861
1861
|
*/
|
|
1862
1862
|
iconExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
1863
1863
|
key: PropTypes.string,
|
|
@@ -1872,9 +1872,9 @@ Dropdown.propTypes = {
|
|
|
1872
1872
|
/** The displayed value of component. */
|
|
1873
1873
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1874
1874
|
|
|
1875
|
-
/** Field name used for text display in dropdown list.<br/>
|
|
1876
|
-
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1877
|
-
* Note: don't use 'id - name', return undefined
|
|
1875
|
+
/** Field name used for text display in dropdown list.<br/>
|
|
1876
|
+
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1877
|
+
* Note: don't use 'id - name', return undefined
|
|
1878
1878
|
*/
|
|
1879
1879
|
displayExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1880
1880
|
|
|
@@ -1884,10 +1884,10 @@ Dropdown.propTypes = {
|
|
|
1884
1884
|
/** The field name used for the returned result. */
|
|
1885
1885
|
valueExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1886
1886
|
|
|
1887
|
-
/**
|
|
1888
|
-
* Duration wait enter search content on search.<br/>
|
|
1889
|
-
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1890
|
-
* If `true`, used default delayOnInput.
|
|
1887
|
+
/**
|
|
1888
|
+
* Duration wait enter search content on search.<br/>
|
|
1889
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1890
|
+
* If `true`, used default delayOnInput.
|
|
1891
1891
|
*/
|
|
1892
1892
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
1893
1893
|
|
|
@@ -1954,19 +1954,19 @@ Dropdown.propTypes = {
|
|
|
1954
1954
|
/** The array of elements that appear in the dropdown list. */
|
|
1955
1955
|
dataSource: PropTypes.array,
|
|
1956
1956
|
|
|
1957
|
-
/** Function displays items by custom.<br/>
|
|
1958
|
-
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1959
|
-
* --> such as: displayExpr={'name - role'}
|
|
1957
|
+
/** Function displays items by custom.<br/>
|
|
1958
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1959
|
+
* --> such as: displayExpr={'name - role'}
|
|
1960
1960
|
*/
|
|
1961
1961
|
renderItem: PropTypes.func,
|
|
1962
1962
|
|
|
1963
|
-
/** Function or field name used for display selected items, example:<br/>
|
|
1964
|
-
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1963
|
+
/** Function or field name used for display selected items, example:<br/>
|
|
1964
|
+
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1965
1965
|
*/
|
|
1966
1966
|
renderSelectedItem: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1967
1967
|
|
|
1968
|
-
/** Callback fired when the input value changes.<br/>
|
|
1969
|
-
* if undefined: the filter function will run (default)
|
|
1968
|
+
/** Callback fired when the input value changes.<br/>
|
|
1969
|
+
* if undefined: the filter function will run (default)
|
|
1970
1970
|
*/
|
|
1971
1971
|
onInput: PropTypes.func,
|
|
1972
1972
|
|
|
@@ -1997,19 +1997,19 @@ Dropdown.propTypes = {
|
|
|
1997
1997
|
/** If `true`, show multi-line selected item(s). */
|
|
1998
1998
|
multilineSelectedItem: PropTypes.bool,
|
|
1999
1999
|
|
|
2000
|
-
/**
|
|
2001
|
-
* ref methods
|
|
2002
|
-
*
|
|
2003
|
-
* how to get component element? ref.current
|
|
2004
|
-
*
|
|
2005
|
-
* how to call method? ref.current.instance.{method}
|
|
2006
|
-
*
|
|
2007
|
-
* * showDropdown(): Show dropdown
|
|
2008
|
-
* * closeDropdown(): Close dropdown
|
|
2009
|
-
* * onClear(): Clear selected value
|
|
2010
|
-
* * setPreviousValue(): Set value to previous value
|
|
2011
|
-
* * setValue(value): Set value of dropdown
|
|
2012
|
-
* * @param {value} - string || number || array
|
|
2000
|
+
/**
|
|
2001
|
+
* ref methods
|
|
2002
|
+
*
|
|
2003
|
+
* how to get component element? ref.current
|
|
2004
|
+
*
|
|
2005
|
+
* how to call method? ref.current.instance.{method}
|
|
2006
|
+
*
|
|
2007
|
+
* * showDropdown(): Show dropdown
|
|
2008
|
+
* * closeDropdown(): Close dropdown
|
|
2009
|
+
* * onClear(): Clear selected value
|
|
2010
|
+
* * setPreviousValue(): Set value to previous value
|
|
2011
|
+
* * setValue(value): Set value of dropdown
|
|
2012
|
+
* * @param {value} - string || number || array
|
|
2013
2013
|
*/
|
|
2014
2014
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
2015
2015
|
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
|
|
|
@@ -617,9 +617,9 @@ Popover.propTypes = {
|
|
|
617
617
|
/** An HTML element, or a function that returns one. It's used to set the position of the popover. */
|
|
618
618
|
anchor: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.func, PropTypes.object, PropTypes.node, ref]),
|
|
619
619
|
|
|
620
|
-
/**
|
|
621
|
-
* This is the point on the anchor where the popover's anchor will attach to.
|
|
622
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
620
|
+
/**
|
|
621
|
+
* This is the point on the anchor where the popover's anchor will attach to.
|
|
622
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
623
623
|
*/
|
|
624
624
|
anchorOrigin: PropTypes.shape({
|
|
625
625
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -641,14 +641,14 @@ Popover.propTypes = {
|
|
|
641
641
|
/** If `true`, click outside will close component. */
|
|
642
642
|
clickOutsideToClose: PropTypes.bool,
|
|
643
643
|
|
|
644
|
-
/**
|
|
645
|
-
* Direction when Popover shown.
|
|
646
|
-
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
647
|
-
*
|
|
648
|
-
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
649
|
-
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
650
|
-
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
651
|
-
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
644
|
+
/**
|
|
645
|
+
* Direction when Popover shown.
|
|
646
|
+
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
647
|
+
*
|
|
648
|
+
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
649
|
+
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
650
|
+
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
651
|
+
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
652
652
|
*/
|
|
653
653
|
direction: PropTypes.oneOf(['top', 'left', 'right', 'bottom']),
|
|
654
654
|
|
|
@@ -667,9 +667,9 @@ Popover.propTypes = {
|
|
|
667
667
|
/** Style inline of component. */
|
|
668
668
|
style: PropTypes.object,
|
|
669
669
|
|
|
670
|
-
/**
|
|
671
|
-
* This is the point on the popover which will attach to the anchor's origin.
|
|
672
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
670
|
+
/**
|
|
671
|
+
* This is the point on the popover which will attach to the anchor's origin.
|
|
672
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
673
673
|
*/
|
|
674
674
|
transformOrigin: PropTypes.shape({
|
|
675
675
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -682,13 +682,13 @@ Popover.propTypes = {
|
|
|
682
682
|
/** Config z-index of the component. */
|
|
683
683
|
zIndex: PropTypes.number,
|
|
684
684
|
|
|
685
|
-
/**
|
|
686
|
-
* ref methods (ref.current.instance.*method*)
|
|
687
|
-
*
|
|
688
|
-
* * show: Show popover
|
|
689
|
-
* * close: Close popover
|
|
690
|
-
* * setPosition(element): Set position of popover
|
|
691
|
-
* * @param {element} - element
|
|
685
|
+
/**
|
|
686
|
+
* ref methods (ref.current.instance.*method*)
|
|
687
|
+
*
|
|
688
|
+
* * show: Show popover
|
|
689
|
+
* * close: Close popover
|
|
690
|
+
* * setPosition(element): Set position of popover
|
|
691
|
+
* * @param {element} - element
|
|
692
692
|
*/
|
|
693
693
|
reference: ref
|
|
694
694
|
};
|
package/components/tab/tab.js
CHANGED
|
@@ -1071,10 +1071,10 @@ TreeView.propTypes = {
|
|
|
1071
1071
|
/** class on element */
|
|
1072
1072
|
className: PropTypes.string,
|
|
1073
1073
|
|
|
1074
|
-
/**
|
|
1075
|
-
* field name used for text display<br/>
|
|
1076
|
-
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1077
|
-
* Note: don't use 'id - name', return undefined
|
|
1074
|
+
/**
|
|
1075
|
+
* field name used for text display<br/>
|
|
1076
|
+
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1077
|
+
* Note: don't use 'id - name', return undefined
|
|
1078
1078
|
*/
|
|
1079
1079
|
displayExpr: PropTypes.string,
|
|
1080
1080
|
|
|
@@ -1084,19 +1084,19 @@ TreeView.propTypes = {
|
|
|
1084
1084
|
/** return value for the select multiple use case */
|
|
1085
1085
|
multipleValueMode: PropTypes.oneOf(['single', 'multiple', 'inheritance']),
|
|
1086
1086
|
|
|
1087
|
-
/**
|
|
1088
|
-
* return value for the select multiple use case
|
|
1089
|
-
* * contains: "Công ty" contains "công", but not contains "cong"
|
|
1090
|
-
* * similar: "Công ty" contains "công" and "cong"
|
|
1087
|
+
/**
|
|
1088
|
+
* return value for the select multiple use case
|
|
1089
|
+
* * contains: "Công ty" contains "công", but not contains "cong"
|
|
1090
|
+
* * similar: "Công ty" contains "công" and "cong"
|
|
1091
1091
|
*/
|
|
1092
1092
|
searchMode: PropTypes.oneOf(['contains', 'similar']),
|
|
1093
1093
|
|
|
1094
1094
|
/** The content display for label of checkbox select all */
|
|
1095
1095
|
selectAllLabel: PropTypes.string,
|
|
1096
1096
|
|
|
1097
|
-
/**
|
|
1098
|
-
* duration wait enter search content on search<br/>
|
|
1099
|
-
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1097
|
+
/**
|
|
1098
|
+
* duration wait enter search content on search<br/>
|
|
1099
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1100
1100
|
*/
|
|
1101
1101
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1102
1102
|
|
|
@@ -1112,20 +1112,20 @@ TreeView.propTypes = {
|
|
|
1112
1112
|
/** the value was selected */
|
|
1113
1113
|
value: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
1114
1114
|
|
|
1115
|
-
/** function displays items by custom<br/>
|
|
1116
|
-
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1117
|
-
* --> such as: displayExpr={'name - role'}
|
|
1115
|
+
/** function displays items by custom<br/>
|
|
1116
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1117
|
+
* --> such as: displayExpr={'name - role'}
|
|
1118
1118
|
*/
|
|
1119
1119
|
renderItem: PropTypes.func,
|
|
1120
1120
|
|
|
1121
|
-
/**
|
|
1122
|
-
* on change value function<br />
|
|
1123
|
-
* return 2 parameters (e, data)<br />
|
|
1124
|
-
* * e: element (insist {value, justSelected, data})<br/>
|
|
1125
|
-
* + value is one or an array of selected values<br />
|
|
1126
|
-
* + justSelected is value has just been selected (either true or false))<br />
|
|
1127
|
-
* + data is one or an array of selected values with full information<br />
|
|
1128
|
-
* * data: array of selected values (not recommend because it's the same e.value)
|
|
1121
|
+
/**
|
|
1122
|
+
* on change value function<br />
|
|
1123
|
+
* return 2 parameters (e, data)<br />
|
|
1124
|
+
* * e: element (insist {value, justSelected, data})<br/>
|
|
1125
|
+
* + value is one or an array of selected values<br />
|
|
1126
|
+
* + justSelected is value has just been selected (either true or false))<br />
|
|
1127
|
+
* + data is one or an array of selected values with full information<br />
|
|
1128
|
+
* * data: array of selected values (not recommend because it's the same e.value)
|
|
1129
1129
|
*/
|
|
1130
1130
|
onChange: PropTypes.func,
|
|
1131
1131
|
|
|
@@ -1138,22 +1138,22 @@ TreeView.propTypes = {
|
|
|
1138
1138
|
/** the icon to display for collapse icon */
|
|
1139
1139
|
collapseIcon: PropTypes.any,
|
|
1140
1140
|
|
|
1141
|
-
/**
|
|
1142
|
-
* get ref of TreeView component, insist:<br/>
|
|
1143
|
-
* {<br/>
|
|
1144
|
-
* disabled: true/false,<br/>
|
|
1145
|
-
* displayExpr: string,<br/>
|
|
1146
|
-
* valueExpr: string,<br/>
|
|
1147
|
-
* id: string,<br/>
|
|
1148
|
-
* parentID: string,<br/>
|
|
1149
|
-
* value: string/array<br/>
|
|
1150
|
-
* getValue: get selected values (instead of onChange function),<br/>
|
|
1151
|
-
* setValue: set array of value (only multiple),<br/>
|
|
1152
|
-
* handleCheckbox: checked/unchecked a Checkbox, includes 2 parameters (isChecked, value):<br/>
|
|
1153
|
-
* + isChecked: checked if true (default is false) <br/>
|
|
1154
|
-
* + value: selected values, use 'all' for all values (default is 'all') <br/>
|
|
1155
|
-
* get: get DOM of TreeView component<br/>
|
|
1156
|
-
* }
|
|
1141
|
+
/**
|
|
1142
|
+
* get ref of TreeView component, insist:<br/>
|
|
1143
|
+
* {<br/>
|
|
1144
|
+
* disabled: true/false,<br/>
|
|
1145
|
+
* displayExpr: string,<br/>
|
|
1146
|
+
* valueExpr: string,<br/>
|
|
1147
|
+
* id: string,<br/>
|
|
1148
|
+
* parentID: string,<br/>
|
|
1149
|
+
* value: string/array<br/>
|
|
1150
|
+
* getValue: get selected values (instead of onChange function),<br/>
|
|
1151
|
+
* setValue: set array of value (only multiple),<br/>
|
|
1152
|
+
* handleCheckbox: checked/unchecked a Checkbox, includes 2 parameters (isChecked, value):<br/>
|
|
1153
|
+
* + isChecked: checked if true (default is false) <br/>
|
|
1154
|
+
* + value: selected values, use 'all' for all values (default is 'all') <br/>
|
|
1155
|
+
* get: get DOM of TreeView component<br/>
|
|
1156
|
+
* }
|
|
1157
1157
|
*/
|
|
1158
1158
|
ref: PropTypes.any
|
|
1159
1159
|
};
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
7
|
import { classNames, renderHTML } from '../../utils';
|
|
8
8
|
import { Popover } from '..';
|
|
9
|
-
import {
|
|
9
|
+
import { cursorPointer, displayBlock, displayInlineBlock, overflowHidden, positionRelative, textCapitalize, textCenter, textUppercase } from '../../styles/general';
|
|
10
10
|
import { color as colors } from '../../styles/colors';
|
|
11
11
|
import theme from '../../theme/settings';
|
|
12
12
|
const {
|
|
@@ -132,9 +132,9 @@ const Typography = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
132
132
|
const TextRootCSS = (color, type, lineClamp, onClick) => css`
|
|
133
133
|
${displayInlineBlock};
|
|
134
134
|
${positionRelative};
|
|
135
|
-
${breakWord};
|
|
136
135
|
${paragraph1};
|
|
137
136
|
${onClick && cursorPointer};
|
|
137
|
+
word-break: break-all;
|
|
138
138
|
white-space: break-spaces;
|
|
139
139
|
color: ${colorMap.get(color) || colors[color] || color};
|
|
140
140
|
max-width: max-content;
|
|
@@ -172,16 +172,16 @@ Typography.defaultProps = {
|
|
|
172
172
|
tooltipDirection: 'bottom',
|
|
173
173
|
type: 'p1'
|
|
174
174
|
};
|
|
175
|
-
/** type of text<br/>
|
|
176
|
-
* h1: Title <br/>
|
|
177
|
-
* h2: Header Popup <br/>
|
|
178
|
-
* h3: Header popup <br/>
|
|
179
|
-
* h4: Button, Tab, Title group <br/>
|
|
180
|
-
* h5: Label column, Title group <br/>
|
|
181
|
-
* h6: Label form <br/>
|
|
182
|
-
* p1: Body text <br/>
|
|
183
|
-
* p2: Body text <br/>
|
|
184
|
-
* p3: Notice, Tooltip <br/>
|
|
175
|
+
/** type of text<br/>
|
|
176
|
+
* h1: Title <br/>
|
|
177
|
+
* h2: Header Popup <br/>
|
|
178
|
+
* h3: Header popup <br/>
|
|
179
|
+
* h4: Button, Tab, Title group <br/>
|
|
180
|
+
* h5: Label column, Title group <br/>
|
|
181
|
+
* h6: Label form <br/>
|
|
182
|
+
* p1: Body text <br/>
|
|
183
|
+
* p2: Body text <br/>
|
|
184
|
+
* p3: Notice, Tooltip <br/>
|
|
185
185
|
*/
|
|
186
186
|
|
|
187
187
|
export const arrTypeTypography = ['t1', 't2', 't3', 't4', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p1', 'p2', 'p3', 'title1', 'title2', 'title3', 'title4', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6', 'paragraph1', 'paragraph2', 'paragraph3'];
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -38,6 +38,9 @@ npm test
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Changelog
|
|
41
|
+
## 1.3.75
|
|
42
|
+
- \[Fixed\]: Typography – Fix word-break css
|
|
43
|
+
|
|
41
44
|
## 1.3.74
|
|
42
45
|
- \[Added\]: Icon – ApprovalDouble, Error, OneSquare, TwoSquare, ThreeSquare, FourSquare, FiveSquare, AssignmentFilled, ReviewOutline
|
|
43
46
|
- \[Added\]: MenuIcon – MHRP29N0026 , MHRP29N0027, MHRP29N0028
|
package/styles/general.js
CHANGED
|
@@ -4,10 +4,10 @@ import { color } from './colors';
|
|
|
4
4
|
import { parseToPixel } from './utils';
|
|
5
5
|
export const rootSpacing = 4;
|
|
6
6
|
export let rootZIndex = 1500;
|
|
7
|
-
/**
|
|
8
|
-
* get value spacing with rootZIndex
|
|
9
|
-
* @param number
|
|
10
|
-
* @return {number}
|
|
7
|
+
/**
|
|
8
|
+
* get value spacing with rootZIndex
|
|
9
|
+
* @param number
|
|
10
|
+
* @return {number}
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export const zIndex = number => {
|
|
@@ -15,10 +15,10 @@ export const zIndex = number => {
|
|
|
15
15
|
if (isNaN(number)) return rootZIndex;
|
|
16
16
|
return rootZIndex + number;
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
19
|
-
* get value spacing with rootSpacing
|
|
20
|
-
* @param {(number|number[])} vl - default 1
|
|
21
|
-
* @returns {(number|string)}
|
|
18
|
+
/**
|
|
19
|
+
* get value spacing with rootSpacing
|
|
20
|
+
* @param {(number|number[])} vl - default 1
|
|
21
|
+
* @returns {(number|string)}
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
export const getSpacing = (vl = 1) => {
|
|
@@ -27,9 +27,9 @@ export const getSpacing = (vl = 1) => {
|
|
|
27
27
|
return vl.flatMap(i => isNaN(i) ? i : i * rootSpacing + 'px').join(' ');
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
/**
|
|
31
|
-
* replace rootZIndex
|
|
32
|
-
* @param number
|
|
30
|
+
/**
|
|
31
|
+
* replace rootZIndex
|
|
32
|
+
* @param number
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
export const setZIndex = number => {
|