@cloudwick/astral-ui 1.0.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.
- package/CONTRIBUTING.md +57 -0
- package/README.md +24 -0
- package/dist/components/accordion/accordionBody.d.ts +9 -0
- package/dist/components/accordion/accordionHeader.d.ts +9 -0
- package/dist/components/accordion/index.d.ts +37 -0
- package/dist/components/adpIcon/index.d.ts +61 -0
- package/dist/components/adpIcon/svgObjects.d.ts +246 -0
- package/dist/components/badge/index.d.ts +42 -0
- package/dist/components/breadcrumbs/breadcrumbItem.d.ts +28 -0
- package/dist/components/breadcrumbs/index.d.ts +27 -0
- package/dist/components/button/index.d.ts +46 -0
- package/dist/components/card/index.d.ts +13 -0
- package/dist/components/checkbox/index.d.ts +19 -0
- package/dist/components/checkboxGroup/index.d.ts +40 -0
- package/dist/components/datePicker/index.d.ts +10 -0
- package/dist/components/dropdown/dropdownItem.d.ts +13 -0
- package/dist/components/dropdown/dropdownToggle.d.ts +9 -0
- package/dist/components/dropdown/index.d.ts +35 -0
- package/dist/components/emptyState/emptyStateContent.d.ts +11 -0
- package/dist/components/emptyState/emptyStateCta.d.ts +11 -0
- package/dist/components/emptyState/index.d.ts +27 -0
- package/dist/components/loader/index.d.ts +28 -0
- package/dist/components/modal/index.d.ts +40 -0
- package/dist/components/modal/modalBody.d.ts +17 -0
- package/dist/components/modal/modalHeader.d.ts +13 -0
- package/dist/components/otp/index.d.ts +41 -0
- package/dist/components/otp/input.d.ts +12 -0
- package/dist/components/pagination/index.d.ts +32 -0
- package/dist/components/progress/index.d.ts +61 -0
- package/dist/components/radio/index.d.ts +15 -0
- package/dist/components/select/index.d.ts +72 -0
- package/dist/components/tabs/index.d.ts +69 -0
- package/dist/components/tabs/tab.d.ts +46 -0
- package/dist/components/textField/index.d.ts +43 -0
- package/dist/components/textarea/index.d.ts +24 -0
- package/dist/components/toast/index.d.ts +41 -0
- package/dist/components/toggle/index.d.ts +39 -0
- package/dist/components/tooltip/index.d.ts +59 -0
- package/dist/css/fonts.min.css +1 -0
- package/dist/css/index.min.css +2 -0
- package/dist/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-BoldItalic.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-Italic.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-MediumItalic.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/dist/fonts/Inter/Inter_18pt-SemiBoldItalic.ttf +0 -0
- package/dist/index.cjs.js +5 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.esm.js +5 -0
- package/package.json +131 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Contribution guidelines -
|
|
2
|
+
|
|
3
|
+
Preferably use vscode as your editor. Install all the plugins recommended by vscode.
|
|
4
|
+
|
|
5
|
+
## Setup instructions
|
|
6
|
+
|
|
7
|
+
- Clone the repo to your local using SSH - git clone git@bitbucket.org:cloudwick-labs/astral-ui.git
|
|
8
|
+
- Install Yarn if you don't have it already
|
|
9
|
+
- Create a feature branch from 'develop'
|
|
10
|
+
- Run `yarn` from the root directory to install all the dependencies
|
|
11
|
+
- Start the App using - `yarn storybook`
|
|
12
|
+
|
|
13
|
+
## Common scripts
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
yarn build
|
|
17
|
+
|
|
18
|
+
- Generates a production build
|
|
19
|
+
|
|
20
|
+
yarn build-types
|
|
21
|
+
|
|
22
|
+
- Generates the type definition files
|
|
23
|
+
|
|
24
|
+
yarn link
|
|
25
|
+
|
|
26
|
+
- Generates symlink so that you don't have to publish the package each time you want to consume the updated package
|
|
27
|
+
|
|
28
|
+
yarn publish
|
|
29
|
+
|
|
30
|
+
- Publish the package to npmjs
|
|
31
|
+
|
|
32
|
+
yarn storybook
|
|
33
|
+
|
|
34
|
+
- Starts storybook on your local
|
|
35
|
+
|
|
36
|
+
yarn build-storybook
|
|
37
|
+
|
|
38
|
+
- Build storybook if you want to host it
|
|
39
|
+
|
|
40
|
+
yarn lint
|
|
41
|
+
|
|
42
|
+
- lints the codebase using eslint and stylelint
|
|
43
|
+
|
|
44
|
+
yarn fix-lint
|
|
45
|
+
|
|
46
|
+
- lints the codebase using eslint and stylelint and fixes auto-fixable issues
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Creating a new component
|
|
50
|
+
|
|
51
|
+
Follow the following guidelines while developing a new component -
|
|
52
|
+
|
|
53
|
+
- All components go under ./src/components
|
|
54
|
+
- Tests need to written using the exported stories [Unit testing with Storybook](https://storybook.js.org/docs/react/workflows/unit-testing)
|
|
55
|
+
- All files need to use typescript and proper types need to be defined for each file [Everyday types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html)
|
|
56
|
+
- Use JSDoc to document your props so that we can support vscode intellisense [JSDoc](https://jsdoc.app/tags-param.html)
|
|
57
|
+
- Anything that needs to be exported from astral-ui should be exported from `./src/index.ts`
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# astral-ui
|
|
2
|
+
|
|
3
|
+
UI library for astral
|
|
4
|
+
|
|
5
|
+
Version - 2.6.1
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install the package in your project directory with:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
With npm:
|
|
13
|
+
|
|
14
|
+
npm i @cloudwick/astral-ui
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
With yarn:
|
|
18
|
+
|
|
19
|
+
yarn add @cloudwick/astral-ui
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
[The documentation](https://www.ui.astral.link/)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AccordionBodyProps {
|
|
3
|
+
children: React.ReactNode | React.ReactElement;
|
|
4
|
+
/**
|
|
5
|
+
* Overwrite the styles for AccordionBody by passing space separated class names
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const AccordionBody: ({ children, className }: AccordionBodyProps) => JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AccordionHeaderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Overwrite the styles for AccordionHeader by passing space separated class names
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const AccordionHeader: ({ children, className }: AccordionHeaderProps) => JSX.Element | null;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { AccordionHeaderProps } from "./accordionHeader";
|
|
3
|
+
import { AccordionBodyProps } from "./accordionBody";
|
|
4
|
+
export declare enum AccordionSizes {
|
|
5
|
+
XS = "xs",
|
|
6
|
+
SM = "sm",
|
|
7
|
+
MD = "md",
|
|
8
|
+
LG = "lg",
|
|
9
|
+
XL = "xl"
|
|
10
|
+
}
|
|
11
|
+
export type AccordionSize = `${AccordionSizes}`;
|
|
12
|
+
export interface AccordionProps {
|
|
13
|
+
children?: Array<ReactElement<AccordionBodyProps | AccordionHeaderProps>>;
|
|
14
|
+
/**
|
|
15
|
+
* Expand or collapse the Accordion
|
|
16
|
+
*/
|
|
17
|
+
expand?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Set it to false if you want the Accordion to Expand or Collapse only on click of the arrow
|
|
20
|
+
*/
|
|
21
|
+
clickableHeader?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Size of the Accordion Header (Text and Spacing)
|
|
24
|
+
* @default sm
|
|
25
|
+
*/
|
|
26
|
+
size?: AccordionSize;
|
|
27
|
+
/**
|
|
28
|
+
* Overwrite the styles for Accordion by passing space separated class names
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const Accordion: {
|
|
33
|
+
({ children, expand, clickableHeader, className, size }: AccordionProps): JSX.Element | null;
|
|
34
|
+
Header: ({ children, className }: AccordionHeaderProps) => JSX.Element | null;
|
|
35
|
+
Body: ({ children, className }: AccordionBodyProps) => JSX.Element | null;
|
|
36
|
+
};
|
|
37
|
+
export default Accordion;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { IIconDetails, IconType, iconList } from "./svgObjects";
|
|
3
|
+
export { iconList };
|
|
4
|
+
export type { IconType };
|
|
5
|
+
export interface IADPIconProps extends Omit<React.HTMLProps<SVGSVGElement>, "size"> {
|
|
6
|
+
/**
|
|
7
|
+
* Icon name from the list of available icons
|
|
8
|
+
* use "custom-icon" to pass a custom SVG object
|
|
9
|
+
* @default "custom-icon"
|
|
10
|
+
*/
|
|
11
|
+
icon: IconType;
|
|
12
|
+
/**
|
|
13
|
+
* Size of the icon. The size is proportional to the initial size of the icon.
|
|
14
|
+
* @default "sm"
|
|
15
|
+
*/
|
|
16
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
17
|
+
/**
|
|
18
|
+
* Adds a spinning animation to the icon
|
|
19
|
+
*/
|
|
20
|
+
spin?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* adds padding and rounded corners to the icon
|
|
23
|
+
*/
|
|
24
|
+
padded?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Title attribute for the icon element
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Data attribute for icon-name, override the icon name attribute
|
|
32
|
+
*/
|
|
33
|
+
data_icon_name?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Makes the icon of fixed width and center aligned
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
fixedWidth?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Custom SVG object to be used instead of one of the default icons.
|
|
41
|
+
* Use "custom-icon" as the icon prop to bypass the required icon prop.
|
|
42
|
+
* The custom SVG object should have the following properties:
|
|
43
|
+
* - SVGPath: ReactElement (required) (SVG path element)
|
|
44
|
+
* - xOffset: number (optional)
|
|
45
|
+
* - yOffset: number (optional)
|
|
46
|
+
* - initialHeight: number (optional)
|
|
47
|
+
* - initialWidth: number (optional)
|
|
48
|
+
* @default undefined
|
|
49
|
+
*/
|
|
50
|
+
customSVG?: IIconDetails;
|
|
51
|
+
}
|
|
52
|
+
export declare const iconSizeProportions: {
|
|
53
|
+
xxs: number;
|
|
54
|
+
xs: number;
|
|
55
|
+
sm: number;
|
|
56
|
+
md: number;
|
|
57
|
+
lg: number;
|
|
58
|
+
xl: number;
|
|
59
|
+
"2xl": number;
|
|
60
|
+
};
|
|
61
|
+
export declare const ADPIcon: ({ icon, size, spin, padded, title, data_icon_name, fixedWidth, customSVG, ...restProps }: IADPIconProps) => ReactElement | null;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface IIconDetails {
|
|
3
|
+
initialWidth?: number;
|
|
4
|
+
initialHeight?: number;
|
|
5
|
+
xOffset?: number;
|
|
6
|
+
yOffset?: number;
|
|
7
|
+
SVGPath: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const iconList: {
|
|
10
|
+
readonly accessGrantReport: "access-grant-report";
|
|
11
|
+
readonly accessRequest: "access-request";
|
|
12
|
+
readonly add: "add";
|
|
13
|
+
readonly addCircle: "add-circle";
|
|
14
|
+
readonly addTerminal: "add-terminal";
|
|
15
|
+
readonly addUser: "add-user";
|
|
16
|
+
readonly admin: "admin";
|
|
17
|
+
readonly agent: "agent";
|
|
18
|
+
readonly agreement: "agreement";
|
|
19
|
+
readonly ai: "ai";
|
|
20
|
+
readonly alert: "alert";
|
|
21
|
+
readonly alertFilled: "alert-filled";
|
|
22
|
+
readonly amorphicConnect: "amorphic-connect";
|
|
23
|
+
readonly api: "api";
|
|
24
|
+
readonly appAccessService: "app-access-service";
|
|
25
|
+
readonly appDatabase: "app-database";
|
|
26
|
+
readonly appFlow: "app-flow";
|
|
27
|
+
readonly appManagement: "app-management";
|
|
28
|
+
readonly appNavigator: "app-navigator";
|
|
29
|
+
readonly approve: "approve";
|
|
30
|
+
readonly app: "app";
|
|
31
|
+
readonly apps: "apps";
|
|
32
|
+
readonly attachment: "attachment";
|
|
33
|
+
readonly aura: "aura";
|
|
34
|
+
readonly authorisedGroups: "authorised-groups";
|
|
35
|
+
readonly authorisedUsers: "authorised-users";
|
|
36
|
+
readonly awsAthena: "aws-athena";
|
|
37
|
+
readonly awsAurora: "aws-aurora";
|
|
38
|
+
readonly awsComprehend: "aws-comprehend";
|
|
39
|
+
readonly awsDynamoDb: "aws-dynamoDB";
|
|
40
|
+
readonly awsLakeformation: "aws-lakeformation";
|
|
41
|
+
readonly awsLambda: "aws-lambda";
|
|
42
|
+
readonly awsMedicalComprehend: "aws-medical-comprehend";
|
|
43
|
+
readonly awsMedicalTranscribe: "aws-medical-transcribe";
|
|
44
|
+
readonly awsRedshift: "aws-redshift";
|
|
45
|
+
readonly awsRekognition: "aws-rekognition";
|
|
46
|
+
readonly awsRole: "aws-role";
|
|
47
|
+
readonly awsS3: "aws-s3";
|
|
48
|
+
readonly awsS3Sync: "aws-s3sync";
|
|
49
|
+
readonly awsTextract: "aws-textract";
|
|
50
|
+
readonly awsTranscribe: "aws-transcribe";
|
|
51
|
+
readonly back: "back";
|
|
52
|
+
readonly bell: "bell";
|
|
53
|
+
readonly beta: "beta";
|
|
54
|
+
readonly bolt: "bolt";
|
|
55
|
+
readonly bookmark: "bookmark";
|
|
56
|
+
readonly bookmarkRemove: "bookmark-remove";
|
|
57
|
+
readonly bug: "bug";
|
|
58
|
+
readonly bulkManagement: "bulk-management";
|
|
59
|
+
readonly bullHorn: "bull-horn";
|
|
60
|
+
readonly calendar: "calendar";
|
|
61
|
+
readonly chatBot: "chat-bot";
|
|
62
|
+
readonly checkCircle: "check-circle";
|
|
63
|
+
readonly checkCircleFilled: "check-circle-filled";
|
|
64
|
+
readonly circle: "circle";
|
|
65
|
+
readonly circleOutline: "circle-outline";
|
|
66
|
+
readonly clone: "clone";
|
|
67
|
+
readonly code: "code";
|
|
68
|
+
readonly codeCog: "code-cog";
|
|
69
|
+
readonly command: "command";
|
|
70
|
+
readonly connect: "connect";
|
|
71
|
+
readonly connection: "connection";
|
|
72
|
+
readonly conversation: "conversation";
|
|
73
|
+
readonly copy: "copy";
|
|
74
|
+
readonly cross: "cross";
|
|
75
|
+
readonly currentBalance: "current-balance";
|
|
76
|
+
readonly customIcon: "custom-icon";
|
|
77
|
+
readonly customModel: "custom-model";
|
|
78
|
+
readonly dashboard: "dashboard";
|
|
79
|
+
readonly dataClassifications: "data-classifications";
|
|
80
|
+
readonly dataLake: "data-lake";
|
|
81
|
+
readonly dataView: "data-view";
|
|
82
|
+
readonly dataWarehouse: "data-warehouse";
|
|
83
|
+
readonly database: "database";
|
|
84
|
+
readonly databaseMaintenance: "database-maintenance";
|
|
85
|
+
readonly dataset: "dataset";
|
|
86
|
+
readonly delete: "delete";
|
|
87
|
+
readonly deleteUser: "delete-user";
|
|
88
|
+
readonly disable: "disable";
|
|
89
|
+
readonly disableMFA: "disable-mfa";
|
|
90
|
+
readonly disconnect: "disconnect";
|
|
91
|
+
readonly domains: "domains";
|
|
92
|
+
readonly doubleCheck: "double-check";
|
|
93
|
+
readonly downArrow: "down-arrow";
|
|
94
|
+
readonly download: "download";
|
|
95
|
+
readonly drag: "drag";
|
|
96
|
+
readonly edit: "edit";
|
|
97
|
+
readonly editLayout: "edit-layout";
|
|
98
|
+
readonly email: "email";
|
|
99
|
+
readonly entityRecognizer: "entity-recognizer";
|
|
100
|
+
readonly etl: "etl";
|
|
101
|
+
readonly etlLibrary: "etl-library";
|
|
102
|
+
readonly exclamationCircle: "exclamation-circle";
|
|
103
|
+
readonly execute: "execute";
|
|
104
|
+
readonly executeComplex: "execute-complex";
|
|
105
|
+
readonly executions: "executions";
|
|
106
|
+
readonly expand: "expand";
|
|
107
|
+
readonly expand2: "expand-2";
|
|
108
|
+
readonly externalLink: "external-link";
|
|
109
|
+
readonly extraResources: "extra-resources";
|
|
110
|
+
readonly favorite: "favourite";
|
|
111
|
+
readonly file: "file";
|
|
112
|
+
readonly fileCode: "file-code";
|
|
113
|
+
readonly fileDownload: "file-download";
|
|
114
|
+
readonly fileInfo: "file-info";
|
|
115
|
+
readonly fileLog: "file-log";
|
|
116
|
+
readonly fileSuccess: "file-success";
|
|
117
|
+
readonly fileEdit: "file-edit";
|
|
118
|
+
readonly fileSync: "file-sync";
|
|
119
|
+
readonly fileWarning: "file-warning";
|
|
120
|
+
readonly fileloadValidate: "fileload-validate";
|
|
121
|
+
readonly filter: "filter";
|
|
122
|
+
readonly filterFunnel: "filter-funnel";
|
|
123
|
+
readonly flag: "flag";
|
|
124
|
+
readonly flagFilled: "flag-filled";
|
|
125
|
+
readonly forecast: "forecast";
|
|
126
|
+
readonly forward: "forward";
|
|
127
|
+
readonly globe: "globe";
|
|
128
|
+
readonly gridView: "grid-view";
|
|
129
|
+
readonly grip: "grip";
|
|
130
|
+
readonly group: "group";
|
|
131
|
+
readonly healthImaging: "health-imaging";
|
|
132
|
+
readonly help: "help";
|
|
133
|
+
readonly hidePassword: "hide-password";
|
|
134
|
+
readonly highCost: "high-cost";
|
|
135
|
+
readonly history: "history";
|
|
136
|
+
readonly ibmDb2: "ibm-db2";
|
|
137
|
+
readonly info: "info";
|
|
138
|
+
readonly infoFilled: "info-filled";
|
|
139
|
+
readonly infraManagement: "infra-management";
|
|
140
|
+
readonly ingestion: "ingestion";
|
|
141
|
+
readonly insights: "insights";
|
|
142
|
+
readonly key: "key";
|
|
143
|
+
readonly language: "language";
|
|
144
|
+
readonly leftArrow: "left-arrow";
|
|
145
|
+
readonly licenseInfo: "license-info";
|
|
146
|
+
readonly lineage: "lineage";
|
|
147
|
+
readonly link: "link";
|
|
148
|
+
readonly listView: "list-view";
|
|
149
|
+
readonly lock: "lock";
|
|
150
|
+
readonly mailServer: "mail-server";
|
|
151
|
+
readonly management: "management";
|
|
152
|
+
readonly managementRole: "management-role";
|
|
153
|
+
readonly media: "media";
|
|
154
|
+
readonly menu: "menu";
|
|
155
|
+
readonly metadata: "metadata";
|
|
156
|
+
readonly minus: "minus";
|
|
157
|
+
readonly minusCircle: "minus-circle";
|
|
158
|
+
readonly mlModel: "ml-model";
|
|
159
|
+
readonly monthlyUsagePattern: "monthly-usage-pattern";
|
|
160
|
+
readonly more: "more";
|
|
161
|
+
readonly msg: "msg";
|
|
162
|
+
readonly mysql: "mysql";
|
|
163
|
+
readonly notebook: "notebook";
|
|
164
|
+
readonly notebookConfig: "notebook-config";
|
|
165
|
+
readonly notification: "notification";
|
|
166
|
+
readonly notificationSettings: "notification-settings";
|
|
167
|
+
readonly omicsAnalytics: "omics-analytics";
|
|
168
|
+
readonly omicsStorage: "omics-storage";
|
|
169
|
+
readonly omicsWorkflows: "omics-workflows";
|
|
170
|
+
readonly oracle: "oracle";
|
|
171
|
+
readonly overview: "overview";
|
|
172
|
+
readonly parametersStore: "parameters-store";
|
|
173
|
+
readonly password: "password";
|
|
174
|
+
readonly pause: "pause";
|
|
175
|
+
readonly payload: "payload";
|
|
176
|
+
readonly pencil: "pencil";
|
|
177
|
+
readonly postgres: "postgres";
|
|
178
|
+
readonly profile: "profile";
|
|
179
|
+
readonly qrCode: "qr-code";
|
|
180
|
+
readonly queryEngine: "query-engine";
|
|
181
|
+
readonly removeUser: "remove-user";
|
|
182
|
+
readonly repair: "repair";
|
|
183
|
+
readonly restart: "restart";
|
|
184
|
+
readonly rightArrow: "right-arrow";
|
|
185
|
+
readonly runs: "runs";
|
|
186
|
+
readonly save: "save";
|
|
187
|
+
readonly scheduled: "scheduled";
|
|
188
|
+
readonly scheduledDelete: "scheduled-delete";
|
|
189
|
+
readonly search: "search";
|
|
190
|
+
readonly searchDatasets: "search-datasets";
|
|
191
|
+
readonly searchEngine: "search-engine-core";
|
|
192
|
+
readonly secure: "secure";
|
|
193
|
+
readonly send: "send";
|
|
194
|
+
readonly server: "server";
|
|
195
|
+
readonly settings: "settings";
|
|
196
|
+
readonly share: "share";
|
|
197
|
+
readonly shield: "shield";
|
|
198
|
+
readonly showPassword: "show-password";
|
|
199
|
+
readonly signature: "signature";
|
|
200
|
+
readonly signOut: "sign-out";
|
|
201
|
+
readonly slideLeft: "slide-left";
|
|
202
|
+
readonly slideRight: "slide-right";
|
|
203
|
+
readonly smtp: "smtp";
|
|
204
|
+
readonly sort: "sort";
|
|
205
|
+
readonly sortAsc: "sort-ascending";
|
|
206
|
+
readonly sortDesc: "sort-descending";
|
|
207
|
+
readonly sparkles: "sparkles";
|
|
208
|
+
readonly spinner: "spinner";
|
|
209
|
+
readonly sqlServer: "sql-server";
|
|
210
|
+
readonly statistic: "statistic";
|
|
211
|
+
readonly stream: "stream";
|
|
212
|
+
readonly switchRole: "switch-role";
|
|
213
|
+
readonly sync: "sync";
|
|
214
|
+
readonly table: "table";
|
|
215
|
+
readonly tableLayout: "table-layout";
|
|
216
|
+
readonly tablePivot: "table-pivot";
|
|
217
|
+
readonly tag: "tag";
|
|
218
|
+
readonly tags: "tags";
|
|
219
|
+
readonly tagsAdd: "tags-add";
|
|
220
|
+
readonly tagsRemove: "tags-remove";
|
|
221
|
+
readonly task: "task";
|
|
222
|
+
readonly tenant: "tenant";
|
|
223
|
+
readonly terminal: "terminal";
|
|
224
|
+
readonly time: "time";
|
|
225
|
+
readonly timesCircle: "times-circle";
|
|
226
|
+
readonly timesCircleFilled: "times-circle-filled";
|
|
227
|
+
readonly tree: "tree";
|
|
228
|
+
readonly upArrow: "up-arrow";
|
|
229
|
+
readonly upload: "upload";
|
|
230
|
+
readonly usageByService: "usage-by-service";
|
|
231
|
+
readonly user: "user";
|
|
232
|
+
readonly userAgreements: "user-agreements";
|
|
233
|
+
readonly vMenu: "v-menu";
|
|
234
|
+
readonly video: "video";
|
|
235
|
+
readonly warning: "warning";
|
|
236
|
+
readonly widgetGroup: "widget-group";
|
|
237
|
+
readonly workflow: "workflow";
|
|
238
|
+
readonly zoomIn: "zoom-in";
|
|
239
|
+
readonly zoomOut: "zoom-out";
|
|
240
|
+
readonly leftArrowLong: "left-arrow-long";
|
|
241
|
+
readonly rightArrowLong: "right-arrow-long";
|
|
242
|
+
};
|
|
243
|
+
export type IconType = typeof iconList[keyof typeof iconList];
|
|
244
|
+
export declare const icons: {
|
|
245
|
+
[key in IconType]: IIconDetails;
|
|
246
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType } from "../adpIcon";
|
|
3
|
+
type IBadgeSize = "sm" | "md" | "lg";
|
|
4
|
+
export interface IBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Size of the badge
|
|
7
|
+
* @default md
|
|
8
|
+
*/
|
|
9
|
+
size?: IBadgeSize;
|
|
10
|
+
/**
|
|
11
|
+
* Variants for the badge
|
|
12
|
+
* @default filled
|
|
13
|
+
*/
|
|
14
|
+
variant?: "filled" | "outline" | "text";
|
|
15
|
+
/**
|
|
16
|
+
* Color of the Badge to be rendered
|
|
17
|
+
* @default primary
|
|
18
|
+
*/
|
|
19
|
+
color?: "primary" | "secondary" | "success" | "warning" | "error";
|
|
20
|
+
/**
|
|
21
|
+
* Icon for the Badge
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconType;
|
|
24
|
+
/**
|
|
25
|
+
* Placement of the icon
|
|
26
|
+
*/
|
|
27
|
+
iconPlacement?: "start" | "end";
|
|
28
|
+
/**
|
|
29
|
+
* Icon click handler
|
|
30
|
+
*/
|
|
31
|
+
onIconClick?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Accepts children of ReactNode type
|
|
34
|
+
*/
|
|
35
|
+
label?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Pass space separated class names to override the Badge styling
|
|
38
|
+
*/
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const Badge: ({ size, variant, color, label, icon, iconPlacement, className, onIconClick, ...restProps }: IBadgeProps) => React.ReactElement | null;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
export interface BreadcrumbItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* Location href for the breadcrumbs item anchor element
|
|
5
|
+
*/
|
|
6
|
+
href?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Target property for the breadcrumbs item anchor element.
|
|
9
|
+
*/
|
|
10
|
+
target?: "_blank" | "_self";
|
|
11
|
+
/**
|
|
12
|
+
* When set to true the user can pass any custom link component as children instead of using the default <a> tag.
|
|
13
|
+
*/
|
|
14
|
+
customLink?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Make the current breadcrumbs item as active
|
|
17
|
+
*/
|
|
18
|
+
active?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Accepts space separated className names to override the styles
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Accepts React.ReactNode as children
|
|
25
|
+
*/
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export declare const BreadcrumbItem: ({ href, active, target, customLink, className, children }: BreadcrumbItemProps) => ReactElement | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { BreadcrumbItemProps } from "./breadcrumbItem";
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Accepts space-separated className names to override the styles
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The maximum number of items to display in the breadcrumbs
|
|
10
|
+
* @default 10
|
|
11
|
+
* @range 2 - maxItems
|
|
12
|
+
*/
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Accepts Breadcrumbs.Item[]
|
|
16
|
+
*/
|
|
17
|
+
children?: ReactElement<BreadcrumbItemProps> | Array<ReactElement<BreadcrumbItemProps>>;
|
|
18
|
+
/**
|
|
19
|
+
* Determines the separator type: "arrow" for ">", "dot" for "."
|
|
20
|
+
* @default "arrow"
|
|
21
|
+
*/
|
|
22
|
+
separatorType?: "arrow" | "dot";
|
|
23
|
+
}
|
|
24
|
+
export declare const Breadcrumbs: {
|
|
25
|
+
({ maxItems, className, children, separatorType }: Props): ReactElement | null;
|
|
26
|
+
Item: ({ href, active, target, customLink, className, children }: BreadcrumbItemProps) => ReactElement | null;
|
|
27
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType } from "../adpIcon";
|
|
3
|
+
export declare enum ButtonSizes {
|
|
4
|
+
XS = "xs",
|
|
5
|
+
SM = "sm",
|
|
6
|
+
MD = "md",
|
|
7
|
+
LG = "lg",
|
|
8
|
+
XL = "xl"
|
|
9
|
+
}
|
|
10
|
+
export type ButtonSize = `${ButtonSizes}`;
|
|
11
|
+
export interface Props extends Omit<React.ComponentPropsWithoutRef<"button">, "css"> {
|
|
12
|
+
/**
|
|
13
|
+
* Size of the button.
|
|
14
|
+
* @default md
|
|
15
|
+
*/
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
/**
|
|
18
|
+
* Color of the button.
|
|
19
|
+
* @default primary
|
|
20
|
+
*/
|
|
21
|
+
color?: "primary" | "secondary" | "success" | "warning" | "error";
|
|
22
|
+
/**
|
|
23
|
+
* Variant of the button.
|
|
24
|
+
* @default filled
|
|
25
|
+
*/
|
|
26
|
+
variant?: "filled" | "outline" | "shade" | "text";
|
|
27
|
+
/**
|
|
28
|
+
* Optional icon.
|
|
29
|
+
*/
|
|
30
|
+
icon?: IconType;
|
|
31
|
+
/**
|
|
32
|
+
* Placement of the icon
|
|
33
|
+
*/
|
|
34
|
+
iconPlacement?: "start" | "end";
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Shows loading animation instead of the button content
|
|
38
|
+
*/
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Type of the button
|
|
42
|
+
*/
|
|
43
|
+
type?: "button" | "submit" | "reset";
|
|
44
|
+
}
|
|
45
|
+
export declare const ButtonSizeToSpinnerMap: Record<ButtonSize, "xxs" | "xs" | "sm" | "md" | "lg" | "xl">;
|
|
46
|
+
export declare const Button: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
export interface Props {
|
|
3
|
+
/**
|
|
4
|
+
* Pass space separated class names to override the Card styling
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Accepts any ReactNode as children to be rendered inside the Card
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Card: ({ className, children }: Props) => ReactElement;
|
|
13
|
+
export default Card;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { RefObject } from "react";
|
|
2
|
+
export interface CheckboxProps extends Omit<React.HTMLProps<HTMLInputElement>, "label" | "size"> {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Size of the Checkbox
|
|
6
|
+
* @default md
|
|
7
|
+
*/
|
|
8
|
+
size?: "sm" | "md" | "lg";
|
|
9
|
+
/**
|
|
10
|
+
* Variant of the Checkbox
|
|
11
|
+
* @default square
|
|
12
|
+
*/
|
|
13
|
+
variant?: "square" | "circle";
|
|
14
|
+
/**
|
|
15
|
+
* Pass a ref to the inner input element
|
|
16
|
+
*/
|
|
17
|
+
ref?: RefObject<HTMLInputElement>;
|
|
18
|
+
}
|
|
19
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React, { ReactElement, ReactNode } from "react";
|
|
2
|
+
export declare enum CheckboxGroupSizes {
|
|
3
|
+
SM = "sm",
|
|
4
|
+
MD = "md",
|
|
5
|
+
LG = "lg"
|
|
6
|
+
}
|
|
7
|
+
export type CheckboxGroupSize = `${CheckboxGroupSizes}`;
|
|
8
|
+
export interface CheckboxOptionProps extends Omit<React.HTMLProps<HTMLInputElement>, "label" | "size"> {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
12
|
+
/**
|
|
13
|
+
* Size of the Checkbox group.
|
|
14
|
+
* @default md
|
|
15
|
+
*/
|
|
16
|
+
size?: CheckboxGroupSize;
|
|
17
|
+
/**
|
|
18
|
+
* Class name.
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Pass boolean value to disable the component.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Select values.
|
|
28
|
+
*/
|
|
29
|
+
selectedValues?: unknown[];
|
|
30
|
+
/**
|
|
31
|
+
* An array of checkbox prop type.
|
|
32
|
+
*/
|
|
33
|
+
options?: CheckboxOptionProps[];
|
|
34
|
+
/**
|
|
35
|
+
* Callback function that is called when the checkbox group selection changes.
|
|
36
|
+
* An array of selected values is passed as an argument to the function.
|
|
37
|
+
*/
|
|
38
|
+
onChange?: (arg: unknown[]) => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const CheckboxGroup: ({ size, options, onChange, className, selectedValues, disabled }: Props) => ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DatePickerProps } from "react-datepicker";
|
|
2
|
+
import { Props as TextFieldProps } from "../textField";
|
|
3
|
+
export type Props = (DatePickerProps & {
|
|
4
|
+
inline?: false;
|
|
5
|
+
textFieldProps?: Omit<TextFieldProps, "ref" | "onBlur" | "onFocus" | "disabled">;
|
|
6
|
+
}) | (DatePickerProps & {
|
|
7
|
+
inline?: true;
|
|
8
|
+
textFieldProps?: never;
|
|
9
|
+
});
|
|
10
|
+
export declare function DatePicker({ inline, selected, showTimeSelect, textFieldProps, ...restProps }: Props): JSX.Element | null;
|