@quillsql/react 1.1.8 → 1.2.0

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 (106) hide show
  1. package/lib/BarList.d.ts +1 -0
  2. package/lib/BarList.js +129 -37
  3. package/lib/BarList.js.map +1 -1
  4. package/lib/Chart.d.ts +3 -3
  5. package/lib/Chart.js +66 -30
  6. package/lib/Chart.js.map +1 -1
  7. package/lib/Context.d.ts +1 -1
  8. package/lib/Dashboard.d.ts +1 -1
  9. package/lib/Dashboard.js +0 -4
  10. package/lib/Dashboard.js.map +1 -1
  11. package/lib/DateRangePicker/Calendar.d.ts +1 -1
  12. package/lib/DateRangePicker/Calendar.js +122 -23
  13. package/lib/DateRangePicker/Calendar.js.map +1 -1
  14. package/lib/DateRangePicker/DateRangePicker.js +5 -6
  15. package/lib/DateRangePicker/DateRangePicker.js.map +1 -1
  16. package/lib/DateRangePicker/DateRangePickerButton.d.ts +1 -1
  17. package/lib/DateRangePicker/DateRangePickerButton.js +101 -17
  18. package/lib/DateRangePicker/DateRangePickerButton.js.map +1 -1
  19. package/lib/DateRangePicker/dateRangePickerUtils.d.ts +1 -3
  20. package/lib/DateRangePicker/dateRangePickerUtils.js +113 -79
  21. package/lib/DateRangePicker/dateRangePickerUtils.js.map +1 -1
  22. package/lib/PieChart.d.ts +3 -10
  23. package/lib/PieChart.js +51 -103
  24. package/lib/PieChart.js.map +1 -1
  25. package/lib/QuillProvider.d.ts +1 -2
  26. package/lib/assets/ArrowDownHeadIcon.d.ts +1 -2
  27. package/lib/assets/ArrowDownIcon.d.ts +1 -2
  28. package/lib/assets/ArrowDownRightIcon.d.ts +1 -2
  29. package/lib/assets/ArrowLeftHeadIcon.d.ts +1 -2
  30. package/lib/assets/ArrowRightHeadIcon.d.ts +1 -2
  31. package/lib/assets/ArrowRightIcon.d.ts +1 -2
  32. package/lib/assets/ArrowUpHeadIcon.d.ts +1 -2
  33. package/lib/assets/ArrowUpIcon.d.ts +1 -2
  34. package/lib/assets/ArrowUpRightIcon.d.ts +1 -2
  35. package/lib/assets/CalendarIcon.d.ts +1 -2
  36. package/lib/assets/DoubleArrowLeftHeadIcon.d.ts +1 -2
  37. package/lib/assets/DoubleArrowRightHeadIcon.d.ts +1 -2
  38. package/lib/assets/ExclamationFilledIcon.d.ts +1 -2
  39. package/lib/assets/LoadingSpinner.d.ts +1 -2
  40. package/lib/assets/SearchIcon.d.ts +1 -2
  41. package/lib/assets/XCircleIcon.d.ts +1 -2
  42. package/lib/components/Dropdown/Dropdown.js +45 -14
  43. package/lib/components/Dropdown/Dropdown.js.map +1 -1
  44. package/lib/components/Dropdown/DropdownItem.d.ts +1 -0
  45. package/lib/components/Dropdown/DropdownItem.js +21 -29
  46. package/lib/components/Dropdown/DropdownItem.js.map +1 -1
  47. package/lib/components/Modal/Modal.d.ts +1 -0
  48. package/lib/components/Modal/Modal.js +47 -9
  49. package/lib/components/Modal/Modal.js.map +1 -1
  50. package/lib/components/selectUtils.d.ts +1 -1
  51. package/lib/components/selectUtils.js +18 -12
  52. package/lib/components/selectUtils.js.map +1 -1
  53. package/lib/contexts/BaseColorContext.d.ts +1 -1
  54. package/lib/contexts/BaseColorContext.js +1 -2
  55. package/lib/contexts/BaseColorContext.js.map +1 -1
  56. package/lib/lib/index.d.ts +0 -7
  57. package/lib/lib/index.js +0 -7
  58. package/lib/lib/index.js.map +1 -1
  59. package/lib/lib/utils.d.ts +1 -4
  60. package/lib/lib/utils.js +4 -33
  61. package/lib/lib/utils.js.map +1 -1
  62. package/package.json +1 -8
  63. package/src/BarList.tsx +193 -96
  64. package/src/Chart.tsx +108 -48
  65. package/src/Dashboard.tsx +10 -10
  66. package/src/DateRangePicker/Calendar.tsx +149 -165
  67. package/src/DateRangePicker/DateRangePicker.tsx +11 -11
  68. package/src/DateRangePicker/DateRangePickerButton.tsx +129 -84
  69. package/src/DateRangePicker/dateRangePickerUtils.tsx +137 -117
  70. package/src/PieChart.tsx +87 -111
  71. package/src/components/Dropdown/Dropdown.tsx +50 -69
  72. package/src/components/Dropdown/DropdownItem.tsx +15 -50
  73. package/src/components/Modal/Modal.tsx +50 -31
  74. package/src/components/selectUtils.ts +19 -26
  75. package/src/contexts/BaseColorContext.tsx +1 -4
  76. package/src/lib/index.ts +0 -7
  77. package/src/lib/utils.tsx +8 -43
  78. package/src/styles.css +0 -5
  79. package/example/README.md +0 -46
  80. package/example/package-lock.json +0 -12111
  81. package/example/package.json +0 -43
  82. package/example/public/favicon.ico +0 -0
  83. package/example/public/index.html +0 -43
  84. package/example/public/logo192.png +0 -0
  85. package/example/public/logo512.png +0 -0
  86. package/example/public/manifest.json +0 -25
  87. package/example/public/robots.txt +0 -3
  88. package/example/src/App.css +0 -38
  89. package/example/src/App.test.tsx +0 -9
  90. package/example/src/App.tsx +0 -47
  91. package/example/src/index.css +0 -13
  92. package/example/src/index.tsx +0 -19
  93. package/example/src/logo.svg +0 -1
  94. package/example/src/react-app-env.d.ts +0 -1
  95. package/example/src/reportWebVitals.ts +0 -15
  96. package/example/src/setupTests.ts +0 -5
  97. package/example/tsconfig.json +0 -26
  98. package/postcss.config.js +0 -6
  99. package/src/lib/colorClassNames.ts +0 -3191
  100. package/src/lib/constants.ts +0 -58
  101. package/src/lib/hexColors.ts +0 -28
  102. package/src/lib/shape.ts +0 -75
  103. package/src/lib/sizing.ts +0 -47
  104. package/src/lib/spacing.ts +0 -264
  105. package/src/lib/theme.ts +0 -49
  106. package/tailwind.config.js +0 -23
@@ -20,51 +20,43 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  /* eslint-disable react/display-name */
25
25
  import React, { useContext } from 'react';
26
- import { twMerge } from 'tailwind-merge';
27
26
  import { HoveredValueContext, SelectedValueContext } from '../../contexts';
28
- import { fontSize } from '../../lib/font';
29
- import { sizing } from '../../lib/sizing';
30
- import { spacing } from '../../lib/spacing';
31
- import { getColorClassNames, makeClassName } from '../../lib';
32
- import { DEFAULT_COLOR, colorPalette } from '../../lib/theme';
33
- var makeDropdownItemClassName = makeClassName('DropdownItem');
34
27
  var DropdownItem = React.forwardRef(function (props, ref) {
35
- var value = props.value, text = props.text, icon = props.icon, className = props.className, theme = props.theme, other = __rest(props, ["value", "text", "icon", "className", "theme"]);
28
+ var value = props.value, text = props.text, icon = props.icon, className = props.className, theme = props.theme, lastItem = props.lastItem, other = __rest(props, ["value", "text", "icon", "className", "theme", "lastItem"]);
36
29
  var _a = useContext(SelectedValueContext), selectedValue = _a.selectedValue, handleValueChange = _a.handleValueChange;
37
30
  var hoveredValue = useContext(HoveredValueContext).hoveredValue;
38
31
  var isActive = selectedValue === value;
39
32
  var isHovered = hoveredValue === value;
40
- var bgColor = isActive
41
- ? getColorClassNames(DEFAULT_COLOR, colorPalette.lightBackground).bgColor
42
- : isHovered
43
- ? getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground).bgColor
44
- : getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
45
- .hoverBgColor;
46
- var textColor = isActive
47
- ? getColorClassNames(DEFAULT_COLOR, colorPalette.darkestText).textColor
48
- : getColorClassNames(DEFAULT_COLOR, colorPalette.darkText).textColor;
49
33
  var Icon = icon ? icon : null;
50
- return (_jsxs("button", __assign({ ref: ref, style: {
51
- // borderColor: theme.borderColor || '#E5E7EB',
34
+ return (_jsx("button", __assign({ ref: ref, style: {
35
+ display: 'flex',
36
+ alignItems: 'center',
37
+ justifyContent: 'start',
38
+ width: '100%',
39
+ overflow: 'hidden',
40
+ textOverflow: 'ellipsis',
41
+ padding: '0.75rem 2rem',
42
+ fontSize: '0.875rem',
52
43
  borderStyle: 'solid',
53
- borderBottomWidth: 1,
44
+ borderBottomWidth: lastItem ? '0px' : '1px',
54
45
  borderBottomColor: (theme === null || theme === void 0 ? void 0 : theme.borderColor) || '#E5E7EB',
55
46
  background: (theme === null || theme === void 0 ? void 0 : theme.backgroundColor) || 'white',
56
47
  borderTop: 'none',
57
48
  borderRight: 'none',
58
49
  borderLeft: 'none',
59
50
  cursor: 'pointer',
60
- }, type: "button", onClick: function () { return handleValueChange === null || handleValueChange === void 0 ? void 0 : handleValueChange(value); }, className: twMerge(makeDropdownItemClassName('root'), 'qq-flex qq-items-center qq-justify-start qq-w-full qq-truncate', spacing.twoXl.paddingX, spacing.md.paddingY, fontSize.sm,
61
- // bgColor,
62
- textColor, className) }, other, { children: [Icon ? (_jsx(Icon, { className: twMerge(makeDropdownItemClassName('icon'), 'qq-flex-none', sizing.lg.height, sizing.lg.width, spacing.lg.marginRight, getColorClassNames(DEFAULT_COLOR, colorPalette.lightText)
63
- .textColor), "aria-hidden": "true" })) : null, _jsx("p", __assign({ style: {
64
- margin: 0,
65
- fontFamily: theme === null || theme === void 0 ? void 0 : theme.fontFamily,
66
- color: theme === null || theme === void 0 ? void 0 : theme.primaryTextColor,
67
- }, className: twMerge(makeDropdownItemClassName('text'), 'qq-text-sm qq-whitespace-nowrap qq-truncate') }, { children: text !== null && text !== void 0 ? text : value }))] })));
51
+ color: (theme === null || theme === void 0 ? void 0 : theme.primaryTextColor) || '#364153',
52
+ }, type: "button", onClick: function () { return handleValueChange === null || handleValueChange === void 0 ? void 0 : handleValueChange(value); } }, other, { children: _jsx("p", __assign({ style: {
53
+ margin: 0,
54
+ fontFamily: theme === null || theme === void 0 ? void 0 : theme.fontFamily,
55
+ color: theme === null || theme === void 0 ? void 0 : theme.primaryTextColor,
56
+ whiteSpace: 'nowrap',
57
+ overflow: 'hidden',
58
+ textOverflow: 'ellipsis',
59
+ } }, { children: text !== null && text !== void 0 ? text : value })) })));
68
60
  });
69
61
  export default DropdownItem;
70
62
  //# sourceMappingURL=DropdownItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItem.js","sourceRoot":"","sources":["../../../src/components/Dropdown/DropdownItem.tsx"],"names":[],"mappings":";;;;;;;;;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;gBACL,MAAM,EAAE,CAAC;gBACT,UAAU,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU;gBAC7B,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,gBAAgB;gBAC9B,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE,QAAQ;gBAClB,YAAY,EAAE,UAAU;aACzB,gBAEA,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,KAAK,IACZ,IACG,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -8,6 +8,7 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
8
8
  maxHeight?: string;
9
9
  anchorPosition?: HorizontalPosition;
10
10
  children: React.ReactNode;
11
+ theme: any;
11
12
  }
12
13
  declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
13
14
  export default Modal;
@@ -23,12 +23,10 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  /* eslint-disable react/display-name */
25
25
  import React, { useCallback, useEffect, useRef, useState } from 'react';
26
- import { twMerge } from 'tailwind-merge';
27
26
  import { useOnClickOutside, useOnWindowResize } from '../../hooks';
28
- import { border, borderRadius, boxShadow, getColorClassNames, mergeRefs, spacing, } from '../../lib';
29
- import { DEFAULT_COLOR, colorPalette } from '../../lib/theme';
27
+ import { mergeRefs } from '../../lib';
30
28
  var Modal = React.forwardRef(function (props, ref) {
31
- var showModal = props.showModal, setShowModal = props.setShowModal, parentRef = props.parentRef, width = props.width, _a = props.maxHeight, maxHeight = _a === void 0 ? 'max-h-72' : _a, children = props.children, className = props.className, other = __rest(props, ["showModal", "setShowModal", "parentRef", "width", "maxHeight", "children", "className"]);
29
+ var showModal = props.showModal, setShowModal = props.setShowModal, parentRef = props.parentRef, width = props.width, _a = props.maxHeight, maxHeight = _a === void 0 ? '18rem' : _a, children = props.children, className = props.className, theme = props.theme, other = __rest(props, ["showModal", "setShowModal", "parentRef", "width", "maxHeight", "children", "className", "theme"]);
32
30
  var _b = useState(false), modalExceedsWindow = _b[0], setModalExceedsWindow = _b[1];
33
31
  var modalRef = useRef(null);
34
32
  var checkModalExceedsWindow = useCallback(function (modalWidth, windowWidth) {
@@ -39,10 +37,7 @@ var Modal = React.forwardRef(function (props, ref) {
39
37
  return windowWidth - modalBoundingRight < 0;
40
38
  }, [parentRef]);
41
39
  var getAbsoluteSpacing = function () {
42
- if (!modalExceedsWindow) {
43
- return spacing.none.left;
44
- }
45
- return spacing.none.right;
40
+ return modalExceedsWindow ? '0' : '0';
46
41
  };
47
42
  useOnClickOutside(modalRef, function (e) {
48
43
  var _a;
@@ -65,7 +60,50 @@ var Modal = React.forwardRef(function (props, ref) {
65
60
  setModalExceedsWindow(checkModalExceedsWindow(width, window.innerWidth));
66
61
  }
67
62
  });
68
- return showModal ? (_jsx("div", __assign({ ref: mergeRefs([modalRef, ref]), className: twMerge('qq-absolute qq-z-10 qq-divide-y qq-overflow-y-auto', width ? '' : 'qq-w-full', getAbsoluteSpacing(), maxHeight, getColorClassNames('white').bgColor, getColorClassNames(DEFAULT_COLOR, colorPalette.lightBorder).borderColor, getColorClassNames(DEFAULT_COLOR, colorPalette.lightBorder).divideColor, spacing.twoXs.marginTop, spacing.twoXs.marginBottom, borderRadius.md.all, border.sm.all, boxShadow.lg, className), style: { width: width } }, other, { children: children }))) : null;
63
+ return showModal ? (_jsx("div", __assign({ ref: mergeRefs([modalRef, ref]), style: {
64
+ position: 'absolute',
65
+ zIndex: 10,
66
+ overflowY: 'auto',
67
+ width: width ? width : '100%',
68
+ left: getAbsoluteSpacing(),
69
+ right: getAbsoluteSpacing(),
70
+ maxHeight: maxHeight,
71
+ backgroundColor: (theme === null || theme === void 0 ? void 0 : theme.backgroundColor) || 'white',
72
+ borderColor: (theme === null || theme === void 0 ? void 0 : theme.borderColor) || '#E5E7EB',
73
+ // borderTopColor: getColorClassNames(
74
+ // DEFAULT_COLOR,
75
+ // colorPalette.lightBorder
76
+ // ).borderColor,
77
+ // borderBottomColor: getColorClassNames(
78
+ // DEFAULT_COLOR,
79
+ // colorPalette.lightBorder
80
+ // ).borderColor,
81
+ // borderLeftColor: getColorClassNames(
82
+ // DEFAULT_COLOR,
83
+ // colorPalette.lightBorder
84
+ // ).borderColor,
85
+ // borderRightColor: getColorClassNames(
86
+ // DEFAULT_COLOR,
87
+ // colorPalette.lightBorder
88
+ // ).borderColor,
89
+ borderTopStyle: 'solid',
90
+ borderBottomStyle: 'solid',
91
+ borderLeftStyle: 'solid',
92
+ borderRightStyle: 'solid',
93
+ borderTopWidth: 1,
94
+ borderBottomWidth: 1,
95
+ borderLeftWidth: 1,
96
+ borderRightWidth: 1,
97
+ marginTop: '0.5rem',
98
+ marginBottom: '0.5rem',
99
+ borderRadius: '0.375rem',
100
+ boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
101
+ // boxShadow: '0 1px 3px 0 #0000001A, 0 1px 2px 0 #0000000F',
102
+ // borderTopWidth: '2px',
103
+ // borderBottomWidth: '2px',
104
+ // borderLeftWidth: '2px',
105
+ // borderRightWidth: '2px',
106
+ } }, other, { children: children }))) : null;
69
107
  });
70
108
  export default Modal;
71
109
  //# sourceMappingURL=Modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EACL,MAAM,EACN,YAAY,EACZ,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S,EAAE,SAAS;YACpB,eAAe,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,KAAI,OAAO;YAClD,WAAW,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,KAAI,SAAS;YAC5C,sCAAsC;YACtC,mBAAmB;YACnB,6BAA6B;YAC7B,iBAAiB;YACjB,yCAAyC;YACzC,mBAAmB;YACnB,6BAA6B;YAC7B,iBAAiB;YACjB,uCAAuC;YACvC,mBAAmB;YACnB,6BAA6B;YAC7B,iBAAiB;YACjB,wCAAwC;YACxC,mBAAmB;YACnB,6BAA6B;YAC7B,iBAAiB;YACjB,cAAc,EAAE,OAAO;YACvB,iBAAiB,EAAE,OAAO;YAC1B,eAAe,EAAE,OAAO;YACxB,gBAAgB,EAAE,OAAO;YACzB,cAAc,EAAE,CAAC;YACjB,iBAAiB,EAAE,CAAC;YACpB,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,CAAC;YACnB,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,QAAQ;YACtB,YAAY,EAAE,UAAU;YACxB,SAAS,EACP,kEAAkE;YACpE,6DAA6D;YAC7D,yBAAyB;YACzB,4BAA4B;YAC5B,0BAA0B;YAC1B,2BAA2B;SAC5B,IACG,KAAK,cAER,QAAQ,IACL,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -5,5 +5,5 @@ export interface SelectItemProps {
5
5
  }
6
6
  export declare function constructValueToNameMapping(children: React.ReactElement[] | React.ReactElement): Map<string, string>;
7
7
  export declare function getFilteredOptions(searchQuery: string, options: SelectItemProps[]): SelectItemProps[];
8
- export declare const getSelectButtonColors: (hasSelection: boolean, isDisabled: boolean, hasError?: boolean) => string;
8
+ export declare const getSelectButtonColors: (hasSelection: boolean, isDisabled: boolean, hasError?: boolean) => null;
9
9
  export declare const hasValue: (value: string | null | undefined) => boolean;
@@ -1,6 +1,4 @@
1
- import { BaseColors, DEFAULT_COLOR, WHITE, colorClassNames, colorPalette, getColorClassNames, } from '../lib';
2
1
  import React from 'react';
3
- import { twMerge } from 'tailwind-merge';
4
2
  export function constructValueToNameMapping(children) {
5
3
  var valueToNameMapping = new Map();
6
4
  React.Children.map(children, function (child) {
@@ -20,16 +18,24 @@ export function getFilteredOptions(searchQuery, options) {
20
18
  }
21
19
  export var getSelectButtonColors = function (hasSelection, isDisabled, hasError) {
22
20
  if (hasError === void 0) { hasError = false; }
23
- return twMerge(isDisabled
24
- ? getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground).bgColor
25
- : getColorClassNames(WHITE, colorPalette.background).bgColor, !isDisabled &&
26
- getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
27
- .hoverBgColor, hasSelection
28
- ? getColorClassNames(DEFAULT_COLOR, colorPalette.darkText).textColor
29
- : getColorClassNames(DEFAULT_COLOR, colorPalette.text).textColor, isDisabled &&
30
- getColorClassNames(DEFAULT_COLOR, colorPalette.lightText).textColor, hasError && colorClassNames[BaseColors.Rose][colorPalette.text].textColor, hasError
31
- ? colorClassNames[BaseColors.Rose][colorPalette.ring].borderColor
32
- : getColorClassNames(DEFAULT_COLOR, colorPalette.ring).borderColor);
21
+ return null;
22
+ // return twMerge(
23
+ // isDisabled
24
+ // ? getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground).bgColor
25
+ // : getColorClassNames(WHITE, colorPalette.background).bgColor,
26
+ // !isDisabled &&
27
+ // getColorClassNames(DEFAULT_COLOR, colorPalette.canvasBackground)
28
+ // .hoverBgColor,
29
+ // hasSelection
30
+ // ? getColorClassNames(DEFAULT_COLOR, colorPalette.darkText).textColor
31
+ // : getColorClassNames(DEFAULT_COLOR, colorPalette.text).textColor,
32
+ // isDisabled &&
33
+ // getColorClassNames(DEFAULT_COLOR, colorPalette.lightText).textColor,
34
+ // hasError && colorClassNames[BaseColors.Rose][colorPalette.text].textColor,
35
+ // hasError
36
+ // ? colorClassNames[BaseColors.Rose][colorPalette.ring].borderColor
37
+ // : getColorClassNames(DEFAULT_COLOR, colorPalette.ring).borderColor
38
+ // );
33
39
  };
34
40
  export var hasValue = function (value) {
35
41
  return value !== null && value !== undefined && value !== '';
@@ -1 +1 @@
1
- {"version":3,"file":"selectUtils.js","sourceRoot":"","sources":["../../src/components/selectUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EACb,KAAK,EACL,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAOzC,MAAM,UAAU,2BAA2B,CACzC,QAAmD;IAEnD,IAAM,kBAAkB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACrD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAiC;;QAC7D,kBAAkB,CAAC,GAAG,CACpB,KAAK,CAAC,KAAK,CAAC,KAAK,EACjB,MAAA,KAAK,CAAC,KAAK,CAAC,IAAI,mCAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CACtC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,WAAmB,EACnB,OAA0B;IAE1B,OAAO,WAAW,KAAK,EAAE;QACvB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,UAAC,MAAuB;;YACrC,IAAM,UAAU,GAAG,MAAA,MAAM,CAAC,IAAI,mCAAI,MAAM,CAAC,KAAK,CAAC;YAC/C,OAAO,UAAU,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;AACT,CAAC;AAED,MAAM,CAAC,IAAM,qBAAqB,GAAG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qD,CAAC"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const BaseColorContext: import("react").Context<"slate" | "gray" | "zinc" | "neutral" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose">;
2
+ declare const BaseColorContext: import("react").Context<string>;
3
3
  export default BaseColorContext;
@@ -1,5 +1,4 @@
1
1
  import { createContext } from 'react';
2
- import { BaseColors } from '../lib';
3
- var BaseColorContext = createContext(BaseColors.Blue);
2
+ var BaseColorContext = createContext('blue');
4
3
  export default BaseColorContext;
5
4
  //# sourceMappingURL=BaseColorContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseColorContext.js","sourceRoot":"","sources":["../../src/contexts/BaseColorContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,IAAM,gBAAgB,GAAG,aAAa,CAAQ,UAAU,CAAC,IAAI,CAAC,CAAC;AAE/D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"BaseColorContext.js","sourceRoot":"","sources":["../../src/contexts/BaseColorContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,IAAM,gBAAgB,GAAG,aAAa,CAAS,MAAM,CAAC,CAAC;AAEvD,eAAe,gBAAgB,CAAC"}
@@ -1,10 +1,3 @@
1
- export * from './hexColors';
2
- export * from './colorClassNames';
3
1
  export * from './inputTypes';
4
- export * from './constants';
5
- export * from './shape';
6
- export * from './sizing';
7
- export * from './spacing';
8
2
  export * from './font';
9
- export * from './theme';
10
3
  export * from './utils';
package/lib/lib/index.js CHANGED
@@ -1,11 +1,4 @@
1
- export * from './hexColors';
2
- export * from './colorClassNames';
3
1
  export * from './inputTypes';
4
- export * from './constants';
5
- export * from './shape';
6
- export * from './sizing';
7
- export * from './spacing';
8
2
  export * from './font';
9
- export * from './theme';
10
3
  export * from './utils';
11
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Color, ValueFormatter } from "./inputTypes";
3
- export declare const mapInputsToDeltaType: (deltaType: string, isIncreasePositive: boolean) => string;
2
+ import { ValueFormatter } from './inputTypes';
4
3
  export declare const defaultValueFormatter: ValueFormatter;
5
4
  export declare const sumNumericArray: (arr: number[]) => number;
6
5
  export declare const removeValueFromArray: (value: any, array: any[]) => any[];
@@ -8,5 +7,3 @@ export declare const isValueInArray: (value: any, array: any[]) => boolean;
8
7
  export declare const stringIsNumeric: (str: string | undefined) => boolean;
9
8
  export declare const stringEndsWithNumber: (str: string) => boolean;
10
9
  export declare function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T>;
11
- export declare function makeClassName(componentName: string): (className: string) => string;
12
- export declare function getColorClassNames(color: Color | "white" | "black" | "transparent", shade?: number): import("./colorClassNames").ColorTypes;
package/lib/lib/utils.js CHANGED
@@ -1,22 +1,6 @@
1
- import { DeltaTypes } from "./constants";
2
- import { colorClassNames } from "./colorClassNames";
3
- export var mapInputsToDeltaType = function (deltaType, isIncreasePositive) {
4
- if (isIncreasePositive || deltaType === DeltaTypes.Unchanged) {
5
- return deltaType;
6
- }
7
- switch (deltaType) {
8
- case DeltaTypes.Increase:
9
- return DeltaTypes.Decrease;
10
- case DeltaTypes.ModerateIncrease:
11
- return DeltaTypes.ModerateDecrease;
12
- case DeltaTypes.Decrease:
13
- return DeltaTypes.Increase;
14
- case DeltaTypes.ModerateDecrease:
15
- return DeltaTypes.ModerateIncrease;
16
- }
17
- return "";
1
+ export var defaultValueFormatter = function (value) {
2
+ return value.toString();
18
3
  };
19
- export var defaultValueFormatter = function (value) { return value.toString(); };
20
4
  export var sumNumericArray = function (arr) {
21
5
  return arr.reduce(function (prefixSum, num) { return prefixSum + num; }, 0);
22
6
  };
@@ -39,12 +23,12 @@ export var stringIsNumeric = function (str) {
39
23
  return !isNaN(Number(str)) && str !== undefined;
40
24
  };
41
25
  export var stringEndsWithNumber = function (str) {
42
- return stringIsNumeric(str.split("-").pop());
26
+ return stringIsNumeric(str.split('-').pop());
43
27
  };
44
28
  export function mergeRefs(refs) {
45
29
  return function (value) {
46
30
  refs.forEach(function (ref) {
47
- if (typeof ref === "function") {
31
+ if (typeof ref === 'function') {
48
32
  ref(value);
49
33
  }
50
34
  else if (ref != null) {
@@ -53,17 +37,4 @@ export function mergeRefs(refs) {
53
37
  });
54
38
  };
55
39
  }
56
- export function makeClassName(componentName) {
57
- return function (className) {
58
- return "tremor-".concat(componentName, "-").concat(className);
59
- };
60
- }
61
- export function getColorClassNames(color, shade) {
62
- if (colorClassNames[color] === undefined)
63
- return colorClassNames["gray"][500];
64
- if (color === "white" || color === "black" || color === "transparent" || !shade) {
65
- return colorClassNames[color][500];
66
- }
67
- return colorClassNames[color][shade];
68
- }
69
40
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.tsx"],"names":[],"mappings":"AAAA,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C,CAAC,IAAI,GAAG,KAAK,SAAS,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,GAAW;IAC9C,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,UAAU,SAAS,CACvB,IAA2D;IAE3D,OAAO,UAAA,KAAK;QACV,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;YACd,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;gBAC7B,GAAG,CAAC,KAAK,CAAC,CAAC;aACZ;iBAAM,IAAI,GAAG,IAAI,IAAI,EAAE;gBACrB,GAAwC,CAAC,OAAO,GAAG,KAAK,CAAC;aAC3D;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "access": "public",
5
5
  "description": "Quill React components for building dashboards and reporting.",
6
6
  "main": "lib/index.js",
@@ -11,21 +11,16 @@
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",
15
14
  "prefix-classnames": "node ./prefix-classnames.js"
16
15
  },
17
16
  "keywords": [],
18
17
  "author": "",
19
18
  "license": "ISC",
20
19
  "dependencies": {
21
- "@tremor/react": "^2.1.0",
22
- "autoprefixer": "^10.4.14",
23
20
  "axios": "^1.3.5",
24
21
  "date-fns": "^2.29.3",
25
22
  "react-loading-skeleton": "^3.2.1",
26
23
  "recharts": "^2.5.0",
27
- "tailwind-merge": "^1.12.0",
28
- "tailwindcss": "^3.3.1",
29
24
  "tslib": "^2.5.0",
30
25
  "typescript": "^5.0.3"
31
26
  },
@@ -43,8 +38,6 @@
43
38
  "eslint-plugin-prettier": "^4.2.1",
44
39
  "eslint-plugin-react": "^7.32.2",
45
40
  "glob": "^10.2.2",
46
- "postcss": "^8.4.21",
47
- "postcss-cli": "^10.1.0",
48
41
  "prettier": "^2.8.7"
49
42
  }
50
43
  }