diginet-core-ui 1.3.96 → 1.3.97
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/form-control/attachment/index.js +54 -47
- package/components/form-control/dropdown/index.js +395 -335
- package/components/popover/index.js +32 -32
- package/global/index.js +19 -2
- package/icons/basic.js +28 -0
- package/package.json +1 -1
- package/readme.md +5 -0
|
@@ -556,9 +556,9 @@ Popover.defaultProps = {
|
|
|
556
556
|
Popover.propTypes = {
|
|
557
557
|
/** An HTML element, or a function that returns one. It's used to set the position of the popover. */
|
|
558
558
|
anchor: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.func, PropTypes.object, PropTypes.node, ref]),
|
|
559
|
-
/**
|
|
560
|
-
* This is the point on the anchor where the popover's anchor will attach to.
|
|
561
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
559
|
+
/**
|
|
560
|
+
* This is the point on the anchor where the popover's anchor will attach to.
|
|
561
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
562
562
|
*/
|
|
563
563
|
anchorOrigin: PropTypes.shape({
|
|
564
564
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -574,14 +574,14 @@ Popover.propTypes = {
|
|
|
574
574
|
className: PropTypes.string,
|
|
575
575
|
/** If `true`, click outside will close component. */
|
|
576
576
|
clickOutsideToClose: PropTypes.bool,
|
|
577
|
-
/**
|
|
578
|
-
* Direction when Popover shown.
|
|
579
|
-
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
580
|
-
*
|
|
581
|
-
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
582
|
-
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
583
|
-
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
584
|
-
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
577
|
+
/**
|
|
578
|
+
* Direction when Popover shown.
|
|
579
|
+
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
580
|
+
*
|
|
581
|
+
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
582
|
+
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
583
|
+
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
584
|
+
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
585
585
|
*/
|
|
586
586
|
direction: PropTypes.oneOf(['top', 'left', 'right', 'bottom']),
|
|
587
587
|
/** Height of the component. */
|
|
@@ -598,9 +598,9 @@ Popover.propTypes = {
|
|
|
598
598
|
pressESCToClose: PropTypes.bool,
|
|
599
599
|
/** Style inline of component. */
|
|
600
600
|
style: PropTypes.object,
|
|
601
|
-
/**
|
|
602
|
-
* This is the point on the popover which will attach to the anchor's origin.
|
|
603
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
601
|
+
/**
|
|
602
|
+
* This is the point on the popover which will attach to the anchor's origin.
|
|
603
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
604
604
|
*/
|
|
605
605
|
transformOrigin: PropTypes.shape({
|
|
606
606
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -612,24 +612,24 @@ Popover.propTypes = {
|
|
|
612
612
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
613
613
|
/** Config z-index of the component. */
|
|
614
614
|
zIndex: PropTypes.number
|
|
615
|
-
/**
|
|
616
|
-
* ref methods (ref.current.instance.*method*)
|
|
617
|
-
*
|
|
618
|
-
* * show: Show popover
|
|
619
|
-
* * close: Close popover
|
|
620
|
-
* * setPosition(element): Set position of popover
|
|
621
|
-
* * @param {element} - element
|
|
622
|
-
*
|
|
623
|
-
* * option(): Gets all UI component properties
|
|
624
|
-
* * Returns value - object
|
|
625
|
-
* * option(optionName): Gets the value of a single property
|
|
626
|
-
* * @param {optionName} - string
|
|
627
|
-
* * Returns value - any
|
|
628
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
629
|
-
* * @param {optionName} - string
|
|
630
|
-
* * @param {optionValue} - any
|
|
631
|
-
* * option(options): Updates the values of several properties
|
|
632
|
-
* * @param {options} - object
|
|
615
|
+
/**
|
|
616
|
+
* ref methods (ref.current.instance.*method*)
|
|
617
|
+
*
|
|
618
|
+
* * show: Show popover
|
|
619
|
+
* * close: Close popover
|
|
620
|
+
* * setPosition(element): Set position of popover
|
|
621
|
+
* * @param {element} - element
|
|
622
|
+
*
|
|
623
|
+
* * option(): Gets all UI component properties
|
|
624
|
+
* * Returns value - object
|
|
625
|
+
* * option(optionName): Gets the value of a single property
|
|
626
|
+
* * @param {optionName} - string
|
|
627
|
+
* * Returns value - any
|
|
628
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
629
|
+
* * @param {optionName} - string
|
|
630
|
+
* * @param {optionValue} - any
|
|
631
|
+
* * option(options): Updates the values of several properties
|
|
632
|
+
* * @param {options} - object
|
|
633
633
|
*/
|
|
634
634
|
};
|
|
635
635
|
|
package/global/index.js
CHANGED
|
@@ -145,12 +145,29 @@ const globalObject = {
|
|
|
145
145
|
inputPlaceholder: 'Type something',
|
|
146
146
|
dropdownPlaceholder: 'Select'
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
//Global variable
|
|
149
|
+
delayOnInput: 500,
|
|
150
|
+
maxSizeUpload: Infinity,
|
|
151
|
+
//Components
|
|
152
|
+
components: {
|
|
153
|
+
attachment: {
|
|
154
|
+
defaultProps: {
|
|
155
|
+
allowSort: true,
|
|
156
|
+
className: '',
|
|
157
|
+
data: [],
|
|
158
|
+
disabled: false,
|
|
159
|
+
maxFile: Infinity,
|
|
160
|
+
multiple: true,
|
|
161
|
+
style: {},
|
|
162
|
+
viewType: 'detail'
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
149
166
|
};
|
|
150
167
|
export const getGlobal = (key, language = locale.get()) => {
|
|
151
168
|
var _globalObject$languag;
|
|
152
169
|
if (Array.isArray(key)) {
|
|
153
|
-
let result = globalObject[language];
|
|
170
|
+
let result = key[0] === 'components' ? globalObject : globalObject[language];
|
|
154
171
|
for (let i = 0; i < key.length; i++) {
|
|
155
172
|
if (!result[key[i]]) {
|
|
156
173
|
return null;
|
package/icons/basic.js
CHANGED
|
@@ -6952,6 +6952,34 @@ export const CancelFilled = /*#__PURE__*/memo(({
|
|
|
6952
6952
|
fill: colors[color] || color
|
|
6953
6953
|
}));
|
|
6954
6954
|
});
|
|
6955
|
+
export const Car = /*#__PURE__*/memo(({
|
|
6956
|
+
width,
|
|
6957
|
+
height,
|
|
6958
|
+
color = '#7F828E',
|
|
6959
|
+
viewBox = false
|
|
6960
|
+
}) => {
|
|
6961
|
+
return viewBox ? /*#__PURE__*/React.createElement("svg", {
|
|
6962
|
+
width: width || 24,
|
|
6963
|
+
height: height || 24,
|
|
6964
|
+
viewBox: "0 0 24 24",
|
|
6965
|
+
fill: "none"
|
|
6966
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
6967
|
+
fillRule: "evenodd",
|
|
6968
|
+
clipRule: "evenodd",
|
|
6969
|
+
d: "M17.5 5C18.16 5 18.72 5.42 18.92 6.01L21 12V20C21 20.55 20.55 21 20 21H19C18.45 21 18 20.55 18 20V19H6V20C6 20.55 5.55 21 5 21H4C3.45 21 3 20.55 3 20V12L5.08 6.01C5.29 5.42 5.84 5 6.5 5H17.5ZM5 14.5C5 15.33 5.67 16 6.5 16C7.33 16 8 15.33 8 14.5C8 13.67 7.33 13 6.5 13C5.67 13 5 13.67 5 14.5ZM17.5 16C16.67 16 16 15.33 16 14.5C16 13.67 16.67 13 17.5 13C18.33 13 19 13.67 19 14.5C19 15.33 18.33 16 17.5 16ZM6.5 6.5L5 11H19L17.5 6.5H6.5Z",
|
|
6970
|
+
fill: colors[color] || color
|
|
6971
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
|
6972
|
+
width: width || 18,
|
|
6973
|
+
height: height || 16,
|
|
6974
|
+
viewBox: "0 0 18 16",
|
|
6975
|
+
fill: "none"
|
|
6976
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
6977
|
+
fillRule: "evenodd",
|
|
6978
|
+
clipRule: "evenodd",
|
|
6979
|
+
d: "M14.5 0C15.16 0 15.72 0.42 15.92 1.01L18 7V15C18 15.55 17.55 16 17 16H16C15.45 16 15 15.55 15 15V14H3V15C3 15.55 2.55 16 2 16H1C0.45 16 0 15.55 0 15V7L2.08 1.01C2.29 0.42 2.84 0 3.5 0H14.5ZM2 9.5C2 10.33 2.67 11 3.5 11C4.33 11 5 10.33 5 9.5C5 8.67 4.33 8 3.5 8C2.67 8 2 8.67 2 9.5ZM14.5 11C13.67 11 13 10.33 13 9.5C13 8.67 13.67 8 14.5 8C15.33 8 16 8.67 16 9.5C16 10.33 15.33 11 14.5 11ZM3.5 1.5L2 6H16L14.5 1.5H3.5Z",
|
|
6980
|
+
fill: colors[color] || color
|
|
6981
|
+
}));
|
|
6982
|
+
});
|
|
6955
6983
|
export const CloseFilled = /*#__PURE__*/memo(({
|
|
6956
6984
|
width,
|
|
6957
6985
|
height,
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -38,6 +38,11 @@ npm test
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Changelog
|
|
41
|
+
## 1.3.97
|
|
42
|
+
- \[Added\]: Icon – Add Car
|
|
43
|
+
- \[Fixed\]: Attachment – Fix bug remove file
|
|
44
|
+
- \[Fixed\]: Dropdown – Optimize code with useState
|
|
45
|
+
|
|
41
46
|
## 1.3.96
|
|
42
47
|
- \[Changed\]: Popover – Add prop onOpen
|
|
43
48
|
- \[Changed\]: ButtonMore – Add tooltip for icon
|