diginet-core-ui 1.3.66 → 1.3.68

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.
Files changed (54) hide show
  1. package/assets/storybook/avatar01.svg +9 -0
  2. package/assets/storybook/cover01.svg +9 -0
  3. package/components/accordion/css.js +6 -6
  4. package/components/accordion/details.js +13 -18
  5. package/components/accordion/group.js +16 -17
  6. package/components/accordion/index.js +17 -22
  7. package/components/accordion/summary.js +55 -32
  8. package/components/avatar/index.js +4 -9
  9. package/components/badge/index.js +4 -9
  10. package/components/button/icon.js +4 -9
  11. package/components/button/index.js +287 -292
  12. package/components/card/body.js +47 -0
  13. package/components/card/extra.js +47 -0
  14. package/components/card/footer.js +47 -0
  15. package/components/card/header.js +50 -0
  16. package/components/card/index.js +175 -37
  17. package/components/chart/Pie-v2/Sector.js +2 -2
  18. package/components/chip/attach.js +5 -5
  19. package/components/form-control/attachment/index.js +5 -3
  20. package/components/form-control/calendar/function.js +20 -10
  21. package/components/form-control/calendar/index.js +16 -16
  22. package/components/form-control/dropdown/index.js +71 -10
  23. package/components/form-control/helper-text/index.js +8 -3
  24. package/components/form-control/input-base/index.js +47 -10
  25. package/components/form-control/money-input/index.js +6 -2
  26. package/components/form-control/number-input/index.js +11 -11
  27. package/components/form-control/number-input/index2.js +13 -4
  28. package/components/form-control/phone-input/index.js +13 -9
  29. package/components/form-control/text-input/index.js +13 -3
  30. package/components/grid/Container.js +110 -0
  31. package/components/grid/Row.js +1 -1
  32. package/components/grid/index.js +35 -5
  33. package/components/index.js +7 -2
  34. package/components/others/option-wrapper/index.js +21 -27
  35. package/components/paging/page-info.js +263 -88
  36. package/components/paging/page-selector2.js +95 -56
  37. package/components/popover/index.js +8 -6
  38. package/components/progress/circular.js +12 -12
  39. package/components/transfer/index.js +3 -3
  40. package/components/tree-view/index.js +10 -6
  41. package/icons/basic.js +120 -0
  42. package/icons/effect.js +19 -24
  43. package/package.json +1 -1
  44. package/readme.md +20 -0
  45. package/styles/color-helper.js +103 -103
  46. package/styles/utils.js +14 -2
  47. package/utils/classNames.js +30 -0
  48. package/utils/error/error.js +2 -2
  49. package/utils/index.js +1 -0
  50. package/utils/renderIcon.js +5 -5
  51. package/utils/useInput.js +1 -8
  52. package/components/card/body-card.js +0 -65
  53. package/components/card/card.js +0 -125
  54. package/components/card/context.js +0 -6
@@ -1,14 +1,14 @@
1
1
  /** @jsxRuntime classic */
2
2
 
3
3
  /** @jsx jsx */
4
- import { memo, useState, useRef, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
4
+ import { memo, useState, useRef, useEffect, useMemo, forwardRef, useImperativeHandle, useLayoutEffect, useCallback } from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { jsx, css } from '@emotion/core';
7
7
  import OptionWrapper from '../others/option-wrapper';
8
8
  import { ButtonIcon, NumberInput, Dropdown, Typography, Divider } from '../';
9
9
  import { getGlobal } from '../../global';
10
10
  import theme from '../../theme/settings';
11
- import { alignCenter, borderBox, flexRow, noMargin, noPadding, border, textCenter, cursorPointer, parseHeight } from '../../styles/general';
11
+ import { alignCenter, borderBox, flexRow, noPadding, textCenter, cursorPointer, parseHeight, whiteSpaceNoWrap, justifyCenter } from '../../styles/general';
12
12
  const {
13
13
  colors: {
14
14
  system: {
@@ -42,37 +42,42 @@ const getLastPage = (totalItems, itemsPerPage) => {
42
42
 
43
43
  const delayOnInput = getGlobal('delayOnInput');
44
44
  const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
45
- id,
46
- typeShort,
47
45
  bgColor,
48
- style,
49
46
  className,
50
- totalItems,
51
- itemsPerPage,
52
47
  currentPage,
48
+ hideWithPage,
49
+ id,
50
+ itemsPerPage,
53
51
  listPerPage,
54
52
  onChangePage,
55
53
  onChangePerPage,
56
54
  onChangingPage,
57
- onChangingPerPage
55
+ onChangingPerPage,
56
+ style,
57
+ totalItems,
58
+ typeShort
58
59
  }, reference) => {
59
- var _currentPageState$toS;
60
-
61
- const ref = useRef(null);
60
+ let ref = useRef(null);
62
61
  const timer = useRef(null);
63
62
  const currentPageRef = useRef(null);
63
+ const numberRef = useRef(null);
64
+ const totalRef = useRef(null);
64
65
  const [totalItemsState, setTotalItemsState] = useState(totalItems);
65
66
  const [itemsPerPageState, setItemsPerPageState] = useState(itemsPerPage || listPerPage[0] || 10);
66
67
  const [currentPageState, setCurrentPageState] = useState(currentPage);
67
68
  const [listPerPageState, setListPerPageState] = useState(listPerPage);
68
69
  const [disablePrevState, setDisablePrevState] = useState(true);
69
70
  const [disableNextState, setDisableNextState] = useState(!(totalItems > itemsPerPage));
71
+ const [inputPageValue, setInputPageValue] = useState(currentPage);
70
72
 
71
- const _pagingInfoCSS = pagingInfoCSS(bgColor, typeShort);
73
+ const _pagingInfoCSS = pagingInfoCSS(bgColor, typeShort); // const _dynamicWidthCSS = dynamicWidthCSS(currentPageState.toString()?.length || 3);
72
74
 
73
- const _dynamicWidthCSS = dynamicWidthCSS(((_currentPageState$toS = currentPageState.toString()) === null || _currentPageState$toS === void 0 ? void 0 : _currentPageState$toS.length) || 3);
74
75
 
75
- const _onChangePage = async (page, isInit = false, e) => {
76
+ const _onChangePage = async ({
77
+ page,
78
+ e,
79
+ changeBy
80
+ }) => {
76
81
  const lastPage = getLastPage(totalItemsState, itemsPerPageState);
77
82
  let disablePrev = false;
78
83
  let disableNext = false; // If last page = 1. Disable all
@@ -92,29 +97,36 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
92
97
  disablePrev = true;
93
98
  }
94
99
 
95
- if (onChangingPage && !isInit) {
100
+ setDisablePrevState(disablePrev);
101
+ setDisableNextState(disableNext);
102
+ if (page === currentPageState) return;
103
+
104
+ if (onChangingPage) {
96
105
  const event = { ...e,
97
106
  cancel: false,
98
107
  prevPage: currentPageState,
99
- newPage: page
108
+ newPage: page,
109
+ changeBy: changeBy
100
110
  };
101
111
  await onChangingPage(event);
102
112
 
103
113
  if (event.cancel) {
104
114
  if (e !== null && e !== void 0 && e.reset) e.reset();
115
+ currentPageRef.current = currentPageState;
105
116
  setCurrentPageState(currentPageState);
117
+ setInputPageValue(currentPageState);
106
118
  return;
107
119
  }
108
120
  }
109
121
 
110
122
  currentPageRef.current = page;
111
123
  setCurrentPageState(page);
112
- setDisablePrevState(disablePrev);
113
- setDisableNextState(disableNext);
114
- if (onChangePage && !isInit) onChangePage(page);
124
+ setInputPageValue(page);
125
+ if (onChangePage) onChangePage(page);
115
126
  };
116
127
 
117
128
  const _onChangePerPage = async per => {
129
+ if (per === itemsPerPageState) return;
118
130
  const lastPage = getLastPage(totalItemsState, per);
119
131
  per = parseInt(per, 10);
120
132
  let disableNext = false; // If last page = 1. Disable all
@@ -136,14 +148,20 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
136
148
  }
137
149
  }
138
150
 
139
- currentPageRef.current = 0;
140
- setItemsPerPageState(per);
151
+ setItemsPerPageState(per); // currentPageRef.current = 0;
152
+ // setCurrentPageState(0);
153
+ // setInputPageValue(0);
154
+
155
+ _onChangePage({
156
+ page: 0
157
+ });
158
+
141
159
  setDisablePrevState(true);
142
160
  setDisableNextState(disableNext);
143
161
  if (onChangePerPage) onChangePerPage(per);
144
162
  };
145
163
 
146
- const onTypePaging = (e, isInit = false) => {
164
+ const onTypePaging = e => {
147
165
  var _e$value;
148
166
 
149
167
  if (timer.current) {
@@ -155,7 +173,10 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
155
173
  const page = !value || parseInt(value) < 0 ? 1 : parseInt(value) > lastPage ? lastPage : parseInt(value);
156
174
  currentPage = page - 1;
157
175
  timer.current = setTimeout(() => {
158
- _onChangePage(page - 1, isInit, e);
176
+ _onChangePage({
177
+ page: page - 1,
178
+ e: e
179
+ });
159
180
  }, delayOnInput);
160
181
  };
161
182
 
@@ -169,44 +190,127 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
169
190
  setTotalItemsState(totalItems);
170
191
  }, [totalItems]);
171
192
  useEffect(() => {
172
- if (timer.current) {
173
- clearTimeout(timer.current);
174
- }
175
-
176
- timer.current = setTimeout(() => {
177
- _onChangePage(0, true);
178
- }, delayOnInput);
179
- }, [totalItemsState, itemsPerPageState]);
180
- useEffect(() => {
181
- setItemsPerPageState(itemsPerPage);
193
+ _onChangePerPage(itemsPerPage);
182
194
  }, [itemsPerPage]);
183
195
  useEffect(() => {
184
- setCurrentPageState(currentPage);
185
- onTypePaging(currentPage + 1, true);
196
+ _onChangePage({
197
+ page: currentPage,
198
+ changeBy: 'currentPage'
199
+ });
186
200
  }, [currentPage]);
187
201
  useEffect(() => {
188
202
  setListPerPageState(listPerPage);
189
203
  }, [listPerPage]);
190
- useImperativeHandle(reference, () => {
191
- const currentRef = ref.current || {};
192
- const _instance = {
193
- onChangePage: page => _onChangePage(page),
204
+ useEffect(() => {
205
+ _onChangePage({
206
+ page: totalItemsState / itemsPerPageState < currentPageState - 1 ? 0 : currentPageState,
207
+ changeBy: 'totalItems'
208
+ });
209
+ }, [totalItemsState]);
210
+ useEffect(() => {
211
+ _onChangePage({
212
+ page: totalItemsState / itemsPerPageState < currentPageState - 1 ? 0 : currentPageState,
213
+ changeBy: 'itemsPerPage'
214
+ });
215
+ }, [itemsPerPageState]);
216
+ useImperativeHandle(reference, () => ({
217
+ element: ref.current,
218
+ instance: {
219
+ onChangePage: page => _onChangePage({
220
+ page: page,
221
+ changeBy: 'ref'
222
+ }),
194
223
  onChangePerPage: per => _onChangePerPage(per),
195
224
  setTotalItems: items => setTotalItemsState(items)
196
- }; // methods
225
+ },
226
+ onChangePage: page => _onChangePage({
227
+ page: page,
228
+ changeBy: 'ref'
229
+ }),
230
+ onChangePerPage: per => _onChangePerPage(per),
231
+ setTotalItems: items => setTotalItemsState(items)
232
+ }));
233
+
234
+ const updateSize = () => {
235
+ if (timer.current) {
236
+ clearTimeout(timer.current);
237
+ }
197
238
 
198
- _instance.__proto__ = {}; // hidden methods
239
+ timer.current = setTimeout(() => {
240
+ var _ref$current;
199
241
 
200
- currentRef.instance = _instance;
242
+ let conti = true;
243
+ [...(((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.children) || [])].reverse().forEach(item => {
244
+ if (item !== null && item !== void 0 && item.style) {
245
+ item.style.display = 'flex';
201
246
 
202
- currentRef.onChangePage = page => _onChangePage(page);
247
+ if (!conti) {
248
+ item.style.opacity = 1;
249
+ return;
250
+ }
251
+ }
252
+
253
+ conti = hiddenEle(item);
254
+ });
255
+ }, 300);
256
+ };
203
257
 
204
- currentRef.onChangePerPage = per => _onChangePerPage(per);
258
+ useLayoutEffect(() => {
259
+ window.addEventListener('resize', updateSize);
260
+ updateSize();
261
+ return () => window.removeEventListener('resize', updateSize);
262
+ }, []);
205
263
 
206
- currentRef.setTotalItems = items => setTotalItemsState(items);
264
+ const hiddenEle = child => {
265
+ setTimeout(() => {
266
+ var _ref$current2;
267
+
268
+ const infoChild = child === null || child === void 0 ? void 0 : child.getBoundingClientRect();
269
+ const infoParent = (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.getBoundingClientRect();
270
+ if (!infoChild || !infoParent) return; // getBoundingClientRect includes margin => phải trừ đi margin
271
+
272
+ const style = window.getComputedStyle(child) || child.currentStyle;
273
+ const margin = parseInt((style === null || style === void 0 ? void 0 : style.marginLeft) || 0) + parseInt((style === null || style === void 0 ? void 0 : style.marginRight) || 0);
274
+
275
+ if (infoChild.right - margin >= infoParent.width) {
276
+ child.style.opacity = 0;
277
+ child.style.setProperty('display', 'none', 'important');
278
+ } else {
279
+ child.style.opacity = 1;
280
+ }
281
+
282
+ return infoChild.right >= infoParent.width;
283
+ });
284
+ };
285
+
286
+ const setWithNumber = useCallback((totalRefs = totalRef, numberRefs = numberRef) => {
287
+ var _totalRefs;
288
+
289
+ if (!totalRefs) totalRefs = totalRef.current;
290
+ if (!numberRefs) numberRefs = numberRef.current;
291
+ if (!totalRefs || !numberRefs) return;
292
+ const infoText = (_totalRefs = totalRefs) === null || _totalRefs === void 0 ? void 0 : _totalRefs.getBoundingClientRect();
293
+
294
+ if (infoText && numberRefs) {
295
+ numberRefs.style.width = `${infoText.width * 2 + 6}px`;
296
+ numberRefs.style.minWidth = `${infoText.width * 2 + 6}px`;
297
+ }
298
+ }, [totalRef, numberRef]);
299
+
300
+ const checkShowPaging = () => {
301
+ switch (hideWithPage) {
302
+ case 'empty':
303
+ return totalItemsState !== 0;
304
+
305
+ case 'single':
306
+ return totalItemsState / itemsPerPageState > 1;
307
+
308
+ case 'none':
309
+ default:
310
+ return true;
311
+ }
312
+ };
207
313
 
208
- return currentRef;
209
- });
210
314
  return useMemo(() => {
211
315
  const lastPage = getLastPage(totalItemsState, itemsPerPageState);
212
316
  let listPerPageData = !listPerPageState.includes(itemsPerPageState) ? [{
@@ -219,7 +323,8 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
219
323
  }]);
220
324
  listPerPageData = [...new Map(listPerPageData.map(v => [JSON.stringify(v), v])).values()];
221
325
  listPerPageData.sort((a, b) => a.id - b.id);
222
- return jsx("div", {
326
+ const showPaging = checkShowPaging();
327
+ return showPaging && jsx("div", {
223
328
  ref: ref,
224
329
  css: _pagingInfoCSS,
225
330
  id: id,
@@ -227,73 +332,127 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
227
332
  className: ['DGN-UI-PagingInfo', className].join(' ').trim().replace(/\s+/g, ' ')
228
333
  }, jsx(ButtonIcon, {
229
334
  circular: true,
230
- viewType: 'text',
335
+ viewType: 'ghost',
231
336
  size: 'small',
232
337
  name: 'ArrowDoubleLeft',
233
338
  disabled: disablePrevState,
234
- onClick: e => _onChangePage(0, false, e)
339
+ onClick: e => {
340
+ setInputPageValue(0);
341
+ currentPageRef.current = 0;
342
+
343
+ if (timer.current) {
344
+ clearTimeout(timer.current);
345
+ }
346
+
347
+ timer.current = setTimeout(() => {
348
+ _onChangePage({
349
+ page: 0,
350
+ e: e
351
+ });
352
+ }, delayOnInput);
353
+ }
235
354
  }), jsx(ButtonIcon, {
236
355
  circular: true,
237
- viewType: 'text',
356
+ viewType: 'ghost',
238
357
  size: 'small',
239
358
  name: 'ArrowLeft',
240
359
  disabled: disablePrevState,
241
360
  onClick: e => {
242
- currentPageRef.current = currentPageRef.current - 1;
361
+ setInputPageValue(inputPageValue - 1);
362
+ currentPageRef.current = currentPageRef.current === 0 ? 0 : currentPageRef.current - 1;
243
363
 
244
364
  if (timer.current) {
245
365
  clearTimeout(timer.current);
246
366
  }
247
367
 
248
368
  timer.current = setTimeout(() => {
249
- _onChangePage(currentPageRef.current, false, e);
369
+ _onChangePage({
370
+ page: currentPageRef.current,
371
+ e: e
372
+ });
250
373
  }, delayOnInput);
251
374
  }
252
- }), jsx(NumberInput, {
253
- css: _dynamicWidthCSS,
375
+ }), jsx("div", {
376
+ css: ViewNumberInput,
377
+ ref: refs => {
378
+ numberRef.current = refs;
379
+ setWithNumber(null, refs);
380
+ }
381
+ }, jsx(NumberInput, {
254
382
  disabledNegative: true,
255
383
  className: 'inputPage',
256
- value: currentPageState ? String(currentPageState + 1) : '1',
384
+ value: inputPageValue ? String(inputPageValue + 1) : '1',
257
385
  min: 1,
386
+ autoWidth: true,
387
+ inputStyle: {
388
+ minWidth: 10
389
+ },
390
+ width: 'auto',
391
+ placeholder: '',
258
392
  max: lastPage,
259
393
  onKeyDown: checkKeyPress,
260
- onChange: e => onTypePaging(e, false)
394
+ onChange: e => onTypePaging(e)
261
395
  }), "/", jsx(Typography, {
262
- type: 'p2',
263
- style: {
264
- margin: '0 2px'
265
- }
266
- }, lastPage), jsx(ButtonIcon, {
396
+ ref: refs => {
397
+ totalRef.current = refs;
398
+ setWithNumber(refs, null);
399
+ },
400
+ css: css`
401
+ ${whiteSpaceNoWrap}
402
+ `,
403
+ type: 'p2'
404
+ }, lastPage)), jsx(ButtonIcon, {
267
405
  circular: true,
268
- viewType: 'text',
406
+ viewType: 'ghost',
269
407
  size: 'small',
270
408
  name: 'ArrowRight',
271
409
  disabled: disableNextState,
272
410
  onClick: e => {
273
- currentPageRef.current = currentPageRef.current + 1;
411
+ setInputPageValue(inputPageValue + 1);
412
+ currentPageRef.current = currentPageRef.current === lastPage ? lastPage : currentPageRef.current + 1;
274
413
 
275
414
  if (timer.current) {
276
415
  clearTimeout(timer.current);
277
416
  }
278
417
 
279
418
  timer.current = setTimeout(() => {
280
- _onChangePage(currentPageRef.current, false, e);
419
+ _onChangePage({
420
+ page: currentPageRef.current,
421
+ e: e
422
+ });
281
423
  }, delayOnInput);
282
424
  }
283
425
  }), jsx(ButtonIcon, {
284
426
  circular: true,
285
- viewType: 'text',
427
+ viewType: 'ghost',
286
428
  size: 'small',
287
429
  name: 'ArrowDoubleRight',
288
430
  disabled: disableNextState,
289
- onClick: e => _onChangePage(lastPage - 1, false, e)
290
- }), typeShort && jsx(Divider, {
431
+ onClick: e => {
432
+ setInputPageValue(lastPage - 1);
433
+ currentPageRef.current = lastPage - 1;
434
+
435
+ if (timer.current) {
436
+ clearTimeout(timer.current);
437
+ }
438
+
439
+ timer.current = setTimeout(() => {
440
+ _onChangePage({
441
+ page: lastPage - 1,
442
+ e: e
443
+ });
444
+ }, delayOnInput);
445
+ }
446
+ }), jsx(Typography, {
447
+ type: 'p2',
448
+ ref: hiddenEle,
449
+ className: "txt-line-number"
450
+ }, typeShort ? jsx(Divider, {
291
451
  direction: 'vertical',
292
452
  height: 24,
293
453
  color: category
294
- }), !typeShort && jsx("span", {
295
- className: "txt-line-number"
296
- }, getGlobal('lineNumber')), jsx(Dropdown, {
454
+ }) : getGlobal('lineNumber'), jsx(Dropdown, {
455
+ allowSearch: false,
297
456
  viewType: 'underlined',
298
457
  dataSource: listPerPageData,
299
458
  value: itemsPerPageState,
@@ -307,32 +466,38 @@ const PagingInfo = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
307
466
  dropdownItemStyle: {
308
467
  color: active
309
468
  }
310
- }), typeShort && jsx(Divider, {
469
+ })), jsx(Typography, {
470
+ type: 'p2',
471
+ ref: hiddenEle,
472
+ className: 'total-items'
473
+ }, typeShort ? jsx(Divider, {
311
474
  direction: 'vertical',
312
475
  height: 24,
313
476
  color: category
314
- }), jsx("span", {
315
- className: 'total-items'
316
- }, !typeShort && getGlobal('total') + ':', " ", totalItemsState));
317
- }, [typeShort, bgColor, style, className, totalItemsState, itemsPerPageState, currentPageState, listPerPageState, disablePrevState, disableNextState]);
477
+ }) : getGlobal('total') + ':', totalItemsState));
478
+ }, [typeShort, bgColor, style, className, hideWithPage, totalItemsState, itemsPerPageState, currentPageState, listPerPageState, disablePrevState, disableNextState, inputPageValue]);
318
479
  }));
480
+ const ViewNumberInput = css`
481
+ ${flexRow};
482
+ ${alignCenter};
483
+ ${justifyCenter};
484
+ transition: all 0.1s;
485
+ margin: ${spacing([0, 1])};
486
+ `;
319
487
 
320
488
  const pagingInfoCSS = (bgColor, typeShort) => css`
321
489
  ${flexRow};
322
490
  ${alignCenter};
323
491
  ${paragraph2};
324
492
  ${borderBox};
325
- ${border(1, system)};
326
493
  ${parseHeight(40)}
327
- border-left: none;
328
- border-right: none;
494
+ border-top: solid 1px ${system};
329
495
  padding: ${spacing([1, 0])};
330
496
  background-color: ${bgColor};
331
497
  color: ${main};
332
498
  .inputPage {
333
- ${noMargin};
334
499
  ${textCenter};
335
- min-width: 28px;
500
+ margin: ${spacing([0, 0.5])};
336
501
  .DGN-UI-InputBase {
337
502
  ${noPadding};
338
503
  input {
@@ -344,7 +509,11 @@ const pagingInfoCSS = (bgColor, typeShort) => css`
344
509
  }
345
510
  }
346
511
  .txt-line-number {
347
- margin-left: ${spacing([4])};
512
+ ${whiteSpaceNoWrap};
513
+ ${alignCenter};
514
+ opacity: 0;
515
+ display: flex !important;
516
+ transition: opacity 0.3s ease;
348
517
  }
349
518
  .DGN-UI-Divider {
350
519
  margin: ${spacing([0, 2])};
@@ -356,7 +525,8 @@ const pagingInfoCSS = (bgColor, typeShort) => css`
356
525
  .DGN-UI-Dropdown-Form {
357
526
  min-height: 24px;
358
527
  padding: 0;
359
- input {
528
+ input,
529
+ span {
360
530
  ${paragraph2};
361
531
  ${noPadding};
362
532
  ${cursorPointer};
@@ -375,14 +545,15 @@ const pagingInfoCSS = (bgColor, typeShort) => css`
375
545
  }
376
546
  }
377
547
  .total-items {
548
+ ${whiteSpaceNoWrap};
549
+ ${flexRow};
550
+ ${alignCenter};
378
551
  margin-left: ${`${spacing(typeShort ? [0] : [4])}`};
552
+ opacity: 0;
553
+ transition: opacity 0.3s ease;
379
554
  }
380
555
  `;
381
556
 
382
- const dynamicWidthCSS = characters => css`
383
- width: ${characters}ch;
384
- `;
385
-
386
557
  PagingInfo.defaultProps = {
387
558
  typeShort: false,
388
559
  bgColor: white,
@@ -390,7 +561,8 @@ PagingInfo.defaultProps = {
390
561
  className: '',
391
562
  totalItems: 0,
392
563
  currentPage: 0,
393
- listPerPage: [10, 15, 20, 30, 50]
564
+ listPerPage: [10, 15, 20, 30, 50],
565
+ hideWithPage: 'none'
394
566
  };
395
567
  PagingInfo.propTypes = {
396
568
  /** Background color for component. */
@@ -402,6 +574,9 @@ PagingInfo.propTypes = {
402
574
  /** Specifies the current page. */
403
575
  currentPage: PropTypes.number,
404
576
 
577
+ /** Hidden mode for page selector. */
578
+ hideWithPage: PropTypes.oneOf(['none', 'empty', 'single']),
579
+
405
580
  /** The quantity of items per page. */
406
581
  itemsPerPage: PropTypes.number,
407
582