first commit

This commit is contained in:
root
2025-12-28 20:50:08 +00:00
commit b1cd61c7b1
16845 changed files with 1594292 additions and 0 deletions

176
node_modules/@tremor/react/License generated vendored Normal file
View File

@@ -0,0 +1,176 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

164
node_modules/@tremor/react/README.md generated vendored Normal file
View File

@@ -0,0 +1,164 @@
<br>
<br>
<br>
<div align="center">
<img alt="Tremor Logo" src="images/tremor-light-beta.svg" height="50"/>
<br>
<br>
<br>
<div align="center">
<a href="https://www.npmjs.com/package/@tremor/react">
<img alt="npm" src="https://img.shields.io/npm/dm/@tremor/react?color=5C9BA1&label=npm&logo=npm">
</a>
<a href="https://tremor.so/docs/getting-started/introduction">
<img alt="Read the documentation" src="https://img.shields.io/badge/Docs-blue?style=flat&logo=readthedocs&labelColor=5c5c5c&color=5C9BA1" height="20" width="auto">
</a>
<a href="https://github.com/tremorlabs/tremor/blob/main/License">
<img alt="License Apache 2.0" src="https://img.shields.io/badge/license-Apache 2.0-blue.svg?style=flat&color=5C9BA1" height="20" width="auto">
</a>
<a href="https://join.slack.com/t/tremor-community/shared_invite/zt-1u8jqmcmq-Fdr9B6MbnO7u8FkGh~2Ylg">
<img src="https://img.shields.io/badge/Join-important.svg?color=4A154B&label=Slack&logo=slack" alt="Join Slack" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=tremorlabs">
<img src="https://img.shields.io/twitter/follow/tremorlabs?style=social" alt="Follow on Twitter" />
</a>
</div>
<h3 align="center">
<a href="https://www.tremor.so/docs/getting-started/installation">Documentation</a> &bull;
<a href="https://demo.tremor.so/">Demo Dashboard</a> &bull;
<a href="https://www.tremor.so">Website</a>
</h3>
<br>
<h1>The react library to build dashboards fast</h1>
</div>
[Tremor](https://tremor.so/) lets you create simple and modular components to build insightful dashboards in a breeze. Fully open-source, made by data scientists and software engineers with a sweet spot for design.
<br>
<br>
![Tremor Banner](images/banner1.png)
<br>
<br>
## Getting Started
You can use tremor either within a [React](https://reactjs.org/) or [Next.js](https://nextjs.org) Project.
For new projects, we recommend using Next.js, as it also provides a simple deployment workflow through the [Vercel](https://vercel.com/docs) platform.
For other Frameworks, see our [Installation Guide](https://www.tremor.so/docs/getting-started/installation).
<br>
## Using NextJS
In your terminal, we create a new Next project:
```bash
npx create-next-app my-project --typescript
cd my-project
```
<br>
Install tremor from your command line via npm.
```bash
npm install @tremor/react
```
<br>
Install Tailwind CSS and its peer dependencies
```bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
```
<br>
Add the paths to all of your template files in your `tailwind.config.js` file.
```diff
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
+ './node_modules/@tremor/**/*.{js,ts,jsx,tsx}',
// Or if using src directory:
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
```
Add the `@tailwind` directives for each Tailwind's layers to your `globals.css` file.
```css
@tailwind base;
@tailwind components;
@tailwind utilities;
```
Start the dev server
```bash
npm run dev
```
<br>
**💡 Hint:** Since we are in beta, please be aware that there might be breaking changes in the future.
<br>
## Example
With tremor creating an analytical interface is easy.
<br>
```jsx
//Card.tsx
import { Card, Text, Metric, Flex, ProgressBar } from "@tremor/react";
export default () => (
<Card className="max-w-sm">
<Text>Sales</Text>
<Metric>$ 71,465</Metric>
<Flex className='mt-4'>
<Text>32% of annual target</Text>
<Text>$ 225,000</Text>
</Flex>
<ProgressBar percentageValue={ 32 } className="mt-2" />
</Card>
);
```
<br>
![Tremor Banner](images/example.png)
<br>
If you want to see how you can build your first dashboard, have a look at our [documentation](https://tremor.so/docs/getting-started/demo-dashboard).
## Community and Contribution
We are always looking for new ideas or other ways to improve tremor. If you have developed anything cool or found a bug, send us a pull request.
<br>
<br>
## License
[Apache License 2.0](https://github.com/tremorlabs/tremor/blob/main/License)
Copyright &copy; 2023 Tremor. All rights reserved.

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowDownHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowDownHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M13 16.172l5.364-5.364 1.414 1.414L12 20l-7.778-7.778 1.414-1.414L11 16.172V4h2v12.172z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowDownIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowDownIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M13 16.172l5.364-5.364 1.414 1.414L12 20l-7.778-7.778 1.414-1.414L11 16.172V4h2v12.172z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowDownRightIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowDownRightIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M14.59 16.004L5.982 7.397l1.414-1.414 8.607 8.606V7.004h2v11h-11v-2z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowLeftHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowLeftHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const r=r=>{var l=e(r,[]);return t.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),t.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),t.createElement("path",{d:"M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{d:"M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowRightHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowRightHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const r=r=>{var l=e(r,[]);return t.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),t.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),t.createElement("path",{d:"M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowRightIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowRightIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M16.172 11l-5.364-5.364 1.414-1.414L20 12l-7.778 7.778-1.414-1.414L16.172 13H4v-2z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M12 10.828l-4.95 4.95-1.414-1.414L12 8l6.364 6.364-1.414 1.414z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowUpHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowUpHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M12 10.828l-4.95 4.95-1.414-1.414L12 8l6.364 6.364-1.414 1.414z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowUpIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowUpIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{fill:"currentColor",d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ArrowUpRightIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ArrowUpRightIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import e from"react";const r=r=>{var l=t(r,[]);return e.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),e.createElement("path",{fill:"currentColor",d:"M16.004 9.414l-8.607 8.607-1.414-1.414L14.589 8H7.004V6h11v11h-2V9.414z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(require("react"));module.exports=t=>{var r=e.__rest(t,[]);return a.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),a.default.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const CalendarIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default CalendarIcon;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import a from"react";const t=t=>{var r=e(t,[]);return a.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),a.createElement("path",{fillRule:"evenodd",d:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))};export{t as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=l(require("react"));module.exports=l=>{var r=e.__rest(l,[]);return t.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),t.default.createElement("path",{id:"svg_1",d:"m0,0l24,0l0,24l-24,0l0,-24z",fill:"none"}),t.default.createElement("path",{id:"svg_2",d:"m14.1247,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}),t.default.createElement("path",{id:"svg_3",d:"m7.31152,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const DoubleArrowLeftHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default DoubleArrowLeftHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as l}from"tslib";import e from"react";const t=t=>{var r=l(t,[]);return e.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),e.createElement("path",{id:"svg_1",d:"m0,0l24,0l0,24l-24,0l0,-24z",fill:"none"}),e.createElement("path",{id:"svg_2",d:"m14.1247,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}),e.createElement("path",{id:"svg_3",d:"m7.31152,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}))};export{t as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=t(require("react"));module.exports=t=>{var r=e.__rest(t,[]);return l.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),l.default.createElement("path",{id:"svg_1",d:"m0,0l24,0l0,24l-24,0l0,-24z",fill:"none"}),l.default.createElement("path",{transform:"rotate(180 15.1857 12)",id:"svg_2",d:"m14.1247,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}),l.default.createElement("path",{transform:"rotate(180 8.37252 12)",id:"svg_3",d:"m7.31152,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const DoubleArrowRightHeadIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default DoubleArrowRightHeadIcon;

View File

@@ -0,0 +1 @@
import{__rest as t}from"tslib";import l from"react";const e=e=>{var r=t(e,[]);return l.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),l.createElement("path",{id:"svg_1",d:"m0,0l24,0l0,24l-24,0l0,-24z",fill:"none"}),l.createElement("path",{transform:"rotate(180 15.1857 12)",id:"svg_2",d:"m14.1247,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}),l.createElement("path",{transform:"rotate(180 8.37252 12)",id:"svg_3",d:"m7.31152,12l4.95,4.95l-1.414,1.414l-6.364,-6.364l6.364,-6.364l1.414,1.414l-4.95,4.95z"}))};export{e as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.default.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const ExclamationFilledIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default ExclamationFilledIcon;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const r=r=>{var l=e(r,[]);return t.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),t.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var a=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),r.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),r.default.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const LoadingSpinner: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default LoadingSpinner;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const r=r=>{var a=e(r,[]);return t.createElement("svg",Object.assign({},a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),t.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),t.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};export{r as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),r.default.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const SearchIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default SearchIcon;

1
node_modules/@tremor/react/dist/assets/SearchIcon.js generated vendored Normal file
View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const l=l=>{var r=e(l,[]);return t.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),t.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))};export{l as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("tslib");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("react"));module.exports=t=>{var l=e.__rest(t,[]);return r.default.createElement("svg",Object.assign({},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),r.default.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))};

View File

@@ -0,0 +1,5 @@
import React from "react";
declare const XCircleIcon: ({ ...props }: {
[x: string]: any;
}) => React.JSX.Element;
export default XCircleIcon;

View File

@@ -0,0 +1 @@
import{__rest as e}from"tslib";import t from"react";const l=l=>{var r=e(l,[]);return t.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}),t.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))};export{l as default};

16
node_modules/@tremor/react/dist/assets/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
export { default as ArrowDownHeadIcon } from "./ArrowDownHeadIcon";
export { default as ArrowDownRightIcon } from "./ArrowDownRightIcon";
export { default as ArrowDownIcon } from "./ArrowDownIcon";
export { default as ArrowRightIcon } from "./ArrowRightIcon";
export { default as ArrowRightHeadIcon } from "./ArrowRightHeadIcon";
export { default as ArrowLeftHeadIcon } from "./ArrowLeftHeadIcon";
export { default as DoubleArrowLeftHeadIcon } from "./DoubleArrowLeftHeadIcon";
export { default as DoubleArrowRightHeadIcon } from "./DoubleArrowRightHeadIcon";
export { default as ArrowUpHeadIcon } from "./ArrowUpHeadIcon";
export { default as ArrowUpIcon } from "./ArrowUpIcon";
export { default as ArrowUpRightIcon } from "./ArrowUpRightIcon";
export { default as CalendarIcon } from "./CalendarIcon";
export { default as ExclamationFilledIcon } from "./ExclamationFilledIcon";
export { default as LoadingSpinner } from "./LoadingSpinner";
export { default as SearchIcon } from "./SearchIcon";
export { default as XCircleIcon } from "./XCircleIcon";

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),a=require("tailwind-merge"),r=require("recharts"),o=require("../common/utils.cjs"),l=require("../common/ChartLegend.cjs"),i=require("../common/ChartTooltip.cjs"),n=require("../common/NoData.cjs"),s=require("../../../lib/hexColors.cjs"),c=require("../../../lib/constants.cjs"),d=require("../../../lib/theme.cjs"),u=require("../../../lib/utils.cjs");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(t);const f=h.default.forwardRef(((m,f)=>{const{data:p=[],categories:y=[],index:x,stack:v=!1,colors:g=d.themeColorRange,valueFormatter:w=u.defaultValueFormatter,startEndOnly:E=!1,showXAxis:A=!0,showYAxis:C=!0,yAxisWidth:k=56,showAnimation:q=!0,animationDuration:D=1500,showTooltip:b=!0,showLegend:j=!0,showGridLines:G=!0,showGradient:L=!0,autoMinValue:T=!1,curveType:N="linear",minValue:F,maxValue:V,connectNulls:O=!1,allowDecimals:S=!0,className:W,noDataText:Y}=m,z=e.__rest(m,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","className","noDataText"]),[I,M]=t.useState(60),R=o.constructCategoryColors(y,g),X=o.getYAxisDomain(T,F,V);return h.default.createElement("div",Object.assign({ref:f,className:a.twMerge("w-full h-80",W)},z),h.default.createElement(r.ResponsiveContainer,{width:"100%",height:"100%"},(null==p?void 0:p.length)?h.default.createElement(r.AreaChart,{data:p},G?h.default.createElement(r.CartesianGrid,{strokeDasharray:"3 3",horizontal:!0,vertical:!1}):null,h.default.createElement(r.XAxis,{hide:!A,dataKey:x,tick:{transform:"translate(0, 6)"},ticks:E?[p[0][x],p[p.length-1][x]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica",color:"red"},interval:"preserveStartEnd",tickLine:!1,axisLine:!1,padding:{left:10,right:10},minTickGap:5}),h.default.createElement(r.YAxis,{width:k,hide:!C,axisLine:!1,tickLine:!1,type:"number",domain:X,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:w,allowDecimals:S}),b?h.default.createElement(r.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:({active:e,payload:t,label:a})=>h.default.createElement(i.default,{active:e,payload:t,label:a,valueFormatter:w,categoryColors:R}),position:{y:0}}):null,j?h.default.createElement(r.Legend,{verticalAlign:"top",height:I,content:({payload:e})=>l({payload:e},R,M)}):null,y.map((e=>{var t;const a=s.hexColors[null!==(t=R.get(e))&&void 0!==t?t:c.BaseColors.Gray];return h.default.createElement("defs",{key:e},L?h.default.createElement("linearGradient",{id:R.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},h.default.createElement("stop",{offset:"5%",stopColor:a,stopOpacity:.4}),h.default.createElement("stop",{offset:"95%",stopColor:a,stopOpacity:0})):h.default.createElement("linearGradient",{id:R.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},h.default.createElement("stop",{stopColor:a,stopOpacity:.3})))})),y.map((e=>{var t;return h.default.createElement(r.Area,{key:e,name:e,type:N,dataKey:e,stroke:s.hexColors[null!==(t=R.get(e))&&void 0!==t?t:c.BaseColors.Gray],fill:`url(#${R.get(e)})`,strokeWidth:2,dot:!1,isAnimationActive:q,animationDuration:D,stackId:v?"a":void 0,connectNulls:O})}))):h.default.createElement(n,{noDataText:Y})))}));f.displayName="AreaChart",module.exports=f;

View File

@@ -0,0 +1,10 @@
import React from "react";
import BaseChartProps from "../common/BaseChartProps";
import { CurveType } from "../../../lib/inputTypes";
export interface AreaChartProps extends BaseChartProps {
stack?: boolean;
curveType?: CurveType;
connectNulls?: boolean;
}
declare const AreaChart: React.ForwardRefExoticComponent<AreaChartProps & React.RefAttributes<HTMLDivElement>>;
export default AreaChart;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as e}from"tslib";import t,{useState as a}from"react";import{twMerge as o}from"tailwind-merge";import{ResponsiveContainer as i,AreaChart as r,CartesianGrid as n,XAxis as l,YAxis as s,Tooltip as m,Legend as c,Area as d}from"recharts";import{constructCategoryColors as p,getYAxisDomain as h}from"../common/utils.js";import u from"../common/ChartLegend.js";import y from"../common/ChartTooltip.js";import f from"../common/NoData.js";import{hexColors as v}from"../../../lib/hexColors.js";import{BaseColors as w}from"../../../lib/constants.js";import{themeColorRange as x}from"../../../lib/theme.js";import{defaultValueFormatter as g}from"../../../lib/utils.js";const E=t.forwardRef(((E,k)=>{const{data:A=[],categories:D=[],index:b,stack:j=!1,colors:C=x,valueFormatter:G=g,startEndOnly:L=!1,showXAxis:T=!0,showYAxis:N=!0,yAxisWidth:F=56,showAnimation:O=!0,animationDuration:V=1500,showTooltip:S=!0,showLegend:W=!0,showGridLines:z=!0,showGradient:I=!0,autoMinValue:H=!1,curveType:K="linear",minValue:M,maxValue:X,connectNulls:Y=!1,allowDecimals:R=!0,className:$,noDataText:q}=E,B=e(E,["data","categories","index","stack","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","showAnimation","animationDuration","showTooltip","showLegend","showGridLines","showGradient","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","className","noDataText"]),[J,P]=a(60),Q=p(D,C),U=h(H,M,X);return t.createElement("div",Object.assign({ref:k,className:o("w-full h-80",$)},B),t.createElement(i,{width:"100%",height:"100%"},(null==A?void 0:A.length)?t.createElement(r,{data:A},z?t.createElement(n,{strokeDasharray:"3 3",horizontal:!0,vertical:!1}):null,t.createElement(l,{hide:!T,dataKey:b,tick:{transform:"translate(0, 6)"},ticks:L?[A[0][b],A[A.length-1][b]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica",color:"red"},interval:"preserveStartEnd",tickLine:!1,axisLine:!1,padding:{left:10,right:10},minTickGap:5}),t.createElement(s,{width:F,hide:!N,axisLine:!1,tickLine:!1,type:"number",domain:U,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:G,allowDecimals:R}),S?t.createElement(m,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:({active:e,payload:a,label:o})=>t.createElement(y,{active:e,payload:a,label:o,valueFormatter:G,categoryColors:Q}),position:{y:0}}):null,W?t.createElement(c,{verticalAlign:"top",height:J,content:({payload:e})=>u({payload:e},Q,P)}):null,D.map((e=>{var a;const o=v[null!==(a=Q.get(e))&&void 0!==a?a:w.Gray];return t.createElement("defs",{key:e},I?t.createElement("linearGradient",{id:Q.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},t.createElement("stop",{offset:"5%",stopColor:o,stopOpacity:.4}),t.createElement("stop",{offset:"95%",stopColor:o,stopOpacity:0})):t.createElement("linearGradient",{id:Q.get(e),x1:"0",y1:"0",x2:"0",y2:"1"},t.createElement("stop",{stopColor:o,stopOpacity:.3})))})),D.map((e=>{var a;return t.createElement(d,{key:e,name:e,type:K,dataKey:e,stroke:v[null!==(a=Q.get(e))&&void 0!==a?a:w.Gray],fill:`url(#${Q.get(e)})`,strokeWidth:2,dot:!1,isAnimationActive:O,animationDuration:V,stackId:j?"a":void 0,connectNulls:Y})}))):t.createElement(f,{noDataText:q})))}));E.displayName="AreaChart";export{E as default};

View File

@@ -0,0 +1,2 @@
export { default as AreaChart } from "./AreaChart";
export type { AreaChartProps } from "./AreaChart";

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),a=require("tailwind-merge"),i=require("recharts"),r=require("../common/utils.cjs"),l=require("../common/ChartLegend.cjs"),n=require("../common/ChartTooltip.cjs"),o=require("../common/NoData.cjs"),s=require("../../../lib/hexColors.cjs"),c=require("../../../lib/constants.cjs"),d=require("../../../lib/theme.cjs"),u=require("../../../lib/utils.cjs");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(t);const f=h.default.forwardRef(((m,f)=>{const{data:y=[],categories:v=[],index:p,colors:x=d.themeColorRange,valueFormatter:g=u.defaultValueFormatter,layout:w="horizontal",stack:k=!1,relative:A=!1,startEndOnly:E=!1,animationDuration:L=1500,showAnimation:C=!0,showXAxis:D=!0,showYAxis:b=!0,yAxisWidth:q=56,showTooltip:j=!0,showLegend:F=!0,showGridLines:S=!0,autoMinValue:T=!1,minValue:z,maxValue:V,allowDecimals:G=!0,className:I,noDataText:N}=m,Y=e.__rest(m,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","className","noDataText"]),[B,H]=t.useState(60),O=r.constructCategoryColors(v,x),X=r.getYAxisDomain(T,z,V);return h.default.createElement("div",Object.assign({ref:f,className:a.twMerge("w-full h-80",I)},Y),h.default.createElement(i.ResponsiveContainer,{width:"100%",height:"100%"},(null==y?void 0:y.length)?h.default.createElement(i.BarChart,{data:y,stackOffset:A?"expand":"none",layout:"vertical"===w?"vertical":"horizontal"},S?h.default.createElement(i.CartesianGrid,{strokeDasharray:"3 3",horizontal:"vertical"!==w,vertical:"vertical"===w}):null,"vertical"!==w?h.default.createElement(i.XAxis,{hide:!D,dataKey:p,interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},ticks:E?[y[0][p],y[y.length-1][p]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica",marginTop:"20px"},tickLine:!1,axisLine:!1}):h.default.createElement(i.XAxis,{hide:!D,type:"number",tick:{transform:"translate(-3, 0)"},domain:X,style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickLine:!1,axisLine:!1,tickFormatter:g,padding:{left:10,right:10},minTickGap:5,allowDecimals:G}),"vertical"!==w?h.default.createElement(i.YAxis,{width:q,hide:!b,axisLine:!1,tickLine:!1,type:"number",domain:X,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:A?e=>`${(100*e).toString()} %`:g,allowDecimals:G}):h.default.createElement(i.YAxis,{width:q,hide:!b,dataKey:p,axisLine:!1,tickLine:!1,ticks:E?[y[0][p],y[y.length-1][p]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"}}),j?h.default.createElement(i.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:({active:e,payload:t,label:a})=>h.default.createElement(n.default,{active:e,payload:t,label:a,valueFormatter:g,categoryColors:O}),position:{y:0}}):null,F?h.default.createElement(i.Legend,{verticalAlign:"top",height:B,content:({payload:e})=>l({payload:e},O,H)}):null,v.map((e=>{var t;return h.default.createElement(i.Bar,{key:e,name:e,type:"linear",stackId:k||A?"a":void 0,dataKey:e,fill:s.hexColors[null!==(t=O.get(e))&&void 0!==t?t:c.BaseColors.Gray],isAnimationActive:C,animationDuration:L})}))):h.default.createElement(o,{noDataText:N})))}));f.displayName="BarChart",module.exports=f;

View File

@@ -0,0 +1,9 @@
import React from "react";
import BaseChartProps from "../common/BaseChartProps";
export interface BarChartProps extends BaseChartProps {
layout?: "vertical" | "horizontal";
stack?: boolean;
relative?: boolean;
}
declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & React.RefAttributes<HTMLDivElement>>;
export default BarChart;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as t}from"tslib";import e,{useState as a}from"react";import{twMerge as i}from"tailwind-merge";import{ResponsiveContainer as o,BarChart as r,CartesianGrid as n,XAxis as l,YAxis as s,Tooltip as m,Legend as c,Bar as d}from"recharts";import{constructCategoryColors as p,getYAxisDomain as h}from"../common/utils.js";import y from"../common/ChartLegend.js";import f from"../common/ChartTooltip.js";import u from"../common/NoData.js";import{hexColors as v}from"../../../lib/hexColors.js";import{BaseColors as x}from"../../../lib/constants.js";import{themeColorRange as w}from"../../../lib/theme.js";import{defaultValueFormatter as g}from"../../../lib/utils.js";const k=e.forwardRef(((k,E)=>{const{data:A=[],categories:L=[],index:D,colors:b=w,valueFormatter:j=g,layout:F="horizontal",stack:S=!1,relative:T=!1,startEndOnly:z=!1,animationDuration:C=1500,showAnimation:V=!0,showXAxis:I=!0,showYAxis:N=!0,yAxisWidth:G=56,showTooltip:H=!0,showLegend:O=!0,showGridLines:K=!0,autoMinValue:B=!1,minValue:M,maxValue:W,allowDecimals:X=!0,className:Y,noDataText:R}=k,$=t(k,["data","categories","index","colors","valueFormatter","layout","stack","relative","startEndOnly","animationDuration","showAnimation","showXAxis","showYAxis","yAxisWidth","showTooltip","showLegend","showGridLines","autoMinValue","minValue","maxValue","allowDecimals","className","noDataText"]),[q,J]=a(60),P=p(L,b),Q=h(B,M,W);return e.createElement("div",Object.assign({ref:E,className:i("w-full h-80",Y)},$),e.createElement(o,{width:"100%",height:"100%"},(null==A?void 0:A.length)?e.createElement(r,{data:A,stackOffset:T?"expand":"none",layout:"vertical"===F?"vertical":"horizontal"},K?e.createElement(n,{strokeDasharray:"3 3",horizontal:"vertical"!==F,vertical:"vertical"===F}):null,"vertical"!==F?e.createElement(l,{hide:!I,dataKey:D,interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},ticks:z?[A[0][D],A[A.length-1][D]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica",marginTop:"20px"},tickLine:!1,axisLine:!1}):e.createElement(l,{hide:!I,type:"number",tick:{transform:"translate(-3, 0)"},domain:Q,style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickLine:!1,axisLine:!1,tickFormatter:j,padding:{left:10,right:10},minTickGap:5,allowDecimals:X}),"vertical"!==F?e.createElement(s,{width:G,hide:!N,axisLine:!1,tickLine:!1,type:"number",domain:Q,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:T?t=>`${(100*t).toString()} %`:j,allowDecimals:X}):e.createElement(s,{width:G,hide:!N,dataKey:D,axisLine:!1,tickLine:!1,ticks:z?[A[0][D],A[A.length-1][D]]:void 0,type:"category",interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"}}),H?e.createElement(m,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{fill:"#d1d5db",opacity:"0.15"},content:({active:t,payload:a,label:i})=>e.createElement(f,{active:t,payload:a,label:i,valueFormatter:j,categoryColors:P}),position:{y:0}}):null,O?e.createElement(c,{verticalAlign:"top",height:q,content:({payload:t})=>y({payload:t},P,J)}):null,L.map((t=>{var a;return e.createElement(d,{key:t,name:t,type:"linear",stackId:S||T?"a":void 0,dataKey:t,fill:v[null!==(a=P.get(t))&&void 0!==a?a:x.Gray],isAnimationActive:V,animationDuration:C})}))):e.createElement(u,{noDataText:R})))}));k.displayName="BarChart";export{k as default};

View File

@@ -0,0 +1,2 @@
export { default as BarChart } from "./BarChart";
export type { BarChartProps } from "./BarChart";

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),a=require("tailwind-merge"),r=require("recharts"),l=require("../common/NoData.cjs"),n=require("../../../lib/hexColors.cjs"),o=require("../../../lib/theme.cjs"),i=require("../../../lib/utils.cjs"),u=require("./inputParser.cjs"),s=require("./DonutChartTooltip.cjs");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(t);const m=c.default.forwardRef(((t,d)=>{const{data:m=[],category:h="value",index:f="name",colors:p=o.themeColorRange,variant:v="donut",valueFormatter:g=i.defaultValueFormatter,label:w,showLabel:x=!0,animationDuration:D=1500,showAnimation:b=!0,showTooltip:y=!0,className:q,noDataText:A}=t,C=e.__rest(t,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","className","noDataText"]),E="donut"==v,T=u.parseLabelInput(w,g,m,h);return c.default.createElement("div",Object.assign({ref:d,className:a.twMerge("w-full h-44",q)},C),c.default.createElement(r.ResponsiveContainer,{width:"100%",height:"100%"},(null==m?void 0:m.length)?c.default.createElement(r.PieChart,null,x&&E?c.default.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fill:n.hexColors[o.DEFAULT_COLOR]},T):null,c.default.createElement(r.Pie,{data:u.parseData(m,p),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:E?"75%":"0%",outerRadius:"100%",paddingAngle:0,dataKey:h,nameKey:f,isAnimationActive:b,animationDuration:D}),y?c.default.createElement(r.Tooltip,{wrapperStyle:{outline:"none"},content:({active:e,payload:t})=>c.default.createElement(s.DonutChartTooltip,{active:e,payload:t,valueFormatter:g})}):null):c.default.createElement(l,{noDataText:A})))}));m.displayName="DonutChart",module.exports=m;

View File

@@ -0,0 +1,19 @@
import React from "react";
import { Color, ValueFormatter } from "../../../lib/inputTypes";
import type BaseAnimationTimingProps from "../common/BaseAnimationTimingProps";
type DonutChartVariant = "donut" | "pie";
export interface DonutChartProps extends BaseAnimationTimingProps {
data: any[];
category?: string;
index?: string;
colors?: Color[];
variant?: DonutChartVariant;
valueFormatter?: ValueFormatter;
label?: string;
showLabel?: boolean;
showAnimation?: boolean;
showTooltip?: boolean;
noDataText?: string;
}
declare const DonutChart: React.ForwardRefExoticComponent<DonutChartProps & React.RefAttributes<HTMLDivElement>>;
export default DonutChart;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as t}from"tslib";import e from"react";import{twMerge as a}from"tailwind-merge";import{ResponsiveContainer as o,PieChart as n,Pie as r,Tooltip as i}from"recharts";import l from"../common/NoData.js";import{hexColors as m}from"../../../lib/hexColors.js";import{DEFAULT_COLOR as s,themeColorRange as c}from"../../../lib/theme.js";import{defaultValueFormatter as d}from"../../../lib/utils.js";import{parseLabelInput as u,parseData as p}from"./inputParser.js";import{DonutChartTooltip as h}from"./DonutChartTooltip.js";const f=e.forwardRef(((f,v)=>{const{data:w=[],category:x="value",index:g="name",colors:y=c,variant:b="donut",valueFormatter:D=d,label:A,showLabel:E=!0,animationDuration:j=1500,showAnimation:T=!0,showTooltip:N=!0,className:C,noDataText:F}=f,R=t(f,["data","category","index","colors","variant","valueFormatter","label","showLabel","animationDuration","showAnimation","showTooltip","className","noDataText"]),K="donut"==b,L=u(A,D,w,x);return e.createElement("div",Object.assign({ref:v,className:a("w-full h-44",C)},R),e.createElement(o,{width:"100%",height:"100%"},(null==w?void 0:w.length)?e.createElement(n,null,E&&K?e.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fill:m[s]},L):null,e.createElement(r,{data:p(w,y),cx:"50%",cy:"50%",startAngle:90,endAngle:-270,innerRadius:K?"75%":"0%",outerRadius:"100%",paddingAngle:0,dataKey:x,nameKey:g,isAnimationActive:T,animationDuration:j}),N?e.createElement(i,{wrapperStyle:{outline:"none"},content:({active:t,payload:a})=>e.createElement(h,{active:t,payload:a,valueFormatter:D})}):null):e.createElement(l,{noDataText:F})))}));f.displayName="DonutChart";export{f as default};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("tailwind-merge"),a=require("../common/ChartTooltip.cjs"),r=require("../../../lib/spacing.cjs");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e);exports.DonutChartTooltip=({active:e,payload:l,valueFormatter:i})=>{if(e&&l[0]){const e=l[0];return o.default.createElement(a.ChartTooltipFrame,null,o.default.createElement("div",{className:t.twMerge(r.spacing.twoXl.paddingX,r.spacing.sm.paddingY)},o.default.createElement(a.ChartTooltipRow,{value:i(e.value),name:e.name,color:e.payload.color})))}return null};

View File

@@ -0,0 +1,8 @@
import React from "react";
import { ValueFormatter } from "../../../lib/inputTypes";
export interface DonutChartTooltipProps {
active: boolean | undefined;
payload: any;
valueFormatter: ValueFormatter;
}
export declare const DonutChartTooltip: ({ active, payload, valueFormatter }: DonutChartTooltipProps) => React.JSX.Element | null;

View File

@@ -0,0 +1 @@
import e from"react";import{twMerge as o}from"tailwind-merge";import{ChartTooltipFrame as r,ChartTooltipRow as t}from"../common/ChartTooltip.js";import{spacing as a}from"../../../lib/spacing.js";const l=({active:l,payload:m,valueFormatter:n})=>{if(l&&m[0]){const l=m[0];return e.createElement(r,null,e.createElement("div",{className:o(a.twoXl.paddingX,a.sm.paddingY)},e.createElement(t,{value:n(l.value),name:l.name,color:l.payload.color})))}return null};export{l as DonutChartTooltip};

View File

@@ -0,0 +1,2 @@
export { default as DonutChart } from "./DonutChart";
export type { DonutChartProps } from "./DonutChart";

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../lib/hexColors.cjs"),r=require("../../../lib/constants.cjs"),s=require("../../../lib/utils.cjs");exports.parseData=(s,a)=>s.map(((s,l)=>{const o=l<a.length?a[l]:r.BaseColors.Gray,t=e.hexColors[null!=o?o:r.BaseColors.Gray];return Object.assign(Object.assign({},s),{color:o,fill:t})})),exports.parseLabelInput=(e,r,a,l)=>e||r(((e,r)=>s.sumNumericArray(e.map((e=>e[r]))))(a,l));

View File

@@ -0,0 +1,3 @@
import { Color, ValueFormatter } from "../../../lib/inputTypes";
export declare const parseData: (data: any[], colors: Color[]) => any[];
export declare const parseLabelInput: (labelInput: string | undefined, valueFormatter: ValueFormatter, data: any[], category: string) => string;

View File

@@ -0,0 +1 @@
import{hexColors as o}from"../../../lib/hexColors.js";import{BaseColors as r}from"../../../lib/constants.js";import{sumNumericArray as s}from"../../../lib/utils.js";const t=(s,t)=>s.map(((s,l)=>{const i=l<t.length?t[l]:r.Gray,n=o[null!=i?i:r.Gray];return Object.assign(Object.assign({},s),{color:i,fill:n})})),l=(o,r,t,l)=>o||r(((o,r)=>s(o.map((o=>o[r]))))(t,l));export{t as parseData,l as parseLabelInput};

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),a=require("tailwind-merge"),i=require("recharts"),r=require("../common/utils.cjs"),l=require("../common/ChartLegend.cjs"),n=require("../common/ChartTooltip.cjs"),o=require("../common/NoData.cjs"),s=require("../../../lib/hexColors.cjs"),c=require("../../../lib/constants.cjs"),u=require("../../../lib/theme.cjs"),d=require("../../../lib/utils.cjs");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=m(t);const f=h.default.forwardRef(((m,f)=>{const{data:y=[],categories:p=[],index:v,colors:x=u.themeColorRange,valueFormatter:w=d.defaultValueFormatter,startEndOnly:g=!1,showXAxis:A=!0,showYAxis:E=!0,yAxisWidth:k=56,animationDuration:C=1500,showAnimation:L=!0,showTooltip:q=!0,showLegend:D=!0,showGridLines:b=!0,autoMinValue:j=!1,curveType:T="linear",minValue:N,maxValue:F,connectNulls:V=!1,allowDecimals:G=!0,className:S,noDataText:W}=m,Y=e.__rest(m,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","className","noDataText"]),[z,M]=t.useState(60),O=r.constructCategoryColors(p,x),R=r.getYAxisDomain(j,N,F);return h.default.createElement("div",Object.assign({ref:f,className:a.twMerge("w-full h-80",S)},Y),h.default.createElement(i.ResponsiveContainer,{width:"100%",height:"100%"},(null==y?void 0:y.length)?h.default.createElement(i.LineChart,{data:y},b?h.default.createElement(i.CartesianGrid,{strokeDasharray:"3 3",horizontal:!0,vertical:!1}):null,h.default.createElement(i.XAxis,{hide:!A,dataKey:v,interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},ticks:g?[y[0][v],y[y.length-1][v]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickLine:!1,axisLine:!1,padding:{left:10,right:10},minTickGap:5}),h.default.createElement(i.YAxis,{width:k,hide:!E,axisLine:!1,tickLine:!1,type:"number",domain:R,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:w,allowDecimals:G}),q?h.default.createElement(i.Tooltip,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:({active:e,payload:t,label:a})=>h.default.createElement(n.default,{active:e,payload:t,label:a,valueFormatter:w,categoryColors:O}),position:{y:0}}):null,D?h.default.createElement(i.Legend,{verticalAlign:"top",height:z,content:({payload:e})=>l({payload:e},O,M)}):null,p.map((e=>{var t;return h.default.createElement(i.Line,{key:e,name:e,type:T,dataKey:e,stroke:s.hexColors[null!==(t=O.get(e))&&void 0!==t?t:c.BaseColors.Gray],strokeWidth:2,dot:!1,isAnimationActive:L,animationDuration:C,connectNulls:V})}))):h.default.createElement(o,{noDataText:W})))}));f.displayName="LineChart",module.exports=f;

View File

@@ -0,0 +1,9 @@
import React from "react";
import BaseChartProps from "../common/BaseChartProps";
import { CurveType } from "../../../lib/inputTypes";
export interface LineChartProps extends BaseChartProps {
curveType?: CurveType;
connectNulls?: boolean;
}
declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
export default LineChart;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as e}from"tslib";import t,{useState as a}from"react";import{twMerge as o}from"tailwind-merge";import{ResponsiveContainer as i,LineChart as r,CartesianGrid as n,XAxis as l,YAxis as s,Tooltip as m,Legend as c,Line as d}from"recharts";import{constructCategoryColors as h,getYAxisDomain as p}from"../common/utils.js";import u from"../common/ChartLegend.js";import y from"../common/ChartTooltip.js";import f from"../common/NoData.js";import{hexColors as w}from"../../../lib/hexColors.js";import{BaseColors as v}from"../../../lib/constants.js";import{themeColorRange as x}from"../../../lib/theme.js";import{defaultValueFormatter as g}from"../../../lib/utils.js";const E=t.forwardRef(((E,k)=>{const{data:A=[],categories:D=[],index:L,colors:b=x,valueFormatter:j=g,startEndOnly:T=!1,showXAxis:N=!0,showYAxis:C=!0,yAxisWidth:F=56,animationDuration:V=1500,showAnimation:G=!0,showTooltip:S=!0,showLegend:W=!0,showGridLines:z=!0,autoMinValue:O=!1,curveType:H="linear",minValue:I,maxValue:K,connectNulls:M=!1,allowDecimals:X=!0,className:Y,noDataText:R}=E,q=e(E,["data","categories","index","colors","valueFormatter","startEndOnly","showXAxis","showYAxis","yAxisWidth","animationDuration","showAnimation","showTooltip","showLegend","showGridLines","autoMinValue","curveType","minValue","maxValue","connectNulls","allowDecimals","className","noDataText"]),[B,J]=a(60),P=h(D,b),Q=p(O,I,K);return t.createElement("div",Object.assign({ref:k,className:o("w-full h-80",Y)},q),t.createElement(i,{width:"100%",height:"100%"},(null==A?void 0:A.length)?t.createElement(r,{data:A},z?t.createElement(n,{strokeDasharray:"3 3",horizontal:!0,vertical:!1}):null,t.createElement(l,{hide:!N,dataKey:L,interval:"preserveStartEnd",tick:{transform:"translate(0, 6)"},ticks:T?[A[0][L],A[A.length-1][L]]:void 0,style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickLine:!1,axisLine:!1,padding:{left:10,right:10},minTickGap:5}),t.createElement(s,{width:F,hide:!C,axisLine:!1,tickLine:!1,type:"number",domain:Q,tick:{transform:"translate(-3, 0)"},style:{fontSize:"12px",fontFamily:"Inter; Helvetica"},tickFormatter:j,allowDecimals:X}),S?t.createElement(m,{wrapperStyle:{outline:"none"},isAnimationActive:!1,cursor:{stroke:"#d1d5db",strokeWidth:1},content:({active:e,payload:a,label:o})=>t.createElement(y,{active:e,payload:a,label:o,valueFormatter:j,categoryColors:P}),position:{y:0}}):null,W?t.createElement(c,{verticalAlign:"top",height:B,content:({payload:e})=>u({payload:e},P,J)}):null,D.map((e=>{var a;return t.createElement(d,{key:e,name:e,type:H,dataKey:e,stroke:w[null!==(a=P.get(e))&&void 0!==a?a:v.Gray],strokeWidth:2,dot:!1,isAnimationActive:G,animationDuration:V,connectNulls:M})}))):t.createElement(f,{noDataText:R})))}));E.displayName="LineChart";export{E as default};

View File

@@ -0,0 +1,2 @@
export { default as LineChart } from "./LineChart";
export type { LineChartProps } from "./LineChart";

View File

@@ -0,0 +1,6 @@
/// <reference types="react" />
interface BaseAnimationTimingProps extends React.HTMLAttributes<HTMLDivElement> {
animationDuration?: number;
showAnimation?: boolean;
}
export default BaseAnimationTimingProps;

View File

@@ -0,0 +1,23 @@
import { Color, ValueFormatter } from "../../../lib";
import type BaseAnimationTimingProps from "./BaseAnimationTimingProps";
interface BaseChartProps extends BaseAnimationTimingProps {
data: any[];
categories: string[];
index: string;
colors?: Color[];
valueFormatter?: ValueFormatter;
startEndOnly?: boolean;
showXAxis?: boolean;
showYAxis?: boolean;
yAxisWidth?: number;
showTooltip?: boolean;
showGradient?: boolean;
showLegend?: boolean;
showGridLines?: boolean;
autoMinValue?: boolean;
minValue?: number;
maxValue?: number;
allowDecimals?: boolean;
noDataText?: string;
}
export default BaseChartProps;

View File

@@ -0,0 +1 @@
"use strict";var e=require("react"),t=require("../../../hooks/useOnWindowResize.cjs"),r=require("../../text-elements/Legend/Legend.cjs");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=u(e);module.exports=({payload:u},l,n)=>{const s=e.useRef(null);return t((()=>{var e;var t;n((t=null===(e=s.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)})),a.default.createElement("div",{ref:s,className:"flex items-center justify-end"},a.default.createElement(r,{categories:u.map((e=>e.value)),colors:u.map((e=>l.get(e.value)))}))};

View File

@@ -0,0 +1,4 @@
import React from "react";
import { Color } from "../../../lib";
declare const ChartLegend: ({ payload }: any, categoryColors: Map<string, Color>, setLegendHeight: React.Dispatch<React.SetStateAction<number>>) => React.JSX.Element;
export default ChartLegend;

View File

@@ -0,0 +1 @@
import e,{useRef as t}from"react";import r from"../../../hooks/useOnWindowResize.js";import o from"../../text-elements/Legend/Legend.js";const a=({payload:a},n,l)=>{const s=t(null);return r((()=>{var e;var t;l((t=null===(e=s.current)||void 0===e?void 0:e.clientHeight)?Number(t)+20:60)})),e.createElement("div",{ref:s,className:"flex items-center justify-end"},e.createElement(o,{categories:a.map((e=>e.value)),colors:a.map((e=>n.get(e.value)))}))};export{a as default};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("tailwind-merge"),a=require("../../../lib/constants.cjs"),l=require("../../../lib/shape.cjs"),r=require("../../../lib/sizing.cjs"),o=require("../../../lib/spacing.cjs"),s=require("../../../lib/font.cjs"),i=require("../../../lib/theme.cjs"),c=require("../../../lib/utils.cjs");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(e);const n=({children:e})=>m.default.createElement("div",{className:t.twMerge(c.getColorClassNames("white").bgColor,s.fontSize.sm,l.borderRadius.md.all,l.border.sm.all,l.boxShadow.lg)},e),u=({value:e,name:a,color:o})=>m.default.createElement("div",{className:"flex items-center justify-between space-x-8"},m.default.createElement("div",{className:"flex items-center space-x-2"},m.default.createElement("span",{className:t.twMerge("shrink-0",c.getColorClassNames(o,i.colorPalette.background).bgColor,c.getColorClassNames("white").borderColor,r.sizing.sm.height,r.sizing.sm.width,l.borderRadius.full.all,l.border.md.all,l.boxShadow.md)}),m.default.createElement("p",{className:t.twMerge("font-medium tabular-nums text-right whitespace-nowrap",c.getColorClassNames(i.DEFAULT_COLOR,i.colorPalette.darkText).textColor)},e)),m.default.createElement("p",{className:t.twMerge("text-right whitespace-nowrap",c.getColorClassNames(i.DEFAULT_COLOR,i.colorPalette.text).textColor,s.fontWeight.sm)},a));exports.ChartTooltipFrame=n,exports.ChartTooltipRow=u,exports.default=({active:e,payload:r,label:d,categoryColors:g,valueFormatter:p})=>e&&r?m.default.createElement(n,null,m.default.createElement("div",{className:t.twMerge(c.getColorClassNames(i.DEFAULT_COLOR,i.colorPalette.lightBorder).borderColor,o.spacing.twoXl.paddingX,o.spacing.sm.paddingY,l.border.sm.bottom)},m.default.createElement("p",{className:t.twMerge("text-elem",c.getColorClassNames(i.DEFAULT_COLOR,i.colorPalette.darkText).textColor,s.fontWeight.md)},d)),m.default.createElement("div",{className:t.twMerge(o.spacing.twoXl.paddingX,o.spacing.sm.paddingY,"space-y-1")},r.map((({value:e,name:t},l)=>{var r;return m.default.createElement(u,{key:`id-${l}`,value:p(e),name:t,color:null!==(r=g.get(t))&&void 0!==r?r:a.BaseColors.Blue})})))):null;

View File

@@ -0,0 +1,20 @@
import React from "react";
import { Color, ValueFormatter } from "../../../lib";
export declare const ChartTooltipFrame: ({ children }: {
children: React.ReactNode;
}) => React.JSX.Element;
export interface ChartTooltipRowProps {
value: string;
name: string;
color: Color;
}
export declare const ChartTooltipRow: ({ value, name, color }: ChartTooltipRowProps) => React.JSX.Element;
export interface ChartTooltipProps {
active: boolean | undefined;
payload: any;
label: string;
categoryColors: Map<string, Color>;
valueFormatter: ValueFormatter;
}
declare const ChartTooltip: ({ active, payload, label, categoryColors, valueFormatter, }: ChartTooltipProps) => React.JSX.Element | null;
export default ChartTooltip;

View File

@@ -0,0 +1 @@
import e from"react";import{twMerge as t}from"tailwind-merge";import{BaseColors as l}from"../../../lib/constants.js";import{border as a,borderRadius as r,boxShadow as m}from"../../../lib/shape.js";import{sizing as o}from"../../../lib/sizing.js";import{spacing as s}from"../../../lib/spacing.js";import{fontWeight as i,fontSize as n}from"../../../lib/font.js";import{colorPalette as c,DEFAULT_COLOR as d}from"../../../lib/theme.js";import{getColorClassNames as p}from"../../../lib/utils.js";const g=({children:l})=>e.createElement("div",{className:t(p("white").bgColor,n.sm,r.md.all,a.sm.all,m.lg)},l),u=({value:l,name:s,color:n})=>e.createElement("div",{className:"flex items-center justify-between space-x-8"},e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("span",{className:t("shrink-0",p(n,c.background).bgColor,p("white").borderColor,o.sm.height,o.sm.width,r.full.all,a.md.all,m.md)}),e.createElement("p",{className:t("font-medium tabular-nums text-right whitespace-nowrap",p(d,c.darkText).textColor)},l)),e.createElement("p",{className:t("text-right whitespace-nowrap",p(d,c.text).textColor,i.sm)},s)),b=({active:r,payload:m,label:o,categoryColors:n,valueFormatter:b})=>r&&m?e.createElement(g,null,e.createElement("div",{className:t(p(d,c.lightBorder).borderColor,s.twoXl.paddingX,s.sm.paddingY,a.sm.bottom)},e.createElement("p",{className:t("text-elem",p(d,c.darkText).textColor,i.md)},o)),e.createElement("div",{className:t(s.twoXl.paddingX,s.sm.paddingY,"space-y-1")},m.map((({value:t,name:a},r)=>{var m;return e.createElement(u,{key:`id-${r}`,value:b(t),name:a,color:null!==(m=n.get(a))&&void 0!==m?m:l.Blue})})))):null;export{g as ChartTooltipFrame,u as ChartTooltipRow,b as default};

View File

@@ -0,0 +1 @@
"use strict";var e=require("react");require("../AreaChart/AreaChart.cjs"),require("../BarChart/BarChart.cjs"),require("../LineChart/LineChart.cjs"),require("../DonutChart/DonutChart.cjs"),require("../../icon-elements/Badge/Badge.cjs"),require("../../icon-elements/BadgeDelta/BadgeDelta.cjs"),require("../../icon-elements/Icon/Icon.cjs"),require("../../layout-elements/Accordion/Accordion.cjs"),require("../../layout-elements/Accordion/AccordionBody.cjs"),require("../../layout-elements/Accordion/AccordionHeader.cjs"),require("../../layout-elements/Accordion/AccordionList.cjs"),require("../../layout-elements/Grid/Col.cjs"),require("../../layout-elements/Grid/Grid.cjs"),require("../../layout-elements/Card/Card.cjs"),require("../../layout-elements/Divider/Divider.cjs");var r=require("../../layout-elements/Flex/Flex.cjs");require("../../list-elements/List/List.cjs"),require("../../list-elements/List/ListItem.cjs"),require("../../list-elements/Table/Table.cjs"),require("../../list-elements/Table/TableBody.cjs"),require("../../list-elements/Table/TableCell.cjs"),require("../../list-elements/Table/TableHead.cjs"),require("../../list-elements/Table/TableHeaderCell.cjs"),require("../../list-elements/Table/TableRow.cjs"),require("../../input-elements/Dropdown/Dropdown.cjs"),require("../../input-elements/Dropdown/DropdownItem.cjs"),require("../../input-elements/MultiSelectBox/MultiSelectBox.cjs"),require("../../input-elements/MultiSelectBox/MultiSelectBoxItem.cjs"),require("../../input-elements/SelectBox/SelectBox.cjs"),require("../../input-elements/SelectBox/SelectBoxItem.cjs"),require("../../input-elements/Tab/Tab.cjs"),require("../../input-elements/Tab/TabList.cjs"),require("../../input-elements/Toggle/Toggle.cjs"),require("../../input-elements/Toggle/ToggleItem.cjs"),require("../../input-elements/Button/Button.cjs"),require("../../input-elements/DateRangePicker/DateRangePicker.cjs"),require("../../input-elements/TextInput/TextInput.cjs");var t=require("../../text-elements/Text/Text.cjs");require("../../text-elements/Bold/Bold.cjs"),require("../../text-elements/Italic/Italic.cjs"),require("../../text-elements/Title/Title.cjs"),require("../../text-elements/Subtitle/Subtitle.cjs"),require("../../text-elements/Metric/Metric.cjs"),require("../../text-elements/Callout/Callout.cjs"),require("../../text-elements/Legend/Legend.cjs"),require("../../vis-elements/CategoryBar/CategoryBar.cjs"),require("../../vis-elements/DeltaBar/DeltaBar.cjs"),require("../../vis-elements/MarkerBar/MarkerBar.cjs"),require("../../vis-elements/ProgressBar/ProgressBar.cjs"),require("../../vis-elements/RangeBar/RangeBar.cjs"),require("../../vis-elements/BarList/BarList.cjs"),require("../../vis-elements/Tracker/Tracker.cjs");var l=require("tailwind-merge"),s=require("../../../lib/theme.cjs"),i=require("../../../lib/utils.cjs");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e);module.exports=({noDataText:e="No data"})=>u.default.createElement(r,{alignItems:"center",justifyContent:"center",className:l.twMerge("w-full h-full border border-dashed",i.getColorClassNames(s.DEFAULT_COLOR,s.colorPalette.lightBorder).borderColor)},u.default.createElement(t,null,e));

View File

@@ -0,0 +1,6 @@
import React from "react";
interface NoDataProps {
noDataText?: string;
}
declare const NoData: ({ noDataText }: NoDataProps) => React.JSX.Element;
export default NoData;

View File

@@ -0,0 +1 @@
import e from"react";import"../AreaChart/AreaChart.js";import"../BarChart/BarChart.js";import"../LineChart/LineChart.js";import"../DonutChart/DonutChart.js";import"../../icon-elements/Badge/Badge.js";import"../../icon-elements/BadgeDelta/BadgeDelta.js";import"../../icon-elements/Icon/Icon.js";import"../../layout-elements/Accordion/Accordion.js";import"../../layout-elements/Accordion/AccordionBody.js";import"../../layout-elements/Accordion/AccordionHeader.js";import"../../layout-elements/Accordion/AccordionList.js";import"../../layout-elements/Grid/Col.js";import"../../layout-elements/Grid/Grid.js";import"../../layout-elements/Card/Card.js";import"../../layout-elements/Divider/Divider.js";import t from"../../layout-elements/Flex/Flex.js";import"../../list-elements/List/List.js";import"../../list-elements/List/ListItem.js";import"../../list-elements/Table/Table.js";import"../../list-elements/Table/TableBody.js";import"../../list-elements/Table/TableCell.js";import"../../list-elements/Table/TableHead.js";import"../../list-elements/Table/TableHeaderCell.js";import"../../list-elements/Table/TableRow.js";import"../../input-elements/Dropdown/Dropdown.js";import"../../input-elements/Dropdown/DropdownItem.js";import"../../input-elements/MultiSelectBox/MultiSelectBox.js";import"../../input-elements/MultiSelectBox/MultiSelectBoxItem.js";import"../../input-elements/SelectBox/SelectBox.js";import"../../input-elements/SelectBox/SelectBoxItem.js";import"../../input-elements/Tab/Tab.js";import"../../input-elements/Tab/TabList.js";import"../../input-elements/Toggle/Toggle.js";import"../../input-elements/Toggle/ToggleItem.js";import"../../input-elements/Button/Button.js";import"../../input-elements/DateRangePicker/DateRangePicker.js";import"../../input-elements/TextInput/TextInput.js";import r from"../../text-elements/Text/Text.js";import"../../text-elements/Bold/Bold.js";import"../../text-elements/Italic/Italic.js";import"../../text-elements/Title/Title.js";import"../../text-elements/Subtitle/Subtitle.js";import"../../text-elements/Metric/Metric.js";import"../../text-elements/Callout/Callout.js";import"../../text-elements/Legend/Legend.js";import"../../vis-elements/CategoryBar/CategoryBar.js";import"../../vis-elements/DeltaBar/DeltaBar.js";import"../../vis-elements/MarkerBar/MarkerBar.js";import"../../vis-elements/ProgressBar/ProgressBar.js";import"../../vis-elements/RangeBar/RangeBar.js";import"../../vis-elements/BarList/BarList.js";import"../../vis-elements/Tracker/Tracker.js";import{twMerge as o}from"tailwind-merge";import{colorPalette as s,DEFAULT_COLOR as i}from"../../../lib/theme.js";import{getColorClassNames as l}from"../../../lib/utils.js";const m=({noDataText:m="No data"})=>e.createElement(t,{alignItems:"center",justifyContent:"center",className:o("w-full h-full border border-dashed",l(i,s.lightBorder).borderColor)},e.createElement(r,null,m));export{m as default};

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.constructCategoryColors=(e,t)=>{const o=new Map;return e.forEach(((e,r)=>{o.set(e,t[r])})),o},exports.getYAxisDomain=(e,t,o)=>[e?"auto":null!=t?t:0,null!=o?o:"auto"];

View File

@@ -0,0 +1,3 @@
import { Color } from "../../../lib/inputTypes";
export declare const constructCategoryColors: (categories: string[], colors: Color[]) => Map<string, Color>;
export declare const getYAxisDomain: (autoMinValue: boolean, minValue: number | undefined, maxValue: number | undefined) => (string | number)[];

View File

@@ -0,0 +1 @@
const t=(t,n)=>{const o=new Map;return t.forEach(((t,u)=>{o.set(t,n[u])})),o},n=(t,n,o)=>[t?"auto":null!=n?n:0,null!=o?o:"auto"];export{t as constructCategoryColors,n as getYAxisDomain};

View File

@@ -0,0 +1,4 @@
export * from "./AreaChart";
export * from "./BarChart";
export * from "./LineChart";
export * from "./DonutChart";

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),r=require("tailwind-merge"),s=require("../../../lib/constants.cjs"),i=require("../../../lib/shape.cjs"),l=require("../../../lib/spacing.cjs"),a=require("../../../lib/theme.cjs"),o=require("../../../lib/utils.cjs"),n=require("./styles.cjs"),c=require("../../util-elements/Tooltip/Tooltip.cjs");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=u(t);const g=o.makeClassName("Badge"),f=d.default.forwardRef(((t,u)=>{const{color:f=s.BaseColors.Blue,icon:p,size:m=s.Sizes.SM,tooltip:b,className:h,children:j}=t,q=e.__rest(t,["color","icon","size","tooltip","className","children"]),w=p||null,{tooltipProps:x,getReferenceProps:N}=c.useTooltip();return d.default.createElement("span",Object.assign({ref:o.mergeRefs([u,x.refs.setReference]),className:r.twMerge(g("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default",o.getColorClassNames(f,a.colorPalette.darkText).textColor,o.getColorClassNames(f,a.colorPalette.lightBackground).bgColor,i.borderRadius.full.all,n.badgeProportions[m].paddingX,n.badgeProportions[m].paddingY,n.badgeProportions[m].fontSize,h)},N,q),d.default.createElement(c.default,Object.assign({text:b},x)),w?d.default.createElement(w,{className:r.twMerge(g("icon"),l.spacing.twoXs.negativeMarginLeft,l.spacing.xs.marginRight,n.iconSizes[m].height,n.iconSizes[m].width)}):null,d.default.createElement("p",{className:r.twMerge(g("text"),"text-sm whitespace-nowrap")},j))}));f.displayName="Badge",module.exports=f;

View File

@@ -0,0 +1,10 @@
import React from "react";
import { Color, Size } from "../../../lib";
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
color?: Color;
size?: Size;
icon?: React.ElementType;
tooltip?: string;
}
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
export default Badge;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as e}from"tslib";import t from"react";import{twMerge as o}from"tailwind-merge";import{BaseColors as r,Sizes as i}from"../../../lib/constants.js";import{borderRadius as s}from"../../../lib/shape.js";import{spacing as l}from"../../../lib/spacing.js";import{colorPalette as a}from"../../../lib/theme.js";import{mergeRefs as m,getColorClassNames as n,makeClassName as c}from"../../../lib/utils.js";import{badgeProportions as p,iconSizes as f}from"./styles.js";import g,{useTooltip as d}from"../../util-elements/Tooltip/Tooltip.js";const u=c("Badge"),h=t.forwardRef(((c,h)=>{const{color:j=r.Blue,icon:x,size:b=i.SM,tooltip:w,className:N,children:B}=c,E=e(c,["color","icon","size","tooltip","className","children"]),R=x||null,{tooltipProps:k,getReferenceProps:y}=d();return t.createElement("span",Object.assign({ref:m([h,k.refs.setReference]),className:o(u("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default",n(j,a.darkText).textColor,n(j,a.lightBackground).bgColor,s.full.all,p[b].paddingX,p[b].paddingY,p[b].fontSize,N)},y,E),t.createElement(g,Object.assign({text:w},k)),R?t.createElement(R,{className:o(u("icon"),l.twoXs.negativeMarginLeft,l.xs.marginRight,f[b].height,f[b].width)}):null,t.createElement("p",{className:o(u("text"),"text-sm whitespace-nowrap")},B))}));h.displayName="Badge";export{h as default};

View File

@@ -0,0 +1,2 @@
export { default as Badge } from "./Badge";
export type { BadgeProps } from "./Badge";

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../../lib/sizing.cjs"),d=require("../../../lib/font.cjs"),g=require("../../../lib/spacing.cjs");const n={xs:{paddingX:g.spacing.sm.paddingX,paddingY:g.spacing.threeXs.paddingY,fontSize:d.fontSize.xs},sm:{paddingX:g.spacing.md.paddingX,paddingY:g.spacing.threeXs.paddingY,fontSize:d.fontSize.sm},md:{paddingX:g.spacing.lg.paddingX,paddingY:g.spacing.threeXs.paddingY,fontSize:d.fontSize.md},lg:{paddingX:g.spacing.xl.paddingX,paddingY:g.spacing.threeXs.paddingY,fontSize:d.fontSize.lg},xl:{paddingX:g.spacing.twoXl.paddingX,paddingY:g.spacing.twoXs.paddingY,fontSize:d.fontSize.xl}},e={xs:{height:i.sizing.md.height,width:i.sizing.md.width},sm:{height:i.sizing.md.height,width:i.sizing.md.width},md:{height:i.sizing.md.height,width:i.sizing.md.width},lg:{height:i.sizing.lg.height,width:i.sizing.lg.width},xl:{height:i.sizing.xl.height,width:i.sizing.xl.width}};exports.badgeProportions=n,exports.iconSizes=e;

View File

@@ -0,0 +1,12 @@
import { Sizing } from "lib/sizing";
export type BadgeProportionTypes = {
paddingX: string;
paddingY: string;
fontSize: string;
};
export declare const badgeProportions: {
[char: string]: BadgeProportionTypes;
};
export declare const iconSizes: {
[size: string]: Sizing;
};

View File

@@ -0,0 +1 @@
import{sizing as d}from"../../../lib/sizing.js";import{fontSize as i}from"../../../lib/font.js";import{spacing as g}from"../../../lib/spacing.js";const t={xs:{paddingX:g.sm.paddingX,paddingY:g.threeXs.paddingY,fontSize:i.xs},sm:{paddingX:g.md.paddingX,paddingY:g.threeXs.paddingY,fontSize:i.sm},md:{paddingX:g.lg.paddingX,paddingY:g.threeXs.paddingY,fontSize:i.md},lg:{paddingX:g.xl.paddingX,paddingY:g.threeXs.paddingY,fontSize:i.lg},xl:{paddingX:g.twoXl.paddingX,paddingY:g.twoXs.paddingY,fontSize:i.xl}},h={xs:{height:d.md.height,width:d.md.width},sm:{height:d.md.height,width:d.md.width},md:{height:d.md.height,width:d.md.width},lg:{height:d.lg.height,width:d.lg.width},xl:{height:d.xl.height,width:d.xl.width}};export{t as badgeProportions,h as iconSizes};

View File

@@ -0,0 +1,2 @@
'use client';
"use strict";var e=require("tslib"),t=require("react"),s=require("tailwind-merge"),a=require("../../../lib/constants.cjs"),r=require("../../../lib/shape.cjs"),i=require("../../../lib/spacing.cjs"),l=require("../../../lib/utils.cjs"),n=require("./styles.cjs");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=c(t);const d=l.makeClassName("BadgeDelta"),u=o.default.forwardRef(((t,c)=>{const{deltaType:u=a.DeltaTypes.Increase,isIncreasePositive:g=!0,size:p=a.Sizes.SM,children:f,className:m}=t,b=e.__rest(t,["deltaType","isIncreasePositive","size","children","className"]),w=n.deltaIcons[u],h=l.mapInputsToDeltaType(u,g),x=f?n.badgeProportionsWithText:n.badgeProportionsIconOnly;return o.default.createElement("span",Object.assign({ref:c,className:s.twMerge(d("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default",r.borderRadius.full.all,n.colors[h].bgColor,n.colors[h].textColor,x[p].paddingX,x[p].paddingY,x[p].fontSize,m)},b),o.default.createElement(w,{className:s.twMerge(d("icon"),f?s.twMerge(i.spacing.twoXs.negativeMarginLeft,i.spacing.xs.marginRight):n.iconSizes[p].height,n.iconSizes[p].width)}),f?o.default.createElement("p",{className:s.twMerge(d("text"),"text-sm whitespace-nowrap")},f):null)}));u.displayName="BadgeDelta",module.exports=u;

View File

@@ -0,0 +1,9 @@
import React from "react";
import { DeltaType, Size } from "../../../lib";
export interface BadgeDeltaProps extends React.HTMLAttributes<HTMLSpanElement> {
deltaType?: DeltaType;
isIncreasePositive?: boolean;
size?: Size;
}
declare const BadgeDelta: React.ForwardRefExoticComponent<BadgeDeltaProps & React.RefAttributes<HTMLSpanElement>>;
export default BadgeDelta;

View File

@@ -0,0 +1,2 @@
'use client';
import{__rest as e}from"tslib";import t from"react";import{twMerge as s}from"tailwind-merge";import{DeltaTypes as i,Sizes as a}from"../../../lib/constants.js";import{borderRadius as r}from"../../../lib/shape.js";import{spacing as l}from"../../../lib/spacing.js";import{makeClassName as o,mapInputsToDeltaType as n}from"../../../lib/utils.js";import{colors as m,iconSizes as c,deltaIcons as p,badgeProportionsWithText as f,badgeProportionsIconOnly as d}from"./styles.js";const g=o("BadgeDelta"),h=t.forwardRef(((o,h)=>{const{deltaType:u=i.Increase,isIncreasePositive:x=!0,size:b=a.SM,children:j,className:w}=o,N=e(o,["deltaType","isIncreasePositive","size","children","className"]),y=p[u],v=n(u,x),z=j?f:d;return t.createElement("span",Object.assign({ref:h,className:s(g("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default",r.full.all,m[v].bgColor,m[v].textColor,z[b].paddingX,z[b].paddingY,z[b].fontSize,w)},N),t.createElement(y,{className:s(g("icon"),j?s(l.twoXs.negativeMarginLeft,l.xs.marginRight):c[b].height,c[b].width)}),j?t.createElement("p",{className:s(g("text"),"text-sm whitespace-nowrap")},j):null)}));h.displayName="BadgeDelta";export{h as default};

View File

@@ -0,0 +1,2 @@
export { default as BadgeDelta } from "./BadgeDelta";
export type { BadgeDeltaProps } from "./BadgeDelta";

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../lib/constants.cjs"),s=require("../../../lib/colorClassNames.cjs"),o=require("../../../lib/sizing.cjs"),i=require("../../../lib/spacing.cjs"),a=require("../../../lib/font.cjs"),t=require("../../../lib/theme.cjs");require("tslib"),require("react");var r=require("../../../assets/ArrowDownRightIcon.cjs"),d=require("../../../assets/ArrowDownIcon.cjs"),n=require("../../../assets/ArrowRightIcon.cjs"),l=require("../../../assets/ArrowUpIcon.cjs"),g=require("../../../assets/ArrowUpRightIcon.cjs");const c={xs:{paddingX:i.spacing.sm.paddingX,paddingY:i.spacing.threeXs.paddingY,fontSize:a.fontSize.xs},sm:{paddingX:i.spacing.md.paddingX,paddingY:i.spacing.twoXs.paddingY,fontSize:a.fontSize.sm},md:{paddingX:i.spacing.lg.paddingX,paddingY:i.spacing.xs.paddingY,fontSize:a.fontSize.md},lg:{paddingX:i.spacing.xl.paddingX,paddingY:i.spacing.xs.paddingY,fontSize:a.fontSize.lg},xl:{paddingX:i.spacing.xl.paddingX,paddingY:i.spacing.xs.paddingY,fontSize:a.fontSize.xl}},p={xs:{paddingX:i.spacing.sm.paddingX,paddingY:i.spacing.threeXs.paddingY,fontSize:a.fontSize.xs},sm:{paddingX:i.spacing.md.paddingX,paddingY:i.spacing.threeXs.paddingY,fontSize:a.fontSize.sm},md:{paddingX:i.spacing.lg.paddingX,paddingY:i.spacing.threeXs.paddingY,fontSize:a.fontSize.md},lg:{paddingX:i.spacing.xl.paddingX,paddingY:i.spacing.threeXs.paddingY,fontSize:a.fontSize.lg},xl:{paddingX:i.spacing.twoXl.paddingX,paddingY:i.spacing.twoXs.paddingY,fontSize:a.fontSize.xl}},h={xs:{height:o.sizing.md.height,width:o.sizing.md.width},sm:{height:o.sizing.md.height,width:o.sizing.md.width},md:{height:o.sizing.md.height,width:o.sizing.md.width},lg:{height:o.sizing.lg.height,width:o.sizing.lg.width},xl:{height:o.sizing.xl.height,width:o.sizing.xl.width}},C={[e.DeltaTypes.Increase]:{bgColor:s.colorClassNames[e.BaseColors.Emerald][t.colorPalette.lightBackground].bgColor,textColor:s.colorClassNames[e.BaseColors.Emerald][t.colorPalette.darkText].textColor},[e.DeltaTypes.ModerateIncrease]:{bgColor:s.colorClassNames[e.BaseColors.Emerald][t.colorPalette.lightBackground].bgColor,textColor:s.colorClassNames[e.BaseColors.Emerald][t.colorPalette.darkText].textColor},[e.DeltaTypes.Decrease]:{bgColor:s.colorClassNames[e.BaseColors.Rose][t.colorPalette.lightBackground].bgColor,textColor:s.colorClassNames[e.BaseColors.Rose][t.colorPalette.darkText].textColor},[e.DeltaTypes.ModerateDecrease]:{bgColor:s.colorClassNames[e.BaseColors.Rose][t.colorPalette.lightBackground].bgColor,textColor:s.colorClassNames[e.BaseColors.Rose][t.colorPalette.darkText].textColor},[e.DeltaTypes.Unchanged]:{bgColor:s.colorClassNames[e.BaseColors.Orange][t.colorPalette.lightBackground].bgColor,textColor:s.colorClassNames[e.BaseColors.Orange][t.colorPalette.darkText].textColor}},x={[e.DeltaTypes.Increase]:l,[e.DeltaTypes.ModerateIncrease]:g,[e.DeltaTypes.Decrease]:d,[e.DeltaTypes.ModerateDecrease]:r,[e.DeltaTypes.Unchanged]:n};exports.badgeProportionsIconOnly=c,exports.badgeProportionsWithText=p,exports.colors=C,exports.deltaIcons=x,exports.iconSizes=h;

Some files were not shown because too many files have changed in this diff Show More