@quillsql/react 1.1.1 → 1.1.2
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/lib/BarList.js +15 -15
- package/lib/BarList.js.map +1 -1
- package/lib/Chart.js +10 -10
- package/lib/Chart.js.map +1 -1
- package/lib/Dashboard.js +3 -3
- package/lib/Dashboard.js.map +1 -1
- package/lib/DateRangePicker/Calendar.js +7 -7
- package/lib/DateRangePicker/Calendar.js.map +1 -1
- package/lib/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/DateRangePicker/DateRangePicker.js.map +1 -1
- package/lib/DateRangePicker/DateRangePickerButton.js +3 -3
- package/lib/DateRangePicker/DateRangePickerButton.js.map +1 -1
- package/lib/PieChart.js +8 -8
- package/lib/PieChart.js.map +1 -1
- package/lib/components/Dropdown/Dropdown.js +4 -4
- package/lib/components/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/Dropdown/DropdownItem.js +2 -2
- package/lib/components/Dropdown/DropdownItem.js.map +1 -1
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/Modal/Modal.js.map +1 -1
- package/lib/lib/colorClassNames.js +3094 -3094
- package/lib/lib/colorClassNames.js.map +1 -1
- package/lib/lib/constants.d.ts +1 -1
- package/lib/lib/constants.js +36 -36
- package/lib/lib/constants.js.map +1 -1
- package/lib/lib/font.js +9 -9
- package/lib/lib/font.js.map +1 -1
- package/lib/lib/hexColors.js +25 -25
- package/lib/lib/index.d.ts +10 -10
- package/lib/lib/index.js +10 -10
- package/lib/lib/inputTypes.d.ts +4 -4
- package/lib/lib/inputTypes.js +50 -31
- package/lib/lib/inputTypes.js.map +1 -1
- package/lib/lib/shape.js +49 -49
- package/lib/lib/shape.js.map +1 -1
- package/lib/lib/sizing.js +20 -20
- package/lib/lib/sizing.js.map +1 -1
- package/lib/lib/spacing.js +238 -238
- package/lib/lib/spacing.js.map +1 -1
- package/lib/styles.css +2813 -3785
- package/package.json +4 -2
- package/prefix-classnames.js +50 -0
- package/src/BarList.tsx +62 -42
- package/src/Chart.tsx +25 -19
- package/src/Dashboard.tsx +4 -4
- package/src/DateRangePicker/Calendar.tsx +16 -16
- package/src/DateRangePicker/DateRangePicker.tsx +2 -2
- package/src/DateRangePicker/DateRangePickerButton.tsx +7 -7
- package/src/PieChart.tsx +13 -13
- package/src/components/Dropdown/Dropdown.tsx +6 -6
- package/src/components/Dropdown/DropdownItem.tsx +3 -3
- package/src/components/Modal/Modal.tsx +2 -2
- package/src/lib/colorClassNames.ts +3094 -3094
- package/src/lib/constants.ts +43 -37
- package/src/lib/font.ts +9 -9
- package/src/lib/hexColors.ts +25 -25
- package/src/lib/index.ts +10 -10
- package/src/lib/inputTypes.ts +54 -35
- package/src/lib/shape.ts +49 -49
- package/src/lib/sizing.ts +20 -20
- package/src/lib/spacing.ts +238 -238
- package/tailwind.config.js +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quillsql/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"access": "public",
|
|
5
5
|
"description": "Quill React components for building dashboards and reporting.",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"lint:fix": "eslint --fix 'src/**/*.{ts,tsx}'",
|
|
12
12
|
"prettier": "prettier --check 'src/**/*.{ts,tsx}'",
|
|
13
13
|
"prettier:fix": "prettier --write 'src/**/*.{ts,tsx}'",
|
|
14
|
-
"build:css": "postcss src/styles.css -o lib/styles.css"
|
|
14
|
+
"build:css": "postcss src/styles.css -o lib/styles.css",
|
|
15
|
+
"prefix-classnames": "node ./prefix-classnames.js"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [],
|
|
17
18
|
"author": "",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
"eslint-config-prettier": "^8.8.0",
|
|
42
43
|
"eslint-plugin-prettier": "^4.2.1",
|
|
43
44
|
"eslint-plugin-react": "^7.32.2",
|
|
45
|
+
"glob": "^10.2.2",
|
|
44
46
|
"postcss": "^8.4.21",
|
|
45
47
|
"postcss-cli": "^10.1.0",
|
|
46
48
|
"prettier": "^2.8.7"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { glob } = require('glob');
|
|
4
|
+
|
|
5
|
+
const rootDir = path.resolve(__dirname);
|
|
6
|
+
const classNameRegex = /className=["']([\w\s-]+)["']/g;
|
|
7
|
+
|
|
8
|
+
console.log('Root directory:', rootDir);
|
|
9
|
+
|
|
10
|
+
try {
|
|
11
|
+
const files = glob.sync('**/*.{js,jsx,tsx}', {
|
|
12
|
+
cwd: rootDir,
|
|
13
|
+
ignore: '**/node_modules/**',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
console.log('Files found:', files);
|
|
17
|
+
|
|
18
|
+
files.forEach(file => {
|
|
19
|
+
console.log('Processing file:', file);
|
|
20
|
+
const filePath = path.join(rootDir, file);
|
|
21
|
+
fs.readFile(filePath, 'utf-8', (err, data) => {
|
|
22
|
+
if (err) {
|
|
23
|
+
console.error('Error reading file:', err);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result = data.replace(classNameRegex, (match, p1) => {
|
|
28
|
+
const classNames = p1.split(' ');
|
|
29
|
+
const prefixedClassNames = classNames.map(className => {
|
|
30
|
+
if (className.startsWith('qq-')) {
|
|
31
|
+
return className;
|
|
32
|
+
} else {
|
|
33
|
+
return `qq-${className}`;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return `className="${prefixedClassNames.join(' ')}"`;
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
fs.writeFile(filePath, result, 'utf-8', err => {
|
|
40
|
+
if (err) {
|
|
41
|
+
console.error('Error writing file:', err);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
console.log('File updated successfully:', filePath);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error('Error in glob.sync():', error);
|
|
50
|
+
}
|
package/src/BarList.tsx
CHANGED
|
@@ -146,15 +146,15 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
146
146
|
}}
|
|
147
147
|
className={twMerge(
|
|
148
148
|
// makeBarListClassName('root'),
|
|
149
|
-
'flex justify-between',
|
|
150
|
-
'space-x-6',
|
|
149
|
+
'qq-flex qq-justify-between',
|
|
150
|
+
'qq-space-x-6',
|
|
151
151
|
className
|
|
152
152
|
)}
|
|
153
153
|
{...other}
|
|
154
154
|
>
|
|
155
155
|
<div
|
|
156
156
|
// className={twMerge(makeBarListClassName('bars'), 'relative w-full')}
|
|
157
|
-
className="relative-w-full
|
|
157
|
+
className="qq-relative-w-full"
|
|
158
158
|
style={{ width: '100%' }}
|
|
159
159
|
>
|
|
160
160
|
{data.slice(0, Math.floor(NUM_TO_SHOW / 2)).map((item, idx) => {
|
|
@@ -163,7 +163,7 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
163
163
|
|
|
164
164
|
return (
|
|
165
165
|
<div
|
|
166
|
-
className="flex flex-row items-center"
|
|
166
|
+
className="qq-flex qq-flex-row qq-items-center"
|
|
167
167
|
key={item[xAxisField] + idx}
|
|
168
168
|
>
|
|
169
169
|
<div
|
|
@@ -173,17 +173,17 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
173
173
|
<p
|
|
174
174
|
className={twMerge(
|
|
175
175
|
// makeBarListClassName('barText'),
|
|
176
|
-
'whitespace-nowrap truncate',
|
|
177
|
-
'text-gray-500',
|
|
178
|
-
'text-sm'
|
|
176
|
+
'qq-whitespace-nowrap truncate',
|
|
177
|
+
'qq-text-gray-500',
|
|
178
|
+
'qq-text-sm'
|
|
179
179
|
)}
|
|
180
180
|
>
|
|
181
181
|
{item[xAxisField]}
|
|
182
182
|
</p>
|
|
183
183
|
</div>
|
|
184
|
-
<div style={{ width: '100%' }} className="flex flex-col">
|
|
184
|
+
<div style={{ width: '100%' }} className="qq-flex qq-flex-col">
|
|
185
185
|
<div
|
|
186
|
-
className={`flex items-center h-9 rounded mb-2`}
|
|
186
|
+
className={`qq-flex qq-items-center qq-h-9 qq-rounded qq-mb-2`}
|
|
187
187
|
style={{
|
|
188
188
|
width: `${widths[idx]}%`,
|
|
189
189
|
transition: showAnimation ? 'all 2s' : '',
|
|
@@ -191,14 +191,17 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
191
191
|
}}
|
|
192
192
|
>
|
|
193
193
|
<div
|
|
194
|
-
className={twMerge(
|
|
194
|
+
className={twMerge(
|
|
195
|
+
'qq-absolute qq-max-w-full qq-flex',
|
|
196
|
+
'qq-ml-2'
|
|
197
|
+
)}
|
|
195
198
|
>
|
|
196
199
|
<p
|
|
197
200
|
className={twMerge(
|
|
198
201
|
// makeBarListClassName('barText'),
|
|
199
|
-
'whitespace-nowrap truncate',
|
|
200
|
-
'text-gray-500',
|
|
201
|
-
'text-sm'
|
|
202
|
+
'qq-whitespace-nowrap truncate',
|
|
203
|
+
'qq-text-gray-500',
|
|
204
|
+
'qq-text-sm'
|
|
202
205
|
)}
|
|
203
206
|
>
|
|
204
207
|
{yAxisFields[0].label}
|
|
@@ -206,7 +209,7 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
206
209
|
</div>
|
|
207
210
|
</div>
|
|
208
211
|
<div
|
|
209
|
-
className={`flex items-center h-9 rounded mb-2`}
|
|
212
|
+
className={`qq-flex qq-items-center qq-h-9 qq-rounded qq-mb-2`}
|
|
210
213
|
style={{
|
|
211
214
|
width: `${widths2[idx]}%`,
|
|
212
215
|
transition: showAnimation ? 'all 2s' : '',
|
|
@@ -214,14 +217,17 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
214
217
|
}}
|
|
215
218
|
>
|
|
216
219
|
<div
|
|
217
|
-
className={twMerge(
|
|
220
|
+
className={twMerge(
|
|
221
|
+
'qq-absolute qq-max-w-full qq-flex',
|
|
222
|
+
'qq-ml-2'
|
|
223
|
+
)}
|
|
218
224
|
>
|
|
219
225
|
<p
|
|
220
226
|
className={twMerge(
|
|
221
227
|
// makeBarListClassName('barText'),
|
|
222
|
-
'whitespace-nowrap truncate',
|
|
223
|
-
'text-gray-500',
|
|
224
|
-
'text-sm'
|
|
228
|
+
'qq-whitespace-nowrap truncate',
|
|
229
|
+
'qq-text-gray-500',
|
|
230
|
+
'qq-text-sm'
|
|
225
231
|
)}
|
|
226
232
|
>
|
|
227
233
|
{yAxisFields[1].label}
|
|
@@ -234,31 +240,36 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
234
240
|
);
|
|
235
241
|
})}
|
|
236
242
|
{data.length > NUM_TO_SHOW && (
|
|
237
|
-
<div
|
|
243
|
+
<div
|
|
244
|
+
style={{ color: theme.chartLabelColor }}
|
|
245
|
+
className="qq-text-sm"
|
|
246
|
+
>
|
|
238
247
|
...{data.length - NUM_TO_SHOW} more
|
|
239
248
|
</div>
|
|
240
249
|
)}
|
|
241
250
|
</div>
|
|
242
251
|
{/* eslint-disable prettier/prettier */}
|
|
243
252
|
<div
|
|
244
|
-
className={
|
|
253
|
+
className={
|
|
254
|
+
(makeBarListClassName('labels'), 'qq-text-right qq-min-w-min')
|
|
255
|
+
}
|
|
245
256
|
>
|
|
246
257
|
{data.slice(0, NUM_TO_SHOW).map((item, idx) => (
|
|
247
258
|
<div
|
|
248
259
|
key={item[xAxisField] + 'label' + idx}
|
|
249
260
|
className={twMerge(
|
|
250
261
|
makeBarListClassName('labelWrapper'),
|
|
251
|
-
'flex justify-end items-center',
|
|
252
|
-
'h-9',
|
|
253
|
-
idx === data.length - 1 ? 'mb-0' : 'mb-2'
|
|
262
|
+
'qq-flex qq-justify-end qq-items-center',
|
|
263
|
+
'qq-h-9',
|
|
264
|
+
idx === data.length - 1 ? 'qq-mb-0' : 'qq-mb-2'
|
|
254
265
|
)}
|
|
255
266
|
>
|
|
256
267
|
<p
|
|
257
268
|
className={twMerge(
|
|
258
269
|
makeBarListClassName('labelText'),
|
|
259
|
-
'whitespace-nowrap truncate',
|
|
260
|
-
'text-gray-500',
|
|
261
|
-
'text-sm'
|
|
270
|
+
'qq-whitespace-nowrap truncate',
|
|
271
|
+
'qq-text-gray-500',
|
|
272
|
+
'qq-text-sm'
|
|
262
273
|
)}
|
|
263
274
|
>
|
|
264
275
|
{valueFormatter(item[yAxisFields[0].field])}
|
|
@@ -283,15 +294,15 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
283
294
|
}}
|
|
284
295
|
className={twMerge(
|
|
285
296
|
// makeBarListClassName('root'),
|
|
286
|
-
'flex justify-between',
|
|
287
|
-
'space-x-6',
|
|
297
|
+
'qq-flex qq-justify-between',
|
|
298
|
+
'qq-space-x-6',
|
|
288
299
|
className
|
|
289
300
|
)}
|
|
290
301
|
{...other}
|
|
291
302
|
>
|
|
292
303
|
<div
|
|
293
304
|
// className={twMerge(makeBarListClassName('bars'), 'relative w-full')}
|
|
294
|
-
className="relative-w-full
|
|
305
|
+
className="qq-relative-w-full"
|
|
295
306
|
style={{ width: '100%' }}
|
|
296
307
|
>
|
|
297
308
|
{data.slice(0, NUM_TO_SHOW).map((item, idx) => {
|
|
@@ -301,20 +312,25 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
301
312
|
return (
|
|
302
313
|
<div
|
|
303
314
|
key={item[xAxisField] + 'label' + idx}
|
|
304
|
-
className={`flex items-center h-9 rounded mb-2`}
|
|
315
|
+
className={`qq-flex qq-items-center qq-h-9 qq-rounded qq-mb-2`}
|
|
305
316
|
style={{
|
|
306
317
|
width: `${widths[idx]}%`,
|
|
307
318
|
transition: showAnimation ? 'all 2s' : '',
|
|
308
319
|
backgroundColor: hexToRgbaWith10PercentAlpha(colors[0]),
|
|
309
320
|
}}
|
|
310
321
|
>
|
|
311
|
-
<div
|
|
322
|
+
<div
|
|
323
|
+
className={twMerge(
|
|
324
|
+
'qq-absolute qq-max-w-full qq-flex',
|
|
325
|
+
'qq-ml-2'
|
|
326
|
+
)}
|
|
327
|
+
>
|
|
312
328
|
<p
|
|
313
329
|
className={twMerge(
|
|
314
330
|
// makeBarListClassName('barText'),
|
|
315
|
-
'whitespace-nowrap truncate',
|
|
316
|
-
'text-gray-500',
|
|
317
|
-
'text-sm'
|
|
331
|
+
'qq-whitespace-nowrap truncate',
|
|
332
|
+
'qq-text-gray-500',
|
|
333
|
+
'qq-text-sm'
|
|
318
334
|
)}
|
|
319
335
|
>
|
|
320
336
|
{item[xAxisField]}
|
|
@@ -324,29 +340,33 @@ const BarList = React.forwardRef<HTMLDivElement, BarListProps>((props, ref) => {
|
|
|
324
340
|
);
|
|
325
341
|
})}
|
|
326
342
|
{data.length > NUM_TO_SHOW && (
|
|
327
|
-
<div style={{ color: theme.chartLabelColor }} className="text-sm">
|
|
343
|
+
<div style={{ color: theme.chartLabelColor }} className="qq-text-sm">
|
|
328
344
|
...{data.length - NUM_TO_SHOW} more
|
|
329
345
|
</div>
|
|
330
346
|
)}
|
|
331
347
|
</div>
|
|
332
348
|
{/* eslint-disable prettier/prettier */}
|
|
333
|
-
<div
|
|
349
|
+
<div
|
|
350
|
+
className={
|
|
351
|
+
(makeBarListClassName('labels'), 'qq-text-right qq-min-w-min')
|
|
352
|
+
}
|
|
353
|
+
>
|
|
334
354
|
{data.slice(0, NUM_TO_SHOW).map((item, idx) => (
|
|
335
355
|
<div
|
|
336
356
|
key={item[xAxisField] + 'value' + idx}
|
|
337
357
|
className={twMerge(
|
|
338
358
|
makeBarListClassName('labelWrapper'),
|
|
339
|
-
'flex justify-end items-center',
|
|
340
|
-
'h-9',
|
|
341
|
-
idx === data.length - 1 ? 'mb-0' : 'mb-2'
|
|
359
|
+
'qq-flex qq-justify-end qq-items-center',
|
|
360
|
+
'qq-h-9',
|
|
361
|
+
idx === data.length - 1 ? 'qq-mb-0' : 'qq-mb-2'
|
|
342
362
|
)}
|
|
343
363
|
>
|
|
344
364
|
<p
|
|
345
365
|
className={twMerge(
|
|
346
366
|
makeBarListClassName('labelText'),
|
|
347
|
-
'whitespace-nowrap truncate',
|
|
348
|
-
'text-gray-500',
|
|
349
|
-
'text-sm'
|
|
367
|
+
'qq-whitespace-nowrap qq-truncate',
|
|
368
|
+
'qq-text-gray-500',
|
|
369
|
+
'qq-text-sm'
|
|
350
370
|
)}
|
|
351
371
|
>
|
|
352
372
|
{valueFormatter(item[yAxisFields[0].field])}
|
package/src/Chart.tsx
CHANGED
|
@@ -203,7 +203,7 @@ export const ChartTooltipFrame = ({
|
|
|
203
203
|
children: React.ReactNode;
|
|
204
204
|
}) => (
|
|
205
205
|
<div
|
|
206
|
-
className="bg-white text-sm rounded-md border shadow-lg"
|
|
206
|
+
className="qq-bg-white qq-text-sm qq-rounded-md qq-border qq-shadow-lg"
|
|
207
207
|
// className={twMerge(
|
|
208
208
|
// 'bg-white',
|
|
209
209
|
// 'font-normal',
|
|
@@ -228,8 +228,8 @@ export const ChartTooltipRow = ({
|
|
|
228
228
|
name,
|
|
229
229
|
color,
|
|
230
230
|
}: ChartTooltipRowProps) => (
|
|
231
|
-
<div className="flex items-center justify-between space-x-8">
|
|
232
|
-
<div className="flex items-center space-x-2">
|
|
231
|
+
<div className="qq-flex qq-items-center qq-justify-between qq-space-x-8">
|
|
232
|
+
<div className="qq-flex qq-items-center qq-space-x-2">
|
|
233
233
|
<span
|
|
234
234
|
style={{ background: color, borderWidth: 2, borderColor: 'white' }}
|
|
235
235
|
className={twMerge(
|
|
@@ -239,10 +239,10 @@ export const ChartTooltipRow = ({
|
|
|
239
239
|
// 'border-black',
|
|
240
240
|
// sizing.sm.height,
|
|
241
241
|
// sizing.sm.width,
|
|
242
|
-
'h-3',
|
|
243
|
-
'w-3',
|
|
244
|
-
'shadow',
|
|
245
|
-
'rounded-full'
|
|
242
|
+
'qq-h-3',
|
|
243
|
+
'qq-w-3',
|
|
244
|
+
'qq-shadow',
|
|
245
|
+
'qq-rounded-full'
|
|
246
246
|
// border.md.all,
|
|
247
247
|
// boxShadow.md
|
|
248
248
|
)}
|
|
@@ -252,16 +252,16 @@ export const ChartTooltipRow = ({
|
|
|
252
252
|
// 'font-medium tabular-nums text-right whitespace-nowrap',
|
|
253
253
|
// 'text-[#212121] !important'
|
|
254
254
|
// )}
|
|
255
|
-
className="font-medium tabular-nums text-right whitespace-nowrap text-black"
|
|
255
|
+
className="qq-font-medium qq-tabular-nums qq-text-right qq-whitespace-nowrap qq-text-black"
|
|
256
256
|
>
|
|
257
257
|
{value}
|
|
258
258
|
</p>
|
|
259
259
|
</div>
|
|
260
260
|
<p
|
|
261
261
|
className={twMerge(
|
|
262
|
-
'text-right whitespace-nowrap',
|
|
262
|
+
'qq-text-right qq-whitespace-nowrap',
|
|
263
263
|
// getColorClassNames(DEFAULT_COLOR, colorPalette.text).textColor,
|
|
264
|
-
'text-gray-500'
|
|
264
|
+
'qq-text-gray-500'
|
|
265
265
|
// fontWeight.sm
|
|
266
266
|
)}
|
|
267
267
|
>
|
|
@@ -289,7 +289,7 @@ const ChartTooltip = ({
|
|
|
289
289
|
return (
|
|
290
290
|
<ChartTooltipFrame>
|
|
291
291
|
<div
|
|
292
|
-
className="flex flex-col py-2 px-4 border-b gray-200"
|
|
292
|
+
className="qq-flex qq-flex-col qq-py-2 qq-px-4 qq-border-b qq-gray-200"
|
|
293
293
|
// className={
|
|
294
294
|
// twMerge()
|
|
295
295
|
// getColorClassNames(DEFAULT_COLOR, colorPalette.lightBorder)
|
|
@@ -302,10 +302,10 @@ const ChartTooltip = ({
|
|
|
302
302
|
<p
|
|
303
303
|
style={{ textAlign: 'left' }}
|
|
304
304
|
className={twMerge(
|
|
305
|
-
'text-elem',
|
|
306
|
-
'text-black',
|
|
307
|
-
'font-medium',
|
|
308
|
-
'gray-700'
|
|
305
|
+
'qq-text-elem',
|
|
306
|
+
'qq-text-black',
|
|
307
|
+
'qq-font-medium',
|
|
308
|
+
'qq-gray-700'
|
|
309
309
|
// getColorClassNames(DEFAULT_COLOR, colorPalette.darkText)
|
|
310
310
|
// .textColor,
|
|
311
311
|
// fontWeight.md
|
|
@@ -319,7 +319,7 @@ const ChartTooltip = ({
|
|
|
319
319
|
</div>
|
|
320
320
|
|
|
321
321
|
<div
|
|
322
|
-
className="px-4 space-y-1 py-2 px-4"
|
|
322
|
+
className="qq-px-4 qq-space-y-1 qq-py-2 qq-px-4"
|
|
323
323
|
// className={
|
|
324
324
|
// twMerge()
|
|
325
325
|
// spacing.twoXl.paddingX,
|
|
@@ -612,7 +612,7 @@ const ChartUpdater: React.FC<ChartProps> = ({
|
|
|
612
612
|
height: '100%',
|
|
613
613
|
// background: 'red',
|
|
614
614
|
}}
|
|
615
|
-
className="flex flex-col text-xl"
|
|
615
|
+
className="qq-flex qq-flex-col qq-text-xl"
|
|
616
616
|
>
|
|
617
617
|
{formatNumber(
|
|
618
618
|
chartConfig.rows[0][chartConfig.xAxisField],
|
|
@@ -719,7 +719,10 @@ function BarChart({
|
|
|
719
719
|
}) {
|
|
720
720
|
const newColors = findComplementaryAndAnalogousColors(colors[0], colors[1]);
|
|
721
721
|
return (
|
|
722
|
-
<div
|
|
722
|
+
<div
|
|
723
|
+
style={containerStyle}
|
|
724
|
+
className="qq-flex qq-flex-col qq-flex-1 qq-h-full qq-w-full"
|
|
725
|
+
>
|
|
723
726
|
<ResponsiveContainer width="100%" height={'100%'}>
|
|
724
727
|
<ReChartsBarChart
|
|
725
728
|
data={data}
|
|
@@ -855,7 +858,10 @@ function LineChart({
|
|
|
855
858
|
return null;
|
|
856
859
|
}
|
|
857
860
|
return (
|
|
858
|
-
<div
|
|
861
|
+
<div
|
|
862
|
+
style={containerStyle}
|
|
863
|
+
className="qq-flex qq-flex-col qq-flex-1 qq-h-full qq-w-full"
|
|
864
|
+
>
|
|
859
865
|
<ResponsiveContainer width="100%" height={'100%'}>
|
|
860
866
|
<ReChartsAreaChart data={data}>
|
|
861
867
|
<CartesianGrid
|
package/src/Dashboard.tsx
CHANGED
|
@@ -176,7 +176,7 @@ export default function Dashboard({
|
|
|
176
176
|
onClick={() => handleOnClickDashboardItem(elem._id)}
|
|
177
177
|
className={
|
|
178
178
|
onClickDashboardItem
|
|
179
|
-
? 'hover:bg-zinc-50'
|
|
179
|
+
? 'hover:qq-bg-zinc-50'
|
|
180
180
|
: undefined
|
|
181
181
|
}
|
|
182
182
|
key={elem.name + '' + index}
|
|
@@ -332,13 +332,13 @@ export default function Dashboard({
|
|
|
332
332
|
}
|
|
333
333
|
className={
|
|
334
334
|
onClickDashboardItem
|
|
335
|
-
? 'hover:bg-zinc-50'
|
|
335
|
+
? 'hover:qq-bg-zinc-50'
|
|
336
336
|
: undefined
|
|
337
337
|
}
|
|
338
|
-
// className="shadow-md"
|
|
338
|
+
// className="qq-shadow-md"
|
|
339
339
|
key={elem.name + '' + index}
|
|
340
340
|
// onClick={() => handleEditDashboardItem(elem)}
|
|
341
|
-
// className="shadow"
|
|
341
|
+
// className="qq-shadow"
|
|
342
342
|
style={{
|
|
343
343
|
// background: theme.elevatedCardColor,
|
|
344
344
|
// borderRadius: theme.borderRadius,
|
|
@@ -87,7 +87,7 @@ const CalendarHeader = ({
|
|
|
87
87
|
<div
|
|
88
88
|
className={twMerge(
|
|
89
89
|
makeDateRangePickerClassName('calendarHeader'),
|
|
90
|
-
'flex justify-between items-center',
|
|
90
|
+
'qq-flex qq-justify-between qq-items-center',
|
|
91
91
|
spacing.twoXs.paddingX,
|
|
92
92
|
spacing.sm.paddingY
|
|
93
93
|
)}
|
|
@@ -95,15 +95,15 @@ const CalendarHeader = ({
|
|
|
95
95
|
<div
|
|
96
96
|
className={twMerge(
|
|
97
97
|
makeDateRangePickerClassName('calendarHeaderPrevSelection'),
|
|
98
|
-
'flex items-center space-x-1'
|
|
98
|
+
'qq-flex qq-items-center qq-space-x-1'
|
|
99
99
|
)}
|
|
100
100
|
>
|
|
101
101
|
<button
|
|
102
102
|
type="button"
|
|
103
103
|
className={twMerge(
|
|
104
104
|
makeDateRangePickerClassName('calendarHeaderPrevYearButton'),
|
|
105
|
-
'inline-flex focus:outline-none focus:ring-2',
|
|
106
|
-
!enableYearPagination && 'hidden',
|
|
105
|
+
'qq-inline-flex focus:qq-outline-none focus:qq-ring-2',
|
|
106
|
+
!enableYearPagination && 'qq-hidden',
|
|
107
107
|
getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
|
|
108
108
|
.hoverBgColor,
|
|
109
109
|
getColorClassNames(DEFAULT_COLOR, colorPalette.ring).borderColor,
|
|
@@ -134,7 +134,7 @@ const CalendarHeader = ({
|
|
|
134
134
|
name="prevMonth"
|
|
135
135
|
className={twMerge(
|
|
136
136
|
makeDateRangePickerClassName('calendarHeaderPrevMonthButton'),
|
|
137
|
-
'inline-flex focus:outline-none focus:ring-2',
|
|
137
|
+
'qq-inline-flex focus:qq-outline-none focus:qq-ring-2',
|
|
138
138
|
getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
|
|
139
139
|
.hoverBgColor,
|
|
140
140
|
getColorClassNames(DEFAULT_COLOR, colorPalette.ring).borderColor,
|
|
@@ -163,7 +163,7 @@ const CalendarHeader = ({
|
|
|
163
163
|
<h2
|
|
164
164
|
className={twMerge(
|
|
165
165
|
makeDateRangePickerClassName('calendarHeaderText'),
|
|
166
|
-
'text-elem',
|
|
166
|
+
'qq-text-elem',
|
|
167
167
|
getColorClassNames(DEFAULT_COLOR, colorPalette.darkestText).textColor,
|
|
168
168
|
fontSize.sm,
|
|
169
169
|
fontWeight.lg
|
|
@@ -174,7 +174,7 @@ const CalendarHeader = ({
|
|
|
174
174
|
<div
|
|
175
175
|
className={twMerge(
|
|
176
176
|
makeDateRangePickerClassName('calendarHeaderNextSelection'),
|
|
177
|
-
'flex items-center space-x-1'
|
|
177
|
+
'qq-flex qq-items-center qq-space-x-1'
|
|
178
178
|
)}
|
|
179
179
|
>
|
|
180
180
|
<button
|
|
@@ -182,7 +182,7 @@ const CalendarHeader = ({
|
|
|
182
182
|
name="nextMonth"
|
|
183
183
|
className={twMerge(
|
|
184
184
|
makeDateRangePickerClassName('calendarHeaderNextMonthButton'),
|
|
185
|
-
'inline-flex focus:outline-none focus:ring-2',
|
|
185
|
+
'qq-inline-flex focus:qq-outline-none focus:qq-ring-2',
|
|
186
186
|
getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
|
|
187
187
|
.hoverBgColor,
|
|
188
188
|
getColorClassNames(DEFAULT_COLOR, colorPalette.ring).borderColor,
|
|
@@ -211,7 +211,7 @@ const CalendarHeader = ({
|
|
|
211
211
|
type="button"
|
|
212
212
|
className={twMerge(
|
|
213
213
|
makeDateRangePickerClassName('calendarHeaderNextYearButton'),
|
|
214
|
-
'inline-flex focus:outline-none focus:ring-2',
|
|
214
|
+
'qq-inline-flex focus:qq-outline-none focus:qq-ring-2',
|
|
215
215
|
!enableYearPagination && 'hidden',
|
|
216
216
|
getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
|
|
217
217
|
.hoverBgColor,
|
|
@@ -230,7 +230,7 @@ const CalendarHeader = ({
|
|
|
230
230
|
<DoubleArrowRightHeadIcon
|
|
231
231
|
className={twMerge(
|
|
232
232
|
makeDateRangePickerClassName('calendarHeaderNextYearIcon'),
|
|
233
|
-
'shrink-0 flex-0',
|
|
233
|
+
'qq-shrink-0 qq-flex-0',
|
|
234
234
|
getColorClassNames(DEFAULT_COLOR, colorPalette.darkText)
|
|
235
235
|
.textColor,
|
|
236
236
|
sizing.lg.height,
|
|
@@ -303,17 +303,17 @@ const CalendarBody = ({
|
|
|
303
303
|
<div
|
|
304
304
|
className={twMerge(
|
|
305
305
|
makeDateRangePickerClassName('calendarBodyWeekdays'),
|
|
306
|
-
'grid grid-cols-7 text-center',
|
|
306
|
+
'qq-grid qq-grid-cols-7 qq-text-center',
|
|
307
307
|
getColorClassNames(DEFAULT_COLOR, colorPalette.ring).textColor,
|
|
308
308
|
fontSize.xs,
|
|
309
309
|
fontWeight.md
|
|
310
310
|
)}
|
|
311
311
|
>
|
|
312
312
|
{weekdays.map(dayName => (
|
|
313
|
-
<div key={dayName} className="w-full flex justify-center">
|
|
313
|
+
<div key={dayName} className="qq-w-full qq-flex qq-justify-center">
|
|
314
314
|
<div
|
|
315
315
|
className={twMerge(
|
|
316
|
-
'flex items-center justify-center w-full',
|
|
316
|
+
'qq-flex qq-items-center qq-justify-center qq-w-full',
|
|
317
317
|
sizing.threeXl.height
|
|
318
318
|
)}
|
|
319
319
|
>
|
|
@@ -325,7 +325,7 @@ const CalendarBody = ({
|
|
|
325
325
|
<div
|
|
326
326
|
className={twMerge(
|
|
327
327
|
makeDateRangePickerClassName('calendarBodyDatesGrid'),
|
|
328
|
-
'grid grid-cols-7'
|
|
328
|
+
'qq-grid qq-grid-cols-7'
|
|
329
329
|
)}
|
|
330
330
|
>
|
|
331
331
|
{displayedDates.map(date => {
|
|
@@ -343,7 +343,7 @@ const CalendarBody = ({
|
|
|
343
343
|
className={twMerge(
|
|
344
344
|
makeDateRangePickerClassName('calendarBodyDate'),
|
|
345
345
|
colStartClasses[getDay(date)],
|
|
346
|
-
'w-full'
|
|
346
|
+
'qq-w-full'
|
|
347
347
|
)}
|
|
348
348
|
>
|
|
349
349
|
<button
|
|
@@ -352,7 +352,7 @@ const CalendarBody = ({
|
|
|
352
352
|
onPointerEnter={() => setHoveredDate?.(date)}
|
|
353
353
|
onPointerLeave={() => setHoveredDate?.(undefined)}
|
|
354
354
|
className={twMerge(
|
|
355
|
-
'w-full flex items-center justify-center',
|
|
355
|
+
'qq-w-full qq-flex qq-items-center qq-justify-center',
|
|
356
356
|
sizing.threeXl.height,
|
|
357
357
|
fontSize.sm,
|
|
358
358
|
getDateStyles(
|
|
@@ -175,7 +175,7 @@ const DateRangePicker = React.forwardRef<HTMLDivElement, DateRangePickerProps>(
|
|
|
175
175
|
ref={ref}
|
|
176
176
|
className={twMerge(
|
|
177
177
|
makeDateRangePickerClassName('root'),
|
|
178
|
-
'relative w-full',
|
|
178
|
+
'qq-relative qq-w-full',
|
|
179
179
|
className
|
|
180
180
|
)}
|
|
181
181
|
{...other}
|
|
@@ -204,7 +204,7 @@ const DateRangePicker = React.forwardRef<HTMLDivElement, DateRangePickerProps>(
|
|
|
204
204
|
setShowModal={setShowCalendar}
|
|
205
205
|
parentRef={calendarRef}
|
|
206
206
|
width={288}
|
|
207
|
-
maxHeight="max-h-fit"
|
|
207
|
+
maxHeight="qq-max-h-fit"
|
|
208
208
|
>
|
|
209
209
|
<Calendar
|
|
210
210
|
enableYearPagination={enableYearPagination}
|
|
@@ -75,7 +75,7 @@ const DateRangePickerButton = ({
|
|
|
75
75
|
<div
|
|
76
76
|
className={twMerge(
|
|
77
77
|
makeDateRangePickerClassName('button'),
|
|
78
|
-
'flex items-center justify-between',
|
|
78
|
+
'qq-flex qq-items-center qq-justify-between',
|
|
79
79
|
getColorClassNames('white').bgColor,
|
|
80
80
|
borderRadius.md.all,
|
|
81
81
|
boxShadow.sm
|
|
@@ -88,7 +88,7 @@ const DateRangePickerButton = ({
|
|
|
88
88
|
onKeyDown={onCalendarKeyDown}
|
|
89
89
|
className={twMerge(
|
|
90
90
|
makeDateRangePickerClassName('calendarButton'),
|
|
91
|
-
'flex items-center w-full truncate focus:outline-none focus:ring-2',
|
|
91
|
+
'qq-flex qq-items-center qq-w-full qq-truncate focus:qq-outline-none focus:qq-ring-2',
|
|
92
92
|
getSelectButtonColors(hasDateSelection, disabled),
|
|
93
93
|
enableDropdown
|
|
94
94
|
? border.none.right
|
|
@@ -105,7 +105,7 @@ const DateRangePickerButton = ({
|
|
|
105
105
|
<CalendarIcon
|
|
106
106
|
className={twMerge(
|
|
107
107
|
makeDateRangePickerClassName('calendarButtonIcon'),
|
|
108
|
-
'flex-none',
|
|
108
|
+
'qq-flex-none',
|
|
109
109
|
getColorClassNames(DEFAULT_COLOR, colorPalette.lightText).textColor,
|
|
110
110
|
sizing.lg.height,
|
|
111
111
|
sizing.lg.width,
|
|
@@ -117,7 +117,7 @@ const DateRangePickerButton = ({
|
|
|
117
117
|
<p
|
|
118
118
|
className={twMerge(
|
|
119
119
|
makeDateRangePickerClassName('calendarButtonText'),
|
|
120
|
-
'whitespace-nowrap truncate',
|
|
120
|
+
'qq-whitespace-nowrap qq-truncate',
|
|
121
121
|
fontSize.sm,
|
|
122
122
|
fontWeight.md
|
|
123
123
|
)}
|
|
@@ -132,7 +132,7 @@ const DateRangePickerButton = ({
|
|
|
132
132
|
onClick={() => setShowDropdown(!showDropdown)}
|
|
133
133
|
className={twMerge(
|
|
134
134
|
makeDateRangePickerClassName('dropdownButton'),
|
|
135
|
-
'inline-flex justify-between w-48 truncate focus:outline-none focus:ring-2',
|
|
135
|
+
'qq-inline-flex qq-justify-between qq-w-48 qq-truncate focus:qq-outline-none focus:qq-ring-2',
|
|
136
136
|
getSelectButtonColors(hasDropdownSelection, disabled),
|
|
137
137
|
getColorClassNames(BaseColors.Blue, colorPalette.lightRing)
|
|
138
138
|
.focusRingColor,
|
|
@@ -148,7 +148,7 @@ const DateRangePickerButton = ({
|
|
|
148
148
|
<p
|
|
149
149
|
className={twMerge(
|
|
150
150
|
makeDateRangePickerClassName('dropdownButtonText'),
|
|
151
|
-
'whitespace-nowrap truncate',
|
|
151
|
+
'qq-whitespace-nowrap qq-truncate',
|
|
152
152
|
fontSize.sm,
|
|
153
153
|
fontWeight.md
|
|
154
154
|
)}
|
|
@@ -158,7 +158,7 @@ const DateRangePickerButton = ({
|
|
|
158
158
|
<ArrowDownHeadIcon
|
|
159
159
|
className={twMerge(
|
|
160
160
|
makeDateRangePickerClassName('dropdownButtonIcon'),
|
|
161
|
-
'flex-none',
|
|
161
|
+
'qq-flex-none',
|
|
162
162
|
sizing.lg.height,
|
|
163
163
|
sizing.lg.width,
|
|
164
164
|
spacing.twoXs.negativeMarginRight,
|