@uniformdev/design-system 13.0.1-alpha.132
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/LICENSE +2 -0
- package/dist/esm/index.js +772 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +772 -0
- package/package.json +44 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import * as _emotion_react from '@emotion/react';
|
|
4
|
+
import { SerializedStyles } from '@emotion/react';
|
|
5
|
+
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
6
|
+
import { ButtonProps as ButtonProps$1 } from 'reakit/Button';
|
|
7
|
+
import { IconBaseProps, IconType } from 'react-icons';
|
|
8
|
+
import { GroupBase } from 'react-select';
|
|
9
|
+
import { StateManagerProps } from 'react-select/dist/declarations/src/useStateManager';
|
|
10
|
+
import InternalSelect from 'react-select/dist/declarations/src/Select';
|
|
11
|
+
import { MenuHTMLProps, MenuProps as MenuProps$1, MenuStateReturn } from 'reakit/Menu';
|
|
12
|
+
import { MenuItemHTMLProps } from 'reakit';
|
|
13
|
+
|
|
14
|
+
declare type ThemeProps = {
|
|
15
|
+
disableReset?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const Theme: React__default.ElementType;
|
|
18
|
+
|
|
19
|
+
declare const labelText: _emotion_react.SerializedStyles;
|
|
20
|
+
declare const input: _emotion_react.SerializedStyles;
|
|
21
|
+
declare const inputError: _emotion_react.SerializedStyles;
|
|
22
|
+
declare const inputSelect: _emotion_react.SerializedStyles;
|
|
23
|
+
|
|
24
|
+
declare const scrollbarStyles: _emotion_react.SerializedStyles;
|
|
25
|
+
|
|
26
|
+
declare type UniformLogoProps = {
|
|
27
|
+
theme?: 'light' | 'dark';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Component that shows the Uniform badge
|
|
32
|
+
*
|
|
33
|
+
* @component
|
|
34
|
+
* @param {'light' | 'dark'} theme - sets a light or dark theme for the uniform badge
|
|
35
|
+
* @param {React.SVGAttributes<SVGElement>} props - sets react svg element attribute props
|
|
36
|
+
* @example <UniformBadge theme="dark" />
|
|
37
|
+
*/
|
|
38
|
+
declare const UniformBadge: ({ theme, ...props }: React__default.SVGAttributes<SVGElement> & UniformLogoProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Component that shows the Uniform logo
|
|
42
|
+
*
|
|
43
|
+
* @component
|
|
44
|
+
* @param {'light' | 'dark'} theme - sets a light or dark theme for the uniform logo
|
|
45
|
+
* @example <UniformLogo theme="light" />
|
|
46
|
+
*/
|
|
47
|
+
declare const UniformLogo: ({ theme }: UniformLogoProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
48
|
+
|
|
49
|
+
declare type ButtonThemeProps = 'primary' | 'secondary' | 'tertiary' | 'unimportant' | 'ghost';
|
|
50
|
+
declare type ButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
51
|
+
declare type ButtonProps = ButtonProps$1 & {
|
|
52
|
+
buttonType?: ButtonThemeProps;
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated size might no longer be used as we are trying to consolidate button designs
|
|
55
|
+
*/
|
|
56
|
+
size?: ButtonSizeProps;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated rounded is no longer used
|
|
59
|
+
*/
|
|
60
|
+
rounded?: boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Button component
|
|
64
|
+
*
|
|
65
|
+
* @component
|
|
66
|
+
* @param {string} buttonType - sets the theme of the button
|
|
67
|
+
* @param {BaseButtonProps} props - object of button props from reakit
|
|
68
|
+
* @param {React.ReactNode} children - react child elements
|
|
69
|
+
* @example <Button buttonType="secondary" size="md" onClick={() => alert('hello world')}>Click me</Button>
|
|
70
|
+
*/
|
|
71
|
+
declare const Button: React$1.FC<ButtonProps>;
|
|
72
|
+
|
|
73
|
+
declare const iconNames: readonly ["add-r", "add", "airplane", "alarm", "album", "align-bottom", "align-center", "align-left", "align-middle", "align-right", "align-top", "anchor", "apple-watch", "arrange-back", "arrange-front", "arrow-align-h", "arrow-align-v", "arrow-bottom-left-o", "arrow-bottom-left-r", "arrow-bottom-left", "arrow-bottom-right-o", "arrow-bottom-right-r", "arrow-bottom-right", "arrow-down-o", "arrow-down-r", "arrow-down", "arrow-left-o", "arrow-left-r", "arrow-left", "arrow-long-down-c", "arrow-long-down-e", "arrow-long-down-l", "arrow-long-down-r", "arrow-long-down", "arrow-long-left-c", "arrow-long-left-e", "arrow-long-left-l", "arrow-long-left-r", "arrow-long-left", "arrow-long-right-c", "arrow-long-right-e", "arrow-long-right-l", "arrow-long-right-r", "arrow-long-right", "arrow-long-up-c", "arrow-long-up-e", "arrow-long-up-l", "arrow-long-up-r", "arrow-long-up", "arrow-right-o", "arrow-right-r", "arrow-right", "arrow-top-left-o", "arrow-top-left-r", "arrow-top-left", "arrow-top-right-o", "arrow-top-right-r", "arrow-top-right", "arrow-up-o", "arrow-up-r", "arrow-up", "arrows-breake-h", "arrows-breake-v", "arrows-exchange-alt-v", "arrows-exchange-alt", "arrows-exchange-v", "arrows-exchange", "arrows-expand-down-left", "arrows-expand-down-right", "arrows-expand-left-alt", "arrows-expand-left", "arrows-expand-right-alt", "arrows-expand-right", "arrows-expand-up-left", "arrows-expand-up-right", "arrows-h-alt", "arrows-h", "arrows-merge-alt-h", "arrows-merge-alt-v", "arrows-scroll-h", "arrows-scroll-v", "arrows-shrink-h", "arrows-shrink-v", "arrows-v-alt", "arrows-v", "assign", "asterisk", "attachment", "attribution", "awards", "backspace", "band-aid", "battery-empty", "battery-full", "battery", "bee", "bell", "bitbucket", "block", "board", "bolt", "bookmark", "border-all", "border-bottom", "border-left", "border-right", "border-style-dashed", "border-style-dotted", "border-style-solid", "border-top", "bot", "bowl", "box", "boy", "briefcase", "browse", "browser", "brush", "bulb", "c-plus-plus", "calculator", "calendar-dates", "calendar-due", "calendar-next", "calendar-today", "calendar-two", "calendar", "calibrate", "camera", "cap", "captions", "card-clubs", "card-diamonds", "card-hearts", "card-spades", "carousel", "cast", "chart", "check-o", "check-r", "check", "chevron-double-down-o", "chevron-double-down-r", "chevron-double-down", "chevron-double-left-o", "chevron-double-left-r", "chevron-double-left", "chevron-double-right-o", "chevron-double-right-r", "chevron-double-right", "chevron-double-up-o", "chevron-double-up-r", "chevron-double-up", "chevron-down-o", "chevron-down-r", "chevron-down", "chevron-left-o", "chevron-left-r", "chevron-left", "chevron-right-o", "chevron-right-r", "chevron-right", "chevron-up-o", "chevron-up-r", "chevron-up", "clapper-board", "clipboard", "close-o", "close-r", "close", "cloud", "code-slash", "code", "coffee", "collage", "color-bucket", "color-picker", "comment", "community", "components", "compress-left", "compress-right", "compress-v", "compress", "controller", "copy", "copyright", "corner-double-down-left", "corner-double-down-right", "corner-double-left-down", "corner-double-left-up", "corner-double-right-down", "corner-double-right-up", "corner-double-up-left", "corner-double-up-right", "corner-down-left", "corner-down-right", "corner-left-down", "corner-left-up", "corner-right-down", "corner-right-up", "corner-up-left", "corner-up-right", "credit-card", "crop", "cross", "crown", "danger", "dark-mode", "data", "database", "debug", "desktop", "details-less", "details-more", "dialpad", "disc", "display-flex", "display-fullwidth", "display-grid", "display-spacing", "distribute-horizontal", "distribute-vertical", "dock-bottom", "dock-left", "dock-right", "dock-window", "dollar", "drive", "drop-invert", "drop-opacity", "drop", "duplicate", "edit-black-point", "edit-contrast", "edit-exposure", "edit-fade", "edit-flip-h", "edit-flip-v", "edit-highlight", "edit-markup", "edit-mask", "edit-noise", "edit-shadows", "edit-straight", "edit-unmask", "eject", "enter", "erase", "ereader", "ericsson", "ethernet", "euro", "expand", "export", "extension-add", "extension-alt", "extension-remove", "extension", "external", "eye-alt", "eye", "feed", "file-add", "file-document", "file-remove", "file", "film", "filters", "flag-alt", "flag", "folder-add", "folder-remove", "folder", "font-height", "font-spacing", "format-bold", "format-center", "format-color", "format-heading", "format-indent-decrease", "format-indent-increase", "format-italic", "format-justify", "format-left", "format-line-height", "format-right", "format-separator", "format-slash", "format-strike", "format-text", "format-underline", "format-uppercase", "games", "gender-female", "gender-male", "ghost-character", "gift", "girl", "git-branch", "git-commit", "git-fork", "git-pull", "glass-alt", "glass", "globe-alt", "globe", "gym", "hashtag", "headset", "heart", "home-alt", "home-screen", "home", "icecream", "image", "import", "inbox", "infinity", "info", "inpicture", "insert-after-o", "insert-after-r", "insert-after", "insert-before-o", "insert-before-r", "insert-before", "insights", "internal", "key", "keyboard", "keyhole", "laptop", "layout-grid-small", "layout-grid", "layout-list", "layout-pin", "link", "list-tree", "list", "live-photo", "loadbar-alt", "loadbar-doc", "loadbar-sound", "loadbar", "lock-unlock", "lock", "log-in", "log-off", "log-out", "loupe", "magnet", "mail-forward", "mail-open", "mail-reply", "mail", "math-divide", "math-equal", "math-minus", "math-percent", "math-plus", "maximize-alt", "maximize", "media-live", "media-podcast", "menu-boxed", "menu-cake", "menu-cheese", "menu-grid-o", "menu-grid-r", "menu-hotdog", "menu-left-alt", "menu-left", "menu-motion", "menu-oreos", "menu-right-alt", "menu-right", "menu-round", "menu", "merge-horizontal", "merge-vertical", "mic", "mini-player", "minimize-alt", "minimize", "modem", "moon", "more-alt", "more-o", "more-r", "more-vertical-alt", "more-vertical-o", "more-vertical-r", "more-vertical", "more", "mouse", "move-down", "move-left", "move-right", "move-task", "move-up", "music-note", "music-speaker", "music", "nametag", "notes", "notifications", "options", "organisation", "password", "path-back", "path-crop", "path-divide", "path-exclude", "path-front", "path-intersect", "path-outline", "path-trim", "path-unite", "pen", "pentagon-bottom-left", "pentagon-bottom-right", "pentagon-down", "pentagon-left", "pentagon-right", "pentagon-top-left", "pentagon-top-right", "pentagon-up", "performance", "phone", "photoscan", "piano", "pill", "pin-alt", "pin-bottom", "pin-top", "pin", "play-backwards", "play-button-o", "play-button-r", "play-button", "play-forwards", "play-list-add", "play-list-check", "play-list-remove", "play-list-search", "play-list", "play-pause-o", "play-pause-r", "play-pause", "play-stop-o", "play-stop-r", "play-stop", "play-track-next-o", "play-track-next-r", "play-track-next", "play-track-prev-o", "play-track-prev-r", "play-track-prev", "plug", "polaroid", "poll", "presentation", "printer", "profile", "pull-clear", "push-chevron-down-o", "push-chevron-down-r", "push-chevron-down", "push-chevron-left-o", "push-chevron-left-r", "push-chevron-left", "push-chevron-right-o", "push-chevron-right-r", "push-chevron-right", "push-chevron-up-o", "push-chevron-up-r", "push-chevron-up", "push-down", "push-left", "push-right", "push-up", "qr", "quote-o", "quote", "radio-check", "radio-checked", "ratio", "read", "readme", "record", "redo", "remote", "remove-r", "remove", "rename", "reorder", "repeat", "ring", "row-first", "row-last", "ruler", "sand-clock", "scan", "screen-mirror", "screen-shot", "screen-wide", "screen", "scroll-h", "scroll-v", "search-found", "search-loading", "search", "select-o", "select-r", "select", "server", "shape-circle", "shape-half-circle", "shape-hexagon", "shape-rhombus", "shape-square", "shape-triangle", "shape-zigzag", "share", "shield", "shopping-bag", "shopping-cart", "shortcut", "sidebar-open", "sidebar-right", "sidebar", "signal", "size", "sleep", "smart-home-boiler", "smart-home-cooker", "smart-home-heat", "smart-home-light", "smart-home-refrigerator", "smart-home-wash-machine", "smartphone-chip", "smartphone-ram", "smartphone-shake", "smartphone", "smile-mouth-open", "smile-neutral", "smile-no-mouth", "smile-none", "smile-sad", "smile-upside", "smile", "software-download", "software-upload", "sort-az", "sort-za", "space-between-v", "space-between", "spinner-alt", "spinner-two-alt", "spinner-two", "spinner", "stack", "stopwatch", "stories", "style", "sun", "support", "swap-vertical", "swap", "sweden", "swiss", "sync", "tab", "tag", "tap-double", "tap-single", "template", "tennis", "terminal", "terrain", "thermometer", "thermostat", "tikcode", "time", "timelapse", "timer", "today", "toggle-off", "toggle-on", "toggle-square-off", "toggle-square", "toolbar-bottom", "toolbar-left", "toolbar-right", "toolbar-top", "toolbox", "touchpad", "track", "transcript", "trash-empty", "trash", "tree", "trees", "trending-down", "trending", "trophy", "tv", "ui-kit", "umbrella", "unavailable", "unblock", "undo", "unsplash", "usb-c", "usb", "user-add", "user-list", "user-remove", "user", "view-cols", "view-comfortable", "view-day", "view-grid", "view-list", "view-month", "view-split", "vinyl", "voicemail-o", "voicemail-r", "voicemail", "volume", "webcam", "website", "work-alt", "yinyang", "zoom-in", "zoom-out"];
|
|
74
|
+
declare type IconName = typeof iconNames[number];
|
|
75
|
+
|
|
76
|
+
declare type IconColorProps = 'green' | 'red' | 'gray' | 'currentColor';
|
|
77
|
+
interface IconProps extends IconBaseProps {
|
|
78
|
+
icon: IconName | IconType;
|
|
79
|
+
iconColorClass?: IconColorProps;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Component that renders icons
|
|
83
|
+
*
|
|
84
|
+
* @component
|
|
85
|
+
* @param {IconName | IconType} icon - sets the type of icon to use from the available list
|
|
86
|
+
* @param {'green' | 'red' | 'gray' | 'currentColor'} iconColorClass - sets fill color of the svg icon
|
|
87
|
+
* @param {IconBaseProps} otherProps - sets additional icon props provided by "react-icons"
|
|
88
|
+
* @example <Icon icon="add-r" iconColorClass="currentColor" />
|
|
89
|
+
*/
|
|
90
|
+
declare const Icon: React__default.NamedExoticComponent<IconProps>;
|
|
91
|
+
|
|
92
|
+
declare type IconsMap = Record<string, IconType>;
|
|
93
|
+
declare function useIconContext(): {
|
|
94
|
+
iconsMap: IconsMap;
|
|
95
|
+
isLoading: boolean;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Provider to the Icon component
|
|
99
|
+
*
|
|
100
|
+
* @example <IconsProvider><Icon icon="add-r" /></IconsProvider>
|
|
101
|
+
*/
|
|
102
|
+
declare function IconsProvider({ children }: {
|
|
103
|
+
children: ReactNode;
|
|
104
|
+
}): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Component that provides caption text to input fields
|
|
108
|
+
*
|
|
109
|
+
* @component
|
|
110
|
+
* @param {React.ReactNode} children - allows users to add child elements
|
|
111
|
+
* @example <Caption>some help text here</Caption>
|
|
112
|
+
*/
|
|
113
|
+
declare const Caption: React$1.FC;
|
|
114
|
+
|
|
115
|
+
declare type ErrorMessageProps = {
|
|
116
|
+
message?: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Component that provides error messaging to input fields
|
|
120
|
+
*
|
|
121
|
+
* @component
|
|
122
|
+
* @param {string} message - sets the error message value
|
|
123
|
+
* @example <ErrorMessage>something went wrong, please try again</ErrorMessage>
|
|
124
|
+
*/
|
|
125
|
+
declare const ErrorMessage: ({ message }: ErrorMessageProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element | null;
|
|
126
|
+
|
|
127
|
+
declare type InputProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
|
|
128
|
+
label?: string;
|
|
129
|
+
caption?: string;
|
|
130
|
+
icon?: React$1.ReactElement;
|
|
131
|
+
showLabel?: boolean;
|
|
132
|
+
errorMessage?: string;
|
|
133
|
+
capture?: boolean | 'user' | 'environment';
|
|
134
|
+
/** @deprecated */
|
|
135
|
+
classNameContainer?: string | SerializedStyles;
|
|
136
|
+
/** @deprecated */
|
|
137
|
+
classNameControl?: string | SerializedStyles;
|
|
138
|
+
/** @deprecated */
|
|
139
|
+
classNameLabel?: string | SerializedStyles;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Input Component
|
|
143
|
+
*
|
|
144
|
+
* @component
|
|
145
|
+
* @param {string} label - sets the label value
|
|
146
|
+
* @param {string} caption - sets help text value
|
|
147
|
+
* @param {boolean} showLabel - sets whether to hide the label and use aria-label on the input itself
|
|
148
|
+
* @param {React.ReactElement} icon - add an input icon to the input field
|
|
149
|
+
* @param {string} errorMessage - sets shows the the error message value
|
|
150
|
+
* @example - <Input label="my label" id="some-id" name="some-name" caption="some help text" errorMessage={hasError ? 'something went wrong' : undefined} />
|
|
151
|
+
*/
|
|
152
|
+
declare const Input: ({ label, icon, id, caption, showLabel, errorMessage, classNameContainer, classNameControl, classNameLabel, ...props }: InputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
153
|
+
|
|
154
|
+
declare type InputComboBoxOption = {
|
|
155
|
+
label: string;
|
|
156
|
+
value: string;
|
|
157
|
+
isDisabled?: boolean;
|
|
158
|
+
};
|
|
159
|
+
declare type InputComboBoxProps<TOption, IsMulti extends boolean, TGroup extends GroupBase<TOption> = GroupBase<TOption>> = StateManagerProps<TOption, IsMulti, TGroup> & React$1.RefAttributes<InternalSelect<TOption, IsMulti, TGroup>>;
|
|
160
|
+
declare type ComboBoxGroupBase<TOption> = GroupBase<TOption>;
|
|
161
|
+
/**
|
|
162
|
+
* InputComboBox
|
|
163
|
+
* @component
|
|
164
|
+
* @example <InputComboBox name="name" id="combo-box" options=[{ value: 'chocolate', label: 'Chocolate' }, { value: 'strawberry', label: 'Strawberry' }, { value: 'vanilla', label: 'Vanilla' }] /> */
|
|
165
|
+
declare function InputComboBox<TOption = InputComboBoxOption, IsMulti extends boolean = false, TGroup extends ComboBoxGroupBase<TOption> = ComboBoxGroupBase<TOption>>(props: InputComboBoxProps<TOption, IsMulti, TGroup>): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
166
|
+
|
|
167
|
+
declare type InlineSelectInputOption = {
|
|
168
|
+
label: string;
|
|
169
|
+
value: string;
|
|
170
|
+
};
|
|
171
|
+
declare type InlineSelectInputProps = Omit<React$1.HTMLAttributes<HTMLButtonElement>, 'onChange'> & {
|
|
172
|
+
value: string;
|
|
173
|
+
options: Array<InlineSelectInputOption>;
|
|
174
|
+
onChange: (option: InlineSelectInputOption) => void;
|
|
175
|
+
disabled?: boolean;
|
|
176
|
+
classNameContainer?: SerializedStyles | string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Input Inline Select
|
|
180
|
+
* @component
|
|
181
|
+
* @param {string} value - sets the selected value
|
|
182
|
+
* @param {Array<InlineSelectInputOption>} options - sets the available options within the dropdown
|
|
183
|
+
* @param {(option: InlineSelectInputOption) => void} onChange - function that takes an option argument and sets the new value
|
|
184
|
+
* @param {boolean} disabled - sets the disabled state of the button
|
|
185
|
+
* @param {SerializedStyles | string} classNameContainer - override existing styles by passing new emotion styles or a string of css props
|
|
186
|
+
* @example <InlineSelectInput disabled={index > 1} value={currentValue ?? '&'} options={[{ label: 'AND', value: '&' }, { label: 'OR', value: '|' }]} onChange={(s) => {setState(s.value)}} />
|
|
187
|
+
*/
|
|
188
|
+
declare const InputInlineSelect: ({ classNameContainer, options, value, onChange, disabled, ...props }: InlineSelectInputProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
189
|
+
|
|
190
|
+
interface InputKeywordSearchProps {
|
|
191
|
+
onSearchTextChanged: (searchText: string) => void;
|
|
192
|
+
disabled?: boolean;
|
|
193
|
+
placeholder?: string;
|
|
194
|
+
inputFieldName?: string;
|
|
195
|
+
disabledFieldSubmission?: boolean;
|
|
196
|
+
value?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Component used for keyword search functionality
|
|
200
|
+
* @component
|
|
201
|
+
* @param {function} onSearchTextChanged - function that takes a string value
|
|
202
|
+
* @param {boolean} disabled - sets the input field disabled state
|
|
203
|
+
* @param {string} placeholder - optional props that allows users to set the placeholder text value
|
|
204
|
+
* @param {boolean} disabledFieldSubmission - allows users to prevent default form field submission
|
|
205
|
+
* @param {string} value - optional prop that sets the value of the input field
|
|
206
|
+
* @example <InlineSelectInput disabled={index > 1} value={currentValue ?? '&'} options={[{ label: 'AND', value: '&' }, { label: 'OR', value: '|' }]} onChange={(s) => {setState(s.value)}} />
|
|
207
|
+
*/
|
|
208
|
+
declare const InputKeywordSearch: ({ onSearchTextChanged, disabled, placeholder, inputFieldName, disabledFieldSubmission, value, }: InputKeywordSearchProps) => React$1.ReactElement;
|
|
209
|
+
|
|
210
|
+
declare type InputSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
211
|
+
defaultOption?: string;
|
|
212
|
+
options: Array<React.OptionHTMLAttributes<HTMLOptionElement> & {
|
|
213
|
+
label: string;
|
|
214
|
+
}>;
|
|
215
|
+
caption?: string;
|
|
216
|
+
label: string;
|
|
217
|
+
showLabel?: boolean;
|
|
218
|
+
errorMessage?: string;
|
|
219
|
+
/** */
|
|
220
|
+
labelCta?: JSX.Element;
|
|
221
|
+
/** @deprecated */
|
|
222
|
+
classNameContainer?: string;
|
|
223
|
+
/** @deprecated */
|
|
224
|
+
classNameControl?: string;
|
|
225
|
+
/** @deprecated */
|
|
226
|
+
classNameLabel?: string;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Input Select Component
|
|
230
|
+
* @component
|
|
231
|
+
* @param {string} label - sets the label value
|
|
232
|
+
* @param {boolean} showLabel - sets whether to hide the label and use aria-label on the input itself
|
|
233
|
+
* @param {string} defaultOption - sets the first item in the options list with empty value
|
|
234
|
+
* @param {Array<React.OptionHTMLAttributes<HTMLOptionElement> & { label: string }>} options - sets an array of select options with value and text value
|
|
235
|
+
* @param {string} caption - sets help text value
|
|
236
|
+
* @param {string} errorMessage - sets and shows the the error message value
|
|
237
|
+
* @example <InputSelect label="my label" options={[{label: "option 1"}, {label: "option 2"}]} />
|
|
238
|
+
*/
|
|
239
|
+
declare const InputSelect: ({ label, defaultOption, options, caption, errorMessage, showLabel, labelCta, classNameContainer, classNameControl, classNameLabel, ...props }: InputSelectProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
240
|
+
|
|
241
|
+
declare type InputToggleProps = React$1.HTMLAttributes<HTMLInputElement> & {
|
|
242
|
+
label: string;
|
|
243
|
+
type: 'radio' | 'checkbox';
|
|
244
|
+
name: string;
|
|
245
|
+
disabled?: boolean;
|
|
246
|
+
checked?: boolean;
|
|
247
|
+
caption?: string;
|
|
248
|
+
errorMessage?: string;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Component that creates a checkbox or radio input field
|
|
252
|
+
*
|
|
253
|
+
* @component
|
|
254
|
+
* @param {string} label - sets the label value
|
|
255
|
+
* @param {'radio' | 'checkbox'} type - sets the type of input to use, either radio or checkbox
|
|
256
|
+
* @param {string} name - sets the name value of the radio/checkbox input
|
|
257
|
+
* @param {disabled} disabled - (optional) sets the disabled state
|
|
258
|
+
* @param {boolean} checked - (optional) sets the checked state of the input
|
|
259
|
+
* @param {string} caption - (optional) sets help text value
|
|
260
|
+
* @param {string} errorMessage - (optional) sets shows the the error message value
|
|
261
|
+
* @example <InputToggle label="Do you like ice cream?" type="checkbox" name="ice-cream" />
|
|
262
|
+
*/
|
|
263
|
+
declare const InputToggle: ({ label, type, disabled, checked, name, caption, errorMessage, ...props }: InputToggleProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
264
|
+
|
|
265
|
+
interface MenuProps extends MenuHTMLProps {
|
|
266
|
+
menuTrigger: React$1.ReactElement & React$1.RefAttributes<any>;
|
|
267
|
+
menuLabel: string;
|
|
268
|
+
placement?: MenuProps$1['placement'];
|
|
269
|
+
}
|
|
270
|
+
declare const MenuContext: React$1.Context<MenuStateReturn>;
|
|
271
|
+
declare const useMenuContext: () => MenuStateReturn;
|
|
272
|
+
/**
|
|
273
|
+
* Component used for creating clickable menus
|
|
274
|
+
*
|
|
275
|
+
* @component
|
|
276
|
+
* @param {string} menuLabel - sets aria-label attribute
|
|
277
|
+
* @param {React.ReactElement & React.RefAttributes<any>} menuTrigger - the component that triggers the menu functionality
|
|
278
|
+
* @param {BaseMenuProps['placement']} placement - (optional) reakit placements options for the expandable menu
|
|
279
|
+
* @param {React.ReactNode} children - allows users to add child elements
|
|
280
|
+
* @example
|
|
281
|
+
* <Menu
|
|
282
|
+
* menuTrigger={<button type="button">Click me</button>}
|
|
283
|
+
* menuItemsContainerCssClasses="bg-white"
|
|
284
|
+
* menuLabel="Linked environment management options">
|
|
285
|
+
* </Menu>
|
|
286
|
+
*/
|
|
287
|
+
declare const Menu: React$1.FC<MenuProps>;
|
|
288
|
+
|
|
289
|
+
declare type MenuItemProps = MenuItemHTMLProps & {
|
|
290
|
+
focusable?: boolean;
|
|
291
|
+
children: ChildFunction | React$1.ReactNode;
|
|
292
|
+
hideMenuOnClick?: boolean;
|
|
293
|
+
icon?: React$1.ReactElement;
|
|
294
|
+
};
|
|
295
|
+
declare type ChildFunction = (menuItemProps: MenuItemHTMLProps) => React$1.ReactElement | null;
|
|
296
|
+
/**
|
|
297
|
+
* MenuItem Component used along side <Menu /> component
|
|
298
|
+
*
|
|
299
|
+
* @component
|
|
300
|
+
* @param {ChildFunction | React.ReactNode} children - sets child elements within the component
|
|
301
|
+
* @param {boolean} hideMenuOnClick - (optional) set whether to hide the menu after a click action
|
|
302
|
+
* @param {React.ReactElement} icon - (optional) set an icon along side the item text
|
|
303
|
+
* @example <MenuItem onClick={() => alert('menu item was clicked')} icon={<RedClose />}>Remove Link</MenuItem>
|
|
304
|
+
*/
|
|
305
|
+
declare const MenuItem: React$1.FC<MenuItemProps>;
|
|
306
|
+
|
|
307
|
+
declare type CalloutType = 'caution' | 'danger' | 'info' | 'note' | 'success' | 'tip' | 'error';
|
|
308
|
+
interface CalloutProps {
|
|
309
|
+
type: CalloutType;
|
|
310
|
+
title?: React$1.ReactNode;
|
|
311
|
+
children: React$1.ReactNode;
|
|
312
|
+
className?: SerializedStyles | string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Component for showing Callout actions to the user
|
|
316
|
+
*
|
|
317
|
+
* @component
|
|
318
|
+
* @param {CalloutType} type - sets the type of callout to be used
|
|
319
|
+
* @param {React.ReactNode} title - sets the title of the callout
|
|
320
|
+
* @param {React.ReactNode} children - adds child components to the callout body
|
|
321
|
+
* @param {SerializedStyles | string} className - sets a string value className or a emotion css style property for custom overrides
|
|
322
|
+
* @example <Callout title="my title" type="caution"><p>callout body copy</p></Callout>
|
|
323
|
+
*/
|
|
324
|
+
declare const Callout: React$1.FC<CalloutProps>;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Loading Indicator
|
|
328
|
+
* @component
|
|
329
|
+
* @example <LoadingIndicator />
|
|
330
|
+
*/
|
|
331
|
+
declare const LoadingIndicator: () => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
332
|
+
|
|
333
|
+
interface LoadingOverlayProps {
|
|
334
|
+
isActive: boolean;
|
|
335
|
+
statusMessage?: string | JSX.Element;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Loading Overlay
|
|
339
|
+
* @component
|
|
340
|
+
* @param {boolean} isActive - sets whether to display the loading overlay components
|
|
341
|
+
* @param {string | JSX.Element} statusMessage - optional type that sets a text value or React component under the loading icon
|
|
342
|
+
* @example <LoadingOverlay isActive={true} statusMessage="Loading..." />
|
|
343
|
+
*/
|
|
344
|
+
declare const LoadingOverlay: React__default.FC<LoadingOverlayProps>;
|
|
345
|
+
interface LoadingIconProps {
|
|
346
|
+
width?: number;
|
|
347
|
+
height?: number;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Loading Icon
|
|
351
|
+
* @component
|
|
352
|
+
* @param {number} height - option prop that sets a number value for the height of the icon
|
|
353
|
+
* @param {number} width - option prop that sets a number value for the width of the icon
|
|
354
|
+
* @example <LoadingIcon height={128} width={128} />
|
|
355
|
+
*/
|
|
356
|
+
declare const LoadingIcon: React__default.FC<LoadingIconProps>;
|
|
357
|
+
|
|
358
|
+
declare type LevelProps = 1 | 2 | 3 | 4 | 5 | 6;
|
|
359
|
+
declare type HeadingProps = {
|
|
360
|
+
level?: LevelProps;
|
|
361
|
+
};
|
|
362
|
+
/**
|
|
363
|
+
* Component that sets the heading tag
|
|
364
|
+
* @component
|
|
365
|
+
* @param {number} level - sets the type of heading tag between h1 to h6, defaults to <h2>
|
|
366
|
+
* @param {children} children - adds child elements to the heading tag
|
|
367
|
+
* @example <Heading level={1}>Blog Post Title</Heading>
|
|
368
|
+
*/
|
|
369
|
+
declare const Heading: React$1.FC<HeadingProps>;
|
|
370
|
+
|
|
371
|
+
declare type ScrollableListProps = {
|
|
372
|
+
label?: string;
|
|
373
|
+
children?: React$1.ReactNode;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Component that sets the base structure for scrollable content in a max height container
|
|
377
|
+
* @componet
|
|
378
|
+
* @param {string} label - sets the label value
|
|
379
|
+
* @param {React.ReactNode} children - allows users to add child components within the container
|
|
380
|
+
* @example <ScrollableList label="allowed content types"><button>say hello</button></ScrollableList>
|
|
381
|
+
*/
|
|
382
|
+
declare const ScrollableList: ({ label, children }: ScrollableListProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
383
|
+
|
|
384
|
+
declare type ScrollableListItemProps = React$1.HTMLAttributes<HTMLButtonElement> & {
|
|
385
|
+
buttonText: string;
|
|
386
|
+
active: boolean;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Component used within <ScrollableList /> for adding interactive button components with predefined styles
|
|
390
|
+
* @componet
|
|
391
|
+
* @param {string} buttonText - sets the button text value
|
|
392
|
+
* @param {boolean} active - sets the active style of the button
|
|
393
|
+
* @example <ScrollableListItem buttontext="my button" active={false} />
|
|
394
|
+
*/
|
|
395
|
+
declare const ScrollableListItem: ({ buttonText, active, ...props }: ScrollableListItemProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
396
|
+
|
|
397
|
+
declare type breakpointSizeProps = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
398
|
+
declare type breakpointsProps = Record<breakpointSizeProps, string>;
|
|
399
|
+
declare const breakpoints: breakpointsProps;
|
|
400
|
+
/**
|
|
401
|
+
* Media Query Helper Function
|
|
402
|
+
* @function
|
|
403
|
+
* @param {string} size - The responsive breakpoint value
|
|
404
|
+
* @returns {string} - compiled media query e.g. (min-width: 640px)
|
|
405
|
+
*/
|
|
406
|
+
declare const mq: (size: breakpointSizeProps) => string;
|
|
407
|
+
|
|
408
|
+
export { Button, ButtonProps, ButtonSizeProps, ButtonThemeProps, Callout, CalloutProps, CalloutType, Caption, ChildFunction, ComboBoxGroupBase, ErrorMessage, ErrorMessageProps, Heading, HeadingProps, Icon, IconColorProps, IconProps, IconsProvider, InlineSelectInputOption, InlineSelectInputProps, Input, InputComboBox, InputComboBoxOption, InputComboBoxProps, InputInlineSelect, InputKeywordSearch, InputKeywordSearchProps, InputProps, InputSelect, InputSelectProps, InputToggle, InputToggleProps, LevelProps, LoadingIcon, LoadingIconProps, LoadingIndicator, LoadingOverlay, LoadingOverlayProps, Menu, MenuContext, MenuItem, MenuItemProps, MenuProps, ScrollableList, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, Theme, ThemeProps, UniformBadge, UniformLogo, UniformLogoProps, breakpointSizeProps, breakpoints, breakpointsProps, input, inputError, inputSelect, labelText, mq, scrollbarStyles, useIconContext, useMenuContext };
|