diginet-core-ui 1.3.47 → 1.3.48

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.
@@ -0,0 +1,11 @@
1
+ <svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M30.7901 28.13C30.7901 27.5 30.2701 26.99 29.6401 26.99H19.2301C18.5901 26.99 18.0801 27.5 18.0801 28.13C18.0801 28.76 18.6001 29.27 19.2301 29.27H29.6401C30.2701 29.27 30.7901 28.76 30.7901 28.13Z" fill="#FF8C00"/>
3
+ <path d="M29.6401 22.41H19.2301C18.5901 22.41 18.0801 22.92 18.0801 23.55C18.0801 24.18 18.6001 24.69 19.2301 24.69H29.6401C30.2801 24.69 30.7901 24.18 30.7901 23.55C30.7901 22.93 30.2701 22.41 29.6401 22.41Z" fill="#FF8C00"/>
4
+ <path d="M19.2301 31.5601C18.5901 31.5601 18.0801 32.0701 18.0801 32.7001C18.0801 33.3301 18.6001 33.8401 19.2301 33.8401H25.0201C25.6601 33.8401 26.1701 33.3301 26.1701 32.7001C26.1701 32.0701 25.6501 31.5601 25.0201 31.5601H19.2301Z" fill="#FF8C00"/>
5
+ <path d="M10.0601 25.8101H11.2001V23.5701H10.2401V22.8501C10.8601 22.7501 11.1701 22.6401 11.5201 22.4301H12.3901V25.8201H13.3301V26.7601H10.0601V25.8101Z" fill="#FF8C00"/>
6
+ <path d="M14.8799 25.9401C14.8799 25.4501 15.2399 25.05 15.7799 25.05C16.3199 25.05 16.6799 25.4501 16.6799 25.9401C16.6799 26.4301 16.3199 26.83 15.7799 26.83C15.2399 26.83 14.8799 26.4301 14.8799 25.9401Z" fill="#FF8C00"/>
7
+ <path d="M9.92011 33.17C11.0901 32.23 11.9401 31.5 11.9401 30.91C11.9401 30.52 11.6901 30.34 11.3001 30.34C10.9801 30.34 10.7201 30.55 10.4901 30.75L9.86011 30.12C10.3401 29.64 10.7801 29.42 11.4701 29.42C12.4101 29.42 13.0601 29.98 13.0601 30.84C13.0601 31.54 12.3301 32.3 11.6101 32.9C11.8501 32.87 12.1801 32.85 12.4001 32.85H13.2801V33.83H9.92011V33.17Z" fill="#FF8C00"/>
8
+ <path d="M14.8799 33.03C14.8799 32.54 15.2399 32.14 15.7799 32.14C16.3199 32.14 16.6799 32.54 16.6799 33.03C16.6799 33.52 16.3199 33.92 15.7799 33.92C15.2399 33.92 14.8799 33.53 14.8799 33.03Z" fill="#FF8C00"/>
9
+ <path d="M34.74 9.52L25.35 0.26C25.17 0.1 24.93 0 24.7 0H8.26C6.47 0 5 1.45 5 3.22V35.78C5 37.55 6.47 39 8.26 39H31.73C33.53 39 34.99 37.55 34.99 35.78V10.16C35 9.93 34.9 9.69 34.74 9.52ZM25.61 3.09L26.05 3.52L31.42 8.82L31.86 9.26H27.03C26.25 9.26 25.6 8.63 25.6 7.85V3.09H25.61ZM33.16 35.78C33.16 36.56 32.52 37.19 31.73 37.19H8.26C7.48 37.19 6.83 36.56 6.83 35.78V3.22C6.83 2.44 7.47 1.81 8.26 1.81H23.77V7.85C23.77 9.62 25.24 11.07 27.03 11.07H31.22L32.9 11.06H33.16V35.78Z" fill="#2680EB"/>
10
+ <path d="M16.0101 5.78003C12.4801 5.78003 9.61011 8.64003 9.61011 12.18C9.61011 15.72 12.4701 18.58 16.0101 18.58C19.5401 18.58 22.4101 15.72 22.4101 12.18C22.4101 8.64003 19.5401 5.78003 16.0101 5.78003ZM15.8301 16.69C15.2601 16.69 14.8101 16.26 14.8101 15.72C14.8101 15.18 15.2601 14.76 15.8301 14.76C16.3901 14.76 16.8501 15.19 16.8501 15.72C16.8501 16.26 16.3901 16.69 15.8301 16.69ZM17.5801 12.63C16.8401 13.06 16.6401 13.3 16.6401 13.8V14.05H14.9601L14.9401 13.83C14.8401 12.91 15.1101 12.42 15.8601 11.99C16.5901 11.56 16.7801 11.33 16.7801 10.86C16.7801 10.42 16.4201 10.12 15.9201 10.12C15.4001 10.12 15.0501 10.46 15.0301 10.99H13.2801C13.3001 9.58003 14.3201 8.66003 16.0401 8.66003C17.6801 8.66003 18.7401 9.52003 18.7401 10.82C18.7401 11.62 18.3701 12.17 17.5801 12.63Z" fill="#2680EB"/>
11
+ </svg>
@@ -1107,7 +1107,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1107
1107
  closeDropdown();
1108
1108
  },
1109
1109
  showDropdown: () => {
1110
- showDropdown();
1110
+ setOpenState(true);
1111
1111
  },
1112
1112
  onClear,
1113
1113
  setPreviousValue,
@@ -1126,7 +1126,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1126
1126
 
1127
1127
  currentRef.closeDropdown = () => closeDropdown();
1128
1128
 
1129
- currentRef.showDropdown = () => showDropdown();
1129
+ currentRef.showDropdown = () => setOpenState(true);
1130
1130
 
1131
1131
  currentRef.onClear = onClear;
1132
1132
  currentRef.setPreviousValue = setPreviousValue;
@@ -1177,6 +1177,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1177
1177
  if (searchDelayTime) {
1178
1178
  var _searchDelayTime$matc, _searchDelayTime$matc2;
1179
1179
 
1180
+ if (searchDelayTime === true) searchDelayTime = getGlobal('delayOnInput');
1180
1181
  const units = {
1181
1182
  m: 60000,
1182
1183
  s: 1000,
@@ -1327,7 +1328,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1327
1328
  ...labelProps
1328
1329
  }, label) : null, [label, required, disabled, labelProps]);
1329
1330
  const inputComp = useMemo(() => {
1330
- const _InputCSS = InputCSS(multiple, renderSelectedItem, clearAble);
1331
+ const _InputCSS = InputCSS(multiple, renderSelectedItem);
1331
1332
 
1332
1333
  const _DropdownFormCSS = DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem, disabled);
1333
1334
 
@@ -1422,10 +1423,10 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
1422
1423
  }));
1423
1424
  /* Start styled */
1424
1425
 
1425
- const InputCSS = (multiple, renderSelectedItem, clearAble) => css`
1426
+ const InputCSS = (multiple, renderSelectedItem) => css`
1426
1427
  ${flexRow};
1427
1428
  width: 100%;
1428
- ${!multiple && renderSelectedItem ? `width: calc(100% - 34px${clearAble ? ' - 18px' : ''})` : ''}
1429
+ ${!multiple && renderSelectedItem ? `width: calc(100% - 34px)` : ''}
1429
1430
  `;
1430
1431
 
1431
1432
  const DropdownIconCSS = css`
@@ -1841,8 +1842,9 @@ Dropdown.propTypes = {
1841
1842
  /**
1842
1843
  * duration wait enter search content on search<br/>
1843
1844
  * Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
1845
+ * If true, used default delayOnInput
1844
1846
  */
1845
- searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
1847
+ searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
1846
1848
 
1847
1849
  /** number of items is ignored */
1848
1850
  skip: PropTypes.number,
@@ -142,7 +142,6 @@ const TextRootCSS = (color, type, lineClamp) => css`
142
142
  }
143
143
  &.DGN-Typography-Clamp {
144
144
  ${overflowHidden}
145
- word-break: break-all;
146
145
  display: -webkit-box;
147
146
  -webkit-line-clamp: ${lineClamp};
148
147
  -webkit-box-orient: vertical;
package/icons/basic.js CHANGED
@@ -714,6 +714,34 @@ export const Assessment = /*#__PURE__*/memo(({
714
714
  fill: colors[color] || color
715
715
  }));
716
716
  });
717
+ export const AssignmentInd = /*#__PURE__*/memo(({
718
+ width,
719
+ height,
720
+ color = '#7F828E',
721
+ viewBox = false
722
+ }) => {
723
+ return viewBox ? /*#__PURE__*/React.createElement("svg", {
724
+ width: width || 24,
725
+ height: height || 24,
726
+ viewBox: "0 0 24 24",
727
+ fill: "none"
728
+ }, /*#__PURE__*/React.createElement("path", {
729
+ fillRule: "evenodd",
730
+ clipRule: "evenodd",
731
+ d: "M14.82 3H19C20.1 3 21 3.9 21 5V19C21 20.1 20.1 21 19 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3ZM13 4C13 3.45 12.55 3 12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4ZM12 7C13.66 7 15 8.34 15 10C15 11.66 13.66 13 12 13C10.34 13 9 11.66 9 10C9 8.34 10.34 7 12 7ZM6 17.6V19H18V17.6C18 15.6 14 14.5 12 14.5C10 14.5 6 15.6 6 17.6Z",
732
+ fill: colors[color] || color
733
+ })) : /*#__PURE__*/React.createElement("svg", {
734
+ width: width || 18,
735
+ height: height || 20,
736
+ viewBox: "0 0 18 20",
737
+ fill: "none"
738
+ }, /*#__PURE__*/React.createElement("path", {
739
+ fillRule: "evenodd",
740
+ clipRule: "evenodd",
741
+ d: "M11.82 2H16C17.1 2 18 2.9 18 4V18C18 19.1 17.1 20 16 20H2C0.9 20 0 19.1 0 18V4C0 2.9 0.9 2 2 2H6.18C6.6 0.84 7.7 0 9 0C10.3 0 11.4 0.84 11.82 2ZM10 3C10 2.45 9.55 2 9 2C8.45 2 8 2.45 8 3C8 3.55 8.45 4 9 4C9.55 4 10 3.55 10 3ZM9 6C10.66 6 12 7.34 12 9C12 10.66 10.66 12 9 12C7.34 12 6 10.66 6 9C6 7.34 7.34 6 9 6ZM3 16.6V18H15V16.6C15 14.6 11 13.5 9 13.5C7 13.5 3 14.6 3 16.6Z",
742
+ fill: colors[color] || color
743
+ }));
744
+ });
717
745
  export const AssignmentTurnedIn = /*#__PURE__*/memo(({
718
746
  width,
719
747
  height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.47",
3
+ "version": "1.3.48",
4
4
  "description": "The DigiNet core ui",
5
5
  "homepage": "https://diginet.com.vn",
6
6
  "main": "index.js",
package/readme.md CHANGED
@@ -38,6 +38,14 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.3.48
42
+ - \[Added\]: MenuIcon – MHRM09N1030
43
+ - \[Added\]: Icon – AssignmentInd
44
+ - \[Changed\]: Dropdown – Prop searchDelayTime allow propTypes bool
45
+ - \[Changed\]: Theme – Update getSpacing
46
+ - \[Fixed\]: Dropdown – Fix bug use ref open dropdown not work
47
+ - \[Fixed\]: Dropdown – Fix wrong width when use prop renderSelectedItem and clearAble
48
+
41
49
  ## 1.3.47
42
50
  - \[Fixed\]: Rating – Fix bug icon render incorrect, return value in func onRating
43
51
 
package/styles/colors.js CHANGED
@@ -271,7 +271,7 @@ color.system = {
271
271
  };
272
272
  color.fill = {
273
273
  sidebar: color.white,
274
- headerbar: color.brand12,
274
+ headerbar: color.brand22,
275
275
  tabbar: color.brand12,
276
276
  'scrollbar-tabbar': color.brand13,
277
277
  odd_raw: color.brand21,
package/styles/general.js CHANGED
@@ -16,13 +16,16 @@ export const zIndex = number => {
16
16
  return rootZIndex + number;
17
17
  };
18
18
  /**
19
- * get value spacing with rooSpacing
20
- * @param vl - default 1
21
- * @returns {number}
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) => {
25
- return Number(vl) * rootSpacing;
25
+ if (typeof vl === 'number') return Number(vl) * rootSpacing;else if (Array.isArray(vl)) {
26
+ if (vl.length > 4) vl.length = 4;
27
+ return `${vl.flatMap(i => Number(i !== null && i !== void 0 ? i : 0) * rootSpacing).join('px ')}px`;
28
+ }
26
29
  };
27
30
  /**
28
31
  * replace rootZIndex