@wavv/ui 1.9.3 → 1.9.5-beta.1
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/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/index.d.ts +3 -0
- package/build/cjs/types/theme/colorsIndex.d.ts +3 -0
- package/build/cjs/types/theme/darkScale.d.ts +22 -0
- package/build/cjs/types/theme/lightScale.d.ts +22 -0
- package/build/colors.ts +150 -0
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/index.d.ts +3 -0
- package/build/esm/types/theme/colorsIndex.d.ts +3 -0
- package/build/esm/types/theme/darkScale.d.ts +22 -0
- package/build/esm/types/theme/lightScale.d.ts +22 -0
- package/build/index.d.ts +45 -1
- package/build/types/assets/icons/ActivityHistory.d.ts +3 -0
- package/build/types/assets/icons/Add.d.ts +3 -0
- package/build/types/assets/icons/AddCircle.d.ts +3 -0
- package/build/types/assets/icons/AddCircleOutline.d.ts +3 -0
- package/build/types/assets/icons/AddPerson.d.ts +3 -0
- package/build/types/assets/icons/ArrowDown.d.ts +3 -0
- package/build/types/assets/icons/ArrowLeft.d.ts +3 -0
- package/build/types/assets/icons/ArrowRight.d.ts +3 -0
- package/build/types/assets/icons/ArrowUp.d.ts +3 -0
- package/build/types/assets/icons/Attachment.d.ts +3 -0
- package/build/types/assets/icons/Calendar.d.ts +3 -0
- package/build/types/assets/icons/Camera.d.ts +3 -0
- package/build/types/assets/icons/Card.d.ts +3 -0
- package/build/types/assets/icons/CaretDown.d.ts +3 -0
- package/build/types/assets/icons/CaretUp.d.ts +3 -0
- package/build/types/assets/icons/Check.d.ts +3 -0
- package/build/types/assets/icons/CheckBadge.d.ts +3 -0
- package/build/types/assets/icons/CheckCircle.d.ts +3 -0
- package/build/types/assets/icons/CheckCircleOutline.d.ts +3 -0
- package/build/types/assets/icons/Checkbox.d.ts +3 -0
- package/build/types/assets/icons/CheckboxOff.d.ts +3 -0
- package/build/types/assets/icons/CheckboxPartial.d.ts +3 -0
- package/build/types/assets/icons/ChevronDown.d.ts +3 -0
- package/build/types/assets/icons/ChevronLeft.d.ts +3 -0
- package/build/types/assets/icons/ChevronRight.d.ts +3 -0
- package/build/types/assets/icons/ChevronUp.d.ts +3 -0
- package/build/types/assets/icons/Clapperboard.d.ts +3 -0
- package/build/types/assets/icons/ClapperboardOpen.d.ts +3 -0
- package/build/types/assets/icons/Close.d.ts +3 -0
- package/build/types/assets/icons/CloseCircle.d.ts +3 -0
- package/build/types/assets/icons/CloseCircleOutline.d.ts +3 -0
- package/build/types/assets/icons/Copy.d.ts +3 -0
- package/build/types/assets/icons/Devices.d.ts +3 -0
- package/build/types/assets/icons/Dialpad.d.ts +3 -0
- package/build/types/assets/icons/DoubleArrowLeft.d.ts +3 -0
- package/build/types/assets/icons/DoubleArrowRight.d.ts +3 -0
- package/build/types/assets/icons/Download.d.ts +3 -0
- package/build/types/assets/icons/Drag.d.ts +3 -0
- package/build/types/assets/icons/Edit.d.ts +3 -0
- package/build/types/assets/icons/Emoji.d.ts +3 -0
- package/build/types/assets/icons/EyeOff.d.ts +3 -0
- package/build/types/assets/icons/EyeOn.d.ts +3 -0
- package/build/types/assets/icons/Facebook.d.ts +3 -0
- package/build/types/assets/icons/Filter.d.ts +3 -0
- package/build/types/assets/icons/Flask.d.ts +3 -0
- package/build/types/assets/icons/Group.d.ts +3 -0
- package/build/types/assets/icons/Heart.d.ts +3 -0
- package/build/types/assets/icons/HeartOutline.d.ts +3 -0
- package/build/types/assets/icons/Help.d.ts +3 -0
- package/build/types/assets/icons/Hourglass.d.ts +3 -0
- package/build/types/assets/icons/Info.d.ts +3 -0
- package/build/types/assets/icons/Instagram.d.ts +3 -0
- package/build/types/assets/icons/KebabMenu.d.ts +3 -0
- package/build/types/assets/icons/Link.d.ts +3 -0
- package/build/types/assets/icons/Linkedin.d.ts +3 -0
- package/build/types/assets/icons/Loading.d.ts +3 -0
- package/build/types/assets/icons/Logout.d.ts +3 -0
- package/build/types/assets/icons/Maximize.d.ts +3 -0
- package/build/types/assets/icons/Menu.d.ts +3 -0
- package/build/types/assets/icons/Merge.d.ts +3 -0
- package/build/types/assets/icons/MergeField.d.ts +3 -0
- package/build/types/assets/icons/Message.d.ts +3 -0
- package/build/types/assets/icons/Mic.d.ts +3 -0
- package/build/types/assets/icons/MicOff.d.ts +3 -0
- package/build/types/assets/icons/Minimize.d.ts +3 -0
- package/build/types/assets/icons/Mobile.d.ts +3 -0
- package/build/types/assets/icons/NotAllowed.d.ts +3 -0
- package/build/types/assets/icons/Open.d.ts +3 -0
- package/build/types/assets/icons/Pause.d.ts +3 -0
- package/build/types/assets/icons/PauseOutline.d.ts +3 -0
- package/build/types/assets/icons/Person.d.ts +3 -0
- package/build/types/assets/icons/Phone.d.ts +3 -0
- package/build/types/assets/icons/PhoneBlocked.d.ts +3 -0
- package/build/types/assets/icons/PhoneCallback.d.ts +3 -0
- package/build/types/assets/icons/PhoneEnd.d.ts +3 -0
- package/build/types/assets/icons/PhoneForward.d.ts +3 -0
- package/build/types/assets/icons/PhoneHistory.d.ts +3 -0
- package/build/types/assets/icons/PhoneHold.d.ts +3 -0
- package/build/types/assets/icons/PhoneTalk.d.ts +3 -0
- package/build/types/assets/icons/PhoneTransfer.d.ts +3 -0
- package/build/types/assets/icons/Play.d.ts +3 -0
- package/build/types/assets/icons/PlayOutline.d.ts +3 -0
- package/build/types/assets/icons/ProfileUser.d.ts +3 -0
- package/build/types/assets/icons/RadioButton.d.ts +3 -0
- package/build/types/assets/icons/RadioButtonOff.d.ts +3 -0
- package/build/types/assets/icons/Record.d.ts +3 -0
- package/build/types/assets/icons/Refresh.d.ts +3 -0
- package/build/types/assets/icons/Rocket.d.ts +3 -0
- package/build/types/assets/icons/Schedule.d.ts +3 -0
- package/build/types/assets/icons/ScheduleOutline.d.ts +3 -0
- package/build/types/assets/icons/Screenshot.d.ts +3 -0
- package/build/types/assets/icons/Search.d.ts +3 -0
- package/build/types/assets/icons/Settings.d.ts +3 -0
- package/build/types/assets/icons/Share.d.ts +3 -0
- package/build/types/assets/icons/ShieldCheck.d.ts +3 -0
- package/build/types/assets/icons/ShieldSlash.d.ts +3 -0
- package/build/types/assets/icons/Sort.d.ts +3 -0
- package/build/types/assets/icons/Spotify.d.ts +3 -0
- package/build/types/assets/icons/Star.d.ts +3 -0
- package/build/types/assets/icons/StarOutline.d.ts +3 -0
- package/build/types/assets/icons/Stop.d.ts +3 -0
- package/build/types/assets/icons/StopOutline.d.ts +3 -0
- package/build/types/assets/icons/Template.d.ts +3 -0
- package/build/types/assets/icons/ToggleOff.d.ts +3 -0
- package/build/types/assets/icons/ToggleOn.d.ts +3 -0
- package/build/types/assets/icons/Transfer.d.ts +3 -0
- package/build/types/assets/icons/TransferCancel.d.ts +3 -0
- package/build/types/assets/icons/Trash.d.ts +3 -0
- package/build/types/assets/icons/Twitter.d.ts +3 -0
- package/build/types/assets/icons/Upload.d.ts +3 -0
- package/build/types/assets/icons/Video.d.ts +3 -0
- package/build/types/assets/icons/Voicemail.d.ts +3 -0
- package/build/types/assets/icons/VolOn.d.ts +3 -0
- package/build/types/assets/icons/Warning.d.ts +3 -0
- package/build/types/assets/icons/WarningCircleOutline.d.ts +3 -0
- package/build/types/assets/icons/Youtube.d.ts +3 -0
- package/build/types/components/Accordion.d.ts +45 -0
- package/build/types/components/Audio.d.ts +29 -0
- package/build/types/components/BarChart.d.ts +25 -0
- package/build/types/components/Button/Button.d.ts +17 -0
- package/build/types/components/Button/ButtonLoader.d.ts +4 -0
- package/build/types/components/Button/ButtonTypes.d.ts +150 -0
- package/build/types/components/Button/Group.d.ts +18 -0
- package/build/types/components/Button/index.d.ts +2 -0
- package/build/types/components/Calendar.d.ts +14 -0
- package/build/types/components/ChartHelpers.d.ts +36 -0
- package/build/types/components/Checkbox.d.ts +20 -0
- package/build/types/components/Code/Code.d.ts +26 -0
- package/build/types/components/Code/Copy.d.ts +4 -0
- package/build/types/components/Code/Endpoint.d.ts +5 -0
- package/build/types/components/Code/index.d.ts +2 -0
- package/build/types/components/DocTable.d.ts +7 -0
- package/build/types/components/DraftEditor.d.ts +56 -0
- package/build/types/components/Dropdown/Dropdown.d.ts +85 -0
- package/build/types/components/Dropdown/DropdownUtils.d.ts +56 -0
- package/build/types/components/Dropdown/index.d.ts +4 -0
- package/build/types/components/DropdownMenu.d.ts +78 -0
- package/build/types/components/Form.d.ts +174 -0
- package/build/types/components/FormControl.d.ts +18 -0
- package/build/types/components/Grid.d.ts +55 -0
- package/build/types/components/Icon/Icon.d.ts +38 -0
- package/build/types/components/Icon/icons.d.ts +222 -0
- package/build/types/components/Icon/index.d.ts +2 -0
- package/build/types/components/ImageViewer.d.ts +20 -0
- package/build/types/components/InlineCode.d.ts +7 -0
- package/build/types/components/Input.d.ts +192 -0
- package/build/types/components/InputHelpers.d.ts +90 -0
- package/build/types/components/Label.d.ts +16 -0
- package/build/types/components/LineChart.d.ts +3 -0
- package/build/types/components/Menu.d.ts +53 -0
- package/build/types/components/Message.d.ts +25 -0
- package/build/types/components/MessageHr.d.ts +11 -0
- package/build/types/components/Modal.d.ts +66 -0
- package/build/types/components/MultiSelect.d.ts +46 -0
- package/build/types/components/Notification.d.ts +14 -0
- package/build/types/components/Options.d.ts +45 -0
- package/build/types/components/Pagination.d.ts +13 -0
- package/build/types/components/PieChart.d.ts +18 -0
- package/build/types/components/Progress/CirclePercent.d.ts +10 -0
- package/build/types/components/Progress/Progress.d.ts +23 -0
- package/build/types/components/Progress/index.d.ts +2 -0
- package/build/types/components/Radio.d.ts +16 -0
- package/build/types/components/Slider.d.ts +15 -0
- package/build/types/components/Spacer.d.ts +6 -0
- package/build/types/components/Spinner.d.ts +16 -0
- package/build/types/components/Table/Body.d.ts +8 -0
- package/build/types/components/Table/Column.d.ts +10 -0
- package/build/types/components/Table/Content.d.ts +19 -0
- package/build/types/components/Table/Header.d.ts +7 -0
- package/build/types/components/Table/HeaderCell.d.ts +14 -0
- package/build/types/components/Table/Row.d.ts +3 -0
- package/build/types/components/Table/Table.d.ts +28 -0
- package/build/types/components/Table/context.d.ts +4 -0
- package/build/types/components/Table/index.d.ts +2 -0
- package/build/types/components/Table/types.d.ts +43 -0
- package/build/types/components/Table/utils.d.ts +4 -0
- package/build/types/components/Tabs.d.ts +31 -0
- package/build/types/components/Toggle.d.ts +18 -0
- package/build/types/components/Tooltip.d.ts +50 -0
- package/build/types/components/TransferList.d.ts +47 -0
- package/build/types/components/draftUtils.d.ts +49 -0
- package/build/types/components/helpers/getIcon.d.ts +8 -0
- package/build/types/components/helpers/getPopPosition.d.ts +6 -0
- package/build/types/components/helpers/isPropAllowed.d.ts +2 -0
- package/build/types/components/helpers/styledProps.d.ts +26 -0
- package/build/types/components/types.d.ts +80 -0
- package/build/types/global-styles/ResetStyles.d.ts +9 -0
- package/build/types/global-styles/ScrollbarStyles.d.ts +2 -0
- package/build/types/global-styles/ToastStyles.d.ts +2 -0
- package/build/types/global-styles/index.d.ts +3 -0
- package/build/types/hooks/index.d.ts +7 -0
- package/build/types/hooks/useConfirm.d.ts +13 -0
- package/build/types/hooks/useElementObserver.d.ts +8 -0
- package/build/types/hooks/useEventListener.d.ts +3 -0
- package/build/types/hooks/useOnClickOutside.d.ts +3 -0
- package/build/types/hooks/usePrevious.d.ts +2 -0
- package/build/types/hooks/useSelect.d.ts +20 -0
- package/build/types/hooks/useSelectAll.d.ts +12 -0
- package/build/types/hooks/useWindowSize.d.ts +5 -0
- package/build/types/index.d.ts +64 -0
- package/build/types/theme/ThemeTypes.d.ts +294 -0
- package/build/types/theme/colors.d.ts +201 -0
- package/build/types/theme/colorsIndex.d.ts +3 -0
- package/build/types/theme/common/button.d.ts +24 -0
- package/build/types/theme/common/common.d.ts +103 -0
- package/build/types/theme/common/index.d.ts +3 -0
- package/build/types/theme/dark.d.ts +3 -0
- package/build/types/theme/darkScale.d.ts +22 -0
- package/build/types/theme/index.d.ts +10 -0
- package/build/types/theme/light.d.ts +3 -0
- package/build/types/theme/lightScale.d.ts +22 -0
- package/build/types/utils/chunk.d.ts +2 -0
- package/build/types/utils/copyToClipboard.d.ts +2 -0
- package/build/types/utils/formatDate.d.ts +7 -0
- package/build/types/utils/index.d.ts +5 -0
- package/build/types/utils/numberWithCommas.d.ts +2 -0
- package/build/types/utils/range.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Margin } from './types';
|
|
3
|
+
type TriggerProp = {
|
|
4
|
+
reversed?: boolean;
|
|
5
|
+
spaced?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type AccordionProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** The id of the Item that should be open by default */
|
|
10
|
+
defaultItem?: string;
|
|
11
|
+
/** Prevents all Items from being closed at the same time */
|
|
12
|
+
preventCollapse?: boolean;
|
|
13
|
+
/** Config options to customize the Accordion's trigger elements */
|
|
14
|
+
triggers?: TriggerProp;
|
|
15
|
+
/** Adds space between Items as well as rounded styles */
|
|
16
|
+
spaced?: boolean;
|
|
17
|
+
/** The background color of Items */
|
|
18
|
+
background?: string;
|
|
19
|
+
/** The background color of Item drawers */
|
|
20
|
+
innerBackground?: string;
|
|
21
|
+
/** The width of the Accordion */
|
|
22
|
+
width?: number | string;
|
|
23
|
+
/** The maxHeight of the Accordion. Drawers will scroll to accommodate */
|
|
24
|
+
maxHeight?: number | string;
|
|
25
|
+
/** The height of the Accordion. Drawers will scroll to accommodate */
|
|
26
|
+
height?: number | string;
|
|
27
|
+
} & Margin;
|
|
28
|
+
declare const Accordion: {
|
|
29
|
+
({ children, defaultItem, preventCollapse, triggers, spaced, background, innerBackground, width, maxHeight, height, ...rest }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
Item({ children, id, text, content, trigger, spaced, background, innerBackground }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
type ItemProps = {
|
|
33
|
+
/** The id of the Item */
|
|
34
|
+
id: string;
|
|
35
|
+
/** The text to display on the Item */
|
|
36
|
+
text?: string;
|
|
37
|
+
/** Any other UI that needs to be displayed alongside the trigger */
|
|
38
|
+
content?: ReactNode;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
trigger?: TriggerProp;
|
|
41
|
+
spaced?: boolean;
|
|
42
|
+
background?: string;
|
|
43
|
+
innerBackground?: string;
|
|
44
|
+
};
|
|
45
|
+
export default Accordion;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ChangeEvent, HTMLProps } from 'react';
|
|
2
|
+
import { Margin, Width, As, AudioRef } from './types';
|
|
3
|
+
type AudioProps = {
|
|
4
|
+
/** The filepath of the audio source */
|
|
5
|
+
src: string;
|
|
6
|
+
/** The title of the audio source to be displayed */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Sets the position of the display info in relation to the duration slider */
|
|
9
|
+
infoPosition?: 'top' | 'bottom';
|
|
10
|
+
/** Center aligns the slider and info elements with the button */
|
|
11
|
+
centerAlignContent?: boolean;
|
|
12
|
+
/** Hides the slider control while not playing */
|
|
13
|
+
hideSliderOnStop?: boolean;
|
|
14
|
+
/** Hides the time display while not playing */
|
|
15
|
+
hideTimeOnStop?: boolean;
|
|
16
|
+
/** Reduces the size of the Audio play button */
|
|
17
|
+
small?: boolean;
|
|
18
|
+
/** Hides the duration slider */
|
|
19
|
+
collapsed?: boolean;
|
|
20
|
+
/** Font size of the audio title */
|
|
21
|
+
fontSizeTitle?: number | string;
|
|
22
|
+
/** Font size of the audio time */
|
|
23
|
+
fontSizeTime?: number | string;
|
|
24
|
+
onPlay?: (event: ChangeEvent<HTMLAudioElement>) => void;
|
|
25
|
+
onPause?: (event: ChangeEvent<HTMLAudioElement>) => void;
|
|
26
|
+
onStop?: (event: ChangeEvent<HTMLAudioElement>) => void;
|
|
27
|
+
} & Margin & Width & As & HTMLProps<HTMLDivElement>;
|
|
28
|
+
declare const Audio: import("react").ForwardRefExoticComponent<Omit<AudioProps, "ref"> & import("react").RefAttributes<AudioRef>>;
|
|
29
|
+
export default Audio;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChartProps } from './ChartHelpers';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** Stacks multiple data points within a single bar */
|
|
4
|
+
stacked?: boolean;
|
|
5
|
+
/** Orients the bars outward from the Y axis */
|
|
6
|
+
vertical?: boolean;
|
|
7
|
+
/** The gap between two bars in the same category */
|
|
8
|
+
barGap?: number;
|
|
9
|
+
/** The gap between two bar categories */
|
|
10
|
+
barCategoryGap?: number;
|
|
11
|
+
/** The thickness of each bar */
|
|
12
|
+
barSize?: number;
|
|
13
|
+
/** The maximum thickness of each bar */
|
|
14
|
+
maxBarSize?: number;
|
|
15
|
+
/** Removes the labels from the Y axis */
|
|
16
|
+
hideYLabels?: boolean;
|
|
17
|
+
/** Removes the labels from the X axis */
|
|
18
|
+
hideXLabels?: boolean;
|
|
19
|
+
/** The height of the X axis */
|
|
20
|
+
xAxisHeight?: number;
|
|
21
|
+
/** The width of the Y axis */
|
|
22
|
+
yAxisWidth?: number;
|
|
23
|
+
} & ChartProps;
|
|
24
|
+
declare const BarChart: ({ data, legend, keys, stacked, barGap, barCategoryGap, barSize, maxBarSize, vertical, hideYLabels, hideXLabels, xAxisHeight, yAxisWidth, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default BarChart;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Margin } from '../types';
|
|
3
|
+
import { BasicButtonProps, ButtonComponentProps } from './ButtonTypes';
|
|
4
|
+
/** Button Component */
|
|
5
|
+
declare const Button: {
|
|
6
|
+
(props: ButtonComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
Group: ({ children, disabled, outline, size, small, large, secondary, negative, positive, caution, collapse, ...props }: {
|
|
8
|
+
children: (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").TooltipProps, string | import("react").JSXElementConstructor<any>>) | (import("react").ReactElement<BasicButtonProps | ButtonComponentProps, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<import("../Tooltip").TooltipProps, string | import("react").JSXElementConstructor<any>>)[];
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
size?: "small" | "large" | "medium" | undefined;
|
|
11
|
+
small?: boolean | undefined;
|
|
12
|
+
large?: boolean | undefined;
|
|
13
|
+
outline?: boolean | undefined;
|
|
14
|
+
collapse?: boolean | undefined;
|
|
15
|
+
} & import("./ButtonTypes").ButtonStyles & Margin & import("../types").Width) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
};
|
|
17
|
+
export default Button;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { HTMLProps, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { OptionItem } from '../Dropdown/DropdownUtils';
|
|
3
|
+
import { IconNames } from '../Icon/icons';
|
|
4
|
+
import { Margin, As } from '../types';
|
|
5
|
+
type ButtonAttributes = Omit<HTMLProps<HTMLButtonElement>, 'as' | 'type' | 'size'> & {
|
|
6
|
+
type?: 'button' | 'reset' | 'submit';
|
|
7
|
+
} & As;
|
|
8
|
+
type ButtonBaseProps = {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
joined?: 'left' | 'right' | 'middle';
|
|
11
|
+
hideJoinedBorder?: boolean;
|
|
12
|
+
joinedPadding?: number;
|
|
13
|
+
preventPointerEvents?: boolean;
|
|
14
|
+
/** Gives the button a semi-transparent background with a solid border */
|
|
15
|
+
outline?: boolean;
|
|
16
|
+
/** Prevents the button from being clicked */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Adds an icon for the specific icon name to the button */
|
|
19
|
+
icon?: IconNames;
|
|
20
|
+
/** Positions the icon to the left or right of the button text */
|
|
21
|
+
iconPosition?: 'left' | 'right';
|
|
22
|
+
/** Sets the icon's color independently of the button's color */
|
|
23
|
+
iconColor?: string;
|
|
24
|
+
/** Defines the size of the button */
|
|
25
|
+
size?: 'small' | 'medium' | 'large';
|
|
26
|
+
/** Reduces the size of the button */
|
|
27
|
+
small?: boolean;
|
|
28
|
+
/** Increases the size of the button */
|
|
29
|
+
large?: boolean;
|
|
30
|
+
/** Adds a loading icon over the top of the button contents */
|
|
31
|
+
isLoading?: boolean;
|
|
32
|
+
/** Removes the text on a button if the button has an icon */
|
|
33
|
+
collapse?: boolean;
|
|
34
|
+
/** CSS Animation shorthand property */
|
|
35
|
+
animation?: string;
|
|
36
|
+
/** CSS Animation shorthand property for the icon */
|
|
37
|
+
iconAnimation?: string;
|
|
38
|
+
/** The function to be called when the button is clicked */
|
|
39
|
+
onClick?: (event: MouseEvent) => void;
|
|
40
|
+
/** Sets the text backgroundColor of the button */
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
/** Sets the text color of the button */
|
|
43
|
+
color?: string;
|
|
44
|
+
} & ButtonAttributes;
|
|
45
|
+
type ButtonStyleProps = {
|
|
46
|
+
/** Displays a button with secondary colors */
|
|
47
|
+
secondary?: boolean;
|
|
48
|
+
/** Displays a red button */
|
|
49
|
+
negative?: boolean;
|
|
50
|
+
/** Displays a green button */
|
|
51
|
+
positive?: boolean;
|
|
52
|
+
/** Displays a yellow button */
|
|
53
|
+
caution?: boolean;
|
|
54
|
+
/** Displays a button with a background on hover or active */
|
|
55
|
+
subtle?: boolean;
|
|
56
|
+
/** Displays a button with no background or padding */
|
|
57
|
+
link?: boolean;
|
|
58
|
+
/** Displays a fully rounded button with a fixed width and height */
|
|
59
|
+
circle?: boolean;
|
|
60
|
+
};
|
|
61
|
+
type Primary = {
|
|
62
|
+
/** Displays a button with secondary colors */
|
|
63
|
+
secondary?: never;
|
|
64
|
+
/** Displays a red button */
|
|
65
|
+
negative?: never;
|
|
66
|
+
/** Displays a green button */
|
|
67
|
+
positive?: never;
|
|
68
|
+
/** Displays a yellow button */
|
|
69
|
+
caution?: never;
|
|
70
|
+
};
|
|
71
|
+
type Secondary = {
|
|
72
|
+
secondary?: boolean;
|
|
73
|
+
negative?: never;
|
|
74
|
+
positive?: never;
|
|
75
|
+
caution?: never;
|
|
76
|
+
};
|
|
77
|
+
type Negative = {
|
|
78
|
+
negative?: boolean;
|
|
79
|
+
secondary?: never;
|
|
80
|
+
positive?: never;
|
|
81
|
+
caution?: never;
|
|
82
|
+
};
|
|
83
|
+
type Positive = {
|
|
84
|
+
positive?: boolean;
|
|
85
|
+
negative?: never;
|
|
86
|
+
caution?: never;
|
|
87
|
+
secondary?: never;
|
|
88
|
+
};
|
|
89
|
+
type Caution = {
|
|
90
|
+
caution?: boolean;
|
|
91
|
+
positive?: never;
|
|
92
|
+
negative?: never;
|
|
93
|
+
secondary?: never;
|
|
94
|
+
};
|
|
95
|
+
export type ButtonStyles = Primary | Secondary | Negative | Positive | Caution;
|
|
96
|
+
export type BasicButtonProps = ButtonBaseProps & ButtonStyleProps;
|
|
97
|
+
export type DropdownProps = {
|
|
98
|
+
dropdown?: false;
|
|
99
|
+
options?: never;
|
|
100
|
+
direction?: never;
|
|
101
|
+
afterShow?: never;
|
|
102
|
+
afterHide?: never;
|
|
103
|
+
zIndex?: never;
|
|
104
|
+
disableScrollLock?: never;
|
|
105
|
+
hideDivider?: never;
|
|
106
|
+
gap?: never;
|
|
107
|
+
buttonDisabled?: never;
|
|
108
|
+
optionsDisabled?: never;
|
|
109
|
+
} | {
|
|
110
|
+
/** Adds a dropdown button to the main button, allowing for multiple button options */
|
|
111
|
+
dropdown: true;
|
|
112
|
+
/** The dropdown options array of { id: string; label: string; action: () => void; } */
|
|
113
|
+
options: OptionItem[];
|
|
114
|
+
/** The direction the options should open in relation to the button */
|
|
115
|
+
direction?: 'top' | 'bottom';
|
|
116
|
+
/** The function to be called when the options are opened */
|
|
117
|
+
afterShow?: () => void;
|
|
118
|
+
/** The function to be called when the options are closed */
|
|
119
|
+
afterHide?: () => void;
|
|
120
|
+
/** zIndex of the menu's portal container */
|
|
121
|
+
zIndex?: number;
|
|
122
|
+
/** Enables the page to scroll when the menu is open */
|
|
123
|
+
disableScrollLock?: boolean;
|
|
124
|
+
/** Hides the dividing border between the main button and the dropdown trigger button */
|
|
125
|
+
hideDivider?: boolean;
|
|
126
|
+
/** The padding on each side of the divider between the main button and the dropdown trigger button */
|
|
127
|
+
gap?: number;
|
|
128
|
+
/** Disable only the button side of the button dropdown */
|
|
129
|
+
buttonDisabled?: boolean;
|
|
130
|
+
/** Disable only the options side of the button dropdown */
|
|
131
|
+
optionsDisabled?: boolean;
|
|
132
|
+
};
|
|
133
|
+
export type ButtonDropdownProps = {
|
|
134
|
+
options: OptionItem[];
|
|
135
|
+
direction?: 'top' | 'bottom';
|
|
136
|
+
afterShow?: () => void;
|
|
137
|
+
afterHide?: () => void;
|
|
138
|
+
zIndex?: number;
|
|
139
|
+
disableScrollLock?: boolean;
|
|
140
|
+
hideDivider?: boolean;
|
|
141
|
+
gap?: number;
|
|
142
|
+
buttonDisabled?: boolean;
|
|
143
|
+
optionsDisabled?: boolean;
|
|
144
|
+
} & BasicButtonProps;
|
|
145
|
+
export type ButtonComponentProps = {
|
|
146
|
+
/** Sets the text of the button */
|
|
147
|
+
content?: string;
|
|
148
|
+
joined?: never;
|
|
149
|
+
} & BasicButtonProps & DropdownProps & Margin;
|
|
150
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { BasicButtonProps, ButtonComponentProps, ButtonStyles } from './ButtonTypes';
|
|
3
|
+
import { TooltipProps } from '../Tooltip';
|
|
4
|
+
import { Margin, Width } from '../types';
|
|
5
|
+
type ButtonChild = ReactElement<ButtonComponentProps | BasicButtonProps>;
|
|
6
|
+
type TooltipChild = ReactElement<TooltipProps>;
|
|
7
|
+
type GroupChild = ButtonChild | TooltipChild;
|
|
8
|
+
type GroupProps = {
|
|
9
|
+
children: GroupChild | GroupChild[];
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
small?: boolean;
|
|
13
|
+
large?: boolean;
|
|
14
|
+
outline?: boolean;
|
|
15
|
+
collapse?: boolean;
|
|
16
|
+
} & ButtonStyles & Margin & Width;
|
|
17
|
+
declare const Group: ({ children, disabled, outline, size, small, large, secondary, negative, positive, caution, collapse, ...props }: GroupProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
export default Group;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type CalendarProps = {
|
|
2
|
+
/** Optional date the initial selected calendar day should be set to. */
|
|
3
|
+
date?: Date;
|
|
4
|
+
/** The function to be called when a date is selected */
|
|
5
|
+
onChange: (date: Date) => void;
|
|
6
|
+
/** Prevents selection of dates in the past (relative to the set date or current date). */
|
|
7
|
+
preventPast?: boolean | Date;
|
|
8
|
+
/** Prevents selection of dates in the futurepast (relative to the set date or current date). */
|
|
9
|
+
preventFuture?: boolean | Date;
|
|
10
|
+
/** Removes the Calendar's boxShadow */
|
|
11
|
+
noShadow?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const Calendar: ({ date, onChange, preventPast, preventFuture, noShadow }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Calendar;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TooltipProps } from 'recharts';
|
|
3
|
+
import { Payload } from 'recharts/types/component/DefaultLegendContent';
|
|
4
|
+
import { Margin, MaxWidthHeight, WidthHeight } from './types';
|
|
5
|
+
type ChartData = {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
export type KeyData = {
|
|
9
|
+
key: string;
|
|
10
|
+
color: string;
|
|
11
|
+
hidden?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type ChartProps = {
|
|
14
|
+
/** The chart data array */
|
|
15
|
+
data: ChartData[];
|
|
16
|
+
/** Designates the chart colors corresponding to the chart's data properties */
|
|
17
|
+
keys: KeyData[];
|
|
18
|
+
/** Displays a data legend beneath the chart */
|
|
19
|
+
legend?: boolean;
|
|
20
|
+
/** Allows the chart to grow and shrink (default if no explicit width) */
|
|
21
|
+
responsive?: boolean;
|
|
22
|
+
} & Margin & WidthHeight & MaxWidthHeight;
|
|
23
|
+
export declare const ChartStyles: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const ChartContainer: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
responsive?: boolean | undefined;
|
|
29
|
+
} & Margin & import("./types").Width & import("./types").Height & import("./types").MaxWidth & import("./types").MaxHeight, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
|
+
export declare const TooltipContent: ({ active, payload, label }: TooltipProps<number, string>) => import("react/jsx-runtime").JSX.Element | null;
|
|
31
|
+
export declare const Tooltip: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const LegendContent: ({ payload, toggleData, }: {
|
|
33
|
+
payload?: Payload[] | undefined;
|
|
34
|
+
toggleData?: ((item: Payload) => void) | undefined;
|
|
35
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CheckboxAttributes } from './FormControl';
|
|
2
|
+
import { Margin, As } from './types';
|
|
3
|
+
type CheckboxProps = {
|
|
4
|
+
/** Id of the input element */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Places a label element beside the checkbox. The value will set the text of the label */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Sets the label on the left or right of the checkbox */
|
|
9
|
+
labelPosition?: 'left' | 'right';
|
|
10
|
+
/** Disables the checkbox */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Controls the checked property of the checkbox */
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
/** Sets the checkbox to an indeterminate state */
|
|
15
|
+
partial?: boolean;
|
|
16
|
+
/** The function called with the checkbox value after the checkbox is changed */
|
|
17
|
+
onChange: (val: boolean) => void;
|
|
18
|
+
} & Margin & As & CheckboxAttributes;
|
|
19
|
+
declare const Checkbox: ({ id, label, labelPosition, checked, partial, disabled, onChange, margin, marginTop, marginBottom, marginRight, marginLeft, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default Checkbox;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Margin } from '../types';
|
|
2
|
+
type RestLanguage = 'rest-get' | 'rest-post' | 'rest-put' | 'rest-delete' | 'rest-options';
|
|
3
|
+
type BaseLanguages = 'jsx' | 'tsx' | 'swift' | 'kotlin' | 'objectivec' | 'js-extras' | 'reason' | 'rust' | 'graphql' | 'yaml' | 'go' | 'cpp' | 'markdown';
|
|
4
|
+
type WithChildren = {
|
|
5
|
+
/** The string to be rendered in the code snippet */
|
|
6
|
+
children: string;
|
|
7
|
+
/** The alternative to passing the code snippet in as a child */
|
|
8
|
+
code?: never;
|
|
9
|
+
};
|
|
10
|
+
type WithCode = {
|
|
11
|
+
code: string;
|
|
12
|
+
children?: never;
|
|
13
|
+
};
|
|
14
|
+
type Children = WithChildren | WithCode;
|
|
15
|
+
type CodeProps = {
|
|
16
|
+
/** The metadata string passed in by MDX */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** The syntax language to be used for the code snippet */
|
|
19
|
+
lang?: BaseLanguages | RestLanguage | string;
|
|
20
|
+
/** The line numbers in the code snippet that should be highlighted */
|
|
21
|
+
lineHighlights?: string;
|
|
22
|
+
/** Hides the line numbers in the code snippet */
|
|
23
|
+
noNumbers?: boolean;
|
|
24
|
+
} & Children & Margin;
|
|
25
|
+
declare const Code: ({ children, code, className: metaData, lang: langProp, lineHighlights: lineHighlightsProp, noNumbers: noNumbersProp, margin, marginTop, marginBottom, marginRight, marginLeft, }: CodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export default Code;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeProp } from './types';
|
|
3
|
+
declare const Table: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & ThemeProp, import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
7
|
+
export default Table;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { KeyboardEvent, CSSProperties as CSS } from 'react';
|
|
2
|
+
import { EditorChangeType } from 'draft-js';
|
|
3
|
+
import { DraftEditorRef, InputFocusEvent, Margin, MergeField } from './types';
|
|
4
|
+
declare const DraftEditor: import("react").ForwardRefExoticComponent<{
|
|
5
|
+
/** Controlled text value of the editor */
|
|
6
|
+
value: string;
|
|
7
|
+
/** Function called after editor change with the text value and boolean indicating missing merge fields */
|
|
8
|
+
onChange?: ((text: string, hasMissing: boolean, reason: EditorChangeType | null) => void) | undefined;
|
|
9
|
+
/** Function called after the enter key is pressed */
|
|
10
|
+
onEnterKey?: ((e: KeyboardEvent) => void) | undefined;
|
|
11
|
+
/** Callback run after onFocus event */
|
|
12
|
+
onFocus?: ((event?: InputFocusEvent) => void) | undefined;
|
|
13
|
+
/** Callback run after onBlur event */
|
|
14
|
+
onBlur?: ((event?: InputFocusEvent) => void) | undefined;
|
|
15
|
+
/** Array of MergeFields ({ id: string, label: string, value?: string }) for the editor to use/parse */
|
|
16
|
+
mergeFields?: MergeField[] | undefined;
|
|
17
|
+
/** Placeholder text of editor when value is empty */
|
|
18
|
+
placeholder?: string | undefined;
|
|
19
|
+
/** Places a description message below the editor */
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
/** Sets the Editor's bottom border and description text to red */
|
|
22
|
+
invalid?: boolean | undefined;
|
|
23
|
+
/** Width of the editor */
|
|
24
|
+
width?: string | number | undefined;
|
|
25
|
+
/** Height of the editor */
|
|
26
|
+
height?: number | undefined;
|
|
27
|
+
/** Max Height of the editor. Editor contents will scroll after this height is reached */
|
|
28
|
+
maxHeight?: number | undefined;
|
|
29
|
+
/** Removes the border from the editor */
|
|
30
|
+
borderless?: boolean | undefined;
|
|
31
|
+
/** Removes the padding from the editor */
|
|
32
|
+
noPadding?: boolean | undefined;
|
|
33
|
+
/** Disables any editing capability of the editor */
|
|
34
|
+
readOnly?: boolean | undefined;
|
|
35
|
+
/** Displays the value of the merge field rather than the label */
|
|
36
|
+
displayMergedValues?: boolean | undefined;
|
|
37
|
+
/** Sets the text color of the editor */
|
|
38
|
+
color?: string | undefined;
|
|
39
|
+
/** Sets the overflow css value of the editor */
|
|
40
|
+
overflow?: CSS['overflow'];
|
|
41
|
+
/** Truncates the editor text to the number of lines specified and adds an ellipsis textOverflow */
|
|
42
|
+
clampLines?: number | undefined;
|
|
43
|
+
/** Places a label element above the input. The value will set the text of the label */
|
|
44
|
+
label?: string | undefined;
|
|
45
|
+
/** Disables the input */
|
|
46
|
+
disabled?: boolean | undefined;
|
|
47
|
+
/** Sets the input borderRadius */
|
|
48
|
+
borderRadius?: string | number | undefined;
|
|
49
|
+
/** Sets the input backgroundColor */
|
|
50
|
+
backgroundColor?: string | undefined;
|
|
51
|
+
/** Sets the editor fontSize */
|
|
52
|
+
fontSize?: string | number | undefined;
|
|
53
|
+
/** Removes the border, padding, and backgroundColor from the DraftEditor */
|
|
54
|
+
textOnly?: boolean | undefined;
|
|
55
|
+
} & Margin & import("react").RefAttributes<DraftEditorRef>>;
|
|
56
|
+
export default DraftEditor;
|