@onehat/ui 0.4.70 → 0.4.71

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 (96) hide show
  1. package/package.json +2 -1
  2. package/src/Components/Accordion/Accordion.js +1 -0
  3. package/src/Components/Blank.js +1 -0
  4. package/src/Components/Buttons/BackButton.js +1 -0
  5. package/src/Components/Buttons/Button.js +5 -4
  6. package/src/Components/Buttons/CartButtonWithBadge.js +1 -0
  7. package/src/Components/Buttons/IconButton.js +9 -8
  8. package/src/Components/Buttons/PlusMinusButton.js +5 -4
  9. package/src/Components/Buttons/SquareButton.js +19 -18
  10. package/src/Components/Container/Container.js +1 -0
  11. package/src/Components/Container/ContainerColumn.js +4 -3
  12. package/src/Components/Container/ScreenContainer.js +13 -13
  13. package/src/Components/Container/Splitter.js +33 -28
  14. package/src/Components/Editor/InlineEditor.js +32 -30
  15. package/src/Components/Fab/DynamicFab.js +14 -13
  16. package/src/Components/Fab/FabWithTooltip.js +1 -0
  17. package/src/Components/Filter/DateRange.js +8 -7
  18. package/src/Components/Filter/NumberRange.js +8 -7
  19. package/src/Components/Form/Field/CKEditor/CKEditor.js +1 -0
  20. package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +1 -0
  21. package/src/Components/Form/Field/Color.js +41 -40
  22. package/src/Components/Form/Field/Combo/Combo.js +173 -172
  23. package/src/Components/Form/Field/Combo/PageSizeCombo.js +1 -0
  24. package/src/Components/Form/Field/Date.js +117 -116
  25. package/src/Components/Form/Field/DisplayField.js +6 -5
  26. package/src/Components/Form/Field/File.js +1 -0
  27. package/src/Components/Form/Field/FormikForm.js +1 -0
  28. package/src/Components/Form/Field/Input.js +15 -14
  29. package/src/Components/Form/Field/Json.js +7 -6
  30. package/src/Components/Form/Field/Number.js +31 -30
  31. package/src/Components/Form/Field/RadioGroup/RadioGroup.js +1 -0
  32. package/src/Components/Form/Field/Select/PageSizeSelect.js +1 -0
  33. package/src/Components/Form/Field/Select/Select.js +9 -8
  34. package/src/Components/Form/Field/Slider.js +15 -14
  35. package/src/Components/Form/Field/Tag/Tag.js +25 -24
  36. package/src/Components/Form/Field/Tag/ValueBox.js +32 -31
  37. package/src/Components/Form/Field/Text.js +9 -8
  38. package/src/Components/Form/Field/TextArea.js +9 -8
  39. package/src/Components/Form/Field/Toggle.js +16 -15
  40. package/src/Components/Form/FieldSet.js +27 -26
  41. package/src/Components/Form/Form.js +104 -103
  42. package/src/Components/Form/Label.js +15 -14
  43. package/src/Components/Grid/Grid.js +46 -45
  44. package/src/Components/Grid/GridHeaderRow.js +42 -40
  45. package/src/Components/Grid/GridRow.js +63 -62
  46. package/src/Components/Grid/HeaderColumnSelectorHandle.js +9 -8
  47. package/src/Components/Grid/HeaderReorderHandle.js +9 -8
  48. package/src/Components/Grid/HeaderResizeHandle.js +9 -8
  49. package/src/Components/Grid/NoRecordsFound.js +4 -3
  50. package/src/Components/Grid/RowDragHandle.js +1 -0
  51. package/src/Components/Grid/RowSelectHandle.js +1 -0
  52. package/src/Components/Hoc/Secondary/withSecondaryEditor.js +1 -1
  53. package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +6 -5
  54. package/src/Components/Hoc/withAlert.js +35 -34
  55. package/src/Components/Hoc/withContextMenu.js +27 -26
  56. package/src/Components/Hoc/withDnd.js +1 -0
  57. package/src/Components/Hoc/withEditor.js +1 -1
  58. package/src/Components/Hoc/withFilters.js +19 -18
  59. package/src/Components/Hoc/withModal.js +7 -6
  60. package/src/Components/Hoc/withToast.js +1 -0
  61. package/src/Components/Hoc/withWindowedEditor.js +6 -5
  62. package/src/Components/Layout/AsyncOperation.js +1 -0
  63. package/src/Components/Layout/CenterBox.js +9 -8
  64. package/src/Components/Layout/Footer.js +11 -10
  65. package/src/Components/Layout/ScreenHeader.js +5 -4
  66. package/src/Components/Layout/TextWithTooltip.js +1 -0
  67. package/src/Components/Messages/ConfirmationMessage.js +6 -5
  68. package/src/Components/Messages/ErrorMessage.js +40 -39
  69. package/src/Components/Messages/Loading.js +1 -0
  70. package/src/Components/Messages/OkMessage.js +11 -10
  71. package/src/Components/Messages/Unauthorized.js +1 -0
  72. package/src/Components/Messages/WaitMessage.js +16 -15
  73. package/src/Components/Panel/AccordionGridPanel.js +1 -0
  74. package/src/Components/Panel/FormPanel.js +1 -0
  75. package/src/Components/Panel/Header.js +59 -58
  76. package/src/Components/Panel/Mask.js +1 -0
  77. package/src/Components/Panel/Panel.js +7 -6
  78. package/src/Components/Picker/Picker.js +1 -0
  79. package/src/Components/Report/Report.js +35 -34
  80. package/src/Components/Screens/Manager.js +1 -0
  81. package/src/Components/Screens/ReportsManager.js +1 -0
  82. package/src/Components/Tab/Tab.js +1 -0
  83. package/src/Components/Tab/TabBar.js +67 -66
  84. package/src/Components/Toolbar/FilterToolbar.js +14 -11
  85. package/src/Components/Toolbar/Pagination.js +26 -25
  86. package/src/Components/Toolbar/PaginationToolbar.js +13 -12
  87. package/src/Components/Toolbar/Toolbar.js +13 -12
  88. package/src/Components/Tooltip/Tooltip.js +1 -0
  89. package/src/Components/Tree/Tree.js +12 -11
  90. package/src/Components/Tree/TreeNode.js +20 -19
  91. package/src/Components/Tree/TreeNodeDragHandle.js +11 -10
  92. package/src/Components/Viewer/MeterTypeText.js +8 -7
  93. package/src/Components/Viewer/TextWithLinks.js +16 -15
  94. package/src/Components/Viewer/Viewer.js +23 -22
  95. package/src/Components/Window/UploadsDownloadsWindow.js +6 -5
  96. package/src/Components/index.js +1 -0
@@ -5,6 +5,7 @@ import {
5
5
  TextNative,
6
6
  VStack,
7
7
  } from '@project-components/Gluestack';
8
+ import clsx from 'clsx';
8
9
  import {
9
10
  HORIZONTAL,
10
11
  VERTICAL,
@@ -41,17 +42,17 @@ export default function Header(props) {
41
42
  let closeBtn = null,
42
43
  collapseBtn = null;
43
44
  if (onClose) {
44
- let closeClassName = `
45
- Header-closeBtn
46
- self-center
47
- border
48
- border-grey-400
49
- h-[20px]
50
- w-[20px]
51
- px-[2px]
52
- py-[2px]
53
- ${styles.PANEL_HEADER_BG}
54
- `;
45
+ let closeClassName = clsx(
46
+ 'Header-closeBtn',
47
+ 'self-center',
48
+ 'border',
49
+ 'border-grey-400',
50
+ 'h-[20px]',
51
+ 'w-[20px]',
52
+ 'px-[2px]',
53
+ 'py-[2px]',
54
+ styles.PANEL_HEADER_BG,
55
+ );
55
56
  if (collapseDirection === HORIZONTAL && isCollapsed) {
56
57
  closeClassName += ' mb-1';
57
58
  }
@@ -67,17 +68,17 @@ export default function Header(props) {
67
68
  />;
68
69
  }
69
70
  if (isCollapsible) {
70
- let collapseClassName = `
71
- Header-collapseBtn
72
- self-center
73
- border
74
- border-grey-400
75
- h-[20px]
76
- w-[20px]
77
- px-[2px]
78
- py-[2px]
79
- ${styles.PANEL_HEADER_BG}
80
- `;
71
+ let collapseClassName = clsx(
72
+ 'Header-collapseBtn',
73
+ 'self-center',
74
+ 'border',
75
+ 'border-grey-400',
76
+ 'h-[20px]',
77
+ 'w-[20px]',
78
+ 'px-[2px]',
79
+ 'py-[2px]',
80
+ styles.PANEL_HEADER_BG,
81
+ );
81
82
  if (collapseDirection === HORIZONTAL && isCollapsed) {
82
83
  collapseClassName += ' mb-1';
83
84
  }
@@ -97,17 +98,17 @@ export default function Header(props) {
97
98
  doubleClickStyle.cursor = 'pointer';
98
99
  }
99
100
 
100
- let panelClassName = `
101
- Header
102
- bg-grey-300
103
- items-center
104
- justify-start
105
- py-1
106
- border-b-grey-400
107
- border-b-1
108
- ${isWindow ? 'rounded-t-lg' : ''}
109
- ${styles.PANEL_HEADER_BG}
110
- `;
101
+ let panelClassName = clsx(
102
+ 'Header',
103
+ 'bg-grey-300',
104
+ 'items-center',
105
+ 'justify-start',
106
+ 'py-1',
107
+ 'border-b-grey-400',
108
+ 'border-b-1',
109
+ isWindow ? 'rounded-t-lg' : '',
110
+ styles.PANEL_HEADER_BG,
111
+ );
111
112
  if (CURRENT_MODE === UI_MODE_WEB) {
112
113
 
113
114
  if (isCollapsed) {
@@ -137,12 +138,12 @@ export default function Header(props) {
137
138
  <TextNative
138
139
  numberOfLines={1}
139
140
  ellipsizeMode="head"
140
- className={`
141
- Header-TextNative1
142
- flex-1
143
- font-bold
144
- ${styles.PANEL_HEADER_TEXT_CLASSNAME}
145
- `}>{title}</TextNative>
141
+ className={clsx(
142
+ 'Header-TextNative1',
143
+ 'flex-1',
144
+ 'font-bold',
145
+ styles.PANEL_HEADER_TEXT_CLASSNAME,
146
+ )}>{title}</TextNative>
146
147
  </div>
147
148
  </VStack>
148
149
  </div>;
@@ -175,12 +176,12 @@ export default function Header(props) {
175
176
  <TextNative
176
177
  numberOfLines={1}
177
178
  ellipsizeMode="head"
178
- className={`
179
- Header-TextNative2
180
- flex-1
181
- font-bold
182
- ${styles.PANEL_HEADER_TEXT_CLASSNAME}
183
- `}
179
+ className={clsx(
180
+ 'Header-TextNative2',
181
+ 'flex-1',
182
+ 'font-bold',
183
+ styles.PANEL_HEADER_TEXT_CLASSNAME,
184
+ )}
184
185
  >{title}</TextNative>
185
186
  {collapseBtn}
186
187
  </HStack>
@@ -215,13 +216,13 @@ export default function Header(props) {
215
216
  numberOfLines={1}
216
217
  ellipsizeMode="head"
217
218
  style={{ transform: [{ rotate: '-90deg'}] }}
218
- className={`
219
- Header-TextNative3
220
- font-bold
221
- w-[200px]
222
- text-right
223
- ${styles.PANEL_HEADER_TEXT_CLASSNAME}
224
- `}
219
+ className={clsx(
220
+ 'Header-TextNative3',
221
+ 'font-bold',
222
+ 'w-[200px]',
223
+ 'text-right',
224
+ styles.PANEL_HEADER_TEXT_CLASSNAME,
225
+ )}
225
226
  >{title}</TextNative>
226
227
  </VStack>
227
228
  </VStack>
@@ -251,12 +252,12 @@ export default function Header(props) {
251
252
  <TextNative
252
253
  numberOfLines={1}
253
254
  ellipsizeMode="head"
254
- className={`
255
- Header-TextNative4
256
- font-bold
257
- flex-1
258
- ${styles.PANEL_HEADER_TEXT_CLASSNAME}
259
- `}>{title}</TextNative>
255
+ className={clsx(
256
+ 'Header-TextNative4',
257
+ 'font-bold',
258
+ 'flex-1',
259
+ styles.PANEL_HEADER_TEXT_CLASSNAME,
260
+ )}>{title}</TextNative>
260
261
  {collapseBtn}
261
262
  </HStack>
262
263
  </Pressable>;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  Box,
3
3
  } from '@project-components/Gluestack';
4
+ import clsx from 'clsx';
4
5
  import {
5
6
  CURRENT_MODE,
6
7
  UI_MODE_WEB,
@@ -4,6 +4,7 @@ import {
4
4
  VStack,
5
5
  VStackNative,
6
6
  } from '@project-components/Gluestack';
7
+ import clsx from 'clsx';
7
8
  import {
8
9
  HORIZONTAL,
9
10
  VERTICAL,
@@ -136,12 +137,12 @@ function Panel(props) {
136
137
  {!isCollapsed && <>
137
138
  {topToolbar}
138
139
  <VStack
139
- className={`
140
- Panel-VSstack
141
- flex-1
142
- w-full
143
- overflow-hidden
144
- `}
140
+ className={clsx(
141
+ 'Panel-VSstack',
142
+ 'flex-1',
143
+ 'w-full',
144
+ 'overflow-hidden',
145
+ )}
145
146
  >
146
147
  {isScrollable ?
147
148
  <ScrollView
@@ -5,6 +5,7 @@ import {
5
5
  Select, SelectItem,
6
6
  Tooltip,
7
7
  } from '@project-components/Gluestack';
8
+ import clsx from 'clsx';
8
9
  import CaretDown from '../Icons/CaretDown.js';
9
10
  import testProps from '../../Functions/testProps.js';
10
11
  import _ from 'lodash';
@@ -8,6 +8,7 @@ import {
8
8
  VStack,
9
9
  VStackNative,
10
10
  } from '@project-components/Gluestack';
11
+ import clsx from 'clsx';
11
12
  import { EDITOR_TYPE__PLAIN } from '../../Constants/Editor';
12
13
  import {
13
14
  UI_MODE_WEB,
@@ -72,11 +73,11 @@ function Report(props) {
72
73
  }
73
74
 
74
75
  if (isQuickReport) {
75
- let className = `
76
- Report
77
- max-w-[100px]
78
- m-2
79
- `;
76
+ let className = clsx(
77
+ 'Report',
78
+ 'max-w-[100px]',
79
+ 'm-2',
80
+ );
80
81
  if (props.className) {
81
82
  className += ' ' + props.className;
82
83
  }
@@ -86,28 +87,28 @@ function Report(props) {
86
87
  >
87
88
  <Pressable
88
89
  onPress={onPressQuickReport}
89
- className={`
90
- flex-1
91
- items-center
92
- justify-center
93
- flex-col
94
- bg-white
95
- p-3
96
- rounded-lg
97
- border
98
- border-primary-300
99
- hover:bg-primary-300
100
- `}
90
+ className={clsx(
91
+ 'flex-1',
92
+ 'items-center',
93
+ 'justify-center',
94
+ 'flex-col',
95
+ 'bg-white',
96
+ 'p-3',
97
+ 'rounded-lg',
98
+ 'border',
99
+ 'border-primary-300',
100
+ 'hover:bg-primary-300',
101
+ )}
101
102
  >
102
103
  {icon}
103
104
  <Text
104
- className={`
105
- text-black
106
- text-center
107
- text-[17px]
108
- leading-tight
109
- mt-2
110
- `}
105
+ className={clsx(
106
+ 'text-black',
107
+ 'text-center',
108
+ 'text-[17px]',
109
+ 'leading-tight',
110
+ 'mt-2',
111
+ )}
111
112
  >{title}</Text>
112
113
  </Pressable>
113
114
  </VStackNative>;
@@ -145,16 +146,16 @@ function Report(props) {
145
146
  }
146
147
  return <VStackNative
147
148
  {...testProps('Report-' + reportId)}
148
- className={`
149
- w-full
150
- border
151
- border-primary-300
152
- p-4
153
- mb-3
154
- bg-white
155
- rounded-lg
156
- shadow-sm
157
- `}
149
+ className={clsx(
150
+ 'w-full',
151
+ 'border',
152
+ 'border-primary-300',
153
+ 'p-4',
154
+ 'mb-3',
155
+ 'bg-white',
156
+ 'rounded-lg',
157
+ 'shadow-sm',
158
+ )}
158
159
  >
159
160
  <HStack>
160
161
  <Box className="w-[50px] mr-4">
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  VStackNative,
3
3
  } from '@project-components/Gluestack';
4
+ import clsx from 'clsx';
4
5
  import React, { useState, useEffect, } from 'react';
5
6
  import {
6
7
  SCREEN_MODES__FULL,
@@ -5,6 +5,7 @@ import {
5
5
  VStack,
6
6
  VStackNative,
7
7
  } from '@project-components/Gluestack';
8
+ import clsx from 'clsx';
8
9
  import ChartPie from '../Icons/ChartPie.js';
9
10
  import ScreenHeader from '../Layout/ScreenHeader.js';
10
11
 
@@ -3,6 +3,7 @@ import {
3
3
  HStack,
4
4
  Icon,
5
5
  } from '@project-components/Gluestack';
6
+ import clsx from 'clsx';
6
7
  import {
7
8
  HORIZONTAL,
8
9
  VERTICAL,
@@ -8,6 +8,7 @@ import {
8
8
  VStack,
9
9
  VStackNative,
10
10
  } from '@project-components/Gluestack';
11
+ import clsx from 'clsx';
11
12
  import {
12
13
  HORIZONTAL,
13
14
  VERTICAL,
@@ -130,11 +131,11 @@ function TabBar(props) {
130
131
  tooltip={isCollapsed ? 'Expand' : 'Collapse'}
131
132
  />;
132
133
  } else {
133
- tabClassName += `
134
- ${direction === VERTICAL ? 'w-[200px]' : ''}
135
- pr-0
136
- mr-0
137
- `;
134
+ tabClassName += clsx(
135
+ direction === VERTICAL ? 'w-[200px]' : '',
136
+ 'pr-0',
137
+ 'mr-0',
138
+ );
138
139
  _icon.as = Minimize;
139
140
  button = <Button
140
141
  {...testProps('toggleBtn')}
@@ -158,59 +159,59 @@ function TabBar(props) {
158
159
  getTabProps = () => {
159
160
  const
160
161
  tabProps = {
161
- className: `
162
- ${styles.TAB_BG}
163
- ${isCollapsed ? 'justify-center' : 'justify-start'}
164
- `,
162
+ className: clsx(
163
+ styles.TAB_BG,
164
+ isCollapsed ? 'justify-center' : 'justify-start',
165
+ ),
165
166
  },
166
167
  textProps = {
167
168
  // numberOfLines: 1,
168
169
  // ellipsizeMode: 'head',
169
- className: `
170
- ${styles.TAB_FONTSIZE}
171
- ${styles.TAB_COLOR}
172
- `,
170
+ className: clsx(
171
+ styles.TAB_FONTSIZE,
172
+ styles.TAB_COLOR,
173
+ ),
173
174
  },
174
175
  iconProps = {
175
176
  // size: 'md',
176
- className: `
177
- ${styles.TAB_ICON_COLOR}
178
- `,
177
+ className: clsx(
178
+ styles.TAB_ICON_COLOR,
179
+ ),
179
180
  };
180
181
  switch(direction) {
181
182
  case VERTICAL:
182
- tabProps.className += `
183
- rounded-l-lg
184
- rounded-r-none
185
- w-full
186
- ml-2
187
- mr-0
188
- mb-1
189
- px-4
190
- `;
191
- textProps.className += `
192
- w-full
193
- mr-0
194
- mb-1
195
- py-0
196
- pl-3
197
- pr-0
198
- flex-1
199
- text-left
200
- `;
183
+ tabProps.className += clsx(
184
+ 'rounded-l-lg',
185
+ 'rounded-r-none',
186
+ 'w-full',
187
+ 'ml-2',
188
+ 'mr-0',
189
+ 'mb-1',
190
+ 'px-4',
191
+ );
192
+ textProps.className += clsx(
193
+ 'w-full',
194
+ 'mr-0',
195
+ 'mb-1',
196
+ 'py-0',
197
+ 'pl-3',
198
+ 'pr-0',
199
+ 'flex-1',
200
+ 'text-left',
201
+ );
201
202
  break;
202
203
  case HORIZONTAL:
203
- tabProps.className += `
204
- rounded-t
205
- rounded-b-none
206
- mr-1
207
- py-1
208
- `;
209
- textProps.className += `
210
- px-1
211
- py-0
212
- mr-1
213
- `;
204
+ tabProps.className += clsx(
205
+ 'rounded-t',
206
+ 'rounded-b-none',
207
+ 'mr-1',
208
+ 'py-1',
209
+ );
210
+ textProps.className += clsx(
211
+ 'px-1',
212
+ 'py-0',
213
+ 'mr-1',
214
+ );
214
215
  break;
215
216
  default:
216
217
  }
@@ -459,16 +460,16 @@ function TabBar(props) {
459
460
  tabBar = <VStackNative
460
461
  {...testProps('TabBar')}
461
462
  {...propsToPass}
462
- className={`
463
- ${isCollapsed ? 'w-[50px]' : 'w-[' + tabWidth + 'px]'}
464
- ${isCollapsed ? 'pl-1' : 'pl-4'}
465
- items-center
466
- justify-start
467
- py-2
468
- overflow-x-hidden
469
- overflow-y-auto
470
- ${styles.TAB_BAR_CLASSNAME}
471
- `}
463
+ className={clsx(
464
+ isCollapsed ? 'w-[50px]' : 'w-[' + tabWidth + 'px]',
465
+ isCollapsed ? 'pl-1' : 'pl-4',
466
+ 'items-center',
467
+ 'justify-start',
468
+ 'py-2',
469
+ 'overflow-x-hidden',
470
+ 'overflow-y-auto',
471
+ styles.TAB_BAR_CLASSNAME
472
+ )}
472
473
  >
473
474
  {renderedTabs}
474
475
  {canToggleCollapse ?
@@ -488,16 +489,16 @@ function TabBar(props) {
488
489
  if (direction === HORIZONTAL) {
489
490
  tabBar = <HStackNative
490
491
  {...testProps('TabBar')}
491
- className={`
492
- ${'h-[' + tabHeight + 'px]'}
493
- items-center
494
- justify-start
495
- overflow-x-auto
496
- overflow-y-hidden
497
- p-1
498
- pb-0
499
- ${styles.TAB_BAR_CLASSNAME}
500
- `}
492
+ className={clsx(
493
+ 'h-[' + tabHeight + 'px]',
494
+ 'items-center',
495
+ 'justify-start',
496
+ 'overflow-x-auto',
497
+ 'overflow-y-hidden',
498
+ 'p-1',
499
+ 'pb-0',
500
+ styles.TAB_BAR_CLASSNAME
501
+ )}
501
502
  >
502
503
  <ScrollView
503
504
  horizontal={true}
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  HStack,
3
3
  } from '@project-components/Gluestack';
4
+ import clsx from 'clsx';
4
5
  import Toolbar from './Toolbar.js'
5
6
  import _ from 'lodash';
6
7
 
@@ -8,17 +9,19 @@ export default function FilterToolbar(props) {
8
9
  const {
9
10
  toolbarItems = [],
10
11
  } = props;
11
- return <Toolbar className={`
12
- bg-grey-200
13
- border-t
14
- border-t-grey-400
15
- w-full
16
- `} >
12
+ return <Toolbar
13
+ className={clsx(
14
+ 'bg-grey-200',
15
+ 'border-t',
16
+ 'border-t-grey-400',
17
+ 'w-full',
18
+ )}
19
+ >
17
20
  {toolbarItems.length &&
18
- <HStack className={`
19
- flex-1
20
- border
21
- border-l-grey-100
22
- `}>{toolbarItems}</HStack>}
21
+ <HStack className={clsx(
22
+ 'flex-1',
23
+ 'border',
24
+ 'border-l-grey-100',
25
+ )}>{toolbarItems}</HStack>}
23
26
  </Toolbar>;
24
27
  };
@@ -4,6 +4,7 @@ import {
4
4
  HStackNative,
5
5
  Text,
6
6
  } from '@project-components/Gluestack';
7
+ import clsx from 'clsx';
7
8
  import useForceUpdate from '../../Hooks/useForceUpdate.js';
8
9
  import testProps from '../../Functions/testProps.js';
9
10
  import Button from '../Buttons/Button.js';
@@ -154,25 +155,25 @@ export default function Pagination(props) {
154
155
  onChangeValue={(value) => Repository.setPage(value)}
155
156
  maxValue={totalPages}
156
157
  isDisabled={totalPages === 1}
157
- className={`
158
- Pagination-pageInput
159
- min-w-[40px]
160
- w-[40px]
161
- text-center
162
- bg-grey-100
163
- `}
158
+ className={clsx(
159
+ 'Pagination-pageInput',
160
+ 'min-w-[40px]',
161
+ 'w-[40px]',
162
+ 'text-center',
163
+ 'bg-grey-100',
164
+ )}
164
165
  textAlignIsCenter={true}
165
166
  tooltip="Set Page"
166
167
  tooltipClassName="w-[40px]"
167
168
  />);
168
169
  items.push(<Text
169
170
  key="totalPages"
170
- className={`
171
- Pagination-totalPages
172
- whitespace-nowrap
173
- inline-flex
174
- mx-1
175
- `}
171
+ className={clsx(
172
+ 'Pagination-totalPages',
173
+ 'whitespace-nowrap',
174
+ 'inline-flex',
175
+ 'mx-1',
176
+ )}
176
177
  >{`of ${totalPages}`}</Text>);
177
178
  }
178
179
  }
@@ -194,12 +195,12 @@ export default function Pagination(props) {
194
195
  }
195
196
  items.push(<Text
196
197
  key="pageDisplay"
197
- className={`
198
- Pagination-pageDisplay
199
- whitespace-nowrap
200
- inline-flex
201
- mx-1
202
- `}
198
+ className={clsx(
199
+ 'Pagination-pageDisplay',
200
+ 'whitespace-nowrap',
201
+ 'inline-flex',
202
+ 'mx-1',
203
+ )}
203
204
  >{`Displaying ${pageSpan} of ${total}`}</Text>);
204
205
  }
205
206
  }
@@ -207,12 +208,12 @@ export default function Pagination(props) {
207
208
  style={{
208
209
  userSelect: 'none',
209
210
  }}
210
- className={`
211
- Pagination
212
- items-center
213
- shrink-0
214
- gap-2
215
- `}
211
+ className={clsx(
212
+ 'Pagination',
213
+ 'items-center',
214
+ 'shrink-0',
215
+ 'gap-2',
216
+ )}
216
217
  >
217
218
  {items}
218
219
  </HStack>;